(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[38,4],{105:function(e,t,n){"use strict";var a=n(1),c=(n(10),n(6)),r=n.n(c),o=(n(181),n(138));t.a=function(e){var t=e.children,n=e.className,c=e.screenReaderLabel,i=e.showSpinner,s=void 0!==i&&i,l=e.isLoading,u=void 0===l||l;return React.createElement("div",{className:r()(n,{"wc-block-components-loading-mask":u})},u&&s&&React.createElement(o.a,null),React.createElement("div",{className:r()({"wc-block-components-loading-mask__children":u}),"aria-hidden":u},t),u&&React.createElement("span",{className:"screen-reader-text"},c||Object(a.__)("Loading…",'woocommerce')))}},106:function(e,t,n){"use strict";var a=n(6),c=n.n(a);n(184),t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:c()("wc-block-components-product-badge",n)},t)}},138:function(e,t,n){"use strict";n(180),t.a=function(){return React.createElement("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}},140:function(e,t,n){"use strict";var a=n(4),c=n.n(a),r=n(1),o=n(69),i=n(6),s=n.n(i),l=(n(10),n(58)),u=n(0),p=(n(183),function(e){var t=e.currency,n=e.maxPrice,a=e.minPrice,c=e.priceClassName,i=e.priceStyle;return React.createElement(React.Fragment,null,React.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",'woocommerce'),Object(l.formatPrice)(a),Object(l.formatPrice)(n))),React.createElement("span",{"aria-hidden":!0},React.createElement(o.a,{className:s()("wc-block-components-product-price__value",c),currency:t,value:a,style:i})," — ",React.createElement(o.a,{className:s()("wc-block-components-product-price__value",c),currency:t,value:n,style:i})))}),d=function(e){var t=e.currency,n=e.regularPriceClassName,a=e.regularPriceStyle,c=e.regularPrice,i=e.priceClassName,l=e.priceStyle,u=e.price;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(r.__)("Previous price:",'woocommerce')),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("del",{className:s()("wc-block-components-product-price__regular",n),style:a},e)},value:c}),React.createElement("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:",'woocommerce')),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:l},e)},value:u}))};t.a=function(e){var t=e.align,n=e.className,a=e.currency,r=e.format,i=void 0===r?"":r,l=e.maxPrice,m=void 0===l?null:l,b=e.minPrice,g=void 0===b?null:b,f=e.price,v=void 0===f?null:f,h=e.priceClassName,O=e.priceStyle,R=e.regularPrice,_=e.regularPriceClassName,E=e.regularPriceStyle,y=s()(n,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));i.includes("")||(i="",console.error("Price formats need to include the `` tag."));var j=R&&v!==R,k=React.createElement("span",{className:s()("wc-block-components-product-price__value",h)});return j?k=React.createElement(d,{currency:a,price:v,priceClassName:h,priceStyle:O,regularPrice:R,regularPriceClassName:_,regularPriceStyle:E}):null!==g&&null!==m?k=React.createElement(p,{currency:a,maxPrice:m,minPrice:g,priceClassName:h,priceStyle:O}):null!==v&&(k=React.createElement(o.a,{className:s()("wc-block-components-product-price__value",h),currency:a,value:v,style:O})),React.createElement("span",{className:y},Object(u.createInterpolateElement)(i,{price:k}))}},143:function(e,t,n){"use strict";var a=n(14),c=n.n(a),r=n(23),o=n.n(r),i=n(76),s=n(6),l=n.n(s),u=n(138),p=(n(251),["className","showSpinner","children"]);t.a=function(e){var t=e.className,n=e.showSpinner,a=void 0!==n&&n,r=e.children,s=o()(e,p),d=l()("wc-block-components-button",t,{"wc-block-components-button--loading":a});return React.createElement(i.a,c()({className:d},s),a&&React.createElement(u.a,null),React.createElement("span",{className:"wc-block-components-button__text"},r))}},147:function(e,t){},149:function(e,t){},150:function(e,t,n){"use strict";var a=n(14),c=n.n(a),r=n(23),o=n.n(r),i=n(28),s=n(6),l=n.n(s),u=(n(182),["className","disabled","name","permalink"]);t.a=function(e){var t=e.className,n=void 0===t?"":t,a=e.disabled,r=void 0!==a&&a,s=e.name,p=e.permalink,d=void 0===p?"":p,m=o()(e,u),b=l()("wc-block-components-product-name",n);return r?React.createElement("span",c()({className:b},m,{dangerouslySetInnerHTML:{__html:Object(i.decodeEntities)(s)}})):React.createElement("a",c()({className:b,href:d},m,{dangerouslySetInnerHTML:{__html:Object(i.decodeEntities)(s)}}))}},151:function(e,t,n){"use strict";var a=n(0),c=n(113),r=n(97),o=function(e){var t=e.indexOf("
");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",a=i(e),c=a.split(" ").splice(0,t).join(" ");return Object(r.autop)(s(c,n))},u=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),o=c.slice(0,t);if(n)return Object(r.autop)(s(o,a));var l=o.match(/([\s]+)/g),u=l?l.length:0,p=c.slice(0,t+u);return Object(r.autop)(s(p,a))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,s=e.countType,p=void 0===s?"words":s,d=e.className,m=void 0===d?"":d,b=Object(a.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",a=Object(r.autop)(e),i=Object(c.count)(a,n);if(i<=t)return a;var s=o(a),p=Object(c.count)(s,n);return p<=t?s:"words"===n?l(s,t):u(s,t,"characters_including_spaces"===n)}(t,i,p)}),[t,i,p]);return React.createElement(a.RawHTML,{className:m},b)}},174:function(e,t,n){"use strict";t.a=function(e){var t=e.label,n=e.secondaryLabel,a=e.description,c=e.secondaryDescription,r=e.id;return React.createElement("div",{className:"wc-block-components-radio-control__option-layout"},React.createElement("div",{className:"wc-block-components-radio-control__label-group"},t&&React.createElement("span",{id:r&&"".concat(r,"__label"),className:"wc-block-components-radio-control__label"},t),n&&React.createElement("span",{id:r&&"".concat(r,"__secondary-label"),className:"wc-block-components-radio-control__secondary-label"},n)),React.createElement("div",{className:"wc-block-components-radio-control__description-group"},a&&React.createElement("span",{id:r&&"".concat(r,"__description"),className:"wc-block-components-radio-control__description"},a),c&&React.createElement("span",{id:r&&"".concat(r,"__secondary-description"),className:"wc-block-components-radio-control__secondary-description"},c)))}},179:function(e,t,n){"use strict";var a=n(4),c=n.n(a),r=n(6),o=n.n(r),i=n(174);t.a=function(e){var t,n=e.checked,a=e.name,r=e.onChange,s=e.option,l=s.value,u=s.label,p=s.description,d=s.secondaryLabel,m=s.secondaryDescription;return React.createElement("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":n}),htmlFor:"".concat(a,"-").concat(l)},React.createElement("input",{id:"".concat(a,"-").concat(l),className:"wc-block-components-radio-control__input",type:"radio",name:a,value:l,onChange:function(e){return r(e.target.value)},checked:n,"aria-describedby":o()((t={},c()(t,"".concat(a,"-").concat(l,"__label"),u),c()(t,"".concat(a,"-").concat(l,"__secondary-label"),d),c()(t,"".concat(a,"-").concat(l,"__description"),p),c()(t,"".concat(a,"-").concat(l,"__secondary-description"),m),t))}),React.createElement(i.a,{id:"".concat(a,"-").concat(l),label:u,secondaryLabel:d,description:p,secondaryDescription:m}))}},180:function(e,t){},181:function(e,t){},182:function(e,t){},183:function(e,t){},184:function(e,t){},185:function(e,t){},186:function(e,t){},194:function(e,t,n){"use strict";var a=n(14),c=n.n(a),r=n(23),o=n.n(r),i=(n(10),n(6)),s=n.n(i),l=n(1),u=n(152),p=n(216),d=(n(149),["text","screenReaderText","element","className","radius","children"]),m=function(e){var t=e.text,n=e.screenReaderText,a=void 0===n?"":n,r=e.element,i=void 0===r?"li":r,l=e.className,u=void 0===l?"":l,p=e.radius,m=void 0===p?"small":p,b=e.children,g=void 0===b?null:b,f=o()(e,d),v=i,h=s()(u,"wc-block-components-chip","wc-block-components-chip--radius-"+m),O=Boolean(a&&a!==t);return React.createElement(v,c()({className:h},f),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},a),g)},b=["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"];t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,a=e.className,r=void 0===a?"":a,i=e.disabled,d=void 0!==i&&i,g=e.onRemove,f=void 0===g?function(){}:g,v=e.removeOnAnyClick,h=void 0!==v&&v,O=e.text,R=e.screenReaderText,_=void 0===R?"":R,E=o()(e,b),y=h?"span":"button";if(!n){var j=_&&"string"==typeof _?_:O;n="string"!=typeof j?
/* translators: Remove chip. */
Object(l.__)("Remove",'woocommerce'):Object(l.sprintf)(
/* translators: %s text of the chip to remove. */
Object(l.__)('Remove "%s"','woocommerce'),j)}var k={"aria-label":n,disabled:d,onClick:f,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||f()}},w=h?k:{},C=h?{"aria-hidden":!0}:k;return React.createElement(m,c()({},E,w,{className:s()(r,"is-removable"),element:h?"button":E.element,screenReaderText:_,text:O}),React.createElement(y,c()({className:"wc-block-components-chip__remove"},C),React.createElement(u.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},206:function(e,t){},207:function(e,t,n){"use strict";var a=n(6),c=n.n(a),r=n(24),o=n(179);n(252),t.a=Object(r.withInstanceId)((function(e){var t=e.className,n=e.instanceId,a=e.id,r=e.selected,i=e.onChange,s=e.options,l=void 0===s?[]:s,u=a||n;return l.length&&React.createElement("div",{className:c()("wc-block-components-radio-control",t)},l.map((function(e){return React.createElement(o.a,{key:"".concat(u,"-").concat(e.value),name:"radio-control-".concat(u),checked:e.value===r,option:e,onChange:function(t){i(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))},208:function(e,t){},209:function(e,t,n){"use strict";var a=n(23),c=n.n(a),r=n(1),o=n(0),i=n(33),s=n(105),l=n(26),u=n(326),p=n(32),d=n(36),m=n(6),b=n.n(m),g=n(28),f=n(51),v=n(5),h=n.n(v),O=n(25),R=n.n(O),_=n(118),E=n(52),y=function(e){var t;return null===(t=e.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id},j=n(207),k=n(174),w=n(58),C=n(69),N=n(2),S=function(e){var t=Object(N.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(g.decodeEntities)(e.name),value:e.rate_id,description:React.createElement(React.Fragment,null,Number.isFinite(t)&&React.createElement(C.a,{currency:Object(w.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(g.decodeEntities)(e.delivery_time))}},x=function(e){var t=e.className,n=e.noResultsMessage,a=e.onSelectRate,c=e.rates,r=e.renderOption,o=void 0===r?S:r,i=e.selected;if(0===c.length)return n;if(c.length>1)return React.createElement(j.a,{className:t,onChange:function(e){a(e)},selected:i,options:c.map(o)});var s=o(c[0]),l=s.label,u=s.secondaryLabel,p=s.description,d=s.secondaryDescription;return React.createElement(k.a,{label:l,secondaryLabel:u,description:p,secondaryDescription:d})},P=(n(253),function(e){var t=e.packageId,n=e.className,a=e.noResultsMessage,c=e.renderOption,i=e.packageData,s=e.collapsible,u=void 0!==s&&s,p=e.collapse,d=void 0!==p&&p,m=e.showItems,v=void 0!==m&&m,O=function(e,t){var n=Object(E.a)().dispatchCheckoutEvent,a=Object(_.a)(),c=a.selectShippingRate,r=a.isSelectingRate,i=Object(o.useState)((function(){return y(t)})),s=h()(i,2),l=s[0],u=s[1],p=Object(o.useRef)(t);return Object(o.useEffect)((function(){R()(p.current,t)||(p.current=t,u(y(t)))}),[t]),{selectShippingRate:Object(o.useCallback)((function(t){u(t),c(t,e),n("set-selected-shipping-rate",{shippingRateId:t})}),[e,c,n]),selectedShippingRate:l,isSelectingRate:r}}(t,i.shipping_rates),j=O.selectShippingRate,k=O.selectedShippingRate,w=React.createElement(React.Fragment,null,(v||u)&&React.createElement("div",{className:"wc-block-components-shipping-rates-control__package-title"},i.name),v&&React.createElement("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(i.items).map((function(e){var t=Object(g.decodeEntities)(e.name),n=e.quantity;return React.createElement("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},React.createElement(f.a,{label:n>1?"".concat(t," × ").concat(n):"".concat(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)",n,'woocommerce'),t,n)}))})))),C=React.createElement(x,{className:n,noResultsMessage:a,rates:i.shipping_rates,onSelectRate:j,selected:k,renderOption:c});return u?React.createElement(l.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!d,title:w},C):React.createElement("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},w,C)}),I=["package_id"],L=["extensions","receiveCart"],D=function(e){var t=e.packages,n=e.collapse,a=e.showItems,r=e.collapsible,o=e.noResultsMessage,i=e.renderOption;return t.length?React.createElement(React.Fragment,null,t.map((function(e){var t=e.package_id,s=c()(e,I);return React.createElement(P,{key:t,packageId:t,packageData:s,collapsible:r,collapse:n,showItems:a,noResultsMessage:o,renderOption:i})}))):null};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,a=e.className,m=e.collapsible,b=void 0!==m&&m,g=e.noResultsMessage,f=e.renderOption;Object(o.useEffect)((function(){if(!n){var e=Object(u.a)(t),a=Object(u.b)(t);1===e?Object(i.speak)(Object(r.sprintf)(
/* translators: %d number of shipping options found. */
Object(r._n)("%d shipping option was found.","%d shipping options were found.",a,'woocommerce'),a)):Object(i.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,'woocommerce'),e)+" "+Object(r.sprintf)(
/* translators: %d number of shipping options available. */
Object(r._n)("%d shipping option was found","%d shipping options were found",a,'woocommerce'),a))}}),[n,t]);var v=Object(p.a)(),h=v.extensions,O=(v.receiveCart,{className:a,collapsible:b,noResultsMessage:g,renderOption:f,extensions:h,cart:c()(v,L),components:{ShippingRatesControlPackage:P}}),R=Object(d.a)().isEditor;return React.createElement(s.a,{isLoading:n,screenReaderLabel:Object(r.__)("Loading shipping rates…",'woocommerce'),showSpinner:!0},R?React.createElement(D,{packages:t,noResultsMessage:g,renderOption:f}):React.createElement(React.Fragment,null,React.createElement(l.ExperimentalOrderShippingPackages.Slot,O),React.createElement(l.ExperimentalOrderShippingPackages,null,React.createElement(D,{packages:t,noResultsMessage:g,renderOption:f}))))}},214:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var a=n(4),c=n.n(a),r=n(1),o=n(11),i=n(8),s=n(28),l=n(32),u=n(0),p=n(226);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function m(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;r.current.forEach((function(t){null!==e&&t.status!==e||a(t.id)}))},removeSnackbarNotice:a}}),[a]),i=Object(u.useMemo)((function(){return{addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(e,t)}}}),[n]);return m(m(m({notices:t},o),i),{},{setIsSuppressed:c})}().addSnackbarNotice,v=Object(b.b)().setValidationErrors;return function(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],t=L.current||null;if(t){t.value=t.value.trim();var n=t.checkValidity();n?A(B):F(o()({},B,{message:t.validationMessage||Object(p.__)("Invalid value.",'woocommerce'),hidden:e}))}}),[A,B,F]);Object(d.useEffect)((function(){var e;P&&(R&&(null===(e=L.current)||void 0===e||e.focus()),I(!1))}),[R,P,I]),Object(d.useEffect)((function(){P&&(m&&$(),I(!1))}),[P,I,m,$]),Object(d.useEffect)((function(){U&&$()}),[U,$]),Object(d.useEffect)((function(){return function(){A(B)}}),[A,B]);var z=M(B)||{};Object(O.c)(C)&&""!==C&&(z.message=C);var W=z.message&&!z.hidden,H=k&&W&&V(B)?V(B):r;return React.createElement(y,c()({className:b()(t,{"has-error":W}),"aria-invalid":!0===W,id:q,onBlur:function(){$(!1)},feedback:k&&React.createElement(v.a,{errorMessage:C,propertyName:B}),ref:L,onChange:function(e){T(B),_(e)},ariaDescribedBy:H},N))}))},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));var a=function(e){return e.length},c=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},332:function(e,t,n){"use strict";var a=n(1),c=n(105),r=n(194),o=(n(10),n(26)),i=n(2),s=(n(256),{context:"summary"});t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,l=e.currency,u=e.isRemovingCoupon,p=e.removeCoupon,d=e.values,m=d.total_discount,b=d.total_discount_tax,g=parseInt(m,10);if(!g&&0===n.length)return null;var f=parseInt(b,10),v=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+f:g,h=Object(o.__experimentalApplyCheckoutFilter)({arg:s,filterName:"coupons",defaultValue:n});return React.createElement(o.TotalsItem,{className:"wc-block-components-totals-discount",currency:l,description:0!==h.length&&React.createElement(c.a,{screenReaderLabel:Object(a.__)("Removing coupon…",'woocommerce'),isLoading:u,showSpinner:!1},React.createElement("ul",{className:"wc-block-components-totals-discount__coupon-list"},h.map((function(e){return React.createElement(r.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(a.sprintf)(
/* translators: %s Coupon code. */
Object(a.__)("Coupon: %s",'woocommerce'),e.label),disabled:u,onRemove:function(){p(e.code)},radius:"large",ariaLabel:Object(a.sprintf)(
/* translators: %s is a coupon code. */
Object(a.__)('Remove coupon "%s"','woocommerce'),e.label)})})))),label:v?Object(a.__)("Discount",'woocommerce'):Object(a.__)("Coupons",'woocommerce'),value:v?-1*v:"-"})}},333:function(e,t,n){"use strict";var a=n(5),c=n.n(a),r=n(1),o=n(0),i=n(143),s=n(276),l=n(51),u=n(105),p=(n(10),n(24)),d=n(127),m=n(258),b=n(26);n(257),t.a=Object(p.withInstanceId)((function(e){var t=e.instanceId,n=e.isLoading,a=void 0!==n&&n,p=e.initialOpen,g=void 0!==p&&p,f=e.onSubmit,v=void 0===f?function(){}:f,h=Object(o.useState)(""),O=c()(h,2),R=O[0],_=O[1],E=Object(o.useRef)(!1),y=Object(d.b)(),j=y.getValidationError,k=y.getValidationErrorId,w=j("coupon");Object(o.useEffect)((function(){E.current!==a&&(a||!R||w||_(""),E.current=a)}),[a,R,w]);var C="wc-block-components-totals-coupon__input-".concat(t);return React.createElement(b.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:g,title:React.createElement(l.a,{label:Object(r.__)("Coupon code",'woocommerce'),screenReaderLabel:Object(r.__)("Apply a coupon code",'woocommerce'),htmlFor:C})},React.createElement(u.a,{screenReaderLabel:Object(r.__)("Applying coupon…",'woocommerce'),isLoading:a,showSpinner:!1},React.createElement("div",{className:"wc-block-components-totals-coupon__content"},React.createElement("form",{className:"wc-block-components-totals-coupon__form"},React.createElement(s.a,{id:C,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(r.__)("Enter code",'woocommerce'),value:R,ariaDescribedBy:k(C),onChange:function(e){_(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),React.createElement(i.a,{className:"wc-block-components-totals-coupon__button",disabled:a||!R,showSpinner:a,onClick:function(e){e.preventDefault(),v(R)},type:"submit"},Object(r.__)("Apply",'woocommerce'))),React.createElement(m.a,{propertyName:"coupon",elementId:C}))))}))},334:function(e,t,n){"use strict";var a=n(23),c=n.n(a),r=n(1),o=n(0),i=n(69),s=(n(10),n(26)),l=n(32),u=n(2),p=(n(263),["receiveCart"]);t.a=function(e){var t=e.currency,n=e.values,a=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),d=n.total_price,m=n.total_tax,b=Object(l.a)(),g=(b.receiveCart,c()(b,p)),f=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(r.__)("Total",'woocommerce'),extensions:g.extensions,arg:{cart:g}}),v=parseInt(m,10);return React.createElement(s.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:f,value:parseInt(d,10),description:a&&0!==v&&React.createElement("p",{className:"wc-block-components-totals-footer-item-tax"},Object(o.createInterpolateElement)(Object(r.__)("Including in taxes",'woocommerce'),{TaxAmount:React.createElement(i.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:v})}))})}},335:function(e,t,n){"use strict";var a=n(4),c=n.n(a),r=n(276),o=n(14),i=n.n(o),s=n(83),l=n(0),u=n(1),p=n(28),d=n(6),m=n.n(d),b=n(24),g=n(340),f=n(127),v=n(258),h=n(49),O=(n(261),Object(b.withInstanceId)((function(e){var t=e.id,n=e.className,a=e.label,r=e.onChange,o=e.options,i=e.value,s=e.required,p=void 0!==s&&s,d=e.errorMessage,b=void 0===d?Object(u.__)("Please select a value.",'woocommerce'):d,O=e.errorId,R=e.instanceId,_=void 0===R?"0":R,E=e.autoComplete,y=void 0===E?"off":E,j=Object(f.b)(),k=j.getValidationError,w=j.setValidationErrors,C=j.clearValidationError,N=Object(l.useRef)(null),S=t||"control-"+_,x=O||S,P=k(x)||{message:"",hidden:!1};return Object(l.useEffect)((function(){return!p||i?C(x):w(c()({},x,{message:b,hidden:!0})),function(){C(x)}}),[C,i,x,b,p,w]),React.createElement("div",{id:S,className:m()("wc-block-components-combobox",n,{"is-active":i,"has-error":P.message&&!P.hidden}),ref:N},React.createElement(g.a,{className:"wc-block-components-combobox-control",label:a,onChange:r,onFilterValueChange:function(e){if(e.length){var t=Object(h.b)(N.current)?N.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(N.current)&&N.current.contains(t))return;var n=e.toLocaleUpperCase(),a=o.find((function(e){return e.label.toLocaleUpperCase().startsWith(n)||e.value.toLocaleUpperCase()===n}));a&&r(a.value)}},options:o,value:i||"",allowReset:!1,autoComplete:y,"aria-invalid":P.message&&!P.hidden}),React.createElement(v.a,{propertyName:x}))}))),R=(n(260),function(e){var t=e.className,n=e.countries,a=e.id,c=e.label,r=e.onChange,o=e.value,i=void 0===o?"":o,s=e.autoComplete,d=void 0===s?"off":s,b=e.required,g=void 0!==b&&b,f=e.errorId,v=e.errorMessage,h=void 0===v?Object(u.__)("Please select a country.",'woocommerce'):v,R=Object(l.useMemo)((function(){return Object.keys(n).map((function(e){return{value:e,label:Object(p.decodeEntities)(n[e])}}))}),[n]);return React.createElement("div",{className:m()(t,"wc-block-components-country-input")},React.createElement(O,{id:a,label:c,onChange:r,options:R,value:i,errorId:f,errorMessage:h,required:g,autoComplete:d}),"off"!==d&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:d,value:i,onChange:function(e){var t=e.target.value.toLocaleUpperCase(),n=R.find((function(e){return 2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t}));r(n?n.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),_=function(e){return React.createElement(R,i()({countries:s.g},e))},E=function(e){return React.createElement(R,i()({countries:s.a},e))},y=(n(262),function(e,t){var n=t.find((function(t){return t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()}));return n?n.value:""}),j=function(e){var t=e.className,n=e.id,a=e.states,c=e.country,o=e.label,i=e.onChange,s=e.autoComplete,d=void 0===s?"off":s,b=e.value,g=void 0===b?"":b,f=e.required,v=void 0!==f&&f,h=a[c],R=Object(l.useMemo)((function(){return h?Object.keys(h).map((function(e){return{value:e,label:Object(p.decodeEntities)(h[e])}})):[]}),[h]),_=Object(l.useCallback)((function(e){i(R.length>0?y(e,R):e)}),[i,R]),E=Object(l.useRef)(g);return Object(l.useEffect)((function(){E.current!==g&&(E.current=g)}),[g]),Object(l.useEffect)((function(){if(R.length>0&&E.current){var e=y(E.current,R);e!==E.current&&_(e)}}),[R,_]),R.length>0?React.createElement(React.Fragment,null,React.createElement(O,{className:m()(t,"wc-block-components-state-input"),id:n,label:o,onChange:_,options:R,value:g,errorMessage:Object(u.__)("Please select a state.",'woocommerce'),required:v,autoComplete:d}),"off"!==d&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:d,value:g,onChange:function(e){return _(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):React.createElement(r.a,{className:t,id:n,label:o,onChange:_,autoComplete:d,value:g,required:v})},k=function(e){return React.createElement(j,i()({states:s.h},e))},w=function(e){return React.createElement(j,i()({states:s.b},e))},C=n(53),N=n(2),S=n(87);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function P(e){for(var t=1;t")},E=function(e){var t=e.cartItem,n=t.images,a=t.low_stock_remaining,o=t.show_backorder_badge,E=t.name,y=t.permalink,j=t.prices,k=t.quantity,w=t.short_description,C=t.description,N=t.item_data,S=t.variation,x=t.totals,P=t.extensions,I=Object(g.a)(),L=(I.receiveCart,c()(I,R)),D=Object(b.useMemo)((function(){return{context:"summary",cartItem:t,cart:L}}),[t,L]),M=Object(p.getCurrencyFromPriceResponse)(j),T=Object(i.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:E,extensions:P,arg:D}),F=Object(d.a)({amount:parseInt(j.raw_prices.regular_price,10),precision:parseInt(j.raw_prices.precision,10)}).convertPrecision(M.minorUnit).getAmount(),A=Object(d.a)({amount:parseInt(j.raw_prices.price,10),precision:parseInt(j.raw_prices.precision,10)}).convertPrecision(M.minorUnit).getAmount(),V=Object(p.getCurrencyFromPriceResponse)(x),U=parseInt(x.line_subtotal,10);Object(m.getSetting)("displayCartPricesIncludingTax",!1)&&(U+=parseInt(x.line_subtotal_tax,10));var q=Object(d.a)({amount:U,precision:V.minorUnit}).getAmount(),B=Object(i.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:P,arg:D,validation:_}),$=Object(i.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:P,arg:D,validation:_});return React.createElement("div",{className:"wc-block-components-order-summary-item"},React.createElement("div",{className:"wc-block-components-order-summary-item__image"},React.createElement("div",{className:"wc-block-components-order-summary-item__quantity"},React.createElement(s.a,{label:k,screenReaderLabel:Object(r.sprintf)(
/* translators: %d number of products of the same type in the cart */
Object(r._n)("%d item","%d items",k,'woocommerce'),k)})),React.createElement(v.a,{image:n.length?n[0]:{}})),React.createElement("div",{className:"wc-block-components-order-summary-item__description"},React.createElement(u.a,{disabled:!0,name:T,permalink:y}),React.createElement(l.a,{currency:M,price:A,regularPrice:F,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:B}),o?React.createElement(f.a,null):!!a&&React.createElement(h.a,{lowStockRemaining:a}),React.createElement(O.a,{shortDescription:w,fullDescription:C,itemData:N,variation:S})),React.createElement("span",{className:"screen-reader-text"},Object(r.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(r._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",k,'woocommerce'),k,T,Object(p.formatPrice)(q,V))),React.createElement("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},React.createElement(l.a,{currency:V,format:$,price:q})))},y=(n(383),function(e){var t=e.cartItems,n=void 0===t?[]:t,a=Object(o.b)(),c=a.isLarge;return a.hasContainerWidth?React.createElement(i.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:React.createElement("span",{className:"wc-block-components-order-summary__button-text"},Object(r.__)("Order summary",'woocommerce')),titleTag:"h2"},React.createElement("div",{className:"wc-block-components-order-summary__content"},n.map((function(e){return React.createElement(E,{key:e.key,cartItem:e})})))):null}),j=n(332),k=n(333),w=n(336),C=n(334),N=n(66),S=n(214),x=["extensions","receiveCart"];t.default=function(e){var t=e.showRateAfterTaxName,n=void 0!==t&&t,a=Object(g.a)(),r=a.cartItems,o=a.cartTotals,s=a.cartCoupons,l=a.cartFees,u=Object(S.a)(),d=u.applyCoupon,b=u.removeCoupon,f=u.isApplyingCoupon,v=u.isRemovingCoupon,h=Object(N.b)().needsShipping,O=Object(p.getCurrencyFromPriceResponse)(o),R=Object(g.a)(),_=R.extensions,E=(R.receiveCart,{extensions:_,cart:c()(R,x)});return React.createElement(React.Fragment,null,React.createElement(i.TotalsWrapper,null,React.createElement(y,{cartItems:r})),React.createElement(i.TotalsWrapper,null,React.createElement(i.Subtotal,{currency:O,values:o}),React.createElement(i.TotalsFees,{currency:O,cartFees:l}),React.createElement(j.a,{cartCoupons:s,currency:O,isRemovingCoupon:v,removeCoupon:b,values:o})),Object(m.getSetting)("couponsEnabled",!0)&&React.createElement(i.TotalsWrapper,null,React.createElement(k.a,{onSubmit:d,initialOpen:!1,isLoading:f})),h&&React.createElement(i.TotalsWrapper,null,React.createElement(w.a,{showCalculator:!1,showRateSelector:!1,values:o,currency:O})),!Object(m.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(o.total_tax,10)>0&&React.createElement(i.TotalsWrapper,null,React.createElement(i.TotalsTaxes,{currency:O,showRateAfterTaxName:n,values:o})),React.createElement(i.TotalsWrapper,null,React.createElement(C.a,{currency:O,values:o})),React.createElement(i.ExperimentalOrderMeta.Slot,E))}},51:function(e,t,n){"use strict";var a=n(4),c=n.n(a),r=n(0),o=n(6),i=n.n(o);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t