");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=s(e),o=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(o,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=s(e),a=o.slice(0,t);if(c)return Object(n.autop)(l(a,r));const i=a.match(/([\s]+)/g),u=i?i.length:0,d=o.slice(0,t+u);return Object(n.autop)(l(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l="",style:d={}}=e;const b=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),s=Object(o.count)(r,c);if(s<=t)return r;const l=a(r),d=Object(o.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{style:d,className:l},b)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=c(7),n=c(25),a=c.n(n);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(r.useContext)(s),i=e=>{let{children:t}=e;const[c,n]=Object(r.useState)({}),l=Object(r.useCallback)(e=>c[e],[c]),i=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{n({})},[]),b=Object(r.useCallback)(e=>{e&&n(t=>(e=Object(o.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),p=Object(r.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:l,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!0})},[p]),showValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!1})},[p]),showAllValidationErrors:Object(r.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(r.createElement)(s.Provider,{value:m},t)}},,function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(30),s=c(10);c(151),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,label:o="",onChange:s,options:l,screenReaderLabel:i,value:u}=e;const d="wc-block-components-sort-select__select-"+c;return Object(r.createElement)("div",{className:n()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(r.createElement)(a.a,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(r.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,value:u},l&&l.map(e=>Object(r.createElement)("option",{key:e.key,value:e.key},e.label))))})},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(17),o=c(9),n=c(0),a=c(48),s=c(120);const l=e=>{const{namespace:t,resourceName:c,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(n.useRef)({results:[],isLoading:!0}),b=Object(a.a)(i),p=Object(a.a)(l),m=Object(s.a)(),g=Object(o.useSelect)(e=>{if(!u)return null;const o=e(r.COLLECTIONS_STORE_KEY),n=[t,c,b,p],a=o.getCollectionError(...n);if(a){if(!(a instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(a)}return{results:o.getCollection(...n),isLoading:!o.hasFinishedResolution("getCollection",n)}},[t,c,p,b,u]);return null!==g&&(d.current=g),d.current}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},,function(e,t){},,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(r.createElement)("title",null,"Grid Block Preview"),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(3),s=c(4),l=c.n(s);c(172),t.a=function(e){let{className:t="",...c}=e;const r=l()("wc-block-text-toolbar-button",t);return Object(n.createElement)(a.Button,o()({className:r},c))}},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return a}));var r=c(0);const o=Object(r.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),n=()=>Object(r.useContext)(o),a=e=>{let{children:t}=e;const[c,n]=Object(r.useState)(!1),a={setIsSuppressed:n,isSuppressed:c};return Object(r.createElement)(o.Provider,{value:a},t)}},,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,function(e,t){},,function(e,t){},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"number"==typeof e},,,,,,,,,,,,,,,function(e,t){},,,function(e,t){},,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(23),s=c(27),l=c(119),i=c(28);t.a=e=>t=>{let{selected:c,...r}=t;const[u,d]=Object(n.useState)(!0),[b,p]=Object(n.useState)(null),[m,g]=Object(n.useState)([]),O=a.o.productCount>100,j=async e=>{const t=await Object(i.a)(e);p(t),d(!1)},h=Object(n.useRef)(c);Object(n.useEffect)(()=>{Object(s.h)({selected:h.current}).then(e=>{g(e),d(!1)}).catch(j)},[h]);const _=Object(l.a)(e=>{Object(s.h)({selected:c,search:e}).then(e=>{g(e),d(!1)}).catch(j)},400),E=Object(n.useCallback)(e=>{d(!0),_(e)},[d,_]);return Object(n.createElement)(e,o()({},r,{selected:c,error:b,products:m,isLoading:u,onSearch:O?E:null}))}},function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(30),l=c(29),i=c(56),u=(c(333),c(42));t.default=Object(i.withProductDataContext)(e=>{const{className:t,align:c}=e,{parentClassName:n}=Object(l.useInnerBlockLayoutContext)(),{product:i}=Object(l.useProductDataContext)(),d=Object(u.a)(e),b=Object(u.b)(e),p=Object(u.d)(e),m=Object(u.c)(e);if(!i.id||!i.on_sale)return null;const g="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(r.createElement)("div",{className:a()("wc-block-components-product-sale-badge",t,g,{[n+"__product-onsale"]:n},b.className,d.className),style:{...b.style,...d.style,...p.style,...m.style}},Object(r.createElement)(s.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))})},function(e,t,c){"use strict";var r=c(0),o=c(11);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=n},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=c(114);c(169);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(o.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(n)},t))}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var r=c(6),o=c.n(r),n=c(0),a=c(4),s=c.n(a),l=c(256),i=c(9),u=(c(178),c(139));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},b=e=>{let{className:t,context:c="default",additionalNotices:r=[]}=e;const{isSuppressed:a}=Object(u.b)(),{notices:b}=Object(i.useSelect)(e=>({notices:e("core/notices").getNotices(c)})),{removeNotice:p}=Object(i.useDispatch)("core/notices"),m=b.filter(e=>"snackbar"!==e.type).concat(r);if(!m.length)return null;const g=s()(t,"wc-block-components-notices");return a?null:Object(n.createElement)("div",{className:g},m.map(e=>Object(n.createElement)(l.a,o()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&p(e.id,c)}}),e.content)))}},,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return l}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:a={}}=t;if(!r)return;n||(n=document.body);const s=new r(e,{bubbles:c,cancelable:o,detail:a});n.dispatchEvent(s)};let n;const a=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return a}));var r=c(88),o=(c(18),c(2));const n=(e,t)=>Object.keys(o.defaultAddressFields).every(c=>e[c]===t[c]),a=e=>{const t=Object.keys(o.defaultAddressFields),c=Object(r.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(92);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(34);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,c)=>{const n=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t,c){"use strict";var r=c(68);let o={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},linkTarget:{type:"string"},productId:{type:"number",default:0}};Object(r.b)()&&(o={...o,align:{type:"string"}}),t.a=o},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(29),s=c(68),l=c(56),i=c(111),u=c(64),d=(c(332),c(42));const b=e=>{let{children:t,headingLevel:c,elementType:o="h"+c,...n}=e;return Object(r.createElement)(o,n,t)};t.a=Object(l.withProductDataContext)(e=>{const{className:t,headingLevel:c=2,showProductLink:o=!0,linkTarget:l,align:p}=e,{parentClassName:m}=Object(a.useInnerBlockLayoutContext)(),{product:g}=Object(a.useProductDataContext)(),{dispatchStoreEvent:O}=Object(u.a)(),j=Object(d.b)(e),h=Object(d.c)(e),_=Object(d.d)(e);return g.id?Object(r.createElement)(b,{headingLevel:c,className:n()(t,j.className,"wc-block-components-product-title",{[m+"__product-title"]:m,["wc-block-components-product-title--align-"+p]:p&&Object(s.b)()}),style:Object(s.b)()?{...h.style,..._.style,...j.style}:{}},Object(r.createElement)(i.a,{disabled:!o,name:g.name,permalink:g.permalink,target:l,onClick:()=>{O("product-view-link",{product:g})}})):Object(r.createElement)(b,{headingLevel:c,className:n()(t,j.className,"wc-block-components-product-title",{[m+"__product-title"]:m,["wc-block-components-product-title--align-"+p]:p&&Object(s.b)()}),style:Object(s.b)()?{...h.style,..._.style,...j.style}:{}})})},function(e,t,c){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(1),s=c(4),l=c.n(s),i=c(2),u=c(29),d=c(56),b=c(64),p=c(203),m=(c(334),c(42));const g=()=>Object(n.createElement)("img",{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),O=e=>{let{image:t,onLoad:c,loaded:r,showFullSize:a,fallbackAlt:s}=e;const{thumbnail:l,src:i,srcset:u,sizes:d,alt:b}=t||{},p={alt:b||s,onLoad:c,hidden:!r,src:l,...a&&{src:i,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,p.src&&Object(n.createElement)("img",o()({"data-testid":"product-image"},p)),!r&&Object(n.createElement)(g,null))};t.a=Object(d.withProductDataContext)(e=>{const{className:t,imageSizing:c="full-size",showProductLink:r=!0,showSaleBadge:o,saleBadgeAlign:s="right"}=e,{parentClassName:i}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[j,h]=Object(n.useState)(!1),{dispatchStoreEvent:_}=Object(b.a)(),E=Object(m.d)(e),w=Object(m.a)(e),f=Object(m.c)(e);if(!d.id)return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},w.className),style:{...E.style,...w.style,...f.style}},Object(n.createElement)(g,null));const k=!!d.images.length,y=k?d.images[0]:null,v=r?"a":n.Fragment,S=Object(a.sprintf)(
+/* translators: %s is referring to the product name */
+Object(a.__)("Link to %s","woo-gutenberg-products-block"),d.name),C={href:d.permalink,...!k&&{"aria-label":S},onClick:()=>{_("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},w.className),style:{...E.style,...w.style,...f.style}},Object(n.createElement)(v,r&&C,!!o&&Object(n.createElement)(p.default,{align:s,product:d}),Object(n.createElement)(O,{fallbackAlt:d.name,image:y,onLoad:()=>h(!0),loaded:j,showFullSize:"cropped"!==c})))})},function(e,t,c){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(1),s=c(48),l=c(501),i=c(9);const u={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},d={status:u.PRISTINE,hasError:!1,quantity:0,processingResponse:null,requestParams:{}},b={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:p,SET_IDLE:m,SET_DISABLED:g,SET_PROCESSING:O,SET_BEFORE_PROCESSING:j,SET_AFTER_PROCESSING:h,SET_PROCESSING_RESPONSE:_,SET_HAS_ERROR:E,SET_NO_ERROR:w,SET_QUANTITY:f,SET_REQUEST_PARAMS:k}=b,y=()=>({type:m}),v=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?E:w;return{type:t}},{SET_PRISTINE:S,SET_IDLE:C,SET_DISABLED:x,SET_PROCESSING:N,SET_BEFORE_PROCESSING:P,SET_AFTER_PROCESSING:T,SET_PROCESSING_RESPONSE:R,SET_HAS_ERROR:I,SET_NO_ERROR:A,SET_QUANTITY:B,SET_REQUEST_PARAMS:L}=b,{PRISTINE:D,IDLE:V,DISABLED:F,PROCESSING:M,BEFORE_PROCESSING:z,AFTER_PROCESSING:H}=u,q=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,{quantity:c,type:r,data:o}=arguments.length>1?arguments[1]:void 0;switch(r){case S:e=d;break;case C:e=t.status!==V?{...t,status:V}:t;break;case x:e=t.status!==F?{...t,status:F}:t;break;case B:e=c!==t.quantity?{...t,quantity:c}:t;break;case L:e={...t,requestParams:{...t.requestParams,...o}};break;case R:e={...t,processingResponse:o};break;case N:e=t.status!==M?{...t,status:M,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case P:e=t.status!==z?{...t,status:z,hasError:!1}:t;break;case T:e=t.status!==H?{...t,status:H}:t;break;case I:e=t.hasError?t:{...t,hasError:!0},e=t.status===M||t.status===z?{...e,status:V}:e;break;case A:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&r!==S&&e.status===D&&(e.status=V),e};var G=c(92),Q=c(220);const Y=e=>({onAddToCartAfterProcessingWithSuccess:Object(Q.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(Q.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(Q.a)("add_to_cart_before_processing",e)});var U=c(221),W=c(114),$=c(34),K=c(112);const J=Object(r.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),X=()=>Object(r.useContext)(J),Z=e=>{var t,c,o,n;let{children:b,product:m,showFormElements:E}=e;const[w,S]=Object(r.useReducer)(q,d),[C,x]=Object(r.useReducer)(G.b,{}),N=Object(s.a)(C),{createErrorNotice:P}=Object(i.useDispatch)("core/notices"),{setValidationErrors:T}=Object(W.b)(),{isSuccessResponse:R,isErrorResponse:I,isFailResponse:A}=Object($.d)(),B=Object(r.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:Y(x).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Y(x).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Y(x).onAddToCartBeforeProcessing}),[x]),L=Object(r.useMemo)(()=>({resetForm:()=>{S({type:p})},submitForm:()=>{S({type:j})},setQuantity:e=>{S((e=>({type:f,quantity:e}))(e))},setHasError:e=>{S(v(e))},setRequestParams:e=>{S((e=>({type:k,data:e}))(e))},setAfterProcessing:e=>{S({type:_,data:e}),S({type:h})}}),[]);Object(r.useEffect)(()=>{const e=w.status,t=!m.id||!Object(l.a)(m);e!==u.DISABLED||t?e!==u.DISABLED&&t&&S({type:g}):S(y())},[w.status,m,S]),Object(r.useEffect)(()=>{w.status===u.BEFORE_PROCESSING&&(Object(K.a)("error","wc/add-to-cart"),Object(U.a)(N,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;t&&P(t,"wc/add-to-cart"),c&&T(c)}),S(y())):S({type:O})}))},[w.status,T,P,S,N,null==m?void 0:m.id]),Object(r.useEffect)(()=>{if(w.status===u.AFTER_PROCESSING){const e={processingResponse:w.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:c,messageContext:r}=e;(I(e)||A(e))&&c&&(t=!0,P(c,r?{context:r}:void 0))}),t};if(w.hasError)return void Object(U.b)(N,"add_to_cart_after_processing_with_error",e).then(c=>{if(!t(c)){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"add-to-cart",context:"woocommerce/single-product/"+((null==m?void 0:m.id)||0)})}S(y())});Object(U.b)(N,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?S(v(!0)):S(y())})}},[w.status,w.hasError,w.processingResponse,L,P,I,A,R,N,null==m?void 0:m.id]);const D=Object(l.b)(m),V={product:m,productType:m.type||"simple",productIsPurchasable:Object(l.a)(m),productHasOptions:m.has_options||!1,supportsFormElements:D,showFormElements:E&&D,quantity:w.quantity||(null==m||null===(t=m.add_to_cart)||void 0===t?void 0:t.minimum)||1,minQuantity:(null==m||null===(c=m.add_to_cart)||void 0===c?void 0:c.minimum)||1,maxQuantity:(null==m||null===(o=m.add_to_cart)||void 0===o?void 0:o.maximum)||99,multipleOf:(null==m||null===(n=m.add_to_cart)||void 0===n?void 0:n.multiple_of)||1,requestParams:w.requestParams,isIdle:w.status===u.IDLE,isDisabled:w.status===u.DISABLED,isProcessing:w.status===u.PROCESSING,isBeforeProcessing:w.status===u.BEFORE_PROCESSING,isAfterProcessing:w.status===u.AFTER_PROCESSING,hasError:w.hasError,eventRegistration:B,dispatchActions:L};return Object(r.createElement)(J.Provider,{value:V},b)};var ee=c(15),te=c.n(ee),ce=c(14),re=c(218),oe=c(38),ne=()=>{const{dispatchActions:e,product:t,quantity:c,eventRegistration:o,hasError:n,isProcessing:s,requestParams:l}=X(),{hasValidationErrors:u,showAllValidationErrors:d}=Object(W.b)(),{createErrorNotice:b,removeNotice:p}=Object(i.useDispatch)("core/notices"),{receiveCart:m}=Object(oe.a)(),[g,O]=Object(r.useState)(!1),j=!n&&s,h=Object(r.useCallback)(()=>!u||(d(),{type:"error"}),[u,d]);Object(r.useEffect)(()=>{const e=o.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[o,h]);const _=Object(r.useCallback)(()=>{O(!0),p("add-to-cart","woocommerce/single-product/"+((null==t?void 0:t.id)||0));const r={id:t.id||0,quantity:c,...l};te()({path:"/wc/store/v1/cart/add-item",method:"POST",data:r,cache:"no-store",parse:!1}).then(c=>{te.a.setNonce(c.headers),c.json().then((function(r){c.ok?m(r):(r.body&&r.body.message?b(Object(ce.decodeEntities)(r.body.message),{id:"add-to-cart",context:"woocommerce/single-product/"+((null==t?void 0:t.id)||0)}):b(Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"dadd-to-cart"}),e.setHasError()),Object(re.b)({preserveCartData:!0}),e.setAfterProcessing(r),O(!1)}))}).catch(t=>{t.json().then((function(t){var c;null!==(c=t.data)&&void 0!==c&&c.cart&&m(t.data.cart),e.setHasError(),e.setAfterProcessing(t),O(!1)}))})},[t,b,p,m,e,c,l]);return Object(r.useEffect)(()=>{j&&!g&&_()},[j,_,g]),null};const ae=e=>{let{children:t,product:c,showFormElements:o}=e;return Object(r.createElement)(W.a,null,Object(r.createElement)(Z,{product:c,showFormElements:o},t,Object(r.createElement)(ne,null)))};var se=c(29),le=c(7),ie=c(56),ue=(c(258),c(67)),de=c(109),be=c(528),pe=c(64),me=c(385);const ge=e=>{let{className:t,href:c,text:o,onClick:n}=e;return Object(r.createElement)(ue.a,{className:t,href:c,onClick:n,rel:"nofollow"},o)},Oe=e=>{let{className:t,quantityInCart:c,isProcessing:o,isDisabled:n,isDone:s,onClick:l}=e;return Object(r.createElement)(ue.a,{className:t,disabled:n,showSpinner:o,onClick:l},s&&c>0?Object(a.sprintf)(
+/* translators: %s number of products in cart. */
+Object(a._n)("%d in cart","%d in cart",c,"woo-gutenberg-products-block"),c):Object(a.__)("Add to cart","woo-gutenberg-products-block"),!!s&&Object(r.createElement)(de.a,{icon:be.a}))};var je=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:c,product:o,productType:n,isDisabled:s,isProcessing:l,eventRegistration:i,hasError:u,dispatchActions:d}=X(),{parentName:b}=Object(se.useInnerBlockLayoutContext)(),{dispatchStoreEvent:p}=Object(pe.a)(),{cartQuantity:m}=Object(me.a)(o.id||0),[g,O]=Object(r.useState)(!1),j=o.add_to_cart||{url:"",text:""};return Object(r.useEffect)(()=>{const e=i.onAddToCartAfterProcessingWithSuccess(()=>(u||O(!0),!0),0);return()=>{e()}},[i,u]),(e||!c&&"simple"===n)&&t?Object(r.createElement)(Oe,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:m,isDisabled:s,isProcessing:l,isDone:g,onClick:()=>{d.submitForm("woocommerce/single-product/"+((null==o?void 0:o.id)||0)),p("cart-add-item",{product:o,listName:b})}}):Object(r.createElement)(ge,{className:"wc-block-components-product-add-to-cart-button",href:j.url,text:j.text||Object(a.__)("View Product","woo-gutenberg-products-block"),onClick:()=>{p("product-view-link",{product:o,listName:b})}})},he=c(119),_e=e=>{let{disabled:t,min:c,max:o,step:n=1,value:a,onChange:s}=e;const l=void 0!==o,i=Object(he.a)(e=>{let t=e;l&&(t=Math.min(t,Math.floor(o/n)*n)),t=Math.max(t,Math.ceil(c/n)*n),t=Math.floor(t/n)*n,t!==e&&s(t)},300);return Object(r.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:c,max:o,step:n,hidden:1===o,disabled:t,onChange:e=>{s(e.target.value),i(e.target.value)}})},Ee=e=>{let{reason:t=Object(a.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block")}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},we=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:o,multipleOf:n,dispatchActions:s,isDisabled:l}=X();return e.id&&!e.is_purchasable?Object(r.createElement)(Ee,null):e.id&&!e.is_in_stock?Object(r.createElement)(Ee,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(_e,{value:t,min:c,max:o,step:n,disabled:l,onChange:s.setQuantity}),Object(r.createElement)(je,null))},fe=(c(342),c(544)),ke=c(8),ye=c(205);const ve={value:"",label:Object(a.__)("Select an option","woo-gutenberg-products-block")};var Se=e=>{let{attributeName:t,options:c=[],value:o="",onChange:s=(()=>{}),errorMessage:l=Object(a.__)("Please select a value.","woo-gutenberg-products-block")}=e;const{getValidationError:i,setValidationErrors:u,clearValidationError:d}=Object(W.b)(),b=t,p=i(b)||{};return Object(ke.useEffect)(()=>{o?d(b):u({[b]:{message:l,hidden:!0}})},[o,b,l,d,u]),Object(ke.useEffect)(()=>()=>{d(b)},[b,d]),Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(r.createElement)(fe.a,{label:Object(ce.decodeEntities)(t),value:o||"",options:[ve,...c],onChange:s,required:!0,className:n()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":p.message&&!p.hidden})}),Object(r.createElement)(ye.a,{propertyName:b,elementId:b}))},Ce=c(57);const xe=(e,t,c)=>{const r=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(c).every(e=>""===e))return r;const o=Object.keys(e);return r.filter(e=>o.every(r=>{const o=c[r]||"",n=t["id:"+e].attributes[r];return""===o||null===n||n===o}))};var Ne=e=>{let{attributes:t,variationAttributes:c,setRequestParams:o}=e;const n=Object(s.a)(t),a=Object(s.a)(c),[l,i]=Object(r.useState)(0),[u,d]=Object(r.useState)({}),[b,p]=Object(r.useState)(!1),m=Object(r.useMemo)(()=>((e,t,c)=>{const r={},o=Object.keys(e),n=Object.values(c).filter(Boolean).length>0;return o.forEach(o=>{const a=e[o],s={...c,[o]:null},l=n?xe(e,t,s):null,i=null!==l?l.map(e=>t["id:"+e].attributes[o]):null;r[o]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:c,slug:r}=e;return null===t||t.includes(null)||t.includes(r)?{value:r,label:Object(ce.decodeEntities)(c)}:null}).filter(Boolean)}(a.terms,i)}),r})(n,a,u),[u,n,a]);return Object(r.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(Ce.a)(e))return{};const t=Object.keys(e),c={};return 0===t.length||t.forEach(t=>{const r=e[t],o=r.terms.filter(e=>e.default);var n;o.length>0&&(c[r.name]=null===(n=o[0])||void 0===n?void 0:n.slug)}),c}(t);e&&d({...e}),p(!0)}},[u,t,b]),Object(r.useEffect)(()=>{Object.values(u).filter(e=>""!==e).length===Object.keys(n).length?i(((e,t,c)=>xe(e,t,c)[0]||0)(n,a,u)):l>0&&i(0)},[u,l,n,a]),Object(r.useEffect)(()=>{o({id:l,variation:Object.keys(u).map(e=>({attribute:e,value:u[e]}))})},[o,l,u]),Object(r.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(n).map(e=>Object(r.createElement)(Se,{key:e,attributeName:e,options:m[e],value:u[e],onChange:t=>{d({...u,[e]:t})}})))},Pe=e=>{let{product:t,dispatchers:c}=e;const o=(e=>e?Object(le.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),n=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:c,attributes:r}=e;t["id:"+c]={id:c,attributes:r.reduce((e,t)=>{let{name:c,value:r}=t;return e[c]=r,e},{})}}),t})(t.variations);return 0===Object.keys(o).length||0===n.length?null:Object(r.createElement)(Ne,{attributes:o,variationAttributes:n,setRequestParams:c.setRequestParams})},Te=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:o,multipleOf:n,dispatchActions:s,isDisabled:l}=X();return e.id&&!e.is_purchasable?Object(r.createElement)(Ee,null):e.id&&!e.is_in_stock?Object(r.createElement)(Ee,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Pe,{product:e,dispatchers:s}),Object(r.createElement)(_e,{value:t,min:c,max:o,step:n,disabled:l,onChange:s.setQuantity}),Object(r.createElement)(je,null))},Re=()=>Object(r.createElement)(je,null),Ie=c(530),Ae=()=>Object(r.createElement)(Ie.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),Be=()=>Object(r.createElement)(Ae,null);const Le=()=>{const{showFormElements:e,productType:t}=X();return e?"variable"===t?Object(r.createElement)(Te,null):"grouped"===t?Object(r.createElement)(Be,null):"external"===t?Object(r.createElement)(Re,null):"simple"===t||"variation"===t?Object(r.createElement)(we,null):null:Object(r.createElement)(je,null)};t.a=Object(ie.withProductDataContext)(e=>{let{className:t,showFormElements:c}=e;const{product:o}=Object(se.useProductDataContext)(),a=n()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(le.isEmpty)(o)});return Object(r.createElement)(ae,{product:o,showFormElements:c},Object(r.createElement)("div",{className:a},Object(r.createElement)(Le,null)))})},,,,,,function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(4),n=c.n(o),a=c(91),s=c(26),l=c(29),i=c(56),u=c(42);t.default=Object(i.withProductDataContext)(e=>{var t,c;const{className:o,textAlign:i}=e,{parentClassName:d}=Object(l.useInnerBlockLayoutContext)(),{product:b}=Object(l.useProductDataContext)(),p=Object(u.b)(e),m=Object(u.d)(e),g=n()("wc-block-components-product-price",o,p.className,{[d+"__product-price"]:d}),O={...m.style,...p.style};if(!b.id)return Object(r.createElement)(a.a,{align:i,className:g});const j=b.prices,h=Object(s.getCurrencyFromPriceResponse)(j),_=j.price!==j.regular_price,E=n()({[d+"__product-price__value"]:d,[d+"__product-price__value--on-sale"]:_});return Object(r.createElement)(a.a,{align:i,className:g,priceStyle:O,regularPriceStyle:O,priceClassName:E,currency:h,price:j.price,minPrice:null==j||null===(t=j.price_range)||void 0===t?void 0:t.min_amount,maxPrice:null==j||null===(c=j.price_range)||void 0===c?void 0:c.max_amount,regularPrice:j.regular_price,regularPriceClassName:n()({[d+"__product-price__regular"]:d})})})},function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(29),l=c(56),i=(c(335),c(42));t.default=Object(l.withProductDataContext)(e=>{const{parentClassName:t}=Object(s.useInnerBlockLayoutContext)(),{product:c}=Object(s.useProductDataContext)(),n=(e=>{const t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0})(c),l=Object(i.b)(e),u=Object(i.d)(e),d=Object(i.c)(e);if(!n)return null;const b={width:n/5*100+"%"},p=Object(o.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),n),m=(e=>{const t=parseInt(e.review_count,10);return Number.isFinite(t)&&t>0?t:0})(c),g={__html:Object(o.sprintf)(
+/* translators: %1$s is referring to the average rating value, %2$s is referring to the number of ratings */
+Object(o._n)("Rated %1$s out of 5 based on %2$s customer rating","Rated %1$s out of 5 based on %2$s customer ratings",m,"woo-gutenberg-products-block"),Object(o.sprintf)('%f',n),Object(o.sprintf)('%d',m))};return Object(r.createElement)("div",{className:a()(l.className,"wc-block-components-product-rating",{[t+"__product-rating"]:t}),style:{...l.style,...u.style,...d.style}},Object(r.createElement)("div",{className:a()("wc-block-components-product-rating__stars",t+"__product-rating__stars"),role:"img","aria-label":p},Object(r.createElement)("span",{style:b,dangerouslySetInnerHTML:g})))})},function(e,t,c){"use strict";c.r(t);var r=c(6),o=c.n(r),n=c(0),a=c(4),s=c.n(a),l=c(1),i=c(64),u=c(385),d=c(14),b=c(23),p=c(2),m=c(29),g=c(56),O=(c(336),c(42));const j=e=>{let{product:t,colorStyles:c,borderStyles:r,typographyStyles:a,spacingStyles:m}=e;const{id:g,permalink:O,add_to_cart:j,has_options:h,is_purchasable:_,is_in_stock:E}=t,{dispatchStoreEvent:w}=Object(i.a)(),{cartQuantity:f,addingToCart:k,addToCart:y}=Object(u.a)(g,"woocommerce/single-product/"+(g||0)),v=Number.isFinite(f)&&f>0,S=!h&&_&&E,C=Object(d.decodeEntities)((null==j?void 0:j.description)||""),x=v?Object(l.sprintf)(
+/* translators: %s number of products in cart. */
+Object(l._n)("%d in cart","%d in cart",f,"woo-gutenberg-products-block"),f):Object(d.decodeEntities)((null==j?void 0:j.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),N=S?"button":"a",P={};return S?P.onClick=()=>{y(),w("cart-add-item",{product:t});const{cartRedirectAfterAdd:e}=Object(p.getSetting)("productsSettings");e&&(window.location.href=b.d)}:(P.href=O,P.rel="nofollow",P.onClick=()=>{w("product-view-link",{product:t})}),Object(n.createElement)(N,o()({"aria-label":C,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",c.className,r.className,{loading:k,added:v}),style:{...c.style,...r.style,...a.style,...m.style},disabled:k},P),x)},h=e=>{let{colorStyles:t,borderStyles:c,typographyStyles:r,spacingStyles:o}=e;return Object(n.createElement)("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder",t.className,c.className),style:{...t.style,...c.style,...r.style,...o.style},disabled:!0})};t.default=Object(g.withProductDataContext)(e=>{const{className:t}=e,{parentClassName:c}=Object(m.useInnerBlockLayoutContext)(),{product:r}=Object(m.useProductDataContext)(),o=Object(O.b)(e),a=Object(O.a)(e),l=Object(O.d)(e),i=Object(O.c)(e);return Object(n.createElement)("div",{className:s()(t,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},r.id?Object(n.createElement)(j,{product:r,colorStyles:o,borderStyles:a,typographyStyles:l,spacingStyles:i}):Object(n.createElement)(h,{colorStyles:o,borderStyles:a,typographyStyles:l,spacingStyles:i}))})},function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(4),n=c.n(o),a=c(113),s=c(23),l=c(29),i=c(56),u=(c(337),c(42));t.default=Object(i.withProductDataContext)(e=>{const{className:t}=e,{parentClassName:c}=Object(l.useInnerBlockLayoutContext)(),{product:o}=Object(l.useProductDataContext)(),i=Object(u.b)(e),d=Object(u.d)(e);if(!o)return Object(r.createElement)("div",{className:n()(t,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const b=o.short_description?o.short_description:o.description;return b?Object(r.createElement)(a.a,{className:n()(t,i.className,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:b,maxLength:150,countType:s.o.wordCountType||"words",style:{...i.style,...d.style}}):null})},function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(29),l=c(56);c(338),t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=n.sku;return l?Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(o.__)("SKU:","woo-gutenberg-products-block")," ",Object(r.createElement)("strong",null,l)):null})},function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(29),l=c(7),i=c(56),u=(c(339),c(42));t.default=Object(i.withProductDataContext)(e=>{const{className:t}=e,{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),i=Object(u.b)(e),d=Object(u.d)(e);return Object(l.isEmpty)(n.categories)?null:Object(r.createElement)("div",{className:a()(t,"wc-block-components-product-category-list",i.className,{[c+"__product-category-list"]:c}),style:{...i.style,...d.style}},Object(o.__)("Categories:","woo-gutenberg-products-block")," ",Object(r.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:o}=e;return Object(r.createElement)("li",{key:"category-list-item-"+o},Object(r.createElement)("a",{href:c},t))})))})},function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(29),l=c(7),i=c(56),u=(c(340),c(42));t.default=Object(i.withProductDataContext)(e=>{const{className:t}=e,{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),i=Object(u.b)(e),d=Object(u.d)(e);return Object(l.isEmpty)(n.tags)?null:Object(r.createElement)("div",{className:a()(t,i.className,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c}),style:{...i.style,...d.style}},Object(o.__)("Tags:","woo-gutenberg-products-block")," ",Object(r.createElement)("ul",null,Object.values(n.tags).map(e=>{let{name:t,link:c,slug:o}=e;return Object(r.createElement)("li",{key:"tag-list-item-"+o},Object(r.createElement)("a",{href:c},t))})))})},function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(29),l=c(56),i=(c(341),c(42));t.default=Object(l.withProductDataContext)(e=>{const{className:t}=e,{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=Object(i.b)(e),u=Object(i.d)(e);if(!n.id||!n.is_purchasable)return null;const d=!!n.is_in_stock,b=n.low_stock_remaining,p=n.is_on_backorder;return Object(r.createElement)("div",{className:a()(t,l.className,"wc-block-components-product-stock-indicator",{[c+"__stock-indicator"]:c,"wc-block-components-product-stock-indicator--in-stock":d,"wc-block-components-product-stock-indicator--out-of-stock":!d,"wc-block-components-product-stock-indicator--low-stock":!!b,"wc-block-components-product-stock-indicator--available-on-backorder":!!p}),style:{...l.style,...u.style}},b?(e=>Object(o.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(o.__)("%d left in stock","woo-gutenberg-products-block"),e))(b):((e,t)=>t?Object(o.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(o.__)("In Stock","woo-gutenberg-products-block"):Object(o.__)("Out of Stock","woo-gutenberg-products-block"))(d,p))})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(1),o=c(23);const n=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(r.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'$7.99',images:[{id:1,src:o.m+"previews/pennant.jpg",thumbnail:o.m+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,categories:[{id:1,name:"Decor",slug:"decor",link:"https://example.org"}],review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(r.__)("Add to cart","woo-gutenberg-products-block"),description:Object(r.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},,,,,,,,,,,,function(e,t,c){e.exports=c(465)},function(e,t){},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(0),o=c(9),n=c(17),a=c(14),s=c(38);const l=(e,t)=>{const c=e.find(e=>{let{id:c}=e;return c===t});return c?c.quantity:0},i=e=>{const{addItemToCart:t}=Object(o.useDispatch)(n.CART_STORE_KEY),{cartItems:c,cartIsLoading:i}=Object(s.a)(),{createErrorNotice:u,removeNotice:d}=Object(o.useDispatch)("core/notices"),[b,p]=Object(r.useState)(!1),m=Object(r.useRef)(l(c,e));return Object(r.useEffect)(()=>{const t=l(c,e);t!==m.current&&(m.current=t)},[c,e]),{cartQuantity:Number.isFinite(m.current)?m.current:0,addingToCart:b,cartIsLoading:i,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return p(!0),t(e,c).then(()=>{d("add-to-cart")}).catch(e=>{u(Object(a.decodeEntities)(e.message),{id:"add-to-cart",context:"wc/all-products",isDismissible:!0})}).finally(()=>{p(!1)})}}}},function(e,t){},,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.r(t),c.d(t,"blockSettings",(function(){return Kt}));var r=c(6),o=c.n(r),n=c(0),a=c(1),s=c(5),l=c(13),i=c(109),u=c(520),d=c(68),b=c(4),p=c.n(b),m={category:"woocommerce-product-elements",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(n.createElement)(i.a,{icon:u.a,className:"wc-block-editor-components-block-icon"})},supports:{html:!1},parent:Object(d.a)()?void 0:["@woocommerce/all-products","@woocommerce/single-product"],save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",{className:p()("is-loading",t.className)})},deprecated:[{attributes:{},save:()=>null}]},g=c(259),O=c(3),j=c(10),h=c(98),_=c(260),E=c(107),w=c(135),f=c(29);c(383);var k=e=>t=>c=>{const r=Object(f.useProductDataContext)(),{attributes:o,setAttributes:l}=c,{productId:i}=o,[u,d]=Object(n.useState)(!i);return r.hasContext?Object(n.createElement)(t,c):Object(n.createElement)(n.Fragment,null,u?Object(n.createElement)(O.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(n.createElement)("div",null,e.description),Object(n.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(n.createElement)(E.a,{selected:i||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];l({productId:e[0]?e[0].id:0})}}),Object(n.createElement)(O.Button,{isSecondary:!0,disabled:!i,onClick:()=>{d(!1)}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(O.ToolbarGroup,null,Object(n.createElement)(w.a,{onClick:()=>d(!0)},Object(a.__)("Switch product…","woo-gutenberg-products-block")))),Object(n.createElement)(t,c)))},y=c(521);const v=Object(a.__)("Product Title","woo-gutenberg-products-block"),S=Object(n.createElement)(i.a,{icon:y.a,className:"wc-block-editor-components-block-icon"}),C=Object(a.__)("Display the title of a product.","woo-gutenberg-products-block");c(384);const x=e=>{let{attributes:t,setAttributes:c}=e;const r=Object(s.useBlockProps)(),{headingLevel:o,showProductLink:l,align:i,linkTarget:u}=t;return Object(n.createElement)("div",r,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(h.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:o,onChange:e=>c({headingLevel:e})}),Object(d.b)()&&Object(n.createElement)(s.AlignmentToolbar,{value:i,onChange:e=>{c({align:e})}})),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Link settings","woo-gutenberg-products-block")},Object(n.createElement)(O.ToggleControl,{label:Object(a.__)("Make title a link","woo-gutenberg-products-block"),checked:l,onChange:()=>c({showProductLink:!l})}),l&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(O.ToggleControl,{label:Object(a.__)("Open in new tab","woo-gutenberg-products-block"),onChange:e=>c({linkTarget:e?"_blank":"_self"}),checked:"_blank"===u})))),Object(n.createElement)(O.Disabled,null,Object(n.createElement)(_.a,t)))};var N=Object(d.b)()?Object(j.compose)([k({icon:S,label:v,description:Object(a.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(x):x;const P=e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))};var T=c(90);const R={...m,apiVersion:2,title:v,description:C,icon:{src:S},attributes:g.a,edit:N,save:P,supports:{...m.supports,...Object(d.b)()&&{typography:{fontSize:!0,lineHeight:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0},color:{text:!0,background:!0,link:!1,gradients:!0,__experimentalSkipSerialization:!0},...Object(T.a)()&&{spacing:{margin:!0,__experimentalSkipSerialization:!0}},__experimentalSelector:".wc-block-components-product-title"}}};Object(l.registerBlockType)("woocommerce/product-title",R);var I=c(270),A=c(522);const B=Object(a.__)("Product Price","woo-gutenberg-products-block"),L=Object(n.createElement)(i.a,{icon:A.a,className:"wc-block-editor-components-block-icon"}),D=Object(a.__)("Display the price of a product.","woo-gutenberg-products-block");var V=k({icon:L,label:B,description:Object(a.__)("Choose a product to display its price.","woo-gutenberg-products-block")})(e=>{let{attributes:t,setAttributes:c}=e;const r=Object(s.useBlockProps)();return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.BlockControls,null,Object(d.b)()&&Object(n.createElement)(s.AlignmentToolbar,{value:t.textAlign,onChange:e=>{c({textAlign:e})}})),Object(n.createElement)("div",r,Object(n.createElement)(I.default,t)))});let F={productId:{type:"number",default:0}};Object(d.b)()&&(F={...F,textAlign:{type:"string"}});var M=F;const z={...m,apiVersion:2,title:B,description:D,icon:{src:L},attributes:M,edit:V,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))},supports:{...m.supports,...Object(d.b)()&&{color:{text:!0,background:!1,link:!1,__experimentalSkipSerialization:!0},typography:{fontSize:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wc-block-components-product-price"}}};Object(l.registerBlockType)("woocommerce/product-price",z);var H=c(261);const q={...Object(d.b)()&&{__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},typography:{fontSize:!0,__experimentalSkipSerialization:!0},...Object(T.a)()&&{spacing:{margin:!0,__experimentalSkipSerialization:!0}},__experimentalSelector:".wc-block-components-product-image"}};var G=c(2),Q=c(262),Y=c(523);const U=Object(a.__)("Product Image","woo-gutenberg-products-block"),W=Object(n.createElement)(i.a,{icon:Y.a,className:"wc-block-editor-components-block-icon"}),$=Object(a.__)("Display the main product image","woo-gutenberg-products-block");var K=k({icon:W,label:U,description:Object(a.__)("Choose a product to display its image.","woo-gutenberg-products-block")})(e=>{let{attributes:t,setAttributes:c}=e;const{showProductLink:r,imageSizing:o,showSaleBadge:l,saleBadgeAlign:i}=t,u=Object(s.useBlockProps)();return Object(n.createElement)("div",u,Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(O.ToggleControl,{label:Object(a.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(a.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:r,onChange:()=>c({showProductLink:!r})}),Object(n.createElement)(O.ToggleControl,{label:Object(a.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(a.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:l,onChange:()=>c({showSaleBadge:!l})}),l&&Object(n.createElement)(O.__experimentalToggleGroupControl,{label:Object(a.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:i,onChange:e=>c({saleBadgeAlign:e})},Object(n.createElement)(O.__experimentalToggleGroupControlOption,{value:"left",label:Object(a.__)("Left","woo-gutenberg-products-block")}),Object(n.createElement)(O.__experimentalToggleGroupControlOption,{value:"center",label:Object(a.__)("Center","woo-gutenberg-products-block")}),Object(n.createElement)(O.__experimentalToggleGroupControlOption,{value:"right",label:Object(a.__)("Right","woo-gutenberg-products-block")})),Object(n.createElement)(O.__experimentalToggleGroupControl,{label:Object(a.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(n.createInterpolateElement)(Object(a.__)("Product image cropping can be modified in the Customizer.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(G.getAdminLink)("customize.php")+"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images",target:"_blank",rel:"noopener noreferrer"})}),value:o,onChange:e=>c({imageSizing:e})},Object(n.createElement)(O.__experimentalToggleGroupControlOption,{value:"full-size",label:Object(a.__)("Full Size","woo-gutenberg-products-block")}),Object(n.createElement)(O.__experimentalToggleGroupControlOption,{value:"cropped",label:Object(a.__)("Cropped","woo-gutenberg-products-block")})))),Object(n.createElement)(O.Disabled,null,Object(n.createElement)(Q.a,t)))});const J={apiVersion:2,title:U,description:$,icon:{src:W},attributes:H.a,edit:K,supports:q,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))}};Object(l.registerBlockType)("woocommerce/product-image",{...m,...J});var X=c(271),Z=c(516);const ee=Object(a.__)("Product Rating","woo-gutenberg-products-block"),te=Object(n.createElement)(i.a,{icon:Z.a,className:"wc-block-editor-components-block-icon"}),ce=Object(a.__)("Display the average rating of a product.","woo-gutenberg-products-block");var re=k({icon:te,label:ee,description:Object(a.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;const c=Object(s.useBlockProps)({className:"wp-block-woocommerce-product-rating"});return Object(n.createElement)("div",c,Object(n.createElement)(X.default,t))});const oe={apiVersion:2,title:ee,description:ce,icon:{src:te},attributes:{productId:{type:"number",default:0}},supports:{...Object(d.b)()&&{color:{text:!0,background:!1,link:!1,__experimentalSkipSerialization:!0},typography:{fontSize:!0,__experimentalSkipSerialization:!0},...Object(T.a)()&&{spacing:{margin:!0,__experimentalSkipSerialization:!0}},__experimentalSelector:".wc-block-components-product-rating"}},edit:re,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))}};Object(l.registerBlockType)("woocommerce/product-rating",{...m,...oe});var ne=c(272),ae=c(524);const se=Object(a.__)("Add to Cart Button","woo-gutenberg-products-block"),le=Object(n.createElement)(i.a,{icon:ae.a,className:"wc-block-editor-components-block-icon"}),ie=Object(a.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block");var ue=k({icon:le,label:se,description:Object(a.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;const c=Object(s.useBlockProps)();return Object(n.createElement)("div",c,Object(n.createElement)(O.Disabled,null,Object(n.createElement)(ne.default,t)))});const de={apiVersion:2,title:se,description:ie,icon:{src:le},attributes:{productId:{type:"number",default:0}},supports:{...Object(d.b)()&&{color:{text:!0,background:!0,link:!1,__experimentalSkipSerialization:!0},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},...Object(T.a)()&&{spacing:{padding:!0,__experimentalSkipSerialization:!0}},typography:{fontSize:!0,__experimentalFontWeight:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button"}},edit:ue,save:P};Object(l.registerBlockType)("woocommerce/product-button",{...m,...de});var be=c(273),pe=c(525);const me=Object(a.__)("Product Summary","woo-gutenberg-products-block"),ge=Object(n.createElement)(i.a,{icon:pe.a,className:"wc-block-editor-components-block-icon"}),Oe=Object(a.__)("Display a short description about a product.","woo-gutenberg-products-block");c(386);var je=k({icon:ge,label:me,description:Object(a.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;const c=Object(s.useBlockProps)();return Object(n.createElement)("div",c,Object(n.createElement)(be.default,t))});const he={apiVersion:2,title:me,description:Oe,icon:{src:ge},attributes:{productId:{type:"number",default:0}},supports:{...Object(d.b)()&&{color:{text:!0,background:!1,link:!1},typography:{fontSize:!0},__experimentalSelector:".wc-block-components-product-summary"}},edit:je,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))}};Object(l.registerBlockType)("woocommerce/product-summary",{...m,...he});var _e=c(203),Ee=c(514);const we=Object(a.__)("On-Sale Badge","woo-gutenberg-products-block"),fe=Object(n.createElement)(i.a,{icon:Ee.a,className:"wc-block-editor-components-block-icon"}),ke=Object(a.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block");var ye=k({icon:fe,label:we,description:Object(a.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;const c=Object(s.useBlockProps)();return Object(n.createElement)("div",c,Object(n.createElement)(_e.default,t))});const ve={title:we,description:ke,icon:{src:fe},apiVersion:2,supports:{html:!1,...Object(d.b)()&&{color:{gradients:!0,background:!0,link:!1,__experimentalSkipSerialization:!0},typography:{fontSize:!0,__experimentalSkipSerialization:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0},...Object(T.a)()&&{spacing:{padding:!0,__experimentalSkipSerialization:!0}},__experimentalSelector:".wc-block-components-product-sale-badge"}},attributes:{productId:{type:"number",default:0}},edit:ye,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))}};Object(l.registerBlockType)("woocommerce/product-sale-badge",{...m,...ve});var Se=c(100),Ce=c(274),xe=c(11),Ne=Object(n.createElement)(xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"}));const Pe=Object(a.__)("Product SKU","woo-gutenberg-products-block"),Te=Object(n.createElement)(i.a,{icon:Ne,className:"wc-block-editor-components-block-icon"}),Re={title:Pe,description:Object(a.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:Te},attributes:{productId:{type:"number",default:0}},edit:k({icon:Te,label:Pe,description:Object(a.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Se.a,null),Object(n.createElement)(Ce.default,t))})};Object(d.c)("woocommerce/product-sku",{...m,...Re});var Ie=c(275),Ae=c(526);const Be=Object(a.__)("Product Category List","woo-gutenberg-products-block"),Le=Object(n.createElement)(i.a,{icon:Ae.a,className:"wc-block-editor-components-block-icon"}),De=Object(a.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block");var Ve=k({icon:Le,label:Be,description:Object(a.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;const c=Object(s.useBlockProps)();return Object(n.createElement)("div",c,Object(n.createElement)(Se.a,null),Object(n.createElement)(O.Disabled,null,Object(n.createElement)(Ie.default,t)))});const Fe={...m,apiVersion:2,title:Be,description:De,icon:{src:Le},attributes:{productId:{type:"number",default:0}},supports:{...Object(d.b)()&&{color:{text:!0,link:!0,background:!1,__experimentalSkipSerialization:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wc-block-components-product-category-list"}},save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))},edit:Ve};Object(d.c)("woocommerce/product-category-list",Fe);var Me=c(276),ze=c(519);const He=Object(a.__)("Product Tag List","woo-gutenberg-products-block"),qe=Object(n.createElement)(i.a,{icon:ze.a,className:"wc-block-editor-components-block-icon"}),Ge=Object(a.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block");var Qe=k({icon:qe,label:He,description:Object(a.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;const c=Object(s.useBlockProps)();return Object(n.createElement)("div",c,Object(n.createElement)(Se.a,null),Object(n.createElement)(O.Disabled,null,Object(n.createElement)(Me.default,t)))});const Ye={apiVersion:2,title:He,description:Ge,icon:{src:qe},attributes:{productId:{type:"number",default:0}},supports:{...Object(d.b)()&&{color:{text:!0,background:!1,link:!0},typography:{fontSize:!0},__experimentalSelector:".wc-block-components-product-tag-list"}},edit:Qe,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))}};Object(d.c)("woocommerce/product-tag-list",{...m,...Ye});var Ue=c(277),We=c(527);const $e=Object(a.__)("Product Stock Indicator","woo-gutenberg-products-block"),Ke=Object(n.createElement)(i.a,{icon:We.a,className:"wc-block-editor-components-block-icon"}),Je=Object(a.__)("Display product stock status.","woo-gutenberg-products-block");var Xe=k({icon:Ke,label:$e,description:Object(a.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;const c=Object(s.useBlockProps)();return Object(n.createElement)("div",c,Object(n.createElement)(Se.a,null),Object(n.createElement)(Ue.default,t))});const Ze={apiVersion:2,title:$e,description:Je,icon:{src:Ke},attributes:{productId:{type:"number",default:0}},supports:{...Object(d.b)()&&{color:{text:!0,background:!1,link:!1},typography:{fontSize:!0},__experimentalSelector:".wc-block-components-product-stock-indicator"}},edit:Xe,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",s.useBlockProps.save({className:p()("is-loading",t.className)}))}};Object(d.c)("woocommerce/product-stock-indicator",{...m,...Ze});var et=c(501),tt=(c(258),c(264)),ct=c(204);const rt=Object(a.__)("Add to Cart","woo-gutenberg-products-block"),ot=Object(n.createElement)(i.a,{icon:ct.a,className:"wc-block-editor-components-block-icon"}),nt={title:rt,description:Object(a.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:ot},edit:k({icon:ot,label:rt,description:Object(a.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})(e=>{let{attributes:t,setAttributes:c}=e;const{product:r}=Object(f.useProductDataContext)(),{className:o,showFormElements:l}=t;return Object(n.createElement)("div",{className:p()(o,"wc-block-components-product-add-to-cart")},Object(n.createElement)(Se.a,{productId:r.id}),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block")},Object(et.b)(r)?Object(n.createElement)(O.ToggleControl,{label:Object(a.__)("Display form elements","woo-gutenberg-products-block"),help:Object(a.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:l,onChange:()=>c({showFormElements:!l})}):Object(n.createElement)(O.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(a.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(n.createElement)(O.Disabled,null,Object(n.createElement)(tt.a,t)))}),attributes:c(263).a};Object(d.c)("woocommerce/product-add-to-cart",{...m,...nt});var at=c(24),st=c.n(at),lt=c(9),it=c(61),ut=c(493),dt=c(370),bt=c(23);const pt=(e,t)=>{const{className:c,contentVisibility:r}=t;return p()(e,c,{"has-image":r&&r.image,"has-title":r&&r.title,"has-rating":r&&r.rating,"has-price":r&&r.price,"has-button":r&&r.button})};var mt=c(217);const gt=[["woocommerce/product-image",{imageSizing:"cropped"}],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Ot=e=>e&&0!==e.length?e.map(e=>[e.name,{...e.attributes,product:void 0,children:e.innerBlocks.length>0?Ot(e.innerBlocks):[]}]):[];var jt=c(8),ht=c(7),_t=c(30);c(392);var Et=e=>{let{currentPage:t,displayFirstAndLastPages:c=!0,displayNextAndPreviousArrows:r=!0,pagesToDisplay:o=3,onPageChange:s,totalPages:l}=e,{minIndex:i,maxIndex:u}=((e,t,c)=>{if(c<=2)return{minIndex:null,maxIndex:null};const r=e-1,o=Math.max(Math.floor(t-r/2),2),n=Math.min(Math.ceil(t+(r-(t-o))),c-1);return{minIndex:Math.max(Math.floor(t-(r-(n-t))),2),maxIndex:n}})(o,t,l);const d=c&&Boolean(1!==i),b=c&&Boolean(u!==l),m=c&&Boolean(i&&i>3),g=c&&Boolean(u&&us(t-1),title:Object(a.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(n.createElement)(_t.a,{label:"←",screenReaderLabel:Object(a.__)("Previous page","woo-gutenberg-products-block")})),d&&Object(n.createElement)("button",{className:p()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>s(1),disabled:1===t},Object(n.createElement)(_t.a,{label:"1",screenReaderLabel:Object(a.sprintf)(
+/* translators: %d is the page number (1, 2, 3...). */
+Object(a.__)("Page %d","woo-gutenberg-products-block"),1)})),m&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),O.map(e=>Object(n.createElement)("button",{key:e,className:p()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?void 0:()=>s(e),disabled:t===e},Object(n.createElement)(_t.a,{label:e.toString(),screenReaderLabel:Object(a.sprintf)(
+/* translators: %d is the page number (1, 2, 3...). */
+Object(a.__)("Page %d","woo-gutenberg-products-block"),e)}))),g&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),b&&Object(n.createElement)("button",{className:p()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===l,"wc-block-components-pagination__page--active":t===l}),onClick:()=>s(l),disabled:t===l},Object(n.createElement)(_t.a,{label:l.toString(),screenReaderLabel:Object(a.sprintf)(
+/* translators: %d is the page number (1, 2, 3...). */
+Object(a.__)("Page %d","woo-gutenberg-products-block"),l)})),r&&Object(n.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>s(t+1),title:Object(a.__)("Next page","woo-gutenberg-products-block"),disabled:t>=l},Object(n.createElement)(_t.a,{label:"→",screenReaderLabel:Object(a.__)("Next page","woo-gutenberg-products-block")})))},wt=c(105),ft=c(76),kt=c(121),yt=c(17),vt=c(48);var St=c(64);c(393);const Ct=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};var xt=c(44),Nt=c(168),Pt=()=>{const{parentClassName:e}=Object(f.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:e+"__no-products"},Object(n.createElement)(i.a,{className:e+"__no-products-image",icon:Nt.a,size:100}),Object(n.createElement)("strong",{className:e+"__no-products-title"},Object(a.__)("No products","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:e+"__no-products-description"},Object(a.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Tt=c(518),Rt=e=>{let{resetCallback:t=(()=>{})}=e;const{parentClassName:c}=Object(f.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:c+"__no-products"},Object(n.createElement)(i.a,{className:c+"__no-products-image",icon:Tt.a,size:100}),Object(n.createElement)("strong",{className:c+"__no-products-title"},Object(a.__)("No products found","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:c+"__no-products-description"},Object(a.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(n.createElement)("button",{onClick:t},Object(a.__)("Reset Search","woo-gutenberg-products-block")))},It=c(116);c(391);var At=e=>{let{onChange:t,value:c}=e;return Object(n.createElement)(It.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",onChange:t,options:[{key:"menu_order",label:Object(a.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(a.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(a.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(a.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(a.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(a.__)("Price: high to low","woo-gutenberg-products-block")}],screenReaderLabel:Object(a.__)("Order products by","woo-gutenberg-products-block"),value:c})};const Bt=(e,t,c,r)=>{if(!c)return;const a=Object(ut.a)(e);return c.map((c,s)=>{let[l,i={}]=c,u=[];i.children&&i.children.length>0&&(u=Bt(e,t,i.children,r));const d=a[l];if(!d)return null;const b=t.id||0,p=["layout",l,s,r,b];return Object(n.createElement)(n.Suspense,{key:p.join("_"),fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(d,o()({},i,{children:u,product:t})))})};var Lt=Object(j.withInstanceId)(e=>{let{product:t={},attributes:c,instanceId:r}=e;const{layoutConfig:o}=c,{parentClassName:a,parentName:s}=Object(f.useInnerBlockLayoutContext)(),l=0===Object.keys(t).length,i=p()(a+"__product","wc-block-layout",{"is-loading":l});return Object(n.createElement)("li",{className:i,"aria-hidden":l},Bt(s,t,o,r))});c(390);const Dt=e=>{switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}},Vt=function(e){let{totalQuery:t,totalProducts:c}=e,{totalQuery:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!Object(ht.isEqual)(t,r)&&Number.isFinite(c)};var Ft,Mt=(Ft=e=>{let{attributes:t,currentPage:c,onPageChange:r,onSortChange:o,sortValue:s,scrollToTop:l}=e;const[i,u]=Object(ft.b)("attributes",[]),[d,b]=Object(ft.b)("stock_status",[]),[m,g]=Object(ft.b)("min_price"),[O,j]=Object(ft.b)("max_price"),[h]=Object(ft.c)((e=>{let{sortValue:t,currentPage:c,attributes:r}=e;const{columns:o,rows:n}=r;return{...Dt(t),catalog_visibility:"catalog",per_page:o*n,page:c}})({attributes:t,sortValue:s,currentPage:c})),{products:_,totalProducts:E,productsLoading:w}=(e=>{const t={namespace:"/wc/store/v1",resourceName:"products"},{results:c,isLoading:r}=Object(kt.a)({...t,query:e}),{value:o}=((e,t)=>{const{namespace:c,resourceName:r,resourceValues:o=[],query:n={}}=t;if(!c||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");const a=Object(vt.a)(n),s=Object(vt.a)(o),{value:l,isLoading:i=!0}=Object(lt.useSelect)(e=>{const t=e(yt.COLLECTIONS_STORE_KEY),o=["x-wp-total",c,r,a,s];return{value:t.getCollectionHeader(...o),isLoading:t.hasFinishedResolution("getCollectionHeader",o)}},["x-wp-total",c,r,s,a]);return{value:l,isLoading:i}})(0,{...t,query:e});return{products:c,totalProducts:parseInt(o,10),productsLoading:r}})(h),{parentClassName:k,parentName:y}=Object(f.useInnerBlockLayoutContext)(),v=(e=>{const{order:t,orderby:c,page:r,per_page:o,...n}=e;return n||{}})(h),{dispatchStoreEvent:S}=Object(St.a)(),C=Object(wt.a)({totalQuery:v,totalProducts:E},Vt);Object(n.useEffect)(()=>{S("product-list-render",{products:_,listName:y})},[_,y,S]),Object(n.useEffect)(()=>{Object(ht.isEqual)(v,null==C?void 0:C.totalQuery)||(r(1),null!=C&&C.totalQuery&&(e=>{Number.isFinite(e)&&(0===e?Object(xt.speak)(Object(a.__)("No products found","woo-gutenberg-products-block")):Object(xt.speak)(Object(a.sprintf)(
+/* translators: %s is an integer higher than 0 (1, 2, 3...) */
+Object(a._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))})(E))},[null==C?void 0:C.totalQuery,E,r,v]);const{contentVisibility:x}=t,N=t.columns*t.rows,P=!Number.isFinite(E)&&Number.isFinite(null==C?void 0:C.totalProducts)&&Object(ht.isEqual)(v,null==C?void 0:C.totalQuery)?Math.ceil(((null==C?void 0:C.totalProducts)||0)/N):Math.ceil(E/N),T=_.length?_:Array.from({length:N}),R=0!==_.length||w,I=i.length>0||d.length>0||Number.isFinite(m)||Number.isFinite(O);return Object(n.createElement)("div",{className:(()=>{const{columns:e,rows:c,alignButtons:r,align:o}=t,n=void 0!==o?"align"+o:"";return p()(k,n,"has-"+e+"-columns",{"has-multiple-rows":c>1,"has-aligned-buttons":r})})()},(null==x?void 0:x.orderBy)&&R&&Object(n.createElement)(At,{onChange:o,value:s}),!R&&I&&Object(n.createElement)(Rt,{resetCallback:()=>{u([]),b([]),g(null),j(null)}}),!R&&!I&&Object(n.createElement)(Pt,null),R&&Object(n.createElement)("ul",{className:k+"__products"},T.map((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;return Object(n.createElement)(Lt,{key:e.id||c,attributes:t,product:e})}))),P>1&&Object(n.createElement)(Et,{currentPage:c,onPageChange:e=>{l({focusableSelector:"a, button"}),r(e)},totalPages:P}))},e=>{const t=Object(n.useRef)(null);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:t,"aria-hidden":!0}),Object(n.createElement)(Ft,o()({},e,{scrollToTop:e=>{null!==t.current&&((e,t)=>{const{focusableSelector:c}=t||{};window&&Number.isFinite(window.innerHeight)&&(c?((e,t)=>{var c;const r=(null===(c=e.parentElement)||void 0===c?void 0:c.querySelectorAll(t))||[];if(r.length){const e=r[0];Ct(e),null==e||e.focus()}else Ct(e)})(e,c):Ct(e))})(t.current,e)}})))}),zt=e=>{let{attributes:t}=e;const[c,r]=Object(n.useState)(1),[o,a]=Object(n.useState)(t.orderby);return Object(n.useEffect)(()=>{a(t.orderby)},[t.orderby]),Object(n.createElement)(Mt,{attributes:t,currentPage:c,onPageChange:e=>{r(e)},onSortChange:e=>{var t;const c=null==e||null===(t=e.target)||void 0===t?void 0:t.value;a(c),r(1)},sortValue:o})},Ht=c(134),qt=c(139),Gt=c(214);class Qt extends jt.Component{render(){const{attributes:e,urlParameterSuffix:t}=this.props;return e.isPreview?Ht.a:Object(n.createElement)(f.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)(qt.a,null,Object(n.createElement)(Gt.a,{context:"wc/all-products"})),Object(n.createElement)(zt,{attributes:e,urlParameterSuffix:t}))}}var Yt=Qt;c(389);class Ut extends n.Component{constructor(){super(...arguments),st()(this,"state",{isEditing:!1,innerBlocks:[]}),st()(this,"blockMap",Object(ut.a)("woocommerce/all-products")),st()(this,"componentDidMount",()=>{const{block:e}=this.props;this.setState({innerBlocks:e.innerBlocks})}),st()(this,"getTitle",()=>Object(a.__)("All Products","woo-gutenberg-products-block")),st()(this,"getIcon",()=>Object(n.createElement)(i.a,{icon:u.a})),st()(this,"togglePreview",()=>{const{debouncedSpeak:e}=this.props;this.setState({isEditing:!this.state.isEditing}),this.state.isEditing||e(Object(a.__)("Showing All Products block preview.","woo-gutenberg-products-block"))}),st()(this,"getInspectorControls",()=>{const{attributes:e,setAttributes:t}=this.props,{columns:c,rows:r,alignButtons:o}=e;return Object(n.createElement)(s.InspectorControls,{key:"inspector"},Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(it.a,{columns:c,rows:r,alignButtons:o,setAttributes:t,minColumns:Object(G.getSetting)("min_columns",1),maxColumns:Object(G.getSetting)("max_columns",6),minRows:Object(G.getSetting)("min_rows",1),maxRows:Object(G.getSetting)("max_rows",6)})),Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Content Settings","woo-gutenberg-products-block")},((e,t)=>{const{contentVisibility:c}=e;return Object(n.createElement)(O.ToggleControl,{label:Object(a.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:c.orderBy,onChange:()=>t({contentVisibility:{...c,orderBy:!c.orderBy}})})})(e,t),((e,t)=>Object(n.createElement)(O.SelectControl,{label:Object(a.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(a.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(a.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(a.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(a.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(a.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(a.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:e=>t({orderby:e})}))(e,t)))}),st()(this,"getBlockControls",()=>{const{isEditing:e}=this.state;return Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(O.ToolbarGroup,{controls:[{icon:"edit",title:Object(a.__)("Edit inner product layout","woo-gutenberg-products-block"),onClick:()=>this.togglePreview(),isActive:e}]}))}),st()(this,"renderEditMode",()=>{const e={template:this.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(this.blockMap)};return 0!==this.props.attributes.layoutConfig.length&&(e.renderAppender=!1),Object(n.createElement)(O.Placeholder,{icon:this.getIcon(),label:this.getTitle()},Object(a.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(n.createElement)(O.Tip,null,Object(a.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(n.createElement)(f.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(n.createElement)("ul",{className:"wc-block-grid__products"},Object(n.createElement)("li",{className:"wc-block-grid__product"},Object(n.createElement)(f.ProductDataContextProvider,{product:dt.a[0]},Object(n.createElement)(s.InnerBlocks,e)))))),Object(n.createElement)("div",{className:"wc-block-all-products__actions"},Object(n.createElement)(O.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,onClick:()=>{const{block:e,setAttributes:t}=this.props;t({layoutConfig:Ot(e.innerBlocks)}),this.setState({innerBlocks:e.innerBlocks}),this.togglePreview()}},Object(a.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(O.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,{innerBlocks:c}=this.state;t(e.clientId,c,!1),this.togglePreview()}},Object(a.__)("Cancel","woo-gutenberg-products-block")),Object(n.createElement)(O.Button,{className:"wc-block-all-products__reset-button",icon:Object(n.createElement)(i.a,{icon:u.a}),label:Object(a.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,c=[];gt.map(e=>{let[t,r]=e;return c.push(Object(l.createBlock)(t,r)),!0}),t(e.clientId,c,!1),this.setState({innerBlocks:e.innerBlocks})}},Object(a.__)("Reset Layout","woo-gutenberg-products-block")))))}),st()(this,"renderViewMode",()=>{const{attributes:e}=this.props,{layoutConfig:t}=e,c=t&&0!==t.length,r=this.getTitle(),o=this.getIcon();return c?Object(n.createElement)(O.Disabled,null,Object(n.createElement)(Yt,{attributes:e})):((e,t)=>Object(n.createElement)(O.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(a.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")))(r,o)}),st()(this,"render",()=>{const{attributes:e}=this.props,{isEditing:t}=this.state,c=this.getTitle(),r=this.getIcon();return 0===bt.o.productCount?((e,t)=>Object(n.createElement)(O.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(n.createElement)("p",null,Object(a.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(n.createElement)(O.Button,{className:"wc-block-products__add-product-button",isSecondary:!0,href:G.ADMIN_URL+"post-new.php?post_type=product"},Object(a.__)("Add new product","woo-gutenberg-products-block")+" ",Object(n.createElement)(i.a,{icon:mt.a})),Object(n.createElement)(O.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(a.__)("Learn more","woo-gutenberg-products-block"))))(c,r):Object(n.createElement)("div",{className:pt("wc-block-all-products",e)},this.getBlockControls(),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())})}}var Wt=Object(j.compose)(O.withSpokenMessages,Object(lt.withSelect)((e,t)=>{let{clientId:c}=t;const{getBlock:r}=e("core/block-editor");return{block:r(c)}}),Object(lt.withDispatch)(e=>{const{replaceInnerBlocks:t}=e("core/block-editor");return{replaceInnerBlocks:t}}))(Ut);const $t={columns:Object(G.getSetting)("default_columns",3),rows:Object(G.getSetting)("default_rows",3),alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:gt,isPreview:!1},Kt={title:Object(a.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(i.a,{icon:u.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:$t,edit:e=>Object(n.createElement)(Wt,e),save(e){let{attributes:t}=e;const c={};Object.keys(t).sort().forEach(e=>{c[e]=t[e]});const r={"data-attributes":JSON.stringify(c)};return Object(n.createElement)("div",o()({className:pt("wc-block-all-products",t)},r),Object(n.createElement)(s.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",{...Kt,deprecated:[{attributes:Object.assign({},Kt.attributes,{rows:{type:"number",default:1}}),save(e){let{attributes:t}=e;const c={"data-attributes":JSON.stringify(t)};return Object(n.createElement)("div",o()({className:pt("wc-block-all-products",t)},c),Object(n.createElement)(s.InnerBlocks.Content,null))}}]})},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(39),o=c(0),n=c(23);c.p=n.l,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(28)]).then(c.bind(null,270)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(3),c.e(5),c.e(25)]).then(c.bind(null,547)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(3),c.e(36)]).then(c.bind(null,548)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(29)]).then(c.bind(null,271)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(3),c.e(4),c.e(21)]).then(c.bind(null,272)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(33)]).then(c.bind(null,273)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(5)]).then(c.bind(null,203)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>c.e(31).then(c.bind(null,274)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(24)]).then(c.bind(null,275)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(35)]).then(c.bind(null,276)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(2),c.e(32)]).then(c.bind(null,277)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(3),c.e(4),c.e(19)]).then(c.bind(null,549)))});const a=e=>Object(r.getRegisteredBlockComponents)(e)},,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return o}));const r=e=>e.is_purchasable||!1,o=e=>["simple","variable"].includes(e.type||"simple")}]);
\ No newline at end of file
diff --git a/build/all-reviews.asset.php b/build/all-reviews.asset.php
new file mode 100644
index 00000000000..c27035628b3
--- /dev/null
+++ b/build/all-reviews.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '66f87573533fcc822d8a08189cbd488f');
\ No newline at end of file
diff --git a/build/all-reviews.js b/build/all-reviews.js
new file mode 100644
index 00000000000..667389c7c93
--- /dev/null
+++ b/build/all-reviews.js
@@ -0,0 +1,9 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var o,a,i=t[0],s=t[1],l=t[2],u=0,b=[];uObject(o.createElement)(c.BlockControls,null,Object(o.createElement)(i.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),l=(e,t)=>{const r=Object(a.getSetting)("showAvatars",!0),c=Object(a.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!c&&Object(o.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.__experimentalToggleGroupControl,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,onChange:e=>t({imageType:e})},Object(o.createElement)(i.__experimentalToggleGroupControlOption,{value:"reviewer",label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block")}),Object(o.createElement)(i.__experimentalToggleGroupControlOption,{value:"product",label:Object(n.__)("Product","woo-gutenberg-products-block")})),"reviewer"===e.imageType&&!r&&Object(o.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(i.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},11:function(e,t){e.exports=window.wp.primitives},110:function(e,t){},116:function(e,t,r){"use strict";var o=r(0),n=r(4),c=r.n(n),a=r(30),i=r(10);r(151),t.a=Object(i.withInstanceId)(e=>{let{className:t,instanceId:r,label:n="",onChange:i,options:s,screenReaderLabel:l,value:d}=e;const u="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:u}}),Object(o.createElement)("select",{id:u,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:i,value:d},s&&s.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},118:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(23);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`
${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}
\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`
${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}
\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:null,verified:!1}]}}},13:function(e,t){e.exports=window.wp.blocks},136:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},137:function(e,t,r){"use strict";var o=r(6),n=r.n(o),c=r(0),a=r(5),i=(r(150),r(54));t.a=e=>{let{attributes:t}=e;return Object(c.createElement)("div",n()({},a.useBlockProps.save({className:Object(i.a)(t)}),Object(i.b)(t)))}},14:function(e,t){e.exports=window.wp.htmlEntities},141:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(7),a=r(3),i=r(5),s=r(8),l=r(2),d=r(73),u=r(30);r(176);var b=e=>{let{onClick:t,label:r=Object(n.__)("Load more","woo-gutenberg-products-block"),screenReaderLabel:c=Object(n.__)("Load more","woo-gutenberg-products-block")}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(u.a,{label:r,screenReaderLabel:c})))},w=r(116);r(173);var p=e=>{let{onChange:t,readOnly:r,value:c}=e;return Object(o.createElement)(w.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(n.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(n.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(n.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(n.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(n.__)("Order reviews by","woo-gutenberg-products-block"),value:c})},m=r(4),g=r.n(m),h=r(24),v=r.n(h),_=r(162),O=r.n(_);const j=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=O()(e,{suffix:r,limit:t});return o.html},f=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e),k=(e,t,r,o)=>{const n=((e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=j(e,o.middle),o=f(o,t.clientHeight,r);return o.middle})(e,t,r);return j(e,n-o.length,o)},y={className:"read-more-content",ellipsis:"…",lessText:Object(n.__)("Read less","woo-gutenberg-products-block"),maxLines:3,moreText:Object(n.__)("Read more","woo-gutenberg-products-block")};class R extends s.Component{constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=Object(s.createRef)(),this.reviewSummary=Object(s.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){this.setSummary()}componentDidUpdate(e){e.maxLines===this.props.maxLines&&e.children===this.props.children||this.setState({clampEnabled:null,summary:"."},this.setSummary)}setSummary(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:k(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,c=e?r:n;if(c)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!c||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:r}}),(c||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}v()(R,"defaultProps",y);var E=R;r(175);var S=e=>{let{attributes:t,review:r={}}=e;const{imageType:c,showReviewDate:a,showReviewerName:i,showReviewImage:s,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,w=!Object.keys(r).length>0,p=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:g()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":w,"wc-block-components-review-list-item__item--has-image":s}),"aria-hidden":w},(u||a||i||s||p)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},s&&function(e,t,r){var c,a;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(a=e.product_image)||void 0===a?void 0:a.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(n.__)("Verified buyer","woo-gutenberg-products-block")},Object(n.__)("Verified buyer","woo-gutenberg-products-block")))}(r,c,w),(u||i||p||a)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},p&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},c=Object(n.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(n.__)("Rated %f out of 5","woo-gutenberg-products-block"),t),a={__html:Object(n.sprintf)(
+/* translators: %s is referring to the average rating value */
+Object(n.__)("Rated %s out of 5","woo-gutenberg-products-block"),Object(n.sprintf)('%f',t))};return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(o.createElement)("span",{style:r,dangerouslySetInnerHTML:a})))}(r),u&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),i&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),a&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(o.createElement)(E,{maxLines:10,moreText:Object(n.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(n.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(174);var C=e=>{let{attributes:t,reviews:r}=e;const n=Object(l.getSetting)("showAvatars",!0),c=Object(l.getSetting)("reviewRatingsEnabled",!0),a=(n||"product"===t.imageType)&&t.showReviewImage,i=c&&t.showReviewRating,s={...t,showReviewImage:a,showReviewRating:i};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(S,{attributes:s}):r.map((e,t)=>Object(o.createElement)(S,{key:e.id||t,attributes:s,review:e})))},T=r(6),P=r.n(T),N=r(25),L=r.n(N),x=r(54),A=r(28);class M extends s.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:c,reviews:i,totalReviews:s}=this.props;if(t)return Object(o.createElement)(d.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===i.length&&!r)return Object(o.createElement)(c,{attributes:e});const u=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(a.Disabled,null,e.showOrderby&&u&&Object(o.createElement)(p,{readOnly:!0,value:e.orderby}),Object(o.createElement)(C,{attributes:e,reviews:i}),e.showLoadMore&&s>i.length&&Object(o.createElement)(b,{screenReaderLabel:Object(n.__)("Load more reviews","woo-gutenberg-products-block")}))}}var I=(e=>{class t extends s.Component{constructor(){super(...arguments),v()(this,"isPreview",!!this.props.attributes.previewReviews),v()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),v()(this,"isMounted",!1),v()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),v()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(A.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(x.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:c,totalReviews:a}=this.state;return Object(o.createElement)(e,P()({},this.props,{error:r,isLoading:n,reviews:c.slice(0,t),totalReviews:a}))}}v()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(M);t.a=e=>{let{attributes:t,icon:r,name:s,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:w,showReviewDate:p,showReviewerName:m,showReviewContent:g,showReviewImage:h,showReviewRating:v}=t,{order:_,orderby:O}=Object(x.d)(t.orderby),j=!(g||v||p||m||h||w),f=Object(i.useBlockProps)({className:Object(x.a)(t)});return j?Object(o.createElement)(a.Placeholder,{icon:r,label:s},Object(n.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(I,{attributes:t,categoryIds:d,delayFunction:e=>Object(c.debounce)(e,400),noReviewsPlaceholder:l,orderby:O,order:_,productId:u,reviewsToDisplay:b}))}},15:function(e,t){e.exports=window.wp.apiFetch},150:function(e,t){},151:function(e,t){},173:function(e,t){},174:function(e,t){},175:function(e,t){},176:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},23:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return i})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return w})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return m})),r.d(t,"h",(function(){return g})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return _}));var o,n=r(2);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",i=c.pluginUrl+"build/",s=c.buildPhase,l=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,d=n.STORE_PAGES.checkout.id,u=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,w=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),p=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),m=n.STORE_PAGES.cart.permalink,g=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),h=Object(n.getSetting)("allowedCountries",{}),v=Object(n.getSetting)("shippingStates",{}),_=Object(n.getSetting)("allowedStates",{})},25:function(e,t){e.exports=window.wp.isShallowEqual},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return a}));var o=r(1),n=r(14);const c=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},a=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(n.decodeEntities)(e.message):Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,r){"use strict";var o=r(0),n=r(4),c=r.n(n);t.a=e=>{let t,{label:r,screenReaderLabel:n,wrapperElement:a,wrapperProps:i={}}=e;const s=null!=r,l=null!=n;return!s&&l?(t=a||"span",i={...i,className:c()(i.className,"screen-reader-text")},Object(o.createElement)(t,i,n)):(t=a||o.Fragment,s&&l&&r!==n?Object(o.createElement)(t,i,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,i,r))}},32:function(e,t){e.exports=window.wp.escapeHtml},33:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(32);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},372:function(e,t,r){e.exports=r(482)},482:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(13),a=r(109),i=r(517),s=(r(150),r(5)),l=r(3),d=r(141),u=()=>Object(o.createElement)(l.Placeholder,{className:"wc-block-all-reviews",icon:Object(o.createElement)(a.a,{icon:i.a,className:"block-editor-block-icon"}),label:Object(n.__)("All Reviews","woo-gutenberg-products-block")},Object(n.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block")),b=r(102),w=r(136),p=r(137),m=r(118);Object(c.registerBlockType)("woocommerce/all-reviews",{apiVersion:2,title:Object(n.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{icon:i.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...m.a,attributes:{...m.a.attributes,showProductName:!0}},attributes:{...w.a,showProductName:{type:"boolean",default:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:r}=e;return"woocommerce_recent_reviews"===t&&!(null==r||!r.raw)},transform:e=>{let{instance:t}=e;return Object(c.createBlock)("woocommerce/all-reviews",{reviewsOnPageLoad:t.raw.number,imageType:"product",showLoadMore:!1,showOrderby:!1,showReviewDate:!1,showReviewContent:!1})}}]},edit:e=>{let{attributes:t,setAttributes:r}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(s.InspectorControls,{key:"inspector"},Object(o.createElement)(l.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(l.ToggleControl,{label:Object(n.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:()=>r({showProductName:!t.showProductName})}),Object(b.b)(t,r)),Object(o.createElement)(l.PanelBody,{title:Object(n.__)("List Settings","woo-gutenberg-products-block")},Object(b.c)(t,r))),Object(o.createElement)(d.a,{attributes:t,icon:Object(o.createElement)(a.a,{icon:i.a,className:"block-editor-block-icon"}),name:Object(n.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:u}))},save:p.a})},5:function(e,t){e.exports=window.wp.blockEditor},54:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var o=r(15),n=r.n(o),c=r(4),a=r.n(c),i=r(2);const s=e=>{if(Object(i.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>n()({path:"/wc/store/v1/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:n,showReviewerName:c,showReviewContent:i,showProductName:s,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return o&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),a()(u,t,{"has-image":l,"has-name":c,"has-date":n,"has-rating":d,"has-content":i,"has-product-name":s})},u=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:n,reviewsOnPageLoad:c,reviewsOnLoadMore:a,showLoadMore:i,showOrderby:s}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":c,"data-reviews-on-load-more":a,"data-show-load-more":i,"data-show-orderby":s};return n&&(l["data-product-id"]=n),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},7:function(e,t){e.exports=window.lodash},73:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(109),a=r(168),i=r(4),s=r.n(i),l=r(3),d=r(33);r(110),t.a=e=>{let{className:t,error:r,isLoading:i=!1,onRetry:u}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(c.a,{icon:a.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(o.createElement)(d.a,{error:r}),u&&Object(o.createElement)(o.Fragment,null,i?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},8:function(e,t){e.exports=window.React}});
\ No newline at end of file
diff --git a/build/attribute-filter-frontend.asset.php b/build/attribute-filter-frontend.asset.php
new file mode 100644
index 00000000000..f98f87e25c4
--- /dev/null
+++ b/build/attribute-filter-frontend.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '45e5c6ff79bef809934a5b1e737182d6');
\ No newline at end of file
diff --git a/build/attribute-filter-frontend.js b/build/attribute-filter-frontend.js
new file mode 100644
index 00000000000..58eb575c8b1
--- /dev/null
+++ b/build/attribute-filter-frontend.js
@@ -0,0 +1,29 @@
+!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=211)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t{let{imageUrl:t=s.l+"/block-error.svg",header:n=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:c=Object(a.__)("Error:","woo-gutenberg-products-block"),button:u,showErrorBlock:l=!0}=e;return l?Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",o),u&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u))):null};n(33);class l extends c.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,showErrorBlock:r=!0,text:o,errorMessagePrefix:c,renderError:a,button:s}=this.props,{errorMessage:l,hasError:d}=this.state;return d?"function"==typeof a?a({errorMessage:l}):Object(i.createElement)(u,{showErrorBlock:r,errorMessage:n?l:null,header:e,imageUrl:t,text:o,errorMessagePrefix:c,button:s}):this.props.children}}t.a=l},,function(e,t){e.exports=window.wp.htmlEntities},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},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.a11y},,function(e,t,n){"use strict";var r=n(0),o=n(4),i=n.n(o);t.a=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:c,wrapperProps:a={}}=e;const s=null!=n,u=null!=o;return!s&&u?(t=c||"span",a={...a,className:i()(a.className,"screen-reader-text")},Object(r.createElement)(t,a,o)):(t=c||r.Fragment,s&&u&&n!==o?Object(r.createElement)(t,a,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,a,n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);const o=Object(r.createContext)("page"),i=()=>Object(r.useContext)(o);o.Provider},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(12),i=n.n(o);function c(e){const t=Object(r.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},,,,function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return f}));var r=n(5),o=n(7),i=n(0),c=n(12),a=n.n(c),s=n(29),u=n(57),l=n(22);const d=e=>{const t=Object(l.a)();e=e||t;const n=Object(o.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:c}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[n,Object(i.useCallback)(t=>{c(e,t)},[e,c])]},p=(e,t,n)=>{const c=Object(l.a)();n=n||c;const a=Object(o.useSelect)(o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t),[n,e]),{setQueryValue:s}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[a,Object(i.useCallback)(t=>{s(n,e,t)},[n,e,s])]},f=(e,t)=>{const n=Object(l.a)();t=t||n;const[r,o]=d(t),c=Object(s.a)(r),p=Object(s.a)(e),f=Object(u.a)(p),b=Object(i.useRef)(!1);return Object(i.useEffect)(()=>{a()(f,p)||(o(Object.assign({},c,p)),b.current=!0)},[c,p,f,o]),b.current?[r,o]:[e,o]}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"n",(function(){return i})),n.d(t,"l",(function(){return c})),n.d(t,"k",(function(){return a})),n.d(t,"m",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return b})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"h",(function(){return h})),n.d(t,"b",(function(){return v}));var r,o=n(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=i.pluginUrl+"images/",a=i.pluginUrl+"build/",s=i.buildPhase,u=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),b=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),m=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){var o=this,i=Object(r.useRef)(null),c=Object(r.useRef)(0),a=Object(r.useRef)(null),s=Object(r.useRef)([]),u=Object(r.useRef)(),l=Object(r.useRef)(),d=Object(r.useRef)(e),p=Object(r.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var b=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,g="maxWait"in n,h=g?Math.max(+n.maxWait||0,t):null;return Object(r.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(r.useMemo)((function(){var e=function(e){var t=s.current,n=u.current;return s.current=u.current=null,c.current=e,l.current=d.current.apply(n,t)},n=function(e,t){f&&cancelAnimationFrame(a.current),a.current=f?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!p.current)return!1;var n=e-i.current,r=e-c.current;return!i.current||n>=t||n<0||g&&r>=h},v=function(t){return a.current=null,m&&s.current?e(t):(s.current=u.current=null,l.current)},y=function(){var e=Date.now();if(r(e))return v(e);if(p.current){var o=e-i.current,a=e-c.current,s=t-o,u=g?Math.min(s,h-a):s;n(y,u)}},O=function(){for(var d=[],f=0;f{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:a=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const s=r(e,n),u=a(e,n),l={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:n,attributes:r={},props:a={},errorBoundaryProps:s={}}=e;Object(i.render)(Object(i.createElement)(c.a,s,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},a,{attributes:r})))),n,()=>{n.classList&&n.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:l,errorBoundaryProps:u})})},u=e=>{const t=document.body.querySelectorAll(a.join(",")),{Block:n,getProps:r,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:i}=e;const c=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),s({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})})({Block:n,getProps:r,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:i}=e;const c=i.querySelectorAll(o);s({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(21);n(122),t.a=e=>{let{name:t,count:n}=e;return Object(r.createElement)(r.Fragment,null,t,Number.isFinite(n)&&Object(r.createElement)(i.a,{label:n.toString(),screenReaderLabel:Object(o.sprintf)(
+/* translators: %s number of products. */
+Object(o._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{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 r}));const r=e=>"string"==typeof e},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return r(e)&&t in e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(5),o=n(7),i=n(0),c=n(29),a=n(72);const s=e=>{const{namespace:t,resourceName:n,resourceValues:s=[],query:u={},shouldSelect:l=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(i.useRef)({results:[],isLoading:!0}),p=Object(c.a)(u),f=Object(c.a)(s),b=Object(a.a)(),m=Object(o.useSelect)(e=>{if(!l)return null;const o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,p,f],c=o.getCollectionError(...i);if(c){if(!(c instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");b(c)}return{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}},[t,n,f,p,l]);return null!==m&&(d.current=m),d.current}},,,,,,,,function(e,t){e.exports=window.wp.blockEditor},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),c=n.n(i),a=n(21);n(106),t.a=e=>{let{className:t,disabled:n,label:
+/* translators: Submit button text for filters. */
+i=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(r.createElement)("button",{type:"submit",className:c()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:s},Object(r.createElement)(a.a,{label:i,screenReaderLabel:u}))}},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),o=n(47);function i(e,t){return e===t}function c(e){return"function"==typeof e?function(){return e}:e}function a(e,t,n){var a=n&&n.equalityFn||i,s=function(e){var t=Object(r.useState)(c(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(c(e))}),[])]}(e),u=s[0],l=s[1],d=Object(o.a)(Object(r.useCallback)((function(e){return l(e)}),[l]),t,n),p=Object(r.useRef)(e);return a(p.current,e)||(d(e),p.current=e),[u,d]}},function(e,t){e.exports=window.wp.components},,function(e,t){e.exports=window.wp.blocks},,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})}},,,function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(2);const o=Object(r.getSetting)("attributes",[]).reduce((e,t)=>{const n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return n.id&&e.push(n),e},[]),i=e=>{if(e)return o.find(t=>t.id===e)},c=e=>{if(e)return o.find(t=>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(6);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.filter(e=>e.attribute===n.taxonomy),c=i.length?i[0]:null;if(!(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)))return;const a=c.slug.filter(e=>e!==o),s=e.filter(e=>e.attribute!==n.taxonomy);a.length>0&&(c.slug=a.sort(),s.push(c)),t(Object(r.sortBy)(s,"attribute"))},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},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";const c=e.filter(e=>e.attribute!==n.taxonomy);0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(r.sortBy)(c,"attribute")))}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),c=n.n(i);n(123),t.a=e=>{let{className:t,onChange:n=(()=>{}),options:i=[],checked:a=[],isLoading:s=!1,isDisabled:u=!1,limit:l=10}=e;const[d,p]=Object(r.useState)(!1),f=Object(r.useMemo)(()=>[...Array(5)].map((e,t)=>Object(r.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),b=Object(r.useMemo)(()=>{const e=i.length-l;return!d&&Object(r.createElement)("li",{key:"show-more",className:"show-more"},Object(r.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)(
+/* translators: %s is referring the remaining count of options */
+Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)(
+/* translators: %s number of options to reveal. */
+Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[i,l,d]),m=Object(r.useMemo)(()=>d&&Object(r.createElement)("li",{key:"show-less",className:"show-less"},Object(r.createElement)("button",{onClick:()=>{p(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[d]),g=Object(r.useMemo)(()=>{const e=i.length>l+5;return Object(r.createElement)(r.Fragment,null,i.map((t,o)=>Object(r.createElement)(r.Fragment,{key:t.value},Object(r.createElement)("li",e&&!d&&o>=l&&{hidden:!0},Object(r.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{n(e.target.value)},checked:a.includes(t.value),disabled:u}),Object(r.createElement)("label",{htmlFor:t.value},t.label)),e&&o===l-1&&b)),e&&m)},[i,n,a,d,l,m,b,u]),h=c()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":s},t);return Object(r.createElement)("ul",{className:h},s?f:g)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n(101);var r=n(44);const o=()=>r.m>1},,,,,,function(e,t){},,,function(e,t){},function(e,t){},,,,,,,,function(e,t,n){"use strict";e.exports=n(214)},,function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d}));var r=n(70),o=n(113),i=n(59),c=n(61);const a=e=>Object(i.a)(e)?JSON.parse(e)||{}:Object(c.a)(e)?e:{},s=e=>{if(!Object(o.a)()||"function"!=typeof r.__experimentalGetSpacingClassesAndStyles)return{style:{}};const t=Object(c.a)(e)?e:{},n=a(t.style);return Object(r.__experimentalGetSpacingClassesAndStyles)({...t,style:n})},u=e=>{const t=Object(c.a)(e)?e:{},n=a(t.style),r=Object(c.a)(n.typography)?n.typography:{};return{style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:r.fontSize,lineHeight:r.lineHeight,fontWeight:r.fontWeight,textTransform:r.textTransform,fontFamily:t.fontFamily}}},l=e=>{if(!Object(o.a)())return{className:"",style:{}};const t=Object(c.a)(e)?e:{},n=a(t.style);return Object(r.__experimentalUseColorProps)({...t,style:n})},d=e=>{if(!Object(o.a)())return{className:"",style:{}};const t=Object(c.a)(e)?e:{},n=a(t.style);return Object(r.__experimentalUseBorderProps)({...t,style:n})}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),o=n(98),i=n(6),c=n(29),a=n(35),s=n(62),u=n(22);const l=e=>{let{queryAttribute:t,queryPrices:n,queryStock:l,queryState:d}=e,p=Object(u.a)();p+="-collection-data";const[f]=Object(a.a)(p),[b,m]=Object(a.b)("calculate_attribute_counts",[],p),[g,h]=Object(a.b)("calculate_price_range",null,p),[v,y]=Object(a.b)("calculate_stock_status_counts",null,p),O=Object(c.a)(t||{}),w=Object(c.a)(n),j=Object(c.a)(l);Object(r.useEffect)(()=>{"object"==typeof O&&Object.keys(O).length&&(b.find(e=>e.taxonomy===O.taxonomy)||m([...b,O]))},[O,b,m]),Object(r.useEffect)(()=>{g!==w&&void 0!==w&&h(w)},[w,h,g]),Object(r.useEffect)(()=>{v!==j&&void 0!==j&&y(j)},[j,y,v]);const[E,I]=Object(r.useState)(!1),[_]=Object(o.a)(E,200);E||I(!0);const S=Object(r.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(i.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:n}=e;return{taxonomy:t,query_type:n}}),["taxonomy","query_type"])),t})(f),[f]);return Object(s.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...d,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:_})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(14);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=i},,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(0),c=n(4),a=n.n(c),s=n(1),u=n(103),l=n(193);n(119);var d=e=>{let{text:t,screenReaderText:n="",element:r="li",className:c="",radius:s="small",children:u=null,...l}=e;const d=r,p=a()(c,"wc-block-components-chip","wc-block-components-chip--radius-"+s),f=Boolean(n&&n!==t);return Object(i.createElement)(d,o()({className:p},l),Object(i.createElement)("span",{"aria-hidden":f,className:"wc-block-components-chip__text"},t),f&&Object(i.createElement)("span",{className:"screen-reader-text"},n),u)};t.a=e=>{let{ariaLabel:t="",className:n="",disabled:r=!1,onRemove:c=(()=>{}),removeOnAnyClick:p=!1,text:f,screenReaderText:b="",...m}=e;const g=p?"span":"button";if(!t){const e=b&&"string"==typeof b?b:f;t="string"!=typeof e?
+/* translators: Remove chip. */
+Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(
+/* translators: %s text of the chip to remove. */
+Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const h={"aria-label":t,disabled:r,onClick:c,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||c()}},v=p?h:{},y=p?{"aria-hidden":!0}:h;return Object(i.createElement)(d,o()({},m,v,{className:a()(n,"is-removable"),element:p?"button":m.element,screenReaderText:b,text:f}),Object(i.createElement)(g,o()({className:"wc-block-components-chip__remove"},y),Object(i.createElement)(u.a,{className:"wc-block-components-chip__remove-icon",icon:l.a,size:16})))}},,,,,,,,,,,,,,function(e,t,n){e.exports=n(232)},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=60103,o=60106,i=60107,c=60108,a=60114,s=60109,u=60110,l=60112,d=60113,p=60120,f=60115,b=60116,m=60121,g=60122,h=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var O=Symbol.for;r=O("react.element"),o=O("react.portal"),i=O("react.fragment"),c=O("react.strict_mode"),a=O("react.profiler"),s=O("react.provider"),u=O("react.context"),l=O("react.forward_ref"),d=O("react.suspense"),p=O("react.suspense_list"),f=O("react.memo"),b=O("react.lazy"),m=O("react.block"),g=O("react.server.block"),h=O("react.fundamental"),v=O("react.debug_trace_mode"),y=O("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case c:case d:case p:return e;default:switch(e=e&&e.$$typeof){case u:case l:case b:case f:case s:return e;default:return t}}case o:return t}}}var j=s,E=r,I=l,_=i,S=b,k=f,x=o,C=a,P=c,R=d;t.ContextConsumer=u,t.ContextProvider=j,t.Element=E,t.ForwardRef=I,t.Fragment=_,t.Lazy=S,t.Memo=k,t.Portal=x,t.Profiler=C,t.StrictMode=P,t.Suspense=R,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===l},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===b},t.isMemo=function(e){return w(e)===f},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===c},t.isSuspense=function(e){return w(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===v||e===c||e===d||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===f||e.$$typeof===s||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===m||e[0]===g)},t.typeOf=w},function(e,t,n){"use strict";var r=n(216);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,bigint: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,n){"use strict";n.r(t);var r=n(48),o=n(0),i=n(1),c=n(19),a=n(29),s=n(57),u=n(35),l=n(62),d=n(140),p=n(110),f=n(4),b=n.n(f);function m(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var g=n(8);function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=n(9),O=n.n(y),w=n(3);function j(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function E(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function I(e,t){if(e.clientHeightt||i>e&&c=t&&a>=n?i-e-r:c>t&&an?c-t+o:0}n(131);var S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&E>=0&&w<=f&&O<=p&&y>=A&&w<=N&&E>=H&&O<=D)return x;var B=getComputedStyle(P),L=parseInt(B.borderLeftWidth,10),V=parseInt(B.borderTopWidth,10),F=parseInt(B.borderRightWidth,10),K=parseInt(B.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-L-F:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-K:0;if(u===P)U="start"===o?S:"end"===o?S-f:"nearest"===o?_(m,m+f,f,V,K,m+S,m+S+h,h):S-f/2,q="start"===i?k:"center"===i?k-p/2:"end"===i?k-p:_(b,b+p,p,L,F,b+k,b+k+v,v),U=Math.max(0,U+m),q=Math.max(0,q+b);else{U="start"===o?S-A-V:"end"===o?S-N+K+W:"nearest"===o?_(A,N,T,V,K+W,S,S+h,h):S-(A+T/2)+W/2,q="start"===i?k-H-L:"center"===i?k-(H+M/2)+$/2:"end"===i?k-D+F+$:_(H,D,M,L,F+$,k,k+v,v);var G=P.scrollLeft,z=P.scrollTop;S+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-T+W))),k+=G-(q=Math.max(0,Math.min(G+q,P.scrollWidth-M+$)))}x.push({el:P,top:U,left:q})}return x}(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 R(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function T(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),c=0;c1?n-1:0),o=1;o=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function F(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=K(e,c,n,r,o);return-1===a?t>=n?-1:t:a}function K(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=0;a--)if(!r(a).hasAttribute("disabled"))return a;return o?e>0?K(1,0,n,r,!1):K(-1,n-1,n,r,!1):-1}function U(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(R(t,e,n)||r&&R(t,n.document.activeElement,n))}))}var q=T((function(e){W(e).textContent=""}),500);function $(e,t){var n=W(t);e&&(n.textContent=e,q(t))}function W(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 G=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}),z=["refKey","ref"],Y=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],Q=["onKeyDown","onBlur","onChange","onInput","onChangeText"],X=["refKey","ref"],J=["onMouseMove","onMouseDown","onClick","onPress","index","item"],Z=function(){var e=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+String(k++),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=B(t),n.internalSetState(Object(g.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=B(t),n.internalSetState(Object(g.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(g.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 s={},u={};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&&(u[e]=a[e],L(n.props,e)||(s[e]=a[e]))})),c&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,Object(g.a)({},n.getStateAndHelpers(),a)),s}),(function(){x(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,s=m(o,z),u=(void 0===t?{}:t).suppressRefError,l=void 0!==u&&u;n.getRootProps.called=!0,n.getRootProps.refKey=c,n.getRootProps.suppressRefError=l;var d=n.getState().isOpen;return Object(g.a)(((r={})[c]=A(a,n.rootRef),r.role="combobox",r["aria-expanded"]=d,r["aria-haspopup"]="listbox",r["aria-owns"]=d?n.menuId:null,r["aria-labelledby"]=n.labelId,r),s)},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=F(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=F(-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(g.a)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=Object(g.a)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=Object(g.a)({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=K(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=K(-1,r-1,r,(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;t.onPress;var o=t.onKeyDown,i=t.onKeyUp,c=t.onBlur,a=m(t,Y),s=n.getState().isOpen,u={onClick:M(r,n.buttonHandleClick),onKeyDown:M(o,n.buttonHandleKeyDown),onKeyUp:M(i,n.buttonHandleKeyUp),onBlur:M(c,n.buttonHandleBlur)},l=a.disabled?{}:u;return Object(g.a)({type:"button",role:"button","aria-label":s?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,a)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=V(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(h(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(g.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;t.onChangeText;var a,s=m(t,Q),u={},l=n.getState(),d=l.inputValue,p=l.isOpen,f=l.highlightedIndex;return s.disabled||((a={}).onChange=M(i,c,n.inputHandleChange),a.onKeyDown=M(r,n.inputHandleKeyDown),a.onBlur=M(o,n.inputHandleBlur),u=a),Object(g.a)({"aria-autocomplete":"list","aria-activedescendant":p&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":p?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:d,id:n.inputId},u,s)},n.inputHandleKeyDown=function(e){var t=V(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(h(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,s=m(o,X),u=(void 0===t?{}:t).suppressRefError,l=void 0!==u&&u;return n.getMenuProps.called=!0,n.getMenuProps.refKey=c,n.getMenuProps.suppressRefError=l,Object(g.a)(((r={})[c]=A(a,n.menuRef),r.role="listbox",r["aria-labelledby"]=s&&s["aria-label"]?null:n.labelId,r.id=n.menuId,r),s)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick;r.onPress;var a=r.index,s=r.item,u=void 0===s?void 0:s,l=m(r,J);void 0===a?(n.items.push(u),a=n.items.indexOf(u)):n.items[a]=u;var d=c,p=((t={onMouseMove:M(o,(function(){a!==n.getState().highlightedIndex&&(n.setHighlightedIndex(a,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:M(i,(function(e){e.preventDefault()}))}).onClick=M(d,(function(){n.selectItemAtIndex(a,{type:9})})),t),f=l.disabled?{onMouseDown:p.onMouseDown}:p;return Object(g.a)({id:n.getItemId(a),role:"option","aria-selected":n.getState().highlightedIndex===a},f,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=B(e),n.internalSetState((function(t){var r=t.selectedItem;return Object(g.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=B(e),n.internalSetState((function(t){var r=t.isOpen;return Object(g.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),x(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=T((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(Object(g.a)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,$(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,s=r.initialIsOpen,u=void 0===s?a:s,l=r.initialInputValue,d=void 0===l?"":l,p=r.initialSelectedItem,f=void 0===p?null:p,b=n.getState({highlightedIndex:c,isOpen:u,inputValue:d,selectedItem:f});return null!=b.selectedItem&&void 0===n.props.initialInputValue&&(b.inputValue=n.props.itemToString(b.selectedItem)),n.state=b,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var o=r.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){return void 0===e&&(e=this.state),t=e,n=this.props,Object.keys(t).reduce((function(e,r){return e[r]=L(n,r)?n[r]:t[r],e}),{});var t,n},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=F(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},o.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,s=this.getToggleButtonProps,u=this.getLabelProps,l=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,b=this.closeMenu,m=this.toggleMenu,g=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:a,getToggleButtonProps:s,getLabelProps:u,getMenuProps:l,getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:b,toggleMenu:m,selectItem:g,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}},o.componentDidMount=function(){var e=this,t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!U(t.target,[e._rootNode,e._menuNode],e.props.environment)&&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=U(t.target,[e._rootNode,e._menuNode],e.props.environment,!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)}},o.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},o.componentDidUpdate=function(e,t){L(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()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=N(this.props.children,C);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=N(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:function(e){return"string"==typeof e.type}(t)?Object(w.cloneElement)(t,this.getRootProps(function(e){return e.props}(t))):void 0:null},r}(w.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:D,itemToString:function(e){return null==e?"":String(e)},onStateChange:C,onInputValueChange:C,onUserAction:C,onChange:C,onSelect:C,onOuterClick:C,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:P},e.stateChangeTypes=G,e}();T((function(e,t){$(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?w.useLayoutEffect:w.useEffect;var ee={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:P,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})}),S(S({},ee),{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(g.a)({},ee,{getA11yStatusMessage:D,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 te=e=>{let{checked:t,getInputProps:n,inputRef:r,isDisabled:i,onFocus:c,onRemoveItem:a,placeholder:s,tabIndex:u,value:l}=e;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:i,onFocus:c,onKeyDown(e){"Backspace"===e.key&&!l&&t.length>0&&a(t[t.length-1])},placeholder:s,tabIndex:u}))},ne=e=>{let{children:t,onClick:n}=e;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},re=e=>{let{checked:t,getItemProps:n,getMenuProps:r,highlightedIndex:c,options:a}=e;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),a.map((e,r)=>{const a=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:b()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":a,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":a?Object(i.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)}))},oe=n(197),ie=e=>{let{onRemoveItem:t,option:n}=e;return Object(o.createElement)(oe.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:()=>{t(n.value)},ariaLabel:Object(i.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},ce=n(103),ae=n(193),se=e=>{let{onClick:t,onRemoveItem:n,option:r}=e;const c=Object(o.useRef)(null);return Object(o.useEffect)(()=>{c.current.focus()},[c]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:e=>{e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(i.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:()=>{n(r.value)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(i.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},Object(o.createElement)(ce.a,{icon:ae.a,size:16})))};n(213);var ue=e=>{let{attributeLabel:t="",className:n,style:r={},checked:c=[],inputLabel:a="",isDisabled:s=!1,isLoading:u=!1,multiple:l=!1,onChange:d=(()=>{}),options:p=[],isCaseSensitive:f=!1}=e;const m=Object(o.useRef)(null),g=b()(n,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":s,"is-loading":u}),h=Object(o.useCallback)((e,t)=>{switch(t.type){case Z.stateChangeTypes.keyDownEnter:case Z.stateChangeTypes.clickItem:return{...t,highlightedIndex:e.highlightedIndex,isOpen:l,inputValue:""};case Z.stateChangeTypes.blurInput:case Z.stateChangeTypes.mouseUp:return{...t,inputValue:e.inputValue};default:return t}},[l]);return Object(o.createElement)(Z,{onChange:d,selectedItem:null,stateReducer:h},e=>{let{getInputProps:n,getItemProps:u,getLabelProps:h,getMenuProps:v,highlightedIndex:y,inputValue:O,isOpen:w,openMenu:j}=e;return Object(o.createElement)("div",{className:b()(g,{"is-multiple":l,"is-single":!l,"has-checked":c.length>0,"is-open":w}),style:r},Object(o.createElement)("label",h({className:"screen-reader-text"}),a),Object(o.createElement)(ne,{isOpen:w,onClick:()=>m.current.focus()},c.map(e=>{const t=p.find(t=>t.value===e),n=e=>{d(e),m.current.focus()};return l?Object(o.createElement)(ie,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(se,{key:e,onClick:()=>m.current.focus(),onRemoveItem:n,option:t})}),Object(o.createElement)(te,{checked:c,getInputProps:n,inputRef:m,isDisabled:s,onFocus:j,onRemoveItem:e=>{d(e),m.current.focus()},placeholder:c.length>0&&l?null:Object(i.sprintf)(
+/* translators: %s attribute name. */
+Object(i.__)("Any %s","woo-gutenberg-products-block"),t),tabIndex:!l&&c.length>0?"-1":"0",value:O})),w&&!s&&Object(o.createElement)(re,{checked:c,getItemProps:u,getMenuProps:v,highlightedIndex:y,options:p.filter(e=>{let t=e.name,n=null==O?void 0:O.trim();var r;return f||(t=t.toLowerCase(),n=null===(r=n)||void 0===r?void 0:r.toLowerCase()),!n||t.includes(n)})}))})},le=n(49),de=n(74),pe=n(12),fe=n.n(pe),be=n(17),me=n(99),ge=n(108),he=n(109);const ve=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(le.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(le.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(le.a,{name:"Red",count:2})}],ye={id:0,name:"preview",taxonomy:"preview",label:"Preview"};var Oe=n(133);n(212);Object(r.a)({selector:".wp-block-woocommerce-attribute-filter",Block:e=>{let{attributes:t,isEditor:n=!1}=e;const r=t.isPreview&&!t.attributeId?ye:Object(ge.a)(t.attributeId),[f,m]=Object(o.useState)([]),[g,h]=Object(o.useState)(t.isPreview&&!t.attributeId?ve:[]),v=Object(Oe.a)(t),[y]=Object(u.a)(),[O,w]=Object(u.b)("attributes",[]),{results:j,isLoading:E}=Object(l.a)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[(null==r?void 0:r.id)||0],shouldSelect:t.attributeId>0}),I="dropdown"!==t.displayStyle&&"and"===t.queryType,{results:_,isLoading:S}=Object(d.a)({queryAttribute:{taxonomy:null==r?void 0:r.taxonomy,queryType:t.queryType},queryState:{...y,attributes:I?y.attributes:null}}),k=Object(o.useCallback)(e=>_.attribute_counts?_.attribute_counts.find(t=>{let{term:n}=t;return n===e}):null,[_]);Object(o.useEffect)(()=>{if(E||S)return;const e=j.map(e=>{const n=k(e.id);if(!(n||f.includes(e.slug)||(i=e.slug,null!=y&&y.attributes&&y.attributes.some(e=>{let{attribute:t,slug:n=[]}=e;return t===r.taxonomy&&n.includes(i)}))))return null;var i;const c=n?n.count:0;return{value:e.slug,name:Object(be.decodeEntities)(e.name),label:Object(o.createElement)(le.a,{name:Object(be.decodeEntities)(e.name),count:t.showCounts?c:null})}}).filter(Boolean);h(e)},[null==r?void 0:r.taxonomy,j,E,t.showCounts,S,k,f,y.attributes]);const x=Object(o.useCallback)(e=>j.reduce((t,n)=>(e.includes(n.slug)&&t.push(n),t),[]),[j]),C=Object(o.useCallback)(e=>{n||Object(he.b)(O,w,r,x(e),"or"===t.queryType?"in":"and")},[n,O,w,r,x,t.queryType]),P=Object(o.useMemo)(()=>O.filter(e=>{let{attribute:t}=e;return t===(null==r?void 0:r.taxonomy)}).flatMap(e=>{let{slug:t}=e;return t}),[O,null==r?void 0:r.taxonomy]),R=Object(a.a)(P),T=Object(s.a)(R);Object(o.useEffect)(()=>{fe()(T,R)||fe()(f,R)||(m(R),t.showFilterButton||C(R))},[f,R,T,C,t.showFilterButton]);const M="dropdown"!==t.displayStyle||"or"===t.queryType,A=Object(o.useCallback)(e=>{const n=e=>{const{name:t}=g.find(t=>t.value===e);return t},r=e=>{let{filterAdded:t,filterRemoved:r}=e;const o=t?n(t):null,a=r?n(r):null;o&&a?Object(c.speak)(Object(i.sprintf)(
+/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */
+Object(i.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,a)):o?Object(c.speak)(Object(i.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(i.__)("%s filter added.","woo-gutenberg-products-block"),o)):a&&Object(c.speak)(Object(i.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(i.__)("%s filter removed.","woo-gutenberg-products-block"),a))},o=f.includes(e);let a;M?(a=f.filter(t=>t!==e),o?r({filterRemoved:e}):(a.push(e),a.sort(),r({filterAdded:e}))):(a=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===f.length?f[0]:null})),m(a),t.showFilterButton||C(a)},[f,g,M,C,t.showFilterButton]);if(!r)return n?Object(o.createElement)(me.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(i.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===g.length&&!E)return n?Object(o.createElement)(me.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(i.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;const D="h"+t.headingLevel,N=!t.isPreview&&E,H=!t.isPreview&&S;return Object(o.createElement)(o.Fragment,null,!n&&t.heading&&g.length>0&&Object(o.createElement)(D,{className:"wc-block-attribute-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter style-"+t.displayStyle},"dropdown"===t.displayStyle?Object(o.createElement)(ue,{attributeLabel:r.label,checked:f,className:b()("wc-block-attribute-filter-dropdown",v.className),style:{...v.style,borderStyle:"none"},inputLabel:t.heading,isLoading:N,multiple:M,onChange:A,options:g}):Object(o.createElement)(p.a,{className:"wc-block-attribute-filter-list",options:g,checked:f,onChange:A,isLoading:N,isDisabled:H}),t.showFilterButton&&Object(o.createElement)(de.a,{className:"wc-block-attribute-filter__button",disabled:N||H,onClick:()=>C(f)})))},getProps:e=>({isEditor:!1,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}})})}]);
\ No newline at end of file
diff --git a/build/attribute-filter.asset.php b/build/attribute-filter.asset.php
new file mode 100644
index 00000000000..76f3e04ecbc
--- /dev/null
+++ b/build/attribute-filter.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '5c16634951858eff8156cd6d8f7c57f5');
\ No newline at end of file
diff --git a/build/attribute-filter.js b/build/attribute-filter.js
new file mode 100644
index 00000000000..1bc8f061d88
--- /dev/null
+++ b/build/attribute-filter.js
@@ -0,0 +1,40 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var n,l,a=t[0],s=t[1],i=t[2],b=0,d=[];b{let{name:t,count:c}=e;return Object(n.createElement)(n.Fragment,null,t,Number.isFinite(c)&&Object(n.createElement)(r.a,{label:c.toString(),screenReaderLabel:Object(o.sprintf)(
+/* translators: %s number of products. */
+Object(o._n)("%s product","%s products",c,"woo-gutenberg-products-block"),c),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},105:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(8);function o(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},11:function(e,t){e.exports=window.wp.primitives},117:function(e,t,c){"use strict";var n=c(0),o=c(5),r=c(10),l=c(1);c(152),t.a=Object(r.withInstanceId)(e=>{let{className:t,headingLevel:c,onChange:r,heading:a,instanceId:s}=e;const i="h"+c;return Object(n.createElement)(i,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(l.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(o.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:r}))})},120:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},121:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(17),o=c(9),r=c(0),l=c(48),a=c(120);const s=e=>{const{namespace:t,resourceName:c,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(r.useRef)({results:[],isLoading:!0}),d=Object(l.a)(i),m=Object(l.a)(s),p=Object(a.a)(),g=Object(o.useSelect)(e=>{if(!u)return null;const o=e(n.COLLECTIONS_STORE_KEY),r=[t,c,d,m],l=o.getCollectionError(...r);if(l){if(!(l instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");p(l)}return{results:o.getCollection(...r),isLoading:!o.hasFinishedResolution("getCollection",r)}},[t,c,m,d,u]);return null!==g&&(b.current=g),b.current}},124:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},13:function(e,t){e.exports=window.wp.blocks},14:function(e,t){e.exports=window.wp.htmlEntities},140:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(4),l=c.n(r),a=c(30);c(179),t.a=e=>{let{className:t,disabled:c,label:
+/* translators: Submit button text for filters. */
+r=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:i=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:l()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:c,onClick:s},Object(n.createElement)(a.a,{label:r,screenReaderLabel:i}))}},152:function(e,t){},153:function(e,t){},17:function(e,t){e.exports=window.wc.wcBlocksData},179:function(e,t){},188:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return l}));var n=c(2);const o=Object(n.getSetting)("attributes",[]).reduce((e,t)=>{const c=(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;var n;return c.id&&e.push(c),e},[]),r=e=>{if(e)return o.find(t=>t.id===e)},l=e=>{if(e)return o.find(t=>t.taxonomy===e)}},189:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return r}));var n=c(7);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const r=e.filter(e=>e.attribute===c.taxonomy),l=r.length?r[0]:null;if(!(l&&l.slug&&Array.isArray(l.slug)&&l.slug.includes(o)))return;const a=l.slug.filter(e=>e!==o),s=e.filter(e=>e.attribute!==c.taxonomy);a.length>0&&(l.slug=a.sort(),s.push(l)),t(Object(n.sortBy)(s,"attribute"))},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const l=e.filter(e=>e.attribute!==c.taxonomy);0===o.length?t(l):(l.push({attribute:c.taxonomy,operator:r,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(n.sortBy)(l,"attribute")))}},190:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(4),l=c.n(r);c(229),t.a=e=>{let{className:t,onChange:c=(()=>{}),options:r=[],checked:a=[],isLoading:s=!1,isDisabled:i=!1,limit:u=10}=e;const[b,d]=Object(n.useState)(!1),m=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),p=Object(n.useMemo)(()=>{const e=r.length-u;return!b&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{d(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)(
+/* translators: %s is referring the remaining count of options */
+Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)(
+/* translators: %s number of options to reveal. */
+Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[r,u,b]),g=Object(n.useMemo)(()=>b&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{d(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[b]),O=Object(n.useMemo)(()=>{const e=r.length>u+5;return Object(n.createElement)(n.Fragment,null,r.map((t,o)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!b&&o>=u&&{hidden:!0},Object(n.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{c(e.target.value)},checked:a.includes(t.value),disabled:i}),Object(n.createElement)("label",{htmlFor:t.value},t.label)),e&&o===u-1&&p)),e&&g)},[r,c,a,b,u,g,p,i]),j=l()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":s},t);return Object(n.createElement)("ul",{className:j},s?m:O)}},198:function(e,t,c){"use strict";var n=c(6),o=c.n(n),r=c(0),l=c(4),a=c.n(l),s=c(1),i=c(109),u=c(531);c(153);var b=e=>{let{text:t,screenReaderText:c="",element:n="li",className:l="",radius:s="small",children:i=null,...u}=e;const b=n,d=a()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+s),m=Boolean(c&&c!==t);return Object(r.createElement)(b,o()({className:d},u),Object(r.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(r.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:n=!1,onRemove:l=(()=>{}),removeOnAnyClick:d=!1,text:m,screenReaderText:p="",...g}=e;const O=d?"span":"button";if(!t){const e=p&&"string"==typeof p?p:m;t="string"!=typeof e?
+/* translators: Remove chip. */
+Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(
+/* translators: %s text of the chip to remove. */
+Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:n,onClick:l,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||l()}},h=d?j:{},f=d?{"aria-hidden":!0}:j;return Object(r.createElement)(b,o()({},g,h,{className:a()(c,"is-removable"),element:d?"button":g.element,screenReaderText:p,text:m}),Object(r.createElement)(O,o()({className:"wc-block-components-chip__remove"},f),Object(r.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},2:function(e,t){e.exports=window.wc.wcSettings},21:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"c",(function(){return s})),c.d(t,"d",(function(){return i})),c.d(t,"b",(function(){return u}));var n=c(0),o=c(7),r=c(1);const l={clear:Object(r.__)("Clear all selected items","woo-gutenberg-products-block"),noItems:Object(r.__)("No items found.","woo-gutenberg-products-block"),
+/* Translators: %s search term */
+noResults:Object(r.__)("No results for %s","woo-gutenberg-products-block"),search:Object(r.__)("Search for items","woo-gutenberg-products-block"),selected:e=>Object(r.sprintf)(
+/* translators: Number of items selected from list. */
+Object(r._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(r.__)("Search results updated.","woo-gutenberg-products-block")},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(o.groupBy)(e,"parent"),n=Object(o.keyBy)(t,"id"),r=["0"],l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=l(n[e.parent]);return[...t,e.name]},a=e=>e.map(e=>{const t=c[e.id];return r.push(""+e.id),{...e,breadcrumbs:l(n[e.parent]),children:t&&t.length?a(t):[]}}),s=a(c[0]||[]);return Object.entries(c).forEach(e=>{let[t,c]=e;r.includes(t)||s.push(...a(c||[]))}),s},s=(e,t,c)=>{if(!t)return c?a(e):e;const n=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map(e=>!!n.test(e.name)&&e).filter(Boolean);return c?a(o,e):o},i=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(n.createElement)(n.Fragment,{key:c},Object(n.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},228:function(e,t){},229:function(e,t){},23:function(e,t,c){"use strict";c.d(t,"o",(function(){return r})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return a})),c.d(t,"n",(function(){return s})),c.d(t,"j",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return b})),c.d(t,"g",(function(){return d})),c.d(t,"k",(function(){return m})),c.d(t,"c",(function(){return p})),c.d(t,"d",(function(){return g})),c.d(t,"h",(function(){return O})),c.d(t,"a",(function(){return j})),c.d(t,"i",(function(){return h})),c.d(t,"b",(function(){return f}));var n,o=c(2);const r=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=r.pluginUrl+"images/",a=r.pluginUrl+"build/",s=r.buildPhase,i=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=o.STORE_PAGES.checkout.id,b=o.STORE_PAGES.checkout.permalink,d=o.STORE_PAGES.privacy.permalink,m=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),p=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),g=o.STORE_PAGES.cart.permalink,O=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),j=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),f=Object(o.getSetting)("allowedStates",{})},25:function(e,t){e.exports=window.wp.isShallowEqual},278:function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var n=c(0),o=c(257),r=c(7),l=c(48),a=c(76),s=c(121),i=c(49);const u=e=>{let{queryAttribute:t,queryPrices:c,queryStock:u,queryState:b}=e,d=Object(i.a)();d+="-collection-data";const[m]=Object(a.a)(d),[p,g]=Object(a.b)("calculate_attribute_counts",[],d),[O,j]=Object(a.b)("calculate_price_range",null,d),[h,f]=Object(a.b)("calculate_stock_status_counts",null,d),w=Object(l.a)(t||{}),_=Object(l.a)(c),v=Object(l.a)(u);Object(n.useEffect)(()=>{"object"==typeof w&&Object.keys(w).length&&(p.find(e=>e.taxonomy===w.taxonomy)||g([...p,w]))},[w,p,g]),Object(n.useEffect)(()=>{O!==_&&void 0!==_&&j(_)},[_,j,O]),Object(n.useEffect)(()=>{h!==v&&void 0!==v&&f(v)},[v,f,h]);const[k,y]=Object(n.useState)(!1),[E]=Object(o.a)(k,200);k||y(!0);const S=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(r.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:c}=e;return{taxonomy:t,query_type:c}}),["taxonomy","query_type"])),t})(m),[m]);return Object(s.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:E})}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,c){"use strict";var n=c(0),o=c(4),r=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:l,wrapperProps:a={}}=e;const s=null!=c,i=null!=o;return!s&&i?(t=l||"span",a={...a,className:r()(a.className,"screen-reader-text")},Object(n.createElement)(t,a,o)):(t=l||n.Fragment,s&&i&&c!==o?Object(n.createElement)(t,a,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,a,c))}},35:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(6),o=c.n(n),r=c(0),l=c(21);const a=e=>{let{countLabel:t,className:c,depth:n=0,controlId:a="",item:s,isSelected:i,isSingle:u,onSelect:b,search:d="",...m}=e;const p=null!=t&&void 0!==s.count&&null!==s.count,g=[c,"woocommerce-search-list__item"];g.push("depth-"+n),u&&g.push("is-radio-button"),p&&g.push("has-count");const O=s.breadcrumbs&&s.breadcrumbs.length,j=m.name||"search-list-item-"+a,h=`${j}-${s.id}`;return Object(r.createElement)("label",{htmlFor:h,className:g.join(" ")},u?Object(r.createElement)("input",o()({type:"radio",id:h,name:j,value:s.value,onChange:b(s),checked:i,className:"woocommerce-search-list__item-input"},m)):Object(r.createElement)("input",o()({type:"checkbox",id:h,name:j,value:s.value,onChange:b(s),checked:i,className:"woocommerce-search-list__item-input"},m)),Object(r.createElement)("span",{className:"woocommerce-search-list__item-label"},O?Object(r.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(s.breadcrumbs)):null,Object(r.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(s.name,d))),!!p&&Object(r.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=a},398:function(e,t,c){e.exports=c(469)},399:function(e,t){},400:function(e,t){},401:function(e,t){},42:function(e,t,c){"use strict";c.d(t,"c",(function(){return i})),c.d(t,"d",(function(){return u})),c.d(t,"b",(function(){return b})),c.d(t,"a",(function(){return d}));var n=c(5),o=c(68),r=c(124),l=c(57),a=c(90);const s=e=>Object(r.a)(e)?JSON.parse(e)||{}:Object(l.a)(e)?e:{},i=e=>{if(!Object(o.b)()||!Object(a.a)())return{style:{}};const t=Object(l.a)(e)?e:{},c=s(t.style);return Object(n.__experimentalGetSpacingClassesAndStyles)({...t,style:c})},u=e=>{const t=Object(l.a)(e)?e:{},c=s(t.style),n=Object(l.a)(c.typography)?c.typography:{};return{style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:n.fontSize,lineHeight:n.lineHeight,fontWeight:n.fontWeight,textTransform:n.textTransform,fontFamily:t.fontFamily}}},b=e=>{if(!Object(o.b)())return{className:"",style:{}};const t=Object(l.a)(e)?e:{},c=s(t.style);return Object(n.__experimentalUseColorProps)({...t,style:c})},d=e=>{if(!Object(o.b)())return{className:"",style:{}};const t=Object(l.a)(e)?e:{},c=s(t.style);return Object(n.__experimentalUseBorderProps)({...t,style:c})}},44:function(e,t){e.exports=window.wp.a11y},469:function(e,t,c){"use strict";c.r(t);var n=c(6),o=c.n(n),r=c(0),l=c(1),a=c(13),s=c(5),i=c(68),u=c(109),b=c(515),d=c(4),m=c.n(d),p=c(217),g=c(94),O=c(7),j=c(2),h=c(98),f=c(117),w=c(3),_=c(44),v=c(48),k=c(105),y=c(76),E=c(121),S=c(278),C=c(190),x=c(167),N=e=>{let{checked:t,getInputProps:c,inputRef:n,isDisabled:o,onFocus:l,onRemoveItem:a,placeholder:s,tabIndex:i,value:u}=e;return Object(r.createElement)("input",c({ref:n,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:l,onKeyDown(e){"Backspace"===e.key&&!u&&t.length>0&&a(t[t.length-1])},placeholder:s,tabIndex:i}))},P=e=>{let{children:t,onClick:c}=e;return Object(r.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:c},t)},T=e=>{let{checked:t,getItemProps:c,getMenuProps:n,highlightedIndex:o,options:a}=e;return Object(r.createElement)("ul",n({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),a.map((e,n)=>{const a=t.includes(e.value);return Object(r.createElement)("li",c({key:e.value,className:m()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":a,"is-highlighted":o===n}),index:n,item:e.value,"aria-label":a?Object(l.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)}))},R=c(198),I=e=>{let{onRemoveItem:t,option:c}=e;return Object(r.createElement)(R.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:()=>{t(c.value)},ariaLabel:Object(l.sprintf)(
+/* translators: %s is referring to the filter option being removed. */
+Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),c.name),text:c.label,radius:"large"})},L=c(531),A=e=>{let{onClick:t,onRemoveItem:c,option:n}=e;const o=Object(r.useRef)(null);return Object(r.useEffect)(()=>{o.current.focus()},[o]),Object(r.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(r.createElement)("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:e=>{e.stopPropagation(),t(n.value)},"aria-label":Object(l.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(l.__)("Replace current %s filter","woo-gutenberg-products-block"),n.name)},n.label),Object(r.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:()=>{c(n.value)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||c(n.value)},"aria-label":Object(l.sprintf)(
+/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
+Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),n.name)},Object(r.createElement)(u.a,{icon:L.a,size:16})))};c(401);var B=e=>{let{attributeLabel:t="",className:c,style:n={},checked:o=[],inputLabel:a="",isDisabled:s=!1,isLoading:i=!1,multiple:u=!1,onChange:b=(()=>{}),options:d=[],isCaseSensitive:p=!1}=e;const g=Object(r.useRef)(null),O=m()(c,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":s,"is-loading":i}),j=Object(r.useCallback)((e,t)=>{switch(t.type){case x.a.stateChangeTypes.keyDownEnter:case x.a.stateChangeTypes.clickItem:return{...t,highlightedIndex:e.highlightedIndex,isOpen:u,inputValue:""};case x.a.stateChangeTypes.blurInput:case x.a.stateChangeTypes.mouseUp:return{...t,inputValue:e.inputValue};default:return t}},[u]);return Object(r.createElement)(x.a,{onChange:b,selectedItem:null,stateReducer:j},e=>{let{getInputProps:c,getItemProps:i,getLabelProps:j,getMenuProps:h,highlightedIndex:f,inputValue:w,isOpen:_,openMenu:v}=e;return Object(r.createElement)("div",{className:m()(O,{"is-multiple":u,"is-single":!u,"has-checked":o.length>0,"is-open":_}),style:n},Object(r.createElement)("label",j({className:"screen-reader-text"}),a),Object(r.createElement)(P,{isOpen:_,onClick:()=>g.current.focus()},o.map(e=>{const t=d.find(t=>t.value===e),c=e=>{b(e),g.current.focus()};return u?Object(r.createElement)(I,{key:e,onRemoveItem:c,option:t}):Object(r.createElement)(A,{key:e,onClick:()=>g.current.focus(),onRemoveItem:c,option:t})}),Object(r.createElement)(N,{checked:o,getInputProps:c,inputRef:g,isDisabled:s,onFocus:v,onRemoveItem:e=>{b(e),g.current.focus()},placeholder:o.length>0&&u?null:Object(l.sprintf)(
+/* translators: %s attribute name. */
+Object(l.__)("Any %s","woo-gutenberg-products-block"),t),tabIndex:!u&&o.length>0?"-1":"0",value:w})),_&&!s&&Object(r.createElement)(T,{checked:o,getItemProps:i,getMenuProps:h,highlightedIndex:f,options:d.filter(e=>{let t=e.name,c=null==w?void 0:w.trim();var n;return p||(t=t.toLowerCase(),c=null===(n=c)||void 0===n?void 0:n.toLowerCase()),!c||t.includes(c)})}))})},F=c(103),M=c(140),V=c(25),H=c.n(V),G=c(14),q=c(188),D=c(189);const z=[{value:"preview-1",name:"Blue",label:Object(r.createElement)(F.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(r.createElement)(F.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(r.createElement)(F.a,{name:"Red",count:2})}],U={id:0,name:"preview",taxonomy:"preview",label:"Preview"};var Y=c(42);c(400);var K=e=>{let{attributes:t,isEditor:c=!1}=e;const n=t.isPreview&&!t.attributeId?U:Object(q.a)(t.attributeId),[o,a]=Object(r.useState)([]),[s,i]=Object(r.useState)(t.isPreview&&!t.attributeId?z:[]),u=Object(Y.a)(t),[b]=Object(y.a)(),[d,p]=Object(y.b)("attributes",[]),{results:g,isLoading:O}=Object(E.a)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[(null==n?void 0:n.id)||0],shouldSelect:t.attributeId>0}),j="dropdown"!==t.displayStyle&&"and"===t.queryType,{results:h,isLoading:f}=Object(S.a)({queryAttribute:{taxonomy:null==n?void 0:n.taxonomy,queryType:t.queryType},queryState:{...b,attributes:j?b.attributes:null}}),x=Object(r.useCallback)(e=>h.attribute_counts?h.attribute_counts.find(t=>{let{term:c}=t;return c===e}):null,[h]);Object(r.useEffect)(()=>{if(O||f)return;const e=g.map(e=>{const c=x(e.id);if(!(c||o.includes(e.slug)||(l=e.slug,null!=b&&b.attributes&&b.attributes.some(e=>{let{attribute:t,slug:c=[]}=e;return t===n.taxonomy&&c.includes(l)}))))return null;var l;const a=c?c.count:0;return{value:e.slug,name:Object(G.decodeEntities)(e.name),label:Object(r.createElement)(F.a,{name:Object(G.decodeEntities)(e.name),count:t.showCounts?a:null})}}).filter(Boolean);i(e)},[null==n?void 0:n.taxonomy,g,O,t.showCounts,f,x,o,b.attributes]);const N=Object(r.useCallback)(e=>g.reduce((t,c)=>(e.includes(c.slug)&&t.push(c),t),[]),[g]),P=Object(r.useCallback)(e=>{c||Object(D.b)(d,p,n,N(e),"or"===t.queryType?"in":"and")},[c,d,p,n,N,t.queryType]),T=Object(r.useMemo)(()=>d.filter(e=>{let{attribute:t}=e;return t===(null==n?void 0:n.taxonomy)}).flatMap(e=>{let{slug:t}=e;return t}),[d,null==n?void 0:n.taxonomy]),R=Object(v.a)(T),I=Object(k.a)(R);Object(r.useEffect)(()=>{H()(I,R)||H()(o,R)||(a(R),t.showFilterButton||P(R))},[o,R,I,P,t.showFilterButton]);const L="dropdown"!==t.displayStyle||"or"===t.queryType,A=Object(r.useCallback)(e=>{const c=e=>{const{name:t}=s.find(t=>t.value===e);return t},n=e=>{let{filterAdded:t,filterRemoved:n}=e;const o=t?c(t):null,r=n?c(n):null;o&&r?Object(_.speak)(Object(l.sprintf)(
+/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */
+Object(l.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,r)):o?Object(_.speak)(Object(l.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(l.__)("%s filter added.","woo-gutenberg-products-block"),o)):r&&Object(_.speak)(Object(l.sprintf)(
+/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */
+Object(l.__)("%s filter removed.","woo-gutenberg-products-block"),r))},r=o.includes(e);let i;L?(i=o.filter(t=>t!==e),r?n({filterRemoved:e}):(i.push(e),i.sort(),n({filterAdded:e}))):(i=r?[]:[e],n({filterAdded:r?null:e,filterRemoved:1===o.length?o[0]:null})),a(i),t.showFilterButton||P(i)},[o,s,L,P,t.showFilterButton]);if(!n)return c?Object(r.createElement)(w.Notice,{status:"warning",isDismissible:!1},Object(r.createElement)("p",null,Object(l.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===s.length&&!O)return c?Object(r.createElement)(w.Notice,{status:"warning",isDismissible:!1},Object(r.createElement)("p",null,Object(l.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;const V="h"+t.headingLevel,K=!t.isPreview&&O,Q=!t.isPreview&&f;return Object(r.createElement)(r.Fragment,null,!c&&t.heading&&s.length>0&&Object(r.createElement)(V,{className:"wc-block-attribute-filter__title"},t.heading),Object(r.createElement)("div",{className:"wc-block-attribute-filter style-"+t.displayStyle},"dropdown"===t.displayStyle?Object(r.createElement)(B,{attributeLabel:n.label,checked:o,className:m()("wc-block-attribute-filter-dropdown",u.className),style:{...u.style,borderStyle:"none"},inputLabel:t.heading,isLoading:K,multiple:L,onChange:A,options:s}):Object(r.createElement)(C.a,{className:"wc-block-attribute-filter-list",options:s,checked:o,onChange:A,isLoading:K,isDisabled:Q}),t.showFilterButton&&Object(r.createElement)(M.a,{className:"wc-block-attribute-filter__button",disabled:K||Q,onClick:()=>P(o)})))};c(399);const Q=Object(j.getSetting)("attributes",[]);var $=Object(w.withSpokenMessages)(e=>{let{attributes:t,setAttributes:c,debouncedSpeak:n}=e;const{attributeId:o,className:a,displayStyle:i,heading:d,headingLevel:_,isPreview:v,queryType:k,showCounts:y,showFilterButton:E}=t,[S,C]=Object(r.useState)(!o&&!v),x=Object(s.useBlockProps)(),N=e=>{if(!e||!e.length)return;const t=e[0].id,n=Q.find(e=>e.attribute_id===t.toString());if(!n||o===t)return;const r=n.attribute_label;c({attributeId:t,heading:Object(l.sprintf)(
+/* translators: %s attribute name. */
+Object(l.__)("Filter by %s","woo-gutenberg-products-block"),r)})},P=e=>{let{isCompact:t}=e;const c={clear:Object(l.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(l.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(l.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)(
+/* translators: %d is the number of attributes selected. */
+Object(l._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Product attribute search results updated.","woo-gutenberg-products-block")},n=Object(O.sortBy)(Object(O.toArray)(Object(O.mapValues)(Q,e=>({id:parseInt(e.attribute_id,10),name:e.attribute_label}))),"name");return Object(r.createElement)(g.a,{className:"woocommerce-product-attributes",list:n,selected:n.filter(e=>{let{id:t}=e;return t===o}),onChange:N,messages:c,isSingle:!0,isCompact:t})};return 0===Object.keys(Q).length?Object(r.createElement)(w.Placeholder,{className:"wc-block-attribute-filter",icon:Object(r.createElement)(u.a,{icon:b.a}),label:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(l.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(r.createElement)("p",null,Object(l.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(r.createElement)(w.Button,{className:"wc-block-attribute-filter__add-attribute-button",isSecondary:!0,href:Object(j.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(l.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(r.createElement)(u.a,{icon:p.a})),Object(r.createElement)(w.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(l.__)("Learn more","woo-gutenberg-products-block"))):Object(r.createElement)("div",x,Object(r.createElement)(s.BlockControls,null,Object(r.createElement)(w.ToolbarGroup,{controls:[{icon:"edit",title:Object(l.__)("Edit","woo-gutenberg-products-block"),onClick:()=>C(!S),isActive:S}]})),Object(r.createElement)(s.InspectorControls,{key:"inspector"},Object(r.createElement)(w.PanelBody,{title:Object(l.__)("Content","woo-gutenberg-products-block")},Object(r.createElement)(w.ToggleControl,{label:Object(l.__)("Product count","woo-gutenberg-products-block"),help:y?Object(l.__)("Product count is visible.","woo-gutenberg-products-block"):Object(l.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:y,onChange:()=>c({showCounts:!y})}),Object(r.createElement)("p",null,Object(l.__)("Heading Level","woo-gutenberg-products-block")),Object(r.createElement)(h.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:_,onChange:e=>c({headingLevel:e})})),Object(r.createElement)(w.PanelBody,{title:Object(l.__)("Block Settings","woo-gutenberg-products-block")},Object(r.createElement)(w.__experimentalToggleGroupControl,{label:Object(l.__)("Query Type","woo-gutenberg-products-block"),help:"and"===k?Object(l.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(l.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:k,onChange:e=>c({queryType:e})},Object(r.createElement)(w.__experimentalToggleGroupControlOption,{value:"and",label:Object(l.__)("And","woo-gutenberg-products-block")}),Object(r.createElement)(w.__experimentalToggleGroupControlOption,{value:"or",label:Object(l.__)("Or","woo-gutenberg-products-block")})),Object(r.createElement)(w.__experimentalToggleGroupControl,{label:Object(l.__)("Display Style","woo-gutenberg-products-block"),value:i,onChange:e=>c({displayStyle:e})},Object(r.createElement)(w.__experimentalToggleGroupControlOption,{value:"list",label:Object(l.__)("List","woo-gutenberg-products-block")}),Object(r.createElement)(w.__experimentalToggleGroupControlOption,{value:"dropdown",label:Object(l.__)("Dropdown","woo-gutenberg-products-block")})),Object(r.createElement)(w.ToggleControl,{label:Object(l.__)("Filter button","woo-gutenberg-products-block"),help:E?Object(l.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(l.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:E,onChange:e=>c({showFilterButton:e})})),Object(r.createElement)(w.PanelBody,{title:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},P({isCompact:!0}))),S?Object(r.createElement)(w.Placeholder,{className:"wc-block-attribute-filter",icon:Object(r.createElement)(u.a,{icon:b.a}),label:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(l.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(r.createElement)("div",{className:"wc-block-attribute-filter__selection"},P({isCompact:!1}),Object(r.createElement)(w.Button,{isPrimary:!0,onClick:()=>{C(!1),n(Object(l.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(l.__)("Done","woo-gutenberg-products-block")))):Object(r.createElement)("div",{className:m()(a,"wc-block-attribute-filter")},Object(r.createElement)(f.a,{className:"wc-block-attribute-filter__title",headingLevel:_,heading:d,onChange:e=>c({heading:e})}),Object(r.createElement)(w.Disabled,null,Object(r.createElement)(K,{attributes:t,isEditor:!0}))))});Object(a.registerBlockType)("woocommerce/attribute-filter",{apiVersion:2,title:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(u.a,{icon:b.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(l.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(l.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1,color:{text:!0,background:!1},...Object(i.b)()&&{__experimentalBorder:{radius:!0,color:!0,width:!1}}},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(l.__)("Filter by attribute","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:$,save(e){let{attributes:t}=e;const{className:c,showCounts:n,queryType:l,attributeId:a,heading:i,headingLevel:u,displayStyle:b,showFilterButton:d}=t,p={"data-attribute-id":a,"data-show-counts":n,"data-query-type":l,"data-heading":i,"data-heading-level":u};return"list"!==b&&(p["data-display-style"]=b),d&&(p["data-show-filter-button"]=d),Object(r.createElement)("div",o()({},s.useBlockProps.save({className:m()("is-loading",c)}),p),Object(r.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},48:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0),o=c(25),r=c.n(o);function l(e){const t=Object(n.useRef)(e);return r()(e,t.current)||(t.current=e),t.current}},49:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const o=Object(n.createContext)("page"),r=()=>Object(n.useContext)(o);o.Provider},5:function(e,t){e.exports=window.wp.blockEditor},57:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},68:function(e,t,c){"use strict";c.d(t,"c",(function(){return r})),c.d(t,"d",(function(){return l})),c.d(t,"a",(function(){return a})),c.d(t,"b",(function(){return s}));var n=c(13),o=c(23);const r=(e,t)=>{if(o.n>2)return Object(n.registerBlockType)(e,t)},l=(e,t)=>{if(o.n>1)return Object(n.registerBlockType)(e,t)},a=()=>o.n>2,s=()=>o.n>1},7:function(e,t){e.exports=window.lodash},76:function(e,t,c){"use strict";c.d(t,"a",(function(){return b})),c.d(t,"b",(function(){return d})),c.d(t,"c",(function(){return m}));var n=c(17),o=c(9),r=c(0),l=c(25),a=c.n(l),s=c(48),i=c(105),u=c(49);const b=e=>{const t=Object(u.a)();e=e||t;const c=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:l}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(r.useCallback)(t=>{l(e,t)},[e,l])]},d=(e,t,c)=>{const l=Object(u.a)();c=c||l;const a=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,Object(r.useCallback)(t=>{s(c,e,t)},[c,e,s])]},m=(e,t)=>{const c=Object(u.a)();t=t||c;const[n,o]=b(t),l=Object(s.a)(n),d=Object(s.a)(e),m=Object(i.a)(d),p=Object(r.useRef)(!1);return Object(r.useEffect)(()=>{a()(m,d)||(o(Object.assign({},l,d)),p.current=!0)},[l,d,m,o]),p.current?[n,o]:[e,o]}},8:function(e,t){e.exports=window.React},9:function(e,t){e.exports=window.wp.data},90:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(5);const o=()=>"function"==typeof n.__experimentalGetSpacingClassesAndStyles},94:function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var n=c(6),o=c.n(n),r=c(0),l=c(1),a=c(3),s=c(109),i=c(509),u=c(4),b=c.n(u),d=c(10),m=c(21),p=c(35),g=c(508),O=c(14);const j=e=>{let{id:t,label:c,popoverContents:n,remove:o,screenReaderLabel:i,className:u=""}=e;const[m,p]=Object(r.useState)(!1),h=Object(d.useInstanceId)(j);if(i=i||c,!c)return null;c=Object(O.decodeEntities)(c);const f=b()("woocommerce-tag",u,{"has-remove":!!o}),w="woocommerce-tag__label-"+h,_=Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},i),Object(r.createElement)("span",{"aria-hidden":"true"},c));return Object(r.createElement)("span",{className:f},n?Object(r.createElement)(a.Button,{className:"woocommerce-tag__text",id:w,onClick:()=>p(!0)},_):Object(r.createElement)("span",{className:"woocommerce-tag__text",id:w},_),n&&m&&Object(r.createElement)(a.Popover,{onClose:()=>p(!1)},n),o&&Object(r.createElement)(a.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(l.sprintf)(// Translators: %s label.
+Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":w},Object(r.createElement)(s.a,{icon:g.a,size:20,className:"clear-icon"})))};var h=j;const f=e=>Object(r.createElement)(p.b,e),w=e=>{const{list:t,selected:c,renderItem:n,depth:l=0,onSelect:a,instanceId:s,isSingle:i,search:u}=e;return t?Object(r.createElement)(r.Fragment,null,t.map(t=>{const b=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(r.createElement)(r.Fragment,{key:t.id},Object(r.createElement)("li",null,n({item:t,isSelected:b,onSelect:a,isSingle:i,search:u,depth:l,controlId:s})),Object(r.createElement)(w,o()({},e,{list:t.children,depth:l+1})))})):null},_=e=>{let{isLoading:t,isSingle:c,selected:n,messages:o,onChange:s,onRemove:i}=e;if(t||c||!n)return null;const u=n.length;return Object(r.createElement)("div",{className:"woocommerce-search-list__selected"},Object(r.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(r.createElement)("strong",null,o.selected(u)),u>0?Object(r.createElement)(a.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":o.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(r.createElement)("ul",null,n.map((e,t)=>Object(r.createElement)("li",{key:t},Object(r.createElement)(h,{label:e.name,id:e.id,remove:i})))):null)},v=e=>{let{filteredList:t,search:c,onSelect:n,instanceId:o,...a}=e;const{messages:u,renderItem:b,selected:d,isSingle:m}=a,p=b||f;return 0===t.length?Object(r.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(r.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(r.createElement)(s.a,{icon:i.a})),Object(r.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(r.createElement)("ul",{className:"woocommerce-search-list__list"},Object(r.createElement)(w,{list:t,selected:d,renderItem:p,onSelect:n,instanceId:o,isSingle:m,search:c}))},k=e=>{const{className:t="",isCompact:c,isHierarchical:n,isLoading:l,isSingle:s,list:i,messages:u=m.a,onChange:p,onSearch:g,selected:O,debouncedSpeak:j}=e,[h,f]=Object(r.useState)(""),w=Object(d.useInstanceId)(k),y=Object(r.useMemo)(()=>({...m.a,...u}),[u]),E=Object(r.useMemo)(()=>Object(m.c)(i,h,n),[i,h,n]);Object(r.useEffect)(()=>{j&&j(y.updated)},[j,y]),Object(r.useEffect)(()=>{"function"==typeof g&&g(h)},[h,g]);const S=Object(r.useCallback)(e=>()=>{s&&p([]);const t=O.findIndex(t=>{let{id:c}=t;return c===e});p([...O.slice(0,t),...O.slice(t+1)])},[s,O,p]),C=Object(r.useCallback)(e=>()=>{-1===O.findIndex(t=>{let{id:c}=t;return c===e.id})?p(s?[e]:[...O,e]):S(e.id)()},[s,S,p,O]);return Object(r.createElement)("div",{className:b()("woocommerce-search-list",t,{"is-compact":c})},Object(r.createElement)(_,o()({},e,{onRemove:S,messages:y})),Object(r.createElement)("div",{className:"woocommerce-search-list__search"},Object(r.createElement)(a.TextControl,{label:y.search,type:"search",value:h,onChange:e=>f(e)})),l?Object(r.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(r.createElement)(a.Spinner,null)):Object(r.createElement)(v,o()({},e,{search:h,filteredList:E,messages:y,onSelect:C,instanceId:w})))};Object(a.withSpokenMessages)(k)},98:function(e,t,c){"use strict";var n=c(0),o=c(7),r=c(1),l=c(3),a=c(11);function s(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(a.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(a.Path,{d:c[t]})):null}class i extends n.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(n.createElement)(s,{level:e}),title:Object(r.sprintf)(
+/* translators: %s: heading level e.g: "2", "3", "4" */
+Object(r.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:r,onChange:a}=this.props;return Object(n.createElement)(l.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(s,{level:r}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,r,a))})}}t.a=i}});
\ No newline at end of file
diff --git a/build/blocks-checkout.asset.php b/build/blocks-checkout.asset.php
new file mode 100644
index 00000000000..878c8822e7d
--- /dev/null
+++ b/build/blocks-checkout.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-warning'), 'version' => '6271720a10efed858db982752304594e');
\ No newline at end of file
diff --git a/build/blocks-checkout.js b/build/blocks-checkout.js
new file mode 100644
index 00000000000..875764b5774
--- /dev/null
+++ b/build/blocks-checkout.js
@@ -0,0 +1,5 @@
+this.wc=this.wc||{},this.wc.blocksCheckout=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}return 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=136)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;tc&&("#"!==s[u]||!p(e[u]));)u-=1;return!p(e[m])||"left"===n&&t!==c||t-u=s?r+=b("0",i-s):r=(r.substring(0,i)||"0")+"."+r.substring(i),t+r}(a),c=!0),"Infinity"===a&&c&&(a=""),c&&!n&&"number"==typeof r&&(a=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=d(e),i=o.beforeDecimal,s=o.afterDecimal,a=o.hasNagation,c=parseFloat("0."+(s||"0")),l=(s.length<=t?"0."+s:c.toFixed(t)).split(".");return(a?"-":"")+i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),l[0])+(r?".":"")+h(l[1]||"",Math.min(t,s.length),n)}(a,r,o)),c?this.formatNumString(a):this.formatInput(a))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,s=n.decimalScale,a=n.fixedDecimalScale,c=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-i.length||s&&a&&t[e]===c))},t.prototype.correctInputValue=function(e,t,n){var r=this,o=this.props,i=o.format,s=o.allowNegative,a=o.prefix,c=o.suffix,l=o.decimalScale,u=this.getSeparators(),p=u.allowedDecimalSeparators,m=u.decimalSeparator,f=this.state.numAsString||"",h=this.selectionBeforeInput,b=h.selectionStart,g=h.selectionEnd,v=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&nn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),w=v.start,O=v.end;if(!i&&w===O&&-1!==p.indexOf(n[b])){var y=0===l?"":m;return n.substr(0,b)+y+n.substr(b+1,n.length)}var j=i?0:a.length,E=t.length-(i?0:c.length);if(n.length>t.length||!n.length||w===O||0===b&&g===t.length||0===w&&O===t.length||b===j&&g===E)return n;var S=t.substr(w,O-w);if([].concat(S).find((function(e,n){return r.isCharacterAFormat(n+w,t)}))){var x=t.substr(w),k={},N=[];[].concat(x).forEach((function(e,n){r.isCharacterAFormat(n+w,t)?k[n]=e:n>S.length-1&&N.push(e)})),Object.keys(k).forEach((function(e){N.length>e?N.splice(e,0,k[e]):N.push(k[e])})),n=t.substr(0,w)+N.join("")}if(!i){var _=this.removeFormatting(n),F=d(_,s),C=F.beforeDecimal,T=F.afterDecimal,P=F.addNegation,R=ew;)v--;v=this.correctCaretPosition(s,v,"left")}}else for(;!h.test(s[v])&&vO)&&(e.preventDefault(),this.setPatchedCaretPosition(n,v,s)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,v,s),f(e)}else f(e)},t.prototype.onMouseUp=function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),n===r){var i=this.correctCaretPosition(o,n);i!==n&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value;void 0===i&&(i="");var s=t.correctCaretPosition(i,r);s===r||0===r&&o===i.length||t.setPatchedCaretPosition(n,s,i),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,n=e.displayType,r=e.customInput,o=e.renderText,i=e.getInputRef,s=e.format,a=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),c=this.state,u=c.value,p=c.mounted&&function(e){return e||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(s)?"numeric":void 0,m=Object.assign({inputMode:p},a,{type:t,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===n)return o?o(u,a)||null:l.a.createElement("span",Object.assign({},a,{ref:i}),u);if(r){var f=r;return l.a.createElement(f,Object.assign({},m,{ref:i}))}return l.a.createElement("input",Object.assign({},m,{ref:i}))},t}(l.a.Component);y.defaultProps=O;var j=y;n(130);const E=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});var S=e=>{let{className:t,value:n,currency:o,onValueChange:s,displayType:c="text",...l}=e;const u="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(u))return null;const p=u/10**o.minorUnit;if(!Number.isFinite(p))return null;const m=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f={...l,...E(o),value:void 0,currency:void 0,onValueChange:void 0},d=s?e=>{const t=+e.value*10**o.minorUnit;s(t)}:()=>{};return Object(r.createElement)(j,a()({className:m,displayType:c},f,{value:p,onValueChange:d}))};n(129);const x=e=>{let{value:t,currency:n}=e;return Object(r.isValidElement)(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},t):Number.isFinite(t)?Object(r.createElement)(S,{className:"wc-block-components-totals-item__value",currency:n||{},value:t}):null};var k=e=>{let{className:t,currency:n,label:o,value:s,description:a}=e;return Object(r.createElement)("div",{className:i()("wc-block-components-totals-item",t)},Object(r.createElement)("span",{className:"wc-block-components-totals-item__label"},o),Object(r.createElement)(x,{value:s,currency:n}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},a))},N=n(1),_=n(5),F=e=>{let{currency:t,values:n,className:o}=e;const{total_items:i,total_items_tax:s}=n,a=parseInt(i,10),c=parseInt(s,10);return Object(r.createElement)(k,{className:o,currency:t,label:Object(N.__)("Subtotal","woo-gutenberg-products-block"),value:Object(_.getSetting)("displayCartPricesIncludingTax",!1)?a+c:a})},C=e=>{let{currency:t,values:n,className:o,showRateAfterTaxName:s}=e;const{total_tax:a,tax_lines:c}=n;if(!Object(_.getSetting)("taxesEnabled",!0)&&parseInt(a,10)<=0)return null;const l=Object(_.getSetting)("displayItemizedTaxes",!1),u=l&&c.length>0?Object(r.createElement)(r.Fragment,null,c.map((e,n)=>{let{name:a,rate:c,price:l}=e;const u=`${a}${s?" "+c:""}`;return Object(r.createElement)(k,{key:"tax-line-"+n,className:i()("wc-block-components-totals-taxes",o),currency:t,label:u,value:parseInt(l,10)})})," "):null;return l?u:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(k,{className:i()("wc-block-components-totals-taxes",o),currency:t,label:Object(N.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(a,10),description:null}))},T=e=>{let{currency:t,cartFees:n,className:o}=e;return Object(r.createElement)(r.Fragment,null,n.map((e,n)=>{let{id:s,name:a,totals:c}=e;const l=parseInt(c.total,10);if(!l)return null;const u=parseInt(c.total_tax,10);return Object(r.createElement)(k,{key:s||`${n}-${a}`,className:i()("wc-block-components-totals-fees",o),currency:t,label:a||Object(N.__)("Fee","woo-gutenberg-products-block"),value:Object(_.getSetting)("displayCartPricesIncludingTax",!1)?l+u:l})}))};n(131);var P=e=>{let{children:t,slotWrapper:n=!1,className:o}=e;return c.Children.count(t)?Object(r.createElement)("div",{className:i()(o,"wc-block-components-totals-wrapper",{"slot-wrapper":n})},t):null},R=n(7),M=n.n(R),A=n(6),D=n(19);function I(e){const t=Object(r.useContext)(D.a),n=t.slots[e]||{},o=t.fills[e],i=Object(r.useMemo)(()=>o||[],[o]);return{...n,updateSlot:Object(r.useCallback)(n=>{t.updateSlot(e,n)},[e,t.updateSlot]),unregisterSlot:Object(r.useCallback)(n=>{t.unregisterSlot(e,n)},[e,t.unregisterSlot]),fills:i,registerFill:Object(r.useCallback)(n=>{t.registerFill(e,n)},[e,t.registerFill]),unregisterFill:Object(r.useCallback)(n=>{t.unregisterFill(e,n)},[e,t.unregisterFill])}}var L=n(8),V=n(4),B=Object(r.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function U({name:e,children:t,registerFill:n,unregisterFill:o}){const i=(e=>{const{getSlot:t,subscribe:n}=Object(r.useContext)(B),[o,i]=Object(r.useState)(t(e));return Object(r.useEffect)(()=>(i(t(e)),n(()=>{i(t(e))})),[e]),o})(e),s=Object(r.useRef)({name:e,children:t});return Object(r.useLayoutEffect)(()=>(n(e,s.current),()=>o(e,s.current)),[]),Object(r.useLayoutEffect)(()=>{s.current.children=t,i&&i.forceUpdate()},[t]),Object(r.useLayoutEffect)(()=>{e!==s.current.name&&(o(s.current.name,s.current),s.current.name=e,n(e,s.current))},[e]),i&&i.node?(Object(V.isFunction)(t)&&(t=t(i.props.fillProps)),Object(r.createPortal)(t,i.node)):null}var W=e=>Object(r.createElement)(B.Consumer,null,({registerFill:t,unregisterFill:n})=>Object(r.createElement)(U,Object(L.a)({},e,{registerFill:t,unregisterFill:n})));class H extends r.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:o}=this.props,i=Object(V.map)(o(t,this),e=>{const t=Object(V.isFunction)(e.children)?e.children(n):e.children;return r.Children.map(t,(e,t)=>{if(!e||Object(V.isString)(e))return e;const n=e.key||t;return Object(r.cloneElement)(e,{key:n})})}).filter(Object(V.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(V.isFunction)(e)?e(i):i)}}var z=e=>Object(r.createElement)(B.Consumer,null,({registerSlot:t,unregisterSlot:n,getFills:o})=>Object(r.createElement)(H,Object(L.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:o})));function $(){const[,e]=Object(r.useState)({}),t=Object(r.useRef)(!0);return Object(r.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function K({name:e,children:t}){const n=I(e),o=Object(r.useRef)({rerender:$()});return Object(r.useEffect)(()=>(n.registerFill(o),()=>{n.unregisterFill(o)}),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),Object(r.createPortal)(t,n.ref.current)):null}var G=n(12),q=Object(r.forwardRef)((function({name:e,fillProps:t={},as:n="div",...o},i){const s=Object(r.useContext)(D.a),a=Object(r.useRef)();return Object(r.useLayoutEffect)(()=>(s.registerSlot(e,a,t),()=>{s.unregisterSlot(e,a)}),[s.registerSlot,s.unregisterSlot,e]),Object(r.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(r.createElement)(n,Object(L.a)({ref:Object(G.useMergeRefs)([i,a])},o))})),Y=n(16),Z=n.n(Y);function X({children:e}){const t=function(){const[e,t]=Object(r.useState)({}),[n,o]=Object(r.useState)({}),i=Object(r.useCallback)((e,n,r)=>{t(t=>{const o=t[e]||{};return{...t,[e]:{...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}}})},[]),s=Object(r.useCallback)((e,n)=>{t(t=>{const{[e]:r,...o}=t;return(null==r?void 0:r.ref)===n?o:t})},[]),a=Object(r.useCallback)((t,r)=>{const o=e[t];if(o&&!Z()(o.fillProps,r)){o.fillProps=r;const e=n[t];e&&e.map(e=>e.current.rerender())}},[e,n]),c=Object(r.useCallback)((e,t)=>{o(n=>({...n,[e]:[...n[e]||[],t]}))},[]),l=Object(r.useCallback)((e,t)=>{o(n=>n[e]?{...n,[e]:n[e].filter(e=>e!==t)}:n)},[]);return Object(r.useMemo)(()=>({slots:e,fills:n,registerSlot:i,updateSlot:a,unregisterSlot:s,registerFill:c,unregisterFill:l}),[e,n,i,a,s,c,l])}();return Object(r.createElement)(D.a.Provider,{value:t},e)}class J extends r.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){this.fills[e]=Object(V.without)(this.fills[e],t),this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach(e=>e())}subscribe(e){return this.listeners.push(e),()=>{this.listeners=Object(V.without)(this.listeners,e)}}render(){return Object(r.createElement)(B.Provider,{value:this.contextValue},this.props.children)}}function Q(e){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(W,e),Object(r.createElement)(K,e))}const ee=Object(r.forwardRef)(({bubblesVirtually:e,...t},n)=>e?Object(r.createElement)(q,Object(L.a)({},t,{ref:n})):Object(r.createElement)(z,t));function te({children:e,...t}){return Object(r.createElement)(J,t,Object(r.createElement)(X,null,e))}function ne(e){const t=t=>Object(r.createElement)(Q,Object(L.a)({name:e},t));t.displayName=e+"Fill";const n=t=>Object(r.createElement)(ee,Object(L.a)({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}var re=n(15),oe=n.n(re);class ie extends c.Component{constructor(){super(...arguments),oe()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("strong",null,e.status),": "+e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{renderError:e}=this.props,{errorMessage:t,hasError:n}=this.state;return n?"function"==typeof e?e(t):Object(r.createElement)("p",null,t):this.props.children}}var se=ie;const ae=e=>Array.isArray(e)&&e.filter(Boolean).length>0;let ce;ce=I;const le=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{Fill:n,Slot:o}=ne(e),i=e=>{let{children:o}=e;return Object(r.createElement)(n,null,e=>r.Children.map(o,n=>Object(r.createElement)(se,{renderError:_.CURRENT_USER_IS_ADMIN?t:()=>null},Object(r.cloneElement)(n,e))))},s=e=>Object(r.createElement)(o,a()({},e,{bubblesVirtually:!0}));return{Fill:i,Slot:s}},{Fill:ue,Slot:pe}=le("__experimentalOrderMeta");ue.Slot=e=>{let{className:t,extensions:n,cart:o,context:s}=e;const{fills:a}=ce("__experimentalOrderMeta");return ae(a)&&Object(r.createElement)(P,{slotWrapper:!0},Object(r.createElement)(pe,{className:i()(t,"wc-block-components-order-meta"),fillProps:{extensions:n,cart:o,context:s}}))};var me=ue;const{Fill:fe,Slot:de}=le("__experimentalDiscountsMeta");fe.Slot=e=>{let{className:t,extensions:n,cart:o,context:s}=e;const{fills:a}=ce("__experimentalDiscountsMeta");return ae(a)&&Object(r.createElement)(P,{slotWrapper:!0},Object(r.createElement)(de,{className:i()(t,"wc-block-components-discounts-meta"),fillProps:{extensions:n,cart:o,context:s}}))};var he=fe;const{Fill:be,Slot:ge}=le("__experimentalOrderShippingPackages");be.Slot=e=>{let{className:t,collapsible:n,noResultsMessage:o,renderOption:s,extensions:a,cart:c,components:l,context:u}=e;const{fills:p}=ce("__experimentalOrderShippingPackages"),m=p.length>1;return Object(r.createElement)(ge,{className:i()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:m,showItems:m,noResultsMessage:o,renderOption:s,extensions:a,cart:c,components:l,context:u}})};var ve=be,we=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})},Oe=Object(r.createElement)(A.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(A.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),ye=Object(r.createElement)(A.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(A.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));n(132);var je=e=>{let{children:t,className:n,initialOpen:o=!1,hasBorder:s=!1,title:a,titleTag:c="div"}=e;const[l,u]=Object(r.useState)(o);return Object(r.createElement)("div",{className:i()(n,"wc-block-components-panel",{"has-border":s})},Object(r.createElement)(c,null,Object(r.createElement)("button",{"aria-expanded":l,className:"wc-block-components-panel__button",onClick:()=>u(!l)},Object(r.createElement)(we,{"aria-hidden":"true",className:"wc-block-components-panel__button-icon",icon:l?Oe:ye}),a)),l&&Object(r.createElement)("div",{className:"wc-block-components-panel__content"},t))},Ee=n(34),Se=Object(r.createElement)(A.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(A.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function xe(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const i=o.getBoundingClientRect();return new r.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let ke=0;function Ne(e){const t=document.scrollingElement||document.body;e&&(ke=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=ke)}let _e=0;function Fe(){return Object(r.useEffect)(()=>(0===_e&&Ne(!0),++_e,()=>{1===_e&&Ne(!1),--_e}),[]),null}function Ce(e){return"appear"===e?"top":"left"}function Te(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=(s=t).ownerDocument.defaultView.getComputedStyle(s);var s;const a=n?parseInt(n,10):0,c=r?parseInt(r,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+a,width:e.width-l-u,height:e.height-a-c,left:e.left+l,right:e.right-u,top:e.top+a,bottom:e.bottom-c}}function Pe(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Re(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function Me(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const Ae=Object(r.forwardRef)(({headerTitle:e,onClose:t,children:n,className:o,noArrow:s=!0,isAlternate:a,position:c="bottom right",range:l,focusOnMount:u="firstElement",anchorRef:p,shouldAnchorIncludePadding:m,anchorRect:f,getAnchorRect:d,expandOnMobile:h,animate:b=!0,onClickOutside:g,onFocusOutside:v,__unstableStickyBoundaryElement:w,__unstableSlotName:O="Popover",__unstableObserveElement:y,__unstableBoundaryParent:j,__unstableForcePosition:E,__unstableForceXAlignment:S,...x},k)=>{const _=Object(r.useRef)(null),F=Object(r.useRef)(null),C=Object(r.useRef)(),T=Object(G.useViewportMatch)("medium","<"),[P,R]=Object(r.useState)(),A=I(O),D=h&&T,[V,B]=Object(G.useResizeObserver)();s=D||s,Object(r.useLayoutEffect)(()=>{if(D)return Me(C.current,"is-without-arrow",s),Me(C.current,"is-alternate",a),Pe(C.current,"data-x-axis"),Pe(C.current,"data-y-axis"),Re(C.current,"top"),Re(C.current,"left"),Re(F.current,"maxHeight"),void Re(F.current,"maxWidth");const e=()=>{if(!C.current||!F.current)return;let e=function(e,t,n,r=!1,o,i){if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return xe(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return xe(Object(Ee.getRectangleFromRange)(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=xe(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:Te(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),a=xe(new window.DOMRect(n.left,n.top,n.width,s.bottom-n.top),e.ownerDocument,i);return o?a:Te(a,r)}if(!e.current)return;const{parentNode:s}=e.current,a=s.getBoundingClientRect();return o?a:Te(a,s)}(_,f,d,p,m,C.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=C.current;let r,o=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();o=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}var i;j&&(r=null===(i=C.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const l=B.height?B:F.current.getBoundingClientRect(),{popoverTop:u,popoverLeft:h,xAxis:b,yAxis:g,contentHeight:v,contentWidth:O}=function(e,t,n="top",r,o,i,s,a,c){const[l,u="center",p]=n.split(" "),m=function(e,t,n,r,o,i,s,a){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-s;if(e.top<=t)return{yAxis:n,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===r?l=e.bottom:"top"===r&&(l=e.top);const u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},p={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},m={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let f,d=n,h=null;if(!o&&!a)if("middle"===n&&u.contentHeight===c)d="middle";else if("top"===n&&p.contentHeight===c)d="top";else if("bottom"===n&&m.contentHeight===c)d="bottom";else{d=p.contentHeight>m.contentHeight?"top":"bottom";const e="top"===d?p.contentHeight:m.contentHeight;h=e!==c?e:null}return f="middle"===d?u.popoverTop:"top"===d?p.popoverTop:m.popoverTop,{yAxis:d,popoverTop:f,contentHeight:h}}(e,t,l,p,r,0,i,a);return{...function(e,t,n,r,o,i,s,a,c){const{width:l}=t;"left"===n&&Object(N.isRTL)()?n="right":"right"===n&&Object(N.isRTL)()&&(n="left"),"left"===r&&Object(N.isRTL)()?r="right":"right"===r&&Object(N.isRTL)()&&(r="left");const u=Math.round(e.left+e.width/2),p={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let m=e.left;"right"===r?m=e.right:"middle"===i||c||(m=u);let f=e.right;"left"===r?f=e.left:"middle"===i||c||(f=u);const d={popoverLeft:m,contentWidth:m-l>0?l:m},h={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let b,g=n,v=null;if(!o&&!a)if("center"===n&&p.contentWidth===l)g="center";else if("left"===n&&d.contentWidth===l)g="left";else if("right"===n&&h.contentWidth===l)g="right";else{g=d.contentWidth>h.contentWidth?"left":"right";const e="left"===g?d.contentWidth:h.contentWidth;l>window.innerWidth&&(v=window.innerWidth),e!==l&&(g="center",p.popoverLeft=window.innerWidth/2)}if(b="center"===g?p.popoverLeft:"left"===g?d.popoverLeft:h.popoverLeft,s){const e=s.getBoundingClientRect();b=Math.min(b,e.right-l),Object(N.isRTL)()||(b=Math.max(b,0))}return{xAxis:g,popoverLeft:b,contentWidth:v}}(e,t,u,p,r,m.yAxis,s,a,c),...m}}(e,l,c,w,C.current,o,r,E,S);"number"==typeof u&&"number"==typeof h&&(Re(C.current,"top",u+"px"),Re(C.current,"left",h+"px")),Me(C.current,"is-without-arrow",s||"center"===b&&"middle"===g),Me(C.current,"is-alternate",a),Pe(C.current,"data-x-axis",b),Pe(C.current,"data-y-axis",g),Re(F.current,"maxHeight","number"==typeof v?v+"px":""),Re(F.current,"maxWidth","number"==typeof O?O+"px":""),R(({left:"right",right:"left"}[b]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=C.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const i=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",i),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const l=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(p);let u;return l&&l!==t&&(l.defaultView.addEventListener("resize",e),l.defaultView.addEventListener("scroll",e,!0)),y&&(u=new n.MutationObserver(e),u.observe(y,{attributes:!0})),()=>{n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",i),n.cancelAnimationFrame(o),l&&l!==t&&(l.defaultView.removeEventListener("resize",e),l.defaultView.removeEventListener("scroll",e,!0)),u&&u.disconnect()}},[D,f,d,p,m,c,B,w,y,j]);const U=(e,n)=>{if("focus-outside"===e&&v)v(n);else if("focus-outside"===e&&g){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),M()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),g(e)}else t&&t()},[W,H]=Object(G.__experimentalUseDialog)({focusOnMount:u,__unstableOnClose:U,onClose:U}),z=Object(G.useMergeRefs)([C,W,k]),$=Boolean(b&&P)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:n=Ce(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return i()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:P});let K=Object(r.createElement)("div",Object(L.a)({className:i()("components-popover",o,$,{"is-expanded":D,"is-without-arrow":s,"is-alternate":a})},x,{ref:z},H,{tabIndex:"-1"}),D&&Object(r.createElement)(Fe,null),D&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},e),Object(r.createElement)(Ge,{className:"components-popover__close",icon:Se,onClick:t})),Object(r.createElement)("div",{ref:F,className:"components-popover__content"},Object(r.createElement)("div",{style:{position:"relative"}},V,n)));return A.ref&&(K=Object(r.createElement)(Q,{name:O},K)),p||f?K:Object(r.createElement)("span",{ref:_},K)});Ae.Slot=Object(r.forwardRef)((function({name:e="Popover"},t){return Object(r.createElement)(ee,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var De=Ae,Ie=function({shortcut:e,className:t}){if(!e)return null;let n,o;return Object(V.isString)(e)&&(n=e),Object(V.isObject)(e)&&(n=e.display,o=e.ariaLabel),Object(r.createElement)("span",{className:t,"aria-label":o},n)};const Le=Object(r.createElement)("div",{className:"event-catcher"}),Ve=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(r.cloneElement)(Object(r.createElement)("span",{className:"disabled-element-wrapper"},Object(r.cloneElement)(Le,e),Object(r.cloneElement)(t,{children:n}),","),e),Be=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(r.cloneElement)(e,{...t,children:n}),Ue=(e,t,n)=>{if(1!==r.Children.count(e))return;const o=r.Children.only(e);"function"==typeof o.props[t]&&o.props[t](n)};var We=function({children:e,position:t,text:n,shortcut:o}){const[i,s]=Object(r.useState)(!1),[a,c]=Object(r.useState)(!1),l=Object(G.useDebounce)(c,700),u=t=>{Ue(e,"onMouseDown",t),document.addEventListener("mouseup",f),s(!0)},p=t=>{Ue(e,"onMouseUp",t),document.removeEventListener("mouseup",f),s(!1)},m=e=>"mouseUp"===e?p:"mouseDown"===e?u:void 0,f=m("mouseUp"),d=(t,n)=>r=>{if(Ue(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&i)return;l.cancel();const o=Object(V.includes)(["focus","mouseenter"],r.type);o!==a&&(n?l(o):c(o))},h=()=>{l.cancel(),document.removeEventListener("mouseup",f)};if(Object(r.useEffect)(()=>h,[]),1!==r.Children.count(e))return e;const b={onMouseEnter:d("onMouseEnter",!0),onMouseLeave:d("onMouseLeave"),onClick:d("onClick"),onFocus:d("onFocus"),onBlur:d("onBlur"),onMouseDown:m("mouseDown")},g=r.Children.only(e),{children:v,disabled:w}=g.props;return(w?Ve:Be)({child:g,eventHandlers:b,childrenWithPopover:(({grandchildren:e,isOver:t,position:n,text:o,shortcut:i})=>Object(r.concatChildren)(e,t&&Object(r.createElement)(De,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(r.createElement)(Ie,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:a,position:t,text:n,shortcut:o})})},He=function({icon:e,className:t,...n}){const o=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(r.createElement)("span",Object(L.a)({className:o},n))},ze=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(r.createElement)(He,Object(L.a)({icon:e},n));if(Object(r.isValidElement)(e)&&He===e.type)return Object(r.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof r.Component?Object(r.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===A.SVG)){const o={width:t,height:t,...e.props,...n};return Object(r.createElement)(A.SVG,o)}return Object(r.isValidElement)(e)?Object(r.cloneElement)(e,{size:t,...n}):e},$e=Object(r.forwardRef)((function({as:e="div",className:t,...n},o){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(r.createElement)(e,t)}({as:e,className:i()("components-visually-hidden",t),...n,ref:o})}));const Ke=["onMouseDown","onClick"];var Ge=Object(r.forwardRef)((function(e,t){const{href:n,target:o,isSmall:s,isPressed:a,isBusy:c,isDestructive:l,className:u,disabled:p,icon:m,iconPosition:f="left",iconSize:d,showTooltip:h,tooltipPosition:b,shortcut:g,label:v,children:w,text:O,variant:y,__experimentalIsFocusable:j,describedBy:E,...S}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:i,...s}){let a=i;var c,l,u,p,m;return t&&(null!==(c=a)&&void 0!==c||(a="primary")),r&&(null!==(l=a)&&void 0!==l||(a="tertiary")),n&&(null!==(u=a)&&void 0!==u||(a="secondary")),e&&(M()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=a)&&void 0!==p||(a="secondary")),o&&(null!==(m=a)&&void 0!==m||(a="link")),{...s,variant:a}}(e),x=i()("components-button",u,{"is-secondary":"secondary"===y,"is-primary":"primary"===y,"is-small":s,"is-tertiary":"tertiary"===y,"is-pressed":a,"is-busy":c,"is-link":"link"===y,"is-destructive":l,"has-text":!!m&&!!w,"has-icon":!!m}),k=p&&!j,N=void 0===n||k?"button":"a",_="a"===N?{href:n,target:o}:{type:"button",disabled:k,"aria-pressed":a};if(p&&j){_["aria-disabled"]=!0;for(const e of Ke)S[e]=e=>{e.stopPropagation(),e.preventDefault()}}const F=!k&&(h&&v||g||!!v&&(!w||Object(V.isArray)(w)&&!w.length)&&!1!==h),C=E?Object(V.uniqueId)():null,T=S["aria-describedby"]||C,P=Object(r.createElement)(N,Object(L.a)({},_,S,{className:x,"aria-label":S["aria-label"]||v,"aria-describedby":T,ref:t}),m&&"left"===f&&Object(r.createElement)(ze,{icon:m,size:d}),O&&Object(r.createElement)(r.Fragment,null,O),m&&"right"===f&&Object(r.createElement)(ze,{icon:m,size:d}),w);return F?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(We,{text:E||v,shortcut:g,position:b},P),E&&Object(r.createElement)($e,null,Object(r.createElement)("span",{id:C},E))):Object(r.createElement)(r.Fragment,null,P,E&&Object(r.createElement)($e,null,Object(r.createElement)("span",{id:C},E)))}));n(134);var qe=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"});n(133);var Ye=e=>{let{className:t,showSpinner:n=!1,children:o,variant:s="contained",...c}=e;const l=i()("wc-block-components-button",t,s,{"wc-block-components-button--loading":n});return Object(r.createElement)(Ge,a()({className:l},c),n&&Object(r.createElement)(qe,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},o))},Ze=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:s,wrapperProps:a={}}=e;const c=null!=n,l=null!=o;return!c&&l?(t=s||"span",a={...a,className:i()(a.className,"screen-reader-text")},Object(r.createElement)(t,a,o)):(t=s||r.Fragment,c&&l&&n!==o?Object(r.createElement)(t,a,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,a,n))};n(135);const Xe=e=>{let{className:t,label:n,id:o,onChange:s,children:c,hasError:l=!1,checked:u=!1,...p}=e;const m=Object(G.useInstanceId)(Xe),f=o||"checkbox-control-"+m;return Object(r.createElement)("div",{className:i()("wc-block-components-checkbox",{"has-error":l},t)},Object(r.createElement)("label",{htmlFor:f},Object(r.createElement)("input",a()({id:f,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:e=>s(e.target.checked),"aria-invalid":!0===l,checked:u},p)),Object(r.createElement)("svg",{className:"wc-block-components-checkbox__mark","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})),n&&Object(r.createElement)("span",{className:"wc-block-components-checkbox__label"},n),c))};var Je=Xe;const Qe=(e,t)=>{if(!e.includes(t))throw Error(Object(N.sprintf)(
+/* translators: %1$s value passed to filter, %2$s : value that must be included. */
+Object(N.__)('Returned value must include %1$s, you passed "%2$s"',"woo-gutenberg-products-block"),t,e));return!0};var et=n(3),tt=n(9);const nt=e=>{const{applyExtensionCartUpdate:t}=Object(et.dispatch)(tt.b);return t(e)},rt=e=>null===e,ot=e=>!rt(e)&&e instanceof Object&&e.constructor===Object,it=()=>!0;let st={};const at=(e,t)=>{Object.keys(t).includes("couponName")&&M()("snackbarNotices",{alternative:"snackbarNoticeVisibility",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4417"}),Object.keys(t).includes("couponName")&&M()("couponName",{alternative:"coupons",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/bb921d21f42e21f38df2b1c87b48e07aa4cb0538/docs/extensibility/available-filters.md#coupons"}),st={...st,[e]:t}},ct={},lt=(e,t,n,r)=>{ct[e]={arg:t,extensions:n,defaultValue:r}},ut=(e,t)=>!(!rt(e)||!rt(t))||ot(e)&&ot(t)&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>{return o=n,ot(r=t)&&o in r&&Z()(e[n],t[n]);var r,o}),pt=e=>{let{filterName:t,defaultValue:n,extensions:o=null,arg:i=null,validation:s=it}=e;const a=Object(r.useRef)({});return Object(r.useMemo)(()=>{if(!((e,t,n,r)=>{const o=ct[e];if(!o)return lt(e,t,n,r),!0;const{arg:i={},extensions:s={},defaultValue:a=null}=o;return ut(t,i)?!(r===a&&ut(n,s)||(lt(e,t,n,r),0)):(lt(e,t,n,r),!0)})(t,i,o,n)&&void 0!==a.current[t])return a.current[t];const e=(e=>Object.keys(st).map(t=>st[t][e]).filter(Boolean))(t);let r=n;return e.forEach(e=>{try{const t=e(r,o||{},i);if(typeof t!=typeof r)throw new Error(Object(N.sprintf)(
+/* translators: %1$s is the type of the variable passed to the filter function, %2$s is the type of the value returned by the filter function. */
+Object(N.__)("The type returned by checkout filters must be the same as the type they receive. The function received %1$s but returned %2$s.","woo-gutenberg-products-block"),typeof r,typeof t));r=s(t)?t:r}catch(e){if(_.CURRENT_USER_IS_ADMIN)throw e;console.error(e)}}),a.current[t]=r,r},[t,n,o,i,s])};let mt;!function(e){e.CHECKOUT="woocommerce/checkout",e.CHECKOUT_FIELDS="woocommerce/checkout-fields-block",e.CHECKOUT_TOTALS="woocommerce/checkout-totals-block",e.CONTACT_INFORMATION="woocommerce/checkout-contact-information-block",e.SHIPPING_ADDRESS="woocommerce/checkout-shipping-address-block",e.BILLING_ADDRESS="woocommerce/checkout-billing-address-block",e.SHIPPING_METHODS="woocommerce/checkout-shipping-methods-block",e.PAYMENT_METHODS="woocommerce/checkout-payment-methods-block",e.CART="woocommerce/cart",e.EMPTY_CART="woocommerce/empty-cart-block",e.FILLED_CART="woocommerce/filled-cart-block",e.CART_ITEMS="woocommerce/cart-items-block",e.CART_TOTALS="woocommerce/cart-totals-block",e.MINI_CART="woocommerce/mini-cart-contents",e.EMPTY_MINI_CART="woocommerce/empty-mini-cart-contents-block",e.FILLED_MINI_CART="woocommerce/filled-mini-cart-contents-block",e.MINI_CART_ITEMS="woocommerce/mini-cart-items-block",e.CART_ORDER_SUMMARY="woocommerce/cart-order-summary-block",e.CHECKOUT_ORDER_SUMMARY="woocommerce/checkout-order-summary-block"}(mt||(mt={}));const ft={},dt=e=>Object.values(mt).includes(e),ht=e=>dt(e)?Object.values(ft).filter(t=>{let{metadata:n}=t;return((null==n?void 0:n.parent)||[]).includes(e)}):[];var bt=n(35);const gt=e=>{var t,n,r,o;((e,t,n)=>{if(!ot(e))return;const r=typeof e.metadata;if("object"!==r)throw new Error(`Incorrect value for the metadata argument when registering a block component. It was a ${r}, but must be a object.`)})(e),(e=>{if(((e,t,n)=>{const r=typeof t;if("string"!==r)throw new Error(`Incorrect value for the blockName argument when registering a checkout block. It was a ${r}, but must be a string.`)})(0,e),!e)throw new Error("Value for the blockName argument must not be empty.")})(e.metadata.name),(e=>{if("string"!=typeof e&&!Array.isArray(e))throw new Error(`Incorrect value for the parent argument when registering a checkout block. It was a ${typeof e}, but must be a string or array of strings.`);if("string"==typeof e&&!dt(e))throw new Error("When registering a checkout block, the parent must be a valid inner block area.");if(Array.isArray(e)&&!e.some(e=>dt(e)))throw new Error("When registering a checkout block, the parent must be a valid inner block area.")})(e.metadata.parent),((e,t)=>{const n=e.component;if(n){if("function"==typeof n)return;if(ot(n)&&n.$$typeof&&n.$$typeof===Symbol.for("react.lazy"))return}throw new Error("Incorrect value for the component argument when registering a block component. Component must be a valid React Element or Lazy callback.")})(e),Object(bt.registerBlockComponent)({blockName:e.metadata.name,component:e.component}),ft[e.metadata.name]={blockName:e.metadata.name,metadata:e.metadata,component:e.component,force:!(null===(t=e.metadata)||void 0===t||null===(n=t.attributes)||void 0===n||null===(r=n.lock)||void 0===r||null===(o=r.default)||void 0===o||!o.remove)}}},14:function(e,t){e.exports=window.React},15: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},e.exports.__esModule=!0,e.exports.default=e.exports},16:function(e,t){e.exports=window.wp.isShallowEqual},19:function(e,t,n){"use strict";(function(e){var r=n(0);n(33);const o=Object(r.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,n(20))},2:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t1)for(var n=1;n0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:e,expressPaymentMethods:s,paymentMethodsInitialized:c,expressPaymentMethodsInitialized:o}=Object(n.b)(),l=Object(a.a)(e),i=Object(a.a)(s);return{paymentMethods:t?i:l,isInitialized:t?o:c}},o=()=>c(!1),l=()=>c(!0)},269:function(t,e,s){"use strict";var a=s(11),n=s.n(a),c=s(0),o=s(4),l=s.n(o);const i=t=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+t;var r=t=>{let{id:e,src:s=null,alt:a=""}=t;return s?Object(c.createElement)("img",{className:i(e),src:s,alt:a}):null},d=s(44);const m=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var p=s(59);s(262),e.a=t=>{let{icons:e=[],align:s="center",className:a}=t;const o=(t=>{const e={};return t.forEach(t=>{let s={};"string"==typeof t&&(s={id:t,alt:t,src:null}),"object"==typeof t&&(s={id:t.id||"",alt:t.alt||"",src:t.src||null}),s.id&&Object(p.a)(s.id)&&!e[s.id]&&(e[s.id]=s)}),Object.values(e)})(e);if(0===o.length)return null;const i=l()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===s,"wc-block-components-payment-method-icons--align-right":"right"===s},a);return Object(c.createElement)("div",{className:i},o.map(t=>{const e={...t,...(s=t.id,m.find(t=>t.id===s)||{})};var s;return Object(c.createElement)(r,n()({key:"payment-method-icon-"+t.id},e))}))}},369:function(t,e,s){"use strict";s.d(e,"a",(function(){return a}));const a=t=>Object.values(t).reduce((t,e)=>(null!==e.icons&&(t=t.concat(e.icons)),t),[])},445:function(t,e,s){"use strict";s.r(e);var a=s(0),n=s(269),c=s(266),o=s(369);e.default=t=>{let{className:e}=t;const{paymentMethods:s}=Object(c.b)();return Object(a.createElement)(n.a,{className:e,icons:Object(o.a)(s)})}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/cart-express-payment-frontend.js b/build/cart-blocks/cart-express-payment-frontend.js
new file mode 100644
index 00000000000..cc0a29e4b27
--- /dev/null
+++ b/build/cart-blocks/cart-express-payment-frontend.js
@@ -0,0 +1,5 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{103:function(e,t,n){"use strict";var s=n(0);t.a=function(e){let{icon:t,size:n=24,...c}=e;return Object(s.cloneElement)(t,{width:n,height:n,...c})}},253:function(e,t){},262:function(e,t){},264:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var s=n(1),c=n(7),o=n(5),r=n(17),a=n(30),i=n(0),l=n(242);const p=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:s}=Object(l.b)(),c=Object(i.useRef)(e);Object(i.useEffect)(()=>{c.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...r,setIsSuppressed:s}};var u=n(191);const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:n}=Object(a.a)(),{createErrorNotice:i}=Object(c.useDispatch)("core/notices"),{addSnackbarNotice:l}=p(),{setValidationErrors:d}=Object(u.b)(),m=Object(c.useSelect)((t,n)=>{let{dispatch:c}=n;const a=t(o.CART_STORE_KEY),p=a.isApplyingCoupon(),u=a.isRemovingCoupon(),{applyCoupon:m,removeCoupon:b,receiveApplyingCoupon:h}=c(o.CART_STORE_KEY);return{applyCoupon:e=>{m(e).then(t=>{!0===t&&l(Object(s.sprintf)(
+/* translators: %s coupon code. */
+Object(s.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{d({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),h("")})},removeCoupon:t=>{b(t).then(e=>{!0===e&&l(Object(s.sprintf)(
+/* translators: %s coupon code. */
+Object(s.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{i(t.message,{id:"coupon-form",context:e}),h("")})},isApplyingCoupon:p,isRemovingCoupon:u}},[i,l]);return{appliedCoupons:t,isLoading:n,...m}}},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var s=n(0),c=n(191);n(253);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:r,getValidationErrorId:a}=Object(c.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(s.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(s.createElement)("p",{id:a(o)},t))}},266:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var s=n(29),c=n(198);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:r}=Object(c.b)(),a=Object(s.a)(t),i=Object(s.a)(n);return{paymentMethods:e?i:a,isInitialized:e?r:o}},r=()=>o(!1),a=()=>o(!0)},269:function(e,t,n){"use strict";var s=n(11),c=n.n(s),o=n(0),r=n(4),a=n.n(r);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:n=null,alt:s=""}=e;return n?Object(o.createElement)("img",{className:i(t),src:n,alt:s}):null},p=n(44);const u=[{id:"alipay",alt:"Alipay",src:p.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.l+"payment-methods/wechat.svg"}];var d=n(59);n(262),t.a=e=>{let{icons:t=[],align:n="center",className:s}=e;const r=(e=>{const t={};return e.forEach(e=>{let n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"==typeof e&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&Object(d.a)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===r.length)return null;const i=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===n,"wc-block-components-payment-method-icons--align-right":"right"===n},s);return Object(o.createElement)("div",{className:i},r.map(e=>{const t={...e,...(n=e.id,u.find(e=>e.id===n)||{})};var n;return Object(o.createElement)(l,c()({key:"payment-method-icon-"+e.id},t))}))}},279:function(e,t){},280:function(e,t,n){"use strict";var s=n(18),c=n.n(s),o=n(0),r=n(1),a=n(3),i=n(2),l=n(121),p=n(28);class u extends a.Component{constructor(){super(...arguments),c()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:n}=this.props;if(e){let e=Object(r.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(r.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const s=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.a,{additionalNotices:s,context:p.c.PAYMENTS})}return this.props.children}}u.defaultProps={isEditor:!1},t.a=u},299:function(e,t){},300:function(e,t,n){"use strict";var s=n(0),c=n(1),o=n(332),r=n(266),a=n(25),i=n(198),l=n(31),p=n.n(l),u=n(280);t.a=()=>{const{isEditor:e}=Object(a.a)(),{setActivePaymentMethod:t,setExpressPaymentError:n,activePaymentMethod:l,paymentMethodData:d,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:h}=Object(r.a)(),g=Object(s.useRef)(l),v=Object(s.useRef)(d),j=Object(s.useCallback)(e=>()=>{g.current=l,v.current=d,m().started(),t(e)},[l,d,t,m]),y=Object(s.useCallback)(()=>{m().pristine(),t(g.current,v.current)},[t,m]),O=Object(s.useCallback)(e=>{m().error(e),n(e),t(g.current,v.current)},[t,m,n]),E=Object(s.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";p()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?O(e):n("")}),[n,O]),f=Object.entries(h),k=f.length>0?f.map(t=>{let[n,c]=t;const o=e?c.edit:c.content;return Object(s.isValidElement)(o)?Object(s.createElement)("li",{key:n,id:"express-payment-method-"+n},Object(s.cloneElement)(o,{...b,onClick:j(n),onClose:y,onError:O,setExpressPaymentError:E})):null}):Object(s.createElement)("li",{key:"noneRegistered"},Object(c.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(s.createElement)(u.a,{isEditor:e},Object(s.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},327:function(e,t,n){"use strict";var s=n(0),c=n(14);const o=Object(s.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(c.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));t.a=o},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return N}));var s=n(1),c=n(37),o=n(0),r=n(4),a=n.n(r),i=n(14),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{fillRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z",clipRule:"evenodd"})),u=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})),d=n(327),m=n(103),b=n(59),h=n(61);n(279);const g={bank:p,bill:u,card:d.a,checkPayment:l};var v=e=>{let{icon:t="",text:n=""}=e;const s=!!t,c=Object(o.useCallback)(e=>s&&Object(b.a)(e)&&Object(h.b)(g,e),[s]),r=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":s});return Object(o.createElement)("span",{className:r},c(t)?Object(o.createElement)(m.a,{icon:g[t]}):t,n)},j=n(269),y=n(2),O=n(31),E=n.n(O),f=n(134),k=n(265),w=n(30),S=n(264),P=n(28),_=n(34),C=n(198),x=n(66),R=n(46);const M=(e,t)=>{const n=[],c=(t,n)=>{const s=n+"_tax",c=Object(h.b)(e,n)&&Object(b.a)(e[n])?parseInt(e[n],10):0;return{key:n,label:t,value:c,valueWithTax:c+(Object(h.b)(e,s)&&Object(b.a)(e[s])?parseInt(e[s],10):0)}};return n.push(c(Object(s.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(c(Object(s.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(c(Object(s.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({key:"total_tax",label:Object(s.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(c(Object(s.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n};var I=n(64);const N=()=>{const{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onSubmit:u,customerId:d}=Object(_.b)(),{currentStatus:m,activePaymentMethod:b,onPaymentProcessing:h,setExpressPaymentError:g,shouldSavePayment:O}=Object(C.b)(),{shippingErrorStatus:N,shippingErrorTypes:z,onShippingRateSuccess:T,onShippingRateFail:A,onShippingRateSelectSuccess:V,onShippingRateSelectFail:D}=Object(x.b)(),{shippingRates:B,isLoadingRates:L,selectedRates:F,isSelectingRate:H,selectShippingRate:W,needsShipping:G}=Object(I.a)(),{billingData:Y,shippingAddress:J,setShippingAddress:U}=Object(R.b)(),{cartItems:K,cartFees:X,cartTotals:q,extensions:Q}=Object(w.a)(),{appliedCoupons:Z}=Object(S.a)(),{noticeContexts:$,responseTypes:ee}=Object(P.d)(),te=Object(o.useRef)(M(q,G)),ne=Object(o.useRef)({label:Object(s.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)});Object(o.useEffect)(()=>{te.current=M(q,G),ne.current={label:Object(s.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)}},[q,G]);const se=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";E()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),g(e)}),[g]);return{activePaymentMethod:b,billing:{appliedCoupons:Z,billingData:Y,cartTotal:ne.current,cartTotalItems:te.current,currency:Object(c.getCurrencyFromPriceResponse)(q),customerId:d,displayPricesIncludingTax:Object(y.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:K,cartFees:X,extensions:Q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r},components:{LoadingMask:f.a,PaymentMethodIcons:j.a,PaymentMethodLabel:v,ValidationInputError:k.a},emitResponse:{noticeContexts:$,responseTypes:ee},eventRegistration:{onCheckoutAfterProcessingWithError:p,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:h,onShippingRateFail:A,onShippingRateSelectFail:D,onShippingRateSelectSuccess:V,onShippingRateSuccess:T},onSubmit:u,paymentStatus:m,setExpressPaymentError:se,shippingData:{isSelectingRate:H,needsShipping:G,selectedRates:F,setSelectedRates:W,setShippingAddress:U,shippingAddress:J,shippingRates:B,shippingRatesLoading:L},shippingStatus:{shippingErrorStatus:N,shippingErrorTypes:z},shouldSavePayment:O}}},432:function(e,t,n){"use strict";n.r(t);var s=n(0),c=n(30),o=n(4),r=n.n(o),a=n(1),i=n(266),l=n(28),p=n(34),u=n(198),d=n(121),m=n(134),b=n(300);n(299);var h=()=>{const{paymentMethods:e,isInitialized:t}=Object(i.a)(),{noticeContexts:n}=Object(l.d)(),{isCalculating:c,isProcessing:o,isAfterProcessing:r,isBeforeProcessing:h,isComplete:g,hasError:v}=Object(p.b)(),{currentStatus:j}=Object(u.b)();if(!t||t&&0===Object.keys(e).length)return null;const y=o||r||h||g&&!v;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(m.a,{isLoading:c||y||j.isDoingExpressPayment},Object(s.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(s.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(s.createElement)(d.a,{context:n.EXPRESS_PAYMENTS}),Object(s.createElement)(b.a,null)))),Object(s.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(a.__)("Or","woo-gutenberg-products-block")))};t.default=e=>{let{className:t}=e;const{cartNeedsPayment:n}=Object(c.a)();return n?Object(s.createElement)("div",{className:r()("wc-block-cart__payment-options",t)},Object(s.createElement)(h,null)):null}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/cart-items-frontend.js b/build/cart-blocks/cart-items-frontend.js
new file mode 100644
index 00000000000..0d5403a52d3
--- /dev/null
+++ b/build/cart-blocks/cart-items-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{362:function(e,c,a){"use strict";var n=a(0),t=a(3),s=a(4),r=a.n(s);const l=Object(t.forwardRef)((e,c)=>{let{children:a,className:t=""}=e;return Object(n.createElement)("div",{ref:c,className:r()("wc-block-components-main",t)},a)});c.a=l},411:function(e,c,a){"use strict";a.r(c);var n=a(0),t=a(362),s=a(4),r=a.n(s);c.default=e=>{let{children:c,className:a}=e;return Object(n.createElement)(t.a,{className:r()("wc-block-cart__main",a)},c)}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js b/build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js
new file mode 100644
index 00000000000..65f232e2253
--- /dev/null
+++ b/build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js
@@ -0,0 +1,15 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{100:function(e,t,c){"use strict";var a=c(11),r=c.n(a),n=c(0),l=c(136),o=c(4),i=c.n(o);c(189);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:a,onValueChange:o,displayType:u="text",...m}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const p=b/10**a.minorUnit;if(!Number.isFinite(p))return null;const d=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),O={...m,...s(a),value:void 0,currency:void 0,onValueChange:void 0},j=o?e=>{const t=+e.value*10**a.minorUnit;o(t)}:()=>{};return Object(n.createElement)(l.a,r()({className:d,displayType:u},O,{value:p,onValueChange:j}))}},189:function(e,t){},272:function(e,t,c){"use strict";var a=c(0),r=c(4),n=c.n(r);c(296),t.a=e=>{let{children:t,className:c}=e;return Object(a.createElement)("div",{className:n()("wc-block-components-product-badge",c)},t)}},274:function(e,t,c){"use strict";var a=c(0),r=c(1),n=c(100),l=c(4),o=c.n(l),i=c(37);c(275);const s=e=>{let{currency:t,maxPrice:c,minPrice:l,priceClassName:s,priceStyle:u={}}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{className:"screen-reader-text"},Object(r.sprintf)(
+/* translators: %1$s min price, %2$s max price */
+Object(r.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(l),Object(i.formatPrice)(c))),Object(a.createElement)("span",{"aria-hidden":!0},Object(a.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:t,value:l,style:u})," — ",Object(a.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:l,regularPrice:i,priceClassName:s,priceStyle:u,price:m}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Previous price:","woo-gutenberg-products-block")),Object(a.createElement)(n.a,{currency:t,renderText:e=>Object(a.createElement)("del",{className:o()("wc-block-components-product-price__regular",c),style:l},e),value:i}),Object(a.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:","woo-gutenberg-products-block")),Object(a.createElement)(n.a,{currency:t,renderText:e=>Object(a.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:u},e),value:m}))};t.a=e=>{let{align:t,className:c,currency:r,format:l="",maxPrice:i,minPrice:m,price:b,priceClassName:p,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:_}=e;const y=o()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const g=O&&b!==O;let f=Object(a.createElement)("span",{className:o()("wc-block-components-product-price__value",p)});return g?f=Object(a.createElement)(u,{currency:r,price:b,priceClassName:p,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:_}):void 0!==m&&void 0!==i?f=Object(a.createElement)(s,{currency:r,maxPrice:i,minPrice:m,priceClassName:p,priceStyle:d}):b&&(f=Object(a.createElement)(n.a,{className:o()("wc-block-components-product-price__value",p),currency:r,value:b,style:d})),Object(a.createElement)("span",{className:y},Object(a.createInterpolateElement)(l,{price:f}))}},275:function(e,t){},276:function(e,t,c){"use strict";var a=c(11),r=c.n(a),n=c(0),l=c(17),o=c(4),i=c.n(o);c(277),t.a=e=>{let{className:t="",disabled:c=!1,name:a,permalink:o="",target:s,rel:u,style:m,onClick:b,...p}=e;const d=i()("wc-block-components-product-name",t);if(c){const e=p;return Object(n.createElement)("span",r()({className:d},e,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(a)}}))}return Object(n.createElement)("a",r()({className:d,href:o,target:s},p,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(a)},style:m}))}},277:function(e,t){},283:function(e,t,c){"use strict";var a=c(0),r=c(114),n=c(115);const l=e=>{const t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},o=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),i=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const a=o(e),r=a.split(" ").splice(0,t).join(" ");return Object(n.autop)(i(r,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const r=o(e),l=r.slice(0,t);if(c)return Object(n.autop)(i(l,a));const s=l.match(/([\s]+)/g),u=s?s.length:0,m=r.slice(0,t+u);return Object(n.autop)(i(m,a))};t.a=e=>{let{source:t,maxLength:c=15,countType:o="words",className:i="",style:m={}}=e;const b=Object(a.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const a=Object(n.autop)(e),o=Object(r.count)(a,c);if(o<=t)return a;const i=l(a),m=Object(r.count)(i,c);return m<=t?i:"words"===c?s(i,t):u(i,t,"characters_including_spaces"===c)}(t,c,o),[t,c,o]);return Object(a.createElement)(a.RawHTML,{style:m,className:i},b)}},295:function(e,t){},296:function(e,t){},297:function(e,t){},298:function(e,t){},324:function(e,t,c){"use strict";var a=c(11),r=c.n(a),n=c(0),l=c(17),o=c(2);c(295),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const a=t.thumbnail?{src:t.thumbnail,alt:Object(l.decodeEntities)(t.alt)||c||"Product Image"}:{src:o.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",r()({className:"wc-block-components-product-image"},a,{alt:a.alt}))}},325:function(e,t,c){"use strict";var a=c(0),r=c(1),n=c(272);t.a=()=>Object(a.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woo-gutenberg-products-block"))},326:function(e,t,c){"use strict";var a=c(0),r=c(1),n=c(272);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(a.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(r.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},333:function(e,t,c){"use strict";var a=c(0),r=c(4),n=c.n(r),l=c(1),o=c(19),i=c(139),s=c(47);c(363);var u=e=>{let{className:t,quantity:c=1,minimum:r=1,maximum:u,onChange:m=(()=>{}),step:b=1,itemName:p="",disabled:d}=e;const O=n()("wc-block-components-quantity-selector",t),j=void 0!==u,_=c-b>=r,y=!j||c+b<=u,g=Object(a.useCallback)(e=>{let t=e;j&&(t=Math.min(t,Math.floor(u/b)*b)),t=Math.max(t,Math.ceil(r/b)*b),t=Math.floor(t/b)*b,t!==e&&m(t)},[j,u,r,m,b]),f=Object(s.a)(g,300);Object(a.useLayoutEffect)(()=>{g(c)},[c,g]);const k=Object(a.useCallback)(e=>{const t=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===i.DOWN,a=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===i.UP;t&&_&&(e.preventDefault(),m(c-b)),a&&y&&(e.preventDefault(),m(c+b))},[c,m,y,_,b]);return Object(a.createElement)("div",{className:O},Object(a.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:d,type:"number",step:b,min:r,max:u,value:c,onKeyDown:k,onChange:e=>{let t=parseInt(e.target.value,10);t=isNaN(t)?c:t,t!==c&&(m(t),f(t))},"aria-label":Object(l.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(l.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),p)}),Object(a.createElement)("button",{"aria-label":Object(l.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:d||!_,onClick:()=>{const e=c-b;m(e),Object(o.speak)(Object(l.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(l.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e)),g(e)}},"-"),Object(a.createElement)("button",{"aria-label":Object(l.__)("Increase quantity","woo-gutenberg-products-block"),disabled:d||!y,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=c+b;m(e),Object(o.speak)(Object(l.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(l.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e)),g(e)}},"+"))},m=c(274),b=c(276),p=c(7),d=c(5),O=c(98),j=c(57),_=c(68),y=c(61),g=c(59),f=c(69),k=c(30),E=c(34);var w=c(40),v=c(324),N=c(325),h=c(326),C=c(100),x=c(272),P=e=>{let{currency:t,saleAmount:c,format:r=""}=e;if(!c||c<=0)return null;r.includes("")||(r="",console.error("Price formats need to include the `` tag."));const n=Object(l.sprintf)(
+/* translators: %s will be replaced by the discount amount */
+Object(l.__)("Save %s","woo-gutenberg-products-block"),r);return Object(a.createElement)(x.a,{className:"wc-block-components-sale-badge"},Object(a.createInterpolateElement)(n,{price:Object(a.createElement)(C.a,{currency:t,value:c})}))},I=c(336),S=c(37),q=c(10),D=c(323),A=c(2);const R=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),T=e=>Object(q.mustContain)(e,"");var F=Object(a.forwardRef)((e,t)=>{let{lineItem:c,onRemove:r=(()=>{}),tabIndex:i=null}=e;const{name:s="",catalog_visibility:C="visible",short_description:x="",description:F="",low_stock_remaining:M=null,show_backorder_badge:L=!1,quantity_limits:U={minimum:1,maximum:99,multiple_of:1,editable:!0},sold_individually:Q=!1,permalink:V="",images:$=[],variation:H=[],item_data:B=[],prices:K={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:W={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:J}=c,{quantity:Y,setItemQuantity:z,removeItem:G,isPendingDelete:X}=(e=>{const t={key:"",quantity:1};(e=>Object(y.a)(e)&&Object(y.b)(e,"key")&&Object(y.b)(e,"quantity")&&Object(g.a)(e.key)&&Object(f.a)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:c="",quantity:r=1}=t,{cartErrors:n}=Object(k.a)(),{dispatchActions:l}=Object(E.b)(),[o,i]=Object(a.useState)(r),[s]=Object(O.a)(o,400),u=Object(j.a)(s),{removeItemFromCart:m,changeCartItemQuantity:b}=Object(p.useDispatch)(d.CART_STORE_KEY);Object(a.useEffect)(()=>i(r),[r]);const w=Object(p.useSelect)(e=>{if(!c)return{quantity:!1,delete:!1};const t=e(d.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}},[c]),v=Object(a.useCallback)(()=>c?m(c).then(()=>(Object(_.d)(),!0)):Promise.resolve(!1),[c,m]);return Object(a.useEffect)(()=>{c&&Object(f.a)(u)&&Number.isFinite(u)&&u!==s&&b(c,s)},[c,b,s,u]),Object(a.useEffect)(()=>(w.delete?l.incrementCalculating():l.decrementCalculating(),()=>{w.delete&&l.decrementCalculating()}),[l,w.delete]),Object(a.useEffect)(()=>(w.quantity||s!==o?l.incrementCalculating():l.decrementCalculating(),()=>{(w.quantity||s!==o)&&l.decrementCalculating()}),[l,w.quantity,s,o]),{isPendingDelete:w.delete,quantity:o,setItemQuantity:i,removeItem:v,cartItemQuantityErrors:n}})(c),{dispatchStoreEvent:Z}=Object(w.a)(),{receiveCart:ee,...te}=Object(k.a)(),ce=Object(a.useMemo)(()=>({context:"cart",cartItem:c,cart:te}),[c,te]),ae=Object(S.getCurrencyFromPriceResponse)(K),re=Object(q.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:s,extensions:J,arg:ce}),ne=Object(D.a)({amount:parseInt(K.raw_prices.regular_price,10),precision:K.raw_prices.precision}),le=Object(D.a)({amount:parseInt(K.raw_prices.price,10),precision:K.raw_prices.precision}),oe=ne.subtract(le),ie=oe.multiply(Y),se=Object(S.getCurrencyFromPriceResponse)(W);let ue=parseInt(W.line_subtotal,10);Object(A.getSetting)("displayCartPricesIncludingTax",!1)&&(ue+=parseInt(W.line_subtotal_tax,10));const me=Object(D.a)({amount:ue,precision:se.minorUnit}),be=$.length?$[0]:{},pe="hidden"===C||"search"===C,de=Object(q.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:J,arg:ce}),Oe=Object(q.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:J,arg:ce,validation:T}),je=Object(q.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:J,arg:ce,validation:T}),_e=Object(q.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:J,arg:ce,validation:T});return Object(a.createElement)("tr",{className:n()("wc-block-cart-items__row",de,{"is-disabled":X}),ref:t,tabIndex:i},Object(a.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(y.b)(be,"alt")||!be.alt},pe?Object(a.createElement)(v.a,{image:be,fallbackAlt:re}):Object(a.createElement)("a",{href:V,tabIndex:-1},Object(a.createElement)(v.a,{image:be,fallbackAlt:re}))),Object(a.createElement)("td",{className:"wc-block-cart-item__product"},Object(a.createElement)("div",{className:"wc-block-cart-item__wrap"},Object(a.createElement)(b.a,{disabled:X||pe,name:re,permalink:V}),L?Object(a.createElement)(N.a,null):!!M&&Object(a.createElement)(h.a,{lowStockRemaining:M}),Object(a.createElement)("div",{className:"wc-block-cart-item__prices"},Object(a.createElement)(m.a,{currency:ae,regularPrice:R(ne,ae),price:R(le,ae),format:je})),Object(a.createElement)(P,{currency:ae,saleAmount:R(oe,ae),format:_e}),Object(a.createElement)(I.a,{shortDescription:x,fullDescription:F,itemData:B,variation:H}),Object(a.createElement)("div",{className:"wc-block-cart-item__quantity"},!Q&&!!U.editable&&Object(a.createElement)(u,{disabled:X,quantity:Y,minimum:U.minimum,maximum:U.maximum,step:U.multiple_of,onChange:e=>{z(e),Z("cart-set-item-quantity",{product:c,quantity:e})},itemName:re}),Object(a.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:()=>{r(),G(),Z("cart-remove-item",{product:c,quantity:Y}),Object(o.speak)(Object(l.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(l.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),re))},disabled:X},Object(l.__)("Remove item","woo-gutenberg-products-block"))))),Object(a.createElement)("td",{className:"wc-block-cart-item__total"},Object(a.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(a.createElement)(m.a,{currency:se,format:Oe,price:me.getAmount()}),Y>1&&Object(a.createElement)(P,{currency:ae,saleAmount:R(ie,ae),format:_e}))))});const M=[...Array(3)].map((_x,e)=>Object(a.createElement)(F,{lineItem:{},key:e})),L=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(a.createRef)()}),t};t.a=e=>{let{lineItems:t=[],isLoading:c=!1,className:r}=e;const o=Object(a.useRef)(null),i=Object(a.useRef)(L(t));Object(a.useEffect)(()=>{i.current=L(t)},[t]);const s=e=>()=>{null!=i&&i.current&&e&&i.current[e].current instanceof HTMLElement?i.current[e].current.focus():o.current instanceof HTMLElement&&o.current.focus()},u=c?M:t.map((e,c)=>{const r=t.length>c+1?t[c+1].key:null;return Object(a.createElement)(F,{key:e.key,lineItem:e,onRemove:s(r),ref:i.current[e.key],tabIndex:-1})});return Object(a.createElement)("table",{className:n()("wc-block-cart-items",r),ref:o,tabIndex:-1},Object(a.createElement)("thead",null,Object(a.createElement)("tr",{className:"wc-block-cart-items__header"},Object(a.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(a.createElement)("span",null,Object(l.__)("Product","woo-gutenberg-products-block"))),Object(a.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(a.createElement)("span",null,Object(l.__)("Details","woo-gutenberg-products-block"))),Object(a.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(a.createElement)("span",null,Object(l.__)("Total","woo-gutenberg-products-block"))))),Object(a.createElement)("tbody",null,u))}},336:function(e,t,c){"use strict";var a=c(0),r=c(6),n=c(17);c(298);var l=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(a.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(r.kebabCase)(t):"";return Object(a.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(a.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},o=c(283),i=c(44),s=e=>{let{className:t,shortDescription:c="",fullDescription:r=""}=e;const n=c||r;return n?Object(a.createElement)(o.a,{className:t,source:n,maxLength:15,countType:i.n.wordCountType||"words"}):null};c(297),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:r=[],variation:n=[]}=e;return Object(a.createElement)("div",{className:"wc-block-components-product-metadata"},Object(a.createElement)(s,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(a.createElement)(l,{details:r}),Object(a.createElement)(l,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},363:function(e,t){}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/cart-line-items-frontend.js b/build/cart-blocks/cart-line-items-frontend.js
new file mode 100644
index 00000000000..2352e990367
--- /dev/null
+++ b/build/cart-blocks/cart-line-items-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{443:function(t,n,e){"use strict";e.r(n);var c=e(0),r=e(30),u=e(333);n.default=t=>{let{className:n}=t;const{cartItems:e,cartIsLoading:a}=Object(r.a)();return Object(c.createElement)(u.a,{className:n,lineItems:e,isLoading:a})}},98:function(t,n,e){"use strict";e.d(n,"a",(function(){return s}));var c=e(3),r=e(47);function u(t,n){return t===n}function a(t){return"function"==typeof t?function(){return t}:t}function s(t,n,e){var s=e&&e.equalityFn||u,o=function(t){var n=Object(c.useState)(a(t)),e=n[0],r=n[1];return[e,Object(c.useCallback)((function(t){return r(a(t))}),[])]}(t),i=o[0],f=o[1],l=Object(r.a)(Object(c.useCallback)((function(t){return f(t)}),[f]),n,e),b=Object(c.useRef)(t);return s(b.current,t)||(l(t),b.current=t),[i,l]}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/cart-order-summary-frontend.js b/build/cart-blocks/cart-order-summary-frontend.js
new file mode 100644
index 00000000000..035769e2c97
--- /dev/null
+++ b/build/cart-blocks/cart-order-summary-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{100:function(e,t,a){"use strict";var c=a(11),n=a.n(c),r=a(0),o=a(136),l=a(4),s=a.n(l);a(189);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:a,currency:c,onValueChange:l,displayType:u="text",...m}=e;const p="string"==typeof a?parseInt(a,10):a;if(!Number.isFinite(p))return null;const b=p/10**c.minorUnit;if(!Number.isFinite(b))return null;const d=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f={...m,...i(c),value:void 0,currency:void 0,onValueChange:void 0},x=l?e=>{const t=+e.value*10**c.minorUnit;l(t)}:()=>{};return Object(r.createElement)(o.a,n()({className:d,displayType:u},f,{value:b,onValueChange:x}))}},189:function(e,t){},301:function(e,t){},370:function(e,t,a){"use strict";var c=a(0),n=a(1),r=a(4),o=a.n(r),l=a(100),s=a(10),i=a(30),u=a(2);a(301),t.a=e=>{let{currency:t,values:a,className:r}=e;const m=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:b}=a,{receiveCart:d,...f}=Object(i.a)(),x=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woo-gutenberg-products-block"),extensions:f.extensions,arg:{cart:f}}),O=parseInt(b,10);return Object(c.createElement)(s.TotalsItem,{className:o()("wc-block-components-totals-footer-item",r),currency:t,label:x,value:parseInt(p,10),description:m&&0!==O&&Object(c.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(c.createInterpolateElement)(Object(n.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(c.createElement)(l.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:O})}))})}},446:function(e,t,a){"use strict";a.r(t);var c=a(0),n=a(370),r=a(37),o=a(30),l=a(10);const s=()=>{const{extensions:e,receiveCart:t,...a}=Object(o.a)(),n={extensions:e,cart:a,context:"woocommerce/cart"};return Object(c.createElement)(l.ExperimentalOrderMeta.Slot,n)};t.default=e=>{let{children:t,className:a=""}=e;const{cartTotals:l}=Object(o.a)(),i=Object(r.getCurrencyFromPriceResponse)(l);return Object(c.createElement)("div",{className:a},t,Object(c.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(c.createElement)(n.a,{currency:i,values:l})),Object(c.createElement)(s,null))}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/cart-totals-frontend.js b/build/cart-blocks/cart-totals-frontend.js
new file mode 100644
index 00000000000..0582b006f8d
--- /dev/null
+++ b/build/cart-blocks/cart-totals-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{364:function(e,c){},365:function(e,c,t){"use strict";var a=t(0),n=t(3),s=t(4),r=t.n(s);const l=Object(n.forwardRef)((e,c)=>{let{children:t,className:n=""}=e;return Object(a.createElement)("div",{ref:c,className:r()("wc-block-components-sidebar",n)},t)});c.a=l},412:function(e,c,t){"use strict";t.r(c);var a=t(0),n=t(4),s=t.n(n),r=t(365);t(364),c.default=e=>{let{children:c,className:t=""}=e;return Object(a.createElement)(r.a,{className:s()("wc-block-cart__sidebar",t)},c)}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/empty-cart-frontend.js b/build/cart-blocks/empty-cart-frontend.js
new file mode 100644
index 00000000000..c41d7e1498f
--- /dev/null
+++ b/build/cart-blocks/empty-cart-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[18],{361:function(e,c){},410:function(e,c,t){"use strict";t.r(c);var n=t(0),o=t(30),s=t(68);t(361),c.default=e=>{let{children:c,className:t}=e;const{cartItems:l,cartIsLoading:r}=Object(o.a)();return Object(n.useEffect)(()=>{Object(s.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})},[]),r||0!==l.length?null:Object(n.createElement)("div",{className:t},c)}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/filled-cart-frontend.js b/build/cart-blocks/filled-cart-frontend.js
new file mode 100644
index 00000000000..cc5d629525e
--- /dev/null
+++ b/build/cart-blocks/filled-cart-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[19],{195:function(e,t){},243:function(e,t,s){"use strict";s.d(t,"b",(function(){return l})),s.d(t,"a",(function(){return o}));var c=s(0),a=s(13),i=s(4),r=s.n(i);const n=Object(c.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(c.useContext)(n),o=e=>{let{children:t,className:s=""}=e;const[i,l]=(()=>{const[e,{width:t}]=Object(a.useResizeObserver)();let s="";return t>700?s="is-large":t>520?s="is-medium":t>400?s="is-small":t&&(s="is-mobile"),[e,s]})(),o={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(c.createElement)(n.Provider,{value:o},Object(c.createElement)("div",{className:r()(s,l)},i,t))}},246:function(e,t,s){"use strict";var c=s(0),a=s(4),i=s.n(a),r=s(243);s(195),t.a=e=>{let{children:t,className:s}=e;return Object(c.createElement)(r.a,{className:i()("wc-block-components-sidebar-layout",s)},t)}},409:function(e,t,s){"use strict";s.r(t);var c=s(0),a=s(4),i=s.n(a),r=s(246),n=s(30),l=s(17),o=s(7),m=s(142);t.default=e=>{let{children:t,className:s}=e;const{cartItems:a,cartIsLoading:u,cartItemErrors:b}=Object(n.a)(),{hasDarkControls:d}=Object(m.b)(),{createErrorNotice:h}=Object(o.useDispatch)("core/notices");return Object(c.useEffect)(()=>{b.forEach(e=>{h(Object(l.decodeEntities)(e.message),{isDismissible:!0,id:e.code})})},[h,b]),u||a.length>=1?Object(c.createElement)(r.a,{className:i()("wc-block-cart",s,{"has-dark-controls":d})},t):null}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-coupon-form-frontend.js b/build/cart-blocks/order-summary-coupon-form-frontend.js
new file mode 100644
index 00000000000..bfeba15f822
--- /dev/null
+++ b/build/cart-blocks/order-summary-coupon-form-frontend.js
@@ -0,0 +1,5 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[20],{21:function(e,t,n){"use strict";var o=n(0),c=n(4),a=n.n(c);t.a=e=>{let t,{label:n,screenReaderLabel:c,wrapperElement:r,wrapperProps:s={}}=e;const l=null!=n,i=null!=c;return!l&&i?(t=r||"span",s={...s,className:a()(s.className,"screen-reader-text")},Object(o.createElement)(t,s,c)):(t=r||o.Fragment,l&&i&&n!==c?Object(o.createElement)(t,s,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},c)):Object(o.createElement)(t,s,n))}},253:function(e,t){},254:function(e,t){},255:function(e,t,n){"use strict";var o=n(11),c=n.n(o),a=n(0),r=n(50),s=n(4),l=n.n(s),i=n(132);n(256),t.a=e=>{let{className:t,showSpinner:n=!1,children:o,variant:s="contained",...u}=e;const b=l()("wc-block-components-button",t,s,{"wc-block-components-button--loading":n});return Object(a.createElement)(r.a,c()({className:b},u),n&&Object(a.createElement)(i.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},o))}},256:function(e,t){},264:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(1),c=n(7),a=n(5),r=n(17),s=n(30),l=n(0),i=n(242);const u=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:o}=Object(i.b)(),c=Object(l.useRef)(e);Object(l.useEffect)(()=>{c.current=e},[e]);const a=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...a,...r,setIsSuppressed:o}};var b=n(191);const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:n}=Object(s.a)(),{createErrorNotice:l}=Object(c.useDispatch)("core/notices"),{addSnackbarNotice:i}=u(),{setValidationErrors:p}=Object(b.b)(),d=Object(c.useSelect)((t,n)=>{let{dispatch:c}=n;const s=t(a.CART_STORE_KEY),u=s.isApplyingCoupon(),b=s.isRemovingCoupon(),{applyCoupon:d,removeCoupon:m,receiveApplyingCoupon:O}=c(a.CART_STORE_KEY);return{applyCoupon:e=>{d(e).then(t=>{!0===t&&i(Object(o.sprintf)(
+/* translators: %s coupon code. */
+Object(o.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{p({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),O("")})},removeCoupon:t=>{m(t).then(e=>{!0===e&&i(Object(o.sprintf)(
+/* translators: %s coupon code. */
+Object(o.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{l(t.message,{id:"coupon-form",context:e}),O("")})},isApplyingCoupon:u,isRemovingCoupon:b}},[l,i]);return{appliedCoupons:t,isLoading:n,...d}}},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(0),c=n(191);n(253);const a=e=>{let{errorMessage:t="",propertyName:n="",elementId:a=""}=e;const{getValidationError:r,getValidationErrorId:s}=Object(c.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(o.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(o.createElement)("p",{id:s(a)},t))}},289:function(e,t,n){"use strict";var o=n(11),c=n.n(o),a=n(0),r=n(1),s=n(3),l=n(4),i=n.n(l),u=n(191),b=n(265),p=n(13),d=n(59),m=n(21);n(254);var O=Object(s.forwardRef)((e,t)=>{let{className:n,id:o,type:r="text",ariaLabel:s,ariaDescribedBy:l,label:u,screenReaderLabel:b,disabled:p,help:d,autoCapitalize:O="off",autoComplete:j="off",value:g="",onChange:f,required:E=!1,onBlur:v=(()=>{}),feedback:h,...w}=e;const[_,k]=Object(a.useState)(!1);return Object(a.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":_||g})},Object(a.createElement)("input",c()({type:r,id:o,value:g,ref:t,autoCapitalize:O,autoComplete:j,onChange:e=>{f(e.target.value)},onFocus:()=>k(!0),onBlur:e=>{v(e.target.value),k(!1)},"aria-label":s||u,disabled:p,"aria-describedby":d&&!l?o+"__help":l,required:E},w)),Object(a.createElement)(m.a,{label:u,screenReaderLabel:b||u,wrapperElement:"label",wrapperProps:{htmlFor:o},htmlFor:o}),!!d&&Object(a.createElement)("p",{id:o+"__help",className:"wc-block-components-text-input__help"},d),h)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:n,id:o,ariaDescribedBy:l,errorId:p,focusOnMount:m=!1,onChange:j,showError:g=!0,errorMessage:f="",value:E="",...v}=e;const[h,w]=Object(s.useState)(!0),_=Object(s.useRef)(null),{getValidationError:k,hideValidationError:C,setValidationErrors:N,clearValidationError:y,getValidationErrorId:S}=Object(u.b)(),I=void 0!==o?o:"textinput-"+n,R=void 0!==p?p:I,L=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=_.current||null;if(!t)return;t.value=t.value.trim();const n=t.checkValidity();n?y(R):N({[R]:{message:t.validationMessage||Object(r.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[y,R,N]);Object(s.useEffect)(()=>{var e;h&&m&&(null===(e=_.current)||void 0===e||e.focus()),w(!1)},[m,h,w]),Object(s.useEffect)(()=>{var e,t;(null===(e=_.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==_.current&&L(!0)},[E,L]),Object(s.useEffect)(()=>()=>{y(R)},[y,R]);const V=k(R)||{};Object(d.a)(f)&&""!==f&&(V.message=f);const B=V.message&&!V.hidden,A=g&&B&&S(R)?S(R):l;return Object(a.createElement)(O,c()({className:i()(t,{"has-error":B}),"aria-invalid":!0===B,id:I,onBlur:()=>{L(!1)},feedback:g&&Object(a.createElement)(b.a,{errorMessage:f,propertyName:R}),ref:_,onChange:e=>{C(R),j(e)},ariaDescribedBy:A,value:E},v))})},303:function(e,t){},372:function(e,t,n){"use strict";var o=n(0),c=n(1),a=n(255),r=n(289),s=n(21),l=n(134),i=n(13),u=n(191),b=n(265),p=n(10);n(303),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:n=!1,initialOpen:i=!1,onSubmit:d=(()=>{})}=e;const[m,O]=Object(o.useState)(""),j=Object(o.useRef)(!1),{getValidationError:g,getValidationErrorId:f}=Object(u.b)(),E=g("coupon");Object(o.useEffect)(()=>{j.current!==n&&(n||!m||E||O(""),j.current=n)},[n,m,E]);const v="wc-block-components-totals-coupon__input-"+t;return Object(o.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(o.createElement)(s.a,{label:Object(c.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:v})},Object(o.createElement)(l.a,{screenReaderLabel:Object(c.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:n,showSpinner:!1},Object(o.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(o.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(o.createElement)(r.a,{id:v,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(c.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:f(v),onChange:e=>{O(e)},focusOnMount:!0,showError:!1}),Object(o.createElement)(a.a,{className:"wc-block-components-totals-coupon__button",disabled:n||!m,showSpinner:n,onClick:e=>{e.preventDefault(),d(m)},type:"submit"},Object(c.__)("Apply","woo-gutenberg-products-block"))),Object(o.createElement)(b.a,{propertyName:"coupon",elementId:v}))))})},450:function(e,t,n){"use strict";n.r(t);var o=n(0),c=n(372),a=n(264),r=n(2),s=n(10);t.default=e=>{let{className:t}=e;const n=Object(r.getSetting)("couponsEnabled",!0),{applyCoupon:l,isApplyingCoupon:i}=Object(a.a)("wc/cart");return n?Object(o.createElement)(s.TotalsWrapper,{className:t},Object(o.createElement)(c.a,{onSubmit:l,isLoading:i})):null}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-discount-frontend.js b/build/cart-blocks/order-summary-discount-frontend.js
new file mode 100644
index 00000000000..eea05415535
--- /dev/null
+++ b/build/cart-blocks/order-summary-discount-frontend.js
@@ -0,0 +1,13 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[21],{103:function(e,t,o){"use strict";var c=o(0);t.a=function(e){let{icon:t,size:o=24,...n}=e;return Object(c.cloneElement)(t,{width:o,height:o,...n})}},119:function(e,t){},193:function(e,t,o){"use strict";var c=o(0),n=o(14);const s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},197:function(e,t,o){"use strict";var c=o(11),n=o.n(c),s=o(0),r=o(4),a=o.n(r),l=o(1),i=o(103),u=o(193);o(119);var p=e=>{let{text:t,screenReaderText:o="",element:c="li",className:r="",radius:l="small",children:i=null,...u}=e;const p=c,b=a()(r,"wc-block-components-chip","wc-block-components-chip--radius-"+l),m=Boolean(o&&o!==t);return Object(s.createElement)(p,n()({className:b},u),Object(s.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(s.createElement)("span",{className:"screen-reader-text"},o),i)};t.a=e=>{let{ariaLabel:t="",className:o="",disabled:c=!1,onRemove:r=(()=>{}),removeOnAnyClick:b=!1,text:m,screenReaderText:d="",...O}=e;const g=b?"span":"button";if(!t){const e=d&&"string"==typeof d?d:m;t="string"!=typeof e?
+/* translators: Remove chip. */
+Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(
+/* translators: %s text of the chip to remove. */
+Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:c,onClick:r,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||r()}},v=b?j:{},_=b?{"aria-hidden":!0}:j;return Object(s.createElement)(p,n()({},O,v,{className:a()(o,"is-removable"),element:b?"button":O.element,screenReaderText:d,text:m}),Object(s.createElement)(g,n()({className:"wc-block-components-chip__remove"},_),Object(s.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},264:function(e,t,o){"use strict";o.d(t,"a",(function(){return b}));var c=o(1),n=o(7),s=o(5),r=o(17),a=o(30),l=o(0),i=o(242);const u=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:o,setIsSuppressed:c}=Object(i.b)(),n=Object(l.useRef)(e);Object(l.useEffect)(()=>{n.current=e},[e]);const s=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;n.current.forEach(t=>{null!==e&&t.status!==e||o(t.id)})},removeSnackbarNotice:o}),[o]),r=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,o)}}),[t]);return{notices:e,...s,...r,setIsSuppressed:c}};var p=o(191);const b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:o}=Object(a.a)(),{createErrorNotice:l}=Object(n.useDispatch)("core/notices"),{addSnackbarNotice:i}=u(),{setValidationErrors:b}=Object(p.b)(),m=Object(n.useSelect)((t,o)=>{let{dispatch:n}=o;const a=t(s.CART_STORE_KEY),u=a.isApplyingCoupon(),p=a.isRemovingCoupon(),{applyCoupon:m,removeCoupon:d,receiveApplyingCoupon:O}=n(s.CART_STORE_KEY);return{applyCoupon:e=>{m(e).then(t=>{!0===t&&i(Object(c.sprintf)(
+/* translators: %s coupon code. */
+Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),O("")})},removeCoupon:t=>{d(t).then(e=>{!0===e&&i(Object(c.sprintf)(
+/* translators: %s coupon code. */
+Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{l(t.message,{id:"coupon-form",context:e}),O("")})},isApplyingCoupon:u,isRemovingCoupon:p}},[l,i]);return{appliedCoupons:t,isLoading:o,...m}}},302:function(e,t){},371:function(e,t,o){"use strict";var c=o(0),n=o(1),s=o(134),r=o(197),a=o(10),l=o(2);o(302);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:o,isRemovingCoupon:u,removeCoupon:p,values:b}=e;const{total_discount:m,total_discount_tax:d}=b,O=parseInt(m,10);if(!O&&0===t.length)return null;const g=parseInt(d,10),j=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?O+g:O,v=Object(a.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(c.createElement)(a.TotalsItem,{className:"wc-block-components-totals-discount",currency:o,description:0!==v.length&&Object(c.createElement)(s.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(c.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},v.map(e=>Object(c.createElement)(r.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(
+/* translators: %s Coupon code. */
+Object(n.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{p(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(
+/* translators: %s is a coupon code. */
+Object(n.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:j?Object(n.__)("Discount","woo-gutenberg-products-block"):Object(n.__)("Coupons","woo-gutenberg-products-block"),value:j?-1*j:"-"})}},449:function(e,t,o){"use strict";o.r(t);var c=o(0),n=o(371),s=o(37),r=o(30),a=o(264),l=o(10);const i=()=>{const{extensions:e,receiveCart:t,...o}=Object(r.a)(),n={extensions:e,cart:o,context:"woocommerce/cart"};return Object(c.createElement)(l.ExperimentalDiscountsMeta.Slot,n)};t.default=e=>{let{className:t}=e;const{cartTotals:o,cartCoupons:u}=Object(r.a)(),{removeCoupon:p,isRemovingCoupon:b}=Object(a.a)("wc/cart"),m=Object(s.getCurrencyFromPriceResponse)(o);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.TotalsWrapper,{className:t},Object(c.createElement)(n.a,{cartCoupons:u,currency:m,isRemovingCoupon:b,removeCoupon:p,values:o})),Object(c.createElement)(i,null))}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-fee-frontend.js b/build/cart-blocks/order-summary-fee-frontend.js
new file mode 100644
index 00000000000..157e9f9b63b
--- /dev/null
+++ b/build/cart-blocks/order-summary-fee-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[22],{448:function(e,c,t){"use strict";t.r(c);var s=t(0),a=t(10),r=t(37),n=t(30);c.default=e=>{let{className:c}=e;const{cartFees:t,cartTotals:o}=Object(n.a)(),l=Object(r.getCurrencyFromPriceResponse)(o);return Object(s.createElement)(a.TotalsWrapper,{className:c},Object(s.createElement)(a.TotalsFees,{currency:l,cartFees:t}))}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-heading-frontend.js b/build/cart-blocks/order-summary-heading-frontend.js
new file mode 100644
index 00000000000..3c1aeb48494
--- /dev/null
+++ b/build/cart-blocks/order-summary-heading-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[23],{257:function(e,t,c){"use strict";var n=c(11),o=c.n(n),a=c(0),l=c(4),s=c.n(l);c(258),t.a=e=>{let{children:t,className:c,headingLevel:n,...l}=e;const r=s()("wc-block-components-title",c),i="h"+n;return Object(a.createElement)(i,o()({className:r},l),t)}},258:function(e,t){},433:function(e,t,c){"use strict";c.r(t);var n=c(117),o=c(0),a=c(257),l=c(4),s=c.n(l),r=c(1),i={content:{type:"string",default:Object(r.__)("Cart totals","woo-gutenberg-products-block")},lock:{type:"object",default:{remove:!1,move:!1}}};t.default=Object(n.withFilteredAttributes)(i)(e=>{let{className:t,content:c=""}=e;return Object(o.createElement)(a.a,{headingLevel:"2",className:s()(t,"wc-block-cart__totals-title")},c)})}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend.js b/build/cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend.js
new file mode 100644
index 00000000000..3bd9edef7b2
--- /dev/null
+++ b/build/cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend.js
@@ -0,0 +1,11 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5],{100:function(e,t,n){"use strict";var a=n(11),c=n.n(a),o=n(0),s=n(136),r=n(4),l=n.n(r);n(189);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:a,onValueChange:r,displayType:p="text",...u}=e;const d="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(d))return null;const b=d/10**a.minorUnit;if(!Number.isFinite(b))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...u,...i(a),value:void 0,currency:void 0,onValueChange:void 0},O=r?e=>{const t=+e.value*10**a.minorUnit;r(t)}:()=>{};return Object(o.createElement)(s.a,c()({className:m,displayType:p},g,{value:b,onValueChange:O}))}},189:function(e,t){},21:function(e,t,n){"use strict";var a=n(0),c=n(4),o=n.n(c);t.a=e=>{let t,{label:n,screenReaderLabel:c,wrapperElement:s,wrapperProps:r={}}=e;const l=null!=n,i=null!=c;return!l&&i?(t=s||"span",r={...r,className:o()(r.className,"screen-reader-text")},Object(a.createElement)(t,r,c)):(t=s||a.Fragment,l&&i&&n!==c?Object(a.createElement)(t,r,Object(a.createElement)("span",{"aria-hidden":"true"},n),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,r,n))}},253:function(e,t){},254:function(e,t){},255:function(e,t,n){"use strict";var a=n(11),c=n.n(a),o=n(0),s=n(50),r=n(4),l=n.n(r),i=n(132);n(256),t.a=e=>{let{className:t,showSpinner:n=!1,children:a,variant:r="contained",...p}=e;const u=l()("wc-block-components-button",t,r,{"wc-block-components-button--loading":n});return Object(o.createElement)(s.a,c()({className:u},p),n&&Object(o.createElement)(i.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},a))}},256:function(e,t){},259:function(e,t,n){"use strict";var a=n(0),c=n(4),o=n.n(c),s=n(260);t.a=e=>{let{checked:t,name:n,onChange:c,option:r}=e;const{value:l,label:i,description:p,secondaryLabel:u,secondaryDescription:d}=r;return Object(a.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${l}`},Object(a.createElement)("input",{id:`${n}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:l,onChange:e=>c(e.target.value),checked:t,"aria-describedby":o()({[`${n}-${l}__label`]:i,[`${n}-${l}__secondary-label`]:u,[`${n}-${l}__description`]:p,[`${n}-${l}__secondary-description`]:d})}),Object(a.createElement)(s.a,{id:`${n}-${l}`,label:i,secondaryLabel:u,description:p,secondaryDescription:d}))}},260:function(e,t,n){"use strict";var a=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:c,secondaryDescription:o,id:s}=e;return Object(a.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(a.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(a.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(a.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(a.createElement)("div",{className:"wc-block-components-radio-control__description-group"},c&&Object(a.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},c),o&&Object(a.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0),c=n(191);n(253);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(c.b)();if(!t||"string"!=typeof t){const e=s(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(a.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(a.createElement)("p",{id:r(o)},t))}},281:function(e,t,n){"use strict";var a=n(0),c=n(4),o=n.n(c),s=n(13),r=n(259);n(282);const l=e=>{let{className:t="",id:n,selected:c,onChange:i=(()=>{}),options:p=[]}=e;const u=Object(s.useInstanceId)(l),d=n||u;return p.length?Object(a.createElement)("div",{className:o()("wc-block-components-radio-control",t)},p.map(e=>Object(a.createElement)(r.a,{key:`${d}-${e.value}`,name:"radio-control-"+d,checked:e.value===c,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},282:function(e,t){},289:function(e,t,n){"use strict";var a=n(11),c=n.n(a),o=n(0),s=n(1),r=n(3),l=n(4),i=n.n(l),p=n(191),u=n(265),d=n(13),b=n(59),m=n(21);n(254);var g=Object(r.forwardRef)((e,t)=>{let{className:n,id:a,type:s="text",ariaLabel:r,ariaDescribedBy:l,label:p,screenReaderLabel:u,disabled:d,help:b,autoCapitalize:g="off",autoComplete:O="off",value:h="",onChange:j,required:f=!1,onBlur:E=(()=>{}),feedback:k,..._}=e;const[v,y]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":v||h})},Object(o.createElement)("input",c()({type:s,id:a,value:h,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{j(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{E(e.target.value),y(!1)},"aria-label":r||p,disabled:d,"aria-describedby":b&&!l?a+"__help":l,required:f},_)),Object(o.createElement)(m.a,{label:p,screenReaderLabel:u||p,wrapperElement:"label",wrapperProps:{htmlFor:a},htmlFor:a}),!!b&&Object(o.createElement)("p",{id:a+"__help",className:"wc-block-components-text-input__help"},b),k)});t.a=Object(d.withInstanceId)(e=>{let{className:t,instanceId:n,id:a,ariaDescribedBy:l,errorId:d,focusOnMount:m=!1,onChange:O,showError:h=!0,errorMessage:j="",value:f="",...E}=e;const[k,_]=Object(r.useState)(!0),v=Object(r.useRef)(null),{getValidationError:y,hideValidationError:w,setValidationErrors:C,clearValidationError:N,getValidationErrorId:S}=Object(p.b)(),I=void 0!==a?a:"textinput-"+n,R=void 0!==d?d:I,x=Object(r.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const n=t.checkValidity();n?N(R):C({[R]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[N,R,C]);Object(r.useEffect)(()=>{var e;k&&m&&(null===(e=v.current)||void 0===e||e.focus()),_(!1)},[m,k,_]),Object(r.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&x(!0)},[f,x]),Object(r.useEffect)(()=>()=>{N(R)},[N,R]);const L=y(R)||{};Object(b.a)(j)&&""!==j&&(L.message=j);const M=L.message&&!L.hidden,$=h&&M&&S(R)?S(R):l;return Object(o.createElement)(g,c()({className:i()(t,{"has-error":M}),"aria-invalid":!0===M,id:I,onBlur:()=>{x(!1)},feedback:h&&Object(o.createElement)(u.a,{errorMessage:j,propertyName:R}),ref:v,onChange:e=>{w(R),O(e)},ariaDescribedBy:$,value:f},E))})},304:function(e,t){},305:function(e,t){},306:function(e,t){},307:function(e,t){},328:function(e,t){},334:function(e,t,n){"use strict";var a=n(0),c=n(1),o=n(19),s=n(134),r=n(10),l=n(377),i=n(30),p=n(25),u=n(4),d=n.n(u),b=n(17),m=n(21),g=n(67),O=n(281),h=n(260),j=n(37),f=n(100),E=n(2);const k=e=>{const t=Object(E.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(a.createElement)(a.Fragment,null,Number.isFinite(t)&&Object(a.createElement)(f.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var _=e=>{let{className:t="",noResultsMessage:n,onSelectRate:c,rates:o,renderOption:s=k,selectedRate:r}=e;const l=(null==r?void 0:r.rate_id)||"",[i,p]=Object(a.useState)(l);if(Object(a.useEffect)(()=>{l&&p(l)},[l]),0===o.length)return n;if(o.length>1)return Object(a.createElement)(O.a,{className:t,onChange:e=>{p(e),c(e)},selected:i,options:o.map(s)});const{label:u,secondaryLabel:d,description:b,secondaryDescription:m}=s(o[0]);return Object(a.createElement)(h.a,{label:u,secondaryLabel:d,description:b,secondaryDescription:m})};n(307);var v=e=>{let{packageId:t,className:n="",noResultsMessage:o,renderOption:s,packageData:l,collapsible:i=!1,collapse:p=!1,showItems:u=!1}=e;const{selectShippingRate:O}=Object(g.a)(),h=Object(a.createElement)(a.Fragment,null,(u||i)&&Object(a.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),u&&Object(a.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(b.decodeEntities)(e.name),n=e.quantity;return Object(a.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(a.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(c.sprintf)(
+/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
+Object(c._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),j=Object(a.createElement)(_,{className:n,noResultsMessage:o,rates:l.shipping_rates,onSelectRate:e=>O(e,t),selectedRate:l.shipping_rates.find(e=>e.selected),renderOption:s});return i?Object(a.createElement)(r.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:h},j):Object(a.createElement)("div",{className:d()("wc-block-components-shipping-rates-control__package",n)},h,j)};const y=e=>{let{packages:t,collapse:n,showItems:c,collapsible:o,noResultsMessage:s,renderOption:r}=e;return t.length?Object(a.createElement)(a.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(a.createElement)(v,{key:t,packageId:t,packageData:l,collapsible:o,collapse:n,showItems:c,noResultsMessage:s,renderOption:r})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:n,className:u,collapsible:d=!1,noResultsMessage:b,renderOption:m,context:g}=e;Object(a.useEffect)(()=>{if(n)return;const e=Object(l.a)(t),a=Object(l.b)(t);1===e?Object(o.speak)(Object(c.sprintf)(
+/* translators: %d number of shipping options found. */
+Object(c._n)("%d shipping option was found.","%d shipping options were found.",a,"woo-gutenberg-products-block"),a)):Object(o.speak)(Object(c.sprintf)(
+/* translators: %d number of shipping packages packages. */
+Object(c._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(c.sprintf)(
+/* translators: %d number of shipping options available. */
+Object(c._n)("%d shipping option was found","%d shipping options were found",a,"woo-gutenberg-products-block"),a))},[n,t]);const{extensions:O,receiveCart:h,...j}=Object(i.a)(),f={className:u,collapsible:d,noResultsMessage:b,renderOption:m,extensions:O,cart:j,components:{ShippingRatesControlPackage:v},context:g},{isEditor:E}=Object(p.a)();return Object(a.createElement)(s.a,{isLoading:n,screenReaderLabel:Object(c.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(a.createElement)(y,{packages:t,noResultsMessage:b,renderOption:m}):Object(a.createElement)(a.Fragment,null,Object(a.createElement)(r.ExperimentalOrderShippingPackages.Slot,f),Object(a.createElement)(r.ExperimentalOrderShippingPackages,null,Object(a.createElement)(y,{packages:t,noResultsMessage:b,renderOption:m}))))}},373:function(e,t){},377:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));const a=e=>e.length,c=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},390:function(e,t,n){"use strict";var a=n(0),c=n(289),o=n(11),s=n.n(o),r=n(44),l=n(1),i=n(17),p=n(4),u=n.n(p),d=n(13),b=n(427),m=n(191),g=n(265),O=n(61);n(305);var h=Object(d.withInstanceId)(e=>{let{id:t,className:n,label:c,onChange:o,options:s,value:r,required:i=!1,errorMessage:p=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:d,instanceId:h="0",autoComplete:j="off"}=e;const{getValidationError:f,setValidationErrors:E,clearValidationError:k}=Object(m.b)(),_=Object(a.useRef)(null),v=t||"control-"+h,y=d||v,w=f(y)||{message:"",hidden:!1};return Object(a.useEffect)(()=>(!i||r?k(y):E({[y]:{message:p,hidden:!0}}),()=>{k(y)}),[k,r,y,p,i,E]),Object(a.createElement)("div",{id:v,className:u()("wc-block-components-combobox",n,{"is-active":r,"has-error":w.message&&!w.hidden}),ref:_},Object(a.createElement)(b.a,{className:"wc-block-components-combobox-control",label:c,onChange:o,onFilterValueChange:e=>{if(e.length){const t=Object(O.a)(_.current)?_.current.ownerDocument.activeElement:void 0;if(t&&Object(O.a)(_.current)&&_.current.contains(t))return;const n=e.toLocaleUpperCase(),a=s.find(e=>e.label.toLocaleUpperCase().startsWith(n)||e.value.toLocaleUpperCase()===n);a&&o(a.value)}},options:s,value:r||"",allowReset:!1,autoComplete:j,"aria-invalid":w.message&&!w.hidden}),Object(a.createElement)(g.a,{propertyName:y}))});n(304);var j=e=>{let{className:t,countries:n,id:c,label:o,onChange:s,value:r="",autoComplete:p="off",required:d=!1,errorId:b,errorMessage:m=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(a.useMemo)(()=>Object.entries(n).map(e=>{let[t,n]=e;return{value:t,label:Object(i.decodeEntities)(n)}}),[n]);return Object(a.createElement)("div",{className:u()(t,"wc-block-components-country-input")},Object(a.createElement)(h,{id:c,label:o,onChange:s,options:g,value:r,errorId:b,errorMessage:m,required:d,autoComplete:p}),"off"!==p&&Object(a.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:r,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),n=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);s(n?n.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},f=e=>Object(a.createElement)(j,s()({countries:r.g},e)),E=e=>Object(a.createElement)(j,s()({countries:r.a},e));n(306);const k=(e,t)=>{const n=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return n?n.value:""};var _=e=>{let{className:t,id:n,states:o,country:s,label:r,onChange:p,autoComplete:d="off",value:b="",required:m=!1}=e;const g=o[s],O=Object(a.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),j=Object(a.useCallback)(e=>{p(O.length>0?k(e,O):e)},[p,O]),f=Object(a.useRef)(b);return Object(a.useEffect)(()=>{f.current!==b&&(f.current=b)},[b]),Object(a.useEffect)(()=>{if(O.length>0&&f.current){const e=k(f.current,O);e!==f.current&&j(e)}},[O,j]),O.length>0?Object(a.createElement)(a.Fragment,null,Object(a.createElement)(h,{className:u()(t,"wc-block-components-state-input"),id:n,label:r,onChange:j,options:O,value:b,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:d}),"off"!==d&&Object(a.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:d,value:b,onChange:e=>j(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(a.createElement)(c.a,{className:t,id:n,label:r,onChange:j,autoComplete:d,value:b,required:m})},v=e=>Object(a.createElement)(_,s()({states:r.h},e)),y=e=>Object(a.createElement)(_,s()({states:r.b},e)),w=n(29),C=n(2),N=n(45);t.a=Object(d.withInstanceId)(e=>{let{id:t="",fields:n=Object.keys(C.defaultAddressFields),fieldConfig:o={},instanceId:s,onChange:r,type:i="shipping",values:p}=e;const{getValidationError:u,setValidationErrors:d,clearValidationError:b}=Object(m.b)(),g=Object(w.a)(n),O=u("shipping-missing-country")||{},h=Object(a.useMemo)(()=>Object(N.a)(g,o,p.country),[g,o,p.country]);return Object(a.useEffect)(()=>{h.forEach(e=>{e.hidden&&p[e.key]&&r({...p,[e.key]:""})})},[h,r,p]),Object(a.useEffect)(()=>{"shipping"===i&&((e,t,n,a)=>{a||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),a&&e.country&&n("shipping-missing-country")})(p,d,b,!!O.message&&!O.hidden)},[p,O.message,O.hidden,d,b,i]),t=t||s,Object(a.createElement)("div",{id:t,className:"wc-block-components-address-form"},h.map(e=>{if(e.hidden)return null;if("country"===e.key){const n="shipping"===i?f:E;return Object(a.createElement)(n,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:p.country,autoComplete:e.autocomplete,onChange:e=>r({...p,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const n="shipping"===i?v:y;return Object(a.createElement)(n,{key:e.key,id:`${t}-${e.key}`,country:p.country,label:e.required?e.label:e.optionalLabel,value:p.state,autoComplete:e.autocomplete,onChange:e=>r({...p,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(a.createElement)(c.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:p[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>r({...p,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},426:function(e,t,n){"use strict";var a=n(11),c=n.n(a),o=n(0),s=n(4),r=n.n(s),l=n(1),i=n(30),p=n(10),u=n(2),d=n(17);const b=e=>{let{selectedShippingRates:t}=e;return Object(o.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(d.decodeEntities)(t.join(", ")))};var m=n(94),g=n(334),O=e=>{let{hasRates:t,shippingRates:n,isLoadingRates:a}=e;const c=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},c),Object(o.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(o.createElement)(m.a,{isDismissible:!1,className:r()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:n,isLoadingRates:a,context:"woocommerce/cart"}))},h=n(65),j=n(255),f=n(12),E=n.n(f),k=n(191),_=(n(328),n(390)),v=e=>{let{address:t,onUpdate:n,addressFields:a}=e;const[c,s]=Object(o.useState)(t),{hasValidationErrors:r,showAllValidationErrors:i}=Object(k.b)();return Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(_.a,{fields:a,onChange:s,values:c}),Object(o.createElement)(j.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:E()(c,t),onClick:e=>{if(e.preventDefault(),i(),!r)return n(c)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},y=e=>{let{onUpdate:t=(()=>{}),addressFields:n=["country","state","city","postcode"]}=e;const{shippingAddress:a,setShippingAddress:c}=Object(h.a)();return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(v,{address:a,addressFields:n,onUpdate:e=>{c(e),t(e)}}))},w=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const n=Object(u.getSetting)("shippingCountries",{}),a=Object(u.getSetting)("shippingStates",{}),c="string"==typeof n[t.country]?Object(d.decodeEntities)(n[t.country]):"",s="object"==typeof a[t.country]&&"string"==typeof a[t.country][t.state]?Object(d.decodeEntities)(a[t.country][t.state]):t.state,r=[];r.push(t.postcode.toUpperCase()),r.push(t.city),r.push(s),r.push(c);const i=r.filter(Boolean).join(", ");return i?Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)(
+/* translators: %s location. */
+Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};n(373);const C=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:a}=e;return Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{a(!n)},"aria-expanded":n},t)},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:a,shippingAddress:c}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{address:c}),t&&Object(o.createElement)(C,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:a}))},S=e=>{let{showCalculator:t,isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:a,isCheckout:c=!1}=e;return t?Object(o.createElement)(C,{isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:a}):Object(o.createElement)("em",null,c?Object(l.__)("No shipping options available","woo-gutenberg-products-block"):Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:n,showCalculator:a=!0,showRateSelector:s=!0,isCheckout:d=!1,className:m}=e;const[g,h]=Object(o.useState)(!1),{shippingAddress:j,cartHasCalculatedShipping:f,shippingRates:E,isLoadingRates:k}=Object(i.a)(),_=Object(u.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),v=E.some(e=>e.shipping_rates.length)||_,w={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:h},C=E.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(o.createElement)("div",{className:r()("wc-block-components-totals-shipping",m)},Object(o.createElement)(p.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:v&&f?_:Object(o.createElement)(S,c()({showCalculator:a,isCheckout:d},w)),description:v&&f?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(b,{selectedShippingRates:C}),Object(o.createElement)(N,c()({shippingAddress:j,showCalculator:a},w))):null,currency:t}),a&&g&&Object(o.createElement)(y,{onUpdate:()=>{h(!1)}}),s&&f&&Object(o.createElement)(O,{hasRates:v,shippingRates:E,isLoadingRates:k}))}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-shipping-frontend.js b/build/cart-blocks/order-summary-shipping-frontend.js
new file mode 100644
index 00000000000..2979f413b36
--- /dev/null
+++ b/build/cart-blocks/order-summary-shipping-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{434:function(e,t,a){"use strict";a.r(t);var c=a(117),l=a(0),r=a(426),o=a(37),n=a(30),s=a(10),i=a(2),p={isShippingCalculatorEnabled:{type:"boolean",default:Object(i.getSetting)("isShippingCalculatorEnabled",!0)},lock:{type:"object",default:{move:!1,remove:!0}}};t.default=Object(c.withFilteredAttributes)(p)(e=>{let{className:t,isShippingCalculatorEnabled:a}=e;const{cartTotals:c,cartNeedsShipping:i}=Object(n.a)();if(!i)return null;const p=Object(o.getCurrencyFromPriceResponse)(c);return Object(l.createElement)(s.TotalsWrapper,{className:t},Object(l.createElement)(r.a,{showCalculator:a,showRateSelector:!0,values:c,currency:p}))})}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-subtotal-frontend.js b/build/cart-blocks/order-summary-subtotal-frontend.js
new file mode 100644
index 00000000000..630384e4983
--- /dev/null
+++ b/build/cart-blocks/order-summary-subtotal-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{447:function(e,c,t){"use strict";t.r(c);var a=t(0),s=t(10),r=t(37),n=t(30);c.default=e=>{let{className:c=""}=e;const{cartTotals:t}=Object(n.a)(),o=Object(r.getCurrencyFromPriceResponse)(t);return Object(a.createElement)(s.TotalsWrapper,{className:c},Object(a.createElement)(s.Subtotal,{currency:o,values:t}))}}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/order-summary-taxes-frontend.js b/build/cart-blocks/order-summary-taxes-frontend.js
new file mode 100644
index 00000000000..32118388989
--- /dev/null
+++ b/build/cart-blocks/order-summary-taxes-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{435:function(e,t,a){"use strict";a.r(t);var c=a(117),r=a(0),s=a(10),l=a(37),n=a(30),o=a(2),i={showRateAfterTaxName:{type:"boolean",default:Object(o.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!1}}};t.default=Object(c.withFilteredAttributes)(i)(e=>{let{className:t,showRateAfterTaxName:a}=e;const{cartTotals:c}=Object(n.a)();if(Object(o.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(c.total_tax,10)<=0)return null;const i=Object(l.getCurrencyFromPriceResponse)(c);return Object(r.createElement)(s.TotalsWrapper,{className:t},Object(r.createElement)(s.TotalsTaxes,{showRateAfterTaxName:a,currency:i,values:c}))})}}]);
\ No newline at end of file
diff --git a/build/cart-blocks/proceed-to-checkout-frontend.js b/build/cart-blocks/proceed-to-checkout-frontend.js
new file mode 100644
index 00000000000..36675975440
--- /dev/null
+++ b/build/cart-blocks/proceed-to-checkout-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{255:function(e,t,c){"use strict";var n=c(11),o=c.n(n),s=c(0),r=c(50),a=c(4),i=c.n(a),u=c(132);c(256),t.a=e=>{let{className:t,showSpinner:c=!1,children:n,variant:a="contained",...b}=e;const l=i()("wc-block-components-button",t,a,{"wc-block-components-button--loading":c});return Object(s.createElement)(r.a,o()({className:l},b),c&&Object(s.createElement)(u.a,null),Object(s.createElement)("span",{className:"wc-block-components-button__text"},n))}},256:function(e,t){},366:function(e,t,c){"use strict";(function(e){var n=c(0),o=c(1),s=c(4),r=c.n(s),a=c(255),i=c(44),u=c(34),b=c(413),l=c(2);c(368),t.a=t=>{let{checkoutPageId:c,className:s}=t;const d=Object(l.getSetting)("page-"+c,!1),{isCalculating:m}=Object(u.b)(),[f,w]=Object(b.a)(),[p,v]=Object(n.useState)(!1);Object(n.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{v(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const j=Object(n.createElement)(a.a,{className:"wc-block-cart__submit-button",href:d||i.d,disabled:m,onClick:()=>v(!0),showSpinner:p},Object(o.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(n.createElement)("div",{className:r()("wc-block-cart__submit",s)},f,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===w&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(367))},367:function(e,t){var c;c=function(){return this}();try{c=c||new Function("return this")()}catch(e){"object"==typeof window&&(c=window)}e.exports=c},368:function(e,t){},413:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(0);const o={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},s=()=>{const[e,t]=Object(n.useState)(""),c=Object(n.useRef)(null),s=Object(n.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));return Object(n.useLayoutEffect)(()=>{const e=c.current,t=s.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]),[Object(n.createElement)("div",{"aria-hidden":!0,ref:c,style:o}),e]}},444:function(e,t,c){"use strict";c.r(t);var n=c(117),o=c(366);t.default=Object(n.withFilteredAttributes)({checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}}})(o.a)}}]);
\ No newline at end of file
diff --git a/build/cart-frontend.asset.php b/build/cart-frontend.asset.php
new file mode 100644
index 00000000000..9860936964b
--- /dev/null
+++ b/build/cart-frontend.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '993b0de2407378d8b6f693f05c836d95');
\ No newline at end of file
diff --git a/build/cart-frontend.js b/build/cart-frontend.js
new file mode 100644
index 00000000000..c482cac2663
--- /dev/null
+++ b/build/cart-frontend.js
@@ -0,0 +1,6 @@
+!function(e){function t(t){for(var r,o,a=t[0],s=t[1],i=0,l=[];i{let{imageUrl:t=c.l+"/block-error.svg",header:r=Object(i.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(i.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:s=Object(i.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(a.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(a.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(a.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(a.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(a.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(a.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",o),l&&Object(a.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(33);class u extends s.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:s,renderError:i,button:c}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof i?i({errorMessage:u}):Object(a.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:s,button:c}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.a11y},,,,function(e,t,r){"use strict";(function(e){var n=r(0);r(38);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(63))},function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0);r(7);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),a=()=>Object(n.useContext)(o)},function(e,t){e.exports=window.wp.url},,function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return d}));var n=r(61);let o,a;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(a||(a={}));const s=(e,t)=>Object(n.a)(e)&&"type"in e&&e.type===t,i=e=>s(e,o.SUCCESS),c=e=>s(e,o.ERROR),l=e=>s(e,o.FAIL),u=e=>!Object(n.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:a,shouldRetry:u,isSuccessResponse:i,isErrorResponse:c,isFailResponse:l})},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0),o=r(12),a=r.n(o);function s(e){const t=Object(n.useRef)(e);return a()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(6),o=r(0),a=r(5),s=r(7),i=r(17),c=r(116),l=r(25),u=r(68);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(s.dispatch)(a.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},f=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...m,email:""},b={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:a.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},g=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(i.decodeEntities)(r)]})),E={cartCoupons:a.EMPTY_CART_COUPONS,cartItems:a.EMPTY_CART_ITEMS,cartFees:a.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:a.EMPTY_CART_ITEM_ERRORS,cartTotals:b,cartIsLoading:!0,cartErrors:a.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:m,shippingRates:a.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:a.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:a.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),i=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();f();const p=Object(s.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:a.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:a.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:m,extensions:a.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const o=e(a.CART_STORE_KEY),s=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),f=o.isCustomerDataUpdating(),{receiveCart:b}=n(a.CART_STORE_KEY),y=g(s.billingAddress),v=s.needsShipping?g(s.shippingAddress):y,O=s.fees.length>0?s.fees.map(e=>g(e)):a.EMPTY_CART_FEES;return{cartCoupons:s.coupons.length>0?s.coupons.map(e=>({...e,label:e.code})):a.EMPTY_CART_COUPONS,cartItems:s.items,cartFees:O,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingAddress:Object(c.a)(y),shippingAddress:Object(c.a)(v),extensions:s.extensions,shippingRates:s.shippingRates,isLoadingRates:f,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements,receiveCart:b}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.deprecated},,function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return P})),r.d(t,"a",(function(){return x}));var n=r(0),o=r(1),a=r(57),s=r(31),i=r.n(s),c=r(59),l=r(61),u=r(7);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),f=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},h=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var b=r(2),g=r(116);let E;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(E||(E={}));const y={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(b.getSetting)("checkoutData",{})||{}},v={redirectUrl:"",status:E.PRISTINE,hasError:!1,calculatingCount:0,orderId:y.order_id,orderNotes:"",customerId:y.customer_id,useShippingAsBilling:Object(g.b)(y.billing_address,y.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:a,extensionData:s,useShippingAsBilling:i,shouldCreateAccount:c,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case d.SET_PRISTINE:u=v;break;case d.SET_IDLE:u=e.status!==E.IDLE?{...e,status:E.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case d.SET_COMPLETE:u=e.status!==E.COMPLETE?{...e,status:E.COMPLETE,redirectUrl:"string"==typeof(null==l?void 0:l.redirectUrl)?l.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==E.PROCESSING?{...e,status:E.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==E.BEFORE_PROCESSING?{...e,status:E.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==E.AFTER_PROCESSING?{...e,status:E.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===E.PROCESSING||e.status===E.BEFORE_PROCESSING?{...u,status:E.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case d.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==i&&i!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:i});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==c&&c!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:c});break;case d.SET_ORDER_NOTES:void 0!==a&&e.orderNotes!==a&&(u={...e,orderNotes:a});break;case d.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(u={...e,extensionData:s})}return u!==e&&r!==d.SET_PRISTINE&&u.status===E.PRISTINE&&(u.status=E.IDLE),u};var S=r(17),_=r(91),k=r(194);var w=r(196),j=r(191),R=r(40),C=r(28),T=r(77);const A=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),P=()=>Object(n.useContext)(A),x=e=>{let{children:t,redirectUrl:r,isCart:s=!1}=e;v.redirectUrl=r;const[b,g]=Object(n.useReducer)(O,v),{setValidationErrors:y}=Object(j.b)(),{createErrorNotice:P}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:x}=Object(R.a)(),M=b.calculatingCount>0,{isSuccessResponse:N,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(C.d)(),{checkoutNotices:F,paymentNotices:V,expressPaymentNotices:B}=(()=>{const{noticeContexts:e}=Object(C.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,H]=Object(n.useReducer)(_.b,{}),G=Object(n.useRef)(U),{onCheckoutAfterProcessingWithSuccess:Y,onCheckoutAfterProcessingWithError:z,onCheckoutValidationBeforeProcessing:q}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(k.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(k.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(k.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{G.current=U},[U]);const W=Object(n.useMemo)(()=>function(){return i()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),X=Object(n.useMemo)(()=>({resetCheckout:()=>{g({type:d.SET_PRISTINE})},setRedirectUrl:e=>{g(f(e))},setHasError:e=>{g(h(e))},incrementCalculating:()=>{g({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{g({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;g((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{g((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{g((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{g((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(S.decodeEntities)(n)})),"message"in e&&(t.message=Object(S.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;g(f((null==t?void 0:t.redirectUrl)||"")),g((r=t,{type:d.SET_PROCESSING_RESPONSE,data:r})),g({type:d.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{b.status===E.BEFORE_PROCESSING&&(Object(T.b)("error"),Object(w.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;P(t),y(r)}),g(p()),g(h())):g({type:d.SET_PROCESSING})}))},[b.status,y,P,g]);const K=Object(a.a)(b.status),$=Object(a.a)(b.hasError);Object(n.useEffect)(()=>{if((b.status!==K||b.hasError!==$)&&b.status===E.AFTER_PROCESSING){const e={redirectUrl:b.redirectUrl,orderId:b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,processingResponse:b.processingResponse};b.hasError?Object(w.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message&&Object(c.a)(e.message)){const r=e.messageContext&&Object(c.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,P(e.message,r)}}),t})(t);if(null!==r)L(r)?g(p()):g(m(r));else{if(!(F.some(e=>"error"===e.status)||B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"checkout"})}g(p())}}):Object(w.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{N(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)g(m(t));else if(Object(l.a)(r)){if(r.message&&Object(c.a)(r.message)){const e=r.messageContext&&Object(c.a)(r.messageContext)?{context:r.messageContext}:void 0;P(r.message,e)}L(r)?g(h(!0)):g(m(r))}else g(m())})}},[b.status,b.hasError,b.redirectUrl,b.orderId,b.customerId,b.orderNotes,b.processingResponse,K,$,X,P,I,D,N,L,F,B,V]);const J={onSubmit:Object(n.useCallback)(()=>{x("submit"),g({type:d.SET_BEFORE_PROCESSING})},[x]),isComplete:b.status===E.COMPLETE,isIdle:b.status===E.IDLE,isCalculating:M,isProcessing:b.status===E.PROCESSING,isBeforeProcessing:b.status===E.BEFORE_PROCESSING,isAfterProcessing:b.status===E.AFTER_PROCESSING,hasError:b.hasError,redirectUrl:b.redirectUrl,onCheckoutBeforeProcessing:W,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:Y,onCheckoutAfterProcessingWithError:z,dispatchActions:X,isCart:s,orderId:b.orderId,hasOrder:!!b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,useShippingAsBilling:b.useShippingAsBilling,setUseShippingAsBilling:e=>{return g((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:b.shouldCreateAccount,setShouldCreateAccount:e=>{return g((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:b.extensionData};return Object(n.createElement)(A.Provider,{value:J},t)}},,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(39),o=r(0),a=r(30);const s=()=>{const e=Object(a.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";var n=r(8),o=r(0),a=r(14),s=function({icon:e,className:t,...r}){const a=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:a},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(s,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&s===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===a.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(a.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(4),o=r.n(n),a=r(0);t.a=Object(a.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(a.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},,function(e,t,r){"use strict";r.d(t,"n",(function(){return a})),r.d(t,"l",(function(){return s})),r.d(t,"k",(function(){return i})),r.d(t,"m",(function(){return c})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return E}));var n,o=r(2);const a=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),s=a.pluginUrl+"images/",i=a.pluginUrl+"build/",c=a.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),a=r(69),s=r(59);const i=Object(n.getSetting)("countryLocale",{}),c=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
+/* translators: %s Field label. */
+Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(a.a)(e.priority)&&(t.index=e.priority),Object(s.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(i).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,c(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return i}));var n=r(0),o=r(65);const a=Object(n.createContext)({isInitialized:!1,billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>{},setShippingAddress:()=>{}}),s=()=>Object(n.useContext)(a),i=e=>{let{children:t}=e;const r=Object(o.a)();return Object(n.createElement)(a.Provider,{value:r},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,a=Object(n.useRef)(null),s=Object(n.useRef)(0),i=Object(n.useRef)(null),c=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=c.current,r=l.current;return c.current=l.current=null,s.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(i.current),i.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-a.current,n=e-s.current;return!a.current||r>=t||r<0||b&&n>=g},E=function(t){return i.current=null,h&&c.current?e(t):(c.current=l.current=null,u.current)},y=function(){var e=Date.now();if(n(e))return E(e);if(p.current){var o=e-a.current,i=e-s.current,c=t-o,l=b?Math.min(c,g-i):c;r(y,l)}},v=function(){for(var d=[],f=0;f{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:i=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const c=n(e,r),l=i(e,r),u={...e.dataset,...c.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:i={},errorBoundaryProps:c={}}=e;Object(a.render)(Object(a.createElement)(s.a,c,Object(a.createElement)(a.Suspense,{fallback:Object(a.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(a.createElement)(t,o()({},i,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:c,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(i.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:a}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:a}=e;const s=document.body.querySelectorAll(o);a&&a.length>0&&Array.prototype.filter.call(s,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,a)),c({Block:t,containers:s,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:a,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:a}=e;const s=a.querySelectorAll(o);c({Block:t,containers:s,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},,function(e,t,r){"use strict";var n=r(8),o=r(0),a=r(4),s=r.n(a),i=r(6),c=r(31),l=r.n(c),u=r(13),d=r(51),p=r(93),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const a=o.getBoundingClientRect();return new n.DOMRect(e.left+a.left,e.top+a.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function E(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var y=r(23);function v(e){const t=Object(o.useContext)(y.a),r=t.slots[e]||{},n=t.fills[e],a=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:a,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function S({name:e,children:t,registerFill:r,unregisterFill:n}){const a=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,a]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(a(t(e)),r(()=>{a(t(e))})),[e]),n})(e),s=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,s.current),()=>n(e,s.current)),[]),Object(o.useLayoutEffect)(()=>{s.current.children=t,a&&a.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==s.current.name&&(n(s.current.name,s.current),s.current.name=e,r(e,s.current))},[e]),a&&a.node?(Object(i.isFunction)(t)&&(t=t(a.props.fillProps)),Object(o.createPortal)(t,a.node)):null}var _=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(S,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,a=Object(i.map)(n(t,this),e=>{const t=Object(i.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(i.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(i.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(i.isFunction)(e)?e(a):a)}}var w=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:a})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:a})));function j(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function R({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:j()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var C=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...a},s){const i=Object(o.useContext)(y.a),c=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(i.registerSlot(e,c,t),()=>{i.unregisterSlot(e,c)}),[i.registerSlot,i.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{i.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([s,c])},a))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_,e),Object(o.createElement)(R,e))}r(12),o.Component;const A=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(C,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function P(e){return"appear"===e?"top":"left"}function x(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:a}=(s=t).ownerDocument.defaultView.getComputedStyle(s);var s;const i=r?parseInt(r,10):0,c=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+i,width:e.width-l-u,height:e.height-i-c,left:e.left+l,right:e.right-u,top:e.top+i,bottom:e.bottom-c}}function M(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function N(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:a,noArrow:i=!0,isAlternate:c,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:y,shouldAnchorIncludePadding:O,anchorRect:S,getAnchorRect:_,expandOnMobile:k,animate:w=!0,onClickOutside:j,onFocusOutside:R,__unstableStickyBoundaryElement:C,__unstableSlotName:A="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),G=Object(o.useRef)(null),Y=Object(o.useRef)(),z=Object(u.useViewportMatch)("medium","<"),[q,X]=Object(o.useState)(),K=v(A),$=k&&z,[J,Q]=Object(u.useResizeObserver)();i=$||i,Object(o.useLayoutEffect)(()=>{if($)return I(Y.current,"is-without-arrow",i),I(Y.current,"is-alternate",c),M(Y.current,"data-x-axis"),M(Y.current,"data-y-axis"),N(Y.current,"top"),N(Y.current,"left"),N(G.current,"maxHeight"),void N(G.current,"maxWidth");const e=()=>{if(!Y.current||!G.current)return;let e=function(e,t,r,n=!1,o,a){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,a)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,a);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,a);return o?e:x(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),s=t.getBoundingClientRect(),i=m(new window.DOMRect(r.left,r.top,r.width,s.bottom-r.top),e.ownerDocument,a);return o?i:x(i,n)}if(!e.current)return;const{parentNode:s}=e.current,i=s.getBoundingClientRect();return o?i:x(i,s)}(H,S,_,y,O,Y.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=Y.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var a;L&&(n=null===(a=Y.current.closest(".popover-slot"))||void 0===a?void 0:a.parentNode);const s=Q.height?Q:G.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:E}=function(e,t,r="top",n,o,a,s,i,c){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,a,s,i){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-s;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},d={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let f,m=r,h=null;if(!o&&!i)if("middle"===r&&u.contentHeight===c)m="middle";else if("top"===r&&d.contentHeight===c)m="top";else if("bottom"===r&&p.contentHeight===c)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==c?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,a,i);return{...function(e,t,r,n,o,a,s,i,c){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===a||c||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===a||c||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,E=r,y=null;if(!o&&!i)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&h.contentWidth===l)E="left";else if("right"===r&&b.contentWidth===l)E="right";else{E=h.contentWidth>b.contentWidth?"left":"right";const e="left"===E?h.contentWidth:b.contentWidth;l>window.innerWidth&&(y=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===E?d.popoverLeft:"left"===E?h.popoverLeft:b.popoverLeft,s){const e=s.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:E,popoverLeft:g,contentWidth:y}}(e,t,u,d,n,p.yAxis,s,i,c),...p}}(e,s,h,C,Y.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(N(Y.current,"top",l+"px"),N(Y.current,"left",u+"px")),I(Y.current,"is-without-arrow",i||"center"===p&&"middle"===b),I(Y.current,"is-alternate",c),M(Y.current,"data-x-axis",p),M(Y.current,"data-y-axis",b),N(G.current,"maxHeight","number"==typeof g?g+"px":""),N(G.current,"maxWidth","number"==typeof E?E+"px":""),X(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=Y.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const a=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",a),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const s=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(y);let l;return s&&s!==t&&(s.defaultView.addEventListener("resize",e),s.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",a),r.cancelAnimationFrame(o),s&&s!==t&&(s.defaultView.removeEventListener("resize",e),s.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[$,S,_,y,O,h,Q,C,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&R)R(r);else if("focus-outside"===e&&j){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),j(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([Y,ee,U]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return s()("components-animate__loading");const{type:t,origin:r=P(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return s()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?s()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:s()("components-popover",a,ne,{"is-expanded":$,"is-without-arrow":i,"is-alternate":c})},B,{ref:re},te,{tabIndex:"-1"}),$&&Object(o.createElement)(E,null),$&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(W,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:G,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return K.ref&&(oe=Object(o.createElement)(T,{name:A},oe)),y||S?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(A,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(i.isString)(e)&&(r=e),Object(i.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var G=function({children:e,position:t,text:r,shortcut:n}){const[a,s]=Object(o.useState)(!1),[c,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),s(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),s(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&a)return;d.cancel();const o=Object(i.includes)(["focus","mouseenter"],n.type);o!==c&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},y=o.Children.only(e),{children:v,disabled:O}=y.props;return(O?B:U)({child:y,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:a})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:a}))))({grandchildren:v,isOver:c,position:t,text:r,shortcut:n})})},Y=r(41),z=r(42);const q=["onMouseDown","onClick"];var W=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:a,isSmall:c,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:E,tooltipPosition:y,shortcut:v,label:O,children:S,text:_,variant:k,__experimentalIsFocusable:w,describedBy:j,...R}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:a,...s}){let i=a;var c,u,d,p,f;return t&&(null!==(c=i)&&void 0!==c||(i="primary")),n&&(null!==(u=i)&&void 0!==u||(i="tertiary")),r&&(null!==(d=i)&&void 0!==d||(i="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=i)&&void 0!==p||(i="secondary")),o&&(null!==(f=i)&&void 0!==f||(i="link")),{...s,variant:i}}(e),C=s()("components-button",f,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":c,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!S,"has-icon":!!h}),T=m&&!w,A=void 0===r||T?"button":"a",P="a"===A?{href:r,target:a}:{type:"button",disabled:T,"aria-pressed":u};if(m&&w){P["aria-disabled"]=!0;for(const e of q)R[e]=e=>{e.stopPropagation(),e.preventDefault()}}const x=!T&&(E&&O||v||!!O&&(!S||Object(i.isArray)(S)&&!S.length)&&!1!==E),M=j?Object(i.uniqueId)():null,N=R["aria-describedby"]||M,I=Object(o.createElement)(A,Object(n.a)({},P,R,{className:C,"aria-label":R["aria-label"]||O,"aria-describedby":N,ref:t}),h&&"left"===b&&Object(o.createElement)(Y.a,{icon:h,size:g}),_&&Object(o.createElement)(o.Fragment,null,_),h&&"right"===b&&Object(o.createElement)(Y.a,{icon:h,size:g}),S);return x?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(G,{text:j||O,shortcut:v,position:y},I),j&&Object(o.createElement)(z.a,null,Object(o.createElement)("span",{id:M},j))):Object(o.createElement)(o.Fragment,null,I,j&&Object(o.createElement)(z.a,null,Object(o.createElement)("span",{id:M},j)))}))},function(e,t){e.exports=window.wp.dom},,function(e,t,r){var n=r(80),o=r(54),a=o.setStyleProp,s=n.html,i=n.svg,c=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],c(t)?d[t]=n:(r=t.toLowerCase(),l.call(s,r)?d[(u=s[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(i,t)?d[(u=i[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return a(e.style,d),d}},function(e,t,r){var n=r(3),o=r(84).default,a={reactCompat:!0},s=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:s,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,a={},s={};for(r in e)n=e[r],o&&(a=t(r,n))&&2===a.length?s[a[0]]=a[1]:"string"==typeof n&&(s[n]=r);return s},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,a))}}},function(e,t,r){for(var n,o=r(90).CASE_SENSITIVE_TAG_NAMES,a={},s=0,i=o.length;s{},isSuppressed:!1}),a=()=>Object(n.useContext)(o),s=e=>{let{children:t}=e;const[r,a]=Object(n.useState)(!1),s={setIsSuppressed:a,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:s},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},function(e,t,r){var n=r(79),o=r(53),a=r(88),s={decodeEntities:!0,lowerCaseAttributeNames:!1};function i(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(a(e,(t=t||{}).htmlparser2||s),t)}i.domToReact=n,i.htmlToDOM=a,i.attributesToProps=o,e.exports=i,e.exports.default=i},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},,function(e,t){var r,n,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=i(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d1)for(var r=1;r{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:s}=Object(o.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(l.a)(),p=Object(a.useRef)({});return Object(a.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(c.a)(t)&&!i()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:s}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(7),o=r(5);const a=()=>{const{customerData:e,isInitialized:t}=Object(n.useSelect)(e=>{const t=e(o.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:r,setBillingData:a}=Object(n.useDispatch)(o.CART_STORE_KEY);return{isInitialized:t,billingData:e.billingData,shippingAddress:e.shippingAddress,setBillingData:a,setShippingAddress:r}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return v})),r.d(t,"a",(function(){return O}));var n=r(0);const o={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},a={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},s={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:o,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},i=(e,t)=>{let{type:r}=t;return Object.values(o).includes(r)?r:e};var c=r(91),l=r(194);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=r(196),p=r(34),f=r(30),m=r(67),h=r(64);const{NONE:b,INVALID_ADDRESS:g,UNKNOWN:E}=o,y=Object(n.createContext)(s),v=()=>Object(n.useContext)(y),O=e=>{let{children:t}=e;const{dispatchActions:r}=Object(p.b)(),{shippingRates:s,isLoadingRates:l,cartErrors:v}=Object(f.a)(),{isSelectingRate:O}=Object(m.a)(),{selectedRates:S}=Object(h.a)(),[_,k]=Object(n.useReducer)(i,b),[w,j]=Object(n.useReducer)(c.b,{}),R=Object(n.useRef)(w),C=Object(n.useMemo)(()=>({onShippingRateSuccess:u(j).onSuccess,onShippingRateFail:u(j).onFail,onShippingRateSelectSuccess:u(j).onSelectSuccess,onShippingRateSelectFail:u(j).onSelectFail}),[j]);Object(n.useEffect)(()=>{R.current=w},[w]),Object(n.useEffect)(()=>{l?r.incrementCalculating():r.decrementCalculating()},[l,r]),Object(n.useEffect)(()=>{O?r.incrementCalculating():r.decrementCalculating()},[O,r]),Object(n.useEffect)(()=>{v.length>0&&v.some(e=>!(!e.code||!Object.values(a).includes(e.code)))?k({type:g}):k({type:b})},[v]);const T=Object(n.useMemo)(()=>({isPristine:_===b,isValid:_===b,hasInvalidAddress:_===g,hasError:_===E||_===g}),[_]);Object(n.useEffect)(()=>{l||0!==s.length&&!T.hasError||Object(d.a)(R.current,"shipping_rates_fail",{hasInvalidAddress:T.hasInvalidAddress,hasError:T.hasError})},[s,l,T.hasError,T.hasInvalidAddress]),Object(n.useEffect)(()=>{!l&&s.length>0&&!T.hasError&&Object(d.a)(R.current,"shipping_rates_success",s)},[s,l,T.hasError]),Object(n.useEffect)(()=>{O||(T.hasError?Object(d.a)(R.current,"shipping_rate_select_fail",{hasError:T.hasError,hasInvalidAddress:T.hasInvalidAddress}):Object(d.a)(R.current,"shipping_rate_select_success",S.current))},[S,O,T.hasError,T.hasInvalidAddress]);const A={shippingErrorStatus:T,dispatchErrorStatus:k,shippingErrorTypes:o,...C};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(y.Provider,{value:A},t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(7),o=r(0),a=r(5),s=r(72),i=r(40);const c=()=>{const e=Object(s.a)(),{dispatchCheckoutEvent:t}=Object(i.a)(),{selectShippingRate:r}=Object(n.useDispatch)(a.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((n,o)=>{r(n,o).then(()=>{t("set-selected-shipping-rate",{shippingRateId:n})}).catch(t=>{e(t)})},[r,t,e]),isSelectingRate:Object(n.useSelect)(e=>e(a.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return c}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:a,detail:s={}}=t;if(!n)return;a||(a=document.body);const i=new n(e,{bubbles:r,cancelable:o,detail:s});a.dispatchEvent(i)};let a;const s=()=>{a&&clearTimeout(a),a=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},c=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const a=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,a),()=>jQuery(document).off(e,a)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(11),o=r.n(n),a=r(0);r(105);const s=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(a.useRef)(null);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(a.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];s(e),null==e||e.focus()}else s(e)})(e,r):s(e))})(r.current,e)}})))}},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a}));var n=r(7);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const r=Object(n.select)("core/notices").getNotices(e);return r.some(e=>e.type===t)},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object(n.select)("core/notices").getNotices(),{removeNotice:o}=Object(n.dispatch)("core/notices"),a=r.filter(t=>t.status===e);a.forEach(e=>o(e.id,t))}},function(e,t){},function(e,t,r){var n=r(3),o=r(53),a=r(54),s=a.setStyleProp;function i(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&a.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var a,c,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,E=0,y=t.length;E1&&(c=p(c,{key:c.key||E})),h.push(c);else if("text"!==a.type){switch(l=a.attribs,i(a)?s(l.style,l):l&&(l=o(l)),u=null,a.type){case"script":case"style":a.children[0]&&(l.dangerouslySetInnerHTML={__html:a.children[0].data});break;case"tag":"textarea"===a.name&&a.children[0]?l.defaultValue=a.children[0].data:a.children&&a.children.length&&(u=e(a.children,r));break;default:continue}y>1&&(l.key=E),h.push(f(a.name,l,u))}else g?a.data.trim()&&h.push(a.data):h.push(a.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(81),o=r(82),a=r(83),s=a.MUST_USE_PROPERTY,i=a.HAS_BOOLEAN_VALUE,c=a.HAS_NUMERIC_VALUE,l=a.HAS_POSITIVE_NUMERIC_VALUE,u=a.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,a,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),a=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(a,s),hasBooleanValue:d(a,i),hasNumericValue:d(a,c),hasPositiveNumericValue:d(a,l),hasOverloadedBooleanValue:d(a,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(85)),a=r(87);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[a.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(86);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var a,s,i=n(e),c="function"==typeof t,l=0,u=i.length;l/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(i);return r&&r[1]&&(t=r[1],s&&(e=e.replace(r[0],""))),a(n(e),null,t)}},function(e,t,r){var n=r(55),o=/<([a-zA-Z]+[0-9]?)/,a=//i,s=//i,i=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,c=n.isIE(9),l=c||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=c?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+""+t+">"),c&&(e=e.replace(i,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,i,c=e.match(o);switch(c&&c[1]&&(t=c[1].toLowerCase()),t){case"html":return r=d(e),a.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),s.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return i=u(e).getElementsByTagName(t),s.test(e)&&a.test(e)?i[0].parentNode.childNodes:i;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i}));var n=r(6);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const a={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},s={},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,eventType:r,id:n,callback:a,priority:i}=arguments.length>1?arguments[1]:void 0;const c=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return c.set(n,{priority:i,callback:a}),{...e,[r]:c};case o.REMOVE_EVENT_CALLBACK:return c.delete(n),{...e,[r]:c}}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(1),o=r(17);const a=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},s=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(o.decodeEntities)(e.message):Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";var n=r(0),o=r(14);const a=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=a},function(e,t,r){"use strict";var n=r(0),o=r(6),a=r(4),s=r.n(a),i=r(1),c=r(19),l=r(93),u=r(50);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:a=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(c.speak)(r,t)},[r,t])}(a,h);const E=s()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:a=!1,onClick:i,url:c},l)=>{let d=o;return"primary"===o||a||(d=c?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:c,variant:d,onClick:c?void 0:i,className:s()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(i.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(11)),a=n(r(125)),s=r(3),i=n(s),c=n(r(126)),l=n(r(128)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=s.useState(!1)[1];return s.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}for(var s=a,i=!1,c=0;c=f.startTime+l.duration;else if(l.decay)b=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,y=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;Oh:b=e);++r);return r-1}(e,a);return function(e,t,r,n,o,a,s,i,c){var l=c?c(e):e;if(lr){if("identity"===i)return l;"clamp"===i&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=a(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,a[t],a[t+1],o[t],o[t+1],c,s,i,n.map)}}var B=function(e){function t(r,n,o,a){var s;return(s=e.call(this)||this).calc=void 0,s.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],s.calc=V(n,o,a),s}c(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}c(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(E),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}c(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(y),G=0,Y=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,s=t.to,i=a(t,["delay","to"]);if(u.arr(s)||u.fun(s))this.queue.push(o({},i,{delay:n,to:s}));else if(s){var c={};Object.entries(s).forEach((function(e){var t,r=e[0],a=e[1],s=o({to:(t={},t[r]=a,t),delay:m(n,r)},i),l=c[s.delay]&&c[s.delay].to;c[s.delay]=o({},c[s.delay],s,{to:o({},l,s.to)})})),this.queue=Object.values(c)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,a=e.to,s=void 0===a?{}:a;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(s)&&(t.merged=o({},t.merged,s))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,s){var i=o.delay,c=a(o,["delay"]),l=function(o){s===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(c.to)||u.fun(c.to);i?setTimeout((function(){r===t.guid&&(d?t.runAsync(c,l):t.diff(c).start(l))}),i):d?t.runAsync(c,l):t.diff(c).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(P||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,a(e,["delay"])),s=this.local,i=Promise.resolve(void 0);if(u.arr(n.to))for(var c=function(e){var t=e,a=o({},n,h(n.to[t]));u.arr(a.config)&&(a.config=a.config[t]),i=i.then((function(){if(s===r.guid)return new Promise((function(e){return r.diff(a).start(e)}))}))},l=0;l=n.length)return"break";s=n[a++]}else{if((a=n.next()).done)return"break";s=a.value}var r=s.key,i=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},n=e.current.deleted,o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var s;if("break"===r())break}e.current.forceUpdate()}var $=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof E||(t=b.transform(t)),r.payload=t,r}return c(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,a=ce(o,n,e+1/3),s=ce(o,n,e),i=ce(o,n,e-1/3);return Math.round(255*a)<<24|Math.round(255*s)<<16|Math.round(255*i)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=se.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ie.exec(t))?parseInt(r[1],16)>>>0:(r=ae.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),Ee={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||Ee.hasOwnProperty(e)&&Ee[e]?(""+t).trim():t+"px"}Ee=Object.keys(Ee).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),Ee);var Oe={};M((function(e){return new $(e)})),T("div"),j((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),S(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,s=t.scrollLeft,i=a(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==s&&(e.scrollLeft=s),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in i){var f=c?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,i[p])}}),(function(e){return e}));var Se,_e,ke=(Se=function(e){return s.forwardRef((function(t,r){var n=d(),c=s.useRef(!0),l=s.useRef(null),p=s.useRef(null),f=s.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);s.useEffect((function(){return function(){c.current=!1,l.current&&l.current.detach()}}),[]),s.useImperativeHandle(r,(function(){return x(p,c,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,a(h,["scrollTop","scrollLeft"])),E=(m=e,!u.fun(m)||m.prototype instanceof i.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return i.createElement(e,o({},g,{ref:E}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=_e?t[0].toLowerCase()+t.substring(1):t;return e[r]=Se(r),e}),Se)}),we=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=N,t.useSpring=function(e){var t=u.fun(e),r=z(1,t?e:[e]),n=r[0],o=r[1],a=r[2];return t?[n[0],o,a]:n},t.useTrail=function(e,t){var r=s.useRef(!1),n=u.fun(t),a=m(t),i=s.useRef(),c=z(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},a,{config:m(a.config,e),attach:e>0&&function(){return i.current[e-1]}})})),l=c[0],d=c[1],p=c[2],f=s.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,s=i.current[n];return o({},e,{config:m(e.config||a.config,t),attach:s&&function(){return s}})}))}}),[e,a.reverse]);return s.useEffect((function(){r.current&&!n&&f(t)})),s.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),i=X(n),c=i.lazy,l=void 0!==c&&c,u=(i.unique,i.reset),p=void 0!==u&&u,f=(i.enter,i.leave,i.update,i.onDestroyed),h=(i.keys,i.items,i.onFrame),b=i.onRest,g=i.onStart,E=i.ref,y=a(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=s.useRef(!1),S=s.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return s.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(S.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(S.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(S.current.instances).map((function(e){return e[1]}))}}})),S.current=function(e,t){for(var r=e.first,n=e.prevProps,s=a(e,["first","prevProps"]),i=X(t),c=i.items,l=i.keys,u=i.initial,d=i.from,p=i.enter,f=i.leave,h=i.update,b=i.trail,g=void 0===b?0:b,E=i.unique,y=i.config,v=i.order,O=void 0===v?["enter","leave","update"]:v,S=X(n),_=S.keys,k=S.items,w=o({},s.current),j=[].concat(s.deleted),R=Object.keys(w),C=new Set(R),T=new Set(l),A=l.filter((function(e){return!C.has(e)})),P=s.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),x=l.filter((function(e){return C.has(e)})),M=-g;O.length;)switch(O.shift()){case"enter":A.forEach((function(e,t){E&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=c[n],a=r&&void 0!==u?"initial":"enter";w[e]={slot:a,originalKey:e,key:E?String(e):q++,item:o,trail:M+=g,config:m(y,o,a),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),r=k[t];j.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:M+=g,config:m(y,r,"leave"),to:m(f,r)})),delete w[e]}));break;case"update":x.forEach((function(e){var t=l.indexOf(e),r=c[t];w[e]=o({},w[e],{item:r,slot:"update",trail:M+=g,config:m(y,r,"update"),to:m(h,r)})}))}var N=l.map((function(e){return w[e]}));return j.forEach((function(e){var t,r=e.left,n=(e.right,a(e,["left","right"]));-1!==(t=N.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),N=[].concat(N.slice(0,t),[n],N.slice(t))})),o({},s,{changed:A.length||P.length||x.length,first:r&&0===A.length,transitions:N,current:w,deleted:j,prevProps:t})}(S.current,n),S.current.changed&&S.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,a=e.config,s=e.trail,i=e.key,c=e.item;S.current.instances.has(i)||S.current.instances.set(i,new Y);var u=S.current.instances.get(i),d=o({},y,{to:n,from:r,config:a,ref:E,onRest:function(r){S.current.mounted&&(e.destroyed&&(E||l||K(S,i),f&&f(c)),!Array.from(S.current.instances).some((function(e){return!e[1].idle}))&&(E||l)&&S.current.deleted.length>0&&K(S),b&&b(c,t,r))},onStart:g&&function(){return g(c,t)},onFrame:h&&function(e){return h(c,t,e)},delay:s,reset:p&&"enter"===t});u.update(d),S.current.paused||u.start()})),s.useEffect((function(){return S.current.mounted=O.current=!0,function(){S.current.mounted=O.current=!1,Array.from(S.current.instances).map((function(e){return e[1].destroy()})),S.current.instances.clear()}}),[]),S.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:S.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=s.useRef();s.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var a=e.current;if(a){var s=a.controllers;if(s.length){var i=r*t[n];s.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=z},,,,,,,,,,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(6),a=r(4),s=r.n(a),i=r(19),c=r(1),l=(r(38),r(50));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:a=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(i.speak)(r,t)},[r,t])}(a,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const E=s()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const y=s()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:E,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(c.__)("Dismiss this notice")},Object(n.createElement)("div",{className:y},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(63))},function(e,t){e.exports=window.wp.plugins},,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return s}));var n=r(45),o=(r(26),r(2));const a=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),s=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),a=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(a[r]="")}),a}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(11),o=r.n(n),a=r(0),s=r(4),i=r.n(s),c=r(94),l=r(7),u=(r(78),r(56));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:s}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:f}=Object(l.useDispatch)("core/notices"),m=p.filter(e=>"snackbar"!==e.type).concat(n);if(!m.length)return null;const h=i()(t,"wc-block-components-notices");return s?null:Object(a.createElement)("div",{className:h},m.map(e=>Object(a.createElement)(c.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&f(e.id,r)}}),e.content)))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(48),a=r(2),s=r(58),i=r.n(s),c=r(10),l=r(15);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:s,depth:p=1}=e;return s&&0!==s.length?Array.from(s).map((e,s)=>{const{blockName:f="",...m}={key:`${t}_${p}_${s}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},h=u(f,r);if(!h){const a=i()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof a&&a)return a;if(!Object(n.isValidElement)(a))return null;const s=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return s?Object(n.cloneElement)(a,m,s):Object(n.cloneElement)(a,m)}const b=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${s}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+f,showErrorBlock:a.CURRENT_USER_IS_ADMIN},Object(n.createElement)(b,null,Object(n.createElement)(h,m,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(c.hasInnerBlocks)(e))return null;const s=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(c.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!s.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,i.map((e,r)=>{let{blockName:o,component:s}=e;const i=s||u(o,t);return i?Object(n.createElement)(l.a,{text:"Unexpected error in: "+o,showErrorBlock:a.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(i,{key:`${o}_forced_${r}`}))):null}))})(f,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:a=(()=>({})),blockMap:s,blockWrapper:i}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:s,children:e.children||[],blockWrapper:i});return{...a(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(127);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},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},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(0),o=r(112),a=r(2),s=r(15),i=r(198),c=r(66),l=r(46),u=r(34),d=r(1),p=r(24),f=r.n(p),m=r(116),h=r(92),b=r(7);const g=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},E=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var y=r(191),v=r(30),O=r(56),S=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:a,isBeforeProcessing:s,isComplete:p,orderNotes:S,shouldCreateAccount:_,extensionData:k}=Object(u.b)(),{hasValidationErrors:w}=Object(y.b)(),{shippingErrorStatus:j}=Object(c.b)(),{billingData:R,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:T,cartNeedsShipping:A,receiveCart:P}=Object(v.a)(),{activePaymentMethod:x,isExpressPaymentMethodActive:M,currentStatus:N,paymentMethodData:I,expressPaymentMethods:D,paymentMethods:L,shouldSavePayment:F}=Object(i.b)(),{setIsSuppressed:V}=Object(O.b)(),{createErrorNotice:B,removeNotice:U}=Object(b.useDispatch)("core/notices"),H=Object(n.useRef)(R),G=Object(n.useRef)(C),Y=Object(n.useRef)(o),[z,q]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...D,...L};return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId},[x,D,L]),X=w&&!M||N.hasError||j.hasError,K=!e&&!X&&(N.isSuccessful||!T)&&a;Object(n.useEffect)(()=>{V(M)},[M,V]),Object(n.useEffect)(()=>{X===e||!a&&!s||M||r.setHasError(X)},[X,e,a,s,M,r]),Object(n.useEffect)(()=>{H.current=R,G.current=C,Y.current=o},[R,C,o]);const $=Object(n.useCallback)(()=>!w&&(N.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,N.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return M||(e=t($,0)),()=>{M||e()}},[t,$,M]),Object(n.useEffect)(()=>{Y.current&&(window.location.href=Y.current)},[p]);const J=Object(n.useCallback)(async()=>{if(z)return;q(!0),U("checkout");const e=T?{payment_method:W,payment_data:g(I,F,x)}:{},t={billing_address:Object(m.a)(H.current),customer_note:S,create_account:_,...e,extensions:{...k}};A&&(t.shipping_address=Object(m.a)(G.current)),f()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),B(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{B(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;B(Object(d.sprintf)(// Translators: %s Error text.
+Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),q(!1)})},[z,U,T,W,I,F,x,S,_,k,A,r,B,P]);return Object(n.useEffect)(()=>{K&&!z&&J()},[J,K,z]),null};const _=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(c.a,null,Object(n.createElement)(i.a,null,t,Object(n.createElement)(s.a,{renderError:a.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(S,null)))))}},,,function(e,t,r){"use strict";var n=r(0);r(188),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,r){"use strict";var n=r(0),o=r(1),a=r(4),s=r.n(a),i=(r(190),r(132));t.a=e=>{let{children:t,className:r,screenReaderLabel:a,showSpinner:c=!1,isLoading:l=!0}=e;return Object(n.createElement)("div",{className:s()(r,{"wc-block-components-loading-mask":l})},l&&c&&Object(n.createElement)(i.a,null),Object(n.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(n.createElement)("span",{className:"screen-reader-text"},a||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},,,,,function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a}));var n=r(0);const o=Object(n.createContext)({hasDarkControls:!1}),a=()=>Object(n.useContext)(o)},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-heading-block","version":"1.0.0","title":"Heading","description":"Shows the heading row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"content":{"type":"string","default":"Cart totals"},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(6),a=r(12),s=r.n(a);const i=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),c=()=>Object(n.useContext)(i),l=e=>{let{children:t}=e;const[r,a]=Object(n.useState)({}),c=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{a(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{a({})},[]),p=Object(n.useCallback)(e=>{e&&a(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&s()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{a(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return s()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:c,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{a(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(i.Provider,{value:m},t)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(91);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const a=n.a.addEventCallback(e,r,o);return t(a),()=>{t(n.a.removeEventCallback(e,a.id))}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(28);const a=async(e,t,r)=>{const o=n(e,t),a=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&a.push(t)}catch(e){console.error(e)}return!a.length||a},s=async(e,t,r)=>{const a=[],s=n(e,t);for(const e of s)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return a.push(t),a;a.push(t)}catch(e){return console.error(e),a.push({type:"error"}),a}return a}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return L})),r.d(t,"a",(function(){return F}));var n=r(0),o=r(61),a=r(7);let s,i;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(s||(s={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(i||(i={}));const c={currentStatus:s.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:s,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:a={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case s.PRISTINE:return{...c,...e,errorMessage:"",currentStatus:s.PRISTINE};case s.STARTED:return{...e,currentStatus:s.STARTED};case s.ERROR:return e.currentStatus!==s.ERROR?{...e,currentStatus:s.ERROR,errorMessage:o||e.errorMessage}:e;case s.FAILED:return e.currentStatus!==s.FAILED?{...e,currentStatus:s.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case s.SUCCESS:return e.currentStatus!==s.SUCCESS?{...e,currentStatus:s.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case s.PROCESSING:return e.currentStatus!==s.PROCESSING?{...e,currentStatus:s.PROCESSING,errorMessage:""}:e;case s.COMPLETE:return e.currentStatus!==s.COMPLETE?{...e,currentStatus:s.COMPLETE}:e;case i.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:a};case i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:a};case i.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case i.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},d=r(1),p=r(16),f=r(29),m=r(2),h=r(47),b=r(25),g=r(46),E=r(30),y=r(28),v=r(64);const O=(e,t,r,o)=>{const[s,i]=Object(n.useState)(!1),{isEditor:c}=Object(b.a)(),{selectedRates:l}=Object(v.a)(),{billingData:u,shippingAddress:p}=Object(g.b)(),y=Object(f.a)(l),O=Object(f.a)(r),S=Object(E.a)(),{cartTotals:_,cartIsLoading:k,cartNeedsShipping:w,paymentRequirements:j}=S,R=Object(n.useRef)({cart:S,cartTotals:_,cartNeedsShipping:w,billingData:u,shippingAddress:p,selectedShippingMethods:y,paymentRequirements:j}),{createErrorNotice:C}=Object(a.useDispatch)("core/notices");Object(n.useEffect)(()=>{R.current={cart:S,cartTotals:_,cartNeedsShipping:w,billingData:u,shippingAddress:p,selectedShippingMethods:y,paymentRequirements:j}},[S,_,w,u,p,y,j]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e{k||A()},[A,S,y,u,k]),s},S=e=>({type:e}),_=e=>({type:s.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:s.FAILED,errorMessage:t,paymentMethodData:r}},w=e=>{let{paymentMethodData:t}=e;return{type:s.SUCCESS,paymentMethodData:t}},j=e=>({type:i.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:i.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:i.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var A=r(65),P=r(34),x=r(91),M=r(194);var N=r(196),I=r(191);const D=Object(n.createContext)(l),L=()=>Object(n.useContext)(D),F=e=>{let{children:t}=e;const{isProcessing:r,isIdle:i,isCalculating:l,hasError:d}=Object(P.b)(),{isEditor:f,getPreviewData:h}=Object(b.a)(),{setValidationErrors:g}=Object(I.b)(),{createErrorNotice:E,removeNotice:v}=Object(a.useDispatch)("core/notices"),{isSuccessResponse:L,isErrorResponse:F,isFailResponse:V,noticeContexts:B}=Object(y.d)(),[U,H]=Object(n.useReducer)(x.b,{}),{onPaymentProcessing:G}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(M.a)("payment_processing",e)}),[e]))(H),Y=Object(n.useRef)(U);Object(n.useEffect)(()=>{Y.current=U},[U]);const[z,q]=Object(n.useReducer)(u,c),{dispatchActions:W,setPaymentStatus:X}=(e=>{const{setBillingData:t,setShippingAddress:r}=Object(A.a)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(j(t))},setRegisteredExpressPaymentMethods:t=>{e(R(t))},setShouldSavePayment:t=>{e(C(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(S(s.PRISTINE)),started:()=>e(S(s.STARTED)),processing:()=>e(S(s.PROCESSING)),completed:()=>e(S(s.COMPLETE)),error:t=>e(_(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(k({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof a&&null!=a&&a.address&&r(a.address),e(w({paymentMethodData:n}))}}),[e,t,r])}})(q),K=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:r}=Object(y.d)(),n=new Set([...Object(m.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return O(e,t,Array.from(n),r.PAYMENTS)})(W.setRegisteredPaymentMethods),$=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:r}=Object(y.d)();return O(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),J=Object(n.useMemo)(()=>f?h("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(m.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(z.paymentMethods):{},[f,h,K,z.paymentMethods]),Q=Object(n.useCallback)(e=>{e?E(e,{id:"wc-express-payment-error",context:B.EXPRESS_PAYMENTS}):v("wc-express-payment-error",B.EXPRESS_PAYMENTS)},[E,B.EXPRESS_PAYMENTS,v]),Z=Object.keys(z.expressPaymentMethods).includes(z.activePaymentMethod),ee=Object(n.useMemo)(()=>({isPristine:z.currentStatus===s.PRISTINE,isStarted:z.currentStatus===s.STARTED,isProcessing:z.currentStatus===s.PROCESSING,isFinished:[s.ERROR,s.FAILED,s.SUCCESS].includes(z.currentStatus),hasError:z.currentStatus===s.ERROR,hasFailed:z.currentStatus===s.FAILED,isSuccessful:z.currentStatus===s.SUCCESS,isDoingExpressPayment:z.currentStatus!==s.PRISTINE&&Z}),[z.currentStatus,Z]);Object(n.useEffect)(()=>{const e=Object.keys(z.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(z.expressPaymentMethods)];if(z.activePaymentMethod&&t.includes(z.activePaymentMethod))return;X().pristine();const r=Object.keys(J).flatMap(e=>J[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(z.paymentMethods)[0])},[K,z.paymentMethods,z.expressPaymentMethods,W,X,z.activePaymentMethod,J]),Object(n.useEffect)(()=>{!r||d||l||ee.isFinished||X().processing()},[r,d,l,ee.isFinished,X]),Object(n.useEffect)(()=>{i&&!ee.isSuccessful&&X().pristine()},[i,ee.isSuccessful,X]),Object(n.useEffect)(()=>{d&&ee.isSuccessful&&X().pristine()},[d,ee.isSuccessful,X]),Object(n.useEffect)(()=>{ee.isProcessing&&(v("wc-payment-error",B.PAYMENTS),Object(N.b)(Y.current,"payment_processing",{}).then(e=>{let t,r;var n,o,a,s,i,c;if(e.forEach(e=>{L(e)&&(t=e),(F(e)||V(e))&&(r=e)}),t&&!r)X().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(a=t)||void 0===a||null===(s=a.meta)||void 0===s?void 0:s.billingData,null===(i=t)||void 0===i||null===(c=i.meta)||void 0===c?void 0:c.shippingData);else if(r&&V(r)){var l,u,d,p,f,m;r.message&&r.message.length&&E(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||B.PAYMENTS}),X().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var h,b;r.message&&r.message.length&&E(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||B.PAYMENTS}),X().error(r.message),g(null===(h=r)||void 0===h?void 0:h.validationErrors)}else X().success()}))},[ee.isProcessing,g,X,v,B.PAYMENTS,L,V,F,E]);const te="object"==typeof z.paymentMethodData&&Object(o.b)(z.paymentMethodData,"token")?z.paymentMethodData.token+"":"",re={setPaymentStatus:X,currentStatus:ee,paymentStatuses:s,paymentMethodData:z.paymentMethodData,errorMessage:z.errorMessage,activePaymentMethod:z.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:J,paymentMethods:z.paymentMethods,expressPaymentMethods:z.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:$,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:z.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(n.createElement)(D.Provider,{value:re},t)}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(238)},function(e,t){},,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(141),o=r(0),a=r(30),s=r(16),i=r(124),c=r(44),l=r(10),u={FILLED_CART:r(145),EMPTY_CART:r(146),CART_ITEMS:r(147),CART_EXPRESS_PAYMENT:r(148),CART_LINE_ITEMS:r(149),CART_TOTALS:r(150),PROCEED_TO_CHECKOUT:r(151),CART_ACCEPTED_PAYMENT_METHODS:r(152),CART_ORDER_SUMMARY:r(153),CART_ORDER_SUMMARY_SUBTOTAL:r(154),CART_ORDER_SUMMARY_FEE:r(155),CART_ORDER_SUMMARY_DISCOUNT:r(156),CART_ORDER_SUMMARY_SHIPPING:r(157),CART_ORDER_SUMMARY_COUPON_FORM:r(158),CART_ORDER_SUMMARY_TAXES:r(159),CART_ORDER_SUMMARY_HEADING:r(160)};r.p=c.k,Object(l.registerCheckoutBlock)({metadata:u.FILLED_CART,component:Object(o.lazy)(()=>r.e(19).then(r.bind(null,409)))}),Object(l.registerCheckoutBlock)({metadata:u.EMPTY_CART,component:Object(o.lazy)(()=>r.e(18).then(r.bind(null,410)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ITEMS,component:Object(o.lazy)(()=>r.e(14).then(r.bind(null,411)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_LINE_ITEMS,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(4),r.e(15)]).then(r.bind(null,443)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_TOTALS,component:Object(o.lazy)(()=>r.e(17).then(r.bind(null,412)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_EXPRESS_PAYMENT,component:Object(o.lazy)(()=>r.e(13).then(r.bind(null,432)))}),Object(l.registerCheckoutBlock)({metadata:u.PROCEED_TO_CHECKOUT,component:Object(o.lazy)(()=>r.e(27).then(r.bind(null,444)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ACCEPTED_PAYMENT_METHODS,component:Object(o.lazy)(()=>r.e(12).then(r.bind(null,445)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(16)]).then(r.bind(null,446)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_HEADING,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,433)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_SUBTOTAL,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,447)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_FEE,component:Object(o.lazy)(()=>r.e(22).then(r.bind(null,448)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_DISCOUNT,component:Object(o.lazy)(()=>r.e(21).then(r.bind(null,449)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_COUPON_FORM,component:Object(o.lazy)(()=>r.e(20).then(r.bind(null,450)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_SHIPPING,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(5),r.e(24)]).then(r.bind(null,434)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_TAXES,component:Object(o.lazy)(()=>r.e(26).then(r.bind(null,435)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_HEADING,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,433)))});var d=r(1),p=r(134),f=r(191),m=r(121),h=r(2),b=r(15),g=r(68),E=r(73),y=r(242),v=r(56),O=r(129);const S=e=>{let{children:t,redirectUrl:r}=e;return Object(o.createElement)(O.a,{isCart:!0,redirectUrl:r},t)};var _=r(142);r(222);const k=()=>{window.location.reload(!0)},w=e=>{let{children:t,attributes:r}=e;const{cartIsLoading:n}=Object(a.a)(),{hasDarkControls:s}=r;return Object(o.createElement)(p.a,{showSpinner:!0,isLoading:n},Object(o.createElement)(_.a.Provider,{value:{hasDarkControls:s}},Object(o.createElement)(f.a,null,t)))},j=e=>{let{scrollToTop:t}=e;return Object(o.useEffect)(()=>{const e=Object(g.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",t),()=>{e(),document.body.removeEventListener("wc-blocks_added_to_cart",t)}},[t]),null};var R=Object(E.a)(e=>{let{attributes:t,children:r,scrollToTop:n}=e;return Object(o.createElement)(b.a,{header:Object(d.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(d.__)("The cart has encountered an unexpected error. If the error persists, please get in touch with us for help.","woo-gutenberg-products-block"),button:Object(o.createElement)("button",{className:"wc-block-button",onClick:k},Object(d.__)("Reload the page","woo-gutenberg-products-block")),showErrorMessage:h.CURRENT_USER_IS_ADMIN},Object(o.createElement)(y.a,{context:"wc/cart"},Object(o.createElement)(v.a,null,Object(o.createElement)(m.a,{context:"wc/cart"}),Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)(S,null,Object(o.createElement)(w,{attributes:t},r),Object(o.createElement)(j,{scrollToTop:n}))))))});const C={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(h.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(h.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};Object(i.a)({Block:R,blockName:"woocommerce/cart",selector:".wp-block-woocommerce-cart",getProps:e=>({attributes:Object(n.a)(C,e?e.dataset:{})}),blockMap:Object(s.getRegisteredBlockComponents)("woocommerce/cart"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:n,...s}=Object(a.a)();return o.Children.map(t,e=>{if(Object(o.isValidElement)(e)){const t={extensions:r,cart:s};return Object(o.cloneElement)(e,t)}return e})}})},,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return v}));var n=r(0),o=r(7),a=r(8),s=r(4),i=r.n(s),c=r(6),l=r(95),u=r(13),d=r(111),p=function({notices:e,className:t,children:r,onRemove:o=c.noop}){const s=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:s});t=i()("components-snackbar-list",t);const m=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(a.a)({},Object(c.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},f=r(10);const m={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:a}=e;if(a)return null;const s=r.filter(e=>"snackbar"===e.type),c=s.length>0?s.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):m,l=Object(f.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:c}),u=s.filter(e=>!0===l[e.content]),d=i()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(40),g=r(25);const E=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),y=()=>Object(n.useContext)(E),v=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:a,removeNotice:s}=Object(o.useDispatch)("core/notices"),[i,c]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[a,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;s(e,t)}),[s,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:c},y=i?null:Object(n.createElement)(h,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(E.Provider,{value:m},t,y)}}]);
\ No newline at end of file
diff --git a/build/cart.asset.php b/build/cart.asset.php
new file mode 100644
index 00000000000..152d484ddbf
--- /dev/null
+++ b/build/cart.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '0494e4992b763ba32c0f8890b491df6a');
\ No newline at end of file
diff --git a/build/cart.js b/build/cart.js
new file mode 100644
index 00000000000..ed23e671b25
--- /dev/null
+++ b/build/cart.js
@@ -0,0 +1,44 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.cart=function(e){function t(t){for(var r,a,s=t[0],i=t[1],l=t[2],d=0,p=[];d{let{selected:t=[],search:c="",queryArgs:n={}}=e;const s=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=i.o.productCount>100,a={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},s=[Object(r.addQueryArgs)("/wc/store/v1/products",{...a,...n})];return o&&t.length&&s.push(Object(r.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:c,queryArgs:n});return Promise.all(s.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/v1/products/"+e}),d=()=>o()({path:"wc/store/v1/products/attributes"}),p=e=>o()({path:`wc/store/v1/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(s.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/v1/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/v1/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},b=e=>o()({path:Object(r.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),g=e=>o()({path:"wc/store/v1/products/categories/"+e}),O=e=>o()({path:Object(r.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return a}));var r=c(1),n=c(14);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},a=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(n.decodeEntities)(e.message):Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},,function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=c,l=null!=n;return!i&&l?(t=a||"span",s={...s,className:o()(s.className,"screen-reader-text")},Object(r.createElement)(t,s,n)):(t=a||r.Fragment,i&&l&&c!==n?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},n)):Object(r.createElement)(t,s,c))}},,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return o})),c.d(t,"a",(function(){return i})),c.d(t,"b",(function(){return l})),c.d(t,"d",(function(){return d}));var r=c(57);let n,o;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(n||(n={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(o||(o={}));const a=(e,t)=>Object(r.a)(e)&&"type"in e&&e.type===t,s=e=>a(e,n.SUCCESS),i=e=>a(e,n.ERROR),l=e=>a(e,n.FAIL),u=e=>!Object(r.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:n,noticeContexts:o,shouldRetry:u,isSuccessResponse:s,isErrorResponse:i,isFailResponse:l})},,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(122),s=c(4),i=c.n(s);c(126);const l=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:s,displayType:u="text",...d}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const m=p/10**r.minorUnit;if(!Number.isFinite(m))return null;const b=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...l(r),value:void 0,currency:void 0,onValueChange:void 0},O=s?e=>{const t=+e.value*10**r.minorUnit;s(t)}:()=>{};return Object(o.createElement)(a.a,n()({className:b,displayType:u},g,{value:m,onValueChange:O}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return E}));var r=c(7),n=c(0),o=c(17),a=c(9),s=c(14),i=c(219),l=c(50),u=c(218);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(o.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(n.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},b={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},g={...b,email:""},O={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:o.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},h=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(s.decodeEntities)(c)]})),j={cartCoupons:o.EMPTY_CART_COUPONS,cartItems:o.EMPTY_CART_ITEMS,cartFees:o.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:O,cartIsLoading:!0,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:g,shippingAddress:b,shippingRates:o.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:o.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:o.EMPTY_EXTENSIONS},E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(l.b)(),s=null==c?void 0:c.previewCart,{shouldSelect:u}=e,d=Object(n.useRef)();m();const p=Object(a.useSelect)((e,c)=>{let{dispatch:r}=c;if(!u)return j;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:g,shippingAddress:b,extensions:o.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const n=e(o.CART_STORE_KEY),a=n.getCartData(),l=n.getCartErrors(),d=n.getCartTotals(),p=!n.hasFinishedResolution("getCartData"),m=n.isCustomerDataUpdating(),{receiveCart:O}=r(o.CART_STORE_KEY),E=h(a.billingAddress),_=a.needsShipping?h(a.shippingAddress):E,f=a.fees.length>0?a.fees.map(e=>h(e)):o.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):o.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:f,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingAddress:Object(i.a)(E),shippingAddress:Object(i.a)(_),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:O}},[u]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wc.wcBlocksRegistry},,,,,function(e,t){e.exports=window.wp.a11y},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(74),s=c(119);const i=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:c={},...r}=e;const l=Object(o.useRef)(null),u=()=>{l.current&&a.focus.focusable.find(l.current).forEach(e=>{i.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(s.a)(u,0,{leading:!0});return Object(o.useLayoutEffect)(()=>{let e;return u(),l.current&&(e=new window.MutationObserver(d),e.observe(l.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(o.createElement)("div",n()({ref:l,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},r),t)}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),n=c(25),o=c.n(n);function a(e){const t=Object(r.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(0),n=c(9);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),a=()=>Object(r.useContext)(o),s=e=>{let{children:t,currentPostId:c=0,currentView:a="",previewData:s={}}=e;const i=Object(n.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),l=Object(r.useCallback)(e=>e in s?s[e]:{},[s]),u={isEditor:!0,currentPostId:i,currentView:a,previewData:s,getPreviewData:l};return Object(r.createElement)(o.Provider,{value:u},t)}},function(e,t){e.exports=window.wp.hooks},function(e,t,c){"use strict";c.d(t,"b",(function(){return R})),c.d(t,"a",(function(){return x}));var r=c(0),n=c(1),o=c(105),a=c(58),s=c.n(a),i=c(124),l=c(57),u=c(9);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),m=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},g=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var O=c(2),h=c(219);let j;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(j||(j={}));const E={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(O.getSetting)("checkoutData",{})||{}},_={redirectUrl:"",status:j.PRISTINE,hasError:!1,calculatingCount:0,orderId:E.order_id,orderNotes:"",customerId:E.customer_id,useShippingAsBilling:Object(h.b)(E.billing_address,E.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,{redirectUrl:t,type:c,customerId:r,orderId:n,orderNotes:o,extensionData:a,useShippingAsBilling:s,shouldCreateAccount:i,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(c){case d.SET_PRISTINE:u=_;break;case d.SET_IDLE:u=e.status!==j.IDLE?{...e,status:j.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case d.SET_COMPLETE:u=e.status!==j.COMPLETE?{...e,status:j.COMPLETE,redirectUrl:"string"==typeof(null==l?void 0:l.redirectUrl)?l.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==j.PROCESSING?{...e,status:j.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==j.BEFORE_PROCESSING?{...e,status:j.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==j.AFTER_PROCESSING?{...e,status:j.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===j.PROCESSING||e.status===j.BEFORE_PROCESSING?{...u,status:j.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==r?{...e,customerId:r}:e;break;case d.SET_ORDER_ID:u=void 0!==n?{...e,orderId:n}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==s&&s!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:s});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==i&&i!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:i});break;case d.SET_ORDER_NOTES:void 0!==o&&e.orderNotes!==o&&(u={...e,orderNotes:o});break;case d.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(u={...e,extensionData:a})}return u!==e&&c!==d.SET_PRISTINE&&u.status===j.PRISTINE&&(u.status=j.IDLE),u};var y=c(14),k=c(92),v=c(220);var w=c(221),S=c(114),C=c(64),N=c(34),I=c(112);const M=Object(r.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),R=()=>Object(r.useContext)(M),x=e=>{let{children:t,redirectUrl:c,isCart:a=!1}=e;_.redirectUrl=c;const[O,h]=Object(r.useReducer)(f,_),{setValidationErrors:E}=Object(S.b)(),{createErrorNotice:R}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:x}=Object(C.a)(),P=O.calculatingCount>0,{isSuccessResponse:T,isErrorResponse:A,isFailResponse:D,shouldRetry:L}=Object(N.d)(),{checkoutNotices:B,paymentNotices:U,expressPaymentNotices:F}=(()=>{const{noticeContexts:e}=Object(N.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[V,z]=Object(r.useReducer)(k.b,{}),Y=Object(r.useRef)(V),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,onCheckoutValidationBeforeProcessing:H}=(e=>Object(r.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(v.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(v.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(v.a)("checkout_validation_before_processing",e)}),[e]))(z);Object(r.useEffect)(()=>{Y.current=V},[V]);const $=Object(r.useMemo)(()=>function(){return s()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),H(...arguments)},[H]),W=Object(r.useMemo)(()=>({resetCheckout:()=>{h({type:d.SET_PRISTINE})},setRedirectUrl:e=>{h(m(e))},setHasError:e=>{h(g(e))},incrementCalculating:()=>{h({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{h({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;h((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{h((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{h((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{h((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:c,value:r}=e;t.paymentDetails[c]=Object(y.decodeEntities)(r)})),"message"in e&&(t.message=Object(y.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var c;h(m((null==t?void 0:t.redirectUrl)||"")),h((c=t,{type:d.SET_PROCESSING_RESPONSE,data:c})),h({type:d.SET_AFTER_PROCESSING})}}),[]);Object(r.useEffect)(()=>{O.status===j.BEFORE_PROCESSING&&(Object(I.a)("error"),Object(w.a)(Y.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;R(t),E(c)}),h(p()),h(g())):h({type:d.SET_PROCESSING})}))},[O.status,E,R,h]);const Q=Object(o.a)(O.status),J=Object(o.a)(O.hasError);Object(r.useEffect)(()=>{if((O.status!==Q||O.hasError!==J)&&O.status===j.AFTER_PROCESSING){const e={redirectUrl:O.redirectUrl,orderId:O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,processingResponse:O.processingResponse};O.hasError?Object(w.b)(Y.current,"checkout_after_processing_with_error",e).then(t=>{const c=(e=>{let t=null;return e.forEach(e=>{if((A(e)||D(e))&&e.message&&Object(i.a)(e.message)){const c=e.messageContext&&Object(i.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,R(e.message,c)}}),t})(t);if(null!==c)L(c)?h(p()):h(b(c));else{if(!(B.some(e=>"error"===e.status)||F.some(e=>"error"===e.status)||U.some(e=>"error"===e.status))){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");R(t,{id:"checkout"})}h(p())}}):Object(w.b)(Y.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,c=null;if(e.forEach(e=>{T(e)&&(t=e),(A(e)||D(e))&&(c=e)}),t&&!c)h(b(t));else if(Object(l.a)(c)){if(c.message&&Object(i.a)(c.message)){const e=c.messageContext&&Object(i.a)(c.messageContext)?{context:c.messageContext}:void 0;R(c.message,e)}L(c)?h(g(!0)):h(b(c))}else h(b())})}},[O.status,O.hasError,O.redirectUrl,O.orderId,O.customerId,O.orderNotes,O.processingResponse,Q,J,W,R,A,D,T,L,B,F,U]);const K={onSubmit:Object(r.useCallback)(()=>{x("submit"),h({type:d.SET_BEFORE_PROCESSING})},[x]),isComplete:O.status===j.COMPLETE,isIdle:O.status===j.IDLE,isCalculating:P,isProcessing:O.status===j.PROCESSING,isBeforeProcessing:O.status===j.BEFORE_PROCESSING,isAfterProcessing:O.status===j.AFTER_PROCESSING,hasError:O.hasError,redirectUrl:O.redirectUrl,onCheckoutBeforeProcessing:$,onCheckoutValidationBeforeProcessing:H,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,dispatchActions:W,isCart:a,orderId:O.orderId,hasOrder:!!O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,useShippingAsBilling:O.useShippingAsBilling,setUseShippingAsBilling:e=>{return h((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:O.shouldCreateAccount,setShouldCreateAccount:e=>{return h((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:O.extensionData};return Object(r.createElement)(M.Provider,{value:K},t)}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function n(e,t){return r(e)&&t in e}},function(e,t){e.exports=window.wp.deprecated},function(e,t){e.exports=window.wp.autop},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(51),n=c(0),o=c(38);const a=()=>{const e=Object(o.a)(),t=Object(n.useRef)(e);return Object(n.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(n.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(131),s=c(4),i=c.n(s),l=c(89);c(146),t.a=e=>{let{className:t,showSpinner:c=!1,children:r,variant:s="contained",...u}=e;const d=i()("wc-block-components-button",t,s,{"wc-block-components-button--loading":c});return Object(o.createElement)(a.a,n()({className:d},u),c&&Object(o.createElement)(l.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},r))}},function(e,t,c){"use strict";c.d(t,"c",(function(){return o})),c.d(t,"d",(function(){return a})),c.d(t,"a",(function(){return s})),c.d(t,"b",(function(){return i}));var r=c(13),n=c(23);const o=(e,t)=>{if(n.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(n.n>1)return Object(r.registerBlockType)(e,t)},s=()=>n.n>2,i=()=>n.n>1},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(4),a=c.n(o),s=(c(233),c(89));t.a=e=>{let{children:t,className:c,screenReaderLabel:o,showSpinner:i=!1,isLoading:l=!0}=e;return Object(r.createElement)("div",{className:a()(c,{"wc-block-components-loading-mask":l})},l&&i&&Object(r.createElement)(s.a,null),Object(r.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(r.createElement)("span",{className:"screen-reader-text"},o||Object(n.__)("Loading…","woo-gutenberg-products-block")))}},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(0),n=c(87);const o=Object(r.createContext)({isInitialized:!1,billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>{},setShippingAddress:()=>{}}),a=()=>Object(r.useContext)(o),s=e=>{let{children:t}=e;const c=Object(n.a)();return Object(r.createElement)(o.Provider,{value:c},t)}},,function(e,t){e.exports=window.wp.dom},,,function(e,t){e.exports=window.wp.keycodes},,,function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n);c(181),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:o()("wc-block-components-product-badge",c)},t)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var r=c(17),n=c(9),o=c(0),a=c(25),s=c.n(a),i=c(57),l=c(106);const u=()=>{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:c,isLoadingRates:a}=Object(n.useSelect)(e=>{const t=e(r.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(l.a)(),p=Object(o.useRef)({});return Object(o.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:c,shipping_rates:r}=e;return[c,null===(t=r.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(i.a)(t)&&!s()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:c,isLoadingRates:a}}},,,,,function(e,t){e.exports=window.wp.wordcount},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(9),n=c(17);const o=()=>{const{customerData:e,isInitialized:t}=Object(r.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:c,setBillingData:o}=Object(r.useDispatch)(n.CART_STORE_KEY);return{isInitialized:t,billingData:e.billingData,shippingAddress:e.shippingAddress,setBillingData:o,setShippingAddress:c}}},function(e,t,c){"use strict";var r=c(2),n=c(1),o=c(154),a=c(124);const s=Object(r.getSetting)("countryLocale",{}),i=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(n.sprintf)(
+/* translators: %s Field label. */
+Object(n.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(o.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(s).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,i(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...n[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var r=c(0);c(147),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(36),a=c(4),s=c.n(a),i=c(26);c(145);const l=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:l,priceStyle:u={}}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.sprintf)(
+/* translators: %1$s min price, %2$s max price */
+Object(n.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(a),Object(i.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:a,style:u})," — ",Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:i,priceClassName:l,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:i}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",l),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:n,format:a="",maxPrice:i,minPrice:d,price:p,priceClassName:m,priceStyle:b,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const E=g&&p!==g;let _=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",m)});return E?_=Object(r.createElement)(u,{currency:n,price:p,priceClassName:m,priceStyle:b,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}):void 0!==d&&void 0!==i?_=Object(r.createElement)(l,{currency:n,maxPrice:i,minPrice:d,priceClassName:m,priceStyle:b}):p&&(_=Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",m),currency:n,value:p,style:b})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(a,{price:_}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return s}));var r=c(7);let n;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(n||(n={}));const o={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:o,priority:s}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case n.ADD_EVENT_CALLBACK:return i.set(r,{priority:s,callback:o}),{...e,[c]:i};case n.REMOVE_EVENT_CALLBACK:return i.delete(r),{...e,[c]:i}}}},,,,,function(e,t){e.exports=window.wp.warning},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return _})),c.d(t,"a",(function(){return f}));var r=c(0);const n={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},o={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},a={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:n,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},s=(e,t)=>{let{type:c}=t;return Object.values(n).includes(c)?c:e};var i=c(92),l=c(220);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=c(221),p=c(52),m=c(38),b=c(106),g=c(81);const{NONE:O,INVALID_ADDRESS:h,UNKNOWN:j}=n,E=Object(r.createContext)(a),_=()=>Object(r.useContext)(E),f=e=>{let{children:t}=e;const{dispatchActions:c}=Object(p.b)(),{shippingRates:a,isLoadingRates:l,cartErrors:_}=Object(m.a)(),{isSelectingRate:f}=Object(b.a)(),{selectedRates:y}=Object(g.a)(),[k,v]=Object(r.useReducer)(s,O),[w,S]=Object(r.useReducer)(i.b,{}),C=Object(r.useRef)(w),N=Object(r.useMemo)(()=>({onShippingRateSuccess:u(S).onSuccess,onShippingRateFail:u(S).onFail,onShippingRateSelectSuccess:u(S).onSelectSuccess,onShippingRateSelectFail:u(S).onSelectFail}),[S]);Object(r.useEffect)(()=>{C.current=w},[w]),Object(r.useEffect)(()=>{l?c.incrementCalculating():c.decrementCalculating()},[l,c]),Object(r.useEffect)(()=>{f?c.incrementCalculating():c.decrementCalculating()},[f,c]),Object(r.useEffect)(()=>{_.length>0&&_.some(e=>!(!e.code||!Object.values(o).includes(e.code)))?v({type:h}):v({type:O})},[_]);const I=Object(r.useMemo)(()=>({isPristine:k===O,isValid:k===O,hasInvalidAddress:k===h,hasError:k===j||k===h}),[k]);Object(r.useEffect)(()=>{l||0!==a.length&&!I.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:I.hasInvalidAddress,hasError:I.hasError})},[a,l,I.hasError,I.hasInvalidAddress]),Object(r.useEffect)(()=>{!l&&a.length>0&&!I.hasError&&Object(d.a)(C.current,"shipping_rates_success",a)},[a,l,I.hasError]),Object(r.useEffect)(()=>{f||(I.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:I.hasError,hasInvalidAddress:I.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",y.current))},[y,f,I.hasError,I.hasInvalidAddress]);const M={shippingErrorStatus:I,dispatchErrorStatus:v,shippingErrorTypes:n,...N};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(E.Provider,{value:M},t))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(8);function n(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(9),n=c(0),o=c(17),a=c(120),s=c(64);const i=()=>{const e=Object(a.a)(),{dispatchCheckoutEvent:t}=Object(s.a)(),{selectShippingRate:c}=Object(r.useDispatch)(o.CART_STORE_KEY);return{selectShippingRate:Object(n.useCallback)((r,n)=>{c(r,n).then(()=>{t("set-selected-shipping-rate",{shippingRateId:r})}).catch(t=>{e(t)})},[c,t,e]),isSelectingRate:Object(r.useSelect)(e=>e(o.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(14),s=c(4),i=c.n(s);c(144),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",target:l,rel:u,style:d,onClick:p,...m}=e;const b=i()("wc-block-components-product-name",t);if(c){const e=m;return Object(o.createElement)("span",n()({className:b},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(o.createElement)("a",n()({className:b,href:s,target:l},m,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(9);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(r.select)("core/notices").getNotices(),{removeNotice:n}=Object(r.dispatch)("core/notices"),o=c.filter(t=>t.status===e);o.forEach(e=>n(e.id,t))}},function(e,t,c){"use strict";var r=c(0),n=c(86),o=c(59);const a=e=>{const t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),i=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=s(e),n=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(n,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const n=s(e),a=n.slice(0,t);if(c)return Object(o.autop)(i(a,r));const l=a.match(/([\s]+)/g),u=l?l.length:0,d=n.slice(0,t+u);return Object(o.autop)(i(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:i="",style:d={}}=e;const p=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(o.autop)(e),s=Object(n.count)(r,c);if(s<=t)return r;const i=a(r),d=Object(n.count)(i,c);return d<=t?i:"words"===c?l(i,t):u(i,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{style:d,className:i},p)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=c(7),o=c(25),a=c.n(o);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t}=e;const[c,o]=Object(r.useState)({}),i=Object(r.useCallback)(e=>c[e],[c]),l=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{o(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{o({})},[]),p=Object(r.useCallback)(e=>{e&&o(t=>(e=Object(n.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),m=Object(r.useCallback)((e,t)=>{o(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),b={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{m(e,{hidden:!0})},[m]),showValidationError:Object(r.useCallback)(e=>{m(e,{hidden:!1})},[m]),showAllValidationErrors:Object(r.useCallback)(()=>{o(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:l};return Object(r.createElement)(s.Provider,{value:b},t)}},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(128);t.a=e=>{let{checked:t,name:c,onChange:n,option:s}=e;const{value:i,label:l,description:u,secondaryLabel:d,secondaryDescription:p}=s;return Object(r.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${i}`},Object(r.createElement)("input",{id:`${c}-${i}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:i,onChange:e=>n(e.target.value),checked:t,"aria-describedby":o()({[`${c}-${i}__label`]:l,[`${c}-${i}__secondary-label`]:d,[`${c}-${i}__description`]:u,[`${c}-${i}__secondary-description`]:p})}),Object(r.createElement)(a.a,{id:`${c}-${i}`,label:l,secondaryLabel:d,description:u,secondaryDescription:p}))}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0);const n=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(8),s=c(1),i=c(23),l=e=>{let{imageUrl:t=i.m+"/block-error.svg",header:c=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:n,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",n),l&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};c(187);class u extends a.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,showErrorBlock:r=!0,text:n,errorMessagePrefix:a,renderError:s,button:i}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof s?s({errorMessage:u}):Object(o.createElement)(l,{showErrorBlock:r,errorMessage:c?u:null,header:e,imageUrl:t,text:n,errorMessagePrefix:a,button:i}):this.props.children}}t.a=u},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},,function(e,t){},,function(e,t,c){"use strict";var r=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:n,secondaryDescription:o,id:a}=e;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:a&&a+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(r.createElement)("span",{id:a&&a+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},n&&Object(r.createElement)("span",{id:a&&a+"__description",className:"wc-block-components-radio-control__description"},n),o&&Object(r.createElement)("span",{id:a&&a+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a);c(244),t.a=e=>{let{children:t,className:c,headingLevel:r,...a}=e;const i=s()("wc-block-components-title",c),l="h"+r;return Object(o.createElement)(l,n()({className:i},a),t)}},,,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return o})),c.d(t,"a",(function(){return a}));var r=c(0);const n=Object(r.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),o=()=>Object(r.useContext)(n),a=e=>{let{children:t}=e;const[c,o]=Object(r.useState)(!1),a={setIsSuppressed:o,isSuppressed:c};return Object(r.createElement)(n.Provider,{value:a},t)}},,,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:c=null,alt:r=""}=e;return c?Object(o.createElement)("img",{className:i(t),src:c,alt:r}):null},u=c(23);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(124);c(184),t.a=e=>{let{icons:t=[],align:c="center",className:r}=e;const a=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===a.length)return null;const i=s()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},r);return Object(o.createElement)("div",{className:i},a.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(o.createElement)(l,n()({key:"payment-method-icon-"+e.id},t))}))}},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"number"==typeof e},function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(2),l=c(214),u=c(34);class d extends s.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(a.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(a.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const r=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.a,{additionalNotices:r,context:u.c.PAYMENTS})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(10),s=c(115);c(242);const i=e=>{let{className:t="",id:c,selected:n,onChange:l=(()=>{}),options:u=[]}=e;const d=Object(a.useInstanceId)(i),p=c||d;return u.length?Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},u.map(e=>Object(r.createElement)(s.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===n,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=i},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return L})),c.d(t,"a",(function(){return B}));var r=c(0),n=c(57),o=c(9);let a,s;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(a||(a={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(s||(s={}));const i={currentStatus:a.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:a,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:n="",paymentMethods:o={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case a.PRISTINE:return{...i,...e,errorMessage:"",currentStatus:a.PRISTINE};case a.STARTED:return{...e,currentStatus:a.STARTED};case a.ERROR:return e.currentStatus!==a.ERROR?{...e,currentStatus:a.ERROR,errorMessage:n||e.errorMessage}:e;case a.FAILED:return e.currentStatus!==a.FAILED?{...e,currentStatus:a.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:n||e.errorMessage}:e;case a.SUCCESS:return e.currentStatus!==a.SUCCESS?{...e,currentStatus:a.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case a.PROCESSING:return e.currentStatus!==a.PROCESSING?{...e,currentStatus:a.PROCESSING,errorMessage:""}:e;case a.COMPLETE:return e.currentStatus!==a.COMPLETE?{...e,currentStatus:a.COMPLETE}:e;case s.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:o};case s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:o};case s.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case s.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:c||e.paymentMethodData}}},d=c(1),p=c(39),m=c(48),b=c(2),g=c(119),O=c(50),h=c(72),j=c(38),E=c(34),_=c(81);const f=(e,t,c,n)=>{const[a,s]=Object(r.useState)(!1),{isEditor:i}=Object(O.b)(),{selectedRates:l}=Object(_.a)(),{billingData:u,shippingAddress:p}=Object(h.b)(),E=Object(m.a)(l),f=Object(m.a)(c),y=Object(j.a)(),{cartTotals:k,cartIsLoading:v,cartNeedsShipping:w,paymentRequirements:S}=y,C=Object(r.useRef)({cart:y,cartTotals:k,cartNeedsShipping:w,billingData:u,shippingAddress:p,selectedShippingMethods:E,paymentRequirements:S}),{createErrorNotice:N}=Object(o.useDispatch)("core/notices");Object(r.useEffect)(()=>{C.current={cart:y,cartTotals:k,cartNeedsShipping:w,billingData:u,shippingAddress:p,selectedShippingMethods:E,paymentRequirements:S}},[y,k,w,u,p,E,S]);const I=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e{v||M()},[M,y,E,u,v]),a},y=e=>({type:e}),k=e=>({type:a.ERROR,errorMessage:e}),v=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:a.FAILED,errorMessage:t,paymentMethodData:c}},w=e=>{let{paymentMethodData:t}=e;return{type:a.SUCCESS,paymentMethodData:t}},S=e=>({type:s.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:s.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),I=(e,t)=>({type:s.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var M=c(87),R=c(52),x=c(92),P=c(220);var T=c(221),A=c(114);const D=Object(r.createContext)(l),L=()=>Object(r.useContext)(D),B=e=>{let{children:t}=e;const{isProcessing:c,isIdle:s,isCalculating:l,hasError:d}=Object(R.b)(),{isEditor:m,getPreviewData:g}=Object(O.b)(),{setValidationErrors:h}=Object(A.b)(),{createErrorNotice:j,removeNotice:_}=Object(o.useDispatch)("core/notices"),{isSuccessResponse:L,isErrorResponse:B,isFailResponse:U,noticeContexts:F}=Object(E.d)(),[V,z]=Object(r.useReducer)(x.b,{}),{onPaymentProcessing:Y}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(P.a)("payment_processing",e)}),[e]))(z),G=Object(r.useRef)(V);Object(r.useEffect)(()=>{G.current=V},[V]);const[q,H]=Object(r.useReducer)(u,i),{dispatchActions:$,setPaymentStatus:W}=(e=>{const{setBillingData:t,setShippingAddress:c}=Object(M.a)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(I(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(y(a.PRISTINE)),started:()=>e(y(a.STARTED)),processing:()=>e(y(a.PROCESSING)),completed:()=>e(y(a.COMPLETE)),error:t=>e(k(t)),failed:function(c,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),e(v({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),void 0!==typeof o&&null!=o&&o.address&&c(o.address),e(w({paymentMethodData:r}))}}),[e,t,c])}})(H),Q=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:c}=Object(E.d)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})($.setRegisteredPaymentMethods),J=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:c}=Object(E.d)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})($.setRegisteredExpressPaymentMethods),K=Object(r.useMemo)(()=>m?g("previewSavedPaymentMethods"):Q?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const n=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});n.length&&(r[c]=n)}),r}(q.paymentMethods):{},[m,g,Q,q.paymentMethods]),Z=Object(r.useCallback)(e=>{e?j(e,{id:"wc-express-payment-error",context:F.EXPRESS_PAYMENTS}):_("wc-express-payment-error",F.EXPRESS_PAYMENTS)},[j,F.EXPRESS_PAYMENTS,_]),X=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),ee=Object(r.useMemo)(()=>({isPristine:q.currentStatus===a.PRISTINE,isStarted:q.currentStatus===a.STARTED,isProcessing:q.currentStatus===a.PROCESSING,isFinished:[a.ERROR,a.FAILED,a.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===a.ERROR,hasFailed:q.currentStatus===a.FAILED,isSuccessful:q.currentStatus===a.SUCCESS,isDoingExpressPayment:q.currentStatus!==a.PRISTINE&&X}),[q.currentStatus,X]);Object(r.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!Q||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;W().pristine();const c=Object.keys(K).flatMap(e=>K[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,r=`wc-${t}-payment-token`;$.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e,isSavedToken:!0})}else $.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[Q,q.paymentMethods,q.expressPaymentMethods,$,W,q.activePaymentMethod,K]),Object(r.useEffect)(()=>{!c||d||l||ee.isFinished||W().processing()},[c,d,l,ee.isFinished,W]),Object(r.useEffect)(()=>{s&&!ee.isSuccessful&&W().pristine()},[s,ee.isSuccessful,W]),Object(r.useEffect)(()=>{d&&ee.isSuccessful&&W().pristine()},[d,ee.isSuccessful,W]),Object(r.useEffect)(()=>{ee.isProcessing&&(_("wc-payment-error",F.PAYMENTS),Object(T.b)(G.current,"payment_processing",{}).then(e=>{let t,c;var r,n,o,a,s,i;if(e.forEach(e=>{L(e)&&(t=e),(B(e)||U(e))&&(c=e)}),t&&!c)W().success(null===(r=t)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.shippingData);else if(c&&U(c)){var l,u,d,p,m,b;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=c)||void 0===b?void 0:b.messageContext)||F.PAYMENTS}),W().failed(null===(l=c)||void 0===l?void 0:l.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(m=p.meta)||void 0===m?void 0:m.billingData)}else if(c){var g,O;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(O=c)||void 0===O?void 0:O.messageContext)||F.PAYMENTS}),W().error(c.message),h(null===(g=c)||void 0===g?void 0:g.validationErrors)}else W().success()}))},[ee.isProcessing,h,W,_,F.PAYMENTS,L,U,B,j]);const te="object"==typeof q.paymentMethodData&&Object(n.b)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",ce={setPaymentStatus:W,currentStatus:ee,paymentStatuses:a,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:$.setActivePaymentMethod,onPaymentProcessing:Y,customerPaymentMethods:K,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:Q,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:X,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:$.setShouldSavePayment};return Object(r.createElement)(D.Provider,{value:ce},t)}},,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(48),n=c(159);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(n.b)(),s=Object(r.a)(t),i=Object(r.a)(c);return{paymentMethods:e?i:s,isInitialized:e?a:o}},a=()=>o(!1),s=()=>o(!0)},,,,function(e,t){},,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(253),a=c(165),s=c(50),i=c(159),l=c(58),u=c.n(l),d=c(155);t.a=()=>{const{isEditor:e}=Object(s.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:l,paymentMethodData:p,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:g}=Object(a.a)(),O=Object(r.useRef)(l),h=Object(r.useRef)(p),j=Object(r.useCallback)(e=>()=>{O.current=l,h.current=p,m().started(),t(e)},[l,p,t,m]),E=Object(r.useCallback)(()=>{m().pristine(),t(O.current,h.current)},[t,m]),_=Object(r.useCallback)(e=>{m().error(e),c(e),t(O.current,h.current)},[t,m,c]),f=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?_(e):c("")}),[c,_]),y=Object.entries(g),k=y.length>0?y.map(t=>{let[c,n]=t;const o=e?n.edit:n.content;return Object(r.isValidElement)(o)?Object(r.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(r.cloneElement)(o,{...b,onClick:j(c),onClose:E,onError:_,setExpressPaymentError:f})):null}):Object(r.createElement)("li",{key:"noneRegistered"},Object(n.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(r.createElement)(d.a,{isEditor:e},Object(r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(3),a=c(9),s=c(27);t.a=e=>{let{setPageId:t,pageId:c,labels:i}=e;const l=Object(a.useSelect)(e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100}),[])||null;return l?Object(r.createElement)(o.PanelBody,{title:i.title},Object(r.createElement)(o.SelectControl,{label:Object(n.__)("Link to","woo-gutenberg-products-block"),value:c,options:[{label:i.default,value:0},...l.map(e=>({label:Object(s.a)(e,l),value:parseInt(e.id,10)}))],onChange:e=>t(parseInt(e,10))})):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(0),n=c(1),o=c(109),a=c(331),s=c(217);c(245);const i=e=>{let{text:t,url:c="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"}=e;return Object(r.createElement)("div",{className:"wc-block-feedback-prompt"},Object(r.createElement)(o.a,{icon:a.a}),Object(r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(n.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:c,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(n.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(o.a,{icon:s.a,size:16})))},l=()=>Object(r.createElement)(i,{text:Object(n.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})},function(e,t){e.exports=window.wp.plugins},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(1),s=c(44),i=c(77),l=c(119);c(231);var u=e=>{let{className:t,quantity:c=1,minimum:n=1,maximum:u,onChange:d=(()=>{}),step:p=1,itemName:m="",disabled:b}=e;const g=o()("wc-block-components-quantity-selector",t),O=void 0!==u,h=c-p>=n,j=!O||c+p<=u,E=Object(r.useCallback)(e=>{let t=e;O&&(t=Math.min(t,Math.floor(u/p)*p)),t=Math.max(t,Math.ceil(n/p)*p),t=Math.floor(t/p)*p,t!==e&&d(t)},[O,u,n,d,p]),_=Object(l.a)(E,300);Object(r.useLayoutEffect)(()=>{E(c)},[c,E]);const f=Object(r.useCallback)(e=>{const t=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===i.DOWN,r=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===i.UP;t&&h&&(e.preventDefault(),d(c-p)),r&&j&&(e.preventDefault(),d(c+p))},[c,d,j,h,p]);return Object(r.createElement)("div",{className:g},Object(r.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:b,type:"number",step:p,min:n,max:u,value:c,onKeyDown:f,onChange:e=>{let t=parseInt(e.target.value,10);t=isNaN(t)?c:t,t!==c&&(d(t),_(t))},"aria-label":Object(a.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(a.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),m)}),Object(r.createElement)("button",{"aria-label":Object(a.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:b||!h,onClick:()=>{const e=c-p;d(e),Object(s.speak)(Object(a.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(a.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e)),E(e)}},"-"),Object(r.createElement)("button",{"aria-label":Object(a.__)("Increase quantity","woo-gutenberg-products-block"),disabled:b||!j,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=c+p;d(e),Object(s.speak)(Object(a.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(a.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e)),E(e)}},"+"))},d=c(91),p=c(111),m=c(9),b=c(17),g=c(257),O=c(105),h=c(218),j=c(57),E=c(124),_=c(154),f=c(38),y=c(52);var k=c(64),v=c(206),w=c(207),S=c(208),C=c(36),N=c(80),I=e=>{let{currency:t,saleAmount:c,format:n=""}=e;if(!c||c<=0)return null;n.includes("")||(n="",console.error("Price formats need to include the `` tag."));const o=Object(a.sprintf)(
+/* translators: %s will be replaced by the discount amount */
+Object(a.__)("Save %s","woo-gutenberg-products-block"),n);return Object(r.createElement)(N.a,{className:"wc-block-components-sale-badge"},Object(r.createInterpolateElement)(o,{price:Object(r.createElement)(C.a,{currency:t,value:c})}))},M=c(209),R=c(26),x=c(19),P=c(108),T=c(2);const A=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),D=e=>Object(x.mustContain)(e,"");var L=Object(r.forwardRef)((e,t)=>{let{lineItem:c,onRemove:n=(()=>{}),tabIndex:i=null}=e;const{name:l="",catalog_visibility:C="visible",short_description:N="",description:L="",low_stock_remaining:B=null,show_backorder_badge:U=!1,quantity_limits:F={minimum:1,maximum:99,multiple_of:1,editable:!0},sold_individually:V=!1,permalink:z="",images:Y=[],variation:G=[],item_data:q=[],prices:H={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:$={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:W}=c,{quantity:Q,setItemQuantity:J,removeItem:K,isPendingDelete:Z}=(e=>{const t={key:"",quantity:1};(e=>Object(j.a)(e)&&Object(j.b)(e,"key")&&Object(j.b)(e,"quantity")&&Object(E.a)(e.key)&&Object(_.a)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:c="",quantity:n=1}=t,{cartErrors:o}=Object(f.a)(),{dispatchActions:a}=Object(y.b)(),[s,i]=Object(r.useState)(n),[l]=Object(g.a)(s,400),u=Object(O.a)(l),{removeItemFromCart:d,changeCartItemQuantity:p}=Object(m.useDispatch)(b.CART_STORE_KEY);Object(r.useEffect)(()=>i(n),[n]);const k=Object(m.useSelect)(e=>{if(!c)return{quantity:!1,delete:!1};const t=e(b.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}},[c]),v=Object(r.useCallback)(()=>c?d(c).then(()=>(Object(h.c)(),!0)):Promise.resolve(!1),[c,d]);return Object(r.useEffect)(()=>{c&&Object(_.a)(u)&&Number.isFinite(u)&&u!==l&&p(c,l)},[c,p,l,u]),Object(r.useEffect)(()=>(k.delete?a.incrementCalculating():a.decrementCalculating(),()=>{k.delete&&a.decrementCalculating()}),[a,k.delete]),Object(r.useEffect)(()=>(k.quantity||l!==s?a.incrementCalculating():a.decrementCalculating(),()=>{(k.quantity||l!==s)&&a.decrementCalculating()}),[a,k.quantity,l,s]),{isPendingDelete:k.delete,quantity:s,setItemQuantity:i,removeItem:v,cartItemQuantityErrors:o}})(c),{dispatchStoreEvent:X}=Object(k.a)(),{receiveCart:ee,...te}=Object(f.a)(),ce=Object(r.useMemo)(()=>({context:"cart",cartItem:c,cart:te}),[c,te]),re=Object(R.getCurrencyFromPriceResponse)(H),ne=Object(x.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:l,extensions:W,arg:ce}),oe=Object(P.a)({amount:parseInt(H.raw_prices.regular_price,10),precision:H.raw_prices.precision}),ae=Object(P.a)({amount:parseInt(H.raw_prices.price,10),precision:H.raw_prices.precision}),se=oe.subtract(ae),ie=se.multiply(Q),le=Object(R.getCurrencyFromPriceResponse)($);let ue=parseInt($.line_subtotal,10);Object(T.getSetting)("displayCartPricesIncludingTax",!1)&&(ue+=parseInt($.line_subtotal_tax,10));const de=Object(P.a)({amount:ue,precision:le.minorUnit}),pe=Y.length?Y[0]:{},me="hidden"===C||"search"===C,be=Object(x.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:W,arg:ce}),ge=Object(x.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:W,arg:ce,validation:D}),Oe=Object(x.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:W,arg:ce,validation:D}),he=Object(x.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:W,arg:ce,validation:D});return Object(r.createElement)("tr",{className:o()("wc-block-cart-items__row",be,{"is-disabled":Z}),ref:t,tabIndex:i},Object(r.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(j.b)(pe,"alt")||!pe.alt},me?Object(r.createElement)(v.a,{image:pe,fallbackAlt:ne}):Object(r.createElement)("a",{href:z,tabIndex:-1},Object(r.createElement)(v.a,{image:pe,fallbackAlt:ne}))),Object(r.createElement)("td",{className:"wc-block-cart-item__product"},Object(r.createElement)("div",{className:"wc-block-cart-item__wrap"},Object(r.createElement)(p.a,{disabled:Z||me,name:ne,permalink:z}),U?Object(r.createElement)(w.a,null):!!B&&Object(r.createElement)(S.a,{lowStockRemaining:B}),Object(r.createElement)("div",{className:"wc-block-cart-item__prices"},Object(r.createElement)(d.a,{currency:re,regularPrice:A(oe,re),price:A(ae,re),format:Oe})),Object(r.createElement)(I,{currency:re,saleAmount:A(se,re),format:he}),Object(r.createElement)(M.a,{shortDescription:N,fullDescription:L,itemData:q,variation:G}),Object(r.createElement)("div",{className:"wc-block-cart-item__quantity"},!V&&!!F.editable&&Object(r.createElement)(u,{disabled:Z,quantity:Q,minimum:F.minimum,maximum:F.maximum,step:F.multiple_of,onChange:e=>{J(e),X("cart-set-item-quantity",{product:c,quantity:e})},itemName:ne}),Object(r.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:()=>{n(),K(),X("cart-remove-item",{product:c,quantity:Q}),Object(s.speak)(Object(a.sprintf)(
+/* translators: %s refers to the item name in the cart. */
+Object(a.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),ne))},disabled:Z},Object(a.__)("Remove item","woo-gutenberg-products-block"))))),Object(r.createElement)("td",{className:"wc-block-cart-item__total"},Object(r.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(r.createElement)(d.a,{currency:le,format:ge,price:de.getAmount()}),Q>1&&Object(r.createElement)(I,{currency:re,saleAmount:A(ie,re),format:he}))))});const B=[...Array(3)].map((_x,e)=>Object(r.createElement)(L,{lineItem:{},key:e})),U=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(r.createRef)()}),t};t.a=e=>{let{lineItems:t=[],isLoading:c=!1,className:n}=e;const s=Object(r.useRef)(null),i=Object(r.useRef)(U(t));Object(r.useEffect)(()=>{i.current=U(t)},[t]);const l=e=>()=>{null!=i&&i.current&&e&&i.current[e].current instanceof HTMLElement?i.current[e].current.focus():s.current instanceof HTMLElement&&s.current.focus()},u=c?B:t.map((e,c)=>{const n=t.length>c+1?t[c+1].key:null;return Object(r.createElement)(L,{key:e.key,lineItem:e,onRemove:l(n),ref:i.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:o()("wc-block-cart-items",n),ref:s,tabIndex:-1},Object(r.createElement)("thead",null,Object(r.createElement)("tr",{className:"wc-block-cart-items__header"},Object(r.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(r.createElement)("span",null,Object(a.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(a.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(a.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,u))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(1),n=c(9),o=c(17),a=c(14),s=c(38),i=c(0);c(534),c(4),c(19),c(64),c(50);const l=Object(i.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),u=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:r}=Object(i.useContext)(l),n=Object(i.useRef)(e);Object(i.useEffect)(()=>{n.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;n.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),a=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...o,...a,setIsSuppressed:r}};var d=c(114);const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(s.a)(),{createErrorNotice:i}=Object(n.useDispatch)("core/notices"),{addSnackbarNotice:l}=u(),{setValidationErrors:p}=Object(d.b)(),m=Object(n.useSelect)((t,c)=>{let{dispatch:n}=c;const s=t(o.CART_STORE_KEY),u=s.isApplyingCoupon(),d=s.isRemovingCoupon(),{applyCoupon:m,removeCoupon:b,receiveApplyingCoupon:g}=n(o.CART_STORE_KEY);return{applyCoupon:e=>{m(e).then(t=>{!0===t&&l(Object(r.sprintf)(
+/* translators: %s coupon code. */
+Object(r.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{p({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),g("")})},removeCoupon:t=>{b(t).then(e=>{!0===e&&l(Object(r.sprintf)(
+/* translators: %s coupon code. */
+Object(r.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{i(t.message,{id:"coupon-form",context:e}),g("")})},isApplyingCoupon:u,isRemovingCoupon:d}},[i,l]);return{appliedCoupons:t,isLoading:c,...m}}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(44),a=c(69),s=c(19),i=c(433),l=c(38),u=c(50),d=c(4),p=c.n(d),m=c(14),b=c(30),g=c(106),O=c(156),h=c(128),j=c(26),E=c(36),_=c(2);const f=e=>{const t=Object(_.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(m.decodeEntities)(e.name),value:e.rate_id,description:Object(r.createElement)(r.Fragment,null,Number.isFinite(t)&&Object(r.createElement)(E.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(m.decodeEntities)(e.delivery_time))}};var y=e=>{let{className:t="",noResultsMessage:c,onSelectRate:n,rates:o,renderOption:a=f,selectedRate:s}=e;const i=(null==s?void 0:s.rate_id)||"",[l,u]=Object(r.useState)(i);if(Object(r.useEffect)(()=>{i&&u(i)},[i]),0===o.length)return c;if(o.length>1)return Object(r.createElement)(O.a,{className:t,onChange:e=>{u(e),n(e)},selected:l,options:o.map(a)});const{label:d,secondaryLabel:p,description:m,secondaryDescription:b}=a(o[0]);return Object(r.createElement)(h.a,{label:d,secondaryLabel:p,description:m,secondaryDescription:b})};c(241);var k=e=>{let{packageId:t,className:c="",noResultsMessage:o,renderOption:a,packageData:i,collapsible:l=!1,collapse:u=!1,showItems:d=!1}=e;const{selectShippingRate:O}=Object(g.a)(),h=Object(r.createElement)(r.Fragment,null,(d||l)&&Object(r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},i.name),d&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(i.items).map(e=>{const t=Object(m.decodeEntities)(e.name),c=e.quantity;return Object(r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(b.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(n.sprintf)(
+/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
+Object(n._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),j=Object(r.createElement)(y,{className:c,noResultsMessage:o,rates:i.shipping_rates,onSelectRate:e=>O(e,t),selectedRate:i.shipping_rates.find(e=>e.selected),renderOption:a});return l?Object(r.createElement)(s.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!u,title:h},j):Object(r.createElement)("div",{className:p()("wc-block-components-shipping-rates-control__package",c)},h,j)};const v=e=>{let{packages:t,collapse:c,showItems:n,collapsible:o,noResultsMessage:a,renderOption:s}=e;return t.length?Object(r.createElement)(r.Fragment,null,t.map(e=>{let{package_id:t,...i}=e;return Object(r.createElement)(k,{key:t,packageId:t,packageData:i,collapsible:o,collapse:c,showItems:n,noResultsMessage:a,renderOption:s})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:c,className:d,collapsible:p=!1,noResultsMessage:m,renderOption:b,context:g}=e;Object(r.useEffect)(()=>{if(c)return;const e=Object(i.a)(t),r=Object(i.b)(t);1===e?Object(o.speak)(Object(n.sprintf)(
+/* translators: %d number of shipping options found. */
+Object(n._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(o.speak)(Object(n.sprintf)(
+/* translators: %d number of shipping packages packages. */
+Object(n._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(n.sprintf)(
+/* translators: %d number of shipping options available. */
+Object(n._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))},[c,t]);const{extensions:O,receiveCart:h,...j}=Object(l.a)(),E={className:d,collapsible:p,noResultsMessage:m,renderOption:b,extensions:O,cart:j,components:{ShippingRatesControlPackage:k},context:g},{isEditor:_}=Object(u.b)();return Object(r.createElement)(a.a,{isLoading:c,screenReaderLabel:Object(n.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},_?Object(r.createElement)(v,{packages:t,noResultsMessage:m,renderOption:b}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.ExperimentalOrderShippingPackages.Slot,E),Object(r.createElement)(s.ExperimentalOrderShippingPackages,null,Object(r.createElement)(v,{packages:t,noResultsMessage:m,renderOption:b}))))}},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a),i=c(1),l=c(109),u=c(531);c(153);var d=e=>{let{text:t,screenReaderText:c="",element:r="li",className:a="",radius:i="small",children:l=null,...u}=e;const d=r,p=s()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+i),m=Boolean(c&&c!==t);return Object(o.createElement)(d,n()({className:p},u),Object(o.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(o.createElement)("span",{className:"screen-reader-text"},c),l)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:r=!1,onRemove:a=(()=>{}),removeOnAnyClick:p=!1,text:m,screenReaderText:b="",...g}=e;const O=p?"span":"button";if(!t){const e=b&&"string"==typeof b?b:m;t="string"!=typeof e?
+/* translators: Remove chip. */
+Object(i.__)("Remove","woo-gutenberg-products-block"):Object(i.sprintf)(
+/* translators: %s text of the chip to remove. */
+Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const h={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},j=p?h:{},E=p?{"aria-hidden":!0}:h;return Object(o.createElement)(d,n()({},g,j,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:b,text:m}),Object(o.createElement)(O,n()({className:"wc-block-components-chip__remove"},E),Object(o.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},,,,,,function(e,t,c){"use strict";var r=c(0),n=c(11);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0),n=c(114);c(169);const o=e=>{let{errorMessage:t="",propertyName:c="",elementId:o=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(n.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(o)},t))}},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(14),s=c(2);c(180),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(a.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",n()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(80);t.a=()=>Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(n.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(80);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(n.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(n.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";var r=c(0),n=c(7),o=c(14);c(183);var a=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(n.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null},s=c(113),i=c(23),l=e=>{let{className:t,shortDescription:c="",fullDescription:n=""}=e;const o=c||n;return o?Object(r.createElement)(s.a,{className:t,source:o,maxLength:15,countType:i.o.wordCountType||"words"}):null};c(182),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:n=[],variation:o=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(l,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(a,{details:n}),Object(r.createElement)(a,{details:o.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a),i=c(256),l=c(9),u=(c(178),c(139));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:c="default",additionalNotices:r=[]}=e;const{isSuppressed:a}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(c)})),{removeNotice:m}=Object(l.useDispatch)("core/notices"),b=p.filter(e=>"snackbar"!==e.type).concat(r);if(!b.length)return null;const g=s()(t,"wc-block-components-notices");return a?null:Object(o.createElement)("div",{className:g},b.map(e=>Object(o.createElement)(i.a,n()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&m(e.id,c)}}),e.content)))}},,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return i}));const r=window.CustomEvent||null,n=(e,t)=>{let{bubbles:c=!1,cancelable:n=!1,element:o,detail:a={}}=t;if(!r)return;o||(o=document.body);const s=new r(e,{bubbles:c,cancelable:n,detail:a});o.dispatchEvent(s)};let o;const a=()=>{o&&clearTimeout(o),o=setTimeout(()=>{n("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=e=>{let{preserveCartData:t=!1}=e;n("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const o=()=>{n(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,o),()=>jQuery(document).off(e,o)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return o})),c.d(t,"a",(function(){return a}));var r=c(88),n=(c(18),c(2));const o=(e,t)=>Object.keys(n.defaultAddressFields).every(c=>e[c]===t[c]),a=e=>{const t=Object.keys(n.defaultAddressFields),c=Object(r.a)(t,{},e.country),o=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(o[c]="")}),o}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(92);const n=(e,t)=>function(c){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const o=r.a.addEventCallback(e,c,n);return t(o),()=>{t(r.a.removeEventCallback(e,o.id))}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var n=c(34);const o=async(e,t,c)=>{const n=r(e,t),o=[];for(const e of n)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&o.push(t)}catch(e){console.error(e)}return!o.length||o},a=async(e,t,c)=>{const o=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(n.a)(t)||Object(n.b)(t))return o.push(t),o;o.push(t)}catch(e){return console.error(e),o.push({type:"error"}),o}return o}},,,,,,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(0),n=c(194),o=c(2),a=c(123),s=c(159),i=c(101),l=c(72),u=c(52),d=c(1),p=c(15),m=c.n(p),b=c(219),g=c(28),O=c(9);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),n=`wc-${c}-new-payment-method`;return r.push({key:n,value:t}),r},j=(e,t)=>{m.a.setNonce&&"function"==typeof m.a.setNonce&&m.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var E=c(114),_=c(38),f=c(139),y=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:n,isProcessing:o,isBeforeProcessing:a,isComplete:p,orderNotes:y,shouldCreateAccount:k,extensionData:v}=Object(u.b)(),{hasValidationErrors:w}=Object(E.b)(),{shippingErrorStatus:S}=Object(i.b)(),{billingData:C,shippingAddress:N}=Object(l.b)(),{cartNeedsPayment:I,cartNeedsShipping:M,receiveCart:R}=Object(_.a)(),{activePaymentMethod:x,isExpressPaymentMethodActive:P,currentStatus:T,paymentMethodData:A,expressPaymentMethods:D,paymentMethods:L,shouldSavePayment:B}=Object(s.b)(),{setIsSuppressed:U}=Object(f.b)(),{createErrorNotice:F,removeNotice:V}=Object(O.useDispatch)("core/notices"),z=Object(r.useRef)(C),Y=Object(r.useRef)(N),G=Object(r.useRef)(n),[q,H]=Object(r.useState)(!1),$=Object(r.useMemo)(()=>{var e;const t={...D,...L};return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId},[x,D,L]),W=w&&!P||T.hasError||S.hasError,Q=!e&&!W&&(T.isSuccessful||!I)&&o;Object(r.useEffect)(()=>{U(P)},[P,U]),Object(r.useEffect)(()=>{W===e||!o&&!a||P||c.setHasError(W)},[W,e,o,a,P,c]),Object(r.useEffect)(()=>{z.current=C,Y.current=N,G.current=n},[C,N,n]);const J=Object(r.useCallback)(()=>!w&&(T.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!S.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,T.hasError,S.hasError]);Object(r.useEffect)(()=>{let e;return P||(e=t(J,0)),()=>{P||e()}},[t,J,P]),Object(r.useEffect)(()=>{G.current&&(window.location.href=G.current)},[p]);const K=Object(r.useCallback)(async()=>{if(q)return;H(!0),V("checkout");const e=I?{payment_method:$,payment_data:h(A,B,x)}:{},t={billing_address:Object(b.a)(z.current),customer_note:y,create_account:k,...e,extensions:{...v}};M&&(t.shipping_address=Object(b.a)(Y.current)),m()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(j(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),H(!1)}).catch(e=>{try{null!=e&&e.headers&&j(e.headers,c),e.json().then(e=>{var t,r,n;null!==(t=e.data)&&void 0!==t&&t.cart&&R(e.data.cart),F(Object(g.b)(e),{id:"checkout"}),null==e||null===(r=e.additional_errors)||void 0===r||null===(n=r.forEach)||void 0===n||n.call(r,e=>{F(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;F(Object(d.sprintf)(// Translators: %s Error text.
+Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),H(!1)})},[q,V,I,$,A,B,x,y,k,v,M,c,F,R]);return Object(r.useEffect)(()=>{Q&&!q&&K()},[K,Q,q]),null};const k=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(l.a,null,Object(r.createElement)(i.a,null,Object(r.createElement)(s.a,null,t,Object(r.createElement)(a.a,{renderError:o.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(n.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(y,null)))))}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return P}));var r=c(1),n=c(26),o=c(0),a=c(4),s=c.n(a),i=c(11),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),u=c(535),d=c(522),p=c(533),m=c(109),b=c(124),g=c(57);c(234);const O={bank:u.a,bill:d.a,card:p.a,checkPayment:l};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,n=Object(o.useCallback)(e=>r&&Object(b.a)(e)&&Object(g.b)(O,e),[r]),a=s()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(o.createElement)("span",{className:a},n(t)?Object(o.createElement)(m.a,{icon:O[t]}):t,c)},j=c(142),E=c(2),_=c(58),f=c.n(_),y=c(69),k=c(205),v=c(38),w=c(196),S=c(34),C=c(52),N=c(159),I=c(101),M=c(72);const R=(e,t)=>{const c=[],n=(t,c)=>{const r=c+"_tax",n=Object(g.b)(e,c)&&Object(b.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:n,valueWithTax:n+(Object(g.b)(e,r)&&Object(b.a)(e[r])?parseInt(e[r],10):0)}};return c.push(n(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(n(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(n(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(n(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c};var x=c(81);const P=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(C.b)(),{currentStatus:m,activePaymentMethod:b,onPaymentProcessing:g,setExpressPaymentError:O,shouldSavePayment:_}=Object(N.b)(),{shippingErrorStatus:P,shippingErrorTypes:T,onShippingRateSuccess:A,onShippingRateFail:D,onShippingRateSelectSuccess:L,onShippingRateSelectFail:B}=Object(I.b)(),{shippingRates:U,isLoadingRates:F,selectedRates:V,isSelectingRate:z,selectShippingRate:Y,needsShipping:G}=Object(x.a)(),{billingData:q,shippingAddress:H,setShippingAddress:$}=Object(M.b)(),{cartItems:W,cartFees:Q,cartTotals:J,extensions:K}=Object(v.a)(),{appliedCoupons:Z}=Object(w.a)(),{noticeContexts:X,responseTypes:ee}=Object(S.d)(),te=Object(o.useRef)(R(J,G)),ce=Object(o.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)});Object(o.useEffect)(()=>{te.current=R(J,G),ce.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)}},[J,G]);const re=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";f()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),O(e)}),[O]);return{activePaymentMethod:b,billing:{appliedCoupons:Z,billingData:q,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(n.getCurrencyFromPriceResponse)(J),customerId:p,displayPricesIncludingTax:Object(E.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:W,cartFees:Q,extensions:K},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a},components:{LoadingMask:y.a,PaymentMethodIcons:j.a,PaymentMethodLabel:h,ValidationInputError:k.a},emitResponse:{noticeContexts:X,responseTypes:ee},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:g,onShippingRateFail:D,onShippingRateSelectFail:B,onShippingRateSelectSuccess:L,onShippingRateSuccess:A},onSubmit:d,paymentStatus:m,setExpressPaymentError:re,shippingData:{isSelectingRate:z,needsShipping:G,selectedRates:V,setSelectedRates:Y,setShippingAddress:$,shippingAddress:H,shippingRates:U,shippingRatesLoading:F},shippingStatus:{shippingErrorStatus:P,shippingErrorTypes:T},shouldSavePayment:_}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=c(10),o=c(4),a=c.n(o);const s=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t,className:c=""}=e;const[o,i]=(()=>{const[e,{width:t}]=Object(n.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(r.createElement)(s.Provider,{value:l},Object(r.createElement)("div",{className:a()(c,i)},o,t))}},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(4),l=c.n(i),u=c(114),d=c(205),p=c(10),m=c(124),b=c(30);c(186);var g=Object(s.forwardRef)((e,t)=>{let{className:c,id:r,type:a="text",ariaLabel:s,ariaDescribedBy:i,label:u,screenReaderLabel:d,disabled:p,help:m,autoCapitalize:g="off",autoComplete:O="off",value:h="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...y}=e;const[k,v]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":k||h})},Object(o.createElement)("input",n()({type:a,id:r,value:h,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{j(e.target.value)},onFocus:()=>v(!0),onBlur:e=>{_(e.target.value),v(!1)},"aria-label":s||u,disabled:p,"aria-describedby":m&&!i?r+"__help":i,required:E},y)),Object(o.createElement)(b.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!m&&Object(o.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},m),f)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:i,errorId:p,focusOnMount:b=!1,onChange:O,showError:h=!0,errorMessage:j="",value:E="",..._}=e;const[f,y]=Object(s.useState)(!0),k=Object(s.useRef)(null),{getValidationError:v,hideValidationError:w,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),I=void 0!==r?r:"textinput-"+c,M=void 0!==p?p:I,R=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=k.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?C(M):S({[M]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,M,S]);Object(s.useEffect)(()=>{var e;f&&b&&(null===(e=k.current)||void 0===e||e.focus()),y(!1)},[b,f,y]),Object(s.useEffect)(()=>{var e,t;(null===(e=k.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==k.current&&R(!0)},[E,R]),Object(s.useEffect)(()=>()=>{C(M)},[C,M]);const x=v(M)||{};Object(m.a)(j)&&""!==j&&(x.message=j);const P=x.message&&!x.hidden,T=h&&P&&N(M)?N(M):i;return Object(o.createElement)(g,n()({className:l()(t,{"has-error":P}),"aria-invalid":!0===P,id:I,onBlur:()=>{R(!1)},feedback:h&&Object(o.createElement)(d.a,{errorMessage:j,propertyName:M}),ref:k,onChange:e=>{w(M),O(e)},ariaDescribedBy:T,value:E},_))})},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(13);const n=["core/paragraph","core/image","core/separator"],o=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...n]},function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(0),n=c(9),o=c(13),a=c(7);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(r.useRef)(c),l=Object(r.useRef)(s),{insertBlock:u,replaceInnerBlocks:d}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:m}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(o.getBlockType)(e))}),[t,i.current]),b=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>m.filter(e=>e&&(e=>{var t,c,r;let{attributes:n}=e;return Boolean((null===(t=n.lock)||void 0===t?void 0:t.remove)||(null===(c=n.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[m]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&l.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=l.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:b(e,p.length);break;case 0:b(e,0);break;default:const c=l.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});b(e,-1===r?t:r+1)}})}},[t,p,g,d,b])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),n=c(3),o=c(1),a=c(2);const s=[];var i=c(6),l=c.n(i),u=e=>Object(r.createElement)("div",l()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,i]=(e=>{const[t,c]=((e,t)=>{const[c,n]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,n]})("wc-blocks_dismissed_compatibility_notices",s),[n,o]=Object(r.useState)(!1),a=t.includes(e);return Object(r.useEffect)(()=>{o(!a)},[a]),[n,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(a.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(n.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(o.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>i(),finishButtonText:Object(o.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(o.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(1),n=c(23),o=c(2);const a=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(r.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(r._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(r._x)("Beanie","example product in Cart Block","woo-gutenberg-products-block"),quantity:1}],shipping_rates:[{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Free shipping","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"000",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Local pickup","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"200",taxes:"0",rate_id:"local_pickup:1",instance_id:1,meta_data:[],method_id:"local_pickup",selected:!1}]}],s=Object(o.getSetting)("displayCartPricesIncludingTax",!1),i={coupons:[],shipping_rates:Object(o.getSetting)("shippingMethodsExist",!1)?a:[],items:[{key:"1",id:1,quantity:2,name:Object(r.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(r.__)("Warm hat for winter","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:10,src:n.m+"previews/beanie.jpg",thumbnail:n.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(r.__)("Size","woo-gutenberg-products-block"),value:Object(r.__)("Small","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"12000":"10000",regular_price:s?"12000":"10000",sale_price:s?"12000":"10000",raw_prices:{precision:6,price:s?"12000000":"10000000",regular_price:s?"12000000":"10000000",sale_price:s?"12000000":"10000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}},{key:"2",id:2,quantity:1,name:Object(r.__)("Cap","woo-gutenberg-products-block"),short_description:Object(r.__)("Lightweight baseball cap","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:11,src:n.m+"previews/cap.jpg",thumbnail:n.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Orange","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"2400":"2000",regular_price:s?"2400":"2000",sale_price:s?"2400":"2000",raw_prices:{precision:6,price:s?"24000000":"20000000",regular_price:s?"24000000":"20000000",sale_price:s?"24000000":"20000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}}],fees:[{id:"fee",name:Object(r.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:Object(o.getSetting)("shippingEnabled",!0),has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"4000",total_items_tax:"800",total_fees:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,c){"use strict";(function(e){var r=c(0),n=c(1),o=c(4),a=c.n(o),s=c(67),i=c(23),l=c(52),u=c(500),d=c(2);c(424),t.a=t=>{let{checkoutPageId:c,className:o}=t;const p=Object(d.getSetting)("page-"+c,!1),{isCalculating:m}=Object(l.b)(),[b,g]=Object(u.a)(),[O,h]=Object(r.useState)(!1);Object(r.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{h(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const j=Object(r.createElement)(s.a,{className:"wc-block-cart__submit-button",href:p||i.f,disabled:m,onClick:()=>h(!0),showSpinner:O},Object(n.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(r.createElement)("div",{className:a()("wc-block-cart__submit",o)},b,Object(r.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===g&&Object(r.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(423))},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-heading-block","version":"1.0.0","title":"Heading","description":"Shows the heading row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"content":{"type":"string","default":"Cart totals"},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){e.exports=c(466)},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(11);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"nonzero",d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45ZM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2Z"}))," ");t.a=o},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(254);c(230),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-main",n)},c)});t.a=s},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",n)},c)});t.a=s},function(e,t){},,,,,,function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(11);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}));t.a=o},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[])},function(e,t,c){"use strict";var r=c(0),n=c(11);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),Object(r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));t.a=o},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(4),a=c.n(o),s=c(36),i=c(19),l=c(38),u=c(2);c(235),t.a=e=>{let{currency:t,values:c,className:o}=e;const d=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:m}=c,{receiveCart:b,...g}=Object(l.a)(),O=Object(i.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woo-gutenberg-products-block"),extensions:g.extensions,arg:{cart:g}}),h=parseInt(m,10);return Object(r.createElement)(i.TotalsItem,{className:a()("wc-block-components-totals-footer-item",o),currency:t,label:O,value:parseInt(p,10),description:d&&0!==h&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(r.createInterpolateElement)(Object(n.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:h})}))})}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(69),a=c(198),s=c(19),i=c(2);c(236);const l={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:m,total_discount_tax:b}=p,g=parseInt(m,10);if(!g&&0===t.length)return null;const O=parseInt(b,10),h=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+O:g,j=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:t});return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(o.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(
+/* translators: %s Coupon code. */
+Object(n.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(
+/* translators: %s is a coupon code. */
+Object(n.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:h?Object(n.__)("Discount","woo-gutenberg-products-block"):Object(n.__)("Coupons","woo-gutenberg-products-block"),value:h?-1*h:"-"})}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>e.length,n=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(67),a=c(255),s=c(30),i=c(69),l=c(10),u=c(114),d=c(205),p=c(19);c(243),t.a=Object(l.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:l=!1,onSubmit:m=(()=>{})}=e;const[b,g]=Object(r.useState)(""),O=Object(r.useRef)(!1),{getValidationError:h,getValidationErrorId:j}=Object(u.b)(),E=h("coupon");Object(r.useEffect)(()=>{O.current!==c&&(c||!b||E||g(""),O.current=c)},[c,b,E]);const _="wc-block-components-totals-coupon__input-"+t;return Object(r.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:l,title:Object(r.createElement)(s.a,{label:Object(n.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:_})},Object(r.createElement)(i.a,{screenReaderLabel:Object(n.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(r.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(r.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(r.createElement)(a.a,{id:_,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(n.__)("Enter code","woo-gutenberg-products-block"),value:b,ariaDescribedBy:j(_),onChange:e=>{g(e)},focusOnMount:!0,showError:!1}),Object(r.createElement)(o.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!b,showSpinner:c,onClick:e=>{e.preventDefault(),m(b)},type:"submit"},Object(n.__)("Apply","woo-gutenberg-products-block"))),Object(r.createElement)(d.a,{propertyName:"coupon",elementId:_}))))})},function(e,t){},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return m}));var r=c(5),n=c(74),o=c(9),a=c(0),s=c(77),i=c(51),l=c(13);const u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},d=()=>{Object(i.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(o.subscribe)(()=>{var e,t,c,n;const a=Object(o.select)(r.store);if(!a)return;const s=a.getSelectedBlock();s&&(u("wc-lock-selected-block--remove",!(null==s||null===(e=s.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),u("wc-lock-selected-block--move",!(null==s||null===(c=s.attributes)||void 0===c||null===(n=c.lock)||void 0===n||!n.move)))})},p=e=>{let{ref:t}=e;const c=Object(i.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),u=t.current;return Object(a.useEffect)(()=>{if(u&&!c)return u.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{u.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:c}=e;if(!(c instanceof HTMLElement))return;if(t!==s.BACKSPACE&&t!==s.DELETE)return;if(Object(n.isTextField)(c))return;const a=c;void 0!==a.dataset.block&&(e=>{var t,c,n,a,s;if(!e)return!1;const{getBlock:i}=Object(o.select)(r.store),u=i(e);if("boolean"==typeof(null==u||null===(t=u.attributes)||void 0===t||null===(c=t.lock)||void 0===c?void 0:c.remove))return u.attributes.lock.remove;const d=Object(l.getBlockType)(u.name);var p,m,b;return"boolean"==typeof(null==d||null===(n=d.attributes)||void 0===n||null===(a=n.lock)||void 0===a||null===(s=a.default)||void 0===s?void 0:s.remove)&&(null==d||null===(p=d.attributes)||void 0===p||null===(m=p.lock)||void 0===m||null===(b=m.default)||void 0===b?void 0:b.remove)})(a.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},[u,c])},m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object(a.useRef)(),c=Object(r.useBlockProps)({ref:t,...e});return p({ref:t}),c}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(4),a=c.n(o),s=c(5),i=c(204),l=c(109),u=c(68),d=c(13),p=c(193),m=c(3),b=c(281),g=c(23),O=c(123),h=c(50),j=c(248);const E=e=>{let{children:t,redirectUrl:c}=e;return Object(r.createElement)(j.a,{isCart:!0,redirectUrl:c},t)};var _=c(2),f=c(282),y=c(412),k=c(425),v=c(6),w=c.n(v),S=c(19),C=c(414),N=c(279),I=c(280);c(413);const M=Object(r.createContext)({hasDarkControls:!1});var R=c(286);Object(u.d)(R,{icon:{src:Object(r.createElement)(l.a,{icon:y.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),{currentView:n}=Object(h.b)(),{hasDarkControls:o}=Object(r.useContext)(M),i=Object(N.a)(S.innerBlockAreas.FILLED_CART),l=[["woocommerce/cart-items-block",{},[]],["woocommerce/cart-totals-block",{},[]]];return Object(I.a)({clientId:t,registeredBlocks:i,defaultTemplate:l}),Object(r.createElement)("div",w()({},c,{hidden:"woocommerce/filled-cart-block"!==n}),Object(r.createElement)(C.a,{className:a()("wc-block-cart",{"has-dark-controls":o})},Object(r.createElement)(s.InnerBlocks,{allowedBlocks:i,template:l,templateLock:"insert"})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var x=c(532),P=c(415),T=c(287);Object(u.d)(T,{icon:{src:Object(r.createElement)(l.a,{icon:x.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)({className:"wc-block-cart__main"}),n=Object(N.a)(S.innerBlockAreas.CART_ITEMS),o=[["woocommerce/cart-line-items-block",{},[]]];return Object(I.a)({clientId:t,registeredBlocks:n,defaultTemplate:o}),Object(r.createElement)(P.a,c,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:n,template:o,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var A=c(45),D=c(38),L=c(195),B=e=>{let{className:t}=e;const{cartItems:c,cartIsLoading:n}=Object(D.a)();return Object(r.createElement)(L.a,{className:t,lineItems:c,isLoading:n})},U=c(288);Object(u.d)(U,{icon:{src:Object(r.createElement)(l.a,{icon:x.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(A.a,null,Object(r.createElement)(B,{className:c})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var F=c(417);c(416);var V=c(289);Object(u.d)(V,{icon:{src:Object(r.createElement)(l.a,{icon:x.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)({className:"wc-block-cart__sidebar"}),n=Object(N.a)(S.innerBlockAreas.CART_TOTALS),o=[["woocommerce/cart-order-summary-block",{},[]],["woocommerce/cart-express-payment-block",{},[]],["woocommerce/proceed-to-checkout-block",{},[]],["woocommerce/cart-accepted-payment-methods-block",{},[]]];return Object(I.a)({clientId:t,registeredBlocks:n,defaultTemplate:o}),Object(r.createElement)(F.a,c,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:n,template:o,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var z=c(533),Y=c(530),G=c(131),q=c(165),H=c(34),$=c(52),W=c(159),Q=c(214),J=c(69),K=c(191);c(232);var Z=()=>{const{paymentMethods:e,isInitialized:t}=Object(q.a)(),{noticeContexts:c}=Object(H.d)(),{isCalculating:o,isProcessing:a,isAfterProcessing:s,isBeforeProcessing:i,isComplete:l,hasError:u}=Object($.b)(),{currentStatus:d}=Object(W.b)();if(!t||t&&0===Object.keys(e).length)return null;const p=a||s||i||l&&!u;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(J.a,{isLoading:o||p||d.isDoingExpressPayment},Object(r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(Q.a,{context:c.EXPRESS_PAYMENTS}),Object(r.createElement)(K.a,null)))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(n.__)("Or","woo-gutenberg-products-block")))},X=e=>{let{className:t}=e;const{cartNeedsPayment:c}=Object(D.a)();return c?Object(r.createElement)("div",{className:a()("wc-block-cart__payment-options",t)},Object(r.createElement)(Z,null)):null};c(418);const ee=()=>Object(r.createElement)(Y.a,{icon:Object(r.createElement)(l.a,{icon:z.a}),label:Object(n.__)("Express Checkout","woo-gutenberg-products-block"),className:"wp-block-woocommerce-checkout-express-payment-block-placeholder"},Object(r.createElement)("span",{className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__description"},Object(n.__)("Your store doesn't have any Payment Methods that support the Express Checkout Block. If they are added, they will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(G.a,{isPrimary:!0,href:_.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer",className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__button"},Object(n.__)("Configure Payment Methods","woo-gutenberg-products-block")));var te=c(290);Object(u.d)(te,{icon:{src:Object(r.createElement)(l.a,{icon:z.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{paymentMethods:c,isInitialized:n}=Object(q.a)(),o=Object.keys(c).length>0,i=Object(s.useBlockProps)({className:a()({"wp-block-woocommerce-cart-express-payment-block--has-express-payment-methods":o})}),{className:l}=t;return n?Object(r.createElement)("div",i,o?Object(r.createElement)(X,{className:l}):Object(r.createElement)(ee,null)):null},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var ce=c(524),re=c(9),ne=c(192),oe=c(293),ae=c(292);Object(u.d)(ae,{icon:{src:Object(r.createElement)(l.a,{icon:ce.a,className:"wc-block-editor-components-block-icon"})},attributes:{checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}}},edit:e=>{let{attributes:t,setAttributes:c}=e;const o=Object(s.useBlockProps)(),{checkoutPageId:a=0,className:i}=t,{current:l}=Object(r.useRef)(a),u=Object(re.useSelect)(e=>l||e("core/editor").getCurrentPostId(),[l]);return Object(r.createElement)("div",o,Object(r.createElement)(s.InspectorControls,null,!(u===g.c&&0===l)&&Object(r.createElement)(ne.a,{pageId:a,setPageId:e=>c({checkoutPageId:e}),labels:{title:Object(n.__)("Proceed to Checkout button","woo-gutenberg-products-block"),default:Object(n.__)("WooCommerce Checkout Page","woo-gutenberg-products-block")}})),Object(r.createElement)(A.a,null,Object(r.createElement)(oe.a,{checkoutPageId:a,className:i})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())}),c(426);const se=g.j?["core/paragraph",{align:"center",content:Object(n.sprintf)(
+/* translators: %s is the link to the store product directory. */
+Object(n.__)('Browse store.',"woo-gutenberg-products-block"),g.j),dropCap:!1}]:null,ie=[["core/image",{align:"center",url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDBDOC41MDQwMyAwIDAgOC41MDQwMyAwIDE5QzAgMjkuNDk2IDguNTA0MDMgMzggMTkgMzhDMjkuNDk2IDM4IDM4IDI5LjQ5NiAzOCAxOUMzOCA4LjUwNDAzIDI5LjQ5NiAwIDE5IDBaTTI1LjEyOSAxMi44NzFDMjYuNDg1MSAxMi44NzEgMjcuNTgwNiAxMy45NjY1IDI3LjU4MDYgMTUuMzIyNkMyNy41ODA2IDE2LjY3ODYgMjYuNDg1MSAxNy43NzQyIDI1LjEyOSAxNy43NzQyQzIzLjc3MyAxNy43NzQyIDIyLjY3NzQgMTYuNjc4NiAyMi42Nzc0IDE1LjMyMjZDMjIuNjc3NCAxMy45NjY1IDIzLjc3MyAxMi44NzEgMjUuMTI5IDEyLjg3MVpNMTEuNjQ1MiAzMS4yNTgxQzkuNjE0OTIgMzEuMjU4MSA3Ljk2Nzc0IDI5LjY0OTIgNy45Njc3NCAyNy42NTczQzcuOTY3NzQgMjYuMTI1IDEwLjE1MTIgMjMuMDI5OCAxMS4xNTQ4IDIxLjY5NjhDMTEuNCAyMS4zNjczIDExLjg5MDMgMjEuMzY3MyAxMi4xMzU1IDIxLjY5NjhDMTMuMTM5MSAyMy4wMjk4IDE1LjMyMjYgMjYuMTI1IDE1LjMyMjYgMjcuNjU3M0MxNS4zMjI2IDI5LjY0OTIgMTMuNjc1NCAzMS4yNTgxIDExLjY0NTIgMzEuMjU4MVpNMTIuODcxIDE3Ljc3NDJDMTEuNTE0OSAxNy43NzQyIDEwLjQxOTQgMTYuNjc4NiAxMC40MTk0IDE1LjMyMjZDMTAuNDE5NCAxMy45NjY1IDExLjUxNDkgMTIuODcxIDEyLjg3MSAxMi44NzFDMTQuMjI3IDEyLjg3MSAxNS4zMjI2IDEzLjk2NjUgMTUuMzIyNiAxNS4zMjI2QzE1LjMyMjYgMTYuNjc4NiAxNC4yMjcgMTcuNzc0MiAxMi44NzEgMTcuNzc0MlpNMjUuOTEwNSAyOS41ODc5QzI0LjE5NDQgMjcuNTM0NyAyMS42NzM4IDI2LjM1NDggMTkgMjYuMzU0OEMxNy4zNzU4IDI2LjM1NDggMTcuMzc1OCAyMy45MDMyIDE5IDIzLjkwMzJDMjIuNDAxNiAyMy45MDMyIDI1LjYxMTcgMjUuNDA0OCAyNy43ODc1IDI4LjAyNUMyOC44NDQ4IDI5LjI4MTUgMjYuOTI5NCAzMC44MjE0IDI1LjkxMDUgMjkuNTg3OVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=",sizeSlug:"small"}],["core/heading",{textAlign:"center",content:Object(n.__)("Your cart is currently empty!","woo-gutenberg-products-block"),level:2,className:"wc-block-cart__empty-cart__title"}],se,["core/separator",{className:"is-style-dots"}],["core/heading",{textAlign:"center",content:Object(n.__)("New in store","woo-gutenberg-products-block"),level:2}],["woocommerce/product-new",{columns:3,rows:1}]].filter(Boolean);var le=c(294);Object(u.d)(le,{icon:{src:Object(r.createElement)(l.a,{icon:k.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),{currentView:n}=Object(h.b)(),o=Object(N.a)(S.innerBlockAreas.EMPTY_CART);return Object(I.a)({clientId:t,registeredBlocks:o,defaultTemplate:ie}),Object(r.createElement)("div",w()({},c,{hidden:"woocommerce/empty-cart-block"!==n}),Object(r.createElement)(s.InnerBlocks,{template:ie,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var ue=c(142),de=c(427),pe=e=>{let{className:t}=e;const{paymentMethods:c}=Object(q.b)();return Object(r.createElement)(ue.a,{className:t,icons:Object(de.a)(c)})},me=c(295);Object(u.d)(me,{icon:{src:Object(r.createElement)(l.a,{icon:z.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(pe,{className:c}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var be=c(428),ge=c(429),Oe=c(26);const he=()=>{const{extensions:e,receiveCart:t,...c}=Object(D.a)(),n={extensions:e,cart:c,context:"woocommerce/cart"};return Object(r.createElement)(S.ExperimentalOrderMeta.Slot,n)};var je=c(296);Object(u.d)(je,{icon:{src:Object(r.createElement)(l.a,{icon:be.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),{cartTotals:o}=Object(D.a)(),a=Object(Oe.getCurrencyFromPriceResponse)(o),i=Object(N.a)(S.innerBlockAreas.CART_ORDER_SUMMARY),l=[["woocommerce/cart-order-summary-heading-block",{content:Object(n.__)("Cart totals","woo-gutenberg-products-block")},[]],["woocommerce/cart-order-summary-subtotal-block",{},[]],["woocommerce/cart-order-summary-fee-block",{},[]],["woocommerce/cart-order-summary-discount-block",{},[]],["woocommerce/cart-order-summary-coupon-form-block",{},[]],["woocommerce/cart-order-summary-shipping-block",{},[]],["woocommerce/cart-order-summary-taxes-block",{},[]]];return Object(I.a)({clientId:t,registeredBlocks:i,defaultTemplate:l}),Object(r.createElement)("div",c,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:i,template:l}),Object(r.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(r.createElement)(ge.a,{currency:a,values:o})),Object(r.createElement)(he,null))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var Ee=e=>{let{className:t=""}=e;const{cartTotals:c}=Object(D.a)(),n=Object(Oe.getCurrencyFromPriceResponse)(c);return Object(r.createElement)(S.TotalsWrapper,{className:t},Object(r.createElement)(S.Subtotal,{currency:n,values:c}))},_e=c(297);Object(u.d)(_e,{icon:{src:Object(r.createElement)(l.a,{icon:be.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(Ee,{className:c}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var fe=e=>{let{className:t}=e;const{cartFees:c,cartTotals:n}=Object(D.a)(),o=Object(Oe.getCurrencyFromPriceResponse)(n);return Object(r.createElement)(S.TotalsWrapper,{className:t},Object(r.createElement)(S.TotalsFees,{currency:o,cartFees:c}))},ye=c(298);Object(u.d)(ye,{icon:{src:Object(r.createElement)(l.a,{icon:be.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(fe,{className:c}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var ke=c(430),ve=c(196);const we=()=>{const{extensions:e,receiveCart:t,...c}=Object(D.a)(),n={extensions:e,cart:c,context:"woocommerce/cart"};return Object(r.createElement)(S.ExperimentalDiscountsMeta.Slot,n)};var Se=e=>{let{className:t}=e;const{cartTotals:c,cartCoupons:n}=Object(D.a)(),{removeCoupon:o,isRemovingCoupon:a}=Object(ve.a)("wc/cart"),s=Object(Oe.getCurrencyFromPriceResponse)(c);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(S.TotalsWrapper,{className:t},Object(r.createElement)(ke.a,{cartCoupons:n,currency:s,isRemovingCoupon:a,removeCoupon:o,values:c})),Object(r.createElement)(we,null))},Ce=c(299);Object(u.d)(Ce,{icon:{src:Object(r.createElement)(l.a,{icon:be.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(Se,{className:c}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var Ne=c(473),Ie=e=>{let{className:t,isShippingCalculatorEnabled:c}=e;const{cartTotals:n,cartNeedsShipping:o}=Object(D.a)();if(!o)return null;const a=Object(Oe.getCurrencyFromPriceResponse)(n);return Object(r.createElement)(S.TotalsWrapper,{className:t},Object(r.createElement)(Ne.a,{showCalculator:c,showRateSelector:!0,values:n,currency:a}))},Me={isShippingCalculatorEnabled:{type:"boolean",default:Object(_.getSetting)("isShippingCalculatorEnabled",!0)},lock:{type:"object",default:{move:!1,remove:!0}}},Re=c(300);Object(u.d)(Re,{icon:{src:Object(r.createElement)(l.a,{icon:be.a,className:"wc-block-editor-components-block-icon"})},attributes:Me,edit:e=>{let{attributes:t,setAttributes:c}=e;const{isShippingCalculatorEnabled:o,className:a}=t,i=Object(_.getSetting)("shippingEnabled",!0),l=Object(s.useBlockProps)();return Object(r.createElement)("div",l,Object(r.createElement)(s.InspectorControls,null,!!i&&Object(r.createElement)(m.PanelBody,{title:Object(n.__)("Shipping rates","woo-gutenberg-products-block")},Object(r.createElement)(m.ToggleControl,{label:Object(n.__)("Shipping calculator","woo-gutenberg-products-block"),help:Object(n.__)("Allow customers to estimate shipping by entering their address.","woo-gutenberg-products-block"),checked:o,onChange:()=>c({isShippingCalculatorEnabled:!o})}))),Object(r.createElement)(A.a,null,Object(r.createElement)(Ie,{className:a,isShippingCalculatorEnabled:o})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var xe=c(519),Pe=c(434),Te=e=>{let{className:t}=e;const c=Object(_.getSetting)("couponsEnabled",!0),{applyCoupon:n,isApplyingCoupon:o}=Object(ve.a)("wc/cart");return c?Object(r.createElement)(S.TotalsWrapper,{className:t},Object(r.createElement)(Pe.a,{onSubmit:n,isLoading:o})):null},Ae=c(302);Object(u.d)(Ae,{icon:{src:Object(r.createElement)(l.a,{icon:xe.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(A.a,null,Object(r.createElement)(Te,{className:c})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var De=e=>{let{className:t,showRateAfterTaxName:c}=e;const{cartTotals:n}=Object(D.a)();if(Object(_.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(n.total_tax,10)<=0)return null;const o=Object(Oe.getCurrencyFromPriceResponse)(n);return Object(r.createElement)(S.TotalsWrapper,{className:t},Object(r.createElement)(S.TotalsTaxes,{showRateAfterTaxName:c,currency:o,values:n}))},Le={showRateAfterTaxName:{type:"boolean",default:Object(_.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!1}}},Be=c(303);Object(u.d)(Be,{icon:{src:Object(r.createElement)(l.a,{icon:be.a,className:"wc-block-editor-components-block-icon"})},attributes:Le,edit:e=>{let{attributes:t,setAttributes:c}=e;const{className:o,showRateAfterTaxName:a}=t,i=Object(s.useBlockProps)(),l=Object(_.getSetting)("taxesEnabled"),u=Object(_.getSetting)("displayItemizedTaxes",!1),d=Object(_.getSetting)("displayCartPricesIncludingTax",!1);return Object(r.createElement)("div",i,Object(r.createElement)(s.InspectorControls,null,l&&u&&!d&&Object(r.createElement)(m.PanelBody,{title:Object(n.__)("Taxes","woo-gutenberg-products-block")},Object(r.createElement)(m.ToggleControl,{label:Object(n.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(n.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:a,onChange:()=>c({showRateAfterTaxName:!a})}))),Object(r.createElement)(De,{className:o,showRateAfterTaxName:a}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var Ue=c(129);c(435);var Fe=c(304);Object(u.d)(Fe,{icon:{src:Object(r.createElement)(l.a,{icon:be.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t,setAttributes:c}=e;const{content:n="",className:o=""}=t,i=Object(s.useBlockProps)();return Object(r.createElement)("div",i,Object(r.createElement)(Ue.a,{headingLevel:"2",className:a()(o,"wc-block-cart__totals-title")},Object(r.createElement)(s.PlainText,{className:"",value:n,onChange:e=>c({content:e})})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())}),c(436);var Ve=c(437),ze=c(494);Object(Ve.a)();const Ye=["woocommerce/filled-cart-block","woocommerce/empty-cart-block"],Ge=[{view:"woocommerce/filled-cart-block",label:Object(n.__)("Filled Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(l.a,{icon:y.a})},{view:"woocommerce/empty-cart-block",label:Object(n.__)("Empty Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(l.a,{icon:k.a})}],qe=e=>{let{attributes:t,setAttributes:c}=e;const{hasDarkControls:o}=t,{currentPostId:a}=Object(h.b)();return Object(r.createElement)(s.InspectorControls,null,a!==g.c&&Object(r.createElement)(m.Notice,{className:"wc-block-cart__page-notice",isDismissible:!1,status:"warning"},Object(r.createInterpolateElement)(Object(n.__)("If you would like to use this block as your default cart you must update your page settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(_.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(m.PanelBody,{title:Object(n.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(m.ToggleControl,{label:Object(n.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(n.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:o,onChange:()=>c({hasDarkControls:!o})})),Object(r.createElement)(p.a,null))};c(411);const He={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(_.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(_.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}},$e={title:Object(n.__)("Cart","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(l.a,{icon:i.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Shopping cart.","woo-gutenberg-products-block"),supports:{align:["wide"],html:!1,multiple:!1,__experimentalExposeControlsToChildren:!0},example:{attributes:{isPreview:!0}},attributes:He,edit:e=>{let{className:t,attributes:c,setAttributes:o,clientId:i}=e;const{hasDarkControls:l}=c,{currentView:u,component:d}=Object(ze.a)(i,Ge),p=[["woocommerce/filled-cart-block",{},[]],["woocommerce/empty-cart-block",{},[]]],m=Object(Ve.b)({className:a()(t,"wp-block-woocommerce-cart",{"is-editor-preview":c.isPreview})});return Object(I.a)({clientId:i,registeredBlocks:Ye,defaultTemplate:p}),Object(r.createElement)("div",m,Object(r.createElement)(O.a,{header:Object(n.__)("Cart Block Error","woo-gutenberg-products-block"),text:Object(n.__)("There was an error whilst rendering the cart block. If this problem continues, try re-creating the block.","woo-gutenberg-products-block"),showErrorMessage:!0,errorMessagePrefix:Object(n.__)("Error message:","woo-gutenberg-products-block")},Object(r.createElement)(h.a,{currentView:u,previewData:{previewCart:f.a}},Object(r.createElement)(qe,{attributes:c,setAttributes:o}),Object(r.createElement)(s.BlockControls,{__experimentalShareWithChildBlocks:!0},d),Object(r.createElement)(M.Provider,{value:{hasDarkControls:l}},Object(r.createElement)(E,null,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:Ye,template:p,templateLock:!1}))))),Object(r.createElement)(b.a,{blockName:"cart"}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save({className:"is-loading"}),Object(r.createElement)(s.InnerBlocks.Content,null)),deprecated:[{attributes:He,save:e=>{let{attributes:t}=e;return Object(r.createElement)("div",{className:a()("is-loading",t.className)},Object(r.createElement)(s.InnerBlocks.Content,null))},migrate:(e,t)=>{const{checkoutPageId:c,align:r}=e;return[e,[Object(d.createBlock)("woocommerce/filled-cart-block",{align:r},[Object(d.createBlock)("woocommerce/cart-items-block"),Object(d.createBlock)("woocommerce/cart-totals-block",{},[Object(d.createBlock)("woocommerce/cart-order-summary-block",{}),Object(d.createBlock)("woocommerce/cart-express-payment-block"),Object(d.createBlock)("woocommerce/proceed-to-checkout-block",{checkoutPageId:c}),Object(d.createBlock)("woocommerce/cart-accepted-payment-methods-block")])]),Object(d.createBlock)("woocommerce/empty-cart-block",{align:r},t)]]},isEligible:(e,t)=>!t.find(e=>"woocommerce/filled-cart-block"===e.name)}]};Object(u.d)("woocommerce/cart",$e)},,,,,,function(e,t,c){"use strict";var r=c(0),n=c(255),o=c(6),a=c.n(o),s=c(23),i=c(1),l=c(14),u=c(4),d=c.n(u),p=c(10),m=c(545),b=c(114),g=c(205),O=c(57);c(239);var h=Object(p.withInstanceId)(e=>{let{id:t,className:c,label:n,onChange:o,options:a,value:s,required:l=!1,errorMessage:u=Object(i.__)("Please select a value.","woo-gutenberg-products-block"),errorId:p,instanceId:h="0",autoComplete:j="off"}=e;const{getValidationError:E,setValidationErrors:_,clearValidationError:f}=Object(b.b)(),y=Object(r.useRef)(null),k=t||"control-"+h,v=p||k,w=E(v)||{message:"",hidden:!1};return Object(r.useEffect)(()=>(!l||s?f(v):_({[v]:{message:u,hidden:!0}}),()=>{f(v)}),[f,s,v,u,l,_]),Object(r.createElement)("div",{id:k,className:d()("wc-block-components-combobox",c,{"is-active":s,"has-error":w.message&&!w.hidden}),ref:y},Object(r.createElement)(m.a,{className:"wc-block-components-combobox-control",label:n,onChange:o,onFilterValueChange:e=>{if(e.length){const t=Object(O.a)(y.current)?y.current.ownerDocument.activeElement:void 0;if(t&&Object(O.a)(y.current)&&y.current.contains(t))return;const c=e.toLocaleUpperCase(),r=a.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);r&&o(r.value)}},options:a,value:s||"",allowReset:!1,autoComplete:j,"aria-invalid":w.message&&!w.hidden}),Object(r.createElement)(g.a,{propertyName:v}))});c(238);var j=e=>{let{className:t,countries:c,id:n,label:o,onChange:a,value:s="",autoComplete:u="off",required:p=!1,errorId:m,errorMessage:b=Object(i.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(r.useMemo)(()=>Object.entries(c).map(e=>{let[t,c]=e;return{value:t,label:Object(l.decodeEntities)(c)}}),[c]);return Object(r.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(r.createElement)(h,{id:n,label:o,onChange:a,options:g,value:s,errorId:m,errorMessage:b,required:p,autoComplete:u}),"off"!==u&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:s,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);a(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},E=e=>Object(r.createElement)(j,a()({countries:s.h},e)),_=e=>Object(r.createElement)(j,a()({countries:s.a},e));c(240);const f=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var y=e=>{let{className:t,id:c,states:o,country:a,label:s,onChange:u,autoComplete:p="off",value:m="",required:b=!1}=e;const g=o[a],O=Object(r.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(l.decodeEntities)(g[e])})):[],[g]),j=Object(r.useCallback)(e=>{u(O.length>0?f(e,O):e)},[u,O]),E=Object(r.useRef)(m);return Object(r.useEffect)(()=>{E.current!==m&&(E.current=m)},[m]),Object(r.useEffect)(()=>{if(O.length>0&&E.current){const e=f(E.current,O);e!==E.current&&j(e)}},[O,j]),O.length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(h,{className:d()(t,"wc-block-components-state-input"),id:c,label:s,onChange:j,options:O,value:m,errorMessage:Object(i.__)("Please select a state.","woo-gutenberg-products-block"),required:b,autoComplete:p}),"off"!==p&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:m,onChange:e=>j(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(r.createElement)(n.a,{className:t,id:c,label:s,onChange:j,autoComplete:p,value:m,required:b})},k=e=>Object(r.createElement)(y,a()({states:s.i},e)),v=e=>Object(r.createElement)(y,a()({states:s.b},e)),w=c(48),S=c(2),C=c(88);t.a=Object(p.withInstanceId)(e=>{let{id:t="",fields:c=Object.keys(S.defaultAddressFields),fieldConfig:o={},instanceId:a,onChange:s,type:l="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:p,clearValidationError:m}=Object(b.b)(),g=Object(w.a)(c),O=d("shipping-missing-country")||{},h=Object(r.useMemo)(()=>Object(C.a)(g,o,u.country),[g,o,u.country]);return Object(r.useEffect)(()=>{h.forEach(e=>{e.hidden&&u[e.key]&&s({...u,[e.key]:""})})},[h,s,u]),Object(r.useEffect)(()=>{"shipping"===l&&((e,t,c,r)=>{r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(i.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&c("shipping-missing-country")})(u,p,m,!!O.message&&!O.hidden)},[u,O.message,O.hidden,p,m,l]),t=t||a,Object(r.createElement)("div",{id:t,className:"wc-block-components-address-form"},h.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===l?E:_;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>s({...u,country:e,state:""}),errorId:"shipping"===l?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===l?k:v;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>s({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(r.createElement)(n.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>s({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a),i=c(1),l=c(38),u=c(19),d=c(2),p=c(14);const m=e=>{let{selectedShippingRates:t}=e;return Object(o.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(i.__)("via","woo-gutenberg-products-block")," ",Object(p.decodeEntities)(t.join(", ")))};var b=c(256),g=c(197),O=e=>{let{hasRates:t,shippingRates:c,isLoadingRates:r}=e;const n=t?Object(i.__)("Shipping options","woo-gutenberg-products-block"):Object(i.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},n),Object(o.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(o.createElement)(b.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(i.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,isLoadingRates:r,context:"woocommerce/cart"}))},h=c(87),j=c(67),E=c(25),_=c.n(E),f=c(114),y=(c(185),c(472)),k=e=>{let{address:t,onUpdate:c,addressFields:r}=e;const[n,a]=Object(o.useState)(t),{hasValidationErrors:s,showAllValidationErrors:l}=Object(f.b)();return Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(y.a,{fields:r,onChange:a,values:n}),Object(o.createElement)(j.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:_()(n,t),onClick:e=>{if(e.preventDefault(),l(),!s)return c(n)},type:"submit"},Object(i.__)("Update","woo-gutenberg-products-block")))},v=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:r,setShippingAddress:n}=Object(h.a)();return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(k,{address:r,addressFields:c,onUpdate:e=>{n(e),t(e)}}))},w=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(d.getSetting)("shippingCountries",{}),r=Object(d.getSetting)("shippingStates",{}),n="string"==typeof c[t.country]?Object(p.decodeEntities)(c[t.country]):"",a="object"==typeof r[t.country]&&"string"==typeof r[t.country][t.state]?Object(p.decodeEntities)(r[t.country][t.state]):t.state,s=[];s.push(t.postcode.toUpperCase()),s.push(t.city),s.push(a),s.push(n);const l=s.filter(Boolean).join(", ");return l?Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(i.sprintf)(
+/* translators: %s location. */
+Object(i.__)("Shipping to %s","woo-gutenberg-products-block"),l)+" "):null};c(237);const S=e=>{let{label:t=Object(i.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}=e;return Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{r(!c)},"aria-expanded":c},t)},C=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,shippingAddress:n}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{address:n}),t&&Object(o.createElement)(S,{label:Object(i.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}))},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,isCheckout:n=!1}=e;return t?Object(o.createElement)(S,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}):Object(o.createElement)("em",null,n?Object(i.__)("No shipping options available","woo-gutenberg-products-block"):Object(i.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:r=!0,showRateSelector:a=!0,isCheckout:p=!1,className:b}=e;const[g,h]=Object(o.useState)(!1),{shippingAddress:j,cartHasCalculatedShipping:E,shippingRates:_,isLoadingRates:f}=Object(l.a)(),y=Object(d.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),k=_.some(e=>e.shipping_rates.length)||y,w={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:h},S=_.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(o.createElement)("div",{className:s()("wc-block-components-totals-shipping",b)},Object(o.createElement)(u.TotalsItem,{label:Object(i.__)("Shipping","woo-gutenberg-products-block"),value:k&&E?y:Object(o.createElement)(N,n()({showCalculator:r,isCheckout:p},w)),description:k&&E?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(m,{selectedShippingRates:S}),Object(o.createElement)(C,n()({shippingAddress:j,showCalculator:r},w))):null,currency:t}),r&&g&&Object(o.createElement)(v,{onUpdate:()=>{h(!1)}}),a&&E&&Object(o.createElement)(O,{hasRates:k,shippingRates:_,isLoadingRates:f}))}},,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(0),n=c(1),o=c(9),a=c(3),s=c(11),i=Object(r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M12 6a9.77 9.77 0 0 1 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0 1 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 0 1 0 5 2.5 2.5 0 0 1 0-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"})),l=c(109),u=c(5);function d(e,t){return t.find(t=>t.view===e)}const p=(e,t)=>{const c=t[0],[s,p]=Object(r.useState)(c),{selectBlock:m}=Object(o.useDispatch)("core/block-editor"),{getBlock:b,getSelectedBlockClientId:g,getBlockParentsByBlockName:O}=Object(o.select)(u.store),h=g();Object(r.useEffect)(()=>{const e=b(h);if(!e)return;if(s.view===e.name)return;const c=t.map(e=>{let{view:t}=e;return t});if(c.includes(e.name)){const c=d(e.name,t);if(c)return p(c)}const r=O(h,c);if(1!==r.length)return;const n=b(r[0]);if(s.view===n.name)return;const o=d(n.name,t);o&&p(o)},[O,h,b,s.view,t]);const j=Object(r.createElement)(a.ToolbarGroup,null,Object(r.createElement)(a.ToolbarDropdownMenu,{label:Object(n.__)("Switch view","woo-gutenberg-products-block"),text:s.label,icon:Object(r.createElement)(l.a,{icon:i,style:{marginRight:"8px"}}),controls:t.map(t=>({...t,title:Object(r.createElement)("span",null,t.label),isActive:t.view===s.view,onClick:()=>{var c;p(t),m((null===(c=b(e).innerBlocks.find(e=>e.name===t.view))||void 0===c?void 0:c.clientId)||e)}}))}));return{currentView:s.view,component:j}}},,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const n={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},o=()=>{const[e,t]=Object(r.useState)(""),c=Object(r.useRef)(null),o=Object(r.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));return Object(r.useLayoutEffect)(()=>{const e=c.current,t=o.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]),[Object(r.createElement)("div",{"aria-hidden":!0,ref:c,style:n}),e]}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/actions-frontend.js b/build/checkout-blocks/actions-frontend.js
new file mode 100644
index 00000000000..83102e7a531
--- /dev/null
+++ b/build/checkout-blocks/actions-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[29],{132:function(e,t,n){"use strict";var c=n(0);n(188),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},188:function(e,t){},255:function(e,t,n){"use strict";var c=n(11),o=n.n(c),a=n(0),r=n(50),s=n(4),i=n.n(s),l=n(132);n(256),t.a=e=>{let{className:t,showSpinner:n=!1,children:c,variant:s="contained",...u}=e;const b=i()("wc-block-components-button",t,s,{"wc-block-components-button--loading":n});return Object(a.createElement)(r.a,o()({className:b},u),n&&Object(a.createElement)(l.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},c))}},256:function(e,t){},266:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}));var c=n(29),o=n(198);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:r}=Object(o.b)(),s=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:s,isInitialized:e?r:a}},r=()=>a(!1),s=()=>a(!0)},353:function(e,t,n){"use strict";var c=n(0),o=n(14);const a=Object(c.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(o.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.a=a},385:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var c=n(1),o=n(34),a=n(198),r=n(266);const s=()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:n,isProcessing:s,isAfterProcessing:i,isComplete:l,hasError:u}=Object(o.b)(),{paymentMethods:b={}}=Object(r.b)(),{activePaymentMethod:m,currentStatus:d}=Object(a.b)(),p=b[m]||{},w=s||i||n,g=l&&!u;return{submitButtonText:(null==p?void 0:p.placeOrderButtonLabel)||Object(c.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:s||d.isDoingExpressPayment,waitingForProcessing:w,waitingForRedirect:g}}},386:function(e,t){},387:function(e,t){},428:function(e,t,n){"use strict";n.r(t);var c=n(117),o=n(0),a=n(4),r=n.n(a),s=n(2),i=n(1),l=n(44),u=n(103),b=n(14),m=Object(o.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(b.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));n(387);var d=e=>{let{link:t}=e;return Object(o.createElement)("a",{href:t||l.c,className:"wc-block-components-checkout-return-to-cart-button"},Object(o.createElement)(u.a,{icon:m}),Object(i.__)("Return to Cart","woo-gutenberg-products-block"))},p=n(385),w=n(353),g=n(255),O=()=>{const{submitButtonText:e,onSubmit:t,isCalculating:n,isDisabled:c,waitingForProcessing:a,waitingForRedirect:r}=Object(p.a)();return Object(o.createElement)(g.a,{className:"wc-block-components-checkout-place-order-button",onClick:t,disabled:n||c||a||r,showSpinner:a},r?Object(o.createElement)(u.a,{icon:w.a}):e)};n(386);t.default=Object(c.withFilteredAttributes)({cartPageId:{type:"number",default:0},showReturnToCart:{type:"boolean",default:!0},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}})(e=>{let{cartPageId:t,showReturnToCart:n,className:c}=e;return Object(o.createElement)("div",{className:r()("wc-block-checkout__actions",c)},n&&Object(o.createElement)(d,{link:Object(s.getSetting)("page-"+t,!1)}),Object(o.createElement)(O,null))})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js b/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js
new file mode 100644
index 00000000000..fc90fe96daa
--- /dev/null
+++ b/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{21:function(e,t,a){"use strict";var n=a(0),r=a(4),c=a.n(r);t.a=e=>{let t,{label:a,screenReaderLabel:r,wrapperElement:o,wrapperProps:l={}}=e;const s=null!=a,i=null!=r;return!s&&i?(t=o||"span",l={...l,className:c()(l.className,"screen-reader-text")},Object(n.createElement)(t,l,r)):(t=o||n.Fragment,s&&i&&a!==r?Object(n.createElement)(t,l,Object(n.createElement)("span",{"aria-hidden":"true"},a),Object(n.createElement)("span",{className:"screen-reader-text"},r)):Object(n.createElement)(t,l,a))}},253:function(e,t){},254:function(e,t){},257:function(e,t,a){"use strict";var n=a(11),r=a.n(n),c=a(0),o=a(4),l=a.n(o);a(258),t.a=e=>{let{children:t,className:a,headingLevel:n,...o}=e;const s=l()("wc-block-components-title",a),i="h"+n;return Object(c.createElement)(i,r()({className:s},o),t)}},258:function(e,t){},263:function(e,t){},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(191);a(253);const c=e=>{let{errorMessage:t="",propertyName:a="",elementId:c=""}=e;const{getValidationError:o,getValidationErrorId:l}=Object(r.b)();if(!t||"string"!=typeof t){const e=o(a)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:l(c)},t))}},267:function(e,t,a){"use strict";var n=a(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:a=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:r=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:a},showStepNumber:{type:"boolean",default:r}}}},287:function(e,t,a){"use strict";var n=a(0),r=a(4),c=a.n(r),o=a(257);a(263);const l=e=>{let{title:t,stepHeadingContent:a}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!a&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},a))};t.a=e=>{let{id:t,className:a,title:r,legend:o,description:s,children:i,disabled:u=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const p=o||r?"fieldset":"div";return Object(n.createElement)(p,{className:c()(a,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":u}),id:t,disabled:u},!(!o&&!r)&&Object(n.createElement)("legend",{className:"screen-reader-text"},o||r),!!r&&Object(n.createElement)(l,{title:r,stepHeadingContent:b()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!s&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},s),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},289:function(e,t,a){"use strict";var n=a(11),r=a.n(n),c=a(0),o=a(1),l=a(3),s=a(4),i=a.n(s),u=a(191),d=a(265),b=a(13),p=a(59),m=a(21);a(254);var g=Object(l.forwardRef)((e,t)=>{let{className:a,id:n,type:o="text",ariaLabel:l,ariaDescribedBy:s,label:u,screenReaderLabel:d,disabled:b,help:p,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:f,required:j=!1,onBlur:v=(()=>{}),feedback:E,...k}=e;const[y,C]=Object(c.useState)(!1);return Object(c.createElement)("div",{className:i()("wc-block-components-text-input",a,{"is-active":y||O})},Object(c.createElement)("input",r()({type:o,id:n,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{f(e.target.value)},onFocus:()=>C(!0),onBlur:e=>{v(e.target.value),C(!1)},"aria-label":l||u,disabled:b,"aria-describedby":p&&!s?n+"__help":s,required:j},k)),Object(c.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!p&&Object(c.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},p),E)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:a,id:n,ariaDescribedBy:s,errorId:b,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:f="",value:j="",...v}=e;const[E,k]=Object(l.useState)(!0),y=Object(l.useRef)(null),{getValidationError:C,hideValidationError:w,setValidationErrors:N,clearValidationError:_,getValidationErrorId:I}=Object(u.b)(),L=void 0!==n?n:"textinput-"+a,S=void 0!==b?b:L,q=Object(l.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=y.current||null;if(!t)return;t.value=t.value.trim();const a=t.checkValidity();a?_(S):N({[S]:{message:t.validationMessage||Object(o.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[_,S,N]);Object(l.useEffect)(()=>{var e;E&&m&&(null===(e=y.current)||void 0===e||e.focus()),k(!1)},[m,E,k]),Object(l.useEffect)(()=>{var e,t;(null===(e=y.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==y.current&&q(!0)},[j,q]),Object(l.useEffect)(()=>()=>{_(S)},[_,S]);const M=C(S)||{};Object(p.a)(f)&&""!==f&&(M.message=f);const A=M.message&&!M.hidden,B=O&&A&&I(S)?I(S):s;return Object(c.createElement)(g,r()({className:i()(t,{"has-error":A}),"aria-invalid":!0===A,id:L,onBlur:()=>{q(!1)},feedback:O&&Object(c.createElement)(d.a,{errorMessage:f,propertyName:S}),ref:y,onChange:e=>{w(S),h(e)},ariaDescribedBy:B,value:j},v))})},304:function(e,t){},305:function(e,t){},306:function(e,t){},329:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(2),r=a(0),c=a(34),o=a(65),l=a(64);const s=()=>{const{needsShipping:e}=Object(l.a)(),{useShippingAsBilling:t,setUseShippingAsBilling:a}=Object(c.b)(),{billingData:s,setBillingData:i,shippingAddress:u,setShippingAddress:d}=Object(o.a)(),b=Object(r.useCallback)(e=>{i({email:e})},[i]),p=Object(r.useCallback)(e=>{i({phone:e})},[i]),m=Object(r.useCallback)(e=>{d({phone:e})},[d]);return{shippingAddress:u,billingData:s,setShippingAddress:d,setBillingData:i,setEmail:b,setBillingPhone:p,setShippingPhone:m,defaultAddressFields:n.defaultAddressFields,useShippingAsBilling:t,setUseShippingAsBilling:a,showShippingFields:e,showBillingFields:!e||!t}}},330:function(e,t,a){"use strict";var n=a(11),r=a.n(n),c=a(0),o=a(51),l=a(47);const s=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:a={},...n}=e;const i=Object(c.useRef)(null),u=()=>{i.current&&o.focus.focusable.find(i.current).forEach(e=>{s.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(l.a)(u,0,{leading:!0});return Object(c.useLayoutEffect)(()=>{let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(c.createElement)("div",r()({ref:i,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...a}},n),t)}},331:function(e,t,a){"use strict";var n=a(0),r=a(1),c=a(289);t.a=e=>{let{id:t="phone",isRequired:a=!1,value:o="",onChange:l}=e;return Object(n.createElement)(c.a,{id:t,type:"tel",autoComplete:"tel",required:a,label:a?Object(r.__)("Phone","woo-gutenberg-products-block"):Object(r.__)("Phone (optional)","woo-gutenberg-products-block"),value:o,onChange:l})}},390:function(e,t,a){"use strict";var n=a(0),r=a(289),c=a(11),o=a.n(c),l=a(44),s=a(1),i=a(17),u=a(4),d=a.n(u),b=a(13),p=a(427),m=a(191),g=a(265),h=a(61);a(305);var O=Object(b.withInstanceId)(e=>{let{id:t,className:a,label:r,onChange:c,options:o,value:l,required:i=!1,errorMessage:u=Object(s.__)("Please select a value.","woo-gutenberg-products-block"),errorId:b,instanceId:O="0",autoComplete:f="off"}=e;const{getValidationError:j,setValidationErrors:v,clearValidationError:E}=Object(m.b)(),k=Object(n.useRef)(null),y=t||"control-"+O,C=b||y,w=j(C)||{message:"",hidden:!1};return Object(n.useEffect)(()=>(!i||l?E(C):v({[C]:{message:u,hidden:!0}}),()=>{E(C)}),[E,l,C,u,i,v]),Object(n.createElement)("div",{id:y,className:d()("wc-block-components-combobox",a,{"is-active":l,"has-error":w.message&&!w.hidden}),ref:k},Object(n.createElement)(p.a,{className:"wc-block-components-combobox-control",label:r,onChange:c,onFilterValueChange:e=>{if(e.length){const t=Object(h.a)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(h.a)(k.current)&&k.current.contains(t))return;const a=e.toLocaleUpperCase(),n=o.find(e=>e.label.toLocaleUpperCase().startsWith(a)||e.value.toLocaleUpperCase()===a);n&&c(n.value)}},options:o,value:l||"",allowReset:!1,autoComplete:f,"aria-invalid":w.message&&!w.hidden}),Object(n.createElement)(g.a,{propertyName:C}))});a(304);var f=e=>{let{className:t,countries:a,id:r,label:c,onChange:o,value:l="",autoComplete:u="off",required:b=!1,errorId:p,errorMessage:m=Object(s.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(n.useMemo)(()=>Object.entries(a).map(e=>{let[t,a]=e;return{value:t,label:Object(i.decodeEntities)(a)}}),[a]);return Object(n.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(n.createElement)(O,{id:r,label:c,onChange:o,options:g,value:l,errorId:p,errorMessage:m,required:b,autoComplete:u}),"off"!==u&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:l,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),a=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);o(a?a.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},j=e=>Object(n.createElement)(f,o()({countries:l.g},e)),v=e=>Object(n.createElement)(f,o()({countries:l.a},e));a(306);const E=(e,t)=>{const a=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return a?a.value:""};var k=e=>{let{className:t,id:a,states:c,country:o,label:l,onChange:u,autoComplete:b="off",value:p="",required:m=!1}=e;const g=c[o],h=Object(n.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),f=Object(n.useCallback)(e=>{u(h.length>0?E(e,h):e)},[u,h]),j=Object(n.useRef)(p);return Object(n.useEffect)(()=>{j.current!==p&&(j.current=p)},[p]),Object(n.useEffect)(()=>{if(h.length>0&&j.current){const e=E(j.current,h);e!==j.current&&f(e)}},[h,f]),h.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:a,label:l,onChange:f,options:h,value:p,errorMessage:Object(s.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:b}),"off"!==b&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:b,value:p,onChange:e=>f(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(n.createElement)(r.a,{className:t,id:a,label:l,onChange:f,autoComplete:b,value:p,required:m})},y=e=>Object(n.createElement)(k,o()({states:l.h},e)),C=e=>Object(n.createElement)(k,o()({states:l.b},e)),w=a(29),N=a(2),_=a(45);t.a=Object(b.withInstanceId)(e=>{let{id:t="",fields:a=Object.keys(N.defaultAddressFields),fieldConfig:c={},instanceId:o,onChange:l,type:i="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:b,clearValidationError:p}=Object(m.b)(),g=Object(w.a)(a),h=d("shipping-missing-country")||{},O=Object(n.useMemo)(()=>Object(_.a)(g,c,u.country),[g,c,u.country]);return Object(n.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&l({...u,[e.key]:""})})},[O,l,u]),Object(n.useEffect)(()=>{"shipping"===i&&((e,t,a,n)=>{n||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(s.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),n&&e.country&&a("shipping-missing-country")})(u,b,p,!!h.message&&!h.hidden)},[u,h.message,h.hidden,b,p,i]),t=t||o,Object(n.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const a="shipping"===i?j:v;return Object(n.createElement)(a,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>l({...u,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const a="shipping"===i?y:C;return Object(n.createElement)(a,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>l({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(n.createElement)(r.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>l({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/billing-address-frontend.js b/build/checkout-blocks/billing-address-frontend.js
new file mode 100644
index 00000000000..729c2a0b14f
--- /dev/null
+++ b/build/checkout-blocks/billing-address-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[30],{437:function(e,t,i){"use strict";i.r(t);var l=i(0),n=i(4),s=i.n(n),o=i(117),d=i(287),a=i(34),c=i(329),r=i(40),b=i(25),u=i(390),h=i(330),p=i(331),m=e=>{let{showCompanyField:t=!1,showApartmentField:i=!1,showPhoneField:n=!1,requireCompanyField:s=!1,requirePhoneField:o=!1}=e;const{defaultAddressFields:d,billingData:a,setBillingData:m,setBillingPhone:w}=Object(c.a)(),{dispatchCheckoutEvent:g}=Object(r.a)(),{isEditor:j}=Object(b.a)();Object(l.useEffect)(()=>{n||w("")},[n,w]);const F=Object(l.useMemo)(()=>({company:{hidden:!t,required:s},address_2:{hidden:!i}}),[t,s,i]),O=j?h.a:l.Fragment;return Object(l.createElement)(O,null,Object(l.createElement)(u.a,{id:"billing",type:"billing",onChange:e=>{m(e),g("set-billing-address")},values:a,fields:Object.keys(d),fieldConfig:F}),n&&Object(l.createElement)(p.a,{isRequired:o,value:a.phone,onChange:e=>{w(e),g("set-phone-number",{step:"billing"})}}))},w=i(1),g=i(267),j={...Object(g.a)({defaultTitle:Object(w.__)("Billing address","woo-gutenberg-products-block"),defaultDescription:Object(w.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},F=i(138);t.default=Object(o.withFilteredAttributes)(j)(e=>{let{title:t,description:i,showStepNumber:n,children:o,className:r}=e;const{isProcessing:b}=Object(a.b)(),{requireCompanyField:u,requirePhoneField:h,showApartmentField:p,showCompanyField:w,showPhoneField:g}=Object(F.b)(),{showBillingFields:j}=Object(c.a)();return j?Object(l.createElement)(d.a,{id:"billing-fields",disabled:b,className:s()("wc-block-checkout__billing-fields",r),title:t,description:i,showStepNumber:n},Object(l.createElement)(m,{requireCompanyField:u,showApartmentField:p,showCompanyField:w,showPhoneField:g,requirePhoneField:h}),o):null})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/contact-information-frontend.js b/build/checkout-blocks/contact-information-frontend.js
new file mode 100644
index 00000000000..fd8c2ae5c62
--- /dev/null
+++ b/build/checkout-blocks/contact-information-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[31],{21:function(e,t,c){"use strict";var n=c(0),a=c(4),l=c.n(a);t.a=e=>{let t,{label:c,screenReaderLabel:a,wrapperElement:r,wrapperProps:o={}}=e;const s=null!=c,i=null!=a;return!s&&i?(t=r||"span",o={...o,className:l()(o.className,"screen-reader-text")},Object(n.createElement)(t,o,a)):(t=r||n.Fragment,s&&i&&c!==a?Object(n.createElement)(t,o,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},a)):Object(n.createElement)(t,o,c))}},253:function(e,t){},254:function(e,t){},257:function(e,t,c){"use strict";var n=c(11),a=c.n(n),l=c(0),r=c(4),o=c.n(r);c(258),t.a=e=>{let{children:t,className:c,headingLevel:n,...r}=e;const s=o()("wc-block-components-title",c),i="h"+n;return Object(l.createElement)(i,a()({className:s},r),t)}},258:function(e,t){},263:function(e,t){},265:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0),a=c(191);c(253);const l=e=>{let{errorMessage:t="",propertyName:c="",elementId:l=""}=e;const{getValidationError:r,getValidationErrorId:o}=Object(a.b)();if(!t||"string"!=typeof t){const e=r(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:o(l)},t))}},267:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:a}}}},287:function(e,t,c){"use strict";var n=c(0),a=c(4),l=c.n(a),r=c(257);c(263);const o=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(r.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:a,legend:r,description:s,children:i,disabled:u=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const p=r||a?"fieldset":"div";return Object(n.createElement)(p,{className:l()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":u}),id:t,disabled:u},!(!r&&!a)&&Object(n.createElement)("legend",{className:"screen-reader-text"},r||a),!!a&&Object(n.createElement)(o,{title:a,stepHeadingContent:b()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!s&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},s),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},289:function(e,t,c){"use strict";var n=c(11),a=c.n(n),l=c(0),r=c(1),o=c(3),s=c(4),i=c.n(s),u=c(191),d=c(265),b=c(13),p=c(59),m=c(21);c(254);var g=Object(o.forwardRef)((e,t)=>{let{className:c,id:n,type:r="text",ariaLabel:o,ariaDescribedBy:s,label:u,screenReaderLabel:d,disabled:b,help:p,autoCapitalize:g="off",autoComplete:h="off",value:j="",onChange:O,required:f=!1,onBlur:w=(()=>{}),feedback:k,...E}=e;const[v,_]=Object(l.useState)(!1);return Object(l.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":v||j})},Object(l.createElement)("input",a()({type:r,id:n,value:j,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{O(e.target.value)},onFocus:()=>_(!0),onBlur:e=>{w(e.target.value),_(!1)},"aria-label":o||u,disabled:b,"aria-describedby":p&&!s?n+"__help":s,required:f},E)),Object(l.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!p&&Object(l.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},p),k)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:c,id:n,ariaDescribedBy:s,errorId:b,focusOnMount:m=!1,onChange:h,showError:j=!0,errorMessage:O="",value:f="",...w}=e;const[k,E]=Object(o.useState)(!0),v=Object(o.useRef)(null),{getValidationError:_,hideValidationError:N,setValidationErrors:C,clearValidationError:S,getValidationErrorId:y}=Object(u.b)(),A=void 0!==n?n:"textinput-"+c,B=void 0!==b?b:A,D=Object(o.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?S(B):C({[B]:{message:t.validationMessage||Object(r.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[S,B,C]);Object(o.useEffect)(()=>{var e;k&&m&&(null===(e=v.current)||void 0===e||e.focus()),E(!1)},[m,k,E]),Object(o.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&D(!0)},[f,D]),Object(o.useEffect)(()=>()=>{S(B)},[S,B]);const F=_(B)||{};Object(p.a)(O)&&""!==O&&(F.message=O);const I=F.message&&!F.hidden,x=j&&I&&y(B)?y(B):s;return Object(l.createElement)(g,a()({className:i()(t,{"has-error":I}),"aria-invalid":!0===I,id:A,onBlur:()=>{D(!1)},feedback:j&&Object(l.createElement)(d.a,{errorMessage:O,propertyName:B}),ref:v,onChange:e=>{N(B),h(e)},ariaDescribedBy:x,value:f},w))})},329:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(2),a=c(0),l=c(34),r=c(65),o=c(64);const s=()=>{const{needsShipping:e}=Object(o.a)(),{useShippingAsBilling:t,setUseShippingAsBilling:c}=Object(l.b)(),{billingData:s,setBillingData:i,shippingAddress:u,setShippingAddress:d}=Object(r.a)(),b=Object(a.useCallback)(e=>{i({email:e})},[i]),p=Object(a.useCallback)(e=>{i({phone:e})},[i]),m=Object(a.useCallback)(e=>{d({phone:e})},[d]);return{shippingAddress:u,billingData:s,setShippingAddress:d,setBillingData:i,setEmail:b,setBillingPhone:p,setShippingPhone:m,defaultAddressFields:n.defaultAddressFields,useShippingAsBilling:t,setUseShippingAsBilling:c,showShippingFields:e,showBillingFields:!e||!t}}},430:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(4),l=c.n(a),r=c(117),o=c(287),s=c(34),i=c(1),u=c(289),d=c(329),b=c(40),p=c(2),m=c(10),g=e=>{let{allowCreateAccount:t}=e;const{customerId:c,shouldCreateAccount:a,setShouldCreateAccount:l}=Object(s.b)(),{billingData:r,setEmail:o}=Object(d.a)(),{dispatchCheckoutEvent:g}=Object(b.a)(),h=!c&&t&&Object(p.getSetting)("checkoutAllowsGuest",!1)&&Object(p.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(m.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(i.__)("Create an account?","woo-gutenberg-products-block"),checked:a,onChange:e=>l(e)});return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{id:"email",type:"email",label:Object(i.__)("Email address","woo-gutenberg-products-block"),value:r.email,autoComplete:"email",onChange:e=>{o(e),g("set-email-address")},required:!0}),h)},h=c(267),j={...Object(h.a)({defaultTitle:Object(i.__)("Contact information","woo-gutenberg-products-block"),defaultDescription:Object(i.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}};const O=`${c(44).e}?redirect_to=${encodeURIComponent(window.location.href)}`;var f=()=>{const{customerId:e}=Object(s.b)();return!Object(p.getSetting)("checkoutShowLoginReminder",!0)||e?null:Object(n.createElement)(n.Fragment,null,Object(i.__)("Already have an account? ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:O},Object(i.__)("Log in.","woo-gutenberg-products-block")))},w=c(138);t.default=Object(r.withFilteredAttributes)(j)(e=>{let{title:t,description:c,showStepNumber:a,children:r,className:i}=e;const{isProcessing:u}=Object(s.b)(),{allowCreateAccount:d}=Object(w.b)();return Object(n.createElement)(o.a,{id:"contact-fields",disabled:u,className:l()("wc-block-checkout__contact-fields",i),title:t,description:c,showStepNumber:a,stepHeadingContent:()=>Object(n.createElement)(f,null)},Object(n.createElement)(g,{allowCreateAccount:d}),r)})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/express-payment-frontend.js b/build/checkout-blocks/express-payment-frontend.js
new file mode 100644
index 00000000000..02cded41abd
--- /dev/null
+++ b/build/checkout-blocks/express-payment-frontend.js
@@ -0,0 +1,5 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{132:function(e,t,n){"use strict";var c=n(0);n(188),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t,n){"use strict";var c=n(0),s=n(1),o=n(4),a=n.n(o),r=(n(190),n(132));t.a=e=>{let{children:t,className:n,screenReaderLabel:o,showSpinner:i=!1,isLoading:l=!0}=e;return Object(c.createElement)("div",{className:a()(n,{"wc-block-components-loading-mask":l})},l&&i&&Object(c.createElement)(r.a,null),Object(c.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(c.createElement)("span",{className:"screen-reader-text"},o||Object(s.__)("Loading…","woo-gutenberg-products-block")))}},188:function(e,t){},190:function(e,t){},253:function(e,t){},257:function(e,t,n){"use strict";var c=n(11),s=n.n(c),o=n(0),a=n(4),r=n.n(a);n(258),t.a=e=>{let{children:t,className:n,headingLevel:c,...a}=e;const i=r()("wc-block-components-title",n),l="h"+c;return Object(o.createElement)(l,s()({className:i},a),t)}},258:function(e,t){},262:function(e,t){},264:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(1),s=n(7),o=n(5),a=n(17),r=n(30),i=n(0),l=n(242);const p=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(l.b)(),s=Object(i.useRef)(e);Object(i.useEffect)(()=>{s.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),a=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...a,setIsSuppressed:c}};var u=n(191);const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:n}=Object(r.a)(),{createErrorNotice:i}=Object(s.useDispatch)("core/notices"),{addSnackbarNotice:l}=p(),{setValidationErrors:d}=Object(u.b)(),m=Object(s.useSelect)((t,n)=>{let{dispatch:s}=n;const r=t(o.CART_STORE_KEY),p=r.isApplyingCoupon(),u=r.isRemovingCoupon(),{applyCoupon:m,removeCoupon:b,receiveApplyingCoupon:h}=s(o.CART_STORE_KEY);return{applyCoupon:e=>{m(e).then(t=>{!0===t&&l(Object(c.sprintf)(
+/* translators: %s coupon code. */
+Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{d({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),h("")})},removeCoupon:t=>{b(t).then(e=>{!0===e&&l(Object(c.sprintf)(
+/* translators: %s coupon code. */
+Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{i(t.message,{id:"coupon-form",context:e}),h("")})},isApplyingCoupon:p,isRemovingCoupon:u}},[i,l]);return{appliedCoupons:t,isLoading:n,...m}}},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),s=n(191);n(253);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:a,getValidationErrorId:r}=Object(s.b)();if(!t||"string"!=typeof t){const e=a(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:r(o)},t))}},266:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return r}));var c=n(29),s=n(198);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(s.b)(),r=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:r,isInitialized:e?a:o}},a=()=>o(!1),r=()=>o(!0)},269:function(e,t,n){"use strict";var c=n(11),s=n.n(c),o=n(0),a=n(4),r=n.n(a);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:n=null,alt:c=""}=e;return n?Object(o.createElement)("img",{className:i(t),src:n,alt:c}):null},p=n(44);const u=[{id:"alipay",alt:"Alipay",src:p.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.l+"payment-methods/wechat.svg"}];var d=n(59);n(262),t.a=e=>{let{icons:t=[],align:n="center",className:c}=e;const a=(e=>{const t={};return e.forEach(e=>{let n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"==typeof e&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&Object(d.a)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===a.length)return null;const i=r()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===n,"wc-block-components-payment-method-icons--align-right":"right"===n},c);return Object(o.createElement)("div",{className:i},a.map(e=>{const t={...e,...(n=e.id,u.find(e=>e.id===n)||{})};var n;return Object(o.createElement)(l,s()({key:"payment-method-icon-"+e.id},t))}))}},279:function(e,t){},280:function(e,t,n){"use strict";var c=n(18),s=n.n(c),o=n(0),a=n(1),r=n(3),i=n(2),l=n(121),p=n(28);class u extends r.Component{constructor(){super(...arguments),s()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:n}=this.props;if(e){let e=Object(a.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(a.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const c=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.a,{additionalNotices:c,context:p.c.PAYMENTS})}return this.props.children}}u.defaultProps={isEditor:!1},t.a=u},299:function(e,t){},300:function(e,t,n){"use strict";var c=n(0),s=n(1),o=n(332),a=n(266),r=n(25),i=n(198),l=n(31),p=n.n(l),u=n(280);t.a=()=>{const{isEditor:e}=Object(r.a)(),{setActivePaymentMethod:t,setExpressPaymentError:n,activePaymentMethod:l,paymentMethodData:d,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:h}=Object(a.a)(),g=Object(c.useRef)(l),v=Object(c.useRef)(d),j=Object(c.useCallback)(e=>()=>{g.current=l,v.current=d,m().started(),t(e)},[l,d,t,m]),O=Object(c.useCallback)(()=>{m().pristine(),t(g.current,v.current)},[t,m]),y=Object(c.useCallback)(e=>{m().error(e),n(e),t(g.current,v.current)},[t,m,n]),E=Object(c.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";p()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?y(e):n("")}),[n,y]),f=Object.entries(h),k=f.length>0?f.map(t=>{let[n,s]=t;const o=e?s.edit:s.content;return Object(c.isValidElement)(o)?Object(c.createElement)("li",{key:n,id:"express-payment-method-"+n},Object(c.cloneElement)(o,{...b,onClick:j(n),onClose:O,onError:y,setExpressPaymentError:E})):null}):Object(c.createElement)("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(c.createElement)(u.a,{isEditor:e},Object(c.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},327:function(e,t,n){"use strict";var c=n(0),s=n(14);const o=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(s.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));t.a=o},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var c=n(1),s=n(37),o=n(0),a=n(4),r=n.n(a),i=n(14),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{fillRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z",clipRule:"evenodd"})),u=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})),d=n(327),m=n(103),b=n(59),h=n(61);n(279);const g={bank:p,bill:u,card:d.a,checkPayment:l};var v=e=>{let{icon:t="",text:n=""}=e;const c=!!t,s=Object(o.useCallback)(e=>c&&Object(b.a)(e)&&Object(h.b)(g,e),[c]),a=r()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return Object(o.createElement)("span",{className:a},s(t)?Object(o.createElement)(m.a,{icon:g[t]}):t,n)},j=n(269),O=n(2),y=n(31),E=n.n(y),f=n(134),k=n(265),w=n(30),S=n(264),_=n(28),P=n(34),x=n(198),C=n(66),R=n(46);const M=(e,t)=>{const n=[],s=(t,n)=>{const c=n+"_tax",s=Object(h.b)(e,n)&&Object(b.a)(e[n])?parseInt(e[n],10):0;return{key:n,label:t,value:s,valueWithTax:s+(Object(h.b)(e,c)&&Object(b.a)(e[c])?parseInt(e[c],10):0)}};return n.push(s(Object(c.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(s(Object(c.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(s(Object(c.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({key:"total_tax",label:Object(c.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(s(Object(c.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n};var N=n(64);const I=()=>{const{isCalculating:e,isComplete:t,isIdle:n,isProcessing:a,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onSubmit:u,customerId:d}=Object(P.b)(),{currentStatus:m,activePaymentMethod:b,onPaymentProcessing:h,setExpressPaymentError:g,shouldSavePayment:y}=Object(x.b)(),{shippingErrorStatus:I,shippingErrorTypes:T,onShippingRateSuccess:z,onShippingRateFail:A,onShippingRateSelectSuccess:V,onShippingRateSelectFail:L}=Object(C.b)(),{shippingRates:D,isLoadingRates:B,selectedRates:F,isSelectingRate:H,selectShippingRate:W,needsShipping:U}=Object(N.a)(),{billingData:G,shippingAddress:Y,setShippingAddress:J}=Object(R.b)(),{cartItems:K,cartFees:X,cartTotals:q,extensions:Q}=Object(w.a)(),{appliedCoupons:Z}=Object(S.a)(),{noticeContexts:$,responseTypes:ee}=Object(_.d)(),te=Object(o.useRef)(M(q,U)),ne=Object(o.useRef)({label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)});Object(o.useEffect)(()=>{te.current=M(q,U),ne.current={label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)}},[q,U]);const ce=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";E()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),g(e)}),[g]);return{activePaymentMethod:b,billing:{appliedCoupons:Z,billingData:G,cartTotal:ne.current,cartTotalItems:te.current,currency:Object(s.getCurrencyFromPriceResponse)(q),customerId:d,displayPricesIncludingTax:Object(O.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:K,cartFees:X,extensions:Q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:n,isProcessing:a},components:{LoadingMask:f.a,PaymentMethodIcons:j.a,PaymentMethodLabel:v,ValidationInputError:k.a},emitResponse:{noticeContexts:$,responseTypes:ee},eventRegistration:{onCheckoutAfterProcessingWithError:p,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:h,onShippingRateFail:A,onShippingRateSelectFail:L,onShippingRateSelectSuccess:V,onShippingRateSuccess:z},onSubmit:u,paymentStatus:m,setExpressPaymentError:ce,shippingData:{isSelectingRate:H,needsShipping:U,selectedRates:F,setSelectedRates:W,setShippingAddress:J,shippingAddress:Y,shippingRates:D,shippingRatesLoading:B},shippingStatus:{shippingErrorStatus:I,shippingErrorTypes:T},shouldSavePayment:y}}},451:function(e,t,n){"use strict";n.r(t);var c=n(0),s=n(30),o=n(1),a=n(266),r=n(28),i=n(34),l=n(198),p=n(25),u=n(121),d=n(257),m=n(134),b=n(2),h=n(300);n(299);var g=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:n,isBeforeProcessing:s,isComplete:g,hasError:v}=Object(i.b)(),{currentStatus:j}=Object(l.b)(),{paymentMethods:O,isInitialized:y}=Object(a.a)(),{isEditor:E}=Object(p.a)(),{noticeContexts:f}=Object(r.d)();if(!y||y&&0===Object.keys(O).length)return E||b.CURRENT_USER_IS_ADMIN?Object(c.createElement)(u.a,{context:f.EXPRESS_PAYMENTS}):null;const k=t||n||s||g&&!v;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.a,{isLoading:e||k||j.isDoingExpressPayment},Object(c.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(c.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(c.createElement)(d.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(o.__)("Express checkout","woo-gutenberg-products-block"))),Object(c.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(c.createElement)(u.a,{context:f.EXPRESS_PAYMENTS}),Object(c.createElement)("p",null,Object(o.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),Object(c.createElement)(h.a,null)))),Object(c.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(o.__)("Or continue below","woo-gutenberg-products-block")))};t.default=e=>{let{className:t}=e;const{cartNeedsPayment:n}=Object(s.a)();return n?Object(c.createElement)("div",{className:t},Object(c.createElement)(g,null)):null}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/fields-frontend.js b/build/checkout-blocks/fields-frontend.js
new file mode 100644
index 00000000000..6bea2c52c7d
--- /dev/null
+++ b/build/checkout-blocks/fields-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{362:function(c,e,t){"use strict";var n=t(0),o=t(3),a=t(4),s=t.n(a);const r=Object(o.forwardRef)((c,e)=>{let{children:t,className:o=""}=c;return Object(n.createElement)("div",{ref:e,className:s()("wc-block-components-main",o)},t)});e.a=r},378:function(c,e){},414:function(c,e,t){"use strict";t.r(e);var n=t(0),o=t(4),a=t.n(o),s=t(362);t(378),e.default=c=>{let{children:e,className:t}=c;return Object(n.createElement)(s.a,{className:a()("wc-block-checkout__main",t)},Object(n.createElement)("form",{className:"wc-block-components-form wc-block-checkout__form"},e))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-note-frontend.js b/build/checkout-blocks/order-note-frontend.js
new file mode 100644
index 00000000000..d72edf738d9
--- /dev/null
+++ b/build/checkout-blocks/order-note-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[34],{257:function(e,t,c){"use strict";var n=c(11),o=c.n(n),a=c(0),s=c(4),l=c.n(s);c(258),t.a=e=>{let{children:t,className:c,headingLevel:n,...s}=e;const r=l()("wc-block-components-title",c),d="h"+n;return Object(a.createElement)(d,o()({className:r},s),t)}},258:function(e,t){},263:function(e,t){},287:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(257);c(263);const l=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:r,children:d,disabled:b=!1,showStepNumber:i=!0,stepHeadingContent:u=(()=>{})}=e;const p=s||o?"fieldset":"div";return Object(n.createElement)(p,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":i,"wc-block-components-checkout-step--disabled":b}),id:t,disabled:b},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(l,{title:o,stepHeadingContent:u()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!r&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},r),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},d)))}},382:function(e,t){},383:function(e,t){},438:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(4),a=c.n(o),s=c(1),l=c(287),r=c(34),d=c(64),b=c(10);c(383);const i=e=>{let{className:t="",disabled:c=!1,onTextChange:o,placeholder:s,value:l=""}=e;return Object(n.createElement)("textarea",{className:a()("wc-block-components-textarea",t),disabled:c,onChange:e=>{o(e.target.value)},placeholder:s,rows:2,value:l})};c(382);var u=e=>{let{disabled:t,onChange:c,placeholder:o,value:a}=e;const[l,r]=Object(n.useState)(!1),[d,u]=Object(n.useState)("");return Object(n.createElement)("div",{className:"wc-block-checkout__add-note"},Object(n.createElement)(b.CheckboxControl,{disabled:t,label:Object(s.__)("Add a note to your order","woo-gutenberg-products-block"),checked:l,onChange:e=>{r(e),e?a!==d&&c(d):(c(""),u(a))}}),l&&Object(n.createElement)(i,{disabled:t,onTextChange:c,placeholder:o,value:a}))};t.default=e=>{let{className:t}=e;const{needsShipping:c}=Object(d.a)(),{isProcessing:o,orderNotes:b,dispatchActions:i}=Object(r.b)(),{setOrderNotes:p}=i;return Object(n.createElement)(l.a,{id:"order-notes",showStepNumber:!1,className:a()("wc-block-checkout__order-notes",t),disabled:o},Object(n.createElement)(u,{disabled:o,onChange:p,placeholder:c?Object(s.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(s.__)("Notes about your order.","woo-gutenberg-products-block"),value:b}))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-cart-items-frontend.js b/build/checkout-blocks/order-summary-cart-items-frontend.js
new file mode 100644
index 00000000000..a307fb98992
--- /dev/null
+++ b/build/checkout-blocks/order-summary-cart-items-frontend.js
@@ -0,0 +1,9 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[36],{100:function(e,t,c){"use strict";var r=c(11),a=c.n(r),n=c(0),l=c(136),s=c(4),o=c.n(s);c(189);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:s,displayType:m="text",...u}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const b=p/10**r.minorUnit;if(!Number.isFinite(b))return null;const d=o()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),O={...u,...i(r),value:void 0,currency:void 0,onValueChange:void 0},j=s?e=>{const t=+e.value*10**r.minorUnit;s(t)}:()=>{};return Object(n.createElement)(l.a,a()({className:d,displayType:m},O,{value:b,onValueChange:j}))}},189:function(e,t){},21:function(e,t,c){"use strict";var r=c(0),a=c(4),n=c.n(a);t.a=e=>{let t,{label:c,screenReaderLabel:a,wrapperElement:l,wrapperProps:s={}}=e;const o=null!=c,i=null!=a;return!o&&i?(t=l||"span",s={...s,className:n()(s.className,"screen-reader-text")},Object(r.createElement)(t,s,a)):(t=l||r.Fragment,o&&i&&c!==a?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},a)):Object(r.createElement)(t,s,c))}},272:function(e,t,c){"use strict";var r=c(0),a=c(4),n=c.n(a);c(296),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:n()("wc-block-components-product-badge",c)},t)}},274:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(100),l=c(4),s=c.n(l),o=c(37);c(275);const i=e=>{let{currency:t,maxPrice:c,minPrice:l,priceClassName:i,priceStyle:m={}}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)(
+/* translators: %1$s min price, %2$s max price */
+Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(o.formatPrice)(l),Object(o.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:l,style:m})," — ",Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:c,style:m})))},m=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:l,regularPrice:o,priceClassName:i,priceStyle:m,price:u}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:l},e),value:o}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:m},e),value:u}))};t.a=e=>{let{align:t,className:c,currency:a,format:l="",maxPrice:o,minPrice:u,price:p,priceClassName:b,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:g}=e;const _=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const y=O&&p!==O;let f=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",b)});return y?f=Object(r.createElement)(m,{currency:a,price:p,priceClassName:b,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:g}):void 0!==u&&void 0!==o?f=Object(r.createElement)(i,{currency:a,maxPrice:o,minPrice:u,priceClassName:b,priceStyle:d}):p&&(f=Object(r.createElement)(n.a,{className:s()("wc-block-components-product-price__value",b),currency:a,value:p,style:d})),Object(r.createElement)("span",{className:_},Object(r.createInterpolateElement)(l,{price:f}))}},275:function(e,t){},276:function(e,t,c){"use strict";var r=c(11),a=c.n(r),n=c(0),l=c(17),s=c(4),o=c.n(s);c(277),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",target:i,rel:m,style:u,onClick:p,...b}=e;const d=o()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",a()({className:d},e,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(r)}}))}return Object(n.createElement)("a",a()({className:d,href:s,target:i},b,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(r)},style:u}))}},277:function(e,t){},283:function(e,t,c){"use strict";var r=c(0),a=c(114),n=c(115);const l=e=>{const t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),o=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=s(e),a=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(o(a,c))},m=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const a=s(e),l=a.slice(0,t);if(c)return Object(n.autop)(o(l,r));const i=l.match(/([\s]+)/g),m=i?i.length:0,u=a.slice(0,t+m);return Object(n.autop)(o(u,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:o="",style:u={}}=e;const p=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),s=Object(a.count)(r,c);if(s<=t)return r;const o=l(r),u=Object(a.count)(o,c);return u<=t?o:"words"===c?i(o,t):m(o,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{style:u,className:o},p)}},295:function(e,t){},296:function(e,t){},297:function(e,t){},298:function(e,t){},324:function(e,t,c){"use strict";var r=c(11),a=c.n(r),n=c(0),l=c(17),s=c(2);c(295),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(l.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",a()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},325:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(272);t.a=()=>Object(r.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(a.__)("Available on backorder","woo-gutenberg-products-block"))},326:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(272);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(a.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(a.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},336:function(e,t,c){"use strict";var r=c(0),a=c(6),n=c(17);c(298);var l=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(a.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},s=c(283),o=c(44),i=e=>{let{className:t,shortDescription:c="",fullDescription:a=""}=e;const n=c||a;return n?Object(r.createElement)(s.a,{className:t,source:n,maxLength:15,countType:o.n.wordCountType||"words"}):null};c(297),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:a=[],variation:n=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(l,{details:a}),Object(r.createElement)(l,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},389:function(e,t){},431:function(e,t,c){"use strict";c.r(t);var r=c(0),a=c(1),n=c(243),l=c(10),s=c(4),o=c.n(s),i=c(21),m=c(274),u=c(276),p=c(37),b=c(323),d=c(2),O=c(30),j=c(59),g=c(325),_=c(324),y=c(326),f=c(336);const E=e=>Object(l.mustContain)(e,"");var k=e=>{let{cartItem:t}=e;const{images:c,low_stock_remaining:n,show_backorder_badge:s,name:k,permalink:w,prices:v,quantity:N,short_description:h,description:P,item_data:x,variation:C,totals:S,extensions:I}=t,{receiveCart:T,...A}=Object(O.a)(),D=Object(r.useMemo)(()=>({context:"summary",cartItem:t,cart:A}),[t,A]),F=Object(p.getCurrencyFromPriceResponse)(v),L=Object(l.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:k,extensions:I,arg:D}),R=Object(b.a)({amount:parseInt(v.raw_prices.regular_price,10),precision:Object(j.a)(v.raw_prices.precision)?parseInt(v.raw_prices.precision,10):v.raw_prices.precision}).convertPrecision(F.minorUnit).getAmount(),$=Object(b.a)({amount:parseInt(v.raw_prices.price,10),precision:Object(j.a)(v.raw_prices.precision)?parseInt(v.raw_prices.precision,10):v.raw_prices.precision}).convertPrecision(F.minorUnit).getAmount(),V=Object(p.getCurrencyFromPriceResponse)(S);let M=parseInt(S.line_subtotal,10);Object(d.getSetting)("displayCartPricesIncludingTax",!1)&&(M+=parseInt(S.line_subtotal_tax,10));const U=Object(b.a)({amount:M,precision:V.minorUnit}).getAmount(),H=Object(l.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:I,arg:D,validation:E}),W=Object(l.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:I,arg:D,validation:E}),B=Object(l.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:I,arg:D});return Object(r.createElement)("div",{className:o()("wc-block-components-order-summary-item",B)},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__image"},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},Object(r.createElement)(i.a,{label:N.toString(),screenReaderLabel:Object(a.sprintf)(
+/* translators: %d number of products of the same type in the cart */
+Object(a._n)("%d item","%d items",N,"woo-gutenberg-products-block"),N)})),Object(r.createElement)(_.a,{image:c.length?c[0]:{},fallbackAlt:L})),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(r.createElement)(u.a,{disabled:!0,name:L,permalink:w}),Object(r.createElement)(m.a,{currency:F,price:$,regularPrice:R,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:H}),s?Object(r.createElement)(g.a,null):!!n&&Object(r.createElement)(y.a,{lowStockRemaining:n}),Object(r.createElement)(f.a,{shortDescription:h,fullDescription:P,itemData:x,variation:C})),Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)(
+/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */
+Object(a._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",N,"woo-gutenberg-products-block"),N,L,Object(p.formatPrice)(U,V))),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},Object(r.createElement)(m.a,{currency:V,format:W,price:U})))};c(389);var w=e=>{let{cartItems:t=[]}=e;const{isLarge:c,hasContainerWidth:s}=Object(n.b)();return s?Object(r.createElement)(l.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:Object(r.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(a.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(r.createElement)("div",{className:"wc-block-components-order-summary__content"},t.map(e=>Object(r.createElement)(k,{key:e.key,cartItem:e})))):null};t.default=e=>{let{className:t}=e;const{cartItems:c}=Object(O.a)();return Object(r.createElement)(l.TotalsWrapper,{className:t},Object(r.createElement)(w,{cartItems:c}))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-coupon-form-frontend.js b/build/checkout-blocks/order-summary-coupon-form-frontend.js
new file mode 100644
index 00000000000..e9c0c31defb
--- /dev/null
+++ b/build/checkout-blocks/order-summary-coupon-form-frontend.js
@@ -0,0 +1,5 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[37],{132:function(e,t,n){"use strict";var c=n(0);n(188),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t,n){"use strict";var c=n(0),o=n(1),a=n(4),r=n.n(a),s=(n(190),n(132));t.a=e=>{let{children:t,className:n,screenReaderLabel:a,showSpinner:l=!1,isLoading:i=!0}=e;return Object(c.createElement)("div",{className:r()(n,{"wc-block-components-loading-mask":i})},i&&l&&Object(c.createElement)(s.a,null),Object(c.createElement)("div",{className:r()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(c.createElement)("span",{className:"screen-reader-text"},a||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},188:function(e,t){},190:function(e,t){},21:function(e,t,n){"use strict";var c=n(0),o=n(4),a=n.n(o);t.a=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:r,wrapperProps:s={}}=e;const l=null!=n,i=null!=o;return!l&&i?(t=r||"span",s={...s,className:a()(s.className,"screen-reader-text")},Object(c.createElement)(t,s,o)):(t=r||c.Fragment,l&&i&&n!==o?Object(c.createElement)(t,s,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},o)):Object(c.createElement)(t,s,n))}},253:function(e,t){},254:function(e,t){},255:function(e,t,n){"use strict";var c=n(11),o=n.n(c),a=n(0),r=n(50),s=n(4),l=n.n(s),i=n(132);n(256),t.a=e=>{let{className:t,showSpinner:n=!1,children:c,variant:s="contained",...u}=e;const b=l()("wc-block-components-button",t,s,{"wc-block-components-button--loading":n});return Object(a.createElement)(r.a,o()({className:b},u),n&&Object(a.createElement)(i.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},c))}},256:function(e,t){},264:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var c=n(1),o=n(7),a=n(5),r=n(17),s=n(30),l=n(0),i=n(242);const u=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(i.b)(),o=Object(l.useRef)(e);Object(l.useEffect)(()=>{o.current=e},[e]);const a=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...a,...r,setIsSuppressed:c}};var b=n(191);const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:n}=Object(s.a)(),{createErrorNotice:l}=Object(o.useDispatch)("core/notices"),{addSnackbarNotice:i}=u(),{setValidationErrors:p}=Object(b.b)(),d=Object(o.useSelect)((t,n)=>{let{dispatch:o}=n;const s=t(a.CART_STORE_KEY),u=s.isApplyingCoupon(),b=s.isRemovingCoupon(),{applyCoupon:d,removeCoupon:m,receiveApplyingCoupon:O}=o(a.CART_STORE_KEY);return{applyCoupon:e=>{d(e).then(t=>{!0===t&&i(Object(c.sprintf)(
+/* translators: %s coupon code. */
+Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{p({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),O("")})},removeCoupon:t=>{m(t).then(e=>{!0===e&&i(Object(c.sprintf)(
+/* translators: %s coupon code. */
+Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{l(t.message,{id:"coupon-form",context:e}),O("")})},isApplyingCoupon:u,isRemovingCoupon:b}},[l,i]);return{appliedCoupons:t,isLoading:n,...d}}},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var c=n(0),o=n(191);n(253);const a=e=>{let{errorMessage:t="",propertyName:n="",elementId:a=""}=e;const{getValidationError:r,getValidationErrorId:s}=Object(o.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:s(a)},t))}},289:function(e,t,n){"use strict";var c=n(11),o=n.n(c),a=n(0),r=n(1),s=n(3),l=n(4),i=n.n(l),u=n(191),b=n(265),p=n(13),d=n(59),m=n(21);n(254);var O=Object(s.forwardRef)((e,t)=>{let{className:n,id:c,type:r="text",ariaLabel:s,ariaDescribedBy:l,label:u,screenReaderLabel:b,disabled:p,help:d,autoCapitalize:O="off",autoComplete:j="off",value:g="",onChange:f,required:E=!1,onBlur:v=(()=>{}),feedback:h,...w}=e;const[_,k]=Object(a.useState)(!1);return Object(a.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":_||g})},Object(a.createElement)("input",o()({type:r,id:c,value:g,ref:t,autoCapitalize:O,autoComplete:j,onChange:e=>{f(e.target.value)},onFocus:()=>k(!0),onBlur:e=>{v(e.target.value),k(!1)},"aria-label":s||u,disabled:p,"aria-describedby":d&&!l?c+"__help":l,required:E},w)),Object(a.createElement)(m.a,{label:u,screenReaderLabel:b||u,wrapperElement:"label",wrapperProps:{htmlFor:c},htmlFor:c}),!!d&&Object(a.createElement)("p",{id:c+"__help",className:"wc-block-components-text-input__help"},d),h)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:n,id:c,ariaDescribedBy:l,errorId:p,focusOnMount:m=!1,onChange:j,showError:g=!0,errorMessage:f="",value:E="",...v}=e;const[h,w]=Object(s.useState)(!0),_=Object(s.useRef)(null),{getValidationError:k,hideValidationError:N,setValidationErrors:C,clearValidationError:y,getValidationErrorId:S}=Object(u.b)(),I=void 0!==c?c:"textinput-"+n,R=void 0!==p?p:I,L=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=_.current||null;if(!t)return;t.value=t.value.trim();const n=t.checkValidity();n?y(R):C({[R]:{message:t.validationMessage||Object(r.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[y,R,C]);Object(s.useEffect)(()=>{var e;h&&m&&(null===(e=_.current)||void 0===e||e.focus()),w(!1)},[m,h,w]),Object(s.useEffect)(()=>{var e,t;(null===(e=_.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==_.current&&L(!0)},[E,L]),Object(s.useEffect)(()=>()=>{y(R)},[y,R]);const V=k(R)||{};Object(d.a)(f)&&""!==f&&(V.message=f);const B=V.message&&!V.hidden,x=g&&B&&S(R)?S(R):l;return Object(a.createElement)(O,o()({className:i()(t,{"has-error":B}),"aria-invalid":!0===B,id:I,onBlur:()=>{L(!1)},feedback:g&&Object(a.createElement)(b.a,{errorMessage:f,propertyName:R}),ref:_,onChange:e=>{N(R),j(e)},ariaDescribedBy:x,value:E},v))})},303:function(e,t){},372:function(e,t,n){"use strict";var c=n(0),o=n(1),a=n(255),r=n(289),s=n(21),l=n(134),i=n(13),u=n(191),b=n(265),p=n(10);n(303),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:n=!1,initialOpen:i=!1,onSubmit:d=(()=>{})}=e;const[m,O]=Object(c.useState)(""),j=Object(c.useRef)(!1),{getValidationError:g,getValidationErrorId:f}=Object(u.b)(),E=g("coupon");Object(c.useEffect)(()=>{j.current!==n&&(n||!m||E||O(""),j.current=n)},[n,m,E]);const v="wc-block-components-totals-coupon__input-"+t;return Object(c.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(c.createElement)(s.a,{label:Object(o.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:v})},Object(c.createElement)(l.a,{screenReaderLabel:Object(o.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:n,showSpinner:!1},Object(c.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(c.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(c.createElement)(r.a,{id:v,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(o.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:f(v),onChange:e=>{O(e)},focusOnMount:!0,showError:!1}),Object(c.createElement)(a.a,{className:"wc-block-components-totals-coupon__button",disabled:n||!m,showSpinner:n,onClick:e=>{e.preventDefault(),d(m)},type:"submit"},Object(o.__)("Apply","woo-gutenberg-products-block"))),Object(c.createElement)(b.a,{propertyName:"coupon",elementId:v}))))})},457:function(e,t,n){"use strict";n.r(t);var c=n(0),o=n(372),a=n(264),r=n(2),s=n(10);t.default=e=>{let{className:t=""}=e;const n=Object(r.getSetting)("couponsEnabled",!0),{applyCoupon:l,isApplyingCoupon:i}=Object(a.a)("wc/checkout");return n?Object(c.createElement)(s.TotalsWrapper,{className:t},Object(c.createElement)(o.a,{onSubmit:l,isLoading:i})):null}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-discount-frontend.js b/build/checkout-blocks/order-summary-discount-frontend.js
new file mode 100644
index 00000000000..a61fb65c0a7
--- /dev/null
+++ b/build/checkout-blocks/order-summary-discount-frontend.js
@@ -0,0 +1,13 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[38],{119:function(e,t){},132:function(e,t,c){"use strict";var o=c(0);c(188),t.a=()=>Object(o.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t,c){"use strict";var o=c(0),n=c(1),s=c(4),a=c.n(s),r=(c(190),c(132));t.a=e=>{let{children:t,className:c,screenReaderLabel:s,showSpinner:l=!1,isLoading:i=!0}=e;return Object(o.createElement)("div",{className:a()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(o.createElement)(r.a,null),Object(o.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(o.createElement)("span",{className:"screen-reader-text"},s||Object(n.__)("Loading…","woo-gutenberg-products-block")))}},188:function(e,t){},190:function(e,t){},193:function(e,t,c){"use strict";var o=c(0),n=c(14);const s=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},197:function(e,t,c){"use strict";var o=c(11),n=c.n(o),s=c(0),a=c(4),r=c.n(a),l=c(1),i=c(103),u=c(193);c(119);var p=e=>{let{text:t,screenReaderText:c="",element:o="li",className:a="",radius:l="small",children:i=null,...u}=e;const p=o,b=r()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+l),m=Boolean(c&&c!==t);return Object(s.createElement)(p,n()({className:b},u),Object(s.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(s.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:o=!1,onRemove:a=(()=>{}),removeOnAnyClick:b=!1,text:m,screenReaderText:d="",...O}=e;const g=b?"span":"button";if(!t){const e=d&&"string"==typeof d?d:m;t="string"!=typeof e?
+/* translators: Remove chip. */
+Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(
+/* translators: %s text of the chip to remove. */
+Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:o,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},v=b?j:{},k=b?{"aria-hidden":!0}:j;return Object(s.createElement)(p,n()({},O,v,{className:r()(c,"is-removable"),element:b?"button":O.element,screenReaderText:d,text:m}),Object(s.createElement)(g,n()({className:"wc-block-components-chip__remove"},k),Object(s.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},264:function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var o=c(1),n=c(7),s=c(5),a=c(17),r=c(30),l=c(0),i=c(242);const u=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:o}=Object(i.b)(),n=Object(l.useRef)(e);Object(l.useEffect)(()=>{n.current=e},[e]);const s=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;n.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),a=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...s,...a,setIsSuppressed:o}};var p=c(191);const b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(r.a)(),{createErrorNotice:l}=Object(n.useDispatch)("core/notices"),{addSnackbarNotice:i}=u(),{setValidationErrors:b}=Object(p.b)(),m=Object(n.useSelect)((t,c)=>{let{dispatch:n}=c;const r=t(s.CART_STORE_KEY),u=r.isApplyingCoupon(),p=r.isRemovingCoupon(),{applyCoupon:m,removeCoupon:d,receiveApplyingCoupon:O}=n(s.CART_STORE_KEY);return{applyCoupon:e=>{m(e).then(t=>{!0===t&&i(Object(o.sprintf)(
+/* translators: %s coupon code. */
+Object(o.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),O("")})},removeCoupon:t=>{d(t).then(e=>{!0===e&&i(Object(o.sprintf)(
+/* translators: %s coupon code. */
+Object(o.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{l(t.message,{id:"coupon-form",context:e}),O("")})},isApplyingCoupon:u,isRemovingCoupon:p}},[l,i]);return{appliedCoupons:t,isLoading:c,...m}}},302:function(e,t){},371:function(e,t,c){"use strict";var o=c(0),n=c(1),s=c(134),a=c(197),r=c(10),l=c(2);c(302);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:p,values:b}=e;const{total_discount:m,total_discount_tax:d}=b,O=parseInt(m,10);if(!O&&0===t.length)return null;const g=parseInt(d,10),j=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?O+g:O,v=Object(r.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(o.createElement)(r.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==v.length&&Object(o.createElement)(s.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(o.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},v.map(e=>Object(o.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(
+/* translators: %s Coupon code. */
+Object(n.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{p(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(
+/* translators: %s is a coupon code. */
+Object(n.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:j?Object(n.__)("Discount","woo-gutenberg-products-block"):Object(n.__)("Coupons","woo-gutenberg-products-block"),value:j?-1*j:"-"})}},456:function(e,t,c){"use strict";c.r(t);var o=c(0),n=c(371),s=c(37),a=c(30),r=c(264),l=c(10);const i=()=>{const{extensions:e,receiveCart:t,...c}=Object(a.a)(),n={extensions:e,cart:c,context:"woocommerce/checkout"};return Object(o.createElement)(l.ExperimentalDiscountsMeta.Slot,n)};t.default=e=>{let{className:t=""}=e;const{cartTotals:c,cartCoupons:u}=Object(a.a)(),{removeCoupon:p,isRemovingCoupon:b}=Object(r.a)("wc/checkout"),m=Object(s.getCurrencyFromPriceResponse)(c);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.TotalsWrapper,{className:t},Object(o.createElement)(n.a,{cartCoupons:u,currency:m,isRemovingCoupon:b,removeCoupon:p,values:c})),Object(o.createElement)(i,null))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-fee-frontend.js b/build/checkout-blocks/order-summary-fee-frontend.js
new file mode 100644
index 00000000000..0373f3dd713
--- /dev/null
+++ b/build/checkout-blocks/order-summary-fee-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[39],{455:function(e,c,t){"use strict";t.r(c);var s=t(0),a=t(10),r=t(37),n=t(30);c.default=e=>{let{className:c=""}=e;const{cartFees:t,cartTotals:o}=Object(n.a)(),l=Object(r.getCurrencyFromPriceResponse)(o);return Object(s.createElement)(a.TotalsWrapper,{className:c},Object(s.createElement)(a.TotalsFees,{currency:l,cartFees:t}))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-frontend.js b/build/checkout-blocks/order-summary-frontend.js
new file mode 100644
index 00000000000..e557a7333bd
--- /dev/null
+++ b/build/checkout-blocks/order-summary-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[35],{100:function(e,t,c){"use strict";var a=c(11),n=c.n(a),o=c(0),r=c(136),l=c(4),s=c.n(l);c(189);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:a,onValueChange:l,displayType:u="text",...m}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const b=p/10**a.minorUnit;if(!Number.isFinite(b))return null;const d=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f={...m,...i(a),value:void 0,currency:void 0,onValueChange:void 0},x=l?e=>{const t=+e.value*10**a.minorUnit;l(t)}:()=>{};return Object(o.createElement)(r.a,n()({className:d,displayType:u},f,{value:b,onValueChange:x}))}},189:function(e,t){},301:function(e,t){},370:function(e,t,c){"use strict";var a=c(0),n=c(1),o=c(4),r=c.n(o),l=c(100),s=c(10),i=c(30),u=c(2);c(301),t.a=e=>{let{currency:t,values:c,className:o}=e;const m=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:b}=c,{receiveCart:d,...f}=Object(i.a)(),x=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woo-gutenberg-products-block"),extensions:f.extensions,arg:{cart:f}}),O=parseInt(b,10);return Object(a.createElement)(s.TotalsItem,{className:r()("wc-block-components-totals-footer-item",o),currency:t,label:x,value:parseInt(p,10),description:m&&0!==O&&Object(a.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(a.createInterpolateElement)(Object(n.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(a.createElement)(l.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:O})}))})}},453:function(e,t,c){"use strict";c.r(t);var a=c(0),n=c(370),o=c(37),r=c(30),l=c(10);const s=()=>{const{extensions:e,receiveCart:t,...c}=Object(r.a)(),n={extensions:e,cart:c,context:"woocommerce/checkout"};return Object(a.createElement)(l.ExperimentalOrderMeta.Slot,n)};t.default=e=>{let{children:t,className:c=""}=e;const{cartTotals:l}=Object(r.a)(),i=Object(o.getCurrencyFromPriceResponse)(l);return Object(a.createElement)("div",{className:c},t,Object(a.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(a.createElement)(n.a,{currency:i,values:l})),Object(a.createElement)(s,null))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-shipping-frontend.js b/build/checkout-blocks/order-summary-shipping-frontend.js
new file mode 100644
index 00000000000..02a93b23216
--- /dev/null
+++ b/build/checkout-blocks/order-summary-shipping-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[40],{132:function(e,c,t){"use strict";var a=t(0);t(188),c.a=()=>Object(a.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,c,t){"use strict";var a=t(0),n=t(1),s=t(4),r=t.n(s),o=(t(190),t(132));c.a=e=>{let{children:c,className:t,screenReaderLabel:s,showSpinner:l=!1,isLoading:i=!0}=e;return Object(a.createElement)("div",{className:r()(t,{"wc-block-components-loading-mask":i})},i&&l&&Object(a.createElement)(o.a,null),Object(a.createElement)("div",{className:r()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},c),i&&Object(a.createElement)("span",{className:"screen-reader-text"},s||Object(n.__)("Loading…","woo-gutenberg-products-block")))}},188:function(e,c){},190:function(e,c){},458:function(e,c,t){"use strict";t.r(c);var a=t(0),n=t(426),s=t(37),r=t(30),o=t(10);c.default=e=>{let{className:c=""}=e;const{cartTotals:t,cartNeedsShipping:l}=Object(r.a)();if(!l)return null;const i=Object(s.getCurrencyFromPriceResponse)(t);return Object(a.createElement)(o.TotalsWrapper,{className:c},Object(a.createElement)(n.a,{showCalculator:!1,showRateSelector:!1,values:t,currency:i}))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-subtotal-frontend.js b/build/checkout-blocks/order-summary-subtotal-frontend.js
new file mode 100644
index 00000000000..a6f76233bea
--- /dev/null
+++ b/build/checkout-blocks/order-summary-subtotal-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[41],{454:function(e,c,t){"use strict";t.r(c);var a=t(0),s=t(10),r=t(37),n=t(30);c.default=e=>{let{className:c=""}=e;const{cartTotals:t}=Object(n.a)(),o=Object(r.getCurrencyFromPriceResponse)(t);return Object(a.createElement)(s.TotalsWrapper,{className:c},Object(a.createElement)(s.Subtotal,{currency:o,values:t}))}}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/order-summary-taxes-frontend.js b/build/checkout-blocks/order-summary-taxes-frontend.js
new file mode 100644
index 00000000000..d25f4c1e525
--- /dev/null
+++ b/build/checkout-blocks/order-summary-taxes-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[42],{439:function(e,t,a){"use strict";a.r(t);var c=a(117),r=a(0),s=a(10),l=a(37),n=a(30),o=a(2),i={showRateAfterTaxName:{type:"boolean",default:Object(o.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!1}}};t.default=Object(c.withFilteredAttributes)(i)(e=>{let{className:t,showRateAfterTaxName:a}=e;const{cartTotals:c}=Object(n.a)();if(Object(o.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(c.total_tax,10)<=0)return null;const i=Object(l.getCurrencyFromPriceResponse)(c);return Object(r.createElement)(s.TotalsWrapper,{className:t},Object(r.createElement)(s.TotalsTaxes,{showRateAfterTaxName:a,currency:i,values:c}))})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/payment-frontend.js b/build/checkout-blocks/payment-frontend.js
new file mode 100644
index 00000000000..8387212ee14
--- /dev/null
+++ b/build/checkout-blocks/payment-frontend.js
@@ -0,0 +1,9 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[43],{132:function(e,t,c){"use strict";var n=c(0);c(188),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t,c){"use strict";var n=c(0),o=c(1),a=c(4),s=c.n(a),r=(c(190),c(132));t.a=e=>{let{children:t,className:c,screenReaderLabel:a,showSpinner:l=!1,isLoading:i=!0}=e;return Object(n.createElement)("div",{className:s()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(n.createElement)(r.a,null),Object(n.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(n.createElement)("span",{className:"screen-reader-text"},a||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},188:function(e,t){},190:function(e,t){},21:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:r={}}=e;const l=null!=c,i=null!=o;return!l&&i?(t=s||"span",r={...r,className:a()(r.className,"screen-reader-text")},Object(n.createElement)(t,r,o)):(t=s||n.Fragment,l&&i&&c!==o?Object(n.createElement)(t,r,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,r,c))}},253:function(e,t){},257:function(e,t,c){"use strict";var n=c(11),o=c.n(n),a=c(0),s=c(4),r=c.n(s);c(258),t.a=e=>{let{children:t,className:c,headingLevel:n,...s}=e;const l=r()("wc-block-components-title",c),i="h"+n;return Object(a.createElement)(i,o()({className:l},s),t)}},258:function(e,t){},259:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(260);t.a=e=>{let{checked:t,name:c,onChange:o,option:r}=e;const{value:l,label:i,description:d,secondaryLabel:p,secondaryDescription:m}=r;return Object(n.createElement)("label",{className:a()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(n.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>o(e.target.value),checked:t,"aria-describedby":a()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:p,[`${c}-${l}__description`]:d,[`${c}-${l}__secondary-description`]:m})}),Object(n.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:p,description:d,secondaryDescription:m}))}},260:function(e,t,c){"use strict";var n=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:o,secondaryDescription:a,id:s}=e;return Object(n.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(n.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(n.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(n.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(n.createElement)("div",{className:"wc-block-components-radio-control__description-group"},o&&Object(n.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},o),a&&Object(n.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},a)))}},262:function(e,t){},263:function(e,t){},264:function(e,t,c){"use strict";c.d(t,"a",(function(){return m}));var n=c(1),o=c(7),a=c(5),s=c(17),r=c(30),l=c(0),i=c(242);const d=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:n}=Object(i.b)(),o=Object(l.useRef)(e);Object(l.useEffect)(()=>{o.current=e},[e]);const a=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),s=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...a,...s,setIsSuppressed:n}};var p=c(191);const m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(r.a)(),{createErrorNotice:l}=Object(o.useDispatch)("core/notices"),{addSnackbarNotice:i}=d(),{setValidationErrors:m}=Object(p.b)(),b=Object(o.useSelect)((t,c)=>{let{dispatch:o}=c;const r=t(a.CART_STORE_KEY),d=r.isApplyingCoupon(),p=r.isRemovingCoupon(),{applyCoupon:b,removeCoupon:u,receiveApplyingCoupon:h}=o(a.CART_STORE_KEY);return{applyCoupon:e=>{b(e).then(t=>{!0===t&&i(Object(n.sprintf)(
+/* translators: %s coupon code. */
+Object(n.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{m({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),h("")})},removeCoupon:t=>{u(t).then(e=>{!0===e&&i(Object(n.sprintf)(
+/* translators: %s coupon code. */
+Object(n.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{l(t.message,{id:"coupon-form",context:e}),h("")})},isApplyingCoupon:d,isRemovingCoupon:p}},[l,i]);return{appliedCoupons:t,isLoading:c,...b}}},265:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0),o=c(191);c(253);const a=e=>{let{errorMessage:t="",propertyName:c="",elementId:a=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:r(a)},t))}},266:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return r}));var n=c(29),o=c(198);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:s}=Object(o.b)(),r=Object(n.a)(t),l=Object(n.a)(c);return{paymentMethods:e?l:r,isInitialized:e?s:a}},s=()=>a(!1),r=()=>a(!0)},267:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:o=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:o}}}},269:function(e,t,c){"use strict";var n=c(11),o=c.n(n),a=c(0),s=c(4),r=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:n=""}=e;return c?Object(a.createElement)("img",{className:l(t),src:c,alt:n}):null},d=c(44);const p=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var m=c(59);c(262),t.a=e=>{let{icons:t=[],align:c="center",className:n}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(m.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=r()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},n);return Object(a.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,p.find(e=>e.id===c)||{})};var c;return Object(a.createElement)(i,o()({key:"payment-method-icon-"+e.id},t))}))}},279:function(e,t){},280:function(e,t,c){"use strict";var n=c(18),o=c.n(n),a=c(0),s=c(1),r=c(3),l=c(2),i=c(121),d=c(28);class p extends r.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const n=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(a.createElement)(i.a,{additionalNotices:n,context:d.c.PAYMENTS})}return this.props.children}}p.defaultProps={isEditor:!1},t.a=p},281:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(13),r=c(259);c(282);const l=e=>{let{className:t="",id:c,selected:o,onChange:i=(()=>{}),options:d=[]}=e;const p=Object(s.useInstanceId)(l),m=c||p;return d.length?Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},d.map(e=>Object(n.createElement)(r.a,{key:`${m}-${e.value}`,name:"radio-control-"+m,checked:e.value===o,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},282:function(e,t){},287:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(257);c(263);const r=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:l,children:i,disabled:d=!1,showStepNumber:p=!0,stepHeadingContent:m=(()=>{})}=e;const b=s||o?"fieldset":"div";return Object(n.createElement)(b,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p,"wc-block-components-checkout-step--disabled":d}),id:t,disabled:d},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(r,{title:o,stepHeadingContent:m()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},322:function(e,t,c){"use strict";var n=c(8),o=c(0),a=c(4),s=c.n(a),r=c(13),l=c(41);t.a=function({icon:e,children:t,label:c,instructions:a,className:i,notices:d,preview:p,isColumnLayout:m,...b}){const[u,{width:h}]=Object(r.useResizeObserver)();let g;"number"==typeof h&&(g={"is-large":h>=480,"is-medium":h>=160&&h<480,"is-small":h<160});const O=s()("components-placeholder",i,g),v=s()("components-placeholder__fieldset",{"is-column-layout":m});return Object(o.createElement)("div",Object(n.a)({},b,{className:O}),u,d,p&&Object(o.createElement)("div",{className:"components-placeholder__preview"},p),Object(o.createElement)("div",{className:"components-placeholder__label"},Object(o.createElement)(l.a,{icon:e}),c),!!a&&Object(o.createElement)("div",{className:"components-placeholder__instructions"},a),Object(o.createElement)("div",{className:v},t))}},327:function(e,t,c){"use strict";var n=c(0),o=c(14);const a=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));t.a=a},332:function(e,t,c){"use strict";c.d(t,"a",(function(){return I}));var n=c(1),o=c(37),a=c(0),s=c(4),r=c.n(s),l=c(14),i=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(a.createElement)("path",{d:"M0 0h24v24H0z"}),Object(a.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(a.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),d=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(l.Path,{fillRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z",clipRule:"evenodd"})),p=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(l.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})),m=c(327),b=c(103),u=c(59),h=c(61);c(279);const g={bank:d,bill:p,card:m.a,checkPayment:i};var O=e=>{let{icon:t="",text:c=""}=e;const n=!!t,o=Object(a.useCallback)(e=>n&&Object(u.a)(e)&&Object(h.b)(g,e),[n]),s=r()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":n});return Object(a.createElement)("span",{className:s},o(t)?Object(a.createElement)(b.a,{icon:g[t]}):t,c)},v=c(269),j=c(2),y=c(31),k=c.n(y),_=c(134),E=c(265),w=c(30),f=c(264),S=c(28),N=c(34),C=c(198),P=c(66),M=c(46);const x=(e,t)=>{const c=[],o=(t,c)=>{const n=c+"_tax",o=Object(h.b)(e,c)&&Object(u.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(h.b)(e,n)&&Object(u.a)(e[n])?parseInt(e[n],10):0)}};return c.push(o(Object(n.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(n.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(n.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(n.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(n.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c};var R=c(64);const I=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:d,onSubmit:p,customerId:m}=Object(N.b)(),{currentStatus:b,activePaymentMethod:u,onPaymentProcessing:h,setExpressPaymentError:g,shouldSavePayment:y}=Object(C.b)(),{shippingErrorStatus:I,shippingErrorTypes:T,onShippingRateSuccess:A,onShippingRateFail:z,onShippingRateSelectSuccess:L,onShippingRateSelectFail:D}=Object(P.b)(),{shippingRates:$,isLoadingRates:V,selectedRates:F,isSelectingRate:B,selectShippingRate:H,needsShipping:W}=Object(R.a)(),{billingData:Y,shippingAddress:G,setShippingAddress:U}=Object(M.b)(),{cartItems:J,cartFees:K,cartTotals:q,extensions:Q}=Object(w.a)(),{appliedCoupons:X}=Object(f.a)(),{noticeContexts:Z,responseTypes:ee}=Object(S.d)(),te=Object(a.useRef)(x(q,W)),ce=Object(a.useRef)({label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)});Object(a.useEffect)(()=>{te.current=x(q,W),ce.current={label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)}},[q,W]);const ne=Object(a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";k()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),g(e)}),[g]);return{activePaymentMethod:u,billing:{appliedCoupons:X,billingData:Y,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(o.getCurrencyFromPriceResponse)(q),customerId:m,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:J,cartFees:K,extensions:Q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:_.a,PaymentMethodIcons:v.a,PaymentMethodLabel:O,ValidationInputError:E.a},emitResponse:{noticeContexts:Z,responseTypes:ee},eventRegistration:{onCheckoutAfterProcessingWithError:d,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:h,onShippingRateFail:z,onShippingRateSelectFail:D,onShippingRateSelectSuccess:L,onShippingRateSuccess:A},onSubmit:p,paymentStatus:b,setExpressPaymentError:ne,shippingData:{isSelectingRate:B,needsShipping:W,selectedRates:F,setSelectedRates:H,setShippingAddress:U,shippingAddress:G,shippingRates:$,shippingRatesLoading:V},shippingStatus:{shippingErrorStatus:I,shippingErrorTypes:T},shouldSavePayment:y}}},381:function(e,t){},425:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(4),a=c.n(o),s=c(30),r=c(28),l=c(117),i=c(287),d=c(34),p=c(266),m=c(1),b=c(21),u=c(198),h=c(322),g=c(50),O=c(94),v=c(103),j=c(327),y=c(2),k=c(25);c(381);const _=()=>Object(n.createElement)(h.a,{icon:Object(n.createElement)(v.a,{icon:j.a}),label:Object(m.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(n.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(m.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method it will be shown here.","woo-gutenberg-products-block")),Object(n.createElement)(g.a,{isSecondary:!0,href:y.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(m.__)("Configure Payment Methods","woo-gutenberg-products-block"))),E=()=>Object(n.createElement)(O.a,{isDismissible:!1,className:a()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(m.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var w=()=>{const{isEditor:e}=Object(k.a)();return e?Object(n.createElement)(_,null):Object(n.createElement)(E,null)},f=c(332),S=c(40),N=c(13),C=c(259),P=Object(N.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:s,onChange:r,options:l=[]}=e;const i=o||c;return l.length&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===s;return Object(n.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(n.createElement)(C.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{r(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),M=c(7),x=c(10),R=c(280),I=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:o}=Object(k.a)(),{shouldSavePayment:a,setShouldSavePayment:s}=Object(u.b)(),{customerId:r}=Object(d.b)();return Object(n.createElement)(R.a,{isEditor:o},t,r>0&&c&&Object(n.createElement)(x.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(m.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:()=>s(!a)}))},T=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,isExpressPaymentMethodActive:c,customerPaymentMethods:o}=Object(u.b)(),{paymentMethods:s}=Object(p.b)(),{activePaymentMethod:l,...i}=Object(f.a)(),{noticeContexts:d}=Object(r.d)(),{removeNotice:m}=Object(M.useDispatch)("core/notices"),{dispatchCheckoutEvent:b}=Object(S.a)(),{isEditor:h}=Object(k.a)(),g=Object.keys(s).map(e=>{const{edit:t,content:c,label:o,supports:a}=s[e],r=h?t:c;return{value:e,label:"string"==typeof o?o:Object(n.cloneElement)(o,{components:i.components}),name:"wc-saved-payment-method-token-"+e,content:Object(n.createElement)(I,{showSaveOption:a.showSaveOption},Object(n.cloneElement)(r,{activePaymentMethod:l,...i}))}}),O=Object(n.useCallback)(t=>{e(t),m("wc-payment-error",d.PAYMENTS),b("set-active-payment-method",{value:t})},[b,d.PAYMENTS,m,e]),v=0===Object.keys(o).length&&1===Object.keys(s).length,j=a()({"disable-radio-control":v});return c?null:Object(n.createElement)(P,{id:"wc-payment-method-options",className:j,selected:t?null:l,onChange:O,options:g})},A=c(281);const z=e=>{let{method:t,expires:c}=e;return Object(m.sprintf)(
+/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */
+Object(m.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),t.brand,t.last4,c)},L=e=>{let{method:t}=e;return Object(m.sprintf)(
+/* translators: %s is the name of the payment method gateway. */
+Object(m.__)("Saved token for %s","woo-gutenberg-products-block"),t.gateway)};var D=()=>{var e,t;const{customerPaymentMethods:c,activePaymentMethod:o,setActivePaymentMethod:a,activeSavedToken:s}=Object(u.b)(),{paymentMethods:l}=Object(p.b)(),i=Object(f.a)(),{noticeContexts:d}=Object(r.d)(),{removeNotice:m}=Object(M.useDispatch)("core/notices"),{dispatchCheckoutEvent:b}=Object(S.a)(),h=Object(n.useMemo)(()=>Object.keys(c).flatMap(e=>c[e].map(t=>{const c="cc"===e||"echeck"===e,n=t.method.gateway;return{name:"wc-saved-payment-method-token-"+n,label:c?z(t):L(t),value:t.tokenId.toString(),onChange:e=>{a(n,{token:e,payment_method:n,[`wc-${n}-payment-token`]:e.toString(),isSavedToken:!0}),m("wc-payment-error",d.PAYMENTS),b("set-active-payment-method",{paymentMethodSlug:n})}}})).filter(Boolean),[c,a,m,d.PAYMENTS,b]),g=s&&l[o]&&null!==(e=l[o])&&void 0!==e&&e.savedTokenComponent?Object(n.cloneElement)(null===(t=l[o])||void 0===t?void 0:t.savedTokenComponent,{token:s,...i}):null;return h.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(A.a,{id:"wc-payment-method-saved-tokens",selected:s,options:h}),g):null},$=()=>{const{isInitialized:e,paymentMethods:t}=Object(p.b)(),{customerPaymentMethods:c}=Object(u.b)();return e&&0===Object.keys(t).length?Object(n.createElement)(w,null):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(D,null),Object.keys(c).length>0&&Object(n.createElement)(b.a,{label:Object(m.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(m.__)("Other available payment methods","woo-gutenberg-products-block"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),Object(n.createElement)(T,null))},V=()=>Object(n.createElement)($,null),F=c(267),B={...Object(F.a)({defaultTitle:Object(m.__)("Payment options","woo-gutenberg-products-block"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},H=c(121);t.default=Object(l.withFilteredAttributes)(B)(e=>{let{title:t,description:c,showStepNumber:o,children:l,className:p}=e;const{isProcessing:m}=Object(d.b)(),{cartNeedsPayment:b}=Object(s.a)(),{noticeContexts:u}=Object(r.d)();return b?Object(n.createElement)(i.a,{id:"payment-method",disabled:m,className:a()("wc-block-checkout__payment-method",p),title:t,description:c,showStepNumber:o},Object(n.createElement)(H.a,{context:u.PAYMENTS}),Object(n.createElement)(V,null),l):null})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/shipping-address-frontend.js b/build/checkout-blocks/shipping-address-frontend.js
new file mode 100644
index 00000000000..8a2b30bf8e2
--- /dev/null
+++ b/build/checkout-blocks/shipping-address-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[44],{436:function(e,t,i){"use strict";i.r(t);var s=i(0),n=i(4),o=i.n(n),l=i(117),c=i(287),d=i(34),r=i(329),a=i(1),p=i(390),h=i(40),b=i(25),u=i(10),g=i(330),m=i(331),w=e=>{let{showCompanyField:t=!1,showApartmentField:i=!1,showPhoneField:n=!1,requireCompanyField:o=!1,requirePhoneField:l=!1}=e;const{defaultAddressFields:c,setShippingAddress:d,setBillingData:w,shippingAddress:j,setShippingPhone:O,useShippingAsBilling:F,setUseShippingAsBilling:f}=Object(r.a)(),{dispatchCheckoutEvent:k}=Object(h.a)(),{isEditor:y}=Object(b.a)();Object(s.useEffect)(()=>{n||O("")},[n,O]);const C=Object(s.useMemo)(()=>({company:{hidden:!t,required:o},address_2:{hidden:!i}}),[t,o,i]),E=y?g.a:s.Fragment;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(E,null,Object(s.createElement)(p.a,{id:"shipping",type:"shipping",onChange:e=>{d(e),F&&w(e),k("set-shipping-address")},values:j,fields:Object.keys(c),fieldConfig:C}),n&&Object(s.createElement)(m.a,{id:"shipping-phone",isRequired:l,value:j.phone,onChange:e=>{O(e),k("set-phone-number",{step:"shipping"})}})),Object(s.createElement)(u.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:Object(a.__)("Use same address for billing","woo-gutenberg-products-block"),checked:F,onChange:e=>{f(e),e&&w(j)}}))},j=i(267),O={...Object(j.a)({defaultTitle:Object(a.__)("Shipping address","woo-gutenberg-products-block"),defaultDescription:Object(a.__)("Enter the address where you want your order delivered.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},F=i(138);t.default=Object(l.withFilteredAttributes)(O)(e=>{let{title:t,description:i,showStepNumber:n,children:l,className:a}=e;const{isProcessing:p}=Object(d.b)(),{showShippingFields:h}=Object(r.a)(),{requireCompanyField:b,requirePhoneField:u,showApartmentField:g,showCompanyField:m,showPhoneField:j}=Object(F.b)();return h?Object(s.createElement)(c.a,{id:"shipping-fields",disabled:p,className:o()("wc-block-checkout__shipping-fields",a),title:t,description:i,showStepNumber:n},Object(s.createElement)(w,{requireCompanyField:b,requirePhoneField:u,showApartmentField:g,showCompanyField:m,showPhoneField:j}),l):null})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/shipping-methods-frontend.js b/build/checkout-blocks/shipping-methods-frontend.js
new file mode 100644
index 00000000000..3b2531b65a1
--- /dev/null
+++ b/build/checkout-blocks/shipping-methods-frontend.js
@@ -0,0 +1,9 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[45],{100:function(e,t,n){"use strict";var c=n(11),a=n.n(c),s=n(0),o=n(136),i=n(4),l=n.n(i);n(189);const r=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:i,displayType:p="text",...d}=e;const b="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(b))return null;const u=b/10**c.minorUnit;if(!Number.isFinite(u))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...r(c),value:void 0,currency:void 0,onValueChange:void 0},h=i?e=>{const t=+e.value*10**c.minorUnit;i(t)}:()=>{};return Object(s.createElement)(o.a,a()({className:m,displayType:p},g,{value:u,onValueChange:h}))}},132:function(e,t,n){"use strict";var c=n(0);n(188),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},134:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(4),o=n.n(s),i=(n(190),n(132));t.a=e=>{let{children:t,className:n,screenReaderLabel:s,showSpinner:l=!1,isLoading:r=!0}=e;return Object(c.createElement)("div",{className:o()(n,{"wc-block-components-loading-mask":r})},r&&l&&Object(c.createElement)(i.a,null),Object(c.createElement)("div",{className:o()({"wc-block-components-loading-mask__children":r}),"aria-hidden":r},t),r&&Object(c.createElement)("span",{className:"screen-reader-text"},s||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},188:function(e,t){},189:function(e,t){},190:function(e,t){},21:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a);t.a=e=>{let t,{label:n,screenReaderLabel:a,wrapperElement:o,wrapperProps:i={}}=e;const l=null!=n,r=null!=a;return!l&&r?(t=o||"span",i={...i,className:s()(i.className,"screen-reader-text")},Object(c.createElement)(t,i,a)):(t=o||c.Fragment,l&&r&&n!==a?Object(c.createElement)(t,i,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},a)):Object(c.createElement)(t,i,n))}},257:function(e,t,n){"use strict";var c=n(11),a=n.n(c),s=n(0),o=n(4),i=n.n(o);n(258),t.a=e=>{let{children:t,className:n,headingLevel:c,...o}=e;const l=i()("wc-block-components-title",n),r="h"+c;return Object(s.createElement)(r,a()({className:l},o),t)}},258:function(e,t){},259:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a),o=n(260);t.a=e=>{let{checked:t,name:n,onChange:a,option:i}=e;const{value:l,label:r,description:p,secondaryLabel:d,secondaryDescription:b}=i;return Object(c.createElement)("label",{className:s()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${l}`},Object(c.createElement)("input",{id:`${n}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:l,onChange:e=>a(e.target.value),checked:t,"aria-describedby":s()({[`${n}-${l}__label`]:r,[`${n}-${l}__secondary-label`]:d,[`${n}-${l}__description`]:p,[`${n}-${l}__secondary-description`]:b})}),Object(c.createElement)(o.a,{id:`${n}-${l}`,label:r,secondaryLabel:d,description:p,secondaryDescription:b}))}},260:function(e,t,n){"use strict";var c=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:a,secondaryDescription:s,id:o}=e;return Object(c.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(c.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(c.createElement)("span",{id:o&&o+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(c.createElement)("span",{id:o&&o+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(c.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(c.createElement)("span",{id:o&&o+"__description",className:"wc-block-components-radio-control__description"},a),s&&Object(c.createElement)("span",{id:o&&o+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},s)))}},263:function(e,t){},267:function(e,t,n){"use strict";var c=n(1);t.a=e=>{let{defaultTitle:t=Object(c.__)("Step","woo-gutenberg-products-block"),defaultDescription:n=Object(c.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:n},showStepNumber:{type:"boolean",default:a}}}},281:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a),o=n(13),i=n(259);n(282);const l=e=>{let{className:t="",id:n,selected:a,onChange:r=(()=>{}),options:p=[]}=e;const d=Object(o.useInstanceId)(l),b=n||d;return p.length?Object(c.createElement)("div",{className:s()("wc-block-components-radio-control",t)},p.map(e=>Object(c.createElement)(i.a,{key:`${b}-${e.value}`,name:"radio-control-"+b,checked:e.value===a,option:e,onChange:t=>{r(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},282:function(e,t){},287:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a),o=n(257);n(263);const i=e=>{let{title:t,stepHeadingContent:n}=e;return Object(c.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(c.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&Object(c.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))};t.a=e=>{let{id:t,className:n,title:a,legend:o,description:l,children:r,disabled:p=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const u=o||a?"fieldset":"div";return Object(c.createElement)(u,{className:s()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":p}),id:t,disabled:p},!(!o&&!a)&&Object(c.createElement)("legend",{className:"screen-reader-text"},o||a),!!a&&Object(c.createElement)(i,{title:a,stepHeadingContent:b()}),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(c.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__content"},r)))}},307:function(e,t){},322:function(e,t,n){"use strict";var c=n(8),a=n(0),s=n(4),o=n.n(s),i=n(13),l=n(41);t.a=function({icon:e,children:t,label:n,instructions:s,className:r,notices:p,preview:d,isColumnLayout:b,...u}){const[m,{width:g}]=Object(i.useResizeObserver)();let h;"number"==typeof g&&(h={"is-large":g>=480,"is-medium":g>=160&&g<480,"is-small":g<160});const O=o()("components-placeholder",r,h),j=o()("components-placeholder__fieldset",{"is-column-layout":b});return Object(a.createElement)("div",Object(c.a)({},u,{className:O}),m,p,d&&Object(a.createElement)("div",{className:"components-placeholder__preview"},d),Object(a.createElement)("div",{className:"components-placeholder__label"},Object(a.createElement)(l.a,{icon:e}),n),!!s&&Object(a.createElement)("div",{className:"components-placeholder__instructions"},s),Object(a.createElement)("div",{className:j},t))}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var c=n(2),a=n(0),s=n(34),o=n(65),i=n(64);const l=()=>{const{needsShipping:e}=Object(i.a)(),{useShippingAsBilling:t,setUseShippingAsBilling:n}=Object(s.b)(),{billingData:l,setBillingData:r,shippingAddress:p,setShippingAddress:d}=Object(o.a)(),b=Object(a.useCallback)(e=>{r({email:e})},[r]),u=Object(a.useCallback)(e=>{r({phone:e})},[r]),m=Object(a.useCallback)(e=>{d({phone:e})},[d]);return{shippingAddress:p,billingData:l,setShippingAddress:d,setBillingData:r,setEmail:b,setBillingPhone:u,setShippingPhone:m,defaultAddressFields:c.defaultAddressFields,useShippingAsBilling:t,setUseShippingAsBilling:n,showShippingFields:e,showBillingFields:!e||!t}}},334:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(19),o=n(134),i=n(10),l=n(377),r=n(30),p=n(25),d=n(4),b=n.n(d),u=n(17),m=n(21),g=n(67),h=n(281),O=n(260),j=n(37),_=n(100),k=n(2);const w=e=>{const t=Object(k.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(u.decodeEntities)(e.name),value:e.rate_id,description:Object(c.createElement)(c.Fragment,null,Number.isFinite(t)&&Object(c.createElement)(_.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(u.decodeEntities)(e.delivery_time))}};var E=e=>{let{className:t="",noResultsMessage:n,onSelectRate:a,rates:s,renderOption:o=w,selectedRate:i}=e;const l=(null==i?void 0:i.rate_id)||"",[r,p]=Object(c.useState)(l);if(Object(c.useEffect)(()=>{l&&p(l)},[l]),0===s.length)return n;if(s.length>1)return Object(c.createElement)(h.a,{className:t,onChange:e=>{p(e),a(e)},selected:r,options:s.map(o)});const{label:d,secondaryLabel:b,description:u,secondaryDescription:m}=o(s[0]);return Object(c.createElement)(O.a,{label:d,secondaryLabel:b,description:u,secondaryDescription:m})};n(307);var f=e=>{let{packageId:t,className:n="",noResultsMessage:s,renderOption:o,packageData:l,collapsible:r=!1,collapse:p=!1,showItems:d=!1}=e;const{selectShippingRate:h}=Object(g.a)(),O=Object(c.createElement)(c.Fragment,null,(d||r)&&Object(c.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),d&&Object(c.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(u.decodeEntities)(e.name),n=e.quantity;return Object(c.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(c.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(a.sprintf)(
+/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
+Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),j=Object(c.createElement)(E,{className:n,noResultsMessage:s,rates:l.shipping_rates,onSelectRate:e=>h(e,t),selectedRate:l.shipping_rates.find(e=>e.selected),renderOption:o});return r?Object(c.createElement)(i.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:O},j):Object(c.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},O,j)};const v=e=>{let{packages:t,collapse:n,showItems:a,collapsible:s,noResultsMessage:o,renderOption:i}=e;return t.length?Object(c.createElement)(c.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(c.createElement)(f,{key:t,packageId:t,packageData:l,collapsible:s,collapse:n,showItems:a,noResultsMessage:o,renderOption:i})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:n,className:d,collapsible:b=!1,noResultsMessage:u,renderOption:m,context:g}=e;Object(c.useEffect)(()=>{if(n)return;const e=Object(l.a)(t),c=Object(l.b)(t);1===e?Object(s.speak)(Object(a.sprintf)(
+/* translators: %d number of shipping options found. */
+Object(a._n)("%d shipping option was found.","%d shipping options were found.",c,"woo-gutenberg-products-block"),c)):Object(s.speak)(Object(a.sprintf)(
+/* translators: %d number of shipping packages packages. */
+Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)(
+/* translators: %d number of shipping options available. */
+Object(a._n)("%d shipping option was found","%d shipping options were found",c,"woo-gutenberg-products-block"),c))},[n,t]);const{extensions:h,receiveCart:O,...j}=Object(r.a)(),_={className:d,collapsible:b,noResultsMessage:u,renderOption:m,extensions:h,cart:j,components:{ShippingRatesControlPackage:f},context:g},{isEditor:k}=Object(p.a)();return Object(c.createElement)(o.a,{isLoading:n,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},k?Object(c.createElement)(v,{packages:t,noResultsMessage:u,renderOption:m}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.ExperimentalOrderShippingPackages.Slot,_),Object(c.createElement)(i.ExperimentalOrderShippingPackages,null,Object(c.createElement)(v,{packages:t,noResultsMessage:u,renderOption:m}))))}},377:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a}));const c=e=>e.length,a=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},379:function(e,t){},380:function(e,t){},429:function(e,t,n){"use strict";n.r(t);var c=n(0),a=n(4),s=n.n(a),o=n(117),i=n(287),l=n(34),r=n(329),p=n(1),d=n(64),b=n(334),u=n(377),m=n(37),g=n(100),h=n(25),O=n(17),j=n(94),_=n(2),k=n(322),w=n(50),E=n(103),f=n(14),v=Object(c.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(f.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"}));n(380);var N=()=>Object(c.createElement)(k.a,{icon:Object(c.createElement)(E.a,{icon:v}),label:Object(p.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(c.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(p.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),Object(c.createElement)(w.a,{isSecondary:!0,href:_.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping",target:"_blank",rel:"noopener noreferrer"},Object(p.__)("Configure Shipping Options","woo-gutenberg-products-block")));n(379);const y=e=>{const t=Object(_.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(O.decodeEntities)(e.name),value:e.rate_id,description:Object(O.decodeEntities)(e.description),secondaryLabel:Object(c.createElement)(g.a,{currency:Object(m.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object(O.decodeEntities)(e.delivery_time)}};var S=()=>{const{isEditor:e}=Object(h.a)(),{shippingRates:t,needsShipping:n,isLoadingRates:a,hasCalculatedShipping:o}=Object(d.a)();if(!n)return null;const i=Object(u.a)(t);return e||o||i?Object(c.createElement)(c.Fragment,null,e&&!i?Object(c.createElement)(N,null):Object(c.createElement)(b.a,{noResultsMessage:Object(c.createElement)(j.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(p.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:y,shippingRates:t,isLoadingRates:a,context:"woocommerce/checkout"})):Object(c.createElement)("p",null,Object(p.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))},R=n(267),C={...Object(R.a)({defaultTitle:Object(p.__)("Shipping options","woo-gutenberg-products-block"),defaultDescription:""}),allowCreateAccount:{type:"boolean",default:!1},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(o.withFilteredAttributes)(C)(e=>{let{title:t,description:n,showStepNumber:a,children:o,className:p}=e;const{isProcessing:d}=Object(l.b)(),{showShippingFields:b}=Object(r.a)();return b?Object(c.createElement)(i.a,{id:"shipping-option",disabled:d,className:s()("wc-block-checkout__shipping-option",p),title:t,description:n,showStepNumber:a},Object(c.createElement)(S,null),o):null})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/terms-frontend.js b/build/checkout-blocks/terms-frontend.js
new file mode 100644
index 00000000000..d6910e17dc6
--- /dev/null
+++ b/build/checkout-blocks/terms-frontend.js
@@ -0,0 +1,5 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[46],{266:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));var o=n(29),c=n(198);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:r,expressPaymentMethodsInitialized:s}=Object(c.b)(),a=Object(o.a)(t),i=Object(o.a)(n);return{paymentMethods:e?i:a,isInitialized:e?s:r}},s=()=>r(!1),a=()=>r(!0)},384:function(e,t){},385:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(1),c=n(34),r=n(198),s=n(266);const a=()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:n,isProcessing:a,isAfterProcessing:i,isComplete:d,hasError:u}=Object(c.b)(),{paymentMethods:b={}}=Object(s.b)(),{activePaymentMethod:l,currentStatus:g}=Object(r.b)(),m=b[l]||{},p=a||i||n,h=d&&!u;return{submitButtonText:(null==m?void 0:m.placeOrderButtonLabel)||Object(o.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:a||g.isDoingExpressPayment,waitingForProcessing:p,waitingForRedirect:h}}},452:function(e,t,n){"use strict";n.r(t);var o=n(0),c=n(1),r=n(4),s=n.n(r),a=n(10),i=n(385),d=n(13),u=n(44);const b=u.j?`${Object(c.__)("Terms and Conditions","woo-gutenberg-products-block")}`:Object(c.__)("Terms and Conditions","woo-gutenberg-products-block"),l=u.f?`${Object(c.__)("Privacy Policy","woo-gutenberg-products-block")}`:Object(c.__)("Privacy Policy","woo-gutenberg-products-block"),g=Object(c.sprintf)(
+/* translators: %1$s terms page link, %2$s privacy page link. */
+Object(c.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woo-gutenberg-products-block"),b,l),m=Object(c.sprintf)(
+/* translators: %1$s terms page link, %2$s privacy page link. */
+Object(c.__)("You must accept our %1$s and %2$s to continue with your purchase.","woo-gutenberg-products-block"),b,l);n(384),t.default=Object(d.withInstanceId)(e=>{let{text:t,checkbox:n,instanceId:r,validation:d,className:u}=e;const[b,l]=Object(o.useState)(!1),{isDisabled:p}=Object(i.a)(),h="terms-and-conditions-"+r,{getValidationError:j,setValidationErrors:O,clearValidationError:_}=d,w=j(h)||{},f=w.message&&!w.hidden;return Object(o.useEffect)(()=>{if(n)return b?_(h):O({[h]:{message:Object(c.__)("Please read and accept the terms and conditions.","woo-gutenberg-products-block"),hidden:!0}}),()=>{_(h)}},[n,b,h,_,O]),Object(o.createElement)("div",{className:s()("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":p},u)},n?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.CheckboxControl,{id:"terms-and-conditions",checked:b,onChange:()=>l(e=>!e),hasError:f,disabled:p},Object(o.createElement)("span",{dangerouslySetInnerHTML:{__html:t||m}}))):Object(o.createElement)("span",{dangerouslySetInnerHTML:{__html:t||g}}))})}}]);
\ No newline at end of file
diff --git a/build/checkout-blocks/totals-frontend.js b/build/checkout-blocks/totals-frontend.js
new file mode 100644
index 00000000000..813683b316b
--- /dev/null
+++ b/build/checkout-blocks/totals-frontend.js
@@ -0,0 +1 @@
+(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[47],{365:function(e,c,t){"use strict";var n=t(0),s=t(3),a=t(4),r=t.n(a);const o=Object(s.forwardRef)((e,c)=>{let{children:t,className:s=""}=e;return Object(n.createElement)("div",{ref:c,className:r()("wc-block-components-sidebar",s)},t)});c.a=o},388:function(e,c){},415:function(e,c,t){"use strict";t.r(c);var n=t(0),s=t(4),a=t.n(s),r=t(365);t(388),c.default=e=>{let{children:c,className:t}=e;return Object(n.createElement)(r.a,{className:a()("wc-block-checkout__sidebar",t)},c)}}}]);
\ No newline at end of file
diff --git a/build/checkout-frontend.asset.php b/build/checkout-frontend.asset.php
new file mode 100644
index 00000000000..4226057fa74
--- /dev/null
+++ b/build/checkout-frontend.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '980056ce28d2d426c2c3b43c2e502a52');
\ No newline at end of file
diff --git a/build/checkout-frontend.js b/build/checkout-frontend.js
new file mode 100644
index 00000000000..85ee92fdac4
--- /dev/null
+++ b/build/checkout-frontend.js
@@ -0,0 +1,6 @@
+!function(e){function t(t){for(var r,o,s=t[0],a=t[1],c=0,l=[];c{let{imageUrl:t=i.l+"/block-error.svg",header:r=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(c.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),l&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(33);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:c,button:i}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof c?c({errorMessage:u}):Object(s.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:i}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.a11y},,,,function(e,t,r){"use strict";(function(e){var n=r(0);r(38);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(63))},function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0);r(7);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(n.useContext)(o)},function(e,t){e.exports=window.wp.url},,function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return d}));var n=r(61);let o,s;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(s||(s={}));const a=(e,t)=>Object(n.a)(e)&&"type"in e&&e.type===t,c=e=>a(e,o.SUCCESS),i=e=>a(e,o.ERROR),l=e=>a(e,o.FAIL),u=e=>!Object(n.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:s,shouldRetry:u,isSuccessResponse:c,isErrorResponse:i,isFailResponse:l})},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(12),s=r.n(o);function a(e){const t=Object(n.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(6),o=r(0),s=r(5),a=r(7),c=r(17),i=r(116),l=r(25),u=r(68);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(s.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...f,email:""},b={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:s.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},g=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(c.decodeEntities)(r)]})),E={cartCoupons:s.EMPTY_CART_COUPONS,cartItems:s.EMPTY_CART_ITEMS,cartFees:s.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:b,cartIsLoading:!0,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:f,shippingRates:s.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:s.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:s.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),c=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();m();const p=Object(a.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:c.totals,cartIsLoading:!1,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:f,extensions:s.EMPTY_EXTENSIONS,shippingRates:c.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:()=>{}};const o=e(s.CART_STORE_KEY),a=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),{receiveCart:b}=n(s.CART_STORE_KEY),y=g(a.billingAddress),O=a.needsShipping?g(a.shippingAddress):y,v=a.fees.length>0?a.fees.map(e=>g(e)):s.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):s.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingAddress:Object(i.a)(y),shippingAddress:Object(i.a)(O),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:b}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.deprecated},,function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return x})),r.d(t,"a",(function(){return P}));var n=r(0),o=r(1),s=r(57),a=r(31),c=r.n(a),i=r(59),l=r(61),u=r(7);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),m=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},h=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var b=r(2),g=r(116);let E;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(E||(E={}));const y={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(b.getSetting)("checkoutData",{})||{}},O={redirectUrl:"",status:E.PRISTINE,hasError:!1,calculatingCount:0,orderId:y.order_id,orderNotes:"",customerId:y.customer_id,useShippingAsBilling:Object(g.b)(y.billing_address,y.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:s,extensionData:a,useShippingAsBilling:c,shouldCreateAccount:i,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case d.SET_PRISTINE:u=O;break;case d.SET_IDLE:u=e.status!==E.IDLE?{...e,status:E.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case d.SET_COMPLETE:u=e.status!==E.COMPLETE?{...e,status:E.COMPLETE,redirectUrl:"string"==typeof(null==l?void 0:l.redirectUrl)?l.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==E.PROCESSING?{...e,status:E.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==E.BEFORE_PROCESSING?{...e,status:E.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==E.AFTER_PROCESSING?{...e,status:E.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===E.PROCESSING||e.status===E.BEFORE_PROCESSING?{...u,status:E.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case d.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==c&&c!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:c});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==i&&i!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:i});break;case d.SET_ORDER_NOTES:void 0!==s&&e.orderNotes!==s&&(u={...e,orderNotes:s});break;case d.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(u={...e,extensionData:a})}return u!==e&&r!==d.SET_PRISTINE&&u.status===E.PRISTINE&&(u.status=E.IDLE),u};var _=r(17),S=r(91),k=r(194);var w=r(196),j=r(191),C=r(40),R=r(28),T=r(77);const A=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),x=()=>Object(n.useContext)(A),P=e=>{let{children:t,redirectUrl:r,isCart:a=!1}=e;O.redirectUrl=r;const[b,g]=Object(n.useReducer)(v,O),{setValidationErrors:y}=Object(j.b)(),{createErrorNotice:x}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:P}=Object(C.a)(),N=b.calculatingCount>0,{isSuccessResponse:M,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(R.d)(),{checkoutNotices:F,paymentNotices:U,expressPaymentNotices:V}=(()=>{const{noticeContexts:e}=Object(R.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[B,H]=Object(n.useReducer)(S.b,{}),z=Object(n.useRef)(B),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:Y,onCheckoutValidationBeforeProcessing:q}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(k.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(k.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(k.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{z.current=B},[B]);const W=Object(n.useMemo)(()=>function(){return c()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),K=Object(n.useMemo)(()=>({resetCheckout:()=>{g({type:d.SET_PRISTINE})},setRedirectUrl:e=>{g(m(e))},setHasError:e=>{g(h(e))},incrementCalculating:()=>{g({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{g({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;g((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{g((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{g((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{g((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(_.decodeEntities)(n)})),"message"in e&&(t.message=Object(_.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;g(m((null==t?void 0:t.redirectUrl)||"")),g((r=t,{type:d.SET_PROCESSING_RESPONSE,data:r})),g({type:d.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{b.status===E.BEFORE_PROCESSING&&(Object(T.b)("error"),Object(w.a)(z.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;x(t),y(r)}),g(p()),g(h())):g({type:d.SET_PROCESSING})}))},[b.status,y,x,g]);const $=Object(s.a)(b.status),X=Object(s.a)(b.hasError);Object(n.useEffect)(()=>{if((b.status!==$||b.hasError!==X)&&b.status===E.AFTER_PROCESSING){const e={redirectUrl:b.redirectUrl,orderId:b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,processingResponse:b.processingResponse};b.hasError?Object(w.b)(z.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message&&Object(i.a)(e.message)){const r=e.messageContext&&Object(i.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,x(e.message,r)}}),t})(t);if(null!==r)L(r)?g(p()):g(f(r));else{if(!(F.some(e=>"error"===e.status)||V.some(e=>"error"===e.status)||U.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(t,{id:"checkout"})}g(p())}}):Object(w.b)(z.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{M(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)g(f(t));else if(Object(l.a)(r)){if(r.message&&Object(i.a)(r.message)){const e=r.messageContext&&Object(i.a)(r.messageContext)?{context:r.messageContext}:void 0;x(r.message,e)}L(r)?g(h(!0)):g(f(r))}else g(f())})}},[b.status,b.hasError,b.redirectUrl,b.orderId,b.customerId,b.orderNotes,b.processingResponse,$,X,K,x,I,D,M,L,F,V,U]);const J={onSubmit:Object(n.useCallback)(()=>{P("submit"),g({type:d.SET_BEFORE_PROCESSING})},[P]),isComplete:b.status===E.COMPLETE,isIdle:b.status===E.IDLE,isCalculating:N,isProcessing:b.status===E.PROCESSING,isBeforeProcessing:b.status===E.BEFORE_PROCESSING,isAfterProcessing:b.status===E.AFTER_PROCESSING,hasError:b.hasError,redirectUrl:b.redirectUrl,onCheckoutBeforeProcessing:W,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:Y,dispatchActions:K,isCart:a,orderId:b.orderId,hasOrder:!!b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,useShippingAsBilling:b.useShippingAsBilling,setUseShippingAsBilling:e=>{return g((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:b.shouldCreateAccount,setShouldCreateAccount:e=>{return g((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:b.extensionData};return Object(n.createElement)(A.Provider,{value:J},t)}},,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(39),o=r(0),s=r(30);const a=()=>{const e=Object(s.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";var n=r(8),o=r(0),s=r(14),a=function({icon:e,className:t,...r}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:s},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(a,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&a===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===s.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(s.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(4),o=r.n(n),s=r(0);t.a=Object(s.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(s.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},,function(e,t,r){"use strict";r.d(t,"n",(function(){return s})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return c})),r.d(t,"m",(function(){return i})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return f})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return E}));var n,o=r(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=s.pluginUrl+"images/",c=s.pluginUrl+"build/",i=s.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),f=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),s=r(69),a=r(59);const c=Object(n.getSetting)("countryLocale",{}),i=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
+/* translators: %s Field label. */
+Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(s.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(c).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,i(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return c}));var n=r(0),o=r(65);const s=Object(n.createContext)({isInitialized:!1,billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>{},setShippingAddress:()=>{}}),a=()=>Object(n.useContext)(s),c=e=>{let{children:t}=e;const r=Object(o.a)();return Object(n.createElement)(s.Provider,{value:r},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,s=Object(n.useRef)(null),a=Object(n.useRef)(0),c=Object(n.useRef)(null),i=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var f=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=i.current,r=l.current;return i.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(c.current),c.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-s.current,n=e-a.current;return!s.current||r>=t||r<0||b&&n>=g},E=function(t){return c.current=null,h&&i.current?e(t):(i.current=l.current=null,u.current)},y=function(){var e=Date.now();if(n(e))return E(e);if(p.current){var o=e-s.current,c=e-a.current,i=t-o,l=b?Math.min(i,g-c):i;r(y,l)}},O=function(){for(var d=[],m=0;m{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const i=n(e,r),l=c(e,r),u={...e.dataset,...i.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:c={},errorBoundaryProps:i={}}=e;Object(s.render)(Object(s.createElement)(a.a,i,Object(s.createElement)(s.Suspense,{fallback:Object(s.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(s.createElement)(t,o()({},c,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:i,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(c.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:s}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:s}=e;const a=document.body.querySelectorAll(o);s&&s.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,s)),i({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:s,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:s}=e;const a=s.querySelectorAll(o);i({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},,function(e,t,r){"use strict";var n=r(8),o=r(0),s=r(4),a=r.n(s),c=r(6),i=r(31),l=r.n(i),u=r(13),d=r(51),p=r(93),m=r(1);function f(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const s=o.getBoundingClientRect();return new n.DOMRect(e.left+s.left,e.top+s.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function E(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var y=r(23);function O(e){const t=Object(o.useContext)(y.a),r=t.slots[e]||{},n=t.fills[e],s=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:s,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var v=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const s=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(v),[n,s]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(s(t(e)),r(()=>{s(t(e))})),[e]),n})(e),a=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,a.current),()=>n(e,a.current)),[]),Object(o.useLayoutEffect)(()=>{a.current.children=t,s&&s.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==a.current.name&&(n(a.current.name,a.current),a.current.name=e,r(e,a.current))},[e]),s&&s.node?(Object(c.isFunction)(t)&&(t=t(s.props.fillProps)),Object(o.createPortal)(t,s.node)):null}var S=e=>Object(o.createElement)(v.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,s=Object(c.map)(n(t,this),e=>{const t=Object(c.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(c.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(c.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(c.isFunction)(e)?e(s):s)}}var w=e=>Object(o.createElement)(v.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:s})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:s})));function j(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=O(e),n=Object(o.useRef)({rerender:j()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...s},a){const c=Object(o.useContext)(y.a),i=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(c.registerSlot(e,i,t),()=>{c.unregisterSlot(e,i)}),[c.registerSlot,c.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{c.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([a,i])},s))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(C,e))}r(12),o.Component;const A=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function x(e){return"appear"===e?"top":"left"}function P(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:s}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const c=r?parseInt(r,10):0,i=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+c,width:e.width-l-u,height:e.height-c-i,left:e.left+l,right:e.right-u,top:e.top+c,bottom:e.bottom-i}}function N(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:s,noArrow:c=!0,isAlternate:i,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:y,shouldAnchorIncludePadding:v,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:w=!0,onClickOutside:j,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:A="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:U,...V},B)=>{const H=Object(o.useRef)(null),z=Object(o.useRef)(null),G=Object(o.useRef)(),Y=Object(u.useViewportMatch)("medium","<"),[q,K]=Object(o.useState)(),$=O(A),X=k&&Y,[J,Q]=Object(u.useResizeObserver)();c=X||c,Object(o.useLayoutEffect)(()=>{if(X)return I(G.current,"is-without-arrow",c),I(G.current,"is-alternate",i),N(G.current,"data-x-axis"),N(G.current,"data-y-axis"),M(G.current,"top"),M(G.current,"left"),M(z.current,"maxHeight"),void M(z.current,"maxWidth");const e=()=>{if(!G.current||!z.current)return;let e=function(e,t,r,n=!1,o,s){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return f(t,t.ownerDocument||e.current.ownerDocument,s)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return f(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,s);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=f(n.getBoundingClientRect(),n.ownerDocument,s);return o?e:P(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),a=t.getBoundingClientRect(),c=f(new window.DOMRect(r.left,r.top,r.width,a.bottom-r.top),e.ownerDocument,s);return o?c:P(c,n)}if(!e.current)return;const{parentNode:a}=e.current,c=a.getBoundingClientRect();return o?c:P(c,a)}(H,_,S,y,v,G.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=G.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var s;L&&(n=null===(s=G.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const a=Q.height?Q:z.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:E}=function(e,t,r="top",n,o,s,a,c,i){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,s,a,c){const{height:i}=t;if(o){const t=o.getBoundingClientRect().top+i-a;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-i/2>0?i/2:l)+(l+i/2>window.innerHeight?window.innerHeight-l:i/2)},d={popoverTop:e.top,contentHeight:e.top-10-i>0?i:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+i>window.innerHeight?window.innerHeight-10-e.bottom:i};let m,f=r,h=null;if(!o&&!c)if("middle"===r&&u.contentHeight===i)f="middle";else if("top"===r&&d.contentHeight===i)f="top";else if("bottom"===r&&p.contentHeight===i)f="bottom";else{f=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===f?d.contentHeight:p.contentHeight;h=e!==i?e:null}return m="middle"===f?u.popoverTop:"top"===f?d.popoverTop:p.popoverTop,{yAxis:f,popoverTop:m,contentHeight:h}}(e,t,l,d,n,0,s,c);return{...function(e,t,r,n,o,s,a,c,i){const{width:l}=t;"left"===r&&Object(m.isRTL)()?r="right":"right"===r&&Object(m.isRTL)()&&(r="left"),"left"===n&&Object(m.isRTL)()?n="right":"right"===n&&Object(m.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===s||i||(p=u);let f=e.right;"left"===n?f=e.left:"middle"===s||i||(f=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let g,E=r,y=null;if(!o&&!c)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&h.contentWidth===l)E="left";else if("right"===r&&b.contentWidth===l)E="right";else{E=h.contentWidth>b.contentWidth?"left":"right";const e="left"===E?h.contentWidth:b.contentWidth;l>window.innerWidth&&(y=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===E?d.popoverLeft:"left"===E?h.popoverLeft:b.popoverLeft,a){const e=a.getBoundingClientRect();g=Math.min(g,e.right-l),Object(m.isRTL)()||(g=Math.max(g,0))}return{xAxis:E,popoverLeft:g,contentWidth:y}}(e,t,u,d,n,p.yAxis,a,c,i),...p}}(e,a,h,R,G.current,o,n,F,U);"number"==typeof l&&"number"==typeof u&&(M(G.current,"top",l+"px"),M(G.current,"left",u+"px")),I(G.current,"is-without-arrow",c||"center"===p&&"middle"===b),I(G.current,"is-alternate",i),N(G.current,"data-x-axis",p),N(G.current,"data-y-axis",b),M(z.current,"maxHeight","number"==typeof g?g+"px":""),M(z.current,"maxWidth","number"==typeof E?E+"px":""),K(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=G.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const s=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",s),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(y);let l;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",s),r.cancelAnimationFrame(o),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[X,_,S,y,v,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&j){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),j(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([G,ee,B]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return a()("components-animate__loading");const{type:t,origin:r=x(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return a()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:a()("components-popover",s,ne,{"is-expanded":X,"is-without-arrow":c,"is-alternate":i})},V,{ref:re},te,{tabIndex:"-1"}),X&&Object(o.createElement)(E,null),X&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(W,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:z,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return $.ref&&(oe=Object(o.createElement)(T,{name:A},oe)),y||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(A,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(c.isString)(e)&&(r=e),Object(c.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const U=Object(o.createElement)("div",{className:"event-catcher"}),V=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(U,e),Object(o.cloneElement)(t,{children:r}),","),e),B=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var z=function({children:e,position:t,text:r,shortcut:n}){const[s,a]=Object(o.useState)(!1),[i,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),a(!0)},m=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),a(!1)},f=e=>"mouseUp"===e?m:"mouseDown"===e?p:void 0,h=f("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&s)return;d.cancel();const o=Object(c.includes)(["focus","mouseenter"],n.type);o!==i&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:f("mouseDown")},y=o.Children.only(e),{children:O,disabled:v}=y.props;return(v?V:B)({child:y,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:s})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:s}))))({grandchildren:O,isOver:i,position:t,text:r,shortcut:n})})},G=r(41),Y=r(42);const q=["onMouseDown","onClick"];var W=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:s,isSmall:i,isPressed:u,isBusy:d,isDestructive:p,className:m,disabled:f,icon:h,iconPosition:b="left",iconSize:g,showTooltip:E,tooltipPosition:y,shortcut:O,label:v,children:_,text:S,variant:k,__experimentalIsFocusable:w,describedBy:j,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:s,...a}){let c=s;var i,u,d,p,m;return t&&(null!==(i=c)&&void 0!==i||(c="primary")),n&&(null!==(u=c)&&void 0!==u||(c="tertiary")),r&&(null!==(d=c)&&void 0!==d||(c="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=c)&&void 0!==p||(c="secondary")),o&&(null!==(m=c)&&void 0!==m||(c="link")),{...a,variant:c}}(e),R=a()("components-button",m,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":i,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=f&&!w,A=void 0===r||T?"button":"a",x="a"===A?{href:r,target:s}:{type:"button",disabled:T,"aria-pressed":u};if(f&&w){x["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const P=!T&&(E&&v||O||!!v&&(!_||Object(c.isArray)(_)&&!_.length)&&!1!==E),N=j?Object(c.uniqueId)():null,M=C["aria-describedby"]||N,I=Object(o.createElement)(A,Object(n.a)({},x,C,{className:R,"aria-label":C["aria-label"]||v,"aria-describedby":M,ref:t}),h&&"left"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),_);return P?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z,{text:j||v,shortcut:O,position:y},I),j&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:N},j))):Object(o.createElement)(o.Fragment,null,I,j&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:N},j)))}))},function(e,t){e.exports=window.wp.dom},,function(e,t,r){var n=r(80),o=r(54),s=o.setStyleProp,a=n.html,c=n.svg,i=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],i(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(c,t)?d[(u=c[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return s(e.style,d),d}},function(e,t,r){var n=r(3),o=r(84).default,s={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,s={},a={};for(r in e)n=e[r],o&&(s=t(r,n))&&2===s.length?a[s[0]]=s[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,s))}}},function(e,t,r){for(var n,o=r(90).CASE_SENSITIVE_TAG_NAMES,s={},a=0,c=o.length;a{},isSuppressed:!1}),s=()=>Object(n.useContext)(o),a=e=>{let{children:t}=e;const[r,s]=Object(n.useState)(!1),a={setIsSuppressed:s,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:a},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},function(e,t,r){var n=r(79),o=r(53),s=r(88),a={decodeEntities:!0,lowerCaseAttributeNames:!1};function c(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(s(e,(t=t||{}).htmlparser2||a),t)}c.domToReact=n,c.htmlToDOM=s,c.attributesToProps=o,e.exports=c,e.exports.default=c},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},,function(e,t){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var i,l=[],u=!1,d=-1;function p(){u&&i&&(u=!1,i.length?l=i.concat(l):d=-1,l.length&&m())}function m(){if(!u){var e=c(p);u=!0;for(var t=l.length;t;){for(i=l,l=[];++d1)for(var r=1;r{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:a}=Object(o.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(l.a)(),p=Object(s.useRef)({});return Object(s.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(i.a)(t)&&!c()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:a}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(7),o=r(5);const s=()=>{const{customerData:e,isInitialized:t}=Object(n.useSelect)(e=>{const t=e(o.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:r,setBillingData:s}=Object(n.useDispatch)(o.CART_STORE_KEY);return{isInitialized:t,billingData:e.billingData,shippingAddress:e.shippingAddress,setBillingData:s,setShippingAddress:r}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return O})),r.d(t,"a",(function(){return v}));var n=r(0);const o={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},s={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},a={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:o,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},c=(e,t)=>{let{type:r}=t;return Object.values(o).includes(r)?r:e};var i=r(91),l=r(194);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=r(196),p=r(34),m=r(30),f=r(67),h=r(64);const{NONE:b,INVALID_ADDRESS:g,UNKNOWN:E}=o,y=Object(n.createContext)(a),O=()=>Object(n.useContext)(y),v=e=>{let{children:t}=e;const{dispatchActions:r}=Object(p.b)(),{shippingRates:a,isLoadingRates:l,cartErrors:O}=Object(m.a)(),{isSelectingRate:v}=Object(f.a)(),{selectedRates:_}=Object(h.a)(),[S,k]=Object(n.useReducer)(c,b),[w,j]=Object(n.useReducer)(i.b,{}),C=Object(n.useRef)(w),R=Object(n.useMemo)(()=>({onShippingRateSuccess:u(j).onSuccess,onShippingRateFail:u(j).onFail,onShippingRateSelectSuccess:u(j).onSelectSuccess,onShippingRateSelectFail:u(j).onSelectFail}),[j]);Object(n.useEffect)(()=>{C.current=w},[w]),Object(n.useEffect)(()=>{l?r.incrementCalculating():r.decrementCalculating()},[l,r]),Object(n.useEffect)(()=>{v?r.incrementCalculating():r.decrementCalculating()},[v,r]),Object(n.useEffect)(()=>{O.length>0&&O.some(e=>!(!e.code||!Object.values(s).includes(e.code)))?k({type:g}):k({type:b})},[O]);const T=Object(n.useMemo)(()=>({isPristine:S===b,isValid:S===b,hasInvalidAddress:S===g,hasError:S===E||S===g}),[S]);Object(n.useEffect)(()=>{l||0!==a.length&&!T.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:T.hasInvalidAddress,hasError:T.hasError})},[a,l,T.hasError,T.hasInvalidAddress]),Object(n.useEffect)(()=>{!l&&a.length>0&&!T.hasError&&Object(d.a)(C.current,"shipping_rates_success",a)},[a,l,T.hasError]),Object(n.useEffect)(()=>{v||(T.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:T.hasError,hasInvalidAddress:T.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",_.current))},[_,v,T.hasError,T.hasInvalidAddress]);const A={shippingErrorStatus:T,dispatchErrorStatus:k,shippingErrorTypes:o,...R};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(y.Provider,{value:A},t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(7),o=r(0),s=r(5),a=r(72),c=r(40);const i=()=>{const e=Object(a.a)(),{dispatchCheckoutEvent:t}=Object(c.a)(),{selectShippingRate:r}=Object(n.useDispatch)(s.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((n,o)=>{r(n,o).then(()=>{t("set-selected-shipping-rate",{shippingRateId:n})}).catch(t=>{e(t)})},[r,t,e]),isSelectingRate:Object(n.useSelect)(e=>e(s.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return i}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:s,detail:a={}}=t;if(!n)return;s||(s=document.body);const c=new n(e,{bubbles:r,cancelable:o,detail:a});s.dispatchEvent(c)};let s;const a=()=>{s&&clearTimeout(s),s=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},c=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const s=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,s),()=>jQuery(document).off(e,s)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(11),o=r.n(n),s=r(0);r(105);const a=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(s.useRef)(null);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(s.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];a(e),null==e||e.focus()}else a(e)})(e,r):a(e))})(r.current,e)}})))}},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(7);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const r=Object(n.select)("core/notices").getNotices(e);return r.some(e=>e.type===t)},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object(n.select)("core/notices").getNotices(),{removeNotice:o}=Object(n.dispatch)("core/notices"),s=r.filter(t=>t.status===e);s.forEach(e=>o(e.id,t))}},function(e,t){},function(e,t,r){var n=r(3),o=r(53),s=r(54),a=s.setStyleProp;function c(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&s.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var s,i,l,u,d=(r=r||{}).library||n,p=d.cloneElement,m=d.createElement,f=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,E=0,y=t.length;E1&&(i=p(i,{key:i.key||E})),h.push(i);else if("text"!==s.type){switch(l=s.attribs,c(s)?a(l.style,l):l&&(l=o(l)),u=null,s.type){case"script":case"style":s.children[0]&&(l.dangerouslySetInnerHTML={__html:s.children[0].data});break;case"tag":"textarea"===s.name&&s.children[0]?l.defaultValue=s.children[0].data:s.children&&s.children.length&&(u=e(s.children,r));break;default:continue}y>1&&(l.key=E),h.push(m(s.name,l,u))}else g?s.data.trim()&&h.push(s.data):h.push(s.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(81),o=r(82),s=r(83),a=s.MUST_USE_PROPERTY,c=s.HAS_BOOLEAN_VALUE,i=s.HAS_NUMERIC_VALUE,l=s.HAS_POSITIVE_NUMERIC_VALUE,u=s.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,s,p=e.Properties,m=e.DOMAttributeNames;for(o in p)n=m[o]||(r?o:o.toLowerCase()),s=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(s,a),hasBooleanValue:d(s,c),hasNumericValue:d(s,i),hasPositiveNumericValue:d(s,l),hasOverloadedBooleanValue:d(s,u)}}var m={};p(n,m);var f={};p(o,f,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:m,svg:f,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(85)),s=r(87);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[s.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(86);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var s,a,c=n(e),i="function"==typeof t,l=0,u=c.length;l/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(c);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),s(n(e),null,t)}},function(e,t,r){var n=r(55),o=/<([a-zA-Z]+[0-9]?)/,s=//i,a=//i,c=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,i=n.isIE(9),l=i||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,m=i?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+""+t+">"),i&&(e=e.replace(c,"<$1$2$3/>")),p.parseFromString(e,m)}}if(document.implementation){var f=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f;try{return f.documentElement.innerHTML=e,f}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,c,i=e.match(o);switch(i&&i[1]&&(t=i[1].toLowerCase()),t){case"html":return r=d(e),s.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return c=u(e).getElementsByTagName(t),a.test(e)&&s.test(e)?c[0].parentNode.childNodes:c;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return c}));var n=r(6);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const s={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:n,callback:s,priority:c}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return i.set(n,{priority:c,callback:s}),{...e,[r]:i};case o.REMOVE_EVENT_CALLBACK:return i.delete(n),{...e,[r]:i}}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var n=r(1),o=r(17);const s=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},a=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(o.decodeEntities)(e.message):Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";var n=r(0),o=r(14);const s=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=s},function(e,t,r){"use strict";var n=r(0),o=r(6),s=r(4),a=r.n(s),c=r(1),i=r(19),l=r(93),u=r(50);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:s=r,onRemove:p=o.noop,isDismissible:m=!0,actions:f=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(i.speak)(r,t)},[r,t])}(s,h);const E=a()(e,"components-notice","is-"+t,{"is-dismissible":m});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},f.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:s=!1,onClick:c,url:i},l)=>{let d=o;return"primary"===o||s||(d=i?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:i,variant:d,onClick:i?void 0:c,className:a()("components-notice__action",e)},t)}))),m&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(c.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(11)),s=n(r(125)),a=r(3),c=n(a),i=n(r(126)),l=n(r(128)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}for(var a=s,c=!1,i=0;i=m.startTime+l.duration;else if(l.decay)b=f+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-b)<.1)&&(h=b);else{d=void 0!==m.lastTime?m.lastTime:t,y=void 0!==m.lastVelocity?m.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),v=0;vh:b=e);++r);return r-1}(e,s);return function(e,t,r,n,o,s,a,c,i){var l=i?i(e):e;if(lr){if("identity"===c)return l;"clamp"===c&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=s(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,s[t],s[t+1],o[t],o[t+1],i,a,c,n.map)}}var V=function(e){function t(r,n,o,s){var a;return(a=e.call(this)||this).calc=void 0,a.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],a.calc=U(n,o,s),a}i(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=U(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),B=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}i(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new V(this,e,t,r)},t}(E),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new B(e)})),r}i(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new V(this,e,t)},t}(y),z=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,a=t.to,c=s(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},c,{delay:n,to:a}));else if(a){var i={};Object.entries(a).forEach((function(e){var t,r=e[0],s=e[1],a=o({to:(t={},t[r]=s,t),delay:f(n,r)},c),l=i[a.delay]&&i[a.delay].to;i[a.delay]=o({},i[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(i)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(c),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,s=e.to,a=void 0===s?{}:s;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(a)&&(t.merged=o({},t.merged,a))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,a){var c=o.delay,i=s(o,["delay"]),l=function(o){a===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(i.to)||u.fun(i.to);c?setTimeout((function(){r===t.guid&&(d?t.runAsync(i,l):t.diff(i).start(l))}),c):d?t.runAsync(i,l):t.diff(i).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(x||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,s(e,["delay"])),a=this.local,c=Promise.resolve(void 0);if(u.arr(n.to))for(var i=function(e){var t=e,s=o({},n,h(n.to[t]));u.arr(s.config)&&(s.config=s.config[t]),c=c.then((function(){if(a===r.guid)return new Promise((function(e){return r.diff(s).start(e)}))}))},l=0;l=n.length)return"break";a=n[s++]}else{if((s=n.next()).done)return"break";a=s.value}var r=a.key,c=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(c),e.current.deleted=e.current.deleted.filter(c))},n=e.current.deleted,o=Array.isArray(n),s=0;for(n=o?n:n[Symbol.iterator]();;){var a;if("break"===r())break}e.current.forceUpdate()}var X=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof E||(t=b.transform(t)),r.payload=t,r}return i(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,s=ie(o,n,e+1/3),a=ie(o,n,e),c=ie(o,n,e-1/3);return Math.round(255*s)<<24|Math.round(255*a)<<16|Math.round(255*c)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function me(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function fe(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ae.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ce.exec(t))?parseInt(r[1],16)>>>0:(r=se.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),me(r[2]),me(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),me(r[2]),me(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),Ee={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||Ee.hasOwnProperty(e)&&Ee[e]?(""+t).trim():t+"px"}Ee=Object.keys(Ee).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),Ee);var ve={};N((function(e){return new X(e)})),T("div"),j((function(e){var t=e.output.map((function(e){return e.replace(be,fe)})).map((function(e){return e.replace(ge,fe)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return U(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),v((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,a=t.scrollLeft,c=s(t,["style","children","scrollTop","scrollLeft"]),i="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=Oe(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in c){var m=i?p:ve[p]||(ve[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,c[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return a.forwardRef((function(t,r){var n=d(),i=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),m=a.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){i.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(r,(function(){return P(p,i,n)})),m(t);var f,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,s(h,["scrollTop","scrollLeft"])),E=(f=e,!u.fun(f)||f.prototype instanceof c.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return c.createElement(e,o({},g,{ref:E}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),we=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new V(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),r=Y(1,t?e:[e]),n=r[0],o=r[1],s=r[2];return t?[n[0],o,s]:n},t.useTrail=function(e,t){var r=a.useRef(!1),n=u.fun(t),s=f(t),c=a.useRef(),i=Y(e,(function(e,t){return 0===e&&(c.current=[]),c.current.push(t),o({},s,{config:f(s.config,e),attach:e>0&&function(){return c.current[e-1]}})})),l=i[0],d=i[1],p=i[2],m=a.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,a=c.current[n];return o({},e,{config:f(e.config||s.config,t),attach:a&&function(){return a}})}))}}),[e,s.reverse]);return a.useEffect((function(){r.current&&!n&&m(t)})),a.useEffect((function(){r.current=!0}),[]),n?[l,m,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),c=K(n),i=c.lazy,l=void 0!==i&&i,u=(c.unique,c.reset),p=void 0!==u&&u,m=(c.enter,c.leave,c.update,c.onDestroyed),h=(c.keys,c.items,c.onFrame),b=c.onRest,g=c.onStart,E=c.ref,y=s(c,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),v=a.useRef(!1),_=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!v.current&&new Map,forceUpdate:O});return a.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,a=s(e,["first","prevProps"]),c=K(t),i=c.items,l=c.keys,u=c.initial,d=c.from,p=c.enter,m=c.leave,h=c.update,b=c.trail,g=void 0===b?0:b,E=c.unique,y=c.config,O=c.order,v=void 0===O?["enter","leave","update"]:O,_=K(n),S=_.keys,k=_.items,w=o({},a.current),j=[].concat(a.deleted),C=Object.keys(w),R=new Set(C),T=new Set(l),A=l.filter((function(e){return!R.has(e)})),x=a.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),P=l.filter((function(e){return R.has(e)})),N=-g;v.length;)switch(v.shift()){case"enter":A.forEach((function(e,t){E&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=i[n],s=r&&void 0!==u?"initial":"enter";w[e]={slot:s,originalKey:e,key:E?String(e):q++,item:o,trail:N+=g,config:f(y,o,s),from:f(r&&void 0!==u?u||{}:d,o),to:f(p,o)}}));break;case"leave":x.forEach((function(e){var t=S.indexOf(e),r=k[t];j.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:N+=g,config:f(y,r,"leave"),to:f(m,r)})),delete w[e]}));break;case"update":P.forEach((function(e){var t=l.indexOf(e),r=i[t];w[e]=o({},w[e],{item:r,slot:"update",trail:N+=g,config:f(y,r,"update"),to:f(h,r)})}))}var M=l.map((function(e){return w[e]}));return j.forEach((function(e){var t,r=e.left,n=(e.right,s(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},a,{changed:A.length||x.length||P.length,first:r&&0===A.length,transitions:M,current:w,deleted:j,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,s=e.config,a=e.trail,c=e.key,i=e.item;_.current.instances.has(c)||_.current.instances.set(c,new G);var u=_.current.instances.get(c),d=o({},y,{to:n,from:r,config:s,ref:E,onRest:function(r){_.current.mounted&&(e.destroyed&&(E||l||$(_,c),m&&m(i)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(E||l)&&_.current.deleted.length>0&&$(_),b&&b(i,t,r))},onStart:g&&function(){return g(i,t)},onFrame:h&&function(e){return h(i,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),a.useEffect((function(){return _.current.mounted=v.current=!0,function(){_.current.mounted=v.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=a.useRef();a.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var s=e.current;if(s){var a=s.controllers;if(a.length){var c=r*t[n];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+c})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=Y},,,,,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{icon:t,size:r=24,...o}=e;return Object(n.cloneElement)(t,{width:r,height:r,...o})}},,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(6),s=r(4),a=r.n(s),c=r(19),i=r(1),l=(r(38),r(50));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:s=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:m=null,explicitDismiss:f=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(c.speak)(r,t)},[r,t])}(s,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{f||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const E=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!f});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const y=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!m});return Object(n.createElement)("div",{ref:b,className:E,onClick:f?o.noop:g,tabIndex:"0",role:f?"":"button",onKeyPress:f?o.noop:g,"aria-label":f?"":Object(i.__)("Dismiss this notice")},Object(n.createElement)("div",{className:y},m&&Object(n.createElement)("div",{className:"components-snackbar__icon"},m),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),f&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(63))},function(e,t){e.exports=window.wp.plugins},,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(45),o=(r(26),r(2));const s=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),a=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),s=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(s[r]="")}),s}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(11),o=r.n(n),s=r(0),a=r(4),c=r.n(a),i=r(94),l=r(7),u=(r(78),r(56));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:a}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:m}=Object(l.useDispatch)("core/notices"),f=p.filter(e=>"snackbar"!==e.type).concat(n);if(!f.length)return null;const h=c()(t,"wc-block-components-notices");return a?null:Object(s.createElement)("div",{className:h},f.map(e=>Object(s.createElement)(i.a,o()({key:"store-notice-"+e.id},e,{className:c()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&m(e.id,r)}}),e.content)))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(48),s=r(2),a=r(58),c=r.n(a),i=r(10),l=r(15);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:a,depth:p=1}=e;return a&&0!==a.length?Array.from(a).map((e,a)=>{const{blockName:m="",...f}={key:`${t}_${p}_${a}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},h=u(m,r);if(!h){const s=c()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof s&&s)return s;if(!Object(n.isValidElement)(s))return null;const a=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return a?Object(n.cloneElement)(s,f,a):Object(n.cloneElement)(s,f)}const b=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${a}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+m,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(b,null,Object(n.createElement)(h,f,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(i.hasInnerBlocks)(e))return null;const a=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],c=Object(i.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!a.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,c.map((e,r)=>{let{blockName:o,component:a}=e;const c=a||u(o,t);return c?Object(n.createElement)(l.a,{text:"Unexpected error in: "+o,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(c,{key:`${o}_forced_${r}`}))):null}))})(m,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:s=(()=>({})),blockMap:a,blockWrapper:c}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:a,children:e.children||[],blockWrapper:c});return{...s(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(127);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},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},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(112),s=r(2),a=r(15),c=r(198),i=r(66),l=r(46),u=r(34),d=r(1),p=r(24),m=r.n(p),f=r(116),h=r(92),b=r(7);const g=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},E=(e,t)=>{m.a.setNonce&&"function"==typeof m.a.setNonce&&m.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var y=r(191),O=r(30),v=r(56),_=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:s,isBeforeProcessing:a,isComplete:p,orderNotes:_,shouldCreateAccount:S,extensionData:k}=Object(u.b)(),{hasValidationErrors:w}=Object(y.b)(),{shippingErrorStatus:j}=Object(i.b)(),{billingData:C,shippingAddress:R}=Object(l.b)(),{cartNeedsPayment:T,cartNeedsShipping:A,receiveCart:x}=Object(O.a)(),{activePaymentMethod:P,isExpressPaymentMethodActive:N,currentStatus:M,paymentMethodData:I,expressPaymentMethods:D,paymentMethods:L,shouldSavePayment:F}=Object(c.b)(),{setIsSuppressed:U}=Object(v.b)(),{createErrorNotice:V,removeNotice:B}=Object(b.useDispatch)("core/notices"),H=Object(n.useRef)(C),z=Object(n.useRef)(R),G=Object(n.useRef)(o),[Y,q]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...D,...L};return null==t||null===(e=t[P])||void 0===e?void 0:e.paymentMethodId},[P,D,L]),K=w&&!N||M.hasError||j.hasError,$=!e&&!K&&(M.isSuccessful||!T)&&s;Object(n.useEffect)(()=>{U(N)},[N,U]),Object(n.useEffect)(()=>{K===e||!s&&!a||N||r.setHasError(K)},[K,e,s,a,N,r]),Object(n.useEffect)(()=>{H.current=C,z.current=R,G.current=o},[C,R,o]);const X=Object(n.useCallback)(()=>!w&&(M.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,M.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return N||(e=t(X,0)),()=>{N||e()}},[t,X,N]),Object(n.useEffect)(()=>{G.current&&(window.location.href=G.current)},[p]);const J=Object(n.useCallback)(async()=>{if(Y)return;q(!0),B("checkout");const e=T?{payment_method:W,payment_data:g(I,F,P)}:{},t={billing_address:Object(f.a)(H.current),customer_note:_,create_account:S,...e,extensions:{...k}};A&&(t.shipping_address=Object(f.a)(z.current)),m()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&x(e.data.cart),V(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{V(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;V(Object(d.sprintf)(// Translators: %s Error text.
+Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),q(!1)})},[Y,B,T,W,I,F,P,_,S,k,A,r,V,x]);return Object(n.useEffect)(()=>{$&&!Y&&J()},[J,$,Y]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(i.a,null,Object(n.createElement)(c.a,null,t,Object(n.createElement)(a.a,{renderError:s.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(_,null)))))}},,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(0);const o=Object(n.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),s=(Object(n.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),()=>Object(n.useContext)(o))},function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},,,,,,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-cart-items-block","version":"1.0.0","title":"Cart Items","description":"Shows cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"showCompanyField":{"type":"boolean","default":false},"requireCompanyField":{"type":"boolean","default":false},"allowCreateAccount":{"type":"boolean","default":false},"showApartmentField":{"type":"boolean","default":true},"showPhoneField":{"type":"boolean","default":true},"requirePhoneField":{"type":"boolean","default":false}},"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(6),s=r(12),a=r.n(s);const c=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(n.useContext)(c),l=e=>{let{children:t}=e;const[r,s]=Object(n.useState)({}),i=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{s(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{s({})},[]),p=Object(n.useCallback)(e=>{e&&s(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),m=Object(n.useCallback)((e,t)=>{s(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return a()(r[e],n)?r:{...r,[e]:n}})},[]),f={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{m(e,{hidden:!0})},[m]),showValidationError:Object(n.useCallback)(e=>{m(e,{hidden:!1})},[m]),showAllValidationErrors:Object(n.useCallback)(()=>{s(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(c.Provider,{value:f},t)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(91);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const s=n.a.addEventCallback(e,r,o);return t(s),()=>{t(n.a.removeEventCallback(e,s.id))}}},function(e,t){},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(28);const s=async(e,t,r)=>{const o=n(e,t),s=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&s.push(t)}catch(e){console.error(e)}return!s.length||s},a=async(e,t,r)=>{const s=[],a=n(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return s.push(t),s;s.push(t)}catch(e){return console.error(e),s.push({type:"error"}),s}return s}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return L})),r.d(t,"a",(function(){return F}));var n=r(0),o=r(61),s=r(7);let a,c;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(a||(a={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(c||(c={}));const i={currentStatus:a.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:a,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:s={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case a.PRISTINE:return{...i,...e,errorMessage:"",currentStatus:a.PRISTINE};case a.STARTED:return{...e,currentStatus:a.STARTED};case a.ERROR:return e.currentStatus!==a.ERROR?{...e,currentStatus:a.ERROR,errorMessage:o||e.errorMessage}:e;case a.FAILED:return e.currentStatus!==a.FAILED?{...e,currentStatus:a.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case a.SUCCESS:return e.currentStatus!==a.SUCCESS?{...e,currentStatus:a.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case a.PROCESSING:return e.currentStatus!==a.PROCESSING?{...e,currentStatus:a.PROCESSING,errorMessage:""}:e;case a.COMPLETE:return e.currentStatus!==a.COMPLETE?{...e,currentStatus:a.COMPLETE}:e;case c.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:s};case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:s};case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case c.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},d=r(1),p=r(16),m=r(29),f=r(2),h=r(47),b=r(25),g=r(46),E=r(30),y=r(28),O=r(64);const v=(e,t,r,o)=>{const[a,c]=Object(n.useState)(!1),{isEditor:i}=Object(b.a)(),{selectedRates:l}=Object(O.a)(),{billingData:u,shippingAddress:p}=Object(g.b)(),y=Object(m.a)(l),v=Object(m.a)(r),_=Object(E.a)(),{cartTotals:S,cartIsLoading:k,cartNeedsShipping:w,paymentRequirements:j}=_,C=Object(n.useRef)({cart:_,cartTotals:S,cartNeedsShipping:w,billingData:u,shippingAddress:p,selectedShippingMethods:y,paymentRequirements:j}),{createErrorNotice:R}=Object(s.useDispatch)("core/notices");Object(n.useEffect)(()=>{C.current={cart:_,cartTotals:S,cartNeedsShipping:w,billingData:u,shippingAddress:p,selectedShippingMethods:y,paymentRequirements:j}},[_,S,w,u,p,y,j]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e{k||A()},[A,_,y,u,k]),a},_=e=>({type:e}),S=e=>({type:a.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:a.FAILED,errorMessage:t,paymentMethodData:r}},w=e=>{let{paymentMethodData:t}=e;return{type:a.SUCCESS,paymentMethodData:t}},j=e=>({type:c.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:c.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:c.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var A=r(65),x=r(34),P=r(91),N=r(194);var M=r(196),I=r(191);const D=Object(n.createContext)(l),L=()=>Object(n.useContext)(D),F=e=>{let{children:t}=e;const{isProcessing:r,isIdle:c,isCalculating:l,hasError:d}=Object(x.b)(),{isEditor:m,getPreviewData:h}=Object(b.a)(),{setValidationErrors:g}=Object(I.b)(),{createErrorNotice:E,removeNotice:O}=Object(s.useDispatch)("core/notices"),{isSuccessResponse:L,isErrorResponse:F,isFailResponse:U,noticeContexts:V}=Object(y.d)(),[B,H]=Object(n.useReducer)(P.b,{}),{onPaymentProcessing:z}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(N.a)("payment_processing",e)}),[e]))(H),G=Object(n.useRef)(B);Object(n.useEffect)(()=>{G.current=B},[B]);const[Y,q]=Object(n.useReducer)(u,i),{dispatchActions:W,setPaymentStatus:K}=(e=>{const{setBillingData:t,setShippingAddress:r}=Object(A.a)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(j(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(_(a.PRISTINE)),started:()=>e(_(a.STARTED)),processing:()=>e(_(a.PROCESSING)),completed:()=>e(_(a.COMPLETE)),error:t=>e(S(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(k({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof s&&null!=s&&s.address&&r(s.address),e(w({paymentMethodData:n}))}}),[e,t,r])}})(q),$=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:r}=Object(y.d)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return v(e,t,Array.from(n),r.PAYMENTS)})(W.setRegisteredPaymentMethods),X=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:r}=Object(y.d)();return v(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),J=Object(n.useMemo)(()=>m?h("previewSavedPaymentMethods"):$?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(Y.paymentMethods):{},[m,h,$,Y.paymentMethods]),Q=Object(n.useCallback)(e=>{e?E(e,{id:"wc-express-payment-error",context:V.EXPRESS_PAYMENTS}):O("wc-express-payment-error",V.EXPRESS_PAYMENTS)},[E,V.EXPRESS_PAYMENTS,O]),Z=Object.keys(Y.expressPaymentMethods).includes(Y.activePaymentMethod),ee=Object(n.useMemo)(()=>({isPristine:Y.currentStatus===a.PRISTINE,isStarted:Y.currentStatus===a.STARTED,isProcessing:Y.currentStatus===a.PROCESSING,isFinished:[a.ERROR,a.FAILED,a.SUCCESS].includes(Y.currentStatus),hasError:Y.currentStatus===a.ERROR,hasFailed:Y.currentStatus===a.FAILED,isSuccessful:Y.currentStatus===a.SUCCESS,isDoingExpressPayment:Y.currentStatus!==a.PRISTINE&&Z}),[Y.currentStatus,Z]);Object(n.useEffect)(()=>{const e=Object.keys(Y.paymentMethods);if(!$||!e.length)return;const t=[...e,...Object.keys(Y.expressPaymentMethods)];if(Y.activePaymentMethod&&t.includes(Y.activePaymentMethod))return;K().pristine();const r=Object.keys(J).flatMap(e=>J[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(Y.paymentMethods)[0])},[$,Y.paymentMethods,Y.expressPaymentMethods,W,K,Y.activePaymentMethod,J]),Object(n.useEffect)(()=>{!r||d||l||ee.isFinished||K().processing()},[r,d,l,ee.isFinished,K]),Object(n.useEffect)(()=>{c&&!ee.isSuccessful&&K().pristine()},[c,ee.isSuccessful,K]),Object(n.useEffect)(()=>{d&&ee.isSuccessful&&K().pristine()},[d,ee.isSuccessful,K]),Object(n.useEffect)(()=>{ee.isProcessing&&(O("wc-payment-error",V.PAYMENTS),Object(M.b)(G.current,"payment_processing",{}).then(e=>{let t,r;var n,o,s,a,c,i;if(e.forEach(e=>{L(e)&&(t=e),(F(e)||U(e))&&(r=e)}),t&&!r)K().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(s=t)||void 0===s||null===(a=s.meta)||void 0===a?void 0:a.billingData,null===(c=t)||void 0===c||null===(i=c.meta)||void 0===i?void 0:i.shippingData);else if(r&&U(r)){var l,u,d,p,m,f;r.message&&r.message.length&&E(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(f=r)||void 0===f?void 0:f.messageContext)||V.PAYMENTS}),K().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(m=p.meta)||void 0===m?void 0:m.billingData)}else if(r){var h,b;r.message&&r.message.length&&E(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||V.PAYMENTS}),K().error(r.message),g(null===(h=r)||void 0===h?void 0:h.validationErrors)}else K().success()}))},[ee.isProcessing,g,K,O,V.PAYMENTS,L,U,F,E]);const te="object"==typeof Y.paymentMethodData&&Object(o.b)(Y.paymentMethodData,"token")?Y.paymentMethodData.token+"":"",re={setPaymentStatus:K,currentStatus:ee,paymentStatuses:a,paymentMethodData:Y.paymentMethodData,errorMessage:Y.errorMessage,activePaymentMethod:Y.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:z,customerPaymentMethods:J,paymentMethods:Y.paymentMethods,expressPaymentMethods:Y.expressPaymentMethods,paymentMethodsInitialized:$,expressPaymentMethodsInitialized:X,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:Y.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(n.createElement)(D.Provider,{value:re},t)}},,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(233)},function(e,t){},function(e,t){},function(e,t){},,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(141),s=r(30),a=r(12),c=r.n(a),i=r(34),l=r(191),u=r(16),d=r(124),p=r(44),m=r(10),f={CHECKOUT_ACTIONS:r(161),CHECKOUT_BILLING_ADDRESS:r(162),CHECKOUT_CONTACT_INFORMATION:r(163),CHECKOUT_EXPRESS_PAYMENT:r(164),CHECKOUT_FIELDS:r(165),CHECKOUT_ORDER_NOTE:r(166),CHECKOUT_PAYMENT:r(167),CHECKOUT_SHIPPING_ADDRESS:r(168),CHECKOUT_SHIPPING_METHODS:r(169),CHECKOUT_TERMS:r(170),CHECKOUT_TOTALS:r(171),CHECKOUT_ORDER_SUMMARY:r(172),CHECKOUT_ORDER_SUMMARY_SUBTOTAL:r(173),CHECKOUT_ORDER_SUMMARY_FEE:r(174),CHECKOUT_ORDER_SUMMARY_DISCOUNT:r(175),CHECKOUT_ORDER_SUMMARY_SHIPPING:r(176),CHECKOUT_ORDER_SUMMARY_COUPON_FORM:r(177),CHECKOUT_ORDER_SUMMARY_TAXES:r(178),CHECKOUT_ORDER_SUMMARY_CART_ITEMS:r(179)};r.p=p.k,Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_FIELDS,component:Object(n.lazy)(()=>r.e(33).then(r.bind(null,414)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_EXPRESS_PAYMENT,component:Object(n.lazy)(()=>r.e(32).then(r.bind(null,451)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_CONTACT_INFORMATION,component:Object(n.lazy)(()=>r.e(31).then(r.bind(null,430)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_SHIPPING_ADDRESS,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(2),r.e(6),r.e(44)]).then(r.bind(null,436)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_BILLING_ADDRESS,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(2),r.e(6),r.e(30)]).then(r.bind(null,437)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_SHIPPING_METHODS,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(45)]).then(r.bind(null,429)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_PAYMENT,component:Object(n.lazy)(()=>r.e(43).then(r.bind(null,425)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_NOTE,component:Object(n.lazy)(()=>r.e(34).then(r.bind(null,438)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_TERMS,component:Object(n.lazy)(()=>r.e(46).then(r.bind(null,452)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ACTIONS,component:Object(n.lazy)(()=>r.e(29).then(r.bind(null,428)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_TOTALS,component:Object(n.lazy)(()=>r.e(47).then(r.bind(null,415)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(35)]).then(r.bind(null,453)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_CART_ITEMS,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(36)]).then(r.bind(null,431)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_SUBTOTAL,component:Object(n.lazy)(()=>r.e(41).then(r.bind(null,454)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_FEE,component:Object(n.lazy)(()=>r.e(39).then(r.bind(null,455)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_DISCOUNT,component:Object(n.lazy)(()=>r.e(38).then(r.bind(null,456)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_COUPON_FORM,component:Object(n.lazy)(()=>r.e(37).then(r.bind(null,457)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_SHIPPING,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(5),r.e(40)]).then(r.bind(null,458)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_TAXES,component:Object(n.lazy)(()=>r.e(42).then(r.bind(null,439)))});var h=r(1),b=r(4),g=r.n(b),E=r(129),y=r(242),O=r(121),v=r(15),_=r(246),S=r(2),k=r(73),w=(r(224),r(14)),j=Object(n.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"})),C=r(103);r(225);var R=()=>Object(n.createElement)("div",{className:"wc-block-checkout-empty"},Object(n.createElement)(C.a,{className:"wc-block-checkout-empty__image",icon:j,size:100}),Object(n.createElement)("strong",{className:"wc-block-checkout-empty__title"},Object(h.__)("Your cart is empty!","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-empty__description"},Object(h.__)("Checkout is not available whilst your cart is empty—please take a look through our store and come back when you're ready to place an order.","woo-gutenberg-products-block")),p.i&&Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:p.i,className:"wp-block-button__link"},Object(h.__)("Browse store","woo-gutenberg-products-block")))),T=Object(n.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),A=r(17);r(226);const x=["woocommerce_rest_product_out_of_stock","woocommerce_rest_product_not_purchasable","woocommerce_rest_product_partially_out_of_stock","woocommerce_rest_product_too_many_in_cart","woocommerce_rest_cart_item_error"],P=Object(S.getSetting)("checkoutData",{}),N=e=>{let{errorData:t}=e,r=Object(h.__)("Checkout error","woo-gutenberg-products-block");return x.includes(t.code)&&(r=Object(h.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(n.createElement)("strong",{className:"wc-block-checkout-error_title"},r)},M=e=>{let{errorData:t}=e,r=t.message;return x.includes(t.code)&&(r=r+" "+Object(h.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-error__description"},r)},I=e=>{let{errorData:t}=e,r=Object(h.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return x.includes(t.code)&&(r=Object(h.__)("Edit your cart","woo-gutenberg-products-block"),o=p.c),Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:o,className:"wp-block-button__link"},r))};var D=()=>{const e={code:"",message:"",...P||{}},t={code:e.code||"unknown",message:Object(A.decodeEntities)(e.message)||Object(h.__)("There was a problem checking out. Please try again. If the problem persists, please get in touch with us so we can assist.","woo-gutenberg-products-block")};return Object(n.createElement)("div",{className:"wc-block-checkout-error"},Object(n.createElement)(C.a,{className:"wc-block-checkout-error__image",icon:T,size:100}),Object(n.createElement)(N,{errorData:t}),Object(n.createElement)(M,{errorData:t}),Object(n.createElement)(I,{errorData:t}))};const L=`${p.e}?redirect_to=${encodeURIComponent(window.location.href)}`,F=()=>{window.location.reload(!0)};var U=r(138),V=r(77),B=r(56);const H=()=>Object(n.createElement)(n.Fragment,null,Object(h.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:L},Object(h.__)("Click here to log in.","woo-gutenberg-products-block"))),z=e=>{let{attributes:t,children:r}=e;const{hasOrder:o,customerId:a}=Object(i.b)(),{cartItems:c,cartIsLoading:l}=Object(s.a)(),{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:m,showPhoneField:f,requirePhoneField:h}=t;return l||0!==c.length?o?((e=>!e&&!Object(S.getSetting)("checkoutAllowsGuest",!1))(a)&&u&&Object(S.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(H,null),Object(n.createElement)(U.a.Provider,{value:{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:m,showPhoneField:f,requirePhoneField:h}},r)):Object(n.createElement)(D,null):Object(n.createElement)(R,null)},G=e=>{let{scrollToTop:t}=e;const{hasError:r,isIdle:o}=Object(i.b)(),{hasValidationErrors:s,showAllValidationErrors:a}=Object(l.b)(),c=o&&r&&(s||Object(V.a)("wc/checkout","default"));return Object(n.useEffect)(()=>{let e;return c&&(a(),e=window.setTimeout(()=>{t({focusableSelector:"input:invalid, .has-error input"})},50)),()=>{clearTimeout(e)}},[c,t,a]),null};var Y=Object(k.a)(e=>{let{attributes:t,children:r,scrollToTop:o}=e;return Object(n.createElement)(v.a,{header:Object(h.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(n.createInterpolateElement)(Object(h.__)("The checkout has encountered an unexpected error. . If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:Object(n.createElement)("button",{className:"wc-block-link-button",onClick:F})}),showErrorMessage:S.CURRENT_USER_IS_ADMIN},Object(n.createElement)(y.a,{context:"wc/checkout"},Object(n.createElement)(B.a,null,Object(n.createElement)(O.a,{context:"wc/checkout"}),Object(n.createElement)(l.a,null,Object(n.createElement)(m.SlotFillProvider,null,Object(n.createElement)(E.a,null,Object(n.createElement)(_.a,{className:g()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(n.createElement)(z,{attributes:t},r),Object(n.createElement)(G,{scrollToTop:o}))))))))});const q={hasDarkControls:{type:"boolean",default:Object(S.getSetting)("hasDarkEditorStyleSupport",!1)},showRateAfterTaxName:{type:"boolean",default:Object(S.getSetting)("displayCartPricesIncludingTax",!1)}};var W=r(180);Object(d.a)({Block:Y,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:e=>({attributes:Object(o.a)({...W.attributes,...q},e instanceof HTMLElement?e.dataset:{})}),blockMap:Object(u.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:o,...a}=Object(s.a)(),u=(()=>{const{dispatchActions:e,extensionData:t}=Object(i.b)(),r=Object(n.useRef)(t);Object(n.useEffect)(()=>{c()(t,r.current)||(r.current=t)},[t]);const o=Object(n.useCallback)((t,n,o)=>{const s=r.current[t]||{};e.setExtensionData({...r.current,[t]:{...s,[n]:o}})},[e]);return{extensionData:r.current,setExtensionData:o}})(),d=(()=>{const{hasValidationErrors:e,getValidationError:t,clearValidationError:r,hideValidationError:o,setValidationErrors:s}=Object(l.b)(),a="extensions-errors";return{hasValidationErrors:e,getValidationError:Object(n.useCallback)(e=>t(`${a}-${e}`),[t]),clearValidationError:Object(n.useCallback)(e=>r(`${a}-${e}`),[r]),hideValidationError:Object(n.useCallback)(e=>o(`${a}-${e}`),[o]),setValidationErrors:Object(n.useCallback)(e=>s(Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[`${a}-${t}`,r]}))),[s])}})();return n.Children.map(t,e=>{if(Object(n.isValidElement)(e)){const t={extensions:r,cart:a,checkoutExtensionData:u,validation:d};return Object(n.cloneElement)(e,t)}return e})}})},,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return O}));var n=r(0),o=r(7),s=r(8),a=r(4),c=r.n(a),i=r(6),l=r(95),u=r(13),d=r(111),p=function({notices:e,className:t,children:r,onRemove:o=i.noop}){const a=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),m=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:a});t=c()("components-snackbar-list",t);const f=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,m.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(s.a)({},Object(i.omit)(e,["content"]),{onRemove:f(e)}),e.content)))))},m=r(10);const f={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:s}=e;if(s)return null;const a=r.filter(e=>"snackbar"===e.type),i=a.length>0?a.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):f,l=Object(m.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:i}),u=a.filter(e=>!0===l[e.content]),d=c()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(40),g=r(25);const E=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),y=()=>Object(n.useContext)(E),O=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:s,removeNotice:a}=Object(o.useDispatch)("core/notices"),[c,i]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[s,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;a(e,t)}),[a,r]),{notices:m}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),f={notices:m,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:i},y=c?null:Object(n.createElement)(h,{notices:f.notices,removeNotice:f.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(E.Provider,{value:f},t,y)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(13),s=r(4),a=r.n(s);const c=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(n.useContext)(c),l=e=>{let{children:t,className:r=""}=e;const[s,i]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let r="";return t>700?r="is-large":t>520?r="is-medium":t>400?r="is-small":t&&(r="is-mobile"),[e,r]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(n.createElement)(c.Provider,{value:l},Object(n.createElement)("div",{className:a()(r,i)},s,t))}},,,function(e,t,r){"use strict";var n=r(0),o=r(4),s=r.n(o),a=r(243);r(195),t.a=e=>{let{children:t,className:r}=e;return Object(n.createElement)(a.a,{className:s()("wc-block-components-sidebar-layout",r)},t)}}]);
\ No newline at end of file
diff --git a/build/checkout.asset.php b/build/checkout.asset.php
new file mode 100644
index 00000000000..521b1eba825
--- /dev/null
+++ b/build/checkout.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'e2b11e2bd0d876cab3ba189f886943be');
\ No newline at end of file
diff --git a/build/checkout.js b/build/checkout.js
new file mode 100644
index 00000000000..5ac64a0c8ca
--- /dev/null
+++ b/build/checkout.js
@@ -0,0 +1,46 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.checkout=function(e){function t(t){for(var o,s,a=t[0],l=t[1],i=t[2],d=0,p=[];d{let{selected:t=[],search:c="",queryArgs:r={}}=e;const a=(e=>{let{selected:t=[],search:c="",queryArgs:r={}}=e;const n=l.o.productCount>100,s={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},a=[Object(o.addQueryArgs)("/wc/store/v1/products",{...s,...r})];return n&&t.length&&a.push(Object(o.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:c,queryArgs:r});return Promise.all(a.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/v1/products/"+e}),d=()=>n()({path:"wc/store/v1/products/attributes"}),p=e=>n()({path:`wc/store/v1/products/attributes/${e}/terms`}),b=e=>{let{selected:t=[],search:c}=e;const r=(e=>{let{selected:t=[],search:c}=e;const r=Object(a.getSetting)("limitTags",!1),n=[Object(o.addQueryArgs)("wc/store/v1/products/tags",{per_page:r?100:0,orderby:r?"count":"name",order:r?"desc":"asc",search:c})];return r&&t.length&&n.push(Object(o.addQueryArgs)("wc/store/v1/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(r.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id"))},m=e=>n()({path:Object(o.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/v1/products/categories/"+e}),h=e=>n()({path:Object(o.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));var o=c(1),r=c(14);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},s=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(r.decodeEntities)(e.message):Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},,function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r);t.a=e=>{let t,{label:c,screenReaderLabel:r,wrapperElement:s,wrapperProps:a={}}=e;const l=null!=c,i=null!=r;return!l&&i?(t=s||"span",a={...a,className:n()(a.className,"screen-reader-text")},Object(o.createElement)(t,a,r)):(t=s||o.Fragment,l&&i&&c!==r?Object(o.createElement)(t,a,Object(o.createElement)("span",{"aria-hidden":"true"},c),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,a,c))}},,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return i})),c.d(t,"d",(function(){return d}));var o=c(57);let r,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(r||(r={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const s=(e,t)=>Object(o.a)(e)&&"type"in e&&e.type===t,a=e=>s(e,r.SUCCESS),l=e=>s(e,r.ERROR),i=e=>s(e,r.FAIL),u=e=>!Object(o.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:r,noticeContexts:n,shouldRetry:u,isSuccessResponse:a,isErrorResponse:l,isFailResponse:i})},,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(122),a=c(4),l=c.n(a);c(126);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:o,onValueChange:a,displayType:u="text",...d}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const b=p/10**o.minorUnit;if(!Number.isFinite(b))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...i(o),value:void 0,currency:void 0,onValueChange:void 0},h=a?e=>{const t=+e.value*10**o.minorUnit;a(t)}:()=>{};return Object(n.createElement)(s.a,r()({className:m,displayType:u},g,{value:b,onValueChange:h}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return _}));var o=c(7),r=c(0),n=c(17),s=c(9),a=c(14),l=c(219),i=c(50),u=c(218);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(s.dispatch)(n.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},b=()=>{Object(r.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},g={...m,email:""},h={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:n.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},O=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(a.decodeEntities)(c)]})),j={cartCoupons:n.EMPTY_CART_COUPONS,cartItems:n.EMPTY_CART_ITEMS,cartFees:n.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:h,cartIsLoading:!0,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:g,shippingAddress:m,shippingRates:n.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:n.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:n.EMPTY_EXTENSIONS},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(i.b)(),a=null==c?void 0:c.previewCart,{shouldSelect:u}=e,d=Object(r.useRef)();b();const p=Object(s.useSelect)((e,c)=>{let{dispatch:o}=c;if(!u)return j;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:g,shippingAddress:m,extensions:n.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const r=e(n.CART_STORE_KEY),s=r.getCartData(),i=r.getCartErrors(),d=r.getCartTotals(),p=!r.hasFinishedResolution("getCartData"),b=r.isCustomerDataUpdating(),{receiveCart:h}=o(n.CART_STORE_KEY),_=O(s.billingAddress),E=s.needsShipping?O(s.shippingAddress):_,k=s.fees.length>0?s.fees.map(e=>O(e)):n.EMPTY_CART_FEES;return{cartCoupons:s.coupons.length>0?s.coupons.map(e=>({...e,label:e.code})):n.EMPTY_CART_COUPONS,cartItems:s.items,cartFees:k,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors,cartTotals:d,cartIsLoading:p,cartErrors:i,billingAddress:Object(l.a)(_),shippingAddress:Object(l.a)(E),extensions:s.extensions,shippingRates:s.shippingRates,isLoadingRates:b,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements,receiveCart:h}},[u]);return d.current&&Object(o.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wc.wcBlocksRegistry},,,,,function(e,t){e.exports=window.wp.a11y},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(74),a=c(119);const l=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:c={},...o}=e;const i=Object(n.useRef)(null),u=()=>{i.current&&s.focus.focusable.find(i.current).forEach(e=>{l.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(a.a)(u,0,{leading:!0});return Object(n.useLayoutEffect)(()=>{let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(n.createElement)("div",r()({ref:i,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},o),t)}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(0),r=c(25),n=c.n(r);function s(e){const t=Object(o.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var o=c(0),r=c(9);const n=Object(o.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(o.useContext)(n),a=e=>{let{children:t,currentPostId:c=0,currentView:s="",previewData:a={}}=e;const l=Object(r.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),i=Object(o.useCallback)(e=>e in a?a[e]:{},[a]),u={isEditor:!0,currentPostId:l,currentView:s,previewData:a,getPreviewData:i};return Object(o.createElement)(n.Provider,{value:u},t)}},function(e,t){e.exports=window.wp.hooks},function(e,t,c){"use strict";c.d(t,"b",(function(){return x})),c.d(t,"a",(function(){return T}));var o=c(0),r=c(1),n=c(105),s=c(58),a=c.n(s),l=c(124),i=c(57),u=c(9);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),b=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},g=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var h=c(2),O=c(219);let j;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(j||(j={}));const _={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(h.getSetting)("checkoutData",{})||{}},E={redirectUrl:"",status:j.PRISTINE,hasError:!1,calculatingCount:0,orderId:_.order_id,orderNotes:"",customerId:_.customer_id,useShippingAsBilling:Object(O.b)(_.billing_address,_.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,{redirectUrl:t,type:c,customerId:o,orderId:r,orderNotes:n,extensionData:s,useShippingAsBilling:a,shouldCreateAccount:l,data:i}=arguments.length>1?arguments[1]:void 0,u=e;switch(c){case d.SET_PRISTINE:u=E;break;case d.SET_IDLE:u=e.status!==j.IDLE?{...e,status:j.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:i};break;case d.SET_COMPLETE:u=e.status!==j.COMPLETE?{...e,status:j.COMPLETE,redirectUrl:"string"==typeof(null==i?void 0:i.redirectUrl)?i.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==j.PROCESSING?{...e,status:j.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==j.BEFORE_PROCESSING?{...e,status:j.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==j.AFTER_PROCESSING?{...e,status:j.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===j.PROCESSING||e.status===j.BEFORE_PROCESSING?{...u,status:j.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==o?{...e,customerId:o}:e;break;case d.SET_ORDER_ID:u=void 0!==r?{...e,orderId:r}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==a&&a!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:a});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==l&&l!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:l});break;case d.SET_ORDER_NOTES:void 0!==n&&e.orderNotes!==n&&(u={...e,orderNotes:n});break;case d.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(u={...e,extensionData:s})}return u!==e&&c!==d.SET_PRISTINE&&u.status===j.PRISTINE&&(u.status=j.IDLE),u};var f=c(14),y=c(92),w=c(220);var v=c(221),S=c(114),C=c(64),N=c(34),P=c(112);const R=Object(o.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),x=()=>Object(o.useContext)(R),T=e=>{let{children:t,redirectUrl:c,isCart:s=!1}=e;E.redirectUrl=c;const[h,O]=Object(o.useReducer)(k,E),{setValidationErrors:_}=Object(S.b)(),{createErrorNotice:x}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:T}=Object(C.a)(),I=h.calculatingCount>0,{isSuccessResponse:A,isErrorResponse:M,isFailResponse:D,shouldRetry:B}=Object(N.d)(),{checkoutNotices:L,paymentNotices:F,expressPaymentNotices:U}=(()=>{const{noticeContexts:e}=Object(N.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[V,q]=Object(o.useReducer)(y.b,{}),G=Object(o.useRef)(V),{onCheckoutAfterProcessingWithSuccess:$,onCheckoutAfterProcessingWithError:H,onCheckoutValidationBeforeProcessing:Y}=(e=>Object(o.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(w.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(w.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(w.a)("checkout_validation_before_processing",e)}),[e]))(q);Object(o.useEffect)(()=>{G.current=V},[V]);const z=Object(o.useMemo)(()=>function(){return a()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),Y(...arguments)},[Y]),W=Object(o.useMemo)(()=>({resetCheckout:()=>{O({type:d.SET_PRISTINE})},setRedirectUrl:e=>{O(b(e))},setHasError:e=>{O(g(e))},incrementCalculating:()=>{O({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{O({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;O((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{O((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{O((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{O((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:c,value:o}=e;t.paymentDetails[c]=Object(f.decodeEntities)(o)})),"message"in e&&(t.message=Object(f.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var c;O(b((null==t?void 0:t.redirectUrl)||"")),O((c=t,{type:d.SET_PROCESSING_RESPONSE,data:c})),O({type:d.SET_AFTER_PROCESSING})}}),[]);Object(o.useEffect)(()=>{h.status===j.BEFORE_PROCESSING&&(Object(P.a)("error"),Object(v.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;x(t),_(c)}),O(p()),O(g())):O({type:d.SET_PROCESSING})}))},[h.status,_,x,O]);const J=Object(n.a)(h.status),K=Object(n.a)(h.hasError);Object(o.useEffect)(()=>{if((h.status!==J||h.hasError!==K)&&h.status===j.AFTER_PROCESSING){const e={redirectUrl:h.redirectUrl,orderId:h.orderId,customerId:h.customerId,orderNotes:h.orderNotes,processingResponse:h.processingResponse};h.hasError?Object(v.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const c=(e=>{let t=null;return e.forEach(e=>{if((M(e)||D(e))&&e.message&&Object(l.a)(e.message)){const c=e.messageContext&&Object(l.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,x(e.message,c)}}),t})(t);if(null!==c)B(c)?O(p()):O(m(c));else{if(!(L.some(e=>"error"===e.status)||U.some(e=>"error"===e.status)||F.some(e=>"error"===e.status))){var o;const t=(null===(o=e.processingResponse)||void 0===o?void 0:o.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(t,{id:"checkout"})}O(p())}}):Object(v.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,c=null;if(e.forEach(e=>{A(e)&&(t=e),(M(e)||D(e))&&(c=e)}),t&&!c)O(m(t));else if(Object(i.a)(c)){if(c.message&&Object(l.a)(c.message)){const e=c.messageContext&&Object(l.a)(c.messageContext)?{context:c.messageContext}:void 0;x(c.message,e)}B(c)?O(g(!0)):O(m(c))}else O(m())})}},[h.status,h.hasError,h.redirectUrl,h.orderId,h.customerId,h.orderNotes,h.processingResponse,J,K,W,x,M,D,A,B,L,U,F]);const X={onSubmit:Object(o.useCallback)(()=>{T("submit"),O({type:d.SET_BEFORE_PROCESSING})},[T]),isComplete:h.status===j.COMPLETE,isIdle:h.status===j.IDLE,isCalculating:I,isProcessing:h.status===j.PROCESSING,isBeforeProcessing:h.status===j.BEFORE_PROCESSING,isAfterProcessing:h.status===j.AFTER_PROCESSING,hasError:h.hasError,redirectUrl:h.redirectUrl,onCheckoutBeforeProcessing:z,onCheckoutValidationBeforeProcessing:Y,onCheckoutAfterProcessingWithSuccess:$,onCheckoutAfterProcessingWithError:H,dispatchActions:W,isCart:s,orderId:h.orderId,hasOrder:!!h.orderId,customerId:h.customerId,orderNotes:h.orderNotes,useShippingAsBilling:h.useShippingAsBilling,setUseShippingAsBilling:e=>{return O((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:h.shouldCreateAccount,setShouldCreateAccount:e=>{return O((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:h.extensionData};return Object(o.createElement)(R.Provider,{value:X},t)}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return r}));const o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function r(e,t){return o(e)&&t in e}},function(e,t){e.exports=window.wp.deprecated},function(e,t){e.exports=window.wp.autop},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(51),r=c(0),n=c(38);const s=()=>{const e=Object(n.a)(),t=Object(r.useRef)(e);return Object(r.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(r.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(131),a=c(4),l=c.n(a),i=c(89);c(146),t.a=e=>{let{className:t,showSpinner:c=!1,children:o,variant:a="contained",...u}=e;const d=l()("wc-block-components-button",t,a,{"wc-block-components-button--loading":c});return Object(n.createElement)(s.a,r()({className:d},u),c&&Object(n.createElement)(i.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},o))}},function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"d",(function(){return s})),c.d(t,"a",(function(){return a})),c.d(t,"b",(function(){return l}));var o=c(13),r=c(23);const n=(e,t)=>{if(r.n>2)return Object(o.registerBlockType)(e,t)},s=(e,t)=>{if(r.n>1)return Object(o.registerBlockType)(e,t)},a=()=>r.n>2,l=()=>r.n>1},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(4),s=c.n(n),a=(c(233),c(89));t.a=e=>{let{children:t,className:c,screenReaderLabel:n,showSpinner:l=!1,isLoading:i=!0}=e;return Object(o.createElement)("div",{className:s()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(o.createElement)(a.a,null),Object(o.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(o.createElement)("span",{className:"screen-reader-text"},n||Object(r.__)("Loading…","woo-gutenberg-products-block")))}},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var o=c(0),r=c(87);const n=Object(o.createContext)({isInitialized:!1,billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>{},setShippingAddress:()=>{}}),s=()=>Object(o.useContext)(n),a=e=>{let{children:t}=e;const c=Object(r.a)();return Object(o.createElement)(n.Provider,{value:c},t)}},,function(e,t){e.exports=window.wp.dom},,,function(e,t){e.exports=window.wp.keycodes},,,function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r);c(181),t.a=e=>{let{children:t,className:c}=e;return Object(o.createElement)("div",{className:n()("wc-block-components-product-badge",c)},t)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var o=c(17),r=c(9),n=c(0),s=c(25),a=c.n(s),l=c(57),i=c(106);const u=()=>{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:c,isLoadingRates:s}=Object(r.useSelect)(e=>{const t=e(o.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(i.a)(),p=Object(n.useRef)({});return Object(n.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:c,shipping_rates:o}=e;return[c,null===(t=o.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(l.a)(t)&&!a()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:c,isLoadingRates:s}}},,,,,function(e,t){e.exports=window.wp.wordcount},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(9),r=c(17);const n=()=>{const{customerData:e,isInitialized:t}=Object(o.useSelect)(e=>{const t=e(r.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:c,setBillingData:n}=Object(o.useDispatch)(r.CART_STORE_KEY);return{isInitialized:t,billingData:e.billingData,shippingAddress:e.shippingAddress,setBillingData:n,setShippingAddress:c}}},function(e,t,c){"use strict";var o=c(2),r=c(1),n=c(154),s=c(124);const a=Object(o.getSetting)("countryLocale",{}),l=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(r.sprintf)(
+/* translators: %s Field label. */
+Object(r.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(s.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},i=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,l(c)]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{})]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=c&&void 0!==i[c]?i[c]:{};return e.map(e=>({key:e,...o.defaultAddressFields[e]||{},...r[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var o=c(0);c(147),t.a=()=>Object(o.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(36),s=c(4),a=c.n(s),l=c(26);c(145);const i=e=>{let{currency:t,maxPrice:c,minPrice:s,priceClassName:i,priceStyle:u={}}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.sprintf)(
+/* translators: %1$s min price, %2$s max price */
+Object(r.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(s),Object(l.formatPrice)(c))),Object(o.createElement)("span",{"aria-hidden":!0},Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:s,style:u})," — ",Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:s,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("del",{className:a()("wc-block-components-product-price__regular",c),style:s},e),value:l}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("ins",{className:a()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:r,format:s="",maxPrice:l,minPrice:d,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}=e;const j=a()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});s.includes("")||(s="",console.error("Price formats need to include the `` tag."));const _=g&&p!==g;let E=Object(o.createElement)("span",{className:a()("wc-block-components-product-price__value",b)});return _?E=Object(o.createElement)(u,{currency:r,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}):void 0!==d&&void 0!==l?E=Object(o.createElement)(i,{currency:r,maxPrice:l,minPrice:d,priceClassName:b,priceStyle:m}):p&&(E=Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",b),currency:r,value:p,style:m})),Object(o.createElement)("span",{className:j},Object(o.createInterpolateElement)(s,{price:E}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));var o=c(7);let r;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(r||(r={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:r.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:r.REMOVE_EVENT_CALLBACK,eventType:e})},s={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,eventType:c,id:o,callback:n,priority:a}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case r.ADD_EVENT_CALLBACK:return l.set(o,{priority:a,callback:n}),{...e,[c]:l};case r.REMOVE_EVENT_CALLBACK:return l.delete(o),{...e,[c]:l}}}},,,,,function(e,t){e.exports=window.wp.warning},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return E})),c.d(t,"a",(function(){return k}));var o=c(0);const r={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},n={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},s={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:r,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},a=(e,t)=>{let{type:c}=t;return Object.values(r).includes(c)?c:e};var l=c(92),i=c(220);const u=e=>({onSuccess:Object(i.a)("shipping_rates_success",e),onFail:Object(i.a)("shipping_rates_fail",e),onSelectSuccess:Object(i.a)("shipping_rate_select_success",e),onSelectFail:Object(i.a)("shipping_rate_select_fail",e)});var d=c(221),p=c(52),b=c(38),m=c(106),g=c(81);const{NONE:h,INVALID_ADDRESS:O,UNKNOWN:j}=r,_=Object(o.createContext)(s),E=()=>Object(o.useContext)(_),k=e=>{let{children:t}=e;const{dispatchActions:c}=Object(p.b)(),{shippingRates:s,isLoadingRates:i,cartErrors:E}=Object(b.a)(),{isSelectingRate:k}=Object(m.a)(),{selectedRates:f}=Object(g.a)(),[y,w]=Object(o.useReducer)(a,h),[v,S]=Object(o.useReducer)(l.b,{}),C=Object(o.useRef)(v),N=Object(o.useMemo)(()=>({onShippingRateSuccess:u(S).onSuccess,onShippingRateFail:u(S).onFail,onShippingRateSelectSuccess:u(S).onSelectSuccess,onShippingRateSelectFail:u(S).onSelectFail}),[S]);Object(o.useEffect)(()=>{C.current=v},[v]),Object(o.useEffect)(()=>{i?c.incrementCalculating():c.decrementCalculating()},[i,c]),Object(o.useEffect)(()=>{k?c.incrementCalculating():c.decrementCalculating()},[k,c]),Object(o.useEffect)(()=>{E.length>0&&E.some(e=>!(!e.code||!Object.values(n).includes(e.code)))?w({type:O}):w({type:h})},[E]);const P=Object(o.useMemo)(()=>({isPristine:y===h,isValid:y===h,hasInvalidAddress:y===O,hasError:y===j||y===O}),[y]);Object(o.useEffect)(()=>{i||0!==s.length&&!P.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:P.hasInvalidAddress,hasError:P.hasError})},[s,i,P.hasError,P.hasInvalidAddress]),Object(o.useEffect)(()=>{!i&&s.length>0&&!P.hasError&&Object(d.a)(C.current,"shipping_rates_success",s)},[s,i,P.hasError]),Object(o.useEffect)(()=>{k||(P.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:P.hasError,hasInvalidAddress:P.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",f.current))},[f,k,P.hasError,P.hasInvalidAddress]);const R={shippingErrorStatus:P,dispatchErrorStatus:w,shippingErrorTypes:r,...N};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_.Provider,{value:R},t))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(8);function r(e,t){const c=Object(o.useRef)();return Object(o.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var o=c(9),r=c(0),n=c(17),s=c(120),a=c(64);const l=()=>{const e=Object(s.a)(),{dispatchCheckoutEvent:t}=Object(a.a)(),{selectShippingRate:c}=Object(o.useDispatch)(n.CART_STORE_KEY);return{selectShippingRate:Object(r.useCallback)((o,r)=>{c(o,r).then(()=>{t("set-selected-shipping-rate",{shippingRateId:o})}).catch(t=>{e(t)})},[c,t,e]),isSelectingRate:Object(o.useSelect)(e=>e(n.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(14),a=c(4),l=c.n(a);c(144),t.a=e=>{let{className:t="",disabled:c=!1,name:o,permalink:a="",target:i,rel:u,style:d,onClick:p,...b}=e;const m=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",r()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(o)}}))}return Object(n.createElement)("a",r()({className:m,href:a,target:i},b,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(o)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(9);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(o.select)("core/notices").getNotices(),{removeNotice:r}=Object(o.dispatch)("core/notices"),n=c.filter(t=>t.status===e);n.forEach(e=>r(e.id,t))}},function(e,t,c){"use strict";var o=c(0),r=c(86),n=c(59);const s=e=>{const t=e.indexOf("");return-1===t?e:e.substr(0,t+4)},a=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const o=a(e),r=o.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(r,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const r=a(e),s=r.slice(0,t);if(c)return Object(n.autop)(l(s,o));const i=s.match(/([\s]+)/g),u=i?i.length:0,d=r.slice(0,t+u);return Object(n.autop)(l(d,o))};t.a=e=>{let{source:t,maxLength:c=15,countType:a="words",className:l="",style:d={}}=e;const p=Object(o.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const o=Object(n.autop)(e),a=Object(r.count)(o,c);if(a<=t)return o;const l=s(o),d=Object(r.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,a),[t,c,a]);return Object(o.createElement)(o.RawHTML,{style:d,className:l},p)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var o=c(0),r=c(7),n=c(25),s=c.n(n);const a=Object(o.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(o.useContext)(a),i=e=>{let{children:t}=e;const[c,n]=Object(o.useState)({}),l=Object(o.useCallback)(e=>c[e],[c]),i=Object(o.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(o.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...o}=t;return o})},[]),d=Object(o.useCallback)(()=>{n({})},[]),p=Object(o.useCallback)(e=>{e&&n(t=>(e=Object(r.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&s()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),b=Object(o.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const o={...c[e],...t};return s()(c[e],o)?c:{...c,[e]:o}})},[]),m={getValidationError:l,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(o.useCallback)(e=>{b(e,{hidden:!0})},[b]),showValidationError:Object(o.useCallback)(e=>{b(e,{hidden:!1})},[b]),showAllValidationErrors:Object(o.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(o.createElement)(a.Provider,{value:m},t)}},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),s=c(128);t.a=e=>{let{checked:t,name:c,onChange:r,option:a}=e;const{value:l,label:i,description:u,secondaryLabel:d,secondaryDescription:p}=a;return Object(o.createElement)("label",{className:n()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(o.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>r(e.target.value),checked:t,"aria-describedby":n()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:d,[`${c}-${l}__description`]:u,[`${c}-${l}__secondary-description`]:p})}),Object(o.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:d,description:u,secondaryDescription:p}))}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(0);const r=()=>{const[,e]=Object(o.useState)();return Object(o.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,c){"use strict";var o=c(24),r=c.n(o),n=c(0),s=c(8),a=c(1),l=c(23),i=e=>{let{imageUrl:t=l.m+"/block-error.svg",header:c=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:o=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:r,errorMessagePrefix:s=Object(a.__)("Error:","woo-gutenberg-products-block"),button:i,showErrorBlock:u=!0}=e;return u?Object(n.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(n.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(n.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(n.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),o&&Object(n.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},o),r&&Object(n.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",r),i&&Object(n.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i))):null};c(187);class u extends s.Component{constructor(){super(...arguments),r()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,showErrorBlock:o=!0,text:r,errorMessagePrefix:s,renderError:a,button:l}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof a?a({errorMessage:u}):Object(n.createElement)(i,{showErrorBlock:o,errorMessage:c?u:null,header:e,imageUrl:t,text:r,errorMessagePrefix:s,button:l}):this.props.children}}t.a=u},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"string"==typeof e},,function(e,t){},,function(e,t,c){"use strict";var o=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:r,secondaryDescription:n,id:s}=e;return Object(o.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(o.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(o.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(o.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(o.createElement)("div",{className:"wc-block-components-radio-control__description-group"},r&&Object(o.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},r),n&&Object(o.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},n)))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s);c(244),t.a=e=>{let{children:t,className:c,headingLevel:o,...s}=e;const l=a()("wc-block-components-title",c),i="h"+o;return Object(n.createElement)(i,r()({className:l},s),t)}},,,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return s}));var o=c(0);const r=Object(o.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),n=()=>Object(o.useContext)(r),s=e=>{let{children:t}=e;const[c,n]=Object(o.useState)(!1),s={setIsSuppressed:n,isSuppressed:c};return Object(o.createElement)(r.Provider,{value:s},t)}},,,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:o=""}=e;return c?Object(n.createElement)("img",{className:l(t),src:c,alt:o}):null},u=c(23);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(124);c(184),t.a=e=>{let{icons:t=[],align:c="center",className:o}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},o);return Object(n.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(n.createElement)(i,r()({key:"payment-method-icon-"+e.id},t))}))}},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"number"==typeof e},function(e,t,c){"use strict";var o=c(24),r=c.n(o),n=c(0),s=c(1),a=c(8),l=c(2),i=c(214),u=c(34);class d extends a.Component{constructor(){super(...arguments),r()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const o=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(n.createElement)(i.a,{additionalNotices:o,context:u.c.PAYMENTS})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),s=c(10),a=c(115);c(242);const l=e=>{let{className:t="",id:c,selected:r,onChange:i=(()=>{}),options:u=[]}=e;const d=Object(s.useInstanceId)(l),p=c||d;return u.length?Object(o.createElement)("div",{className:n()("wc-block-components-radio-control",t)},u.map(e=>Object(o.createElement)(a.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===r,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return B})),c.d(t,"a",(function(){return L}));var o=c(0),r=c(57),n=c(9);let s,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(s||(s={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const l={currentStatus:s.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},i={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:s,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,{type:t,paymentMethodData:c,shouldSavePaymentMethod:o=!1,errorMessage:r="",paymentMethods:n={},paymentMethod:i=""}=arguments.length>1?arguments[1]:void 0;switch(t){case s.PRISTINE:return{...l,...e,errorMessage:"",currentStatus:s.PRISTINE};case s.STARTED:return{...e,currentStatus:s.STARTED};case s.ERROR:return e.currentStatus!==s.ERROR?{...e,currentStatus:s.ERROR,errorMessage:r||e.errorMessage}:e;case s.FAILED:return e.currentStatus!==s.FAILED?{...e,currentStatus:s.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:r||e.errorMessage}:e;case s.SUCCESS:return e.currentStatus!==s.SUCCESS?{...e,currentStatus:s.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case s.PROCESSING:return e.currentStatus!==s.PROCESSING?{...e,currentStatus:s.PROCESSING,errorMessage:""}:e;case s.COMPLETE:return e.currentStatus!==s.COMPLETE?{...e,currentStatus:s.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:n};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:n};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:o};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:i,paymentMethodData:c||e.paymentMethodData}}},d=c(1),p=c(39),b=c(48),m=c(2),g=c(119),h=c(50),O=c(72),j=c(38),_=c(34),E=c(81);const k=(e,t,c,r)=>{const[s,a]=Object(o.useState)(!1),{isEditor:l}=Object(h.b)(),{selectedRates:i}=Object(E.a)(),{billingData:u,shippingAddress:p}=Object(O.b)(),_=Object(b.a)(i),k=Object(b.a)(c),f=Object(j.a)(),{cartTotals:y,cartIsLoading:w,cartNeedsShipping:v,paymentRequirements:S}=f,C=Object(o.useRef)({cart:f,cartTotals:y,cartNeedsShipping:v,billingData:u,shippingAddress:p,selectedShippingMethods:_,paymentRequirements:S}),{createErrorNotice:N}=Object(n.useDispatch)("core/notices");Object(o.useEffect)(()=>{C.current={cart:f,cartTotals:y,cartNeedsShipping:v,billingData:u,shippingAddress:p,selectedShippingMethods:_,paymentRequirements:S}},[f,y,v,u,p,_,S]);const P=Object(o.useCallback)(async()=>{let c={};const o=e=>{c={...c,[e.name]:e}};for(let e=0;e{w||R()},[R,f,_,u,w]),s},f=e=>({type:e}),y=e=>({type:s.ERROR,errorMessage:e}),w=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:s.FAILED,errorMessage:t,paymentMethodData:c}},v=e=>{let{paymentMethodData:t}=e;return{type:s.SUCCESS,paymentMethodData:t}},S=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),P=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var R=c(87),x=c(52),T=c(92),I=c(220);var A=c(221),M=c(114);const D=Object(o.createContext)(i),B=()=>Object(o.useContext)(D),L=e=>{let{children:t}=e;const{isProcessing:c,isIdle:a,isCalculating:i,hasError:d}=Object(x.b)(),{isEditor:b,getPreviewData:g}=Object(h.b)(),{setValidationErrors:O}=Object(M.b)(),{createErrorNotice:j,removeNotice:E}=Object(n.useDispatch)("core/notices"),{isSuccessResponse:B,isErrorResponse:L,isFailResponse:F,noticeContexts:U}=Object(_.d)(),[V,q]=Object(o.useReducer)(T.b,{}),{onPaymentProcessing:G}=(e=>Object(o.useMemo)(()=>({onPaymentProcessing:Object(I.a)("payment_processing",e)}),[e]))(q),$=Object(o.useRef)(V);Object(o.useEffect)(()=>{$.current=V},[V]);const[H,Y]=Object(o.useReducer)(u,l),{dispatchActions:z,setPaymentStatus:W}=(e=>{const{setBillingData:t,setShippingAddress:c}=Object(R.a)();return{dispatchActions:Object(o.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P(t,c))}}),[e]),setPaymentStatus:Object(o.useCallback)(()=>({pristine:()=>e(f(s.PRISTINE)),started:()=>e(f(s.STARTED)),processing:()=>e(f(s.PROCESSING)),completed:()=>e(f(s.COMPLETE)),error:t=>e(y(t)),failed:function(c,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r&&t(r),e(w({errorMessage:c||"",paymentMethodData:o||{}}))},success:function(o){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r&&t(r),void 0!==typeof n&&null!=n&&n.address&&c(n.address),e(v({paymentMethodData:o}))}}),[e,t,c])}})(Y),J=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:c}=Object(_.d)(),o=new Set([...Object(m.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return k(e,t,Array.from(o),c.PAYMENTS)})(z.setRegisteredPaymentMethods),K=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.d)();return k(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(z.setRegisteredExpressPaymentMethods),X=Object(o.useMemo)(()=>b?g("previewSavedPaymentMethods"):J?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(m.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),o={};return c.forEach(c=>{const r=t[c].filter(t=>{var c;let{method:{gateway:o}}=t;return o in e&&(null===(c=e[o].supports)||void 0===c?void 0:c.showSavedCards)});r.length&&(o[c]=r)}),o}(H.paymentMethods):{},[b,g,J,H.paymentMethods]),Q=Object(o.useCallback)(e=>{e?j(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):E("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[j,U.EXPRESS_PAYMENTS,E]),Z=Object.keys(H.expressPaymentMethods).includes(H.activePaymentMethod),ee=Object(o.useMemo)(()=>({isPristine:H.currentStatus===s.PRISTINE,isStarted:H.currentStatus===s.STARTED,isProcessing:H.currentStatus===s.PROCESSING,isFinished:[s.ERROR,s.FAILED,s.SUCCESS].includes(H.currentStatus),hasError:H.currentStatus===s.ERROR,hasFailed:H.currentStatus===s.FAILED,isSuccessful:H.currentStatus===s.SUCCESS,isDoingExpressPayment:H.currentStatus!==s.PRISTINE&&Z}),[H.currentStatus,Z]);Object(o.useEffect)(()=>{const e=Object.keys(H.paymentMethods);if(!J||!e.length)return;const t=[...e,...Object.keys(H.expressPaymentMethods)];if(H.activePaymentMethod&&t.includes(H.activePaymentMethod))return;W().pristine();const c=Object.keys(X).flatMap(e=>X[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,o=`wc-${t}-payment-token`;z.setActivePaymentMethod(t,{token:e,payment_method:t,[o]:e,isSavedToken:!0})}else z.setActivePaymentMethod(Object.keys(H.paymentMethods)[0])},[J,H.paymentMethods,H.expressPaymentMethods,z,W,H.activePaymentMethod,X]),Object(o.useEffect)(()=>{!c||d||i||ee.isFinished||W().processing()},[c,d,i,ee.isFinished,W]),Object(o.useEffect)(()=>{a&&!ee.isSuccessful&&W().pristine()},[a,ee.isSuccessful,W]),Object(o.useEffect)(()=>{d&&ee.isSuccessful&&W().pristine()},[d,ee.isSuccessful,W]),Object(o.useEffect)(()=>{ee.isProcessing&&(E("wc-payment-error",U.PAYMENTS),Object(A.b)($.current,"payment_processing",{}).then(e=>{let t,c;var o,r,n,s,a,l;if(e.forEach(e=>{B(e)&&(t=e),(L(e)||F(e))&&(c=e)}),t&&!c)W().success(null===(o=t)||void 0===o||null===(r=o.meta)||void 0===r?void 0:r.paymentMethodData,null===(n=t)||void 0===n||null===(s=n.meta)||void 0===s?void 0:s.billingData,null===(a=t)||void 0===a||null===(l=a.meta)||void 0===l?void 0:l.shippingData);else if(c&&F(c)){var i,u,d,p,b,m;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),W().failed(null===(i=c)||void 0===i?void 0:i.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var g,h;c.message&&c.message.length&&j(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=c)||void 0===h?void 0:h.messageContext)||U.PAYMENTS}),W().error(c.message),O(null===(g=c)||void 0===g?void 0:g.validationErrors)}else W().success()}))},[ee.isProcessing,O,W,E,U.PAYMENTS,B,F,L,j]);const te="object"==typeof H.paymentMethodData&&Object(r.b)(H.paymentMethodData,"token")?H.paymentMethodData.token+"":"",ce={setPaymentStatus:W,currentStatus:ee,paymentStatuses:s,paymentMethodData:H.paymentMethodData,errorMessage:H.errorMessage,activePaymentMethod:H.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:z.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:X,paymentMethods:H.paymentMethods,expressPaymentMethods:H.expressPaymentMethods,paymentMethodsInitialized:J,expressPaymentMethodsInitialized:K,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:H.shouldSavePaymentMethod,setShouldSavePayment:z.setShouldSavePayment};return Object(o.createElement)(D.Provider,{value:ce},t)}},,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var o=c(48),r=c(159);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:n,expressPaymentMethodsInitialized:s}=Object(r.b)(),a=Object(o.a)(t),l=Object(o.a)(c);return{paymentMethods:e?l:a,isInitialized:e?s:n}},s=()=>n(!1),a=()=>n(!0)},,,,function(e,t){},,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(253),s=c(165),a=c(50),l=c(159),i=c(58),u=c.n(i),d=c(155);t.a=()=>{const{isEditor:e}=Object(a.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:i,paymentMethodData:p,setPaymentStatus:b}=Object(l.b)(),m=Object(n.a)(),{paymentMethods:g}=Object(s.a)(),h=Object(o.useRef)(i),O=Object(o.useRef)(p),j=Object(o.useCallback)(e=>()=>{h.current=i,O.current=p,b().started(),t(e)},[i,p,t,b]),_=Object(o.useCallback)(()=>{b().pristine(),t(h.current,O.current)},[t,b]),E=Object(o.useCallback)(e=>{b().error(e),c(e),t(h.current,O.current)},[t,b,c]),k=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?E(e):c("")}),[c,E]),f=Object.entries(g),y=f.length>0?f.map(t=>{let[c,r]=t;const n=e?r.edit:r.content;return Object(o.isValidElement)(n)?Object(o.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(o.cloneElement)(n,{...m,onClick:j(c),onClose:_,onError:E,setExpressPaymentError:k})):null}):Object(o.createElement)("li",{key:"noneRegistered"},Object(r.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(o.createElement)(d.a,{isEditor:e},Object(o.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},y))}},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(3),s=c(9),a=c(27);t.a=e=>{let{setPageId:t,pageId:c,labels:l}=e;const i=Object(s.useSelect)(e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100}),[])||null;return i?Object(o.createElement)(n.PanelBody,{title:l.title},Object(o.createElement)(n.SelectControl,{label:Object(r.__)("Link to","woo-gutenberg-products-block"),value:c,options:[{label:l.default,value:0},...i.map(e=>({label:Object(a.a)(e,i),value:parseInt(e.id,10)}))],onChange:e=>t(parseInt(e,10))})):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var o=c(0),r=c(1),n=c(109),s=c(331),a=c(217);c(245);const l=e=>{let{text:t,url:c="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"}=e;return Object(o.createElement)("div",{className:"wc-block-feedback-prompt"},Object(o.createElement)(n.a,{icon:s.a}),Object(o.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(r.__)("Feedback?","woo-gutenberg-products-block")),Object(o.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(o.createElement)("a",{href:c,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(r.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(o.createElement)(n.a,{icon:a.a,size:16})))},i=()=>Object(o.createElement)(l,{text:Object(r.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})},function(e,t){e.exports=window.wp.plugins},,function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var o=c(1),r=c(9),n=c(17),s=c(14),a=c(38),l=c(0);c(534),c(4),c(19),c(64),c(50);const i=Object(l.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),u=()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:o}=Object(l.useContext)(i),r=Object(l.useRef)(e);Object(l.useEffect)(()=>{r.current=e},[e]);const n=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;r.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),s=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...n,...s,setIsSuppressed:o}};var d=c(114);const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(a.a)(),{createErrorNotice:l}=Object(r.useDispatch)("core/notices"),{addSnackbarNotice:i}=u(),{setValidationErrors:p}=Object(d.b)(),b=Object(r.useSelect)((t,c)=>{let{dispatch:r}=c;const a=t(n.CART_STORE_KEY),u=a.isApplyingCoupon(),d=a.isRemovingCoupon(),{applyCoupon:b,removeCoupon:m,receiveApplyingCoupon:g}=r(n.CART_STORE_KEY);return{applyCoupon:e=>{b(e).then(t=>{!0===t&&i(Object(o.sprintf)(
+/* translators: %s coupon code. */
+Object(o.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{p({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),g("")})},removeCoupon:t=>{m(t).then(e=>{!0===e&&i(Object(o.sprintf)(
+/* translators: %s coupon code. */
+Object(o.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form"})}).catch(t=>{l(t.message,{id:"coupon-form",context:e}),g("")})},isApplyingCoupon:u,isRemovingCoupon:d}},[l,i]);return{appliedCoupons:t,isLoading:c,...b}}},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(44),s=c(69),a=c(19),l=c(433),i=c(38),u=c(50),d=c(4),p=c.n(d),b=c(14),m=c(30),g=c(106),h=c(156),O=c(128),j=c(26),_=c(36),E=c(2);const k=e=>{const t=Object(E.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(o.createElement)(o.Fragment,null,Number.isFinite(t)&&Object(o.createElement)(_.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var f=e=>{let{className:t="",noResultsMessage:c,onSelectRate:r,rates:n,renderOption:s=k,selectedRate:a}=e;const l=(null==a?void 0:a.rate_id)||"",[i,u]=Object(o.useState)(l);if(Object(o.useEffect)(()=>{l&&u(l)},[l]),0===n.length)return c;if(n.length>1)return Object(o.createElement)(h.a,{className:t,onChange:e=>{u(e),r(e)},selected:i,options:n.map(s)});const{label:d,secondaryLabel:p,description:b,secondaryDescription:m}=s(n[0]);return Object(o.createElement)(O.a,{label:d,secondaryLabel:p,description:b,secondaryDescription:m})};c(241);var y=e=>{let{packageId:t,className:c="",noResultsMessage:n,renderOption:s,packageData:l,collapsible:i=!1,collapse:u=!1,showItems:d=!1}=e;const{selectShippingRate:h}=Object(g.a)(),O=Object(o.createElement)(o.Fragment,null,(d||i)&&Object(o.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),d&&Object(o.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(b.decodeEntities)(e.name),c=e.quantity;return Object(o.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(o.createElement)(m.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(r.sprintf)(
+/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
+Object(r._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),j=Object(o.createElement)(f,{className:c,noResultsMessage:n,rates:l.shipping_rates,onSelectRate:e=>h(e,t),selectedRate:l.shipping_rates.find(e=>e.selected),renderOption:s});return i?Object(o.createElement)(a.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!u,title:O},j):Object(o.createElement)("div",{className:p()("wc-block-components-shipping-rates-control__package",c)},O,j)};const w=e=>{let{packages:t,collapse:c,showItems:r,collapsible:n,noResultsMessage:s,renderOption:a}=e;return t.length?Object(o.createElement)(o.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(o.createElement)(y,{key:t,packageId:t,packageData:l,collapsible:n,collapse:c,showItems:r,noResultsMessage:s,renderOption:a})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:c,className:d,collapsible:p=!1,noResultsMessage:b,renderOption:m,context:g}=e;Object(o.useEffect)(()=>{if(c)return;const e=Object(l.a)(t),o=Object(l.b)(t);1===e?Object(n.speak)(Object(r.sprintf)(
+/* translators: %d number of shipping options found. */
+Object(r._n)("%d shipping option was found.","%d shipping options were found.",o,"woo-gutenberg-products-block"),o)):Object(n.speak)(Object(r.sprintf)(
+/* translators: %d number of shipping packages packages. */
+Object(r._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(r.sprintf)(
+/* translators: %d number of shipping options available. */
+Object(r._n)("%d shipping option was found","%d shipping options were found",o,"woo-gutenberg-products-block"),o))},[c,t]);const{extensions:h,receiveCart:O,...j}=Object(i.a)(),_={className:d,collapsible:p,noResultsMessage:b,renderOption:m,extensions:h,cart:j,components:{ShippingRatesControlPackage:y},context:g},{isEditor:E}=Object(u.b)();return Object(o.createElement)(s.a,{isLoading:c,screenReaderLabel:Object(r.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(o.createElement)(w,{packages:t,noResultsMessage:b,renderOption:m}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.ExperimentalOrderShippingPackages.Slot,_),Object(o.createElement)(a.ExperimentalOrderShippingPackages,null,Object(o.createElement)(w,{packages:t,noResultsMessage:b,renderOption:m}))))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s),l=c(1),i=c(109),u=c(531);c(153);var d=e=>{let{text:t,screenReaderText:c="",element:o="li",className:s="",radius:l="small",children:i=null,...u}=e;const d=o,p=a()(s,"wc-block-components-chip","wc-block-components-chip--radius-"+l),b=Boolean(c&&c!==t);return Object(n.createElement)(d,r()({className:p},u),Object(n.createElement)("span",{"aria-hidden":b,className:"wc-block-components-chip__text"},t),b&&Object(n.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:o=!1,onRemove:s=(()=>{}),removeOnAnyClick:p=!1,text:b,screenReaderText:m="",...g}=e;const h=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:b;t="string"!=typeof e?
+/* translators: Remove chip. */
+Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(
+/* translators: %s text of the chip to remove. */
+Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:o,onClick:s,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||s()}},j=p?O:{},_=p?{"aria-hidden":!0}:O;return Object(n.createElement)(d,r()({},g,j,{className:a()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(n.createElement)(h,r()({className:"wc-block-components-chip__remove"},_),Object(n.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},,,,,,function(e,t,c){"use strict";var o=c(0),r=c(11);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=n},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(0),r=c(114);c(169);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:s,getValidationErrorId:a}=Object(r.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(o.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(o.createElement)("p",{id:a(n)},t))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(14),a=c(2);c(180),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const o=t.thumbnail?{src:t.thumbnail,alt:Object(s.decodeEntities)(t.alt)||c||"Product Image"}:{src:a.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",r()({className:"wc-block-components-product-image"},o,{alt:o.alt}))}},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(80);t.a=()=>Object(o.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(80);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(o.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(
+/* translators: %d stock amount (number of items in stock for product) */
+Object(r.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";var o=c(0),r=c(7),n=c(14);c(183);var s=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(o.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(r.kebabCase)(t):"";return Object(o.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(o.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},a=c(113),l=c(23),i=e=>{let{className:t,shortDescription:c="",fullDescription:r=""}=e;const n=c||r;return n?Object(o.createElement)(a.a,{className:t,source:n,maxLength:15,countType:l.o.wordCountType||"words"}):null};c(182),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:r=[],variation:n=[]}=e;return Object(o.createElement)("div",{className:"wc-block-components-product-metadata"},Object(o.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(o.createElement)(s,{details:r}),Object(o.createElement)(s,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s),l=c(256),i=c(9),u=(c(178),c(139));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:c="default",additionalNotices:o=[]}=e;const{isSuppressed:s}=Object(u.b)(),{notices:p}=Object(i.useSelect)(e=>({notices:e("core/notices").getNotices(c)})),{removeNotice:b}=Object(i.useDispatch)("core/notices"),m=p.filter(e=>"snackbar"!==e.type).concat(o);if(!m.length)return null;const g=a()(t,"wc-block-components-notices");return s?null:Object(n.createElement)("div",{className:g},m.map(e=>Object(n.createElement)(l.a,r()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&b(e.id,c)}}),e.content)))}},,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"showCompanyField":{"type":"boolean","default":false},"requireCompanyField":{"type":"boolean","default":false},"allowCreateAccount":{"type":"boolean","default":false},"showApartmentField":{"type":"boolean","default":true},"showPhoneField":{"type":"boolean","default":true},"requirePhoneField":{"type":"boolean","default":false}},"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,function(e,t,c){"use strict";c.d(t,"c",(function(){return s})),c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return l}));const o=window.CustomEvent||null,r=(e,t)=>{let{bubbles:c=!1,cancelable:r=!1,element:n,detail:s={}}=t;if(!o)return;n||(n=document.body);const a=new o(e,{bubbles:c,cancelable:r,detail:s});n.dispatchEvent(a)};let n;const s=()=>{n&&clearTimeout(n),n=setTimeout(()=>{r("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=e=>{let{preserveCartData:t=!1}=e;r("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{r(t,{bubbles:c,cancelable:o})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return s}));var o=c(88),r=(c(18),c(2));const n=(e,t)=>Object.keys(r.defaultAddressFields).every(c=>e[c]===t[c]),s=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(o.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:o=!1}=t;o&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(92);const r=(e,t)=>function(c){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=o.a.addEventCallback(e,c,r);return t(n),()=>{t(o.a.removeEventCallback(e,n.id))}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));const o=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var r=c(34);const n=async(e,t,c)=>{const r=o(e,t),n=[];for(const e of r)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},s=async(e,t,c)=>{const n=[],s=o(e,t);for(const e of s)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(r.a)(t)||Object(r.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var o=c(0),r=c(194),n=c(2),s=c(123),a=c(159),l=c(101),i=c(72),u=c(52),d=c(1),p=c(15),b=c.n(p),m=c(219),g=c(28),h=c(9);const O=(e,t,c)=>{const o=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),r=`wc-${c}-new-payment-method`;return o.push({key:r,value:t}),o},j=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var _=c(114),E=c(38),k=c(139),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:r,isProcessing:n,isBeforeProcessing:s,isComplete:p,orderNotes:f,shouldCreateAccount:y,extensionData:w}=Object(u.b)(),{hasValidationErrors:v}=Object(_.b)(),{shippingErrorStatus:S}=Object(l.b)(),{billingData:C,shippingAddress:N}=Object(i.b)(),{cartNeedsPayment:P,cartNeedsShipping:R,receiveCart:x}=Object(E.a)(),{activePaymentMethod:T,isExpressPaymentMethodActive:I,currentStatus:A,paymentMethodData:M,expressPaymentMethods:D,paymentMethods:B,shouldSavePayment:L}=Object(a.b)(),{setIsSuppressed:F}=Object(k.b)(),{createErrorNotice:U,removeNotice:V}=Object(h.useDispatch)("core/notices"),q=Object(o.useRef)(C),G=Object(o.useRef)(N),$=Object(o.useRef)(r),[H,Y]=Object(o.useState)(!1),z=Object(o.useMemo)(()=>{var e;const t={...D,...B};return null==t||null===(e=t[T])||void 0===e?void 0:e.paymentMethodId},[T,D,B]),W=v&&!I||A.hasError||S.hasError,J=!e&&!W&&(A.isSuccessful||!P)&&n;Object(o.useEffect)(()=>{F(I)},[I,F]),Object(o.useEffect)(()=>{W===e||!n&&!s||I||c.setHasError(W)},[W,e,n,s,I,c]),Object(o.useEffect)(()=>{q.current=C,G.current=N,$.current=r},[C,N,r]);const K=Object(o.useCallback)(()=>!v&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!S.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[v,A.hasError,S.hasError]);Object(o.useEffect)(()=>{let e;return I||(e=t(K,0)),()=>{I||e()}},[t,K,I]),Object(o.useEffect)(()=>{$.current&&(window.location.href=$.current)},[p]);const X=Object(o.useCallback)(async()=>{if(H)return;Y(!0),V("checkout");const e=P?{payment_method:z,payment_data:O(M,L,T)}:{},t={billing_address:Object(m.a)(q.current),customer_note:f,create_account:y,...e,extensions:{...w}};R&&(t.shipping_address=Object(m.a)(G.current)),b()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(j(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),Y(!1)}).catch(e=>{try{null!=e&&e.headers&&j(e.headers,c),e.json().then(e=>{var t,o,r;null!==(t=e.data)&&void 0!==t&&t.cart&&x(e.data.cart),U(Object(g.b)(e),{id:"checkout"}),null==e||null===(o=e.additional_errors)||void 0===o||null===(r=o.forEach)||void 0===r||r.call(o,e=>{U(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;U(Object(d.sprintf)(// Translators: %s Error text.
+Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),Y(!1)})},[H,V,P,z,M,L,T,f,y,w,R,c,U,x]);return Object(o.useEffect)(()=>{J&&!H&&X()},[X,J,H]),null};const y=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(o.createElement)(u.a,{redirectUrl:d,isCart:c},Object(o.createElement)(i.a,null,Object(o.createElement)(l.a,null,Object(o.createElement)(a.a,null,t,Object(o.createElement)(s.a,{renderError:n.CURRENT_USER_IS_ADMIN?null:()=>null},Object(o.createElement)(r.PluginArea,{scope:"woocommerce-checkout"})),Object(o.createElement)(f,null)))))}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return I}));var o=c(1),r=c(26),n=c(0),s=c(4),a=c.n(s),l=c(11),i=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(n.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),u=c(535),d=c(522),p=c(533),b=c(109),m=c(124),g=c(57);c(234);const h={bank:u.a,bill:d.a,card:p.a,checkPayment:i};var O=e=>{let{icon:t="",text:c=""}=e;const o=!!t,r=Object(n.useCallback)(e=>o&&Object(m.a)(e)&&Object(g.b)(h,e),[o]),s=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return Object(n.createElement)("span",{className:s},r(t)?Object(n.createElement)(b.a,{icon:h[t]}):t,c)},j=c(142),_=c(2),E=c(58),k=c.n(E),f=c(69),y=c(205),w=c(38),v=c(196),S=c(34),C=c(52),N=c(159),P=c(101),R=c(72);const x=(e,t)=>{const c=[],r=(t,c)=>{const o=c+"_tax",r=Object(g.b)(e,c)&&Object(m.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:r,valueWithTax:r+(Object(g.b)(e,o)&&Object(m.a)(e[o])?parseInt(e[o],10):0)}};return c.push(r(Object(o.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(r(Object(o.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(r(Object(o.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(o.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(r(Object(o.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c};var T=c(81);const I=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(C.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:h,shouldSavePayment:E}=Object(N.b)(),{shippingErrorStatus:I,shippingErrorTypes:A,onShippingRateSuccess:M,onShippingRateFail:D,onShippingRateSelectSuccess:B,onShippingRateSelectFail:L}=Object(P.b)(),{shippingRates:F,isLoadingRates:U,selectedRates:V,isSelectingRate:q,selectShippingRate:G,needsShipping:$}=Object(T.a)(),{billingData:H,shippingAddress:Y,setShippingAddress:z}=Object(R.b)(),{cartItems:W,cartFees:J,cartTotals:K,extensions:X}=Object(w.a)(),{appliedCoupons:Q}=Object(v.a)(),{noticeContexts:Z,responseTypes:ee}=Object(S.d)(),te=Object(n.useRef)(x(K,$)),ce=Object(n.useRef)({label:Object(o.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)});Object(n.useEffect)(()=>{te.current=x(K,$),ce.current={label:Object(o.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)}},[K,$]);const oe=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";k()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),h(e)}),[h]);return{activePaymentMethod:m,billing:{appliedCoupons:Q,billingData:H,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(r.getCurrencyFromPriceResponse)(K),customerId:p,displayPricesIncludingTax:Object(_.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:W,cartFees:J,extensions:X},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:f.a,PaymentMethodIcons:j.a,PaymentMethodLabel:O,ValidationInputError:y.a},emitResponse:{noticeContexts:Z,responseTypes:ee},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:g,onShippingRateFail:D,onShippingRateSelectFail:L,onShippingRateSelectSuccess:B,onShippingRateSuccess:M},onSubmit:d,paymentStatus:b,setExpressPaymentError:oe,shippingData:{isSelectingRate:q,needsShipping:$,selectedRates:V,setSelectedRates:G,setShippingAddress:z,shippingAddress:Y,shippingRates:F,shippingRatesLoading:U},shippingStatus:{shippingErrorStatus:I,shippingErrorTypes:A},shouldSavePayment:E}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var o=c(0),r=c(10),n=c(4),s=c.n(n);const a=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(o.useContext)(a),i=e=>{let{children:t,className:c=""}=e;const[n,l]=(()=>{const[e,{width:t}]=Object(r.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),i={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(o.createElement)(a.Provider,{value:i},Object(o.createElement)("div",{className:s()(c,l)},n,t))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(1),a=c(8),l=c(4),i=c.n(l),u=c(114),d=c(205),p=c(10),b=c(124),m=c(30);c(186);var g=Object(a.forwardRef)((e,t)=>{let{className:c,id:o,type:s="text",ariaLabel:a,ariaDescribedBy:l,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:j,required:_=!1,onBlur:E=(()=>{}),feedback:k,...f}=e;const[y,w]=Object(n.useState)(!1);return Object(n.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":y||O})},Object(n.createElement)("input",r()({type:s,id:o,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>w(!0),onBlur:e=>{E(e.target.value),w(!1)},"aria-label":a||u,disabled:p,"aria-describedby":b&&!l?o+"__help":l,required:_},f)),Object(n.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:o},htmlFor:o}),!!b&&Object(n.createElement)("p",{id:o+"__help",className:"wc-block-components-text-input__help"},b),k)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,ariaDescribedBy:l,errorId:p,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:j="",value:_="",...E}=e;const[k,f]=Object(a.useState)(!0),y=Object(a.useRef)(null),{getValidationError:w,hideValidationError:v,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),P=void 0!==o?o:"textinput-"+c,R=void 0!==p?p:P,x=Object(a.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=y.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?C(R):S({[R]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,R,S]);Object(a.useEffect)(()=>{var e;k&&m&&(null===(e=y.current)||void 0===e||e.focus()),f(!1)},[m,k,f]),Object(a.useEffect)(()=>{var e,t;(null===(e=y.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==y.current&&x(!0)},[_,x]),Object(a.useEffect)(()=>()=>{C(R)},[C,R]);const T=w(R)||{};Object(b.a)(j)&&""!==j&&(T.message=j);const I=T.message&&!T.hidden,A=O&&I&&N(R)?N(R):l;return Object(n.createElement)(g,r()({className:i()(t,{"has-error":I}),"aria-invalid":!0===I,id:P,onBlur:()=>{x(!1)},feedback:O&&Object(n.createElement)(d.a,{errorMessage:j,propertyName:R}),ref:y,onChange:e=>{v(R),h(e)},ariaDescribedBy:A,value:_},E))})},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(13);const r=["core/paragraph","core/image","core/separator"],n=e=>[...Object(o.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...r]},function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var o=c(0),r=c(9),n=c(13),s=c(7);const a=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:a=[]}=e;const l=Object(o.useRef)(c),i=Object(o.useRef)(a),{insertBlock:u,replaceInnerBlocks:d}=Object(r.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(r.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:l.current.map(e=>Object(n.getBlockType)(e))}),[t,l.current]),m=Object(o.useCallback)((e,c)=>{const o=Object(n.createBlock)(e.name);u(o,c,t,!1)},[t,u]),g=Object(o.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,o;let{attributes:r}=e;return Boolean((null===(t=r.lock)||void 0===t?void 0:t.remove)||(null===(c=r.lock)||void 0===c||null===(o=c.default)||void 0===o?void 0:o.remove))})(e)),[b]);Object(o.useLayoutEffect)(()=>{if(t){if(0===p.length&&i.current.length>0){const e=Object(n.createBlocksFromInnerBlocksTemplate)(i.current);if(!Object(s.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=i.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=i.current[t-1],o=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===o?t:o+1)}})}},[t,p,g,d,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var o=c(0),r=c(3),n=c(1),s=c(2);const a=[];var l=c(6),i=c.n(l),u=e=>Object(o.createElement)("div",i()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(o.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{filter:"url(#filter0_ddd)"},Object(o.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(o.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(o.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(o.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(o.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(o.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(o.createElement)("defs",null,Object(o.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(o.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(o.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(o.createElement)("feOffset",{dy:"1"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(o.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(o.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(o.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(o.createElement)("feOffset",{dy:"1"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(o.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(o.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(o.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(o.createElement)("feOffset",{dy:"2"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(o.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(o.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(o.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,l]=(e=>{const[t,c]=((e,t)=>{const[c,r]=Object(o.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(o.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,r]})("wc-blocks_dismissed_compatibility_notices",a),[r,n]=Object(o.useState)(!1),s=t.includes(e);return Object(o.useEffect)(()=>{n(!s)},[s]),[r,()=>{const o=new Set(t);o.add(e),c([...o])}]})(t);return Object(s.isWpVersion)("5.4","<=")||!c?null:Object(o.createElement)(r.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(n.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>l(),finishButtonText:Object(n.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(o.createElement)(u,null),content:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(n.__)("Compatibility notice","woo-gutenberg-products-block")),Object(o.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(o.createInterpolateElement)(Object(n.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(o.createElement)("em",null)})),Object(o.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(o.createInterpolateElement)(Object(n.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var o=c(1),r=c(23),n=c(2);const s=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(o.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(o._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(o._x)("Beanie","example product in Cart Block","woo-gutenberg-products-block"),quantity:1}],shipping_rates:[{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(o.__)("Free shipping","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"000",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(o.__)("Local pickup","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"200",taxes:"0",rate_id:"local_pickup:1",instance_id:1,meta_data:[],method_id:"local_pickup",selected:!1}]}],a=Object(n.getSetting)("displayCartPricesIncludingTax",!1),l={coupons:[],shipping_rates:Object(n.getSetting)("shippingMethodsExist",!1)?s:[],items:[{key:"1",id:1,quantity:2,name:Object(o.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(o.__)("Warm hat for winter","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:10,src:r.m+"previews/beanie.jpg",thumbnail:r.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(o.__)("Color","woo-gutenberg-products-block"),value:Object(o.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(o.__)("Size","woo-gutenberg-products-block"),value:Object(o.__)("Small","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:a?"12000":"10000",regular_price:a?"12000":"10000",sale_price:a?"12000":"10000",raw_prices:{precision:6,price:a?"12000000":"10000000",regular_price:a?"12000000":"10000000",sale_price:a?"12000000":"10000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}},{key:"2",id:2,quantity:1,name:Object(o.__)("Cap","woo-gutenberg-products-block"),short_description:Object(o.__)("Lightweight baseball cap","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:11,src:r.m+"previews/cap.jpg",thumbnail:r.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(o.__)("Color","woo-gutenberg-products-block"),value:Object(o.__)("Orange","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:a?"2400":"2000",regular_price:a?"2400":"2000",sale_price:a?"2400":"2000",raw_prices:{precision:6,price:a?"24000000":"20000000",regular_price:a?"24000000":"20000000",sale_price:a?"24000000":"20000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}}],fees:[{id:"fee",name:Object(o.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(o.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:Object(n.getSetting)("shippingEnabled",!0),has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"4000",total_items_tax:"800",total_fees:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(o.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},,,,,,,,,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-cart-items-block","version":"1.0.0","title":"Cart Items","description":"Shows cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),s=c(254);c(230),t.a=e=>{let{children:t,className:c}=e;return Object(o.createElement)(s.a,{className:n()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var o=c(0),r=c(8),n=c(4),s=c.n(n);const a=Object(r.forwardRef)((e,t)=>{let{children:c,className:r=""}=e;return Object(o.createElement)("div",{ref:t,className:s()("wc-block-components-main",r)},c)});t.a=a},,function(e,t,c){"use strict";var o=c(0),r=c(8),n=c(4),s=c.n(n);const a=Object(r.forwardRef)((e,t)=>{let{children:c,className:r=""}=e;return Object(o.createElement)("div",{ref:t,className:s()("wc-block-components-sidebar",r)},c)});t.a=a},,,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(11);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(o.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(o.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),Object(o.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));t.a=n},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(4),s=c.n(n),a=c(36),l=c(19),i=c(38),u=c(2);c(235),t.a=e=>{let{currency:t,values:c,className:n}=e;const d=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:b}=c,{receiveCart:m,...g}=Object(i.a)(),h=Object(l.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(r.__)("Total","woo-gutenberg-products-block"),extensions:g.extensions,arg:{cart:g}}),O=parseInt(b,10);return Object(o.createElement)(l.TotalsItem,{className:s()("wc-block-components-totals-footer-item",n),currency:t,label:h,value:parseInt(p,10),description:d&&0!==O&&Object(o.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(o.createInterpolateElement)(Object(r.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(o.createElement)(a.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:O})}))})}},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(69),s=c(198),a=c(19),l=c(2);c(236);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(a.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(o.createElement)(a.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(o.createElement)(n.a,{screenReaderLabel:Object(r.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(o.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(o.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(r.sprintf)(
+/* translators: %s Coupon code. */
+Object(r.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(r.sprintf)(
+/* translators: %s is a coupon code. */
+Object(r.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:O?Object(r.__)("Discount","woo-gutenberg-products-block"):Object(r.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return r}));const o=e=>e.length,r=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(67),s=c(255),a=c(30),l=c(69),i=c(10),u=c(114),d=c(205),p=c(19);c(243),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:i=!1,onSubmit:b=(()=>{})}=e;const[m,g]=Object(o.useState)(""),h=Object(o.useRef)(!1),{getValidationError:O,getValidationErrorId:j}=Object(u.b)(),_=O("coupon");Object(o.useEffect)(()=>{h.current!==c&&(c||!m||_||g(""),h.current=c)},[c,m,_]);const E="wc-block-components-totals-coupon__input-"+t;return Object(o.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(o.createElement)(a.a,{label:Object(r.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(r.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:E})},Object(o.createElement)(l.a,{screenReaderLabel:Object(r.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(o.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(o.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(o.createElement)(s.a,{id:E,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(r.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:j(E),onChange:e=>{g(e)},focusOnMount:!0,showError:!1}),Object(o.createElement)(n.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!m,showSpinner:c,onClick:e=>{e.preventDefault(),b(m)},type:"submit"},Object(r.__)("Apply","woo-gutenberg-products-block"))),Object(o.createElement)(d.a,{propertyName:"coupon",elementId:E}))))})},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return b}));var o=c(5),r=c(74),n=c(9),s=c(0),a=c(77),l=c(51),i=c(13);const u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},d=()=>{Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(n.subscribe)(()=>{var e,t,c,r;const s=Object(n.select)(o.store);if(!s)return;const a=s.getSelectedBlock();a&&(u("wc-lock-selected-block--remove",!(null==a||null===(e=a.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),u("wc-lock-selected-block--move",!(null==a||null===(c=a.attributes)||void 0===c||null===(r=c.lock)||void 0===r||!r.move)))})},p=e=>{let{ref:t}=e;const c=Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),u=t.current;return Object(s.useEffect)(()=>{if(u&&!c)return u.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{u.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:c}=e;if(!(c instanceof HTMLElement))return;if(t!==a.BACKSPACE&&t!==a.DELETE)return;if(Object(r.isTextField)(c))return;const s=c;void 0!==s.dataset.block&&(e=>{var t,c,r,s,a;if(!e)return!1;const{getBlock:l}=Object(n.select)(o.store),u=l(e);if("boolean"==typeof(null==u||null===(t=u.attributes)||void 0===t||null===(c=t.lock)||void 0===c?void 0:c.remove))return u.attributes.lock.remove;const d=Object(i.getBlockType)(u.name);var p,b,m;return"boolean"==typeof(null==d||null===(r=d.attributes)||void 0===r||null===(s=r.lock)||void 0===s||null===(a=s.default)||void 0===a?void 0:a.remove)&&(null==d||null===(p=d.attributes)||void 0===p||null===(b=p.lock)||void 0===b||null===(m=b.default)||void 0===m?void 0:m.remove)})(s.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},[u,c])},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object(s.useRef)(),c=Object(o.useBlockProps)({ref:t,...e});return p({ref:t}),c}},function(e,t,c){e.exports=c(464)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,function(e,t,c){"use strict";c.r(t);var o=c(0),r=c(4),n=c.n(r),s=c(11),a=Object(o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(o.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M5 3.75h14c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(o.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.4 10.75c0-.47.38-.85.85-.85h9.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-9.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h8.8v-.8H7.6zM12.4 15.25c0-.47.38-.85.85-.85h3.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-3.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h2.8v-.8h-2.8zM6.5 15.9a.6.6 0 01.6-.6h2.8a.6.6 0 010 1.2H7.1a.6.6 0 01-.6-.6zM6.5 7.9a.6.6 0 01.6-.6h9.8a.6.6 0 110 1.2H7.1a.6.6 0 01-.6-.6z",clipRule:"evenodd"})),l=c(109),i=c(68),u=c(13),d=c(1),p=c(5),b=c(414),m=c(50),g=c(248),h=c(282);const O={cc:[{method:{gateway:"credit-card",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]};var j=c(3),_=c(193),E=c(23),k=c(2),f=c(281),y=c(532),w=c(415),v=c(19);const S=Object(o.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),C=Object(o.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),N=()=>Object(o.useContext)(S),P=()=>Object(o.useContext)(C);var R=c(279),x=c(280);c(439);var T=c(305);Object(i.d)(T,{icon:{src:Object(o.createElement)(l.a,{icon:y.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t,attributes:c}=e;const r=Object(p.useBlockProps)({className:n()("wc-block-checkout__main",null==c?void 0:c.className)}),s=Object(R.a)(v.innerBlockAreas.CHECKOUT_FIELDS),{addressFieldControls:a}=P(),l=[["woocommerce/checkout-express-payment-block",{},[]],["woocommerce/checkout-contact-information-block",{},[]],["woocommerce/checkout-shipping-address-block",{},[]],["woocommerce/checkout-billing-address-block",{},[]],["woocommerce/checkout-shipping-methods-block",{},[]],["woocommerce/checkout-payment-block",{},[]],["woocommerce/checkout-order-note-block",{},[]],["woocommerce/checkout-terms-block",{},[]],["woocommerce/checkout-actions-block",{},[]]].filter(Boolean);return Object(x.a)({clientId:t,registeredBlocks:s,defaultTemplate:l}),Object(o.createElement)(w.a,r,Object(o.createElement)(a,null),Object(o.createElement)("form",{className:"wc-block-components-form wc-block-checkout__form"},Object(o.createElement)(p.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:l,renderAppender:p.InnerBlocks.ButtonBlockAppender})))},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(p.InnerBlocks.Content,null))});var I=c(417);c(440);var A=c(306);Object(i.d)(A,{icon:{src:Object(o.createElement)(l.a,{icon:y.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t,attributes:c}=e;const r=Object(p.useBlockProps)({className:n()("wc-block-checkout__sidebar",null==c?void 0:c.className)}),s=Object(R.a)(v.innerBlockAreas.CHECKOUT_TOTALS),a=[["woocommerce/checkout-order-summary-block",{},[]]];return Object(x.a)({clientId:t,registeredBlocks:s,defaultTemplate:a}),Object(o.createElement)(I.a,r,Object(o.createElement)(p.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:a,renderAppender:p.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(p.InnerBlocks.Content,null))});var M=c(536),D=c(129),B=e=>{let{children:t,stepHeadingContent:c}=e;return Object(o.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(o.createElement)(D.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(o.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};const L=e=>{let{attributes:t,setAttributes:c,className:r="",children:s}=e;const{title:a="",description:l="",showStepNumber:i=!0}=t,u=Object(p.useBlockProps)({className:n()("wc-block-components-checkout-step",r,{"wc-block-components-checkout-step--with-step-number":i})});return Object(o.createElement)("div",u,Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Form Step Options","woo-gutenberg-products-block")},Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Show step number","woo-gutenberg-products-block"),checked:i,onChange:()=>c({showStepNumber:!i})}))),Object(o.createElement)(B,null,Object(o.createElement)(p.PlainText,{className:"",value:a,onChange:e=>c({title:e})})),Object(o.createElement)("div",{className:"wc-block-components-checkout-step__container"},Object(o.createElement)("p",{className:"wc-block-components-checkout-step__description"},Object(o.createElement)(p.PlainText,{className:l?"":"wc-block-components-checkout-step__description-placeholder",value:l,placeholder:Object(d.__)("Optional text for this form step.","woo-gutenberg-products-block"),onChange:e=>c({description:e})})),Object(o.createElement)("div",{className:"wc-block-components-checkout-step__content"},s)))};c(441);const F=e=>{let{block:t}=e;const{"data-block":c}=Object(p.useBlockProps)(),r=Object(R.a)(t);return Object(x.a)({clientId:c,registeredBlocks:r}),Object(o.createElement)("div",{className:"wc-block-checkout__additional_fields"},Object(o.createElement)(p.InnerBlocks,{allowedBlocks:r}))},U=()=>Object(o.createElement)(p.InnerBlocks.Content,null);var V=c(472),q=c(52),G=c(87),$=c(81);const H=()=>{const{needsShipping:e}=Object($.a)(),{useShippingAsBilling:t,setUseShippingAsBilling:c}=Object(q.b)(),{billingData:r,setBillingData:n,shippingAddress:s,setShippingAddress:a}=Object(G.a)(),l=Object(o.useCallback)(e=>{n({email:e})},[n]),i=Object(o.useCallback)(e=>{n({phone:e})},[n]),u=Object(o.useCallback)(e=>{a({phone:e})},[a]);return{shippingAddress:s,billingData:r,setShippingAddress:a,setBillingData:n,setEmail:l,setBillingPhone:i,setShippingPhone:u,defaultAddressFields:k.defaultAddressFields,useShippingAsBilling:t,setUseShippingAsBilling:c,showShippingFields:e,showBillingFields:!e||!t}};var Y=c(64),z=c(45),W=c(255),J=e=>{let{id:t="phone",isRequired:c=!1,value:r="",onChange:n}=e;return Object(o.createElement)(W.a,{id:t,type:"tel",autoComplete:"tel",required:c,label:c?Object(d.__)("Phone","woo-gutenberg-products-block"):Object(d.__)("Phone (optional)","woo-gutenberg-products-block"),value:r,onChange:n})},K=e=>{let{showCompanyField:t=!1,showApartmentField:c=!1,showPhoneField:r=!1,requireCompanyField:n=!1,requirePhoneField:s=!1}=e;const{defaultAddressFields:a,setShippingAddress:l,setBillingData:i,shippingAddress:u,setShippingPhone:p,useShippingAsBilling:b,setUseShippingAsBilling:g}=H(),{dispatchCheckoutEvent:h}=Object(Y.a)(),{isEditor:O}=Object(m.b)();Object(o.useEffect)(()=>{r||p("")},[r,p]);const j=Object(o.useMemo)(()=>({company:{hidden:!t,required:n},address_2:{hidden:!c}}),[t,n,c]),_=O?z.a:o.Fragment;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_,null,Object(o.createElement)(V.a,{id:"shipping",type:"shipping",onChange:e=>{l(e),b&&i(e),h("set-shipping-address")},values:u,fields:Object.keys(a),fieldConfig:j}),r&&Object(o.createElement)(J,{id:"shipping-phone",isRequired:s,value:u.phone,onChange:e=>{p(e),h("set-phone-number",{step:"shipping"})}})),Object(o.createElement)(v.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:Object(d.__)("Use same address for billing","woo-gutenberg-products-block"),checked:b,onChange:e=>{g(e),e&&i(u)}}))},X=e=>{let{defaultTitle:t=Object(d.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(d.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:o=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:o}}},Q={...X({defaultTitle:Object(d.__)("Shipping address","woo-gutenberg-products-block"),defaultDescription:Object(d.__)("Enter the address where you want your order delivered.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},Z=c(307);Object(i.d)(Z,{icon:{src:Object(o.createElement)(l.a,{icon:M.a,className:"wc-block-editor-components-block-icon"})},attributes:Q,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showCompanyField:r,showApartmentField:s,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}=N(),{addressFieldControls:u}=P();return Object(o.createElement)(L,{setAttributes:c,attributes:t,className:n()("wc-block-checkout__shipping-fields",null==t?void 0:t.className)},Object(o.createElement)(u,null),Object(o.createElement)(K,{showCompanyField:r,showApartmentField:s,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}),Object(o.createElement)(F,{block:v.innerBlockAreas.SHIPPING_ADDRESS}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(U,null))});var ee=c(537),te=c(217);c(442);const ce=E.k?`${Object(d.__)("Terms and Conditions","woo-gutenberg-products-block")}`:Object(d.__)("Terms and Conditions","woo-gutenberg-products-block"),oe=E.g?`${Object(d.__)("Privacy Policy","woo-gutenberg-products-block")}`:Object(d.__)("Privacy Policy","woo-gutenberg-products-block"),re=Object(d.sprintf)(
+/* translators: %1$s terms page link, %2$s privacy page link. */
+Object(d.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woo-gutenberg-products-block"),ce,oe),ne=Object(d.sprintf)(
+/* translators: %1$s terms page link, %2$s privacy page link. */
+Object(d.__)("You must accept our %1$s and %2$s to continue with your purchase.","woo-gutenberg-products-block"),ce,oe);var se=c(308);Object(i.d)(se,{icon:{src:Object(o.createElement)(l.a,{icon:ee.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:{checkbox:t,text:c},setAttributes:r}=e;const n=Object(p.useBlockProps)(),s=c||(t?ne:re);return Object(o.createElement)("div",n,Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Display options","woo-gutenberg-products-block")},Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Require checkbox","woo-gutenberg-products-block"),checked:t,onChange:()=>r({checkbox:!t})}))),Object(o.createElement)("div",{className:"wc-block-checkout__terms"},t?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(v.CheckboxControl,{id:"terms-condition",checked:!1}),Object(o.createElement)(p.RichText,{value:s,onChange:e=>r({text:e})})):Object(o.createElement)(p.RichText,{tagName:"span",value:s,onChange:e=>r({text:e})})),(!E.k||!E.g)&&Object(o.createElement)(j.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:[!E.k&&{className:"wc-block-checkout__terms_notice-button",label:Object(o.createElement)(o.Fragment,null,Object(d.__)("Setup a Terms and Conditions page","woo-gutenberg-products-block"),Object(o.createElement)(l.a,{icon:te.a,size:16,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:()=>window.open(k.ADMIN_URL+"admin.php?page=wc-settings&tab=advanced","_blank")},!E.g&&{className:"wc-block-checkout__terms_notice-button",label:Object(o.createElement)(o.Fragment,null,Object(d.__)("Setup a Privacy Policy page","woo-gutenberg-products-block"),Object(o.createElement)(l.a,{size:16,icon:te.a,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:()=>window.open(k.ADMIN_URL+"options-privacy.php","_blank")}].filter(Boolean)},Object(o.createElement)("p",null,Object(d.__)("You don't seem to have a Terms and Conditions and/or a Privacy Policy pages setup.","woo-gutenberg-products-block"))),E.k&&E.g&&!(s.includes(E.k)&&s.includes(E.g))&&Object(o.createElement)(j.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:re!==c?[{label:Object(d.__)("Restore default text","woo-gutenberg-products-block"),onClick:()=>r({text:""})}]:[]},Object(o.createElement)("p",null,Object(d.__)("Ensure you add links to your policy pages in this section.","woo-gutenberg-products-block"))))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var ae=c(538),le=e=>{let{allowCreateAccount:t}=e;const{customerId:c,shouldCreateAccount:r,setShouldCreateAccount:n}=Object(q.b)(),{billingData:s,setEmail:a}=H(),{dispatchCheckoutEvent:l}=Object(Y.a)(),i=!c&&t&&Object(k.getSetting)("checkoutAllowsGuest",!1)&&Object(k.getSetting)("checkoutAllowsSignup",!1)&&Object(o.createElement)(v.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(d.__)("Create an account?","woo-gutenberg-products-block"),checked:r,onChange:e=>n(e)});return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(W.a,{id:"email",type:"email",label:Object(d.__)("Email address","woo-gutenberg-products-block"),value:s.email,autoComplete:"email",onChange:e=>{a(e),l("set-email-address")},required:!0}),i)},ie={...X({defaultTitle:Object(d.__)("Contact information","woo-gutenberg-products-block"),defaultDescription:Object(d.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}},ue=c(309);Object(i.d)(ue,{icon:{src:Object(o.createElement)(l.a,{icon:ae.a,className:"wc-block-editor-components-block-icon"})},attributes:ie,edit:e=>{let{attributes:t,setAttributes:c}=e;const{allowCreateAccount:r}=N(),{accountControls:s}=P();return Object(o.createElement)(L,{attributes:t,setAttributes:c,className:n()("wc-block-checkout__contact-fields",null==t?void 0:t.className)},Object(o.createElement)(s,null),Object(o.createElement)(z.a,null,Object(o.createElement)(le,{allowCreateAccount:r})),Object(o.createElement)(F,{block:v.innerBlockAreas.CONTACT_INFORMATION}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(U,null))});var de=e=>{let{showCompanyField:t=!1,showApartmentField:c=!1,showPhoneField:r=!1,requireCompanyField:n=!1,requirePhoneField:s=!1}=e;const{defaultAddressFields:a,billingData:l,setBillingData:i,setBillingPhone:u}=H(),{dispatchCheckoutEvent:d}=Object(Y.a)(),{isEditor:p}=Object(m.b)();Object(o.useEffect)(()=>{r||u("")},[r,u]);const b=Object(o.useMemo)(()=>({company:{hidden:!t,required:n},address_2:{hidden:!c}}),[t,n,c]),g=p?z.a:o.Fragment;return Object(o.createElement)(g,null,Object(o.createElement)(V.a,{id:"billing",type:"billing",onChange:e=>{i(e),d("set-billing-address")},values:l,fields:Object.keys(a),fieldConfig:b}),r&&Object(o.createElement)(J,{isRequired:s,value:l.phone,onChange:e=>{u(e),d("set-phone-number",{step:"billing"})}}))},pe={...X({defaultTitle:Object(d.__)("Billing address","woo-gutenberg-products-block"),defaultDescription:Object(d.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},be=c(310);Object(i.d)(be,{icon:{src:Object(o.createElement)(l.a,{icon:M.a,className:"wc-block-editor-components-block-icon"})},attributes:pe,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showCompanyField:r,showApartmentField:s,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}=N(),{addressFieldControls:u}=P(),{showBillingFields:d}=H();return d?Object(o.createElement)(L,{setAttributes:c,attributes:t,className:n()("wc-block-checkout__billing-fields",null==t?void 0:t.className)},Object(o.createElement)(u,null),Object(o.createElement)(de,{showCompanyField:r,showApartmentField:s,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}),Object(o.createElement)(F,{block:v.innerBlockAreas.BILLING_ADDRESS})):null},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(U,null))});var me=c(524),ge=c(9),he=c(192),Oe=c(539);c(444);var je=e=>{let{link:t}=e;return Object(o.createElement)("a",{href:t||E.d,className:"wc-block-components-checkout-return-to-cart-button"},Object(o.createElement)(l.a,{icon:Oe.a}),Object(d.__)("Return to Cart","woo-gutenberg-products-block"))},_e=c(159),Ee=c(165),ke=c(528),fe=c(67),ye=()=>{const{submitButtonText:e,onSubmit:t,isCalculating:c,isDisabled:r,waitingForProcessing:n,waitingForRedirect:s}=(()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:c,isProcessing:o,isAfterProcessing:r,isComplete:n,hasError:s}=Object(q.b)(),{paymentMethods:a={}}=Object(Ee.b)(),{activePaymentMethod:l,currentStatus:i}=Object(_e.b)(),u=a[l]||{},p=o||r||c,b=n&&!s;return{submitButtonText:(null==u?void 0:u.placeOrderButtonLabel)||Object(d.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:o||i.isDoingExpressPayment,waitingForProcessing:p,waitingForRedirect:b}})();return Object(o.createElement)(fe.a,{className:"wc-block-components-checkout-place-order-button",onClick:t,disabled:c||r||n||s,showSpinner:n},s?Object(o.createElement)(l.a,{icon:ke.a}):e)};c(443);var we=e=>{let{cartPageId:t,showReturnToCart:c,className:r}=e;return Object(o.createElement)("div",{className:n()("wc-block-checkout__actions",r)},c&&Object(o.createElement)(je,{link:Object(k.getSetting)("page-"+t,!1)}),Object(o.createElement)(ye,null))},ve=c(311);Object(i.d)(ve,{icon:{src:Object(o.createElement)(l.a,{icon:me.a,className:"wc-block-editor-components-block-icon"})},attributes:{cartPageId:{type:"number",default:0},showReturnToCart:{type:"boolean",default:!0},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},edit:e=>{let{attributes:t,setAttributes:c}=e;const r=Object(p.useBlockProps)(),{cartPageId:n=0,showReturnToCart:s=!0}=t,{current:a}=Object(o.useRef)(n),l=Object(ge.useSelect)(e=>a||e("core/editor").getCurrentPostId(),[a]);return Object(o.createElement)("div",r,Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Account options","woo-gutenberg-products-block")},Object(o.createElement)(j.ToggleControl,{label:Object(d.__)('Show a "Return to Cart" link',"woo-gutenberg-products-block"),checked:s,onChange:()=>c({showReturnToCart:!s})})),s&&!(l===E.e&&0===a)&&Object(o.createElement)(he.a,{pageId:n,setPageId:e=>c({cartPageId:e}),labels:{title:Object(d.__)("Return to Cart button","woo-gutenberg-products-block"),default:Object(d.__)("WooCommerce Cart Page","woo-gutenberg-products-block")}})),Object(o.createElement)(z.a,null,Object(o.createElement)(we,{showReturnToCart:s,cartPageId:n})))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Se=c(525);c(446);const Ce=e=>{let{title:t,stepHeadingContent:c}=e;return Object(o.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(o.createElement)(D.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(o.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};var Ne=e=>{let{id:t,className:c,title:r,legend:s,description:a,children:l,disabled:i=!1,showStepNumber:u=!0,stepHeadingContent:d=(()=>{})}=e;const p=s||r?"fieldset":"div";return Object(o.createElement)(p,{className:n()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":u,"wc-block-components-checkout-step--disabled":i}),id:t,disabled:i},!(!s&&!r)&&Object(o.createElement)("legend",{className:"screen-reader-text"},s||r),!!r&&Object(o.createElement)(Ce,{title:r,stepHeadingContent:d()}),Object(o.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!a&&Object(o.createElement)("p",{className:"wc-block-components-checkout-step__description"},a),Object(o.createElement)("div",{className:"wc-block-components-checkout-step__content"},l)))};c(448);const Pe=e=>{let{className:t="",disabled:c=!1,onTextChange:r,placeholder:s,value:a=""}=e;return Object(o.createElement)("textarea",{className:n()("wc-block-components-textarea",t),disabled:c,onChange:e=>{r(e.target.value)},placeholder:s,rows:2,value:a})};c(447);var Re=e=>{let{disabled:t,onChange:c,placeholder:r,value:n}=e;const[s,a]=Object(o.useState)(!1),[l,i]=Object(o.useState)("");return Object(o.createElement)("div",{className:"wc-block-checkout__add-note"},Object(o.createElement)(v.CheckboxControl,{disabled:t,label:Object(d.__)("Add a note to your order","woo-gutenberg-products-block"),checked:s,onChange:e=>{a(e),e?n!==l&&c(l):(c(""),i(n))}}),s&&Object(o.createElement)(Pe,{disabled:t,onTextChange:c,placeholder:r,value:n}))},xe=e=>{let{className:t}=e;const{needsShipping:c}=Object($.a)(),{isProcessing:r,orderNotes:s,dispatchActions:a}=Object(q.b)(),{setOrderNotes:l}=a;return Object(o.createElement)(Ne,{id:"order-notes",showStepNumber:!1,className:n()("wc-block-checkout__order-notes",t),disabled:r},Object(o.createElement)(Re,{disabled:r,onChange:l,placeholder:c?Object(d.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(d.__)("Notes about your order.","woo-gutenberg-products-block"),value:s}))};c(445);var Te=c(312);Object(i.d)(Te,{icon:{src:Object(o.createElement)(l.a,{icon:Se.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(p.useBlockProps)();return Object(o.createElement)("div",e,Object(o.createElement)(z.a,null,Object(o.createElement)(xe,null)))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Ie=c(428),Ae=c(429),Me=c(26),De=c(38);const Be=()=>{const{extensions:e,receiveCart:t,...c}=Object(De.a)(),r={extensions:e,cart:c,context:"woocommerce/checkout"};return Object(o.createElement)(v.ExperimentalOrderMeta.Slot,r)};var Le=c(313);Object(i.d)(Le,{icon:{src:Object(o.createElement)(l.a,{icon:Ie.a,className:"wc-block-editor-components-block-icon"})},attributes:{className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},edit:e=>{let{clientId:t}=e;const c=Object(p.useBlockProps)(),{cartTotals:r}=Object(De.a)(),n=Object(Me.getCurrencyFromPriceResponse)(r),s=Object(R.a)(v.innerBlockAreas.CHECKOUT_ORDER_SUMMARY),a=[["woocommerce/checkout-order-summary-cart-items-block",{},[]],["woocommerce/checkout-order-summary-subtotal-block",{},[]],["woocommerce/checkout-order-summary-fee-block",{},[]],["woocommerce/checkout-order-summary-discount-block",{},[]],["woocommerce/checkout-order-summary-coupon-form-block",{},[]],["woocommerce/checkout-order-summary-shipping-block",{},[]],["woocommerce/checkout-order-summary-taxes-block",{},[]]];return Object(x.a)({clientId:t,registeredBlocks:s,defaultTemplate:a}),Object(o.createElement)("div",c,Object(o.createElement)(p.InnerBlocks,{allowedBlocks:s,template:a}),Object(o.createElement)("div",{className:"wc-block-components-totals-wrapper"},Object(o.createElement)(Ae.a,{currency:n,values:r})),Object(o.createElement)(Be,null))},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(p.InnerBlocks.Content,null))});var Fe=c(533);c(449);var Ue=e=>{let{href:t,title:c,description:r}=e;return Object(o.createElement)("a",{href:t,className:"wc-block-editor-components-external-link-card",target:"_blank",rel:"noreferrer"},Object(o.createElement)("span",{className:"wc-block-editor-components-external-link-card__content"},Object(o.createElement)("strong",{className:"wc-block-editor-components-external-link-card__title"},c),r&&Object(o.createElement)("span",{className:"wc-block-editor-components-external-link-card__description"},r)),Object(o.createElement)(j.VisuallyHidden,{as:"span"},
+/* translators: accessibility text */
+Object(d.__)("(opens in a new tab)","woo-gutenberg-products-block")),Object(o.createElement)(l.a,{icon:te.a,className:"wc-block-editor-components-external-link-card__icon"}))},Ve=c(30),qe=c(530),Ge=c(131),$e=c(256);c(450);const He=()=>Object(o.createElement)(qe.a,{icon:Object(o.createElement)(l.a,{icon:Fe.a}),label:Object(d.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(o.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(d.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method it will be shown here.","woo-gutenberg-products-block")),Object(o.createElement)(Ge.a,{isSecondary:!0,href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(d.__)("Configure Payment Methods","woo-gutenberg-products-block"))),Ye=()=>Object(o.createElement)($e.a,{isDismissible:!1,className:n()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(d.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var ze=()=>{const{isEditor:e}=Object(m.b)();return e?Object(o.createElement)(He,null):Object(o.createElement)(Ye,null)},We=c(253),Je=c(34),Ke=c(10),Xe=c(115),Qe=Object(Ke.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,selected:s,onChange:a,options:l=[]}=e;const i=r||c;return l.length&&Object(o.createElement)("div",{className:n()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===s;return Object(o.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(o.createElement)(Xe.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{a(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(o.createElement)("div",{className:n()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),Ze=c(155),et=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:r}=Object(m.b)(),{shouldSavePayment:n,setShouldSavePayment:s}=Object(_e.b)(),{customerId:a}=Object(q.b)();return Object(o.createElement)(Ze.a,{isEditor:r},t,a>0&&c&&Object(o.createElement)(v.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(d.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:n,onChange:()=>s(!n)}))},tt=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,isExpressPaymentMethodActive:c,customerPaymentMethods:r}=Object(_e.b)(),{paymentMethods:s}=Object(Ee.b)(),{activePaymentMethod:a,...l}=Object(We.a)(),{noticeContexts:i}=Object(Je.d)(),{removeNotice:u}=Object(ge.useDispatch)("core/notices"),{dispatchCheckoutEvent:d}=Object(Y.a)(),{isEditor:p}=Object(m.b)(),b=Object.keys(s).map(e=>{const{edit:t,content:c,label:r,supports:n}=s[e],i=p?t:c;return{value:e,label:"string"==typeof r?r:Object(o.cloneElement)(r,{components:l.components}),name:"wc-saved-payment-method-token-"+e,content:Object(o.createElement)(et,{showSaveOption:n.showSaveOption},Object(o.cloneElement)(i,{activePaymentMethod:a,...l}))}}),g=Object(o.useCallback)(t=>{e(t),u("wc-payment-error",i.PAYMENTS),d("set-active-payment-method",{value:t})},[d,i.PAYMENTS,u,e]),h=0===Object.keys(r).length&&1===Object.keys(s).length,O=n()({"disable-radio-control":h});return c?null:Object(o.createElement)(Qe,{id:"wc-payment-method-options",className:O,selected:t?null:a,onChange:g,options:b})},ct=c(156);const ot=e=>{let{method:t,expires:c}=e;return Object(d.sprintf)(
+/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */
+Object(d.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),t.brand,t.last4,c)},rt=e=>{let{method:t}=e;return Object(d.sprintf)(
+/* translators: %s is the name of the payment method gateway. */
+Object(d.__)("Saved token for %s","woo-gutenberg-products-block"),t.gateway)};var nt=()=>{var e,t;const{customerPaymentMethods:c,activePaymentMethod:r,setActivePaymentMethod:n,activeSavedToken:s}=Object(_e.b)(),{paymentMethods:a}=Object(Ee.b)(),l=Object(We.a)(),{noticeContexts:i}=Object(Je.d)(),{removeNotice:u}=Object(ge.useDispatch)("core/notices"),{dispatchCheckoutEvent:d}=Object(Y.a)(),p=Object(o.useMemo)(()=>Object.keys(c).flatMap(e=>c[e].map(t=>{const c="cc"===e||"echeck"===e,o=t.method.gateway;return{name:"wc-saved-payment-method-token-"+o,label:c?ot(t):rt(t),value:t.tokenId.toString(),onChange:e=>{n(o,{token:e,payment_method:o,[`wc-${o}-payment-token`]:e.toString(),isSavedToken:!0}),u("wc-payment-error",i.PAYMENTS),d("set-active-payment-method",{paymentMethodSlug:o})}}})).filter(Boolean),[c,n,u,i.PAYMENTS,d]),b=s&&a[r]&&null!==(e=a[r])&&void 0!==e&&e.savedTokenComponent?Object(o.cloneElement)(null===(t=a[r])||void 0===t?void 0:t.savedTokenComponent,{token:s,...l}):null;return p.length>0?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(ct.a,{id:"wc-payment-method-saved-tokens",selected:s,options:p}),b):null},st=()=>{const{isInitialized:e,paymentMethods:t}=Object(Ee.b)(),{customerPaymentMethods:c}=Object(_e.b)();return e&&0===Object.keys(t).length?Object(o.createElement)(ze,null):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(nt,null),Object.keys(c).length>0&&Object(o.createElement)(Ve.a,{label:Object(d.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(d.__)("Other available payment methods","woo-gutenberg-products-block"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),Object(o.createElement)(tt,null))},at=()=>Object(o.createElement)(st,null),lt={...X({defaultTitle:Object(d.__)("Payment options","woo-gutenberg-products-block"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},it=c(314);Object(i.d)(it,{icon:{src:Object(o.createElement)(l.a,{icon:Fe.a,className:"wc-block-editor-components-block-icon"})},attributes:lt,edit:e=>{let{attributes:t,setAttributes:c}=e;const r=Object(k.getSetting)("globalPaymentMethods");return Object(o.createElement)(L,{attributes:t,setAttributes:c,className:n()("wc-block-checkout__payment-method",null==t?void 0:t.className)},Object(o.createElement)(p.InspectorControls,null,r.length>0&&Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Methods","woo-gutenberg-products-block")},Object(o.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(d.__)("You currently have the following payment integrations active.","woo-gutenberg-products-block")),r.map(e=>Object(o.createElement)(Ue,{key:e.id,href:`${k.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${e.id}`,title:e.title,description:e.description})),Object(o.createElement)(j.ExternalLink,{href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout"},Object(d.__)("Manage payment methods","woo-gutenberg-products-block")))),Object(o.createElement)(z.a,null,Object(o.createElement)(at,null)),Object(o.createElement)(F,{block:v.innerBlockAreas.PAYMENT_METHODS}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(U,null))});var ut=c(214),dt=c(69),pt=c(191);c(232);var bt=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:c,isBeforeProcessing:r,isComplete:n,hasError:s}=Object(q.b)(),{currentStatus:a}=Object(_e.b)(),{paymentMethods:l,isInitialized:i}=Object(Ee.a)(),{isEditor:u}=Object(m.b)(),{noticeContexts:p}=Object(Je.d)();if(!i||i&&0===Object.keys(l).length)return u||k.CURRENT_USER_IS_ADMIN?Object(o.createElement)(ut.a,{context:p.EXPRESS_PAYMENTS}):null;const b=t||c||r||n&&!s;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(dt.a,{isLoading:e||b||a.isDoingExpressPayment},Object(o.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(o.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(o.createElement)(D.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(d.__)("Express checkout","woo-gutenberg-products-block"))),Object(o.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(o.createElement)(ut.a,{context:p.EXPRESS_PAYMENTS}),Object(o.createElement)("p",null,Object(d.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),Object(o.createElement)(pt.a,null)))),Object(o.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(d.__)("Or continue below","woo-gutenberg-products-block")))},mt=e=>{let{className:t}=e;const{cartNeedsPayment:c}=Object(De.a)();return c?Object(o.createElement)("div",{className:t},Object(o.createElement)(bt,null)):null};c(451);const gt=()=>Object(o.createElement)(qe.a,{icon:Object(o.createElement)(l.a,{icon:Fe.a}),label:Object(d.__)("Express Checkout","woo-gutenberg-products-block"),className:"wp-block-woocommerce-checkout-express-payment-block-placeholder"},Object(o.createElement)("span",{className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__description"},Object(d.__)("Your store doesn't have any Payment Methods that support the Express Checkout Block. If they are added, they will be shown here.","woo-gutenberg-products-block")),Object(o.createElement)(Ge.a,{isPrimary:!0,href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer",className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__button"},Object(d.__)("Configure Payment Methods","woo-gutenberg-products-block")));var ht=c(315);Object(i.d)(ht,{icon:{src:Object(o.createElement)(l.a,{icon:Fe.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{paymentMethods:c,isInitialized:r}=Object(Ee.a)(),s=Object.keys(c).length>0,a=Object(p.useBlockProps)({className:n()({"wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods":s},null==t?void 0:t.className),attributes:t});return r?Object(o.createElement)("div",a,s?Object(o.createElement)(mt,null):Object(o.createElement)(gt,null)):null},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Ot=c(540),jt=c(197),_t=c(433),Et=c(36),kt=c(14);c(453);var ft=()=>Object(o.createElement)(qe.a,{icon:Object(o.createElement)(l.a,{icon:Ot.a}),label:Object(d.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(o.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(d.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),Object(o.createElement)(Ge.a,{isSecondary:!0,href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping",target:"_blank",rel:"noopener noreferrer"},Object(d.__)("Configure Shipping Options","woo-gutenberg-products-block")));c(452);const yt=e=>{const t=Object(k.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(kt.decodeEntities)(e.name),value:e.rate_id,description:Object(kt.decodeEntities)(e.description),secondaryLabel:Object(o.createElement)(Et.a,{currency:Object(Me.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object(kt.decodeEntities)(e.delivery_time)}};var wt=()=>{const{isEditor:e}=Object(m.b)(),{shippingRates:t,needsShipping:c,isLoadingRates:r,hasCalculatedShipping:s}=Object($.a)();if(!c)return null;const a=Object(_t.a)(t);return e||s||a?Object(o.createElement)(o.Fragment,null,e&&!a?Object(o.createElement)(ft,null):Object(o.createElement)(jt.a,{noResultsMessage:Object(o.createElement)($e.a,{isDismissible:!1,className:n()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(d.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:yt,shippingRates:t,isLoadingRates:r,context:"woocommerce/checkout"})):Object(o.createElement)("p",null,Object(d.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))},vt={...X({defaultTitle:Object(d.__)("Shipping options","woo-gutenberg-products-block"),defaultDescription:""}),allowCreateAccount:{type:"boolean",default:!1},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},St=c(316);Object(i.d)(St,{icon:{src:Object(o.createElement)(l.a,{icon:Ot.a,className:"wc-block-editor-components-block-icon"})},attributes:vt,edit:e=>{let{attributes:t,setAttributes:c}=e;const r=Object(k.getSetting)("globalShippingMethods"),s=Object(k.getSetting)("activeShippingZones");return Object(o.createElement)(L,{attributes:t,setAttributes:c,className:n()("wc-block-checkout__shipping-option",null==t?void 0:t.className)},Object(o.createElement)(p.InspectorControls,null,r.length>0&&Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Methods","woo-gutenberg-products-block")},Object(o.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(d.__)("You currently have the following shipping integrations active.","woo-gutenberg-products-block")),r.map(e=>Object(o.createElement)(Ue,{key:e.id,href:`${k.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=${e.id}`,title:e.title,description:e.description})),Object(o.createElement)(j.ExternalLink,{href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping"},Object(d.__)("Manage shipping methods","woo-gutenberg-products-block"))),s.length&&Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Zones","woo-gutenberg-products-block")},Object(o.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(d.__)("You currently have the following shipping zones active.","woo-gutenberg-products-block")),s.map(e=>Object(o.createElement)(Ue,{key:e.id,href:`${k.ADMIN_URL}admin.php?page=wc-settings&tab=shipping&zone_id=${e.id}`,title:e.title,description:e.description})),Object(o.createElement)(j.ExternalLink,{href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping"},Object(d.__)("Manage shipping zones","woo-gutenberg-products-block")))),Object(o.createElement)(z.a,null,Object(o.createElement)(wt,null)),Object(o.createElement)(F,{block:v.innerBlockAreas.SHIPPING_METHODS}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save(),Object(o.createElement)(U,null))});var Ct=e=>{let{className:t=""}=e;const{cartTotals:c}=Object(De.a)(),r=Object(Me.getCurrencyFromPriceResponse)(c);return Object(o.createElement)(v.TotalsWrapper,{className:t},Object(o.createElement)(v.Subtotal,{currency:r,values:c}))},Nt=c(317);Object(i.d)(Nt,{icon:{src:Object(o.createElement)(l.a,{icon:Ie.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,r=Object(p.useBlockProps)();return Object(o.createElement)("div",r,Object(o.createElement)(Ct,{className:c}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Pt=e=>{let{className:t=""}=e;const{cartFees:c,cartTotals:r}=Object(De.a)(),n=Object(Me.getCurrencyFromPriceResponse)(r);return Object(o.createElement)(v.TotalsWrapper,{className:t},Object(o.createElement)(v.TotalsFees,{currency:n,cartFees:c}))},Rt=c(318);Object(i.d)(Rt,{icon:{src:Object(o.createElement)(l.a,{icon:Ie.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,r=Object(p.useBlockProps)();return Object(o.createElement)("div",r,Object(o.createElement)(Pt,{className:c}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var xt=c(430),Tt=c(196);const It=()=>{const{extensions:e,receiveCart:t,...c}=Object(De.a)(),r={extensions:e,cart:c,context:"woocommerce/checkout"};return Object(o.createElement)(v.ExperimentalDiscountsMeta.Slot,r)};var At=e=>{let{className:t=""}=e;const{cartTotals:c,cartCoupons:r}=Object(De.a)(),{removeCoupon:n,isRemovingCoupon:s}=Object(Tt.a)("wc/checkout"),a=Object(Me.getCurrencyFromPriceResponse)(c);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(v.TotalsWrapper,{className:t},Object(o.createElement)(xt.a,{cartCoupons:r,currency:a,isRemovingCoupon:s,removeCoupon:n,values:c})),Object(o.createElement)(It,null))},Mt=c(319);Object(i.d)(Mt,{icon:{src:Object(o.createElement)(l.a,{icon:Ie.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,r=Object(p.useBlockProps)();return Object(o.createElement)("div",r,Object(o.createElement)(At,{className:c}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Dt=c(473),Bt=e=>{let{className:t=""}=e;const{cartTotals:c,cartNeedsShipping:r}=Object(De.a)();if(!r)return null;const n=Object(Me.getCurrencyFromPriceResponse)(c);return Object(o.createElement)(v.TotalsWrapper,{className:t},Object(o.createElement)(Dt.a,{showCalculator:!1,showRateSelector:!1,values:c,currency:n}))},Lt=c(320);Object(i.d)(Lt,{icon:{src:Object(o.createElement)(l.a,{icon:Ie.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,r=Object(p.useBlockProps)();return Object(o.createElement)("div",r,Object(o.createElement)(z.a,null,Object(o.createElement)(Bt,{className:c})))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Ft=c(519),Ut=c(434),Vt=e=>{let{className:t=""}=e;const c=Object(k.getSetting)("couponsEnabled",!0),{applyCoupon:r,isApplyingCoupon:n}=Object(Tt.a)("wc/checkout");return c?Object(o.createElement)(v.TotalsWrapper,{className:t},Object(o.createElement)(Ut.a,{onSubmit:r,isLoading:n})):null},qt=c(321);Object(i.d)(qt,{icon:{src:Object(o.createElement)(l.a,{icon:Ft.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,r=Object(p.useBlockProps)();return Object(o.createElement)("div",r,Object(o.createElement)(z.a,null,Object(o.createElement)(Vt,{className:c})))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Gt=e=>{let{className:t,showRateAfterTaxName:c}=e;const{cartTotals:r}=Object(De.a)();if(Object(k.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(r.total_tax,10)<=0)return null;const n=Object(Me.getCurrencyFromPriceResponse)(r);return Object(o.createElement)(v.TotalsWrapper,{className:t},Object(o.createElement)(v.TotalsTaxes,{showRateAfterTaxName:c,currency:n,values:r}))},$t={showRateAfterTaxName:{type:"boolean",default:Object(k.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!1}}},Ht=c(322);Object(i.d)(Ht,{icon:{src:Object(o.createElement)(l.a,{icon:Ie.a,className:"wc-block-editor-components-block-icon"})},attributes:$t,edit:e=>{let{attributes:t,setAttributes:c}=e;const{className:r,showRateAfterTaxName:n}=t,s=Object(p.useBlockProps)(),a=Object(k.getSetting)("taxesEnabled"),l=Object(k.getSetting)("displayItemizedTaxes",!1),i=Object(k.getSetting)("displayCartPricesIncludingTax",!1);return Object(o.createElement)("div",s,Object(o.createElement)(p.InspectorControls,null,a&&l&&!i&&Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Taxes","woo-gutenberg-products-block")},Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(d.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:n,onChange:()=>c({showRateAfterTaxName:!n})}))),Object(o.createElement)(Gt,{className:r,showRateAfterTaxName:n}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())});var Yt=c(204),zt=c(254),Wt=c(91),Jt=c(111),Kt=c(108),Xt=c(124),Qt=c(207),Zt=c(206),ec=c(208),tc=c(209);const cc=e=>Object(v.mustContain)(e,"");var oc=e=>{let{cartItem:t}=e;const{images:c,low_stock_remaining:r,show_backorder_badge:s,name:a,permalink:l,prices:i,quantity:u,short_description:p,description:b,item_data:m,variation:g,totals:h,extensions:O}=t,{receiveCart:j,..._}=Object(De.a)(),E=Object(o.useMemo)(()=>({context:"summary",cartItem:t,cart:_}),[t,_]),f=Object(Me.getCurrencyFromPriceResponse)(i),y=Object(v.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:a,extensions:O,arg:E}),w=Object(Kt.a)({amount:parseInt(i.raw_prices.regular_price,10),precision:Object(Xt.a)(i.raw_prices.precision)?parseInt(i.raw_prices.precision,10):i.raw_prices.precision}).convertPrecision(f.minorUnit).getAmount(),S=Object(Kt.a)({amount:parseInt(i.raw_prices.price,10),precision:Object(Xt.a)(i.raw_prices.precision)?parseInt(i.raw_prices.precision,10):i.raw_prices.precision}).convertPrecision(f.minorUnit).getAmount(),C=Object(Me.getCurrencyFromPriceResponse)(h);let N=parseInt(h.line_subtotal,10);Object(k.getSetting)("displayCartPricesIncludingTax",!1)&&(N+=parseInt(h.line_subtotal_tax,10));const P=Object(Kt.a)({amount:N,precision:C.minorUnit}).getAmount(),R=Object(v.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:O,arg:E,validation:cc}),x=Object(v.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:O,arg:E,validation:cc}),T=Object(v.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:O,arg:E});return Object(o.createElement)("div",{className:n()("wc-block-components-order-summary-item",T)},Object(o.createElement)("div",{className:"wc-block-components-order-summary-item__image"},Object(o.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},Object(o.createElement)(Ve.a,{label:u.toString(),screenReaderLabel:Object(d.sprintf)(
+/* translators: %d number of products of the same type in the cart */
+Object(d._n)("%d item","%d items",u,"woo-gutenberg-products-block"),u)})),Object(o.createElement)(Zt.a,{image:c.length?c[0]:{},fallbackAlt:y})),Object(o.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(o.createElement)(Jt.a,{disabled:!0,name:y,permalink:l}),Object(o.createElement)(Wt.a,{currency:f,price:S,regularPrice:w,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:R}),s?Object(o.createElement)(Qt.a,null):!!r&&Object(o.createElement)(ec.a,{lowStockRemaining:r}),Object(o.createElement)(tc.a,{shortDescription:p,fullDescription:b,itemData:m,variation:g})),Object(o.createElement)("span",{className:"screen-reader-text"},Object(d.sprintf)(
+/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */
+Object(d._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",u,"woo-gutenberg-products-block"),u,y,Object(Me.formatPrice)(P,C))),Object(o.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},Object(o.createElement)(Wt.a,{currency:C,format:x,price:P})))};c(454);var rc=e=>{let{cartItems:t=[]}=e;const{isLarge:c,hasContainerWidth:r}=Object(zt.b)();return r?Object(o.createElement)(v.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:Object(o.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(d.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(o.createElement)("div",{className:"wc-block-components-order-summary__content"},t.map(e=>Object(o.createElement)(oc,{key:e.key,cartItem:e})))):null},nc=e=>{let{className:t}=e;const{cartItems:c}=Object(De.a)();return Object(o.createElement)(v.TotalsWrapper,{className:t},Object(o.createElement)(rc,{cartItems:c}))},sc=c(323);Object(i.d)(sc,{icon:{src:Object(o.createElement)(l.a,{icon:Yt.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,r=Object(p.useBlockProps)();return Object(o.createElement)("div",r,Object(o.createElement)(nc,{className:c}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save())}),c(455);var ac=c(437);Object(ac.a)();const lc=["woocommerce/checkout-fields-block","woocommerce/checkout-totals-block"],ic=e=>{let{attributes:t,setAttributes:c}=e;const{hasDarkControls:r}=t,{currentPostId:n}=Object(m.b)();return Object(o.createElement)(p.InspectorControls,null,n!==E.e&&Object(o.createElement)(j.Notice,{className:"wc-block-checkout__page-notice",isDismissible:!1,status:"warning"},Object(o.createInterpolateElement)(Object(d.__)("If you would like to use this block as your default checkout you must update your page settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(k.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Style","woo-gutenberg-products-block")},Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(d.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:r,onChange:()=>c({hasDarkControls:!r})})),Object(o.createElement)(_.a,null))},uc={hasDarkControls:{type:"boolean",default:Object(k.getSetting)("hasDarkEditorStyleSupport",!1)},showRateAfterTaxName:{type:"boolean",default:Object(k.getSetting)("displayCartPricesIncludingTax",!1)}},dc={showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0}};var pc=c(216);const bc={icon:{src:Object(o.createElement)(l.a,{icon:a,className:"wc-block-editor-components-block-icon"})},attributes:{...pc.attributes,...uc,...dc},edit:e=>{let{attributes:t,setAttributes:c}=e;const{allowCreateAccount:r,showCompanyField:s,requireCompanyField:a,showApartmentField:l,showPhoneField:i,requirePhoneField:u,showOrderNotes:_,showPolicyLinks:E,showReturnToCart:k,showRateAfterTaxName:y,cartPageId:w}=t,v=e=>{const o={};o[e]=!t[e],c(o)},N=Object(ac.b)();return Object(o.createElement)("div",N,Object(o.createElement)(m.a,{previewData:{previewCart:h.a,previewSavedPaymentMethods:O}},Object(o.createElement)(ic,{attributes:t,setAttributes:c}),Object(o.createElement)(g.a,null,Object(o.createElement)(b.a,{className:n()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(o.createElement)(C.Provider,{value:{addressFieldControls:()=>Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Address Fields","woo-gutenberg-products-block")},Object(o.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(d.__)("Show or hide fields in the checkout address forms.","woo-gutenberg-products-block")),Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Company","woo-gutenberg-products-block"),checked:s,onChange:()=>v("showCompanyField")}),s&&Object(o.createElement)(j.CheckboxControl,{label:Object(d.__)("Require company name?","woo-gutenberg-products-block"),checked:a,onChange:()=>v("requireCompanyField"),className:"components-base-control--nested"}),Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),checked:l,onChange:()=>v("showApartmentField")}),Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Phone","woo-gutenberg-products-block"),checked:i,onChange:()=>v("showPhoneField")}),i&&Object(o.createElement)(j.CheckboxControl,{label:Object(d.__)("Require phone number?","woo-gutenberg-products-block"),checked:u,onChange:()=>v("requirePhoneField"),className:"components-base-control--nested"}))),accountControls:()=>Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(j.PanelBody,{title:Object(d.__)("Account options","woo-gutenberg-products-block")},Object(o.createElement)(j.ToggleControl,{label:Object(d.__)("Allow shoppers to sign up for a user account during checkout","woo-gutenberg-products-block"),checked:r,onChange:()=>c({allowCreateAccount:!r})})))}},Object(o.createElement)(S.Provider,{value:{allowCreateAccount:r,showCompanyField:s,requireCompanyField:a,showApartmentField:l,showPhoneField:i,requirePhoneField:u,showOrderNotes:_,showPolicyLinks:E,showReturnToCart:k,cartPageId:w,showRateAfterTaxName:y}},Object(o.createElement)(p.InnerBlocks,{allowedBlocks:lc,template:[["woocommerce/checkout-fields-block",{},[]],["woocommerce/checkout-totals-block",{},[]]],templateLock:"insert"})))))),Object(o.createElement)(f.a,{blockName:"checkout"}))},save:()=>Object(o.createElement)("div",p.useBlockProps.save({className:"wc-block-checkout is-loading"}),Object(o.createElement)(p.InnerBlocks.Content,null)),deprecated:[{attributes:{...pc.attributes,...uc,...dc},save(e){let{attributes:t}=e;return Object(o.createElement)("div",{className:n()("is-loading",t.className)})},migrate:e=>{const{showOrderNotes:t,showPolicyLinks:c,showReturnToCart:o,cartPageId:r}=e;return[e,[Object(u.createBlock)("woocommerce/checkout-fields-block",{},[Object(u.createBlock)("woocommerce/checkout-express-payment-block",{},[]),Object(u.createBlock)("woocommerce/checkout-contact-information-block",{},[]),Object(u.createBlock)("woocommerce/checkout-shipping-address-block",{},[]),Object(u.createBlock)("woocommerce/checkout-billing-address-block",{},[]),Object(u.createBlock)("woocommerce/checkout-shipping-methods-block",{},[]),Object(u.createBlock)("woocommerce/checkout-payment-block",{},[]),!!t&&Object(u.createBlock)("woocommerce/checkout-order-note-block",{},[]),!!c&&Object(u.createBlock)("woocommerce/checkout-terms-block",{},[]),Object(u.createBlock)("woocommerce/checkout-actions-block",{showReturnToCart:o,cartPageId:r},[])].filter(Boolean)),Object(u.createBlock)("woocommerce/checkout-totals-block",{})]]},isEligible:(e,t)=>!t.some(e=>"woocommerce/checkout-fields-block"===e.name)}]};Object(i.d)(pc,bc)},,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(255),n=c(6),s=c.n(n),a=c(23),l=c(1),i=c(14),u=c(4),d=c.n(u),p=c(10),b=c(545),m=c(114),g=c(205),h=c(57);c(239);var O=Object(p.withInstanceId)(e=>{let{id:t,className:c,label:r,onChange:n,options:s,value:a,required:i=!1,errorMessage:u=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:p,instanceId:O="0",autoComplete:j="off"}=e;const{getValidationError:_,setValidationErrors:E,clearValidationError:k}=Object(m.b)(),f=Object(o.useRef)(null),y=t||"control-"+O,w=p||y,v=_(w)||{message:"",hidden:!1};return Object(o.useEffect)(()=>(!i||a?k(w):E({[w]:{message:u,hidden:!0}}),()=>{k(w)}),[k,a,w,u,i,E]),Object(o.createElement)("div",{id:y,className:d()("wc-block-components-combobox",c,{"is-active":a,"has-error":v.message&&!v.hidden}),ref:f},Object(o.createElement)(b.a,{className:"wc-block-components-combobox-control",label:r,onChange:n,onFilterValueChange:e=>{if(e.length){const t=Object(h.a)(f.current)?f.current.ownerDocument.activeElement:void 0;if(t&&Object(h.a)(f.current)&&f.current.contains(t))return;const c=e.toLocaleUpperCase(),o=s.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);o&&n(o.value)}},options:s,value:a||"",allowReset:!1,autoComplete:j,"aria-invalid":v.message&&!v.hidden}),Object(o.createElement)(g.a,{propertyName:w}))});c(238);var j=e=>{let{className:t,countries:c,id:r,label:n,onChange:s,value:a="",autoComplete:u="off",required:p=!1,errorId:b,errorMessage:m=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(o.useMemo)(()=>Object.entries(c).map(e=>{let[t,c]=e;return{value:t,label:Object(i.decodeEntities)(c)}}),[c]);return Object(o.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(o.createElement)(O,{id:r,label:n,onChange:s,options:g,value:a,errorId:b,errorMessage:m,required:p,autoComplete:u}),"off"!==u&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:a,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);s(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},_=e=>Object(o.createElement)(j,s()({countries:a.h},e)),E=e=>Object(o.createElement)(j,s()({countries:a.a},e));c(240);const k=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var f=e=>{let{className:t,id:c,states:n,country:s,label:a,onChange:u,autoComplete:p="off",value:b="",required:m=!1}=e;const g=n[s],h=Object(o.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),j=Object(o.useCallback)(e=>{u(h.length>0?k(e,h):e)},[u,h]),_=Object(o.useRef)(b);return Object(o.useEffect)(()=>{_.current!==b&&(_.current=b)},[b]),Object(o.useEffect)(()=>{if(h.length>0&&_.current){const e=k(_.current,h);e!==_.current&&j(e)}},[h,j]),h.length>0?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:c,label:a,onChange:j,options:h,value:b,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:p}),"off"!==p&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:b,onChange:e=>j(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(o.createElement)(r.a,{className:t,id:c,label:a,onChange:j,autoComplete:p,value:b,required:m})},y=e=>Object(o.createElement)(f,s()({states:a.i},e)),w=e=>Object(o.createElement)(f,s()({states:a.b},e)),v=c(48),S=c(2),C=c(88);t.a=Object(p.withInstanceId)(e=>{let{id:t="",fields:c=Object.keys(S.defaultAddressFields),fieldConfig:n={},instanceId:s,onChange:a,type:i="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:p,clearValidationError:b}=Object(m.b)(),g=Object(v.a)(c),h=d("shipping-missing-country")||{},O=Object(o.useMemo)(()=>Object(C.a)(g,n,u.country),[g,n,u.country]);return Object(o.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&a({...u,[e.key]:""})})},[O,a,u]),Object(o.useEffect)(()=>{"shipping"===i&&((e,t,c,o)=>{o||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),o&&e.country&&c("shipping-missing-country")})(u,p,b,!!h.message&&!h.hidden)},[u,h.message,h.hidden,p,b,i]),t=t||s,Object(o.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===i?_:E;return Object(o.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>a({...u,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===i?y:w;return Object(o.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>a({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(o.createElement)(r.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>a({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s),l=c(1),i=c(38),u=c(19),d=c(2),p=c(14);const b=e=>{let{selectedShippingRates:t}=e;return Object(n.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(p.decodeEntities)(t.join(", ")))};var m=c(256),g=c(197),h=e=>{let{hasRates:t,shippingRates:c,isLoadingRates:o}=e;const r=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(n.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(n.createElement)("legend",{className:"screen-reader-text"},r),Object(n.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(n.createElement)(m.a,{isDismissible:!1,className:a()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,isLoadingRates:o,context:"woocommerce/cart"}))},O=c(87),j=c(67),_=c(25),E=c.n(_),k=c(114),f=(c(185),c(472)),y=e=>{let{address:t,onUpdate:c,addressFields:o}=e;const[r,s]=Object(n.useState)(t),{hasValidationErrors:a,showAllValidationErrors:i}=Object(k.b)();return Object(n.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(n.createElement)(f.a,{fields:o,onChange:s,values:r}),Object(n.createElement)(j.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:E()(r,t),onClick:e=>{if(e.preventDefault(),i(),!a)return c(r)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},w=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:o,setShippingAddress:r}=Object(O.a)();return Object(n.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(n.createElement)(y,{address:o,addressFields:c,onUpdate:e=>{r(e),t(e)}}))},v=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(d.getSetting)("shippingCountries",{}),o=Object(d.getSetting)("shippingStates",{}),r="string"==typeof c[t.country]?Object(p.decodeEntities)(c[t.country]):"",s="object"==typeof o[t.country]&&"string"==typeof o[t.country][t.state]?Object(p.decodeEntities)(o[t.country][t.state]):t.state,a=[];a.push(t.postcode.toUpperCase()),a.push(t.city),a.push(s),a.push(r);const i=a.filter(Boolean).join(", ");return i?Object(n.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)(
+/* translators: %s location. */
+Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};c(237);const S=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:o}=e;return Object(n.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{o(!c)},"aria-expanded":c},t)},C=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:o,shippingAddress:r}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(v,{address:r}),t&&Object(n.createElement)(S,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:o}))},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:o,isCheckout:r=!1}=e;return t?Object(n.createElement)(S,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:o}):Object(n.createElement)("em",null,r?Object(l.__)("No shipping options available","woo-gutenberg-products-block"):Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:o=!0,showRateSelector:s=!0,isCheckout:p=!1,className:m}=e;const[g,O]=Object(n.useState)(!1),{shippingAddress:j,cartHasCalculatedShipping:_,shippingRates:E,isLoadingRates:k}=Object(i.a)(),f=Object(d.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),y=E.some(e=>e.shipping_rates.length)||f,v={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:O},S=E.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(n.createElement)("div",{className:a()("wc-block-components-totals-shipping",m)},Object(n.createElement)(u.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:y&&_?f:Object(n.createElement)(N,r()({showCalculator:o,isCheckout:p},v)),description:y&&_?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(b,{selectedShippingRates:S}),Object(n.createElement)(C,r()({shippingAddress:j,showCalculator:o},v))):null,currency:t}),o&&g&&Object(n.createElement)(w,{onUpdate:()=>{O(!1)}}),s&&_&&Object(n.createElement)(h,{hasRates:y,shippingRates:E,isLoadingRates:k}))}}]);
\ No newline at end of file
diff --git a/build/checkout/block.json b/build/checkout/block.json
new file mode 100644
index 00000000000..437677063f5
--- /dev/null
+++ b/build/checkout/block.json
@@ -0,0 +1,46 @@
+{
+ "name": "woocommerce/checkout",
+ "version": "1.0.0",
+ "title": "Checkout",
+ "description": "Display a checkout form so your customers can submit orders.",
+ "category": "woocommerce",
+ "keywords": [ "WooCommerce" ],
+ "supports": {
+ "align": [ "wide" ],
+ "html": false,
+ "multiple": false
+ },
+ "attributes": {
+ "isPreview": {
+ "type": "boolean",
+ "default": false,
+ "save": false
+ },
+ "showCompanyField": {
+ "type": "boolean",
+ "default": false
+ },
+ "requireCompanyField": {
+ "type": "boolean",
+ "default": false
+ },
+ "allowCreateAccount": {
+ "type": "boolean",
+ "default": false
+ },
+ "showApartmentField": {
+ "type": "boolean",
+ "default": true
+ },
+ "showPhoneField": {
+ "type": "boolean",
+ "default": true
+ },
+ "requirePhoneField": {
+ "type": "boolean",
+ "default": false
+ }
+ },
+ "textdomain": "woo-gutenberg-products-block",
+ "apiVersion": 2
+}
diff --git a/build/featured-category.asset.php b/build/featured-category.asset.php
new file mode 100644
index 00000000000..d0c943d6d5e
--- /dev/null
+++ b/build/featured-category.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '158702c9f9b6b13737d742dac926fb99');
\ No newline at end of file
diff --git a/build/featured-category.js b/build/featured-category.js
new file mode 100644
index 00000000000..a1c8118cba4
--- /dev/null
+++ b/build/featured-category.js
@@ -0,0 +1,16 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var c,a,s=t[0],l=t[1],i=t[2],d=0,b=[];dObject(o.sprintf)(
+/* translators: Number of items selected from list. */
+Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=Object(n.groupBy)(e,"parent"),c=Object(n.keyBy)(t,"id"),o=["0"],a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=a(c[e.parent]);return[...t,e.name]},s=e=>e.map(e=>{const t=r[e.id];return o.push(""+e.id),{...e,breadcrumbs:a(c[e.parent]),children:t&&t.length?s(t):[]}}),l=s(r[0]||[]);return Object.entries(r).forEach(e=>{let[t,r]=e;o.includes(t)||l.push(...s(r||[]))}),l},l=(e,t,r)=>{if(!t)return r?s(e):e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!c.test(e.name)&&e).filter(Boolean);return r?s(n,e):n},i=(e,t)=>{if(!t)return e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(r).map((e,r)=>0===r?e:Object(c.createElement)(c.Fragment,{key:r},Object(c.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},23:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return s})),r.d(t,"n",(function(){return l})),r.d(t,"j",(function(){return i})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return m})),r.d(t,"h",(function(){return h})),r.d(t,"a",(function(){return O})),r.d(t,"i",(function(){return j})),r.d(t,"b",(function(){return w}));var c,n=r(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=o.pluginUrl+"images/",s=o.pluginUrl+"build/",l=o.buildPhase,i=null===(c=n.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,g=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),p=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),m=n.STORE_PAGES.cart.permalink,h=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),O=Object(n.getSetting)("allowedCountries",{}),j=Object(n.getSetting)("shippingStates",{}),w=Object(n.getSetting)("allowedStates",{})},27:function(e,t,r){"use strict";r.d(t,"h",(function(){return i})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return O}));var c=r(18),n=r(15),o=r.n(n),a=r(7),s=r(2),l=r(23);const i=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const s=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const o=l.o.productCount>100,a={per_page:o?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},s=[Object(c.addQueryArgs)("/wc/store/v1/products",{...a,...n})];return o&&t.length&&s.push(Object(c.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:r,queryArgs:n});return Promise.all(s.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/v1/products/"+e}),d=()=>o()({path:"wc/store/v1/products/attributes"}),b=e=>o()({path:`wc/store/v1/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(s.getSetting)("limitTags",!1),o=[Object(c.addQueryArgs)("wc/store/v1/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&o.push(Object(c.addQueryArgs)("wc/store/v1/products/tags",{include:t})),o})({selected:t,search:r});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},p=e=>o()({path:Object(c.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),m=e=>o()({path:"wc/store/v1/products/categories/"+e}),h=e=>o()({path:Object(c.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a}));var c=r(1),n=r(14);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},a=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(n.decodeEntities)(e.message):Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},32:function(e,t){e.exports=window.wp.escapeHtml},33:function(e,t,r){"use strict";var c=r(0),n=r(1),o=r(32);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var c=r(6),n=r.n(c),o=r(0),a=r(21);const s=e=>{let{countLabel:t,className:r,depth:c=0,controlId:s="",item:l,isSelected:i,isSingle:u,onSelect:d,search:b="",...g}=e;const p=null!=t&&void 0!==l.count&&null!==l.count,m=[r,"woocommerce-search-list__item"];m.push("depth-"+c),u&&m.push("is-radio-button"),p&&m.push("has-count");const h=l.breadcrumbs&&l.breadcrumbs.length,O=g.name||"search-list-item-"+s,j=`${O}-${l.id}`;return Object(o.createElement)("label",{htmlFor:j,className:m.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:j,name:O,value:l.value,onChange:d(l),checked:i,className:"woocommerce-search-list__item-input"},g)):Object(o.createElement)("input",n()({type:"checkbox",id:j,name:O,value:l.value,onChange:d(l),checked:i,className:"woocommerce-search-list__item-input"},g)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},h?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(a.b)(l.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(a.d)(l.name,b))),!!p&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||l.count))};t.b=s},379:function(e,t,r){e.exports=r(470)},380:function(e,t){},381:function(e,t){},470:function(e,t,r){"use strict";r.r(t);var c=r(0),n=r(1),o=r(5),a=r(13),s=r(2),l=r(11),i=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-6.92-3.96L12.39 17 15 15.47 17.61 17l-.69-2.96 2.3-1.99-3.03-.26L15 9l-1.19 2.79-3.03.26z"})),u=r(109),d=r(68),b=(r(380),r(381),r(23));const g=[{id:1,name:Object(n.__)("Clothing","woo-gutenberg-products-block"),slug:"clothing",parent:0,count:10,description:`
${Object(n.__)("Branded t-shirts, jumpers, pants and more!","woo-gutenberg-products-block")}
${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}
\n`,reviewer_avatar_urls:{48:c.o.defaultAvatar,96:c.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`
${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}
\n`,reviewer_avatar_urls:{48:c.o.defaultAvatar,96:c.o.defaultAvatar},rating:null,verified:!1}]}}},13:function(e,t){e.exports=window.wp.blocks},136:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},137:function(e,t,r){"use strict";var o=r(6),c=r.n(o),n=r(0),s=r(5),a=(r(150),r(54));t.a=e=>{let{attributes:t}=e;return Object(n.createElement)("div",c()({},s.useBlockProps.save({className:Object(a.a)(t)}),Object(a.b)(t)))}},14:function(e,t){e.exports=window.wp.htmlEntities},141:function(e,t,r){"use strict";var o=r(0),c=r(1),n=r(7),s=r(3),a=r(5),i=r(8),l=r(2),d=r(73),u=r(30);r(176);var b=e=>{let{onClick:t,label:r=Object(c.__)("Load more","woo-gutenberg-products-block"),screenReaderLabel:n=Object(c.__)("Load more","woo-gutenberg-products-block")}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(u.a,{label:r,screenReaderLabel:n})))},m=r(116);r(173);var p=e=>{let{onChange:t,readOnly:r,value:n}=e;return Object(o.createElement)(m.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(c.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(c.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(c.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(c.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(c.__)("Order reviews by","woo-gutenberg-products-block"),value:n})},g=r(4),w=r.n(g),h=r(24),v=r.n(h),O=r(162),_=r.n(O);const j=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=_()(e,{suffix:r,limit:t});return o.html},f=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e),y=(e,t,r,o)=>{const c=((e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=j(e,o.middle),o=f(o,t.clientHeight,r);return o.middle})(e,t,r);return j(e,c-o.length,o)},k={className:"read-more-content",ellipsis:"…",lessText:Object(c.__)("Read less","woo-gutenberg-products-block"),maxLines:3,moreText:Object(c.__)("Read more","woo-gutenberg-products-block")};class E extends i.Component{constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=Object(i.createRef)(),this.reviewSummary=Object(i.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){this.setSummary()}componentDidUpdate(e){e.maxLines===this.props.maxLines&&e.children===this.props.children||this.setState({clampEnabled:null,summary:"."},this.setSummary)}setSummary(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:y(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:c}=this.props,n=e?r:c;if(n)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},n)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:c,isExpanded:n}=this.state;return t?!1===c?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!n||null===c)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":n,dangerouslySetInnerHTML:{__html:r}}),(n||null===c)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!n},t),this.getButton()):null}}v()(E,"defaultProps",k);var R=E;r(175);var C=e=>{let{attributes:t,review:r={}}=e;const{imageType:n,showReviewDate:s,showReviewerName:a,showReviewImage:i,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,m=!Object.keys(r).length>0,p=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:w()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":m,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":m},(u||s||a||i||p)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var n,s;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(s=e.product_image)||void 0===s?void 0:s.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(c.__)("Verified buyer","woo-gutenberg-products-block")},Object(c.__)("Verified buyer","woo-gutenberg-products-block")))}(r,n,m),(u||a||p||s)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},p&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},n=Object(c.sprintf)(
+/* translators: %f is referring to the average rating value */
+Object(c.__)("Rated %f out of 5","woo-gutenberg-products-block"),t),s={__html:Object(c.sprintf)(
+/* translators: %s is referring to the average rating value */
+Object(c.__)("Rated %s out of 5","woo-gutenberg-products-block"),Object(c.sprintf)('%f',t))};return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(o.createElement)("span",{style:r,dangerouslySetInnerHTML:s})))}(r),u&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),a&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),s&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(o.createElement)(R,{maxLines:10,moreText:Object(c.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(c.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(174);var S=e=>{let{attributes:t,reviews:r}=e;const c=Object(l.getSetting)("showAvatars",!0),n=Object(l.getSetting)("reviewRatingsEnabled",!0),s=(c||"product"===t.imageType)&&t.showReviewImage,a=n&&t.showReviewRating,i={...t,showReviewImage:s,showReviewRating:a};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(C,{attributes:i}):r.map((e,t)=>Object(o.createElement)(C,{key:e.id||t,attributes:i,review:e})))},N=r(6),P=r.n(N),L=r(25),T=r.n(L),I=r(54),x=r(28);class A extends i.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:n,reviews:a,totalReviews:i}=this.props;if(t)return Object(o.createElement)(d.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===a.length&&!r)return Object(o.createElement)(n,{attributes:e});const u=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(s.Disabled,null,e.showOrderby&&u&&Object(o.createElement)(p,{readOnly:!0,value:e.orderby}),Object(o.createElement)(S,{attributes:e,reviews:a}),e.showLoadMore&&i>a.length&&Object(o.createElement)(b,{screenReaderLabel:Object(c.__)("Load more reviews","woo-gutenberg-products-block")}))}}var M=(e=>{class t extends i.Component{constructor(){super(...arguments),v()(this,"isPreview",!!this.props.attributes.previewReviews),v()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),v()(this,"isMounted",!1),v()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),v()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(x.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(I.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:c,reviews:n,totalReviews:s}=this.state;return Object(o.createElement)(e,P()({},this.props,{error:r,isLoading:c,reviews:n.slice(0,t),totalReviews:s}))}}v()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(A);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:m,showReviewDate:p,showReviewerName:g,showReviewContent:w,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:_}=Object(I.d)(t.orderby),j=!(w||v||p||g||h||m),f=Object(a.useBlockProps)({className:Object(I.a)(t)});return j?Object(o.createElement)(s.Placeholder,{icon:r,label:i},Object(c.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(M,{attributes:t,categoryIds:d,delayFunction:e=>Object(n.debounce)(e,400),noReviewsPlaceholder:l,orderby:_,order:O,productId:u,reviewsToDisplay:b}))}},15:function(e,t){e.exports=window.wp.apiFetch},150:function(e,t){},151:function(e,t){},173:function(e,t){},174:function(e,t){},175:function(e,t){},176:function(e,t){},18:function(e,t){e.exports=window.wp.url},2:function(e,t){e.exports=window.wc.wcSettings},21:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return d}));var o=r(0),c=r(7),n=r(1);const s={clear:Object(n.__)("Clear all selected items","woo-gutenberg-products-block"),noItems:Object(n.__)("No items found.","woo-gutenberg-products-block"),
+/* Translators: %s search term */
+noResults:Object(n.__)("No results for %s","woo-gutenberg-products-block"),search:Object(n.__)("Search for items","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)(
+/* translators: Number of items selected from list. */
+Object(n._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Search results updated.","woo-gutenberg-products-block")},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=Object(c.groupBy)(e,"parent"),o=Object(c.keyBy)(t,"id"),n=["0"],s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=s(o[e.parent]);return[...t,e.name]},a=e=>e.map(e=>{const t=r[e.id];return n.push(""+e.id),{...e,breadcrumbs:s(o[e.parent]),children:t&&t.length?a(t):[]}}),i=a(r[0]||[]);return Object.entries(r).forEach(e=>{let[t,r]=e;n.includes(t)||i.push(...a(r||[]))}),i},i=(e,t,r)=>{if(!t)return r?a(e):e;const o=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),c=e.map(e=>!!o.test(e.name)&&e).filter(Boolean);return r?a(c,e):c},l=(e,t)=>{if(!t)return e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(r).map((e,r)=>0===r?e:Object(o.createElement)(o.Fragment,{key:r},Object(o.createElement)("strong",null,t),e))},d=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},23:function(e,t,r){"use strict";r.d(t,"o",(function(){return n})),r.d(t,"m",(function(){return s})),r.d(t,"l",(function(){return a})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return m})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return g})),r.d(t,"h",(function(){return w})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return O}));var o,c=r(2);const n=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),s=n.pluginUrl+"images/",a=n.pluginUrl+"build/",i=n.buildPhase,l=null===(o=c.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,d=c.STORE_PAGES.checkout.id,u=c.STORE_PAGES.checkout.permalink,b=c.STORE_PAGES.privacy.permalink,m=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),p=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),g=c.STORE_PAGES.cart.permalink,w=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),h=Object(c.getSetting)("allowedCountries",{}),v=Object(c.getSetting)("shippingStates",{}),O=Object(c.getSetting)("allowedStates",{})},25:function(e,t){e.exports=window.wp.isShallowEqual},27:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return u})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return m})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return g})),r.d(t,"g",(function(){return w})),r.d(t,"a",(function(){return h}));var o=r(18),c=r(15),n=r.n(c),s=r(7),a=r(2),i=r(23);const l=e=>{let{selected:t=[],search:r="",queryArgs:c={}}=e;const a=(e=>{let{selected:t=[],search:r="",queryArgs:c={}}=e;const n=i.o.productCount>100,s={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},a=[Object(o.addQueryArgs)("/wc/store/v1/products",{...s,...c})];return n&&t.length&&a.push(Object(o.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:r,queryArgs:c});return Promise.all(a.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},d=e=>n()({path:"/wc/store/v1/products/"+e}),u=()=>n()({path:"wc/store/v1/products/attributes"}),b=e=>n()({path:`wc/store/v1/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:r}=e;const c=(e=>{let{selected:t=[],search:r}=e;const c=Object(a.getSetting)("limitTags",!1),n=[Object(o.addQueryArgs)("wc/store/v1/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:r})];return c&&t.length&&n.push(Object(o.addQueryArgs)("wc/store/v1/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(c.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id"))},p=e=>n()({path:Object(o.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/v1/products/categories/"+e}),w=e=>n()({path:Object(o.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return s}));var o=r(1),c=r(14);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},s=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(c.decodeEntities)(e.message):Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,r){"use strict";var o=r(0),c=r(4),n=r.n(c);t.a=e=>{let t,{label:r,screenReaderLabel:c,wrapperElement:s,wrapperProps:a={}}=e;const i=null!=r,l=null!=c;return!i&&l?(t=s||"span",a={...a,className:n()(a.className,"screen-reader-text")},Object(o.createElement)(t,a,c)):(t=s||o.Fragment,i&&l&&r!==c?Object(o.createElement)(t,a,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},c)):Object(o.createElement)(t,a,r))}},32:function(e,t){e.exports=window.wp.escapeHtml},33:function(e,t,r){"use strict";var o=r(0),c=r(1),n=r(32);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var o=r(6),c=r.n(o),n=r(0),s=r(21);const a=e=>{let{countLabel:t,className:r,depth:o=0,controlId:a="",item:i,isSelected:l,isSingle:d,onSelect:u,search:b="",...m}=e;const p=null!=t&&void 0!==i.count&&null!==i.count,g=[r,"woocommerce-search-list__item"];g.push("depth-"+o),d&&g.push("is-radio-button"),p&&g.push("has-count");const w=i.breadcrumbs&&i.breadcrumbs.length,h=m.name||"search-list-item-"+a,v=`${h}-${i.id}`;return Object(n.createElement)("label",{htmlFor:v,className:g.join(" ")},d?Object(n.createElement)("input",c()({type:"radio",id:v,name:h,value:i.value,onChange:u(i),checked:l,className:"woocommerce-search-list__item-input"},m)):Object(n.createElement)("input",c()({type:"checkbox",id:v,name:h,value:i.value,onChange:u(i),checked:l,className:"woocommerce-search-list__item-input"},m)),Object(n.createElement)("span",{className:"woocommerce-search-list__item-label"},w?Object(n.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(s.b)(i.breadcrumbs)):null,Object(n.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(s.d)(i.name,b))),!!p&&Object(n.createElement)("span",{className:"woocommerce-search-list__item-count"},t||i.count))};t.b=a},374:function(e,t,r){e.exports=r(484)},484:function(e,t,r){"use strict";r.r(t);var o=r(0),c=r(1),n=r(13),s=r(109),a=r(331),i=r(5),l=r(3),d=r(63),u=r(141),b=()=>Object(o.createElement)(l.Placeholder,{className:"wc-block-reviews-by-category",icon:Object(o.createElement)(s.a,{icon:a.a,className:"block-editor-block-icon"}),label:Object(c.__)("Reviews by Category","woo-gutenberg-products-block")},Object(c.__)("This block lists reviews for products from selected categories. The selected categories do not have any reviews yet, but they will show up here when they do.","woo-gutenberg-products-block")),m=r(102),p=Object(l.withSpokenMessages)(e=>{let{attributes:t,debouncedSpeak:r,setAttributes:n}=e;const{editMode:p,categoryIds:g}=t;if(!g||p)return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(s.a,{icon:a.a,className:"block-editor-block-icon"}),label:Object(c.__)("Reviews by Category","woo-gutenberg-products-block"),className:"wc-block-reviews-by-category"},Object(c.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-reviews__selection"},Object(o.createElement)(d.a,{selected:t.categoryIds,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});n({categoryIds:t})},showReviewCount:!0}),Object(o.createElement)(l.Button,{isPrimary:!0,onClick:()=>{n({editMode:!1}),r(Object(c.__)("Showing Reviews by Category block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))));const w=Object(c.__)("Edit selected categories","woo-gutenberg-products-block");return Object(o.createElement)(o.Fragment,null,Object(m.a)(p,n,w),Object(o.createElement)(i.InspectorControls,{key:"inspector"},Object(o.createElement)(l.PanelBody,{title:Object(c.__)("Category","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(d.a,{selected:t.categoryIds,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});n({categoryIds:t})},isCompact:!0,showReviewCount:!0})),Object(o.createElement)(l.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(l.ToggleControl,{label:Object(c.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:()=>n({showProductName:!t.showProductName})}),Object(m.b)(t,n)),Object(o.createElement)(l.PanelBody,{title:Object(c.__)("List Settings","woo-gutenberg-products-block")},Object(m.c)(t,n))),Object(o.createElement)(u.a,{attributes:t,icon:Object(o.createElement)(s.a,{icon:a.a,className:"block-editor-block-icon"}),name:Object(c.__)("Reviews by Category","woo-gutenberg-products-block"),noReviewsPlaceholder:b}))}),g=r(136),w=r(137),h=r(118);Object(n.registerBlockType)("woocommerce/reviews-by-category",{apiVersion:2,title:Object(c.__)("Reviews by Category","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(s.a,{icon:a.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...h.a,attributes:{...h.a.attributes,categoryIds:[1],showProductName:!0}},attributes:{...g.a,categoryIds:{type:"array",default:[]},showProductName:{type:"boolean",default:!0}},edit:e=>Object(o.createElement)(p,e),save:w.a})},5:function(e,t){e.exports=window.wp.blockEditor},54:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var o=r(15),c=r.n(o),n=r(4),s=r.n(n),a=r(2);const i=e=>{if(Object(a.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>c()({path:"/wc/store/v1/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:c,showReviewerName:n,showReviewContent:a,showProductName:i,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return o&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),s()(u,t,{"has-image":l,"has-name":n,"has-date":c,"has-rating":d,"has-content":a,"has-product-name":i})},u=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:c,reviewsOnPageLoad:n,reviewsOnLoadMore:s,showLoadMore:a,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":n,"data-reviews-on-load-more":s,"data-show-load-more":a,"data-show-orderby":i};return c&&(l["data-product-id"]=c),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},63:function(e,t,r){"use strict";var o=r(6),c=r.n(o),n=r(0),s=r(1),a=r(35),i=r(94),l=r(3),d=r(10),u=r(27),b=r(28),m=Object(d.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(u.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:o}=this.state;return Object(n.createElement)(e,c()({},this.props,{error:t,isLoading:r,categories:o}))}},"withCategories"),p=r(33),g=r(4),w=r.n(g);r(99);const h=e=>{let{categories:t,error:r,isLoading:o,onChange:d,onOperatorChange:u,operator:b,selected:m,isCompact:g,isSingle:h,showReviewCount:v}=e;const O={clear:Object(s.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(s.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(s.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(s.sprintf)(
+/* translators: %d is the count of selected categories. */
+Object(s._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(s.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(p.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:m.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:d,renderItem:e=>{const{item:t,search:r,depth:o=0}=e,i=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,l=v?Object(s.sprintf)(
+/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */
+Object(s._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),i,t.review_count):Object(s.sprintf)(
+/* translators: %1$s is the item name, %2$d is the count of products for the item. */
+Object(s._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),i,t.count),d=v?Object(s.sprintf)(
+/* translators: %d is the count of reviews. */
+Object(s._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(s.sprintf)(
+/* translators: %d is the count of products. */
+Object(s._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(a.a,c()({className:w()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===o&&0!==t.parent})},e,{countLabel:d,"aria-label":l}))},messages:O,isCompact:g,isHierarchical:!0,isSingle:h}),!!u&&Object(n.createElement)("div",{hidden:m.length<2},Object(n.createElement)(l.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(s.__)("Display products matching","woo-gutenberg-products-block"),help:Object(s.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:b,onChange:u,options:[{label:Object(s.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(s.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};h.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=m(h)},7:function(e,t){e.exports=window.lodash},73:function(e,t,r){"use strict";var o=r(0),c=r(1),n=r(109),s=r(168),a=r(4),i=r.n(a),l=r(3),d=r(33);r(110),t.a=e=>{let{className:t,error:r,isLoading:a=!1,onRetry:u}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(n.a,{icon:s.a}),label:Object(c.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(o.createElement)(d.a,{error:r}),u&&Object(o.createElement)(o.Fragment,null,a?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(c.__)("Retry","woo-gutenberg-products-block"))))}},8:function(e,t){e.exports=window.React},94:function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var o=r(6),c=r.n(o),n=r(0),s=r(1),a=r(3),i=r(109),l=r(509),d=r(4),u=r.n(d),b=r(10),m=r(21),p=r(35),g=r(508),w=r(14);const h=e=>{let{id:t,label:r,popoverContents:o,remove:c,screenReaderLabel:l,className:d=""}=e;const[m,p]=Object(n.useState)(!1),v=Object(b.useInstanceId)(h);if(l=l||r,!r)return null;r=Object(w.decodeEntities)(r);const O=u()("woocommerce-tag",d,{"has-remove":!!c}),_="woocommerce-tag__label-"+v,j=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},l),Object(n.createElement)("span",{"aria-hidden":"true"},r));return Object(n.createElement)("span",{className:O},o?Object(n.createElement)(a.Button,{className:"woocommerce-tag__text",id:_,onClick:()=>p(!0)},j):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:_},j),o&&m&&Object(n.createElement)(a.Popover,{onClose:()=>p(!1)},o),c&&Object(n.createElement)(a.Button,{className:"woocommerce-tag__remove",onClick:c(t),label:Object(s.sprintf)(// Translators: %s label.
+Object(s.__)("Remove %s","woo-gutenberg-products-block"),r),"aria-describedby":_},Object(n.createElement)(i.a,{icon:g.a,size:20,className:"clear-icon"})))};var v=h;const O=e=>Object(n.createElement)(p.b,e),_=e=>{const{list:t,selected:r,renderItem:o,depth:s=0,onSelect:a,instanceId:i,isSingle:l,search:d}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const u=-1!==r.findIndex(e=>{let{id:r}=e;return r===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,o({item:t,isSelected:u,onSelect:a,isSingle:l,search:d,depth:s,controlId:i})),Object(n.createElement)(_,c()({},e,{list:t.children,depth:s+1})))})):null},j=e=>{let{isLoading:t,isSingle:r,selected:o,messages:c,onChange:i,onRemove:l}=e;if(t||r||!o)return null;const d=o.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,c.selected(d)),d>0?Object(n.createElement)(a.Button,{isLink:!0,isDestructive:!0,onClick:()=>i([]),"aria-label":c.clear},Object(s.__)("Clear all","woo-gutenberg-products-block")):null),d>0?Object(n.createElement)("ul",null,o.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(v,{label:e.name,id:e.id,remove:l})))):null)},f=e=>{let{filteredList:t,search:r,onSelect:o,instanceId:c,...a}=e;const{messages:d,renderItem:u,selected:b,isSingle:m}=a,p=u||O;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(i.a,{icon:l.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},r?Object(s.sprintf)(d.noResults,r):d.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(_,{list:t,selected:b,renderItem:p,onSelect:o,instanceId:c,isSingle:m,search:r}))},y=e=>{const{className:t="",isCompact:r,isHierarchical:o,isLoading:s,isSingle:i,list:l,messages:d=m.a,onChange:p,onSearch:g,selected:w,debouncedSpeak:h}=e,[v,O]=Object(n.useState)(""),_=Object(b.useInstanceId)(y),k=Object(n.useMemo)(()=>({...m.a,...d}),[d]),E=Object(n.useMemo)(()=>Object(m.c)(l,v,o),[l,v,o]);Object(n.useEffect)(()=>{h&&h(k.updated)},[h,k]),Object(n.useEffect)(()=>{"function"==typeof g&&g(v)},[v,g]);const R=Object(n.useCallback)(e=>()=>{i&&p([]);const t=w.findIndex(t=>{let{id:r}=t;return r===e});p([...w.slice(0,t),...w.slice(t+1)])},[i,w,p]),C=Object(n.useCallback)(e=>()=>{-1===w.findIndex(t=>{let{id:r}=t;return r===e.id})?p(i?[e]:[...w,e]):R(e.id)()},[i,R,p,w]);return Object(n.createElement)("div",{className:u()("woocommerce-search-list",t,{"is-compact":r})},Object(n.createElement)(j,c()({},e,{onRemove:R,messages:k})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(a.TextControl,{label:k.search,type:"search",value:v,onChange:e=>O(e)})),s?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(a.Spinner,null)):Object(n.createElement)(f,c()({},e,{search:v,filteredList:E,messages:k,onSelect:C,instanceId:_})))};Object(a.withSpokenMessages)(y)},99:function(e,t){}});
\ No newline at end of file
diff --git a/build/reviews-by-product.asset.php b/build/reviews-by-product.asset.php
new file mode 100644
index 00000000000..745e6f3aab2
--- /dev/null
+++ b/build/reviews-by-product.asset.php
@@ -0,0 +1 @@
+ array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'd3d882f9fccdeb807f7410c7cddc6063');
\ No newline at end of file
diff --git a/build/reviews-by-product.js b/build/reviews-by-product.js
new file mode 100644
index 00000000000..71399bbbc13
--- /dev/null
+++ b/build/reviews-by-product.js
@@ -0,0 +1,24 @@
+this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-product"]=function(e){function t(t){for(var o,s,a=t[0],i=t[1],l=t[2],u=0,b=[];uObject(o.createElement)(c.BlockControls,null,Object(o.createElement)(a.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),l=(e,t)=>{const r=Object(s.getSetting)("showAvatars",!0),c=Object(s.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!c&&Object(o.createElement)(a.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(a.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(a.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(a.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(a.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.__experimentalToggleGroupControl,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,onChange:e=>t({imageType:e})},Object(o.createElement)(a.__experimentalToggleGroupControlOption,{value:"reviewer",label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block")}),Object(o.createElement)(a.__experimentalToggleGroupControlOption,{value:"product",label:Object(n.__)("Product","woo-gutenberg-products-block")})),"reviewer"===e.imageType&&!r&&Object(o.createElement)(a.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(a.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(a.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(a.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(a.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},107:function(e,t,r){"use strict";var o=r(6),n=r.n(o),c=r(0),s=r(1),a=r(7),i=r(35),l=r(94),d=r(10),u=Object(d.createHigherOrderComponent)(e=>{class t extends c.Component{render(){const{selected:t}=this.props,r=null==t;return Object(c.createElement)(e,n()({},this.props,{selected:r?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),b=r(202),m=r(24),p=r.n(m),w=r(25),g=r.n(w),h=r(27),v=r(28),O=Object(d.createHigherOrderComponent)(e=>{class t extends c.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,variations:{}}),p()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const o=this.getExpandedProduct();if(!o||r[o])return;const n=e.find(e=>e.id===o);n.variations&&0!==n.variations.length?(this.setState({loading:!0}),Object(h.g)(o).then(e=>{const t=e.map(e=>({...e,parent:o}));this.setState({variations:{...this.state.variations,[o]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(v.a)(e);this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:o}=this.props;o&&(!g()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:r}=t;return r===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let o=t&&t.length?t[0]:null;return o?this.prevSelectedItem=o:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(o=this.prevSelectedItem)),!e&&o?this.isProductId(o)?o:this.findParentProduct(o):null}render(){const{error:t,isLoading:r}=this.props,{error:o,loading:s,variations:a}=this.state;return Object(c.createElement)(e,n()({},this.props,{error:o||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:a,variationsLoading:s}))}}return p()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),j=r(33),_=r(4),f=r.n(_),y=r(96);r(149);const k={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},E=e=>{let{expandedProduct:t,error:r,instanceId:o,isCompact:d,isLoading:u,onChange:b,onSearch:m,products:p,renderItem:w,selected:g,showVariations:h,variations:v,variationsLoading:O}=e;if(r)return Object(c.createElement)(j.a,{error:r});const _=[...p,...v&&v[t]?v[t]:[]];return Object(c.createElement)(l.a,{className:"woocommerce-products",list:_,isCompact:d,isLoading:u,isSingle:!0,selected:_.filter(e=>{let{id:t}=e;return g.includes(t)}),onChange:b,renderItem:w||(h?e=>{const{item:t,search:r,depth:l=0,isSelected:d,onSelect:b}=e,m=t.variations&&Array.isArray(t.variations)?t.variations.length:0,p=f()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+l,"has-count",{"is-searching":r.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":m>0});if(!t.breadcrumbs.length)return Object(c.createElement)(y.a,n()({},e,{className:f()(p,{"is-selected":d}),isSelected:d,item:t,onSelect:()=>()=>{b(t)()},isLoading:u||O,countLabel:t.variations.length>0?Object(s.sprintf)(
+/* translators: %1$d is the number of variations of a product product. */
+Object(s.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+o,"aria-label":Object(s.sprintf)(
+/* translators: %1$s is the product name, %2$d is the number of variations of that product. */
+Object(s._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const w=Object(a.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(c.createElement)(i.a,n()({},w,{className:p,name:"variations-"+o}))}:null),onSearch:m,messages:k,isHierarchical:!0})};E.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=u(Object(b.a)(O(Object(d.withInstanceId)(E))))},11:function(e,t){e.exports=window.wp.primitives},110:function(e,t){},116:function(e,t,r){"use strict";var o=r(0),n=r(4),c=r.n(n),s=r(30),a=r(10);r(151),t.a=Object(a.withInstanceId)(e=>{let{className:t,instanceId:r,label:n="",onChange:a,options:i,screenReaderLabel:l,value:d}=e;const u="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(s.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:u}}),Object(o.createElement)("select",{id:u,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:a,value:d},i&&i.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},118:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(23);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`
${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}
\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
+/* translators: An example person name used for the block previews. */
+reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`
${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}