Version Description
- 2020-11-05 =
Bug Fixes
- Ensure that accounts are not created via checkout block request if account registration is disabled for WooCommerce (#3371)
Download this release
Release Info
Developer | automattic |
Plugin | WooCommerce Gutenberg Products Block |
Version | 3.7.1 |
Comparing to | |
See all releases |
Code changes from version 3.7.0 to 3.7.1
- assets/js/blocks/cart-checkout/checkout/attributes.js +2 -5
- assets/js/blocks/cart-checkout/checkout/block.js +5 -2
- assets/js/blocks/cart-checkout/checkout/edit.js +3 -1
- assets/js/blocks/cart-checkout/checkout/form/contact-fields-step.js +6 -2
- build/active-filters-frontend.asset.php +1 -1
- build/active-filters.asset.php +1 -1
- build/all-products-frontend.asset.php +1 -1
- build/all-products.asset.php +1 -1
- build/all-reviews.asset.php +1 -1
- build/attribute-filter-frontend.asset.php +1 -1
- build/attribute-filter.asset.php +1 -1
- build/cart-frontend.asset.php +1 -1
- build/cart.asset.php +1 -1
- build/checkout-frontend.asset.php +1 -1
- build/checkout-frontend.js +1 -1
- build/checkout.asset.php +1 -1
- build/checkout.js +1 -1
- build/featured-category.asset.php +1 -1
- build/featured-product.asset.php +1 -1
- build/handpicked-products.asset.php +1 -1
- build/price-filter-frontend.asset.php +1 -1
- build/price-filter.asset.php +1 -1
- build/product-best-sellers.asset.php +1 -1
- build/product-category.asset.php +1 -1
- build/product-new.asset.php +1 -1
- build/product-on-sale.asset.php +1 -1
- build/product-search.asset.php +1 -1
- build/product-tag.asset.php +1 -1
- build/product-top-rated.asset.php +1 -1
- build/products-by-attribute.asset.php +1 -1
- build/reviews-by-category.asset.php +1 -1
- build/reviews-by-product.asset.php +1 -1
- build/reviews-frontend.asset.php +1 -1
- build/single-product-frontend.asset.php +1 -1
- build/single-product.asset.php +1 -1
- readme.txt +6 -1
- src/Assets.php +9 -2
- src/Domain/Services/CreateAccount.php +12 -1
- src/Package.php +1 -1
- vendor/autoload.php +1 -1
- vendor/autoload_packages.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/jetpack_autoload_psr4.php +1 -1
- vendor/jetpack-autoloader/autoload_functions.php +1 -1
- vendor/jetpack-autoloader/class-autoloader-handler.php +1 -1
- vendor/jetpack-autoloader/class-autoloader-locator.php +1 -1
- vendor/jetpack-autoloader/class-manifest-handler.php +1 -1
- vendor/jetpack-autoloader/class-plugins-handler.php +1 -1
- vendor/jetpack-autoloader/class-version-loader.php +1 -1
- vendor/jetpack-autoloader/class-version-selector.php +1 -1
- woocommerce-gutenberg-products-block.php +1 -1
assets/js/blocks/cart-checkout/checkout/attributes.js
CHANGED
@@ -1,10 +1,7 @@
|
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
-
import {
|
5 |
-
HAS_DARK_EDITOR_STYLE_SUPPORT,
|
6 |
-
CHECKOUT_ALLOWS_SIGNUP,
|
7 |
-
} from '@woocommerce/block-settings';
|
8 |
|
9 |
const blockAttributes = {
|
10 |
isPreview: {
|
@@ -22,7 +19,7 @@ const blockAttributes = {
|
|
22 |
},
|
23 |
allowCreateAccount: {
|
24 |
type: 'boolean',
|
25 |
-
default:
|
26 |
},
|
27 |
showApartmentField: {
|
28 |
type: 'boolean',
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
+
import { HAS_DARK_EDITOR_STYLE_SUPPORT } from '@woocommerce/block-settings';
|
|
|
|
|
|
|
5 |
|
6 |
const blockAttributes = {
|
7 |
isPreview: {
|
19 |
},
|
20 |
allowCreateAccount: {
|
21 |
type: 'boolean',
|
22 |
+
default: false,
|
23 |
},
|
24 |
showApartmentField: {
|
25 |
type: 'boolean',
|
assets/js/blocks/cart-checkout/checkout/block.js
CHANGED
@@ -23,7 +23,10 @@ import {
|
|
23 |
Main,
|
24 |
} from '@woocommerce/base-components/sidebar-layout';
|
25 |
import withScrollToTop from '@woocommerce/base-hocs/with-scroll-to-top';
|
26 |
-
import {
|
|
|
|
|
|
|
27 |
import { compareWithWooVersion, getSetting } from '@woocommerce/settings';
|
28 |
|
29 |
/**
|
@@ -102,7 +105,7 @@ const Checkout = ( { attributes, scrollToTop } ) => {
|
|
102 |
! isEditor &&
|
103 |
! customerId &&
|
104 |
! CHECKOUT_ALLOWS_GUEST &&
|
105 |
-
! allowCreateAccount
|
106 |
) {
|
107 |
return (
|
108 |
<>
|
23 |
Main,
|
24 |
} from '@woocommerce/base-components/sidebar-layout';
|
25 |
import withScrollToTop from '@woocommerce/base-hocs/with-scroll-to-top';
|
26 |
+
import {
|
27 |
+
CHECKOUT_ALLOWS_GUEST,
|
28 |
+
CHECKOUT_ALLOWS_SIGNUP,
|
29 |
+
} from '@woocommerce/block-settings';
|
30 |
import { compareWithWooVersion, getSetting } from '@woocommerce/settings';
|
31 |
|
32 |
/**
|
105 |
! isEditor &&
|
106 |
! customerId &&
|
107 |
! CHECKOUT_ALLOWS_GUEST &&
|
108 |
+
! ( allowCreateAccount && CHECKOUT_ALLOWS_SIGNUP )
|
109 |
) {
|
110 |
return (
|
111 |
<>
|
assets/js/blocks/cart-checkout/checkout/edit.js
CHANGED
@@ -17,6 +17,7 @@ import {
|
|
17 |
PRIVACY_URL,
|
18 |
TERMS_URL,
|
19 |
CHECKOUT_PAGE_ID,
|
|
|
20 |
} from '@woocommerce/block-settings';
|
21 |
import { compareWithWooVersion, getAdminLink } from '@woocommerce/settings';
|
22 |
import { createInterpolateElement } from 'wordpress-element';
|
@@ -59,7 +60,8 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
|
|
59 |
// setting initial password.
|
60 |
// Also implicitly gated to feature plugin, because Checkout
|
61 |
// block is gated to plugin
|
62 |
-
const showCreateAccountOption =
|
|
|
63 |
return (
|
64 |
<InspectorControls>
|
65 |
{ currentPostId !== CHECKOUT_PAGE_ID && (
|
17 |
PRIVACY_URL,
|
18 |
TERMS_URL,
|
19 |
CHECKOUT_PAGE_ID,
|
20 |
+
CHECKOUT_ALLOWS_SIGNUP,
|
21 |
} from '@woocommerce/block-settings';
|
22 |
import { compareWithWooVersion, getAdminLink } from '@woocommerce/settings';
|
23 |
import { createInterpolateElement } from 'wordpress-element';
|
60 |
// setting initial password.
|
61 |
// Also implicitly gated to feature plugin, because Checkout
|
62 |
// block is gated to plugin
|
63 |
+
const showCreateAccountOption =
|
64 |
+
CHECKOUT_ALLOWS_SIGNUP && compareWithWooVersion( '4.7.0', '<=' );
|
65 |
return (
|
66 |
<InspectorControls>
|
67 |
{ currentPostId !== CHECKOUT_PAGE_ID && (
|
assets/js/blocks/cart-checkout/checkout/form/contact-fields-step.js
CHANGED
@@ -5,7 +5,10 @@ import { __ } from '@wordpress/i18n';
|
|
5 |
import { FormStep } from '@woocommerce/base-components/cart-checkout';
|
6 |
import { DebouncedValidatedTextInput } from '@woocommerce/base-components/text-input';
|
7 |
import { useCheckoutContext } from '@woocommerce/base-context';
|
8 |
-
import {
|
|
|
|
|
|
|
9 |
import CheckboxControl from '@woocommerce/base-components/checkbox-control';
|
10 |
|
11 |
/**
|
@@ -26,7 +29,8 @@ const ContactFieldsStep = ( {
|
|
26 |
|
27 |
const createAccountUI = ! customerId &&
|
28 |
allowCreateAccount &&
|
29 |
-
CHECKOUT_ALLOWS_GUEST &&
|
|
|
30 |
<CheckboxControl
|
31 |
className="wc-block-checkout__create-account"
|
32 |
label={ __(
|
5 |
import { FormStep } from '@woocommerce/base-components/cart-checkout';
|
6 |
import { DebouncedValidatedTextInput } from '@woocommerce/base-components/text-input';
|
7 |
import { useCheckoutContext } from '@woocommerce/base-context';
|
8 |
+
import {
|
9 |
+
CHECKOUT_ALLOWS_GUEST,
|
10 |
+
CHECKOUT_ALLOWS_SIGNUP,
|
11 |
+
} from '@woocommerce/block-settings';
|
12 |
import CheckboxControl from '@woocommerce/base-components/checkbox-control';
|
13 |
|
14 |
/**
|
29 |
|
30 |
const createAccountUI = ! customerId &&
|
31 |
allowCreateAccount &&
|
32 |
+
CHECKOUT_ALLOWS_GUEST &&
|
33 |
+
CHECKOUT_ALLOWS_SIGNUP && (
|
34 |
<CheckboxControl
|
35 |
className="wc-block-checkout__create-account"
|
36 |
label={ __(
|
build/active-filters-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'd7058b75cdad39f38967456fcf0dff4e');
|
build/active-filters.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '537e0755401381538b4b84483409f986');
|
build/all-products-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '4ce563e1dae43f75660e85aa10c0bf7a');
|
build/all-products.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '6630997a17bfece8059ced03b701b407');
|
build/all-reviews.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'e19cecaf611b1765be5794b516207959');
|
build/attribute-filter-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '9226577280fbac8a364e234ed16a8255');
|
build/attribute-filter.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '42414d6da5c37450939ea9adf90f1a63');
|
build/cart-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '47fea1c07fce8574cb621adc75811e8c');
|
build/cart.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-wordcount'), 'version' => '81ee144d015a1daa0215dfd0e48cb2b9');
|
build/checkout-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => 'c88f7933a6f2254d56bf1ee02c412a27');
|
build/checkout-frontend.js
CHANGED
@@ -11,4 +11,4 @@
|
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
14 |
-
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,c=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,j=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case a:case s:case i:case b:return e;default:switch(e=e&&e.$$typeof){case l:case f:case h:case g:case u:return e;default:return t}}case c:return t}}}function E(e){return w(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Lazy=h,t.Memo=g,t.Portal=c,t.Profiler=s,t.StrictMode=i,t.Suspense=b,t.isAsyncMode=function(e){return E(e)||w(e)===d},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===h},t.isMemo=function(e){return w(e)===g},t.isPortal=function(e){return w(e)===c},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===s||e===i||e===b||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===f||e.$$typeof===y||e.$$typeof===O||e.$$typeof===j||e.$$typeof===v)},t.typeOf=w},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(1),a=n(38),i=n(5),s=n.n(i),u=(n(4),n(150),function(e){var t=e.className,n=e.currency,r=e.maxPrice,o=e.minPrice,c=e.priceClassName,i=e.priceStyle;return React.createElement("span",{className:t},React.createElement(a.a,{className:s()("wc-block-components-product-price__value",c),currency:n,value:o,style:i})," — ",React.createElement(a.a,{className:s()("wc-block-components-product-price__value",c),currency:n,value:r,style:i}))}),l=function(e){var t=e.className,n=e.currency,r=e.regularPriceClassName,o=e.regularPriceStyle,i=e.regularPrice,u=e.priceClassName,l=e.priceStyle,d=e.price;return React.createElement("span",{className:t},React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:n,renderText:function(e){return React.createElement("del",{className:s()("wc-block-components-product-price__regular",r),style:o},e)},value:i}),React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:n,renderText:function(e){return React.createElement("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:l},e)},value:d}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,c=e.maxPrice,i=void 0===c?null:c,d=e.minPrice,p=void 0===d?null:d,f=e.price,b=void 0===f?null:f,m=e.priceClassName,g=e.priceStyle,h=e.regularPrice,v=e.regularPriceClassName,y=e.regularPriceStyle,O=s()(n,"price","wc-block-components-product-price",o()({},"wc-block-components-product-price--align-".concat(t),t));return h&&b!==h?React.createElement(l,{className:O,currency:r,price:b,priceClassName:m,priceStyle:g,regularPrice:h,regularPriceClassName:v,regularPriceStyle:y}):null!==p&&null!==i?React.createElement(u,{className:O,currency:r,maxPrice:i,minPrice:p,priceClassName:m,priceStyle:g}):null!==b?React.createElement("span",{className:O},React.createElement(a.a,{className:s()("wc-block-components-product-price__value",m),currency:r,value:b,style:g})):React.createElement("span",{className:O},React.createElement("span",{className:s()("wc-block-components-product-price__value",m)}))}},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(10),a=n.n(c),i=n(14),s=n.n(i),u=n(0),l=n(97),d=n(36),p=n(77);n(4);t.a=function(e){var t=e.onChange,n=e.value,r=void 0===n?"":n,c=s()(e,["onChange","value"]),i=Object(u.useState)(r),f=a()(i,2),b=f[0],m=f[1],g=Object(p.a)((function(e){t(e)}),400),h=a()(g,1)[0],v=Object(d.a)(h);return Object(u.useEffect)((function(){v(b)}),[v,b]),React.createElement(l.a,o()({onChange:m,value:b},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(95),c=n(79),a=function(e){var t=e.indexOf("</p>");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},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=i(e),o=r.split(" ").splice(0,t).join(" ");return Object(c.autop)(s(o,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",o=i(e),a=o.slice(0,t);if(n)return Object(c.autop)(s(a,r));var u=a.match(/([\s]+)/g),l=u?u.length:0,d=o.slice(0,t+l);return Object(c.autop)(s(d,r))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,s=e.countType,d=void 0===s?"words":s,p=e.className,f=void 0===p?"":p,b=Object(r.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",r=Object(c.autop)(e),i=Object(o.count)(r,n);if(i<=t)return r;var s=a(r),d=Object(o.count)(s,n);return d<=t?s:"words"===n?u(s,t):l(s,t,"characters_including_spaces"===n)}(t,i,d)}),[t,i,d]);return React.createElement(r.RawHTML,{className:f},b)}},,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(4),n(5)),a=n.n(c),i=n(119),s=n(88),u=(n(109),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(s.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=a()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(i.a,o()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",u(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),o=n(77);function c(e,t){return e===t}function a(e,t,n){var a=n&&n.equalityFn?n.equalityFn:c,i=Object(r.useState)(e),s=i[0],u=i[1],l=Object(o.a)(Object(r.useCallback)((function(e){return u(e)}),[]),t,n),d=l[0],p=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){a(b.current,e)||(d(e),b.current=e)}),[e,d,a]),[s,p,f]}},,,,function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},a=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=a);var t=r.useState(e(null)),n=t[0],o=t[1],i=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:i})}),[i]),n]}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(179),a=n(178),i=n(0),s=n(118),u=n(149),l=n(115);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(){var e=Object(s.a)().isEditor,t=Object(u.b)(),n=t.setActivePaymentMethod,r=t.activePaymentMethod,o=t.paymentMethodData,d=t.setPaymentStatus,f=Object(c.a)(),b=Object(a.a)().paymentMethods,m=Object(i.useRef)(r),g=Object(i.useRef)(o),h=Object(i.useCallback)((function(e){return function(){m.current=r,g.current=o,d().started(),n(e)}}),[r,o,n,d]),v=Object(i.useCallback)((function(){n(m.current),g.current.isSavedToken&&d().success(g.current)}),[n,d]),y=Object.keys(b),O=y.length>0?y.map((function(t){var n=e?b[t].edit:b[t].content;return Object(i.isValidElement)(n)?React.createElement("li",{key:t,id:"express-payment-method-".concat(t)},Object(i.cloneElement)(n,p(p({},f),{},{onClick:h(t),onClose:v}))):null})):React.createElement("li",{key:"noneRegistered"},"No registered Payment Methods");return React.createElement(l.a,{isEditor:e},React.createElement("ul",{className:"wc-block-components-express-payment__event-buttons"},O))}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=(n(4),n(5)),s=n.n(i),u=n(1),l=n(127),d=n(126),p=(n(111),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,c=e.element,i=void 0===c?"li":c,u=e.className,l=void 0===u?"":u,d=e.radius,p=void 0===d?"small":d,f=e.children,b=void 0===f?null:f,m=a()(e,["text","screenReaderText","element","className","radius","children"]),g=i,h=s()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),v=Boolean(r&&r!==t);return React.createElement(g,o()({className:h},m),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,c=void 0===r?"":r,i=e.disabled,f=void 0!==i&&i,b=e.onRemove,m=void 0===b?function(){}:b,g=e.removeOnAnyClick,h=void 0!==g&&g,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,j=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=h?"span":"button";if(!n){var E=O&&"string"==typeof O?O:v;n="string"!=typeof E?Object(u.__)("Remove","woo-gutenberg-products-block"):Object(u.sprintf)(Object(u.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var _={"aria-label":n,disabled:f,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=h?_:{},S=h?{"aria-hidden":!0}:_;return React.createElement(p,o()({},j,k,{className:s()(c,"is-removable"),element:h?"button":j.element,screenReaderText:O,text:v}),React.createElement(w,o()({className:"wc-block-components-chip__remove"},S),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:d.a,size:16})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58),o=(n(4),n(151),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,c=void 0===o?"":o,a=e.elementId,i=void 0===a?"":a,s=Object(r.b)(),u=s.getValidationError,l=s.getValidationErrorId;if(!n){var d=u(c)||{};if(!d.message||d.hidden)return null;n=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(i)},n))})},function(e,t,n){"use strict";n.d(t,"b",(function(){return ye})),n.d(t,"a",(function(){return Oe}));var r=n(42),o=n.n(r),c=n(10),a=n.n(c),i=n(0),s=n(3),u=n(194),l=n(80),d=n(118),p=n(6),f=n.n(p);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},h=m(m({},g),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),v={currentStatus:g.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},y={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:g,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},O=n(25),j=n.n(O);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=h.STARTED,k=h.ERROR,S=h.FAILED,R=h.SUCCESS,P=h.PROCESSING,C=h.PRISTINE,x=h.COMPLETE,N=h.SET_REGISTERED_PAYMENT_METHODS,I=h.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,T=h.SET_SHOULD_SAVE_PAYMENT_METHOD,A=function(e){return!("object"!==j()(e)||!e.isSavedToken)},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.paymentMethodData,o=t.shouldSavePaymentMethod,c=t.errorMessage,a=t.paymentMethods;switch(n){case _:return e.currentStatus!==_?E(E({},e),{},{currentStatus:_}):e;case k:return e.currentStatus!==k?E(E({},e),{},{currentStatus:k,errorMessage:c||e.errorMessage}):e;case S:return e.currentStatus!==S?E(E({},e),{},{currentStatus:S,paymentMethodData:r||e.paymentMethodData,errorMessage:c||e.errorMessage}):e;case R:return e.currentStatus!==R?E(E({},e),{},{currentStatus:R,paymentMethodData:r||e.paymentMethodData,hasSavedToken:A(r)}):e;case P:return e.currentStatus!==P?E(E({},e),{},{currentStatus:P,errorMessage:""}):e;case x:return e.currentStatus!==x?E(E({},e),{},{currentStatus:x}):e;case C:return E(E({},v),{},{currentStatus:C,paymentMethods:E({},e.paymentMethods),expressPaymentMethods:E({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case N:return E(E({},e),{},{paymentMethods:a});case I:return E(E({},e),{},{expressPaymentMethods:E(E({},e.expressPaymentMethods),a)});case T:return E(E({},e),{},{shouldSavePaymentMethod:o})}return e},D=h.ERROR,F=h.FAILED,L=h.SUCCESS,V=h.SET_REGISTERED_PAYMENT_METHODS,B=h.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,U=h.SET_SHOULD_SAVE_PAYMENT_METHOD,H=function(e){return{type:e}},z=function(e){var t=e.errorMessage,n=e.paymentMethodData;return{type:F,errorMessage:t,paymentMethodData:n}},q=function(e){var t=e.paymentMethodData;return{type:L,paymentMethodData:t}},W=n(23),K=n.n(W),G=n(51),Y=n.n(G),$=n(1),X=n(35),Z=n(87),J=n(36),Q=n(81),ee=n(8);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e,t,n,r){var o=Object(i.useState)(!1),c=a()(o,2),s=c[0],u=c[1],p=Object(d.a)().isEditor,b=Object(Z.b)(),m=b.selectedRates,g=b.shippingAddress,h=Object(J.a)(m),v=Object(J.a)(n),y=Object(Q.a)(),O=y.cartTotals,j=y.cartNeedsShipping,w=Object(i.useRef)({cartTotals:O,cartNeedsShipping:j,shippingAddress:g,selectedShippingMethods:h}),E=Object(l.a)().addErrorNotice;Object(i.useEffect)((function(){w.current={cartTotals:O,cartNeedsShipping:j,shippingAddress:g,selectedShippingMethods:h}}),[O,j,g,h]);var _=Object(i.useCallback)(Y()(K.a.mark((function n(){var o,c,a,i,s,l,d;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o={},c=function(e){o=ne(ne({},o),{},f()({},e.name,e))},a=0;case 3:if(!(a<v.length)){n.next=24;break}if(i=v[a],s=t[i]){n.next=8;break}return n.abrupt("continue",21);case 8:return n.prev=8,n.next=11,Promise.resolve(s.canMakePayment(w.current));case 11:if(!(l=n.sent)){n.next=16;break}if(!l.error){n.next=15;break}throw new Error(l.error.message);case 15:c(s);case 16:n.next=21;break;case 18:n.prev=18,n.t0=n.catch(8),(ee.j||p)&&(d=Object($.sprintf)(Object($.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),s.paymentMethodId),E("".concat(d," ").concat(n.t0),{context:r,id:"wc-".concat(s.paymentMethodId,"-registration-error")}));case 21:a++,n.next=3;break;case 24:e(o),u(!0);case 26:case"end":return n.stop()}}),n,null,[[8,18]])}))),[E,e,p,r,v,t]);return Object(i.useEffect)((function(){_()}),[_,h]),s},oe=n(116),ce=n(98),ae=n(113),ie=n(195),se="payment_processing",ue=n(196),le=n(58),de=g.STARTED,pe=g.PROCESSING,fe=g.COMPLETE,be=g.PRISTINE,me=g.ERROR,ge=g.FAILED,he=g.SUCCESS,ve=Object(i.createContext)(y),ye=function(){return Object(i.useContext)(ve)},Oe=function(e){var t=e.children,n=Object(oe.b)().setBillingData,r=Object(ce.b)(),c=r.isProcessing,p=r.isIdle,f=r.isCalculating,b=r.hasError,m=Object(u.a)(),h=m.isSuccessResponse,y=m.isErrorResponse,O=m.isFailResponse,j=m.noticeContexts,w=Object(i.useState)(""),E=a()(w,2),_=E[0],k=E[1],S=Object(i.useReducer)(ae.b,{}),R=a()(S,2),P=R[0],C=R[1],x=Object(i.useRef)(P),N=Object(d.a)(),I=N.isEditor,T=N.previewData,A=Object(i.useReducer)(M,v),F=a()(A,2),L=F[0],W=F[1],K=Object(i.useCallback)((function(e){k(e),W(H(be))}),[k,W]),G=Object(i.useCallback)((function(e){W(function(e){return{type:V,paymentMethods:e}}(e))}),[W]),Y=Object(i.useCallback)((function(e){W(function(e){return{type:B,paymentMethods:e}}(e))}),[W]),$=function(e){var t=Object(X.getPaymentMethods)(),n=Object(u.a)().noticeContexts,r=new Set([].concat(o()(ee.s),o()(Object.keys(t))));return re(e,t,Array.from(r),n.PAYMENTS)}(G),J=function(e){var t=Object(X.getExpressPaymentMethods)(),n=Object(u.a)().noticeContexts;return re(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}(Y),Q=Object(le.b)().setValidationErrors,te=Object(l.a)(),ne=te.addErrorNotice,ye=te.removeNotice,Oe=Object(Z.b)().setShippingAddress,je=Object(i.useCallback)((function(e){W({type:U,shouldSavePaymentMethod:e})}),[W]),we=Object(i.useMemo)((function(){return I&&T.previewSavedPaymentMethods?T.previewSavedPaymentMethods:$&&0!==L.paymentMethods.length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(s.getSetting)("customerPaymentMethods",{}),n=Object.keys(t);if(0===n.length)return{};var r={};return n.forEach((function(n){r[n]=t[n].filter((function(t){return Object.keys(e).includes(t.method.gateway)}))})),r}(L.paymentMethods):{}}),[I,T.previewSavedPaymentMethods,$,L.paymentMethods]),Ee=Object(i.useCallback)((function(e){e?ne(e,{context:j.EXPRESS_PAYMENTS,id:"wc-express-payment-error"}):ye("wc-express-payment-error",j.EXPRESS_PAYMENTS)}),[ne,j.EXPRESS_PAYMENTS,ye]);Object(i.useEffect)((function(){x.current=P}),[P]);var _e=Object(i.useMemo)((function(){return(e=C,{onPaymentProcessing:Object(ie.a)(se,e)}).onPaymentProcessing;var e}),[C]),ke=Object(i.useMemo)((function(){return{isPristine:L.currentStatus===be,isStarted:L.currentStatus===de,isProcessing:L.currentStatus===pe,isFinished:[me,ge,he].includes(L.currentStatus),hasError:L.currentStatus===me,hasFailed:L.currentStatus===ge,isSuccessful:L.currentStatus===he}}),[L.currentStatus]),Se=Object(i.useCallback)((function(){return{started:function(){return W(H(de))},processing:function(){return W(H(pe))},completed:function(){return W(H(fe))},error:function(e){return W(function(e){return{type:D,errorMessage:e}}(e))},failed:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r&&n(r),W(z({errorMessage:e,paymentMethodData:t}))},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&n(t),null!==r&&(null==r?void 0:r.address)&&Oe(r.address),W(q({paymentMethodData:e}))}}}),[W,n,Oe]);Object(i.useEffect)((function(){!c||b||f||ke.isFinished||Se().processing()}),[c,b,f,ke.isFinished,Se]),Object(i.useEffect)((function(){p&&!ke.isSuccessful&&W(H(be))}),[p,ke.isSuccessful]),Object(i.useEffect)((function(){b&&ke.isSuccessful&&!L.hasSavedToken&&W(H(be))}),[b,ke.isSuccessful,L.hasSavedToken]),Object(i.useEffect)((function(){var e=Object.keys(L.paymentMethods),t=[].concat(o()(e),o()(Object.keys(L.expressPaymentMethods)));$&&e.length&&k((function(e){return e&&t.includes(e)?e:(W(H(be)),Object.keys(L.paymentMethods)[0])}))}),[$,L.paymentMethods,L.expressPaymentMethods,k]),Object(i.useEffect)((function(){ke.isProcessing&&(ye("wc-payment-error",j.PAYMENTS),Object(ue.b)(x.current,se,{}).then((function(e){var t,n,r;if(h(e))Se().success(null==e||null===(t=e.meta)||void 0===t?void 0:t.paymentMethodData,null==e||null===(n=e.meta)||void 0===n?void 0:n.billingData,null==e||null===(r=e.meta)||void 0===r?void 0:r.shippingData);else if(O(e)){var o,c;e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||j.PAYMENTS}),Se().failed(null==e?void 0:e.message,null==e||null===(o=e.meta)||void 0===o?void 0:o.paymentMethodData,null==e||null===(c=e.meta)||void 0===c?void 0:c.billingData)}else y(e)?(e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||j.PAYMENTS}),Se().error(e.message),Q(null==e?void 0:e.validationErrors)):Se().success()})))}),[ke.isProcessing,Q,Se,ye,j.PAYMENTS,h,O,y,ne]);var Re={setPaymentStatus:Se,currentStatus:ke,paymentStatuses:g,paymentMethodData:L.paymentMethodData,errorMessage:L.errorMessage,activePaymentMethod:_,setActivePaymentMethod:K,onPaymentProcessing:_e,customerPaymentMethods:we,paymentMethods:L.paymentMethods,expressPaymentMethods:L.expressPaymentMethods,paymentMethodsInitialized:$,expressPaymentMethodsInitialized:J,setExpressPaymentError:Ee,shouldSavePayment:L.shouldSavePaymentMethod,setShouldSavePayment:je};return React.createElement(ve.Provider,{value:Re},t)}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return m}));var r=n(6),o=n.n(r),c=n(25),a=n.n(c),i=n(3);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l,d,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(l=i.CURRENCY.symbol,d=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[d]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},f=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,o=e.currency_decimal_separator,c=e.currency_minor_unit,i=e.currency_prefix,s=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof s?s:""}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},m=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=b(t),o=n/Math.pow(10,r.minorUnit),c=r.prefix+o+r.suffix,a=document.createElement("textarea");return a.innerHTML=c,a.value}},,,,,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){},function(e,t){},function(e,t,n){"use strict";var r,o,c,a,i=n(24),s=n(65),u=n(37),l=n(2),d=/<(\/)?(\w+)\s*(\/)?>/g;function p(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}var f=function(e){var t="object"===Object(s.a)(e),n=t&&Object.values(e);return t&&n.length&&n.every((function(e){return Object(l.isValidElement)(e)}))};function b(e){var t=function(){var e=d.exec(r);if(null===e)return["no-more-tokens"];var t=e.index,n=Object(i.a)(e,4),o=n[0],c=n[1],a=n[2],s=n[3],u=o.length;if(s)return["self-closed",a,t,u];if(c)return["closer",a,t,u];return["opener",a,t,u]}(),n=Object(i.a)(t,4),s=n[0],f=n[1],b=n[2],h=n[3],v=a.length,y=b>o?o:null;if(!e[f])return m(),!1;switch(s){case"no-more-tokens":if(0!==v){var O=a.pop(),j=O.leadingTextStart,w=O.tokenStart;c.push(r.substr(j,w))}return m(),!1;case"self-closed":return 0===v?(null!==y&&c.push(r.substr(y,b-y)),c.push(e[f]),o=b+h,!0):(g(p(e[f],b,h)),o=b+h,!0);case"opener":return a.push(p(e[f],b,h,b+h,y)),o=b+h,!0;case"closer":if(1===v)return function(e){var t=a.pop(),n=t.element,o=t.leadingTextStart,i=t.prevOffset,s=t.tokenStart,d=t.children,p=e?r.substr(i,e-i):r.substr(i);p&&d.push(p);null!==o&&c.push(r.substr(o,s-o));c.push(l.cloneElement.apply(void 0,[n,null].concat(Object(u.a)(d))))}(b),o=b+h,!0;var E=a.pop(),_=r.substr(E.prevOffset,b-E.prevOffset);E.children.push(_),E.prevOffset=b+h;var k=p(E.element,E.tokenStart,E.tokenLength,b+h);return k.children=E.children,g(k),o=b+h,!0;default:return m(),!1}}function m(){var e=r.length-o;0!==e&&c.push(r.substr(o,e))}function g(e){var t=e.element,n=e.tokenStart,o=e.tokenLength,c=e.prevOffset,i=e.children,s=a[a.length-1],d=r.substr(s.prevOffset,n-s.prevOffset);d&&s.children.push(d),s.children.push(l.cloneElement.apply(void 0,[t,null].concat(Object(u.a)(i)))),s.prevOffset=c||n+o}t.a=function(e,t){if(r=e,o=0,c=[],a=[],d.lastIndex=0,!f(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(b(t));return l.createElement.apply(void 0,[l.Fragment,null].concat(Object(u.a)(c)))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a}));var r=n(149),o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(r.b)(),n=t.paymentMethods,o=t.expressPaymentMethods,c=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized;return e?{paymentMethods:o,isInitialized:a}:{paymentMethods:n,isInitialized:c}},c=function(){return o()},a=function(){return o(!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(98),o=n(149),c=n(87),a=n(116),i=n(1),s=n(153),u=n(0),l=n(8),d=n(148),p=n(194),f=n(275),b=n(5),m=n.n(b),g=n(50),h=React.createElement(g.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),v=React.createElement(g.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),y=n(238),O=React.createElement(g.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M0 0h24v24H0z"}),React.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"}),React.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"}))),j=n(127),w=(n(176),{bank:h,bill:v,card:y.a,checkPayment:O}),E=function(e){var t=e.icon,n=void 0===t?"":t,r=e.text,o=void 0===r?"":r,c=!!n,a=c&&"string"==typeof n&&w[n],i=m()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return React.createElement("span",{className:i},a?React.createElement(j.a,{srcElement:w[n]}):n,o)},_=n(81),k=n(222),S=function(e,t){var n=[],r=function(t,n){var r=parseInt(e[n],10);return{label:t,value:r,valueWithTax:r+parseInt(e[n+"_tax"],10)}};return n.push(r(Object(i.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(r(Object(i.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(r(Object(i.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({label:Object(i.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(r(Object(i.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=function(){var e=Object(r.b)(),t=e.isCalculating,n=e.isComplete,b=e.isIdle,m=e.isProcessing,g=e.onCheckoutAfterProcessingWithSuccess,h=e.onCheckoutAfterProcessingWithError,v=e.onCheckoutBeforeProcessing,y=e.onSubmit,O=e.customerId,j=Object(o.b)(),w=j.currentStatus,R=j.activePaymentMethod,P=j.onPaymentProcessing,C=j.setExpressPaymentError,x=Object(c.b)(),N=x.shippingErrorStatus,I=x.shippingErrorTypes,T=x.shippingRates,A=x.shippingRatesLoading,M=x.selectedRates,D=x.setSelectedRates,F=x.isSelectingRate,L=x.shippingAddress,V=x.setShippingAddress,B=x.onShippingRateSuccess,U=x.onShippingRateFail,H=x.onShippingRateSelectSuccess,z=x.onShippingRateSelectFail,q=x.needsShipping,W=Object(a.b)().billingData,K=Object(_.a)().cartTotals,G=Object(k.a)().appliedCoupons,Y=Object(p.a)(),$=Y.noticeContexts,X=Y.responseTypes,Z=Object(u.useRef)(S(K,q)),J=Object(u.useRef)({label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)});return Object(u.useEffect)((function(){Z.current=S(K,q),J.current={label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)}}),[K,q]),{checkoutStatus:{isCalculating:t,isComplete:n,isIdle:b,isProcessing:m},paymentStatus:w,shippingStatus:{shippingErrorStatus:N,shippingErrorTypes:I},shippingData:{shippingRates:T,shippingRatesLoading:A,selectedRates:M,setSelectedRates:D,isSelectingRate:F,shippingAddress:L,setShippingAddress:V,needsShipping:q},billing:{billingData:W,cartTotal:J.current,currency:Object(s.c)(K),cartTotalItems:Z.current,displayPricesIncludingTax:l.k,appliedCoupons:G,customerId:O},eventRegistration:{onCheckoutAfterProcessingWithSuccess:g,onCheckoutAfterProcessingWithError:h,onCheckoutBeforeProcessing:v,onShippingRateSuccess:B,onShippingRateFail:U,onShippingRateSelectSuccess:H,onShippingRateSelectFail:z,onPaymentProcessing:P},components:{ValidationInputError:d.a,PaymentMethodIcons:f.a,PaymentMethodLabel:E},emitResponse:{noticeContexts:$,responseTypes:X},onSubmit:y,activePaymentMethod:R,setExpressPaymentError:C}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return p}));var r=n(10),o=n.n(r),c=(n(4),n(0)),a=n(144),i=n.n(a).a,s=n(5),u=n.n(s),l=Object(c.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),d=function(){return Object(c.useContext)(l)},p=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=function(){var e=i(),t=o()(e,2),n=t[0],r=t[1].width,c="";return r>700?c="is-large":r>520?c="is-medium":r>400?c="is-small":r&&(c="is-mobile"),[n,c]}(),a=o()(c,2),s=a[0],d=a[1],p={hasContainerWidth:""!==d,containerClassName:d,isMobile:"is-mobile"===d,isSmall:"is-small"===d,isMedium:"is-medium"===d,isLarge:"is-large"===d};return React.createElement(l.Provider,{value:p},React.createElement("div",{className:u()(r,d)},s,t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n=[];return Object.keys(e).forEach((function(r){if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default})),n}},,,,function(e,t){},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=function(e,t){return!!e.type&&e.type===t},o={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return r(e,o.SUCCESS)},i=function(e){return r(e,o.ERROR)},s=function(e){return r(e,o.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:o,noticeContexts:c,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(113),o=function(e,t){return function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=r.a.addEventCallback(e,n,o);return t(c),function(){t(r.a.removeEventCallback(e,c.id))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f}));var r=n(23),o=n.n(r),c=n(25),a=n.n(c),i=n(51),s=n.n(i);function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(o.a.mark((function e(t,n,r){var c,i,s,l,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,n),i=[],s=u(c),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(r));case 10:f=e.sent,"object"===a()(f)&&i.push(f),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,n,r){return e.apply(this,arguments)}}(),f=function(){var e=s()(o.a.mark((function e(t,n,r){var c,i,s,l,p;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,n),i=u(c),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(r));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,n,r){return e.apply(this,arguments)}}()},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(6),o=n.n(r),c=n(10),a=n.n(c),i=n(12),s=n(0),u=n(15),l=n(85);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){var t=Object(l.a)(),n=Object(s.useMemo)((function(){return e.map((function(e){var t;return[e.package_id,null===(t=e.shipping_rates.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id]})).reduce((function(e,t){var n=a()(t,2),r=n[0],o=n[1];return o&&(e[r]=o),e}),{})}),[e]),r=Object(s.useState)(n),c=a()(r,2),d=c[0],f=c[1];Object(s.useEffect)((function(){f(n)}),[n]);var b=Object(i.useDispatch)(u.CART_STORE_KEY).selectShippingRate,m=Object(i.useSelect)((function(e){return e(u.CART_STORE_KEY).isShippingRateBeingSelected()}),[]);return{selectShippingRate:function(e,n){f(p(p({},d),{},o()({},n,e))),b(e,n).catch((function(e){t(e)}))},selectedShippingRates:d,isSelectingRate:m}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(6),o=n.n(r),c=n(1),a=n(12),i=n(15),s=n(58),u=n(17),l=n(81),d=n(80);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f=function(){var e=Object(l.a)(),t=e.cartCoupons,n=e.cartIsLoading,r=Object(d.a)(),f=r.addErrorNotice,b=r.addSnackbarNotice,m=Object(s.b)().setValidationErrors;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({appliedCoupons:t,isLoading:n},Object(a.useSelect)((function(e,t){var n=t.dispatch,r=e(i.CART_STORE_KEY),o=r.isApplyingCoupon(),a=r.isRemovingCoupon(),s=n(i.CART_STORE_KEY),l=s.applyCoupon,d=s.removeCoupon,p=s.receiveApplyingCoupon;return{applyCoupon:function(e){l(e).then((function(t){!0===t&&b(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){m({coupon:{message:Object(u.decodeEntities)(e.message),hidden:!1}}),p("")}))},removeCoupon:function(e){d(e).then((function(t){!0===t&&b(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){f(e.message,{id:"coupon-form"}),p("")}))},isApplyingCoupon:o,isRemovingCoupon:a}}),[f,b]))}},function(e,t,n){"use strict";var r=n(5),o=n.n(r),c=(n(4),n(180));n(159);t.a=function(e){var t=e.children,n=e.className;return React.createElement(c.a,{className:o()("wc-block-components-sidebar-layout",n)},t)}},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(4);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-main",n)},t)}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(17),a=n(8);n(4);t.a=function(e){var t=e.image,n=void 0===t?{}:t,r={src:n.thumbnail||a.t,alt:Object(c.decodeEntities)(n.alt)||""};return React.createElement("img",o()({},r,{alt:r.alt}))}},function(e,t,n){"use strict";n(4);var r=n(17);n(161);t.a=function(e){var t=e.name,n=e.permalink,o=e.disabled,c=void 0!==o&&o;return React.createElement("a",{className:"wc-block-components-product-name",href:n,tabIndex:c?-1:0},Object(r.decodeEntities)(t))}},function(e,t,n){"use strict";var r=n(1),o=n(83);t.a=function(){return React.createElement(o.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woo-gutenberg-products-block"))}},function(e,t,n){"use strict";var r=n(1),o=(n(4),n(83));t.a=function(e){var t=e.lowStockRemaining;return t?React.createElement(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(Object(r.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},,function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(4);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-sidebar",n)},t)}},function(e,t,n){"use strict";var r=n(1),o=n(8),c=(n(4),n(41));t.a=function(e){var t=e.currency,n=e.values,a=n.total_items,i=n.total_items_tax,s=parseInt(a,10),u=parseInt(i,10);return React.createElement(c.a,{currency:t,label:Object(r.__)("Subtotal","woo-gutenberg-products-block"),value:o.k?s+u:s})}},function(e,t,n){"use strict";var r=n(1),o=n(8),c=n(87),a=(n(4),n(41));t.a=function(e){var t=e.currency,n=e.values;if(!Object(c.b)().needsShipping)return null;var i=n.total_fees,s=n.total_fees_tax,u=parseInt(i,10);if(!u)return null;var l=parseInt(s,10);return React.createElement(a.a,{className:"wc-block-components-totals-fees",currency:t,label:Object(r.__)("Fees","woo-gutenberg-products-block"),value:o.k?u+l:u})}},function(e,t,n){"use strict";var r=n(1),o=n(8),c=n(66),a=n(147),i=(n(4),n(41));n(165);t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,s=e.currency,u=e.isRemovingCoupon,l=e.removeCoupon,d=e.values,p=d.total_discount,f=d.total_discount_tax,b=parseInt(p,10);if(!b&&0===n.length)return null;var m=parseInt(f,10),g=o.k?b+m:b;return React.createElement(i.a,{className:"wc-block-components-totals-discount",currency:s,description:0!==n.length&&React.createElement(c.a,{screenReaderLabel:Object(r.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},React.createElement("ul",{className:"wc-block-components-totals-discount__coupon-list"},n.map((function(e){return React.createElement(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,screenReaderText:Object(r.sprintf)(Object(r.__)("Coupon: %s","woo-gutenberg-products-block"),e.code),disabled:u,onRemove:function(){l(e.code)},radius:"large",ariaLabel:Object(r.sprintf)(Object(r.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.code)})})))),label:g?Object(r.__)("Discount","woo-gutenberg-products-block"):Object(r.__)("Coupons","woo-gutenberg-products-block"),value:g?-1*g:"-"})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=function(e){return e.length},o=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},function(e,t,n){"use strict";var r=n(1),o=(n(4),n(8)),c=n(41);n(171);t.a=function(e){var t=e.currency,n=e.values,a=n.total_tax,i=n.tax_lines;return o.B?o.l?React.createElement(React.Fragment,null,i.map((function(e,n){var r=e.name,o=e.price;return React.createElement(c.a,{key:"tax-line-".concat(n),className:"wc-block-components-totals-taxes",currency:t,label:r,value:parseInt(o,10)})}))," "):React.createElement(c.a,{className:"wc-block-components-totals-taxes",currency:t,label:Object(r.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(a,10)}):null}},function(e,t,n){"use strict";var r=n(10),o=n.n(r),c=n(1),a=n(0),i=n(74),s=n(97),u=n(34),l=n(148),d=n(66),p=(n(4),n(100)),f=n(58),b=n(84);n(172);t.a=Object(p.a)((function(e){var t=e.instanceId,n=e.isLoading,r=void 0!==n&&n,p=e.initialOpen,m=void 0!==p&&p,g=e.onSubmit,h=void 0===g?function(){}:g,v=Object(a.useState)(""),y=o()(v,2),O=y[0],j=y[1],w=Object(a.useRef)(!1),E=Object(f.b)(),_=E.getValidationError,k=E.getValidationErrorId,S=_("coupon");Object(a.useEffect)((function(){w.current!==r&&(r||!O||S||j(""),w.current=r)}),[r,O,S]);var R="wc-block-components-totals-coupon__input-".concat(t);return React.createElement(b.a,{className:"wc-block-components-totals-coupon",hasBorder:!0,initialOpen:m,title:React.createElement(u.a,{label:Object(c.__)("Coupon Code?","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Introduce Coupon Code","woo-gutenberg-products-block"),htmlFor:R}),titleTag:"h2"},React.createElement(d.a,{screenReaderLabel:Object(c.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:r,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:R,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(c.__)("Enter code","woo-gutenberg-products-block"),value:O,ariaDescribedBy:k(R),onChange:function(e){j(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),React.createElement(i.a,{className:"wc-block-components-totals-coupon__button",disabled:r||!O,showSpinner:r,onClick:function(e){e.preventDefault(),h(O)},type:"submit"},Object(c.__)("Apply","woo-gutenberg-products-block"))),React.createElement(l.a,{propertyName:"coupon",elementId:R}))))}))},function(e,t,n){"use strict";var r=n(1),o=n(8),c=n(177),a=n(38),i=(n(4),n(41)),s=(n(173),o.B&&o.k);t.a=function(e){var t=e.currency,n=e.values,o=n.total_price,u=n.total_tax;return React.createElement(i.a,{className:"wc-block-components-totals-footer-item",currency:t,label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(o,10),description:s&&React.createElement("p",{className:"wc-block-components-totals-footer-item-tax"},Object(c.a)(Object(r.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:React.createElement(a.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,displayType:"text",value:parseInt(u,10)})}))})}},function(e,t,n){"use strict";var r=n(50),o=React.createElement(r.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},,function(e,t,n){"use strict";var r=n(0),o=n(3),c=n(15),a=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("cartData")),Object(a.useSelect)((function(e,t){if(n.current){var r,o,a=e(c.CART_STORE_KEY),i=a.isResolving,s=a.hasFinishedResolution,u=t.dispatch(c.CART_STORE_KEY),l=u.receiveCart,d=u.receiveError,p=u.startResolution,f=u.finishResolution;i("getCartData",[])||s("getCartData",[])||(p("getCartData",[]),(null===(r=n.current)||void 0===r||null===(o=r.code)||void 0===o?void 0:o.includes("error"))?d(n.current):l(n.current),f("getCartData",[]))}}),[]),React.createElement(e,t)}}},function(e,t,n){e.exports=n(264)},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,n){"use strict";n.r(t);var r=n(1),o=n(240),c=n(129),a=n(81),i=n(88),s=n(58),u=n(45),l=n(8),d=n(177),p=n(181),f=n(108),b=n(5),m=n.n(b),g=n(0),h=n(127),v=n(50),y=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},React.createElement("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"})),O=(n(250),function(e){var t=e.link;return React.createElement("a",{href:t||l.d,className:"wc-block-components-checkout-return-to-cart-button"},React.createElement(h.a,{srcElement:y}),Object(r.__)("Return to Cart","woo-gutenberg-products-block"))}),j=n(98),w=n(149),E=n(178),_=n(278),k=n(74),S=function(){var e=function(){var e=Object(j.b)(),t=e.onSubmit,n=e.isCalculating,o=e.isBeforeProcessing,c=e.isProcessing,a=e.isAfterProcessing,i=e.isComplete,s=e.hasError,u=Object(E.b)().paymentMethods[Object(w.b)().activePaymentMethod]||{};return{submitButtonText:(null==u?void 0:u.placeOrderButtonLabel)||Object(r.__)("Place Order","woo-gutenberg-products-block"),onSubmit:t,isCalculating:n,waitingForProcessing:c||a||o,waitingForRedirect:i&&!s}}(),t=e.submitButtonText,n=e.onSubmit,o=e.isCalculating,c=e.waitingForProcessing,a=e.waitingForRedirect;return React.createElement(k.a,{className:"wc-block-components-checkout-place-order-button",onClick:n,disabled:o||c||a,showSpinner:c},a?React.createElement(h.a,{srcElement:_.a,alt:Object(r.__)("Done","woo-gutenberg-products-block")}):t)},R=n(17),P=(n(251),function(){return React.createElement("ul",{className:"wc-block-components-checkout-policies"},l.v&&React.createElement("li",{className:"wc-block-components-checkout-policies__item"},React.createElement("a",{href:l.v,target:"_blank",rel:"noopener noreferrer"},l.u?Object(R.decodeEntities)(l.u):Object(r.__)("Privacy Policy","woo-gutenberg-products-block"))),l.D&&React.createElement("li",{className:"wc-block-components-checkout-policies__item"},React.createElement("a",{href:l.D,target:"_blank",rel:"noopener noreferrer"},l.C?Object(R.decodeEntities)(l.C):Object(r.__)("Terms and Conditions","woo-gutenberg-products-block"))))}),C=n(87),x=n(116),N=n(6),I=n.n(N),T=n(10),A=n.n(T),M=n(57),D=n.n(M),F=n(80);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=function(e,t,n){var r=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),o="wc-".concat(n,"-new-payment-method");return r.push({key:o,value:t}),r},U=function(){var e=Object(j.b)(),t=e.hasError,n=e.onCheckoutBeforeProcessing,o=e.dispatchActions,c=e.redirectUrl,i=e.isProcessing,u=e.isBeforeProcessing,l=e.isComplete,d=e.orderNotes,p=e.shouldCreateAccount,f=Object(s.b)().hasValidationErrors,b=Object(C.b)(),m=b.shippingAddress,h=b.shippingErrorStatus,v=Object(x.b)().billingData,y=Object(a.a)(),O=y.cartNeedsPayment,E=y.receiveCart,_=Object(w.b)(),k=_.activePaymentMethod,S=_.currentStatus,R=_.paymentMethodData,P=_.expressPaymentMethods,N=_.paymentMethods,I=_.shouldSavePayment,T=Object(F.a)(),M=T.addErrorNotice,L=T.removeNotice,U=T.setIsSuppressed,H=Object(g.useRef)(v),z=Object(g.useRef)(m),q=Object(g.useRef)(c),W=Object(g.useState)(!1),K=A()(W,2),G=K[0],Y=K[1],$=Object.keys(P).includes(k),X=Object(g.useMemo)((function(){var e,t=V(V({},P),N);return null==t||null===(e=t[k])||void 0===e?void 0:e.paymentMethodId}),[k,P,N]),Z=f&&!$||S.hasError||h.hasError;Object(g.useEffect)((function(){U($)}),[$,U]),Object(g.useEffect)((function(){Z===t||!i&&!u||$||o.setHasError(Z)}),[Z,t,i,u,$,o]);var J=!t&&!Z&&(S.isSuccessful||!O)&&i;Object(g.useEffect)((function(){H.current=v,z.current=m,q.current=c}),[v,m,c]);var Q=Object(g.useCallback)((function(){return f?{errorMessage:Object(r.__)("Some input fields are invalid.","woo-gutenberg-products-block")}:S.hasError?{errorMessage:Object(r.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!h.hasError||{errorMessage:Object(r.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}}),[f,S.hasError,h.hasError]);Object(g.useEffect)((function(){var e;return $||(e=n(Q,0)),function(){$||e()}}),[n,Q,$]);var ee=Object(g.useCallback)((function(){Y(!0),L("checkout");var e={billing_address:H.current,shipping_address:z.current,customer_note:d,should_create_account:p};O&&(e=V(V({},e),{},{payment_method:X,payment_data:B(R,I,k)})),D()({path:"/wc/store/checkout",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){D.a.setNonce(e.headers),e.json().then((function(t){e.ok||(t.body&&t.body.message?M(t.body.message,{id:"checkout"}):M(Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"checkout"}),o.setHasError()),o.setAfterProcessing(t),Y(!1)}))})).catch((function(e){e.json().then((function(e){var t;(null===(t=e.data)||void 0===t?void 0:t.cart)&&E(e.data.cart),o.setHasError(),o.setAfterProcessing(e),Y(!1)}))}))}),[M,L,X,k,R,I,O,E,o,d,p]);return Object(g.useEffect)((function(){q.current&&(window.location.href=q.current)}),[l]),Object(g.useEffect)((function(){J&&!G&&ee()}),[ee,J,G]),null},H=function(e){var t=e.children,n=e.redirectUrl;return React.createElement(j.a,{redirectUrl:n,isCart:!1},React.createElement(x.a,null,React.createElement(C.a,null,React.createElement(w.a,null,t,React.createElement(U,null)))))},z=n(118),q=n(194),W=n(78),K=n(145),G=(n(174),function(){var e=Object(E.a)(),t=e.paymentMethods,n=e.isInitialized,o=Object(z.a)().isEditor,c=Object(q.a)().noticeContexts;return!n||n&&0===Object.keys(t).length?o||l.j?React.createElement(i.a,{context:c.EXPRESS_PAYMENTS}):null:React.createElement(React.Fragment,null,React.createElement("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},React.createElement("div",{className:"wc-block-components-express-payment__title-container"},React.createElement(W.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(r.__)("Express checkout","woo-gutenberg-products-block"))),React.createElement("div",{className:"wc-block-components-express-payment__content"},React.createElement(i.a,{context:c.EXPRESS_PAYMENTS},React.createElement("p",null,Object(r.__)("In a hurry? Use one of our express checkout options below:","woo-gutenberg-products-block")),React.createElement(K.a,null)))),React.createElement("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(r.__)("Or continue below","woo-gutenberg-products-block")))}),Y=n(223),$=n(224),X=n(230),Z=n(102),J=n(3),Q=n(4),ee=n.n(Q),te=function(e){var t=e.className,n=e.children,r=e.onSubmit,o=void 0===r?function(e){}:r;return React.createElement("form",{className:m()("wc-block-components-form",t),onSubmit:function(e){e.preventDefault(),o(e)}},n)},ne=n(90),re=n(7);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=function(){var e=Object(j.b)().customerId,t=Object(C.b)(),n=t.shippingAddress,r=t.setShippingAddress,o=t.needsShipping,c=Object(x.b)(),a=c.billingData,i=c.setBillingData,s=Object(g.useState)(a),u=A()(s,2),l=u[0],d=u[1],p=Object(g.useState)((function(){return o&&(!e||(t=n,r=a,Object.keys(ne.a).every((function(e){return t[e]===r[e]}))));var t,r})),f=A()(p,2),b=f[0],m=f[1];Object(g.useEffect)((function(){var e=ce(ce({},b?n:l),{},{email:l.email||a.email,phone:l.phone||a.phone});Object(re.isEqual)(e,a)||i(e)}),[l,b,a,n,i,r]);var h=Object(g.useCallback)((function(e){d((function(t){return ce(ce({},t),e)}))}),[]);return{defaultAddressFields:ne.a,shippingFields:n,setShippingFields:r,billingFields:l,setBillingFields:h,setEmail:function(e){h({email:e})},setPhone:function(e){h({phone:e})},shippingAsBilling:b,setShippingAsBilling:m,showBillingFields:!o||!b}},ie=(n(244),function(e){var t=e.title,n=e.stepHeadingContent;return React.createElement("div",{className:"wc-block-components-checkout-step__heading"},React.createElement(W.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&React.createElement("span",{className:"wc-block-components-checkout-step__heading-content"},n))}),se=function(e){var t=e.id,n=e.className,r=e.title,o=e.legend,c=e.description,a=e.children,i=e.disabled,s=void 0!==i&&i,u=e.showStepNumber,l=void 0===u||u,d=e.stepHeadingContent,p=void 0===d?function(){}:d,f=o||r?"fieldset":"div";return React.createElement(f,{className:m()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":l}),id:t,disabled:s},!(!o&&!r)&&React.createElement("legend",{className:"screen-reader-text"},o||r),!!r&&React.createElement(ie,{title:r,stepHeadingContent:p()}),React.createElement("div",{className:"wc-block-components-checkout-step__container"},!!c&&React.createElement("p",{className:"wc-block-components-checkout-step__description"},c),React.createElement("div",{className:"wc-block-components-checkout-step__content"},a)))},ue=n(268),le=function(e){var t=e.addressFieldsConfig,n=e.billingFields,o=e.defaultAddressFields,c=e.setBillingFields,a=Object(j.b)().isProcessing;return React.createElement(se,{id:"billing-fields",disabled:a,className:"wc-block-checkout__billing-fields",title:Object(r.__)("Billing address","woo-gutenberg-products-block"),description:Object(r.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")},React.createElement(ue.a,{id:"billing",onChange:c,type:"billing",values:n,fields:Object.keys(o),fieldConfig:t}))},de=n(134),pe=n(11),fe=n.n(pe),be=n(14),me=n.n(be),ge=n(100),he=(n(243),Object(ge.a)((function(e){var t=e.className,n=e.label,r=e.id,o=e.instanceId,c=e.onChange,a=me()(e,["className","label","id","instanceId","onChange"]),i=r||"checkbox-control-".concat(o);return React.createElement("label",{className:m()("wc-block-components-checkbox",t),htmlFor:i},React.createElement("input",fe()({id:i,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:function(e){return c(e.target.checked)}},a)),React.createElement("svg",{className:"wc-block-components-checkbox__mark","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})),React.createElement("span",{className:"wc-block-components-checkbox__label"},n))}))),ve="".concat(l.r,"?redirect_to=").concat(encodeURIComponent(window.location.href)),ye=function(){var e=Object(j.b)().customerId;return!l.g||e?null:React.createElement(React.Fragment,null,Object(r.__)("Already have an account? ","woo-gutenberg-products-block"),React.createElement("a",{href:ve},Object(r.__)("Log in.","woo-gutenberg-products-block")))},Oe=function(e){var t=e.emailValue,n=e.onChangeEmail,o=e.allowCreateAccount,c=Object(j.b)(),a=c.isProcessing,i=c.customerId,s=c.shouldCreateAccount,u=c.setShouldCreateAccount,d=!i&&o&&l.e&&React.createElement(he,{className:"wc-block-checkout__create-account",label:Object(r.__)("Create an account?","woo-gutenberg-products-block"),checked:s,onChange:function(e){return u(e)}});return React.createElement(se,{id:"contact-fields",disabled:a,className:"wc-block-checkout__contact-fields",title:Object(r.__)("Contact information","woo-gutenberg-products-block"),description:Object(r.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block"),stepHeadingContent:function(){return React.createElement(ye,null)}},React.createElement(de.a,{id:"email",type:"email",label:Object(r.__)("Email address","woo-gutenberg-products-block"),value:t,autoComplete:"email",onChange:n,required:!0}),d)},je=function(e){var t=e.addressFieldsConfig,n=e.defaultAddressFields,o=e.billingFields,c=e.setPhone,a=e.shippingAsBilling,i=e.shippingFields,s=e.showPhoneField,u=e.setShippingFields,l=e.setShippingAsBilling,d=e.requirePhoneField,p=Object(j.b)().isProcessing;return React.createElement(se,{id:"shipping-fields",disabled:p,className:"wc-block-checkout__shipping-fields",title:Object(r.__)("Shipping address","woo-gutenberg-products-block"),description:Object(r.__)("Enter the physical address where you want us to deliver your order.","woo-gutenberg-products-block")},React.createElement(ue.a,{id:"shipping",onChange:u,values:i,fields:Object.keys(n),fieldConfig:t}),s&&React.createElement(de.a,{id:"phone",type:"tel",label:d?Object(r.__)("Phone","woo-gutenberg-products-block"):Object(r.__)("Phone (optional)","woo-gutenberg-products-block"),value:o.phone,autoComplete:"tel",onChange:c,required:d}),React.createElement(he,{className:"wc-block-checkout__use-address-for-billing",label:Object(r.__)("Use same address for billing","woo-gutenberg-products-block"),checked:a,onChange:function(e){return l(e)}}))};n(185);function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,r=e.showApartmentField,o=e.showCompanyField,c=e.showPhoneField,a=e.allowCreateAccount,i=ae(),s=i.defaultAddressFields,u=i.billingFields,l=i.setBillingFields,d=i.setEmail,p=i.setPhone,f=i.setShippingAsBilling,b=i.setShippingFields,m=i.shippingAsBilling,h=i.shippingFields,v=i.showBillingFields,y=Object(C.b)().needsShipping,O=Object(g.useMemo)((function(){return{company:Ee(Ee({},s.company),{},{hidden:!o,required:t}),address_2:Ee(Ee({},s.address_2),{},{hidden:!r})}}),[s,o,t,r]);return React.createElement(React.Fragment,null,React.createElement(Oe,{emailValue:u.email,onChangeEmail:d,allowCreateAccount:a}),y&&React.createElement(je,{addressFieldsConfig:O,billingFields:u,defaultAddressFields:s,requirePhoneField:n,setPhone:p,setShippingAsBilling:f,setShippingFields:b,shippingAsBilling:m,shippingFields:h,showPhoneField:c}),v&&React.createElement(le,{addressFieldsConfig:O,billingFields:u,defaultAddressFields:s,setBillingFields:l}))},ke=(n(249),function(e){var t=e.className,n=void 0===t?"":t,r=e.disabled,o=void 0!==r&&r,c=e.onTextChange,a=e.placeholder,i=e.value,s=void 0===i?"":i;return React.createElement("textarea",{className:m()("wc-block-components-textarea",n),disabled:o,onChange:function(e){c(e.target.value)},placeholder:a,rows:2,value:s})});n(248);ke.propTypes={onTextChange:ee.a.func.isRequired,disabled:ee.a.bool,placeholder:ee.a.string,value:ee.a.string};var Se=function(e){var t=e.disabled,n=e.onChange,o=e.placeholder,c=e.value,a=Object(g.useState)(!1),i=A()(a,2),s=i[0],u=i[1],l=Object(g.useState)(""),d=A()(l,2),p=d[0],f=d[1];return React.createElement("div",{className:"wc-block-checkout__add-note"},React.createElement(he,{disabled:t,label:Object(r.__)("Add a note to your order","woo-gutenberg-products-block"),checked:s,onChange:function(e){u(e),e?c!==p&&n(p):(n(""),f(c))}}),s&&React.createElement(ke,{disabled:t,onTextChange:n,placeholder:o,value:c}))},Re=function(e){var t=e.showOrderNotes,n=Object(C.b)().needsShipping,o=Object(j.b)(),c=o.isProcessing,a=o.orderNotes,i=o.dispatchActions.setOrderNotes;return t?React.createElement(se,{id:"order-notes",showStepNumber:!1},React.createElement(Se,{disabled:c,onChange:i,placeholder:n?Object(r.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(r.__)("Notes about your order.","woo-gutenberg-products-block"),value:a})):null},Pe=n(9),Ce=n(29),xe=n(75);var Ne=function(e){var t=e.icon,n=e.children,r=e.label,o=e.instructions,c=e.className,a=e.notices,i=e.preview,s=e.isColumnLayout,u=Object(Ce.a)(e,["icon","children","label","instructions","className","notices","preview","isColumnLayout"]),l=m()("components-placeholder",c),d=m()("components-placeholder__fieldset",{"is-column-layout":s});return Object(g.createElement)("div",Object(Pe.a)({},u,{className:l}),a,i&&Object(g.createElement)("div",{className:"components-placeholder__preview"},i),Object(g.createElement)("div",{className:"components-placeholder__label"},Object(g.createElement)(xe.a,{icon:t}),r),!!o&&Object(g.createElement)("div",{className:"components-placeholder__instructions"},o),Object(g.createElement)("div",{className:d},n))},Ie=n(76),Te=n(119),Ae=n(238),Me=(n(246),function(){return React.createElement(Ne,{icon:React.createElement(h.a,{srcElement:Ae.a}),label:Object(r.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},React.createElement("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(r.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),React.createElement(Ie.a,{isDefault:!0,href:"".concat(J.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout"),target:"_blank",rel:"noopener noreferrer"},Object(r.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),De=function(){return React.createElement(Te.a,{isDismissible:!1,className:m()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(r.__)("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"))},Fe=function(){return Object(z.a)().isEditor?React.createElement(Me,null):React.createElement(De,null)},Le=n(179);function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function He(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qe(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var We,Ke=n(2);function Ge(e){return Object(Ke.useState)(e)[0]}function Ye(e){return e?e.ownerDocument||e:document}try{We=window}catch(e){}function $e(e){return e&&Ye(e).defaultView||We}var Xe,Ze=(Xe=$e(),Boolean(void 0!==Xe&&Xe.document&&Xe.document.createElement)),Je=Ze?Ke.useLayoutEffect:Ke.useEffect;function Qe(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=qe(e);!(t=o()).done;)r();return n}function et(e){for(var t,n=[],r=qe(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function tt(e){return e.slice().reverse()}function nt(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function rt(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=nt(e.items||[]))||void 0===n?void 0:n.id}function ot(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function ct(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function at(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var it=Object(Ke.createContext)(at);function st(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ut(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&st(t.ref.current,e.ref.current)}))}function lt(e){for(var t,n=0,r=qe(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function dt(e){for(var t=Qe(e),n=lt(t),r=[],o=0;o<n;o+=1)for(var c,a=qe(t);!(c=a()).done;){var i=c.value;i[o]&&r.push(Ue(Ue({},i[o]),{},{groupId:i[o].groupId?""+o:void 0}))}return r}function pt(e,t,n){for(var r,o=lt(e),c=qe(e);!(r=c()).done;)for(var a=r.value,i=0;i<o;i+=1){var s=a[i];if(!s||n&&s.disabled){var u=0===i&&n?nt(a):a[i-1];a[i]=u&&t!==(null==u?void 0:u.id)&&n?u:{id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:null==u?void 0:u.groupId}}}return e}var ft={id:null,ref:{current:null}};function bt(e,t){return e.filter((function(e){return e.groupId===t}))}var mt={horizontal:"vertical",vertical:"horizontal"};function gt(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function ht(e){var t=e.map((function(e,t){return[t,e]})),n=!1;return t.sort((function(e,t){var r=e[0],o=e[1],c=t[0],a=t[1],i=o.ref.current,s=a.ref.current;return i&&s?st(i,s)?(r>c&&(n=!0),-1):(r<c&&(n=!0),1):0})),n?t.map((function(e){e[0];return e[1]})):e}function vt(e,t){var n=ht(e);e!==n&&t(n)}function yt(e,t){"function"==typeof IntersectionObserver?function(e,t){var n=Object(Ke.useRef)([]);Object(Ke.useEffect)((function(){for(var r,o=new IntersectionObserver((function(){!!n.current.length&&vt(e,t),n.current=e}),{root:document.body}),c=qe(e);!(r=c()).done;){var a=r.value;a.ref.current&&o.observe(a.ref.current)}return function(){o.disconnect()}}),[e])}(e,t):function(e,t){Object(Ke.useEffect)((function(){var n=setTimeout((function(){return vt(e,t)}),250);return function(){return clearTimeout(n)}}))}(e,t)}function Ot(e,t){var n=e.unstable_virtual,r=e.rtl,o=e.orientation,c=e.items,a=e.groups,i=e.currentId,s=e.loop,u=e.wrap,l=e.pastIds,d=e.unstable_moves,p=e.unstable_angular,f=e.initialVirtual,b=e.initialRTL,m=e.initialOrientation,g=e.initialCurrentId,h=e.initialLoop,v=e.initialWrap,y=e.hasSetCurrentId;switch(t.type){case"registerGroup":var O=t.group;if(0===a.length)return Ue(Ue({},e),{},{groups:[O]});var j=ut(a,O);return Ue(Ue({},e),{},{groups:gt(a,O,j)});case"unregisterGroup":var w=t.id,E=a.filter((function(e){return e.id!==w}));return E.length===a.length?e:Ue(Ue({},e),{},{groups:E});case"registerItem":var _,k=t.item,S=a.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(k.ref.current)})),R=Ue({groupId:null==S?void 0:S.id},k),P=ut(c,R),C=Ue(Ue({},e),{},{items:gt(c,R,P)});return y||d||void 0!==g?C:Ue(Ue({},C),{},{currentId:null===(_=nt(C.items))||void 0===_?void 0:_.id});case"unregisterItem":var x=t.id,N=c.filter((function(e){return e.id!==x}));if(N.length===c.length)return e;var I=l.filter((function(e){return e!==x})),T=Ue(Ue({},e),{},{pastIds:I,items:N});if(i&&i===x){var A=rt(Ue(Ue({},T),{},{currentId:I[0]}));return Ue(Ue({},T),{},{currentId:A})}return T;case"move":var M=t.id;if(void 0===M)return e;var D=l.filter((function(e){return e!==i&&e!==M})),F=i?[i].concat(D):D,L=Ue(Ue({},e),{},{pastIds:F});if(null===M)return Ue(Ue({},L),{},{unstable_moves:d+1,currentId:rt(L,M)});var V=ot(c,M);return Ue(Ue({},L),{},{unstable_moves:V?d+1:d,currentId:rt(L,null==V?void 0:V.id)});case"next":if(null==i)return Ot(e,Ue(Ue({},t),{},{type:"first"}));var B=r&&"vertical"!==o,U=B?tt(c):c,H=U.find((function(e){return e.id===i}));if(!H)return Ot(e,Ue(Ue({},t),{},{type:"first"}));var z=!!H.groupId,q=U.indexOf(H),W=U.slice(q+1),K=bt(W,H.groupId);if(t.allTheWay){var G=nt(B?bt(U,H.groupId):tt(K));return Ot(e,Ue(Ue({},t),{},{type:"move",id:null==G?void 0:G.id}))}var Y=function(e){return e&&mt[e]}(z?o||"horizontal":o),$=s&&s!==Y,X=z&&u&&u!==Y,Z=t.hasNullItem||!z&&$&&null===g;if($){var J=nt(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[ft]:[],e.slice(0,r))}(X&&!Z?U:bt(U,H.groupId),i,Z),i);return Ot(e,Ue(Ue({},t),{},{type:"move",id:null==J?void 0:J.id}))}if(X){var Q=nt(Z?K:W,i),ee=Z?(null==Q?void 0:Q.id)||null:null==Q?void 0:Q.id;return Ot(e,Ue(Ue({},t),{},{type:"move",id:ee}))}var te=nt(K,i);return Ot(e,!te&&Z?Ue(Ue({},t),{},{type:"move",id:null}):Ue(Ue({},t),{},{type:"move",id:null==te?void 0:te.id}));case"previous":var ne=!!!a.length&&null===g,re=Ot(Ue(Ue({},e),{},{items:tt(c)}),Ue(Ue({},t),{},{type:"next",hasNullItem:ne}));return Ue(Ue({},re),{},{items:c});case"down":var oe=dt(et(pt(Qe(c),i,p))),ce=s&&"horizontal"!==s&&null===g,ae=Ot(Ue(Ue({},e),{},{orientation:"vertical",items:oe}),Ue(Ue({},t),{},{type:"next",hasNullItem:ce}));return Ue(Ue({},ae),{},{orientation:o,items:c});case"up":var ie=dt(tt(et(pt(Qe(c),i,p)))),se=null===g,ue=Ot(Ue(Ue({},e),{},{orientation:"vertical",items:ie}),Ue(Ue({},t),{},{type:"next",hasNullItem:se}));return Ue(Ue({},ue),{},{orientation:o,items:c});case"first":var le=nt(c);return Ot(e,Ue(Ue({},t),{},{type:"move",id:null==le?void 0:le.id}));case"last":var de=Ot(Ue(Ue({},e),{},{items:tt(c)}),Ue(Ue({},t),{},{type:"first"}));return Ue(Ue({},de),{},{items:c});case"sort":return Ue(Ue({},e),{},{items:ht(c),groups:ht(a)});case"setVirtual":return Ue(Ue({},e),{},{unstable_virtual:ct(t.virtual,n)});case"setRTL":return Ue(Ue({},e),{},{rtl:ct(t.rtl,r)});case"setOrientation":return Ue(Ue({},e),{},{orientation:ct(t.orientation,o)});case"setCurrentId":var pe=rt(Ue(Ue({},e),{},{currentId:ct(t.currentId,i)}));return Ue(Ue({},e),{},{currentId:pe,hasSetCurrentId:!0});case"setLoop":return Ue(Ue({},e),{},{loop:ct(t.loop,s)});case"setWrap":return Ue(Ue({},e),{},{wrap:ct(t.wrap,u)});case"reset":return Ue(Ue({},e),{},{unstable_virtual:f,rtl:b,orientation:m,currentId:rt(Ue(Ue({},e),{},{currentId:g})),loop:h,wrap:v,unstable_moves:0,pastIds:[]});case"setItems":return Ue(Ue({},e),{},{items:t.items});default:throw new Error}}function jt(e){return Object(Ke.useCallback)(e,[])}function wt(e){void 0===e&&(e={});var t=Ge(e),n=t.unstable_virtual,r=void 0!==n&&n,o=t.rtl,c=void 0!==o&&o,a=t.orientation,i=t.currentId,s=t.loop,u=void 0!==s&&s,l=t.wrap,d=void 0!==l&&l,p=t.unstable_angular,f=void 0!==p&&p,b=He(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap","unstable_angular"]),m=Object(Ke.useReducer)(Ot,{unstable_virtual:r,rtl:c,orientation:a,items:[],groups:[],currentId:i,loop:u,wrap:d,unstable_moves:0,pastIds:[],unstable_angular:f,initialVirtual:r,initialRTL:c,initialOrientation:a,initialCurrentId:i,initialLoop:u,initialWrap:d}),g=m[0],h=(g.pastIds,g.initialVirtual,g.initialRTL,g.initialOrientation,g.initialCurrentId,g.initialLoop,g.initialWrap,g.hasSetCurrentId,He(g,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),v=m[1],y=Object(Ke.useState)(!1),O=y[0],j=y[1],w=function(e){void 0===e&&(e={});var t=Ge(e).baseId,n=Object(Ke.useContext)(it),r=Object(Ke.useRef)(0),o=Object(Ke.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}(b),E=function(){var e=Object(Ke.useRef)(!1);return Je((function(){return function(){e.current=!0}}),[]),e}(),_=Object(Ke.useCallback)((function(e){return v({type:"setItems",items:e})}),[]);return yt(h.items,_),Ue(Ue(Ue({},w),h),{},{unstable_hasActiveWidget:O,unstable_setHasActiveWidget:j,registerItem:jt((function(e){E.current||v({type:"registerItem",item:e})})),unregisterItem:jt((function(e){E.current||v({type:"unregisterItem",id:e})})),registerGroup:jt((function(e){E.current||v({type:"registerGroup",group:e})})),unregisterGroup:jt((function(e){E.current||v({type:"unregisterGroup",id:e})})),move:jt((function(e){return v({type:"move",id:e})})),next:jt((function(e){return v({type:"next",allTheWay:e})})),previous:jt((function(e){return v({type:"previous",allTheWay:e})})),up:jt((function(e){return v({type:"up",allTheWay:e})})),down:jt((function(e){return v({type:"down",allTheWay:e})})),first:jt((function(){return v({type:"first"})})),last:jt((function(){return v({type:"last"})})),sort:jt((function(){return v({type:"sort"})})),unstable_setVirtual:jt((function(e){return v({type:"setVirtual",virtual:e})})),setRTL:jt((function(e){return v({type:"setRTL",rtl:e})})),setOrientation:jt((function(e){return v({type:"setOrientation",orientation:e})})),setCurrentId:jt((function(e){return v({type:"setCurrentId",currentId:e})})),setLoop:jt((function(e){return v({type:"setLoop",loop:e})})),setWrap:jt((function(e){return v({type:"setWrap",wrap:e})})),reset:jt((function(){return v({type:"reset"})}))})}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function St(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pt(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var Ct=Object(Ke.createContext)({});var xt=function(e,t,n){void 0===n&&(n=t.children);var r=Object(Ke.useContext)(Ct);if(r.useCreateElement)return r.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(St(t,["children"]))}return Object(Ke.createElement)(e,t,n)};function Nt(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var a=c[o];t.indexOf(a)>=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function It(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,a=n;c<a.length;c++){var i=a[c];if(e[i]!==t[i])return!1}return!0}function Tt(e){var t,n=e.as,r=e.useHook,o=e.memo,c=e.propsAreEqual,a=void 0===c?null==r?void 0:r.unstable_propsAreEqual:c,i=e.keys,s=void 0===i?(null==r?void 0:r.__keys)||[]:i,u=e.useCreateElement,l=void 0===u?xt:u,d=function(e,t){var o=e.as,c=void 0===o?n:o,a=St(e,["as"]);if(r){var i,u=Nt(a,s),d=u[0],p=u[1],f=r(d,kt({ref:t},p)),b=f.wrapElement,m=St(f,["wrapElement"]),g=(null===(i=c.render)||void 0===i?void 0:i.__keys)||c.__keys,h=g&&Nt(a,g)[0],v=h?kt(kt({},m),h):m,y=l(c,v);return b?b(y):y}return l(c,kt({ref:t},a))};return t=d,d=Object(Ke.forwardRef)(t),o&&(d=function(e,t){return Object(Ke.memo)(e,t)}(d,a)),d.__keys=s,d.unstable_propsAreEqual=a||It,d}function At(e,t){Object(Ke.useDebugValue)(e);var n=Object(Ke.useContext)(Ct);return null!=n[e]?n[e]:t}function Mt(e){var t,n,r,o=(r=e.compose,Array.isArray(r)?r:void 0!==r?[r]:[]),c=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Options";Object(Ke.useDebugValue)(r);var o=At(r);return o?kt(kt({},t),o(t,n)):t}(e.name,t,n)),e.compose)for(var r,c=Pt(o);!(r=c()).done;){t=r.value.__useOptions(t,n)}return t},a=function(t,n,r){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===r&&(r=!1),r||(t=c(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Props";Object(Ke.useDebugValue)(r);var o=At(r);return o?o(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,i=Pt(o);!(a=i()).done;){n=(0,a.value)(t,n,!0)}var s={},u=n||{};for(var l in u)void 0!==u[l]&&(s[l]=u[l]);return s};a.__useOptions=c;var i=o.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return a.__keys=[].concat(i,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),a.unstable_propsAreEqual=e.propsAreEqual||(null===(n=o[0])||void 0===n?void 0:n.unstable_propsAreEqual)||It,a}var Dt=Mt({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=He(e,["unstable_system"]),o=t.unstable_system,c=He(t,["unstable_system"]);return!(n!==o&&!It(n,o))&&It(r,c)}});Tt({as:"div",useHook:Dt});function Ft(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function Lt(e,t){return Object(Ke.useMemo)((function(){return null==e&&null==t?null:function(n){Ft(e,n),Ft(t,n)}}),[e,t])}function Vt(e){var t=Object(Ke.useRef)(e);return Je((function(){t.current=e})),t}function Bt(e){return e.target===e.currentTarget}var Ut=["button","color","file","image","reset","submit"];function Ht(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==Ut.indexOf(t.type)}return!1}function zt(e){var t=Ye(e).activeElement;return(null==t?void 0:t.nodeName)?t:null}function qt(e,t){return e===t||e.contains(t)}function Wt(e){var t=zt(e);if(!t)return!1;if(qt(e,t))return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&(n===e.id||!!e.querySelector("#"+n))}function Kt(e){return!qt(e.currentTarget,e.target)}function Gt(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function Yt(e,t){if("closest"in e)return e.closest(t);do{if(Gt(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}var $t="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Xt(e){return Gt(e,$t)&&function(e){var t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)}function Zt(e){return!!Ze&&-1!==window.navigator.userAgent.indexOf(e)}var Jt=Zt("Mac")&&!Zt("Chrome")&&(Zt("Safari")||Zt("Firefox"));function Qt(e){Wt(e)||e.focus()}function en(){if(Jt){var e=Object(Ke.useState)(null),t=e[0],n=e[1];return Object(Ke.useEffect)((function(){t&&(Qt(t),n(null))}),[t]),Object(Ke.useCallback)((function(e){var t=e.currentTarget;if(!Kt(e)&&Ht(t)){var r=zt(t);if(r){var o="BODY"===r.tagName,c=function(e){for(;e&&!Xt(e);)e=Yt(e,$t);return e}(t.parentElement);if(r===c||o&&!c)n(t);else if(c){c.addEventListener("focusin",(function(){return n(t)}),{once:!0})}else{r.addEventListener("blur",(function(){return Qt(t)}),{once:!0})}}}}),[])}}function tn(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function nn(e,t){return Object(Ke.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var rn=Mt({name:"Tabbable",compose:Dt,keys:["disabled","focusable"],useOptions:function(e,t){return Ue({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,c=t.onMouseDownCapture,a=t.onMouseDown,i=t.onKeyPressCapture,s=t.style,u=He(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),l=Object(Ke.useRef)(null),d=Vt(o),p=Vt(c),f=Vt(a),b=Vt(i),m=!!e.disabled&&!e.focusable,g=Object(Ke.useState)(!0),h=g[0],v=g[1],y=Object(Ke.useState)(!0),O=y[0],j=y[1],w=e.disabled?Ue({pointerEvents:"none"},s):s,E=en();Je((function(){var e,t=l.current;t&&("BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&v(!1),function(e){return"BUTTON"===e.tagName||"INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName}(t)||j(!1))}),[]);var _=nn(d,e.disabled),k=nn(p,e.disabled),S=nn(b,e.disabled),R=Object(Ke.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),e.defaultPrevented||null==E||E(e)}),[e.disabled,E]);return Ue({ref:Lt(l,n),style:w,tabIndex:tn(m,h,O,r),disabled:!(!m||!O)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:_,onMouseDownCapture:k,onMouseDown:R,onKeyPressCapture:S},u)}});Tt({as:"div",useHook:rn});function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){on(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sn(e,t,n){return void 0===n&&(n={}),"function"==typeof FocusEvent?new FocusEvent(t,n):function(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=Ye(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}(e,t,n)}function un(e,t){var n=sn(e,"blur",t),r=e.dispatchEvent(n),o=an(an({},t),{},{bubbles:!0});return e.dispatchEvent(sn(e,"focusout",o)),r}function ln(e,t,n){return e.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var r=Ye(e).createEvent("KeyboardEvent");return r.initKeyboardEvent(t,n.bubbles,n.cancelable,$e(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),r}(e,t,n))}var dn=Ze&&"msCrypto"in window;var pn=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_angular","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"],fn=pn,bn=Ze&&"msCrypto"in window;function mn(e,t,n){var r=Vt(n);return Object(Ke.useCallback)((function(n){var o;if(null===(o=r.current)||void 0===o||o.call(r,n),!n.defaultPrevented&&e&&function(e){return!!Bt(e)&&(!e.metaKey&&"Tab"!==e.key)}(n)){var c=null==t?void 0:t.ref.current;c&&(ln(c,n.type,n)||n.preventDefault(),n.currentTarget.contains(c)&&n.stopPropagation())}}),[e,t])}function gn(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var hn=Mt({name:"Composite",compose:[rn],keys:pn,useOptions:function(e){return Ue(Ue({},e),{},{currentId:rt(e)})},useProps:function(e,t){var n=t.ref,r=t.onFocusCapture,o=t.onFocus,c=t.onBlurCapture,a=t.onKeyDown,i=t.onKeyDownCapture,s=t.onKeyUpCapture,u=He(t,["ref","onFocusCapture","onFocus","onBlurCapture","onKeyDown","onKeyDownCapture","onKeyUpCapture"]),l=Object(Ke.useRef)(null),d=ot(e.items,e.currentId),p=Object(Ke.useRef)(null),f=Vt(r),b=Vt(o),m=Vt(c),g=Vt(a),h=bn?function(e){var t=Object(Ke.useRef)(null);return Object(Ke.useEffect)((function(){var n=Ye(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(l):void 0;Object(Ke.useEffect)((function(){var t=l.current;e.unstable_moves&&!d&&(null==t||t.focus())}),[e.unstable_moves,d]);var v=mn(e.unstable_virtual,d,i),y=mn(e.unstable_virtual,d,s),O=Object(Ke.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==h?void 0:h.current)||t.relatedTarget,o=gn(e.items,r);Bt(t)&&o&&t.stopPropagation()}}),[e.unstable_virtual,e.items]),j=Object(Ke.useCallback)((function(t){var n;if(null===(n=b.current)||void 0===n||n.call(b,t),!t.defaultPrevented)if(e.unstable_virtual){var r=(null==d?void 0:d.ref.current)||null;Bt(t)&&(null==r||r.focus())}else if(Bt(t)){var o;null===(o=e.setCurrentId)||void 0===o||o.call(e,null)}}),[e.unstable_virtual,d,e.setCurrentId]),w=Object(Ke.useCallback)((function(t){var n;if(null===(n=m.current)||void 0===n||n.call(m,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==d?void 0:d.ref.current)||null,o=function(e){return dn?zt(e.currentTarget):e.relatedTarget}(t),c=gn(e.items,o);if(Bt(t)&&c)o===r?(p.current&&p.current!==o&&un(p.current,t),p.current=r):r&&(un(r,t),p.current=o),t.stopPropagation();else!gn(e.items,t.target)&&r&&un(r,t)}}),[e.unstable_virtual,e.items,d]),E=Object(Ke.useCallback)((function(t){var n,r;if(null===(n=g.current)||void 0===n||n.call(g,t),!t.defaultPrevented&&null===e.currentId&&Bt(t)){var o="horizontal"!==e.orientation,c="vertical"!==e.orientation,a=!!(null===(r=e.groups)||void 0===r?void 0:r.length),i={ArrowUp:(a||o)&&function(){if(a){var t,n=nt(et(tt(Qe(e.items))));if(null==n?void 0:n.id)null===(t=e.move)||void 0===t||t.call(e,n.id)}else{var r;null===(r=e.last)||void 0===r||r.call(e)}},ArrowRight:(a||c)&&e.first,ArrowDown:(a||o)&&e.first,ArrowLeft:(a||c)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];i&&(t.preventDefault(),i())}}),[e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Ue({ref:Lt(l,n),id:e.baseId,onFocus:j,onFocusCapture:O,onBlurCapture:w,onKeyDownCapture:v,onKeyDown:E,onKeyUpCapture:y,"aria-activedescendant":e.unstable_virtual&&(null==d?void 0:d.id)||void 0},u)},useComposeProps:function(e,t){t=Dt(e,t,!0);var n=rn(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Ue(Ue({},t),{},{ref:n.ref})}}),vn=(Tt({as:"div",useHook:hn,useCreateElement:function(e,t,n){return xt(e,t,n)}}),["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_angular","unstable_hasActiveWidget","selectedId","panels","manual","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget","select","setSelectedId","registerPanel","unregisterPanel"]),yn=vn,On=[].concat(yn,["tabId"]),jn=Tt({as:"div",useHook:Mt({name:"TabList",compose:hn,keys:yn,useProps:function(e,t){return Ue({role:"tablist","aria-orientation":e.orientation},t)}}),useCreateElement:function(e,t,n){return xt(e,t,n)}});var wn=Mt({name:"Clickable",compose:rn,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return Ue({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},He(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=He(t,["onKeyDown","onKeyUp"]),c=Object(Ke.useState)(!1),a=c[0],i=c[1],s=Vt(n),u=Vt(r),l=Object(Ke.useCallback)((function(t){var n;if(null===(n=s.current)||void 0===n||n.call(s,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Bt(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Ht(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&i(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=Object(Ke.useCallback)((function(t){var n;if(null===(n=u.current)||void 0===n||n.call(u,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(i(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return Ue({"data-active":a||void 0,onKeyDown:l,onKeyUp:d},o)}}),En=(Tt({as:"button",memo:!0,useHook:wn}),Mt({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=Object(Ke.useContext)(it),r=Object(Ke.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=Object(Ke.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),c=t.id||e.id||""+o+r;return Ue(Ue({},e),{},{id:c})},useProps:function(e,t){return Ue({id:e.id},t)}}));Tt({as:"div",useHook:En});function _n(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function kn(e){var t=zt(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function Sn(e,t){e.value=t}function Rn(e){return e.querySelector("[data-composite-item-widget]")}var Pn=Mt({name:"CompositeItem",compose:[wn,En],keys:fn,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return wn.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=He(e,["currentId","unstable_moves"]),c=t.currentId,a=t.unstable_moves,i=He(t,["currentId","unstable_moves"]);if(c!==n){if(t.id===c||t.id===n)return!1}else if(r!==a)return!1;return wn.unstable_propsAreEqual(o,i)},useOptions:function(e){return Ue(Ue({},e),{},{id:e.id,currentId:rt(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,c=void 0===o?0:o,a=t.onFocus,i=t.onBlurCapture,s=t.onKeyDown,u=t.onClick,l=He(t,["ref","tabIndex","onFocus","onBlurCapture","onKeyDown","onClick"]),d=Object(Ke.useRef)(null),p=e.id,f=e.disabled&&!e.focusable,b=e.currentId===p,m=Vt(b),g=Object(Ke.useRef)(!1),h=function(e){return Object(Ke.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),v=Vt(a),y=Vt(i),O=Vt(s),j=Vt(u),w=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&b||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(Ke.useEffect)((function(){var t;if(p)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:p,ref:d,disabled:!!f}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,p)}}),[p,f,e.registerItem,e.unregisterItem]),Object(Ke.useEffect)((function(){var t=d.current;t&&e.unstable_moves&&m.current&&t.focus()}),[e.unstable_moves]);var E=Object(Ke.useCallback)((function(t){var n,r;if(null===(n=v.current)||void 0===n||n.call(v,t),!t.defaultPrevented&&!Kt(t)&&p&&!function(e,t){if(Bt(e))return!1;for(var n,r=qe(t);!(n=r()).done;){if(n.value.ref.current===e.target)return!0}return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,p),e.unstable_virtual&&e.baseId&&Bt(t))){var o=Ye(t.target).getElementById(e.baseId);o&&(g.current=!0,function(e,t){var n=void 0===t?{}:t,r=n.preventScroll,o=n.isActive,c=void 0===o?kn:o;c(e)||(e.focus({preventScroll:r}),c(e)||requestAnimationFrame((function(){e.focus({preventScroll:r})})))}(o))}}),[p,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),_=Object(Ke.useCallback)((function(t){var n;null===(n=y.current)||void 0===n||n.call(y,t),t.defaultPrevented||e.unstable_virtual&&g.current&&(g.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),k=Object(Ke.useCallback)((function(t){var n;if(Bt(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,c=!!(null==h?void 0:h.groupId),a={ArrowUp:(c||r)&&e.up,ArrowRight:(c||o)&&e.next,ArrowDown:(c||r)&&e.down,ArrowLeft:(c||o)&&e.previous,Home:function(){var n,r;!c||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!c||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;c?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;c?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=O.current)||void 0===n||n.call(O,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var i=Rn(t.currentTarget);i&&_n(i)&&(i.focus(),Sn(i,""))}else if("Delete"===t.key||"Backspace"===t.key){var s=Rn(t.currentTarget);s&&_n(s)&&(t.preventDefault(),Sn(s,""))}}}),[e.orientation,h,e.up,e.next,e.down,e.previous,e.first,e.last]),S=Object(Ke.useCallback)((function(e){var t;if(null===(t=j.current)||void 0===t||t.call(j,e),!e.defaultPrevented){var n=Rn(e.currentTarget);n&&!Wt(n)&&n.focus()}}),[]);return Ue({ref:Lt(d,r),id:p,tabIndex:w?c:-1,"aria-selected":!(!e.unstable_virtual||!b)||void 0,onFocus:E,onBlurCapture:_,onKeyDown:k,onClick:S},l)}});Tt({as:"button",memo:!0,useHook:Pn});var Cn=Tt({as:"button",memo:!0,useHook:Mt({name:"Tab",compose:Pn,keys:vn,useOptions:function(e){var t=e.focusable;return Ue({focusable:void 0===t||t},He(e,["focusable"]))},useProps:function(e,t){var n=t.onClick,r=t.onFocus,o=He(t,["onClick","onFocus"]),c=e.selectedId===e.id,a=function(e){return Object(Ke.useMemo)((function(){var t,n;return(null===(t=e.panels)||void 0===t||null===(n=t.find((function(t){return t.groupId===e.id})))||void 0===n?void 0:n.id)||void 0}),[e.panels,e.id])}(e),i=Vt(n),s=Vt(r),u=Object(Ke.useCallback)((function(t){var n,r;null===(n=i.current)||void 0===n||n.call(i,t),t.defaultPrevented||e.disabled||e.id&&(c||null===(r=e.select)||void 0===r||r.call(e,e.id))}),[e.disabled,c,e.select,e.id]),l=Object(Ke.useCallback)((function(t){var n,r;null===(n=s.current)||void 0===n||n.call(s,t),t.defaultPrevented||e.disabled||e.manual||e.id&&(c||null===(r=e.select)||void 0===r||r.call(e,e.id))}),[e.id,e.disabled,e.manual,c,e.select]);return Ue({role:"tab","aria-selected":c,"aria-controls":a,onClick:u,onFocus:l},o)}})}),xn=Mt({name:"DisclosureContent",compose:Dt,keys:["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],useProps:function(e,t){var n=t.onTransitionEnd,r=t.onAnimationEnd,o=t.style,c=He(t,["onTransitionEnd","onAnimationEnd","style"]),a=e.animated&&e.animating,i=Object(Ke.useState)(null),s=i[0],u=i[1],l=!e.visible&&!a,d=l?Ue({display:"none"},o):o,p=Vt(n),f=Vt(r),b=Object(Ke.useRef)(0);Object(Ke.useEffect)((function(){if(e.animated)return b.current=window.requestAnimationFrame((function(){b.current=window.requestAnimationFrame((function(){e.visible?u("enter"):u(a?"leave":null)}))})),function(){return window.cancelAnimationFrame(b.current)}}),[e.animated,e.visible,a]);var m=Object(Ke.useCallback)((function(t){var n;Bt(t)&&(a&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,a,e.stopAnimation]),g=Object(Ke.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),m(e)}),[m]),h=Object(Ke.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),m(e)}),[m]);return Ue({id:e.baseId,"data-enter":"enter"===s?"":void 0,"data-leave":"leave"===s?"":void 0,onTransitionEnd:g,onAnimationEnd:h,hidden:l,style:d},c)}});Tt({as:"div",useHook:xn});function Nn(e){var t,n,r=null===(t=e.panels)||void 0===t?void 0:t.find((function(t){return t.id===e.id})),o=e.tabId||(null==r?void 0:r.groupId);if(o||!r||!e.panels||!e.items)return o;var c,a,i,s=function(e,t){return e.filter((function(e){return!e.groupId})).indexOf(t)}(e.panels,r);return(null===(n=(c=e.items,a=e.panels,i=a.map((function(e){return e.groupId})).filter(Boolean),c.filter((function(e){return-1===i.indexOf(e.id||void 0)})))[s])||void 0===n?void 0:n.id)||void 0}var In=Tt({as:"div",useHook:Mt({name:"TabPanel",compose:[En,xn],keys:On,useProps:function(e,t){var n=t.ref,r=He(t,["ref"]),o=Object(Ke.useRef)(null),c=Nn(e),a=e.id,i=e.registerPanel,s=e.unregisterPanel;return Object(Ke.useEffect)((function(){if(a)return null==i||i({id:a,ref:o,groupId:c}),function(){null==s||s(a)}}),[c,a,i,s]),Ue({ref:Lt(o,n),role:"tabpanel",tabIndex:0,"aria-labelledby":c},r)},useComposeOptions:function(e){var t=Nn(e);return Ue({visible:!!t&&e.selectedId===t},e)}})}),Tn=(n(247),Object(ge.a)((function(e){var t=e.className,n=e.onSelect,o=void 0===n?function(){return null}:n,c=e.tabs,a=e.activeClass,i=void 0===a?"is-active":a,s=e.initialTabName,u=e.ariaLabel,l=void 0===u?Object(r.__)("Tabbed Content","woo-gutenberg-products-block"):u,d=e.instanceId,p=e.id,f=function(e){void 0===e&&(e={});var t=Ge(e),n=t.selectedId,r=t.loop,o=void 0===r||r,c=t.manual,a=void 0!==c&&c,i=wt(Ue({loop:o,currentId:n},He(t,["selectedId","loop","manual"]))),s=wt(),u=Object(Ke.useState)(n),l=u[0],d=u[1],p=Object(Ke.useCallback)((function(e){i.move(e),d(e)}),[i.move]);return Object(Ke.useEffect)((function(){null!==l&&(i.items.find((function(e){return e.id===l}))||i.currentId&&d(i.currentId))}),[l,i.items,i.currentId]),Ue(Ue({},i),{},{selectedId:l,panels:s.items,manual:a,select:p,setSelectedId:d,registerPanel:Object(Ke.useCallback)((function(e){return s.registerItem(e)}),[s.registerItem]),unregisterPanel:Object(Ke.useCallback)((function(e){return s.unregisterItem(e)}),[s.unregisterItem])})}(s?{selectedId:"".concat(d,"-").concat(s)}:void 0);return 0===c.length?null:React.createElement("div",{className:m()("wc-block-components-tabs",t)},React.createElement(jn,fe()({},f,{id:p,className:"wc-block-components-tabs__list","aria-label":l}),c.map((function(e){var t=e.name,n=e.title,r=e.ariaLabel;return React.createElement(Cn,fe()({},f,{id:"".concat(d,"-").concat(t),manual:!0,className:m()("wc-block-components-tabs__item",I()({},i,"".concat(d,"-").concat(t)===f.selectedId)),onClick:function(){return o(t)},type:"button",key:t,"aria-label":r}),React.createElement("span",{className:"wc-block-components-tabs__item-content"},n))}))),c.map((function(e){var t=e.name,n=e.content;return React.createElement(In,fe()({},f,{key:t,id:"".concat(d,"-").concat(t,"-view"),tabId:"".concat(d,"-").concat(t),className:"wc-block-components-tabs__content"}),f.selectedId==="".concat(d,"-").concat(t)&&n)})))}))),An=n(115),Mn=function(e){var t=e.children,n=e.allowsSaving,o=Object(z.a)().isEditor,c=Object(w.b)(),a=c.shouldSavePayment,i=c.setShouldSavePayment,s=Object(j.b)().customerId;return React.createElement(An.a,{isEditor:o},t,s>0&&n&&React.createElement(he,{className:"wc-block-components-payment-methods__save-card-info",label:Object(r.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i(!a)}}))};function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dn(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ln=function(){var e=Object(w.b)().setActivePaymentMethod,t=Object(E.b)().paymentMethods,n=Object(Le.a)(),o=n.activePaymentMethod,c=me()(n,["activePaymentMethod"]),a=Object(q.a)().noticeContexts,i=Object(F.a)().removeNotice,s=Object(z.a)().isEditor;return React.createElement(Tn,{className:"wc-block-components-checkout-payment-methods",onSelect:function(t){e(t),i("wc-payment-error",a.PAYMENTS)},tabs:Object.keys(t).map((function(e){var n=t[e],r=n.ariaLabel,a=n.edit,i=n.content,u=n.label,l=n.supports,d=s?a:i;return{name:e,title:"string"==typeof u?u:Object(g.cloneElement)(u,{components:c.components}),ariaLabel:r,content:React.createElement(Mn,{allowsSaving:l.savePaymentInfo},Object(g.cloneElement)(d,Fn({activePaymentMethod:o},c)))}})),initialTabName:o,ariaLabel:Object(r.__)("Payment Methods","woo-gutenberg-products-block"),id:"wc-block-payment-methods"})},Vn=n(42),Bn=n.n(Vn),Un=n(117),Hn=n(35),zn=function(e){var t=e.onChange,n=Object(z.a)().isEditor,o=Object(w.b)(),c=o.setPaymentStatus,a=o.customerPaymentMethods,i=o.setActivePaymentMethod,s=Object(g.useState)(""),u=A()(s,2),l=u[0],d=u[1],p=Object(Hn.getPaymentMethods)(),f=Object(g.useRef)([]),b=Object(g.useCallback)((function(e){"0"===e&&c().started(),d(e),t(e)}),[t,d,c]);Object(g.useEffect)((function(){var e=Object.keys(a).flatMap((function(e){return a[e].map((function(t){var n,o=p[t.method.gateway];if(!(null==o||null===(n=o.supports)||void 0===n?void 0:n.savePaymentInfo))return null;var a="cc"===e||"echeck"===e?function(e,t,n){var o=e.method,c=e.expires,a=e.tokenId;return{value:a+"",label:Object(r.sprintf)(Object(r.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-product-blocks"),o.brand,o.last4,c),name:"wc-saved-payment-method-token-".concat(a),onChange:function(e){var r,c="wc-".concat(o.gateway,"-payment-token");t(o.gateway),n().success((r={payment_method:o.gateway},I()(r,c,e),I()(r,"isSavedToken",!0),r))}}}(t,i,c):function(e,t,n){var o=e.method,c=e.tokenId;return{value:c+"",label:Object(r.sprintf)(Object(r.__)("Saved token for %s","woo-gutenberg-products-block"),o.gateway),name:"wc-saved-payment-method-token-".concat(c),onChange:function(e){var r,c="wc-".concat(o.gateway,"-payment-token");t(o.gateway),n().success((r={payment_method:o.gateway},I()(r,c,e),I()(r,"isSavedToken",!0),r))}}}(t,i,c);return t.is_default&&""===l&&(b(t.tokenId+""),a.onChange(t.tokenId)),a}))})).filter(Boolean);f.current=e}),[a,b,l,i,c,p]);var m=n?"0":l+"",h={value:"0",label:Object(r.__)("Use a new payment method","woo-gutenberg-product-blocks"),name:"wc-saved-payment-method-token-new"};return f.current.length>0?React.createElement(Un.a,{id:"wc-payment-method-saved-tokens",selected:m,onChange:b,options:[].concat(Bn()(f.current),[h])}):null},qn=function(){var e=Object(E.b)(),t=e.isInitialized,n=e.paymentMethods,r=Object(g.useState)(!0),o=A()(r,2),c=o[0],a=o[1],i=Object(g.useCallback)((function(e){a("0"===e)}),[a]);return t&&0===Object.keys(n).length?React.createElement(Fe,null):React.createElement(React.Fragment,null,React.createElement(zn,{onChange:i}),c&&React.createElement(Ln,null))},Wn=function(){var e=Object(j.b)().isProcessing,t=Object(a.a)().cartNeedsPayment,n=Object(E.b)().paymentMethods,o=Object(q.a)().noticeContexts;return t?React.createElement(se,{id:"payment-method",disabled:e,className:"wc-block-checkout__payment-method",title:Object(r.__)("Payment method","woo-gutenberg-products-block"),description:Object.keys(n).length>1?Object(r.__)("Select a payment method below.","woo-gutenberg-products-block"):""},React.createElement(i.a,{context:o.PAYMENTS},React.createElement(qn,null))):null},Kn=n(274),Gn=n(153),Yn=n(234),$n=n(38),Xn=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"})),Zn=(n(245),function(){return React.createElement(Ne,{icon:React.createElement(h.a,{srcElement:Xn}),label:Object(r.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},React.createElement("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(r.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),React.createElement(Ie.a,{isDefault:!0,href:"".concat(J.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping"),target:"_blank",rel:"noopener noreferrer"},Object(r.__)("Configure Shipping Options","woo-gutenberg-products-block")))}),Jn=function(e){var t=l.k?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(R.decodeEntities)(e.name),value:e.rate_id,description:Object(R.decodeEntities)(e.description),secondaryLabel:React.createElement($n.a,{currency:Object(Gn.c)(e),value:t}),secondaryDescription:Object(R.decodeEntities)(e.delivery_time)}},Qn=function(){var e=Object(j.b)().isProcessing,t=Object(z.a)().isEditor,n=Object(C.b)(),o=n.shippingRates,c=n.shippingRatesLoading;return n.needsShipping?React.createElement(se,{id:"shipping-option",disabled:e,className:"wc-block-checkout__shipping-option",title:Object(r.__)("Shipping options","woo-gutenberg-products-block"),description:Object(Yn.b)(o)>1?Object(r.__)("Select shipping options below.","woo-gutenberg-products-block"):""},t&&!Object(Yn.a)(o)?React.createElement(Zn,null):React.createElement(Kn.a,{noResultsMessage:Object(r.__)("There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.","woo-gutenberg-products-block"),renderOption:Jn,shippingRates:o,shippingRatesLoading:c})):null},er=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,r=e.showApartmentField,o=e.showCompanyField,c=e.showOrderNotes,a=e.showPhoneField,i=e.allowCreateAccount,s=Object(j.b)().onSubmit;return React.createElement(te,{className:"wc-block-checkout__form",onSubmit:s},React.createElement(_e,{requireCompanyField:t,requirePhoneField:n,showApartmentField:r,showCompanyField:o,showPhoneField:a,allowCreateAccount:i}),React.createElement(Qn,null),React.createElement(Wn,null),React.createElement(Re,{showOrderNotes:c}))},tr=n(180),nr=n(84),rr=n(34),or=n(131),cr=n(225),ar=n(226),ir=n(227),sr=n(228),ur=n(276),lr=n(122),dr=function(e){var t=e.cartItem,n=t.images,o=t.low_stock_remaining,c=void 0===o?null:o,a=t.show_backorder_badge,i=void 0!==a&&a,s=t.name,u=t.permalink,l=t.prices,d=t.quantity,p=t.short_description,f=t.description,b=t.variation,m=Object(Gn.b)(l),g=Object(lr.a)({amount:parseInt(l.raw_prices.price,10),precision:parseInt(l.raw_prices.precision,10)}).multiply(d).convertPrecision(m.minorUnit).getAmount();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(rr.a,{label:d,screenReaderLabel:Object(r.sprintf)(Object(r.__)("%d items","woo-gutenberg-products-block"),d)})),React.createElement(cr.a,{image:n.length?n[0]:{}})),React.createElement("div",{className:"wc-block-components-order-summary-item__description"},React.createElement("div",{className:"wc-block-components-order-summary-item__header"},React.createElement(ar.a,{permalink:u,name:s}),React.createElement(or.a,{currency:m,price:g,priceClassName:"wc-block-components-order-summary-item__total-price"})),i?React.createElement(ir.a,null):!!c&&React.createElement(sr.a,{lowStockRemaining:c}),React.createElement(ur.a,{shortDescription:p,fullDescription:f,variation:b})))},pr=(n(252),function(e){var t=e.cartItems,n=void 0===t?[]:t,o=Object(tr.b)(),c=o.isLarge;return o.hasContainerWidth?React.createElement(nr.a,{className:"wc-block-components-order-summary",initialOpen:c,title:React.createElement("span",{className:"wc-block-components-order-summary__button-text"},Object(r.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},React.createElement("div",{className:"wc-block-components-order-summary__content"},n.map((function(e){return React.createElement(dr,{key:e.key,cartItem:e})})))):null}),fr=n(231),br=n(232),mr=n(233),gr=n(272),hr=n(235),vr=n(236),yr=n(237),Or=n(222),jr=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,r=e.cartItems,o=void 0===r?[]:r,c=e.cartTotals,a=void 0===c?{}:c,i=Object(Or.a)(),s=i.applyCoupon,u=i.removeCoupon,d=i.isApplyingCoupon,p=i.isRemovingCoupon,f=Object(C.b)().needsShipping,b=Object(Gn.c)(a);return React.createElement(React.Fragment,null,React.createElement(pr,{cartItems:o}),React.createElement(fr.a,{currency:b,values:a}),React.createElement(br.a,{currency:b,values:a}),React.createElement(mr.a,{cartCoupons:n,currency:b,isRemovingCoupon:p,removeCoupon:u,values:a}),f&&React.createElement(gr.a,{currency:b,noResultsMessage:null,isCheckout:!0,showCalculator:!1,values:a}),!l.k&&React.createElement(hr.a,{currency:b,values:a}),l.i&&React.createElement(vr.a,{onSubmit:s,initialOpen:!1,isLoading:d}),React.createElement(yr.a,{currency:b,values:a}))},wr=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.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"}),React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"})),Er=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],_r=function(e){var t=e.errorData,n=Object(r.__)("Checkout error","woo-gutenberg-products-block");return Er.includes(t.code)&&(n=Object(r.__)("There is a problem with your cart","woo-gutenberg-products-block")),React.createElement("strong",{className:"wc-block-checkout-error_title"},n)},kr=function(e){var t=e.errorData,n=t.message;return Er.includes(t.code)&&(n=n+" "+Object(r.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),React.createElement("p",{className:"wc-block-checkout-error__description"},n)},Sr=function(e){var t=e.errorData,n=Object(r.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return Er.includes(t.code)&&(n=Object(r.__)("Edit your cart","woo-gutenberg-products-block"),o=l.d),React.createElement("span",{className:"wp-block-button"},React.createElement("a",{href:o,className:"wp-block-button__link"},n))},Rr=function(){var e=Object(J.getSetting)("checkoutData",{}),t={code:e.code||"unknown",message:Object(R.decodeEntities)(e.message)||Object(r.__)("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 React.createElement("div",{className:"wc-block-checkout-error"},React.createElement(h.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:wr,size:100}),React.createElement(_r,{errorData:t}),React.createElement(kr,{errorData:t}),React.createElement(Sr,{errorData:t}))},Pr=(n(242),function(e){var t=e.attributes,n=e.scrollToTop,o=Object(z.a)().isEditor,c=Object(a.a)(),i=c.cartItems,u=c.cartTotals,d=c.cartCoupons,p=c.cartNeedsPayment,f=Object(j.b)(),b=f.hasOrder,h=f.hasError,v=f.isIdle,y=f.customerId,w=Object(s.b)(),E=w.hasValidationErrors,_=w.showAllValidationErrors,k=Object(F.a)().hasNoticesOfType,R=v&&h&&(E||k("default")),C=t.allowCreateAccount&&Object(J.compareWithWooVersion)("4.7.0","<=");if(Object(g.useEffect)((function(){R&&(_(),n({focusableSelector:"input:invalid"}))}),[R,n,_]),!o&&!b)return React.createElement(Rr,null);if(!(o||y||l.e||C))return React.createElement(React.Fragment,null,Object(r.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),React.createElement("a",{href:ve},Object(r.__)("Click here to log in.","woo-gutenberg-products-block")));var x=m()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls});return React.createElement(React.Fragment,null,React.createElement(Y.a,{className:x},React.createElement($.a,{className:"wc-block-checkout__main"},p&&React.createElement(G,null),React.createElement(er,{showApartmentField:t.showApartmentField,showCompanyField:t.showCompanyField,showOrderNotes:t.showOrderNotes,showPhoneField:t.showPhoneField,requireCompanyField:t.requireCompanyField,requirePhoneField:t.requirePhoneField,allowCreateAccount:C}),React.createElement("div",{className:"wc-block-checkout__actions"},t.showReturnToCart&&React.createElement(O,{link:Object(J.getSetting)("page-"+(null==t?void 0:t.cartPageId),!1)}),React.createElement(S,null)),t.showPolicyLinks&&React.createElement(P,null)),React.createElement(X.a,{className:"wc-block-checkout__sidebar"},React.createElement(jr,{cartCoupons:d,cartItems:i,cartTotals:u}))))}),Cr=Object(Z.a)((function(e){return React.createElement(H,null,React.createElement(Pr,e))})),xr={isPreview:{type:"boolean",default:!1,save:!1},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:l.f},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},hasDarkControls:{type:"boolean",default:l.m}},Nr=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.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"})),Ir=function(){return React.createElement("div",{className:"wc-block-checkout-empty"},React.createElement(h.a,{className:"wc-block-checkout-empty__image",alt:"",srcElement:Nr,size:100}),React.createElement("strong",{className:"wc-block-checkout-empty__title"},Object(r.__)("Your cart is empty!","woo-gutenberg-products-block")),React.createElement("p",{className:"wc-block-checkout-empty__description"},Object(r.__)("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")),React.createElement("span",{className:"wp-block-button"},React.createElement("a",{href:l.z,className:"wp-block-button__link"},Object(r.__)("Browse store","woo-gutenberg-products-block"))))},Tr=function(){window.location.reload(!0)};Object(f.a)({selector:".wp-block-woocommerce-checkout",Block:Object(o.a)(Object(c.a)((function(e){var t=Object(a.a)(),n=t.cartItems,o=t.cartIsLoading;return React.createElement(React.Fragment,null,o||0!==n.length?React.createElement(u.a,{header:Object(r.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(d.a)(Object(r.__)("The checkout has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:React.createElement("button",{className:"wc-block-link-button",onClick:Tr})}),showErrorMessage:l.j},React.createElement(i.a,{context:"wc/checkout"},React.createElement(s.a,null,React.createElement(Cr,e)))):React.createElement(Ir,null))}))),getProps:function(e){return{attributes:Object(p.a)(xr,e.dataset)}},getErrorBoundaryProps:function(){return{header:Object(r.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(d.a)(Object(r.__)("The checkout has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:React.createElement("button",{className:"wc-block-link-button",onClick:Tr})}),showErrorMessage:l.j}}})},,,,function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(4),a=n.n(c),i=n(134),s=n(11),u=n.n(s),l=n(8),d=n(0),p=n(1),f=n(17),b=n(5),m=n.n(b),g=n(14),h=n.n(g),v=n(2),y=n(58),O=n(36),j=n(100),w=n(148),E=n(26),_=n(9),k=(n(13),n(103),n(86),n(104));function S(e,t){null!==e&&Object(k.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function R(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,c)}),t)}return o.cancel=r,o}function P(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function C(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function x(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}var N=R((function(){T().textContent=""}),500);function I(e,t){var n=T(t);e&&(n.textContent=e,N())}function T(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)}function A(e,t,n,r){if(-1===t)return e>0?0:n-1;var o=t+e;return o<0?r?n-1:0:o>=n?r?0:n-1:o}function M(e,t,n,r){var o,c=n.map((function(e){return r(e).toLowerCase()})),a=t+1;return(o=c.slice(a).findIndex((function(t){return t.startsWith(e)})))>-1?o+a:c.slice(0,a).findIndex((function(t){return t.startsWith(e)}))}function D(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=r in t?t[r]:e[r],n}),{})}function F(e){return/^\S{1}$/.test(e)}function L(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function V(e,t,n){Object.keys(t).forEach((function(r){!function(e,t,n,r){var o="on"+L(e)+"Change";t[o]&&void 0!==r[e]&&r[e]!==n[e]&&t[o](r)}(r,e,t,n)})),e.onStateChange&&void 0!==n&&e.onStateChange(n)}var B=0;function U(){var e=Object(v.useState)(null),t=e[0],n=e[1];return Object(v.useEffect)((function(){return n(++B)}),[]),t}var H={highlightedIndex:-1,isOpen:!1,selectedItem:null};function z(e,t,n){var r=e.items,o=e.initialHighlightedIndex,c=e.defaultHighlightedIndex,a=t.selectedItem,i=t.highlightedIndex;return void 0!==o&&i>-1?o:void 0!==c?c:a?0===n?r.indexOf(a):A(n,r.indexOf(a),r.length,!1):0===n?-1:n<0?r.length-1:0}function q(e,t){var n="default"+L(t);return n in e?e[n]:H[t]}function W(e,t){if(t in e)return e[t];var n="initial"+L(t);return n in e?e[n]:q(e,t)}a.a.array.isRequired,a.a.func,a.a.func,a.a.func,a.a.bool,a.a.number,a.a.number,a.a.number,a.a.bool,a.a.bool,a.a.bool,a.a.any,a.a.any,a.a.any,a.a.string,a.a.string,a.a.string,a.a.func,a.a.string,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});var K=Object.freeze({__proto__:null,MenuKeyDownArrowDown:0,MenuKeyDownArrowUp:1,MenuKeyDownEscape:2,MenuKeyDownHome:3,MenuKeyDownEnd:4,MenuKeyDownEnter:5,MenuKeyDownCharacter:6,MenuBlur:7,MenuMouseLeave:8,ItemMouseMove:9,ItemClick:10,ToggleButtonKeyDownCharacter:11,ToggleButtonKeyDownArrowDown:12,ToggleButtonKeyDownArrowUp:13,ToggleButtonClick:14,FunctionToggleMenu:15,FunctionOpenMenu:16,FunctionCloseMenu:17,FunctionSetHighlightedIndex:18,FunctionSelectItem:19,FunctionClearKeysSoFar:20,FunctionReset:21});function G(e,t){var n,r=t.type,o=t.props,c=t.shiftKey;switch(r){case 9:n={highlightedIndex:t.index};break;case 10:n={isOpen:q(o,"isOpen"),highlightedIndex:q(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case 7:n={isOpen:!1,highlightedIndex:-1};break;case 0:n={highlightedIndex:A(c?5:1,e.highlightedIndex,o.items.length,o.circularNavigation)};break;case 1:n={highlightedIndex:A(c?-5:-1,e.highlightedIndex,o.items.length,o.circularNavigation)};break;case 3:n={highlightedIndex:0};break;case 4:n={highlightedIndex:o.items.length-1};break;case 2:n={isOpen:!1,highlightedIndex:-1};break;case 5:n=Object(_.a)({isOpen:q(o,"isOpen"),highlightedIndex:q(o,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:o.items[e.highlightedIndex]});break;case 6:var a=t.key,i=""+e.keysSoFar+a,s=M(i,e.highlightedIndex,o.items,o.itemToString);n=Object(_.a)({keysSoFar:i},s>=0&&{highlightedIndex:s});break;case 8:n={highlightedIndex:-1};break;case 11:var u=t.key,l=""+e.keysSoFar+u,d=M(l,e.selectedItem?o.items.indexOf(e.selectedItem):-1,o.items,o.itemToString);n=Object(_.a)({keysSoFar:l},d>=0&&{selectedItem:o.items[d]});break;case 12:n={isOpen:!0,highlightedIndex:z(o,e,1)};break;case 13:n={isOpen:!0,highlightedIndex:z(o,e,-1)};break;case 14:case 15:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:z(o,e,0)};break;case 16:n={isOpen:!0,highlightedIndex:z(o,e,0)};break;case 17:n={isOpen:!1};break;case 18:n={highlightedIndex:t.highlightedIndex};break;case 19:n={selectedItem:t.selectedItem};break;case 20:n={keysSoFar:""};break;case 21:n={highlightedIndex:q(o,"highlightedIndex"),isOpen:q(o,"isOpen"),selectedItem:q(o,"selectedItem")};break;default:throw new Error("Reducer called without proper action type.")}return Object(_.a)({},e,{},n)}var Y={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11yStatusMessage:function(e){var t=e.isOpen,n=e.items;if(!n)return"";var r=n.length;return t?0===r?"No results are available":r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":""},getA11ySelectionMessage:function(e){var t=e.selectedItem;return(0,e.itemToString)(t)+" has been selected."},scrollIntoView:S,environment:"undefined"==typeof window?{}:window};function $(e){void 0===e&&(e={});var t=Object(_.a)({},Y,{},e),n=t.items,r=t.itemToString,o=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,a=t.initialIsOpen,i=t.defaultIsOpen,s=t.scrollIntoView,u=t.environment,l=function(e,t,n){var r=Object(v.useCallback)((function(t,n){t=D(t,n.props);var r=n.props.stateReducer,o=e(t,n),c=r(t,Object(_.a)({},n,{changes:o}));return V(n.props,t,c),c}),[e]),o=Object(v.useReducer)(r,t),c=o[0],a=o[1];return[D(c,n),a]}(G,function(e){var t=W(e,"selectedItem"),n=W(e,"highlightedIndex"),r=W(e,"isOpen");return{highlightedIndex:n<0&&t?e.items.indexOf(t):n,isOpen:r,selectedItem:t,keysSoFar:""}}(t),t),d=l[0],p=d.isOpen,f=d.highlightedIndex,b=d.selectedItem,m=d.keysSoFar,g=l[1],h=function(e){return g(Object(_.a)({props:t},e))},y=function(e,t){var n=void 0===t?{}:t,r=n.id,o=n.labelId,c=n.menuId,a=n.getItemId,i=n.toggleButtonId,s=void 0===r?"downshift-"+e():r;return{labelId:o||s+"-label",menuId:c||s+"-menu",getItemId:a||function(e){return s+"-item-"+e},toggleButtonId:i||s+"-toggle-button"}}(U,t),O=y.labelId,j=y.getItemId,w=y.menuId,k=y.toggleButtonId,S=Object(v.useRef)(null),N=Object(v.useRef)(null),T=Object(v.useRef)();T.current=[];var A=Object(v.useRef)(!0),M=Object(v.useRef)(!0),L=Object(v.useRef)(null);Object(v.useEffect)((function(){A.current||I(o({isOpen:p,items:n,selectedItem:b,itemToString:r}),u.document)}),[p]),Object(v.useEffect)((function(){A.current||I(c({isOpen:p,items:n,selectedItem:b,itemToString:r}),u.document)}),[b]),Object(v.useEffect)((function(){A.current&&(L.current=R((function(){h({type:20})}),500)),m&&L.current()}),[m]),Object(v.useEffect)((function(){A.current?(a||i||p)&&N.current.focus():p?N.current.focus():u.document.activeElement===N.current&&S.current.focus()}),[p]),Object(v.useEffect)((function(){f<0||!p||!T.current.length||(!1===M.current?M.current=!0:s(T.current[f],N.current))}),[f]),Object(v.useEffect)((function(){A.current=!1}),[]);var B={ArrowDown:function(e){e.preventDefault(),h({type:0,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),h({type:1,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),h({type:3})},End:function(e){e.preventDefault(),h({type:4})},Escape:function(){h({type:2})},Enter:function(e){e.preventDefault(),h({type:5})},Tab:function(e){e.shiftKey&&h({type:7})}},H={ArrowDown:function(e){e.preventDefault(),h({type:12})},ArrowUp:function(e){e.preventDefault(),h({type:13})}},z=function(e){var t=x(e);t&&B[t]?B[t](e):F(t)&&h({type:6,key:t})},q=function(e){(function(e,t){return e.relatedTarget===t||e.nativeEvent&&(t===e.nativeEvent.explicitOriginalTarget||t.contains(e.nativeEvent.explicitOriginalTarget))})(e,S.current)||h({type:7})},K=function(){h({type:8})},$=function(){h({type:14})},X=function(e){var t=x(e);t&&H[t]?H[t](e):F(t)&&h({type:11,key:t})};return{getToggleButtonProps:function(e){var t,n=void 0===e?{}:e,r=n.onClick,o=n.onKeyDown,c=n.refKey,a=void 0===c?"ref":c,i=n.ref,s=Object(E.a)(n,["onClick","onKeyDown","refKey","ref"]),u=Object(_.a)(((t={})[a]=C(i,(function(e){S.current=e})),t.id=k,t["aria-haspopup"]="listbox",t["aria-expanded"]=p,t["aria-labelledby"]=O+" "+k,t),s);return s.disabled||(u.onClick=P(r,$),u.onKeyDown=P(o,X)),u},getLabelProps:function(e){return Object(_.a)({id:O,htmlFor:k},e)},getMenuProps:function(e){var t,n=void 0===e?{}:e,r=n.onKeyDown,o=n.onBlur,c=n.onMouseLeave,a=n.refKey,i=void 0===a?"ref":a,s=n.ref,u=Object(E.a)(n,["onKeyDown","onBlur","onMouseLeave","refKey","ref"]);return Object(_.a)(((t={})[i]=C(s,(function(e){N.current=e})),t.id=w,t.role="listbox",t["aria-labelledby"]=O,t.tabIndex=-1,t),f>-1&&{"aria-activedescendant":j(f)},{onKeyDown:P(r,z),onBlur:P(o,q),onMouseLeave:P(c,K)},u)},getItemProps:function(e){var t,r=void 0===e?{}:e,o=r.item,c=r.index,a=r.refKey,i=void 0===a?"ref":a,s=r.ref,u=r.onMouseMove,l=r.onClick,d=Object(E.a)(r,["item","index","refKey","ref","onMouseMove","onClick"]),p=function(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}(c,o,n);if(p<0)throw new Error("Pass either item or item index in getItemProps!");var b=Object(_.a)(((t={})[i]=C(s,(function(e){e&&T.current.push(e)})),t.role="option",t),p===f&&{"aria-selected":!0},{id:j(p)},d);return d.disabled||(b.onMouseMove=P(u,(function(){return function(e){e!==f&&(M.current=!1,h({type:9,index:e}))}(p)})),b.onClick=P(l,(function(){return function(e){h({type:10,index:e})}(p)}))),b},toggleMenu:function(){h({type:15})},openMenu:function(){h({type:16})},closeMenu:function(){h({type:17})},setHighlightedIndex:function(e){h({type:18,highlightedIndex:e})},selectItem:function(e){h({type:19,selectedItem:e})},reset:function(){h({type:21})},highlightedIndex:f,isOpen:p,selectedItem:b}}$.stateChangeTypes=K;var X=n(76),Z=n(68),J=function(e){return e&&e.name},Q=function(e,t){var n=e.selectedItem,r=t.type,o=t.changes,c=t.props.items;switch(r){case $.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:c[n?Math.min(c.indexOf(n)+1,c.length-1):0]};case $.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:c[n?Math.max(c.indexOf(n)-1,0):c.length-1]};default:return o}};function ee(e){var t=e.className,n=e.hideLabelFromVision,r=e.label,o=e.options,c=e.onChange,a=e.value,i=$({initialSelectedItem:o[0],items:o,itemToString:J,onSelectedItemChange:c,selectedItem:a,stateReducer:Q}),s=i.getLabelProps,u=i.getToggleButtonProps,l=i.getMenuProps,p=i.getItemProps,f=i.isOpen,b=i.highlightedIndex,g=i.selectedItem,h=l({className:"components-custom-select-control__menu"});return h["aria-activedescendant"]&&"downshift-null"===h["aria-activedescendant"].slice(0,"downshift-null".length)&&delete h["aria-activedescendant"],Object(d.createElement)("div",{className:m()("components-custom-select-control",t)},Object(d.createElement)("label",s({className:m()("components-custom-select-control__label",{"screen-reader-text":n})}),r),Object(d.createElement)(X.a,u({"aria-label":r,"aria-labelledby":void 0,className:"components-custom-select-control__button"}),J(g),Object(d.createElement)(Z.a,{icon:"arrow-down-alt2",className:"components-custom-select-control__button-icon"})),Object(d.createElement)("ul",h,f&&o.map((function(e,t){return Object(d.createElement)("li",p({item:e,index:t,key:e.key,className:m()("components-custom-select-control__item",{"is-highlighted":t===b}),style:e.style}),e===g&&Object(d.createElement)(Z.a,{icon:"saved",className:"components-custom-select-control__item-icon"}),e.name)}))))}n(133);var te=function(e){var t=e.className,n=e.feedback,r=e.id,o=e.label,c=e.onChange,a=e.options,i=e.value;return React.createElement("div",{id:r,className:m()("wc-block-components-select",t,{"is-active":i})},React.createElement(ee,{label:o,onChange:function(e){var t=e.selectedItem;c(t.key)},options:a,value:i}),n)},ne=Object(j.a)((function(e){var t=e.className,n=e.id,r=e.value,c=e.instanceId,a=e.required,i=e.errorId,s=e.errorMessage,l=void 0===s?Object(p.__)("Please select a value.","woo-gutenberg-products-block"):s,d=h()(e,["className","id","value","instanceId","required","errorId","errorMessage"]),f=n||"select-"+c;i=i||f;var b=Object(O.a)(r),g=Object(y.b)(),j=g.getValidationError,E=g.setValidationErrors,_=g.clearValidationError;Object(v.useEffect)((function(){!a||b?_(i):E(o()({},i,{message:l,hidden:!0}))}),[_,b,i,l,a,E]),Object(v.useEffect)((function(){return function(){_(i)}}),[_,i]);var k=j(i)||{};return React.createElement(te,u()({id:f,className:m()(t,{"has-error":k.message&&!k.hidden}),feedback:React.createElement(w.a,{propertyName:i}),value:b},d))})),re=(n(167),function(e){var t=e.className,n=e.countries,r=e.id,o=e.label,c=e.onChange,a=e.value,i=void 0===a?"":a,s=e.autoComplete,u=void 0===s?"off":s,l=e.required,b=void 0!==l&&l,g=e.errorId,h=e.errorMessage,v=void 0===h?Object(p.__)("Please select a country.","woo-gutenberg-products-block"):h,y=Object(d.useMemo)((function(){return Object.keys(n).map((function(e){return{key:e,name:Object(f.decodeEntities)(n[e])}}))}),[n]);return React.createElement("div",{className:m()(t,"wc-block-components-country-input")},React.createElement(ne,{id:r,label:o,onChange:c,options:y,value:y.find((function(e){return e.key===i})),errorId:g,errorMessage:v,required:b}),"off"!==u&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:u,value:i,onChange:function(e){var t=e.target.value,n=y.find((function(e){return e.key===t}));c(n?n.key:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),oe=function(e){return React.createElement(re,u()({countries:l.x},e))},ce=function(e){return React.createElement(re,u()({countries:l.a},e))},ae=(n(168),function(e){var t=e.className,n=e.id,r=e.states,o=e.country,c=e.label,a=e.onChange,s=e.autoComplete,u=void 0===s?"off":s,l=e.value,b=void 0===l?"":l,g=e.required,h=void 0!==g&&g,v=r[o],y=Object(d.useMemo)((function(){return v?Object.keys(v).map((function(e){return{key:e,name:Object(f.decodeEntities)(v[e])}})):[]}),[v]),O=Object(d.useCallback)((function(e){if(y.length>0){var t=y.find((function(t){return t.key===e||t.name===e}));a(t?t.key:"")}else a(e)}),[a,y]);return y.length>0?React.createElement(React.Fragment,null,React.createElement(ne,{className:m()(t,"wc-block-components-state-input"),id:n,label:c,onChange:O,options:y,value:y.find((function(e){return e.key===b})),errorMessage:Object(p.__)("Please select a state.","woo-gutenberg-products-block"),required:h}),"off"!==u&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:u,value:b,onChange:function(e){return O(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):React.createElement(i.a,{className:t,id:n,label:c,onChange:O,autoComplete:u,value:b,required:h})}),ie=function(e){return React.createElement(ae,u()({states:l.y},e))},se=function(e){return React.createElement(ae,u()({states:l.b},e))},ue=n(90);function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pe={city:{index:9},postcode:{index:7}},fe={state:{required:!1}},be={state:{required:!1,hidden:!0}},me={postcode:{required:!1,hidden:!0}},ge={AE:de(de({},me),fe),AF:be,AO:de(de({},me),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),AT:de(de({},pe),be),AU:{city:{label:Object(p.__)("Suburb","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Suburb (optional)","woo-gutenberg-products-block")},postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},AX:de(de({},pe),be),BD:{postcode:{required:!1},state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}},BE:de(de({},pe),be),BH:de({postcode:{required:!1}},be),BI:be,BO:me,BS:me,CA:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},CH:de(de({},pe),{},{state:{label:Object(p.__)("Canton","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Canton (optional)","woo-gutenberg-products-block"),required:!1}}),CL:{city:{require:!0},postcode:{required:!1},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},CN:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},CO:{postcode:{required:!1}},CZ:be,DE:de(de({},pe),be),DK:de(de({},pe),be),EE:de(de({},pe),be),ES:de(de({},pe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),FI:de(de({},pe),be),FR:de(de({},pe),be),GB:{postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},GP:be,GF:be,GR:fe,HK:{postcode:{required:!1},city:{label:Object(p.__)("Town/District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Town/District (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},HU:{state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},ID:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},IE:{postcode:{label:Object(p.__)("Eircode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Eircode (optional)","woo-gutenberg-products-block"),required:!1},state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},IS:de(de({},pe),be),IL:de(de({},pe),be),IM:be,IT:de(de({},pe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),JP:{first_name:{index:2},last_name:{index:1},address_1:{index:7},address_2:{index:8},postcode:{index:4},city:{index:6},state:{label:Object(p.__)("Prefecture","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Prefecture (optional)","woo-gutenberg-products-block"),index:5}},KR:be,KW:be,LB:be,LI:de(de({},pe),{},{state:{label:Object(p.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}}),LK:be,LU:be,LV:{state:{label:Object(p.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}},MQ:be,MT:be,MZ:de(de({},me),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),NL:de(de({},pe),be),NG:de(de({},me),{},{state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}}),NO:de(de({},pe),be),NP:{postcode:{required:!1},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},NZ:{postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},PL:de(de({},pe),be),PT:be,RE:be,RO:{state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},RS:be,SE:de(de({},pe),be),SG:de({city:{required:!1}},be),SK:de(de({},pe),be),SI:de(de({},pe),be),SR:de({},me),ST:de(de({},me),{},{state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}}),MD:{state:{label:Object(p.__)("Municipality/District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality/District (optional)","woo-gutenberg-products-block")}},TR:de(de({},pe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),UG:de(de({},me),{},{city:{label:Object(p.__)("Town/Village","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Town/Village (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}}),US:{postcode:{label:Object(p.__)("ZIP","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("ZIP (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},VN:de({city:{index:8},postcode:{index:7,required:!1}},be),WS:me,YT:be,ZA:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},ZW:me};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=Object(j.a)((function(e){var t=e.id,n=e.fields,r=void 0===n?Object.keys(ue.a):n,c=e.fieldConfig,a=void 0===c?{}:c,s=e.instanceId,u=e.onChange,l=e.type,f=void 0===l?"shipping":l,b=e.values,m=Object(y.b)(),g=m.getValidationError,h=m.setValidationErrors,v=m.clearValidationError,O=ge[b.country]||{},j=r.map((function(e){return ve(ve(ve({key:e},ue.a[e]),O[e]),a[e])})).sort((function(e,t){return e.index-t.index})),w=g("shipping-missing-country")||{};return Object(d.useEffect)((function(){"shipping"===f&&function(e,t,n,r){r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(p.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&n("shipping-missing-country")}(b,h,v,w.message&&!w.hidden)}),[b,w.message,w.hidden,h,v,f]),t=t||s,React.createElement("div",{id:t,className:"wc-block-components-address-form"},j.map((function(e){if(e.hidden)return null;if("country"===e.key){var n="shipping"===f?oe:ce;return React.createElement(n,{key:e.key,id:"".concat(t,"-").concat(e.key),label:e.required?e.label:e.optionalLabel,value:b.country,autoComplete:e.autocomplete,onChange:function(e){return u(ve(ve({},b),{},{country:e,state:"",city:"",postcode:""}))},errorId:"shipping"===f?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){var r="shipping"===f?ie:se;return React.createElement(r,{key:e.key,id:"".concat(t,"-").concat(e.key),country:b.country,label:e.required?e.label:e.optionalLabel,value:b.state,autoComplete:e.autocomplete,onChange:function(e){return u(ve(ve({},b),{},{state:e}))},errorMessage:e.errorMessage,required:e.required})}return React.createElement(i.a,{key:e.key,id:"".concat(t,"-").concat(e.key),className:"wc-block-components-address-form__".concat(e.key),label:e.required?e.label:e.optionalLabel,value:b[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:function(t){return u(ve(ve({},b),{},o()({},e.key,t)))},errorMessage:e.errorMessage,required:e.required})})))}))},,,,function(e,t,n){"use strict";var r=n(10),o=n.n(r),c=n(1),a=n(8),i=(n(4),n(87)),s=n(6),u=n.n(s),l=n(268),d=n(74),p=n(0),f=n(27),b=n.n(f),m=n(58);n(132);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.address,n=e.onUpdate,r=e.addressFields,a=Object(p.useState)(t),i=o()(a,2),s=i[0],u=i[1],f=Object(m.b)(),g=f.hasValidationErrors,v=f.showAllValidationErrors,y={};return r.forEach((function(e){y[e]=h(h({},y[e]),{},"country"===e?{errorMessage:Object(c.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),required:!0}:{required:!1})})),React.createElement("form",{className:"wc-block-components-shipping-calculator-address"},React.createElement(l.a,{fields:r,fieldConfig:y,onChange:u,values:s}),React.createElement(d.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:b()(s,t),onClick:function(e){if(e.preventDefault(),v(),!g)return n(s)},type:"submit"},Object(c.__)("Update","woo-gutenberg-products-block")))},y=function(e){var t=e.onUpdate,n=void 0===t?function(){}:t,r=e.addressFields,o=void 0===r?["country","state","city","postcode"]:r,c=Object(i.b)(),a=c.shippingAddress,s=c.setShippingAddress;return React.createElement("div",{className:"wc-block-components-shipping-calculator"},React.createElement(v,{address:a,addressFields:o,onUpdate:function(e){s(e),n(e)}}))},O=n(25),j=n.n(O),w=n(17),E=function(e){var t=e.address;if(0===Object.values(t).length)return null;var n="string"==typeof a.x[t.country]?Object(w.decodeEntities)(a.x[t.country]):"",r="object"===j()(a.y[t.country])&&"string"==typeof a.y[t.country][t.state]?Object(w.decodeEntities)(a.y[t.country][t.state]):t.state,o=[];o.push(t.postcode.toUpperCase()),o.push(t.city),o.push(r),o.push(n);var i=o.filter(Boolean).join(", ");return i&&React.createElement("span",{className:"wc-block-components-shipping-address"},Object(c.sprintf)(Object(c.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" ")},_=n(81),k=n(41),S=n(38),R=n(153),P=n(274),C=function(e){var t=a.k?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(w.decodeEntities)(e.name),value:e.rate_id,description:React.createElement(React.Fragment,null,Number.isFinite(t)&&React.createElement(S.a,{currency:Object(R.c)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(w.decodeEntities)(e.delivery_time))}},x=function(e){var t=e.hasRates,n=e.shippingRates,r=e.shippingRatesLoading;return React.createElement("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},React.createElement("legend",{className:"screen-reader-text"},t?Object(c.__)("Shipping options","woo-gutenberg-products-block"):Object(c.__)("Choose a shipping option","woo-gutenberg-products-block")),React.createElement(P.a,{className:"wc-block-components-totals-shipping__options",collapsibleWhenMultiple:!0,noResultsMessage:Object(c.__)("No shipping options were found.","woo-gutenberg-products-block"),renderOption:C,shippingRates:n,shippingRatesLoading:r}))},N=function(e){return e.some((function(e){return e.shipping_rates.length}))};n(166),t.a=function(e){var t=e.currency,n=e.values,r=e.isCheckout,i=void 0!==r&&r,s=e.showCalculator,u=void 0===s||s,l=e.showRatesWithoutAddress,d=void 0!==l&&l,f=Object(p.useState)(!1),b=o()(f,2),m=b[0],g=b[1],h=Object(_.a)(),v=h.shippingRates,O=h.shippingRatesLoading,j=h.hasShippingAddress,w=h.shippingAddress,S=a.k?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),R=N(v)||S,P=d||j;return R||j||i?React.createElement("div",{className:"wc-block-components-totals-shipping"},React.createElement(k.a,{label:Object(c.__)("Shipping","woo-gutenberg-products-block"),value:S||"",description:React.createElement(React.Fragment,null,React.createElement(E,{address:w})," ",u&&React.createElement("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){g(!m)},"aria-expanded":m},Object(c.__)("(change address)","woo-gutenberg-products-block"))),currency:t}),u&&m&&React.createElement(y,{onUpdate:function(){g(!1)}}),!i&&P&&React.createElement(x,{hasRates:R,shippingRates:v,shippingRatesLoading:O})):React.createElement(React.Fragment,null,React.createElement(k.a,{className:"wc-block-components-totals-shipping",label:Object(c.__)("Shipping","woo-gutenberg-products-block"),value:u?React.createElement("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){g(!m)}},Object(c.__)("Calculate","woo-gutenberg-products-block")):React.createElement("em",null,Object(c.__)("Calculated during checkout","woo-gutenberg-products-block"))}),u&&m&&React.createElement(y,{onUpdate:function(){g(!1)}}))}},,function(e,t,n){"use strict";var r=n(1),o=n(2),c=(n(4),n(44)),a=n(66),i=n(234),s=n(14),u=n.n(s),l=n(220),d=n(17),p=n(34),f=n(78),b=n(84),m=n(5),g=n.n(m),h=n(117),v=n(94),y=n(119),O=function(e){var t=e.className,n=e.noResultsMessage,r=e.onChange,o=e.options,c=e.renderOption,a=e.selected;if(0===o.length)return React.createElement(y.a,{isDismissible:!1,className:g()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-message","woocommerce-info")},n);if(o.length>1)return React.createElement(h.a,{className:t,onChange:r,selected:a,options:o.map(c)});var i=c(o[0]),s=i.label,u=i.secondaryLabel,l=i.description,d=i.secondaryDescription;return React.createElement(v.a,{label:s,secondaryLabel:u,description:l,secondaryDescription:d})},j=(n(112),function(e){var t=e.className,n=e.collapsible,o=void 0!==n&&n,c=e.noResultsMessage,a=e.onChange,i=e.renderOption,s=e.selected,u=e.shippingRate,l=e.showItems,m=e.title,h=React.createElement(React.Fragment,null,m&&React.createElement(f.a,{className:"wc-block-components-shipping-rates-control__package-title",headingLevel:"3"},m),l&&React.createElement("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(u.items).map((function(e){var t=Object(d.decodeEntities)(e.name),n=e.quantity;return React.createElement("li",{key:t,className:"wc-block-components-shipping-rates-control__package-item"},React.createElement(p.a,{label:"".concat(t," ×").concat(n),screenReaderLabel:Object(r.sprintf)(Object(r._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),v=React.createElement(O,{className:t,noResultsMessage:c,onChange:a,options:u.shipping_rates,renderOption:i,selected:s});return o?React.createElement(b.a,{className:"wc-block-components-shipping-rates-control__package",hasBorder:!0,initialOpen:!0,title:h},v):React.createElement("div",{className:g()("wc-block-components-shipping-rates-control__package",t)},h,v)}),w=function(e){var t=e.className,n=e.collapsible,r=void 0!==n&&n,o=e.noResultsMessage,c=e.renderOption,a=e.shippingRates,i=void 0===a?[]:a,s=Object(l.a)(i),d=s.selectShippingRate,p=s.selectedShippingRates;return React.createElement("div",{className:"wc-block-components-shipping-rates-control"},i.map((function(e){var n=e.package_id,a=u()(e,["package_id"]);return React.createElement(j,{key:n,className:t,collapsible:r,noResultsMessage:o,onChange:function(e){d(e,n)},renderOption:c,selected:p[n],shippingRate:a,showItems:i.length>1,title:i.length>1?a.name:null})})))};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,s=e.className,u=e.collapsibleWhenMultiple,l=void 0!==u&&u,d=e.noResultsMessage,p=e.renderOption;return Object(o.useEffect)((function(){if(!n){var e=Object(i.a)(t),o=Object(i.b)(t);0===o?Object(c.speak)(Object(r.__)("No shipping options were found.","woo-gutenberg-products-block")):1===e?Object(c.speak)(Object(r.sprintf)(Object(r._n)("%d shipping option was found.","%d shipping options were found.",o,"woo-gutenberg-products-block"),o)):Object(c.speak)(Object(r.sprintf)(Object(r._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(r.sprintf)(Object(r._n)("%d shipping option was found","%d shipping options were found",o,"woo-gutenberg-products-block"),o))}}),[n,t]),React.createElement(a.a,{isLoading:n,screenReaderLabel:Object(r.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},React.createElement(w,{className:s,collapsible:t.length>1&&l,noResultsMessage:d,renderOption:p,shippingRates:t}))}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(6),a=n.n(c),i=n(5),s=n.n(i),u=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},l=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,o=e.alt,c=void 0===o?"":o;return r?React.createElement("img",{className:u(t),src:r,alt:c}):null},d=n(8),p=[{id:"alipay",alt:"Alipay",src:d.E+"img/payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.E+"img/payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.E+"img/payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.E+"img/payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.E+"img/payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.E+"img/payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.E+"img/payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.E+"img/payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.E+"img/payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.E+"img/payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.E+"img/payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.E+"img/payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.E+"img/payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.E+"img/payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.E+"img/payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.E+"img/payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.E+"img/payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.E+"img/payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.E+"img/payment-methods/wechat.svg"}],f=n(25),b=n.n(f);n(175);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icons,n=void 0===t?[]:t,r=e.align,c=void 0===r?"center":r,a=function(e){var t={};return e.forEach((function(e){var n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"===b()(e)&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)}(n);if(0===a.length)return null;var 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});return React.createElement("div",{className:i},a.map((function(e){var t,n=g(g({},e),(t=e.id,p.find((function(e){return e.id===t}))||{}));return React.createElement(l,o()({key:"payment-method-icon-"+e.id},n))})))}},function(e,t,n){"use strict";n(4);var r=n(17),o=n(5),c=n.n(o),a=function(e){var t=e.className,n=e.variation,o=void 0===n?[]:n;if(!o||0===o.length)return null;var a=o.map((function(e){return e.attribute?"".concat(Object(r.decodeEntities)(e.attribute),": ").concat(Object(r.decodeEntities)(e.value)):"".concat(Object(r.decodeEntities)(e.value))})).join(" / ");return React.createElement("div",{className:c()("wc-block-components-product-variation-data",t)},a)},i=n(136),s=n(3),u=function(e){var t=e.className,n=e.shortDescription,r=void 0===n?"":n,o=e.fullDescription,c=r||(void 0===o?"":o);return c?React.createElement(i.a,{className:t,source:c,maxLength:15,countType:Object(s.getSetting)("wordCountType","words")}):null};n(163),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,r=e.fullDescription,o=void 0===r?"":r,c=e.variation,i=void 0===c?[]:c;return React.createElement("div",{className:"wc-block-components-product-metadata"},React.createElement(u,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:o}),React.createElement(a,{className:"wc-block-components-product-metadata__variation-data",variation:i}))}},,function(e,t,n){"use strict";var r=n(50),o=React.createElement(r.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o}]);
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
14 |
+
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,c=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,j=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case a:case s:case i:case b:return e;default:switch(e=e&&e.$$typeof){case l:case f:case h:case g:case u:return e;default:return t}}case c:return t}}}function E(e){return w(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Lazy=h,t.Memo=g,t.Portal=c,t.Profiler=s,t.StrictMode=i,t.Suspense=b,t.isAsyncMode=function(e){return E(e)||w(e)===d},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===h},t.isMemo=function(e){return w(e)===g},t.isPortal=function(e){return w(e)===c},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===s||e===i||e===b||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===f||e.$$typeof===y||e.$$typeof===O||e.$$typeof===j||e.$$typeof===v)},t.typeOf=w},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(1),a=n(38),i=n(5),s=n.n(i),u=(n(4),n(150),function(e){var t=e.className,n=e.currency,r=e.maxPrice,o=e.minPrice,c=e.priceClassName,i=e.priceStyle;return React.createElement("span",{className:t},React.createElement(a.a,{className:s()("wc-block-components-product-price__value",c),currency:n,value:o,style:i})," — ",React.createElement(a.a,{className:s()("wc-block-components-product-price__value",c),currency:n,value:r,style:i}))}),l=function(e){var t=e.className,n=e.currency,r=e.regularPriceClassName,o=e.regularPriceStyle,i=e.regularPrice,u=e.priceClassName,l=e.priceStyle,d=e.price;return React.createElement("span",{className:t},React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:n,renderText:function(e){return React.createElement("del",{className:s()("wc-block-components-product-price__regular",r),style:o},e)},value:i}),React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:n,renderText:function(e){return React.createElement("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:l},e)},value:d}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,c=e.maxPrice,i=void 0===c?null:c,d=e.minPrice,p=void 0===d?null:d,f=e.price,b=void 0===f?null:f,m=e.priceClassName,g=e.priceStyle,h=e.regularPrice,v=e.regularPriceClassName,y=e.regularPriceStyle,O=s()(n,"price","wc-block-components-product-price",o()({},"wc-block-components-product-price--align-".concat(t),t));return h&&b!==h?React.createElement(l,{className:O,currency:r,price:b,priceClassName:m,priceStyle:g,regularPrice:h,regularPriceClassName:v,regularPriceStyle:y}):null!==p&&null!==i?React.createElement(u,{className:O,currency:r,maxPrice:i,minPrice:p,priceClassName:m,priceStyle:g}):null!==b?React.createElement("span",{className:O},React.createElement(a.a,{className:s()("wc-block-components-product-price__value",m),currency:r,value:b,style:g})):React.createElement("span",{className:O},React.createElement("span",{className:s()("wc-block-components-product-price__value",m)}))}},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(10),a=n.n(c),i=n(14),s=n.n(i),u=n(0),l=n(97),d=n(36),p=n(77);n(4);t.a=function(e){var t=e.onChange,n=e.value,r=void 0===n?"":n,c=s()(e,["onChange","value"]),i=Object(u.useState)(r),f=a()(i,2),b=f[0],m=f[1],g=Object(p.a)((function(e){t(e)}),400),h=a()(g,1)[0],v=Object(d.a)(h);return Object(u.useEffect)((function(){v(b)}),[v,b]),React.createElement(l.a,o()({onChange:m,value:b},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(95),c=n(79),a=function(e){var t=e.indexOf("</p>");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},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=i(e),o=r.split(" ").splice(0,t).join(" ");return Object(c.autop)(s(o,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",o=i(e),a=o.slice(0,t);if(n)return Object(c.autop)(s(a,r));var u=a.match(/([\s]+)/g),l=u?u.length:0,d=o.slice(0,t+l);return Object(c.autop)(s(d,r))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,s=e.countType,d=void 0===s?"words":s,p=e.className,f=void 0===p?"":p,b=Object(r.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",r=Object(c.autop)(e),i=Object(o.count)(r,n);if(i<=t)return r;var s=a(r),d=Object(o.count)(s,n);return d<=t?s:"words"===n?u(s,t):l(s,t,"characters_including_spaces"===n)}(t,i,d)}),[t,i,d]);return React.createElement(r.RawHTML,{className:f},b)}},,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(4),n(5)),a=n.n(c),i=n(119),s=n(88),u=(n(109),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(s.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=a()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(i.a,o()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",u(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),o=n(77);function c(e,t){return e===t}function a(e,t,n){var a=n&&n.equalityFn?n.equalityFn:c,i=Object(r.useState)(e),s=i[0],u=i[1],l=Object(o.a)(Object(r.useCallback)((function(e){return u(e)}),[]),t,n),d=l[0],p=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){a(b.current,e)||(d(e),b.current=e)}),[e,d,a]),[s,p,f]}},,,,function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},a=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=a);var t=r.useState(e(null)),n=t[0],o=t[1],i=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:i})}),[i]),n]}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(179),a=n(178),i=n(0),s=n(118),u=n(149),l=n(115);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(){var e=Object(s.a)().isEditor,t=Object(u.b)(),n=t.setActivePaymentMethod,r=t.activePaymentMethod,o=t.paymentMethodData,d=t.setPaymentStatus,f=Object(c.a)(),b=Object(a.a)().paymentMethods,m=Object(i.useRef)(r),g=Object(i.useRef)(o),h=Object(i.useCallback)((function(e){return function(){m.current=r,g.current=o,d().started(),n(e)}}),[r,o,n,d]),v=Object(i.useCallback)((function(){n(m.current),g.current.isSavedToken&&d().success(g.current)}),[n,d]),y=Object.keys(b),O=y.length>0?y.map((function(t){var n=e?b[t].edit:b[t].content;return Object(i.isValidElement)(n)?React.createElement("li",{key:t,id:"express-payment-method-".concat(t)},Object(i.cloneElement)(n,p(p({},f),{},{onClick:h(t),onClose:v}))):null})):React.createElement("li",{key:"noneRegistered"},"No registered Payment Methods");return React.createElement(l.a,{isEditor:e},React.createElement("ul",{className:"wc-block-components-express-payment__event-buttons"},O))}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=(n(4),n(5)),s=n.n(i),u=n(1),l=n(127),d=n(126),p=(n(111),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,c=e.element,i=void 0===c?"li":c,u=e.className,l=void 0===u?"":u,d=e.radius,p=void 0===d?"small":d,f=e.children,b=void 0===f?null:f,m=a()(e,["text","screenReaderText","element","className","radius","children"]),g=i,h=s()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),v=Boolean(r&&r!==t);return React.createElement(g,o()({className:h},m),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,c=void 0===r?"":r,i=e.disabled,f=void 0!==i&&i,b=e.onRemove,m=void 0===b?function(){}:b,g=e.removeOnAnyClick,h=void 0!==g&&g,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,j=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=h?"span":"button";if(!n){var E=O&&"string"==typeof O?O:v;n="string"!=typeof E?Object(u.__)("Remove","woo-gutenberg-products-block"):Object(u.sprintf)(Object(u.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var _={"aria-label":n,disabled:f,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=h?_:{},S=h?{"aria-hidden":!0}:_;return React.createElement(p,o()({},j,k,{className:s()(c,"is-removable"),element:h?"button":j.element,screenReaderText:O,text:v}),React.createElement(w,o()({className:"wc-block-components-chip__remove"},S),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:d.a,size:16})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58),o=(n(4),n(151),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,c=void 0===o?"":o,a=e.elementId,i=void 0===a?"":a,s=Object(r.b)(),u=s.getValidationError,l=s.getValidationErrorId;if(!n){var d=u(c)||{};if(!d.message||d.hidden)return null;n=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(i)},n))})},function(e,t,n){"use strict";n.d(t,"b",(function(){return ye})),n.d(t,"a",(function(){return Oe}));var r=n(42),o=n.n(r),c=n(10),a=n.n(c),i=n(0),s=n(3),u=n(194),l=n(80),d=n(118),p=n(6),f=n.n(p);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},h=m(m({},g),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),v={currentStatus:g.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},y={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:g,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},O=n(25),j=n.n(O);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=h.STARTED,k=h.ERROR,S=h.FAILED,R=h.SUCCESS,P=h.PROCESSING,C=h.PRISTINE,x=h.COMPLETE,N=h.SET_REGISTERED_PAYMENT_METHODS,I=h.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,T=h.SET_SHOULD_SAVE_PAYMENT_METHOD,A=function(e){return!("object"!==j()(e)||!e.isSavedToken)},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.paymentMethodData,o=t.shouldSavePaymentMethod,c=t.errorMessage,a=t.paymentMethods;switch(n){case _:return e.currentStatus!==_?E(E({},e),{},{currentStatus:_}):e;case k:return e.currentStatus!==k?E(E({},e),{},{currentStatus:k,errorMessage:c||e.errorMessage}):e;case S:return e.currentStatus!==S?E(E({},e),{},{currentStatus:S,paymentMethodData:r||e.paymentMethodData,errorMessage:c||e.errorMessage}):e;case R:return e.currentStatus!==R?E(E({},e),{},{currentStatus:R,paymentMethodData:r||e.paymentMethodData,hasSavedToken:A(r)}):e;case P:return e.currentStatus!==P?E(E({},e),{},{currentStatus:P,errorMessage:""}):e;case x:return e.currentStatus!==x?E(E({},e),{},{currentStatus:x}):e;case C:return E(E({},v),{},{currentStatus:C,paymentMethods:E({},e.paymentMethods),expressPaymentMethods:E({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case N:return E(E({},e),{},{paymentMethods:a});case I:return E(E({},e),{},{expressPaymentMethods:E(E({},e.expressPaymentMethods),a)});case T:return E(E({},e),{},{shouldSavePaymentMethod:o})}return e},D=h.ERROR,F=h.FAILED,L=h.SUCCESS,V=h.SET_REGISTERED_PAYMENT_METHODS,B=h.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,U=h.SET_SHOULD_SAVE_PAYMENT_METHOD,H=function(e){return{type:e}},z=function(e){var t=e.errorMessage,n=e.paymentMethodData;return{type:F,errorMessage:t,paymentMethodData:n}},q=function(e){var t=e.paymentMethodData;return{type:L,paymentMethodData:t}},W=n(23),K=n.n(W),G=n(51),Y=n.n(G),$=n(1),X=n(35),Z=n(87),J=n(36),Q=n(81),ee=n(8);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e,t,n,r){var o=Object(i.useState)(!1),c=a()(o,2),s=c[0],u=c[1],p=Object(d.a)().isEditor,b=Object(Z.b)(),m=b.selectedRates,g=b.shippingAddress,h=Object(J.a)(m),v=Object(J.a)(n),y=Object(Q.a)(),O=y.cartTotals,j=y.cartNeedsShipping,w=Object(i.useRef)({cartTotals:O,cartNeedsShipping:j,shippingAddress:g,selectedShippingMethods:h}),E=Object(l.a)().addErrorNotice;Object(i.useEffect)((function(){w.current={cartTotals:O,cartNeedsShipping:j,shippingAddress:g,selectedShippingMethods:h}}),[O,j,g,h]);var _=Object(i.useCallback)(Y()(K.a.mark((function n(){var o,c,a,i,s,l,d;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o={},c=function(e){o=ne(ne({},o),{},f()({},e.name,e))},a=0;case 3:if(!(a<v.length)){n.next=24;break}if(i=v[a],s=t[i]){n.next=8;break}return n.abrupt("continue",21);case 8:return n.prev=8,n.next=11,Promise.resolve(s.canMakePayment(w.current));case 11:if(!(l=n.sent)){n.next=16;break}if(!l.error){n.next=15;break}throw new Error(l.error.message);case 15:c(s);case 16:n.next=21;break;case 18:n.prev=18,n.t0=n.catch(8),(ee.j||p)&&(d=Object($.sprintf)(Object($.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),s.paymentMethodId),E("".concat(d," ").concat(n.t0),{context:r,id:"wc-".concat(s.paymentMethodId,"-registration-error")}));case 21:a++,n.next=3;break;case 24:e(o),u(!0);case 26:case"end":return n.stop()}}),n,null,[[8,18]])}))),[E,e,p,r,v,t]);return Object(i.useEffect)((function(){_()}),[_,h]),s},oe=n(116),ce=n(98),ae=n(113),ie=n(195),se="payment_processing",ue=n(196),le=n(58),de=g.STARTED,pe=g.PROCESSING,fe=g.COMPLETE,be=g.PRISTINE,me=g.ERROR,ge=g.FAILED,he=g.SUCCESS,ve=Object(i.createContext)(y),ye=function(){return Object(i.useContext)(ve)},Oe=function(e){var t=e.children,n=Object(oe.b)().setBillingData,r=Object(ce.b)(),c=r.isProcessing,p=r.isIdle,f=r.isCalculating,b=r.hasError,m=Object(u.a)(),h=m.isSuccessResponse,y=m.isErrorResponse,O=m.isFailResponse,j=m.noticeContexts,w=Object(i.useState)(""),E=a()(w,2),_=E[0],k=E[1],S=Object(i.useReducer)(ae.b,{}),R=a()(S,2),P=R[0],C=R[1],x=Object(i.useRef)(P),N=Object(d.a)(),I=N.isEditor,T=N.previewData,A=Object(i.useReducer)(M,v),F=a()(A,2),L=F[0],W=F[1],K=Object(i.useCallback)((function(e){k(e),W(H(be))}),[k,W]),G=Object(i.useCallback)((function(e){W(function(e){return{type:V,paymentMethods:e}}(e))}),[W]),Y=Object(i.useCallback)((function(e){W(function(e){return{type:B,paymentMethods:e}}(e))}),[W]),$=function(e){var t=Object(X.getPaymentMethods)(),n=Object(u.a)().noticeContexts,r=new Set([].concat(o()(ee.s),o()(Object.keys(t))));return re(e,t,Array.from(r),n.PAYMENTS)}(G),J=function(e){var t=Object(X.getExpressPaymentMethods)(),n=Object(u.a)().noticeContexts;return re(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}(Y),Q=Object(le.b)().setValidationErrors,te=Object(l.a)(),ne=te.addErrorNotice,ye=te.removeNotice,Oe=Object(Z.b)().setShippingAddress,je=Object(i.useCallback)((function(e){W({type:U,shouldSavePaymentMethod:e})}),[W]),we=Object(i.useMemo)((function(){return I&&T.previewSavedPaymentMethods?T.previewSavedPaymentMethods:$&&0!==L.paymentMethods.length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(s.getSetting)("customerPaymentMethods",{}),n=Object.keys(t);if(0===n.length)return{};var r={};return n.forEach((function(n){r[n]=t[n].filter((function(t){return Object.keys(e).includes(t.method.gateway)}))})),r}(L.paymentMethods):{}}),[I,T.previewSavedPaymentMethods,$,L.paymentMethods]),Ee=Object(i.useCallback)((function(e){e?ne(e,{context:j.EXPRESS_PAYMENTS,id:"wc-express-payment-error"}):ye("wc-express-payment-error",j.EXPRESS_PAYMENTS)}),[ne,j.EXPRESS_PAYMENTS,ye]);Object(i.useEffect)((function(){x.current=P}),[P]);var _e=Object(i.useMemo)((function(){return(e=C,{onPaymentProcessing:Object(ie.a)(se,e)}).onPaymentProcessing;var e}),[C]),ke=Object(i.useMemo)((function(){return{isPristine:L.currentStatus===be,isStarted:L.currentStatus===de,isProcessing:L.currentStatus===pe,isFinished:[me,ge,he].includes(L.currentStatus),hasError:L.currentStatus===me,hasFailed:L.currentStatus===ge,isSuccessful:L.currentStatus===he}}),[L.currentStatus]),Se=Object(i.useCallback)((function(){return{started:function(){return W(H(de))},processing:function(){return W(H(pe))},completed:function(){return W(H(fe))},error:function(e){return W(function(e){return{type:D,errorMessage:e}}(e))},failed:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r&&n(r),W(z({errorMessage:e,paymentMethodData:t}))},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&n(t),null!==r&&(null==r?void 0:r.address)&&Oe(r.address),W(q({paymentMethodData:e}))}}}),[W,n,Oe]);Object(i.useEffect)((function(){!c||b||f||ke.isFinished||Se().processing()}),[c,b,f,ke.isFinished,Se]),Object(i.useEffect)((function(){p&&!ke.isSuccessful&&W(H(be))}),[p,ke.isSuccessful]),Object(i.useEffect)((function(){b&&ke.isSuccessful&&!L.hasSavedToken&&W(H(be))}),[b,ke.isSuccessful,L.hasSavedToken]),Object(i.useEffect)((function(){var e=Object.keys(L.paymentMethods),t=[].concat(o()(e),o()(Object.keys(L.expressPaymentMethods)));$&&e.length&&k((function(e){return e&&t.includes(e)?e:(W(H(be)),Object.keys(L.paymentMethods)[0])}))}),[$,L.paymentMethods,L.expressPaymentMethods,k]),Object(i.useEffect)((function(){ke.isProcessing&&(ye("wc-payment-error",j.PAYMENTS),Object(ue.b)(x.current,se,{}).then((function(e){var t,n,r;if(h(e))Se().success(null==e||null===(t=e.meta)||void 0===t?void 0:t.paymentMethodData,null==e||null===(n=e.meta)||void 0===n?void 0:n.billingData,null==e||null===(r=e.meta)||void 0===r?void 0:r.shippingData);else if(O(e)){var o,c;e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||j.PAYMENTS}),Se().failed(null==e?void 0:e.message,null==e||null===(o=e.meta)||void 0===o?void 0:o.paymentMethodData,null==e||null===(c=e.meta)||void 0===c?void 0:c.billingData)}else y(e)?(e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||j.PAYMENTS}),Se().error(e.message),Q(null==e?void 0:e.validationErrors)):Se().success()})))}),[ke.isProcessing,Q,Se,ye,j.PAYMENTS,h,O,y,ne]);var Re={setPaymentStatus:Se,currentStatus:ke,paymentStatuses:g,paymentMethodData:L.paymentMethodData,errorMessage:L.errorMessage,activePaymentMethod:_,setActivePaymentMethod:K,onPaymentProcessing:_e,customerPaymentMethods:we,paymentMethods:L.paymentMethods,expressPaymentMethods:L.expressPaymentMethods,paymentMethodsInitialized:$,expressPaymentMethodsInitialized:J,setExpressPaymentError:Ee,shouldSavePayment:L.shouldSavePaymentMethod,setShouldSavePayment:je};return React.createElement(ve.Provider,{value:Re},t)}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return m}));var r=n(6),o=n.n(r),c=n(25),a=n.n(c),i=n(3);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l,d,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(l=i.CURRENCY.symbol,d=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[d]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},f=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,o=e.currency_decimal_separator,c=e.currency_minor_unit,i=e.currency_prefix,s=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof s?s:""}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},m=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=b(t),o=n/Math.pow(10,r.minorUnit),c=r.prefix+o+r.suffix,a=document.createElement("textarea");return a.innerHTML=c,a.value}},,,,,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){},function(e,t){},function(e,t,n){"use strict";var r,o,c,a,i=n(24),s=n(65),u=n(37),l=n(2),d=/<(\/)?(\w+)\s*(\/)?>/g;function p(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}var f=function(e){var t="object"===Object(s.a)(e),n=t&&Object.values(e);return t&&n.length&&n.every((function(e){return Object(l.isValidElement)(e)}))};function b(e){var t=function(){var e=d.exec(r);if(null===e)return["no-more-tokens"];var t=e.index,n=Object(i.a)(e,4),o=n[0],c=n[1],a=n[2],s=n[3],u=o.length;if(s)return["self-closed",a,t,u];if(c)return["closer",a,t,u];return["opener",a,t,u]}(),n=Object(i.a)(t,4),s=n[0],f=n[1],b=n[2],h=n[3],v=a.length,y=b>o?o:null;if(!e[f])return m(),!1;switch(s){case"no-more-tokens":if(0!==v){var O=a.pop(),j=O.leadingTextStart,w=O.tokenStart;c.push(r.substr(j,w))}return m(),!1;case"self-closed":return 0===v?(null!==y&&c.push(r.substr(y,b-y)),c.push(e[f]),o=b+h,!0):(g(p(e[f],b,h)),o=b+h,!0);case"opener":return a.push(p(e[f],b,h,b+h,y)),o=b+h,!0;case"closer":if(1===v)return function(e){var t=a.pop(),n=t.element,o=t.leadingTextStart,i=t.prevOffset,s=t.tokenStart,d=t.children,p=e?r.substr(i,e-i):r.substr(i);p&&d.push(p);null!==o&&c.push(r.substr(o,s-o));c.push(l.cloneElement.apply(void 0,[n,null].concat(Object(u.a)(d))))}(b),o=b+h,!0;var E=a.pop(),_=r.substr(E.prevOffset,b-E.prevOffset);E.children.push(_),E.prevOffset=b+h;var k=p(E.element,E.tokenStart,E.tokenLength,b+h);return k.children=E.children,g(k),o=b+h,!0;default:return m(),!1}}function m(){var e=r.length-o;0!==e&&c.push(r.substr(o,e))}function g(e){var t=e.element,n=e.tokenStart,o=e.tokenLength,c=e.prevOffset,i=e.children,s=a[a.length-1],d=r.substr(s.prevOffset,n-s.prevOffset);d&&s.children.push(d),s.children.push(l.cloneElement.apply(void 0,[t,null].concat(Object(u.a)(i)))),s.prevOffset=c||n+o}t.a=function(e,t){if(r=e,o=0,c=[],a=[],d.lastIndex=0,!f(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(b(t));return l.createElement.apply(void 0,[l.Fragment,null].concat(Object(u.a)(c)))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a}));var r=n(149),o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(r.b)(),n=t.paymentMethods,o=t.expressPaymentMethods,c=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized;return e?{paymentMethods:o,isInitialized:a}:{paymentMethods:n,isInitialized:c}},c=function(){return o()},a=function(){return o(!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(98),o=n(149),c=n(87),a=n(116),i=n(1),s=n(153),u=n(0),l=n(8),d=n(148),p=n(194),f=n(275),b=n(5),m=n.n(b),g=n(50),h=React.createElement(g.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),v=React.createElement(g.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),y=n(238),O=React.createElement(g.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M0 0h24v24H0z"}),React.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"}),React.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"}))),j=n(127),w=(n(176),{bank:h,bill:v,card:y.a,checkPayment:O}),E=function(e){var t=e.icon,n=void 0===t?"":t,r=e.text,o=void 0===r?"":r,c=!!n,a=c&&"string"==typeof n&&w[n],i=m()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return React.createElement("span",{className:i},a?React.createElement(j.a,{srcElement:w[n]}):n,o)},_=n(81),k=n(222),S=function(e,t){var n=[],r=function(t,n){var r=parseInt(e[n],10);return{label:t,value:r,valueWithTax:r+parseInt(e[n+"_tax"],10)}};return n.push(r(Object(i.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(r(Object(i.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(r(Object(i.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({label:Object(i.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(r(Object(i.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=function(){var e=Object(r.b)(),t=e.isCalculating,n=e.isComplete,b=e.isIdle,m=e.isProcessing,g=e.onCheckoutAfterProcessingWithSuccess,h=e.onCheckoutAfterProcessingWithError,v=e.onCheckoutBeforeProcessing,y=e.onSubmit,O=e.customerId,j=Object(o.b)(),w=j.currentStatus,R=j.activePaymentMethod,P=j.onPaymentProcessing,C=j.setExpressPaymentError,x=Object(c.b)(),N=x.shippingErrorStatus,I=x.shippingErrorTypes,T=x.shippingRates,A=x.shippingRatesLoading,M=x.selectedRates,D=x.setSelectedRates,F=x.isSelectingRate,L=x.shippingAddress,V=x.setShippingAddress,B=x.onShippingRateSuccess,U=x.onShippingRateFail,H=x.onShippingRateSelectSuccess,z=x.onShippingRateSelectFail,q=x.needsShipping,W=Object(a.b)().billingData,K=Object(_.a)().cartTotals,G=Object(k.a)().appliedCoupons,Y=Object(p.a)(),$=Y.noticeContexts,X=Y.responseTypes,Z=Object(u.useRef)(S(K,q)),J=Object(u.useRef)({label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)});return Object(u.useEffect)((function(){Z.current=S(K,q),J.current={label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)}}),[K,q]),{checkoutStatus:{isCalculating:t,isComplete:n,isIdle:b,isProcessing:m},paymentStatus:w,shippingStatus:{shippingErrorStatus:N,shippingErrorTypes:I},shippingData:{shippingRates:T,shippingRatesLoading:A,selectedRates:M,setSelectedRates:D,isSelectingRate:F,shippingAddress:L,setShippingAddress:V,needsShipping:q},billing:{billingData:W,cartTotal:J.current,currency:Object(s.c)(K),cartTotalItems:Z.current,displayPricesIncludingTax:l.k,appliedCoupons:G,customerId:O},eventRegistration:{onCheckoutAfterProcessingWithSuccess:g,onCheckoutAfterProcessingWithError:h,onCheckoutBeforeProcessing:v,onShippingRateSuccess:B,onShippingRateFail:U,onShippingRateSelectSuccess:H,onShippingRateSelectFail:z,onPaymentProcessing:P},components:{ValidationInputError:d.a,PaymentMethodIcons:f.a,PaymentMethodLabel:E},emitResponse:{noticeContexts:$,responseTypes:X},onSubmit:y,activePaymentMethod:R,setExpressPaymentError:C}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return p}));var r=n(10),o=n.n(r),c=(n(4),n(0)),a=n(144),i=n.n(a).a,s=n(5),u=n.n(s),l=Object(c.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),d=function(){return Object(c.useContext)(l)},p=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=function(){var e=i(),t=o()(e,2),n=t[0],r=t[1].width,c="";return r>700?c="is-large":r>520?c="is-medium":r>400?c="is-small":r&&(c="is-mobile"),[n,c]}(),a=o()(c,2),s=a[0],d=a[1],p={hasContainerWidth:""!==d,containerClassName:d,isMobile:"is-mobile"===d,isSmall:"is-small"===d,isMedium:"is-medium"===d,isLarge:"is-large"===d};return React.createElement(l.Provider,{value:p},React.createElement("div",{className:u()(r,d)},s,t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n=[];return Object.keys(e).forEach((function(r){if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default})),n}},,,,function(e,t){},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=function(e,t){return!!e.type&&e.type===t},o={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return r(e,o.SUCCESS)},i=function(e){return r(e,o.ERROR)},s=function(e){return r(e,o.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:o,noticeContexts:c,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(113),o=function(e,t){return function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=r.a.addEventCallback(e,n,o);return t(c),function(){t(r.a.removeEventCallback(e,c.id))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f}));var r=n(23),o=n.n(r),c=n(25),a=n.n(c),i=n(51),s=n.n(i);function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(o.a.mark((function e(t,n,r){var c,i,s,l,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,n),i=[],s=u(c),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(r));case 10:f=e.sent,"object"===a()(f)&&i.push(f),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,n,r){return e.apply(this,arguments)}}(),f=function(){var e=s()(o.a.mark((function e(t,n,r){var c,i,s,l,p;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,n),i=u(c),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(r));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,n,r){return e.apply(this,arguments)}}()},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(6),o=n.n(r),c=n(10),a=n.n(c),i=n(12),s=n(0),u=n(15),l=n(85);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){var t=Object(l.a)(),n=Object(s.useMemo)((function(){return e.map((function(e){var t;return[e.package_id,null===(t=e.shipping_rates.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id]})).reduce((function(e,t){var n=a()(t,2),r=n[0],o=n[1];return o&&(e[r]=o),e}),{})}),[e]),r=Object(s.useState)(n),c=a()(r,2),d=c[0],f=c[1];Object(s.useEffect)((function(){f(n)}),[n]);var b=Object(i.useDispatch)(u.CART_STORE_KEY).selectShippingRate,m=Object(i.useSelect)((function(e){return e(u.CART_STORE_KEY).isShippingRateBeingSelected()}),[]);return{selectShippingRate:function(e,n){f(p(p({},d),{},o()({},n,e))),b(e,n).catch((function(e){t(e)}))},selectedShippingRates:d,isSelectingRate:m}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(6),o=n.n(r),c=n(1),a=n(12),i=n(15),s=n(58),u=n(17),l=n(81),d=n(80);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f=function(){var e=Object(l.a)(),t=e.cartCoupons,n=e.cartIsLoading,r=Object(d.a)(),f=r.addErrorNotice,b=r.addSnackbarNotice,m=Object(s.b)().setValidationErrors;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({appliedCoupons:t,isLoading:n},Object(a.useSelect)((function(e,t){var n=t.dispatch,r=e(i.CART_STORE_KEY),o=r.isApplyingCoupon(),a=r.isRemovingCoupon(),s=n(i.CART_STORE_KEY),l=s.applyCoupon,d=s.removeCoupon,p=s.receiveApplyingCoupon;return{applyCoupon:function(e){l(e).then((function(t){!0===t&&b(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){m({coupon:{message:Object(u.decodeEntities)(e.message),hidden:!1}}),p("")}))},removeCoupon:function(e){d(e).then((function(t){!0===t&&b(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){f(e.message,{id:"coupon-form"}),p("")}))},isApplyingCoupon:o,isRemovingCoupon:a}}),[f,b]))}},function(e,t,n){"use strict";var r=n(5),o=n.n(r),c=(n(4),n(180));n(159);t.a=function(e){var t=e.children,n=e.className;return React.createElement(c.a,{className:o()("wc-block-components-sidebar-layout",n)},t)}},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(4);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-main",n)},t)}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(17),a=n(8);n(4);t.a=function(e){var t=e.image,n=void 0===t?{}:t,r={src:n.thumbnail||a.t,alt:Object(c.decodeEntities)(n.alt)||""};return React.createElement("img",o()({},r,{alt:r.alt}))}},function(e,t,n){"use strict";n(4);var r=n(17);n(161);t.a=function(e){var t=e.name,n=e.permalink,o=e.disabled,c=void 0!==o&&o;return React.createElement("a",{className:"wc-block-components-product-name",href:n,tabIndex:c?-1:0},Object(r.decodeEntities)(t))}},function(e,t,n){"use strict";var r=n(1),o=n(83);t.a=function(){return React.createElement(o.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woo-gutenberg-products-block"))}},function(e,t,n){"use strict";var r=n(1),o=(n(4),n(83));t.a=function(e){var t=e.lowStockRemaining;return t?React.createElement(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(Object(r.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},,function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(4);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-sidebar",n)},t)}},function(e,t,n){"use strict";var r=n(1),o=n(8),c=(n(4),n(41));t.a=function(e){var t=e.currency,n=e.values,a=n.total_items,i=n.total_items_tax,s=parseInt(a,10),u=parseInt(i,10);return React.createElement(c.a,{currency:t,label:Object(r.__)("Subtotal","woo-gutenberg-products-block"),value:o.k?s+u:s})}},function(e,t,n){"use strict";var r=n(1),o=n(8),c=n(87),a=(n(4),n(41));t.a=function(e){var t=e.currency,n=e.values;if(!Object(c.b)().needsShipping)return null;var i=n.total_fees,s=n.total_fees_tax,u=parseInt(i,10);if(!u)return null;var l=parseInt(s,10);return React.createElement(a.a,{className:"wc-block-components-totals-fees",currency:t,label:Object(r.__)("Fees","woo-gutenberg-products-block"),value:o.k?u+l:u})}},function(e,t,n){"use strict";var r=n(1),o=n(8),c=n(66),a=n(147),i=(n(4),n(41));n(165);t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,s=e.currency,u=e.isRemovingCoupon,l=e.removeCoupon,d=e.values,p=d.total_discount,f=d.total_discount_tax,b=parseInt(p,10);if(!b&&0===n.length)return null;var m=parseInt(f,10),g=o.k?b+m:b;return React.createElement(i.a,{className:"wc-block-components-totals-discount",currency:s,description:0!==n.length&&React.createElement(c.a,{screenReaderLabel:Object(r.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},React.createElement("ul",{className:"wc-block-components-totals-discount__coupon-list"},n.map((function(e){return React.createElement(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,screenReaderText:Object(r.sprintf)(Object(r.__)("Coupon: %s","woo-gutenberg-products-block"),e.code),disabled:u,onRemove:function(){l(e.code)},radius:"large",ariaLabel:Object(r.sprintf)(Object(r.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.code)})})))),label:g?Object(r.__)("Discount","woo-gutenberg-products-block"):Object(r.__)("Coupons","woo-gutenberg-products-block"),value:g?-1*g:"-"})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=function(e){return e.length},o=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},function(e,t,n){"use strict";var r=n(1),o=(n(4),n(8)),c=n(41);n(171);t.a=function(e){var t=e.currency,n=e.values,a=n.total_tax,i=n.tax_lines;return o.B?o.l?React.createElement(React.Fragment,null,i.map((function(e,n){var r=e.name,o=e.price;return React.createElement(c.a,{key:"tax-line-".concat(n),className:"wc-block-components-totals-taxes",currency:t,label:r,value:parseInt(o,10)})}))," "):React.createElement(c.a,{className:"wc-block-components-totals-taxes",currency:t,label:Object(r.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(a,10)}):null}},function(e,t,n){"use strict";var r=n(10),o=n.n(r),c=n(1),a=n(0),i=n(74),s=n(97),u=n(34),l=n(148),d=n(66),p=(n(4),n(100)),f=n(58),b=n(84);n(172);t.a=Object(p.a)((function(e){var t=e.instanceId,n=e.isLoading,r=void 0!==n&&n,p=e.initialOpen,m=void 0!==p&&p,g=e.onSubmit,h=void 0===g?function(){}:g,v=Object(a.useState)(""),y=o()(v,2),O=y[0],j=y[1],w=Object(a.useRef)(!1),E=Object(f.b)(),_=E.getValidationError,k=E.getValidationErrorId,S=_("coupon");Object(a.useEffect)((function(){w.current!==r&&(r||!O||S||j(""),w.current=r)}),[r,O,S]);var R="wc-block-components-totals-coupon__input-".concat(t);return React.createElement(b.a,{className:"wc-block-components-totals-coupon",hasBorder:!0,initialOpen:m,title:React.createElement(u.a,{label:Object(c.__)("Coupon Code?","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Introduce Coupon Code","woo-gutenberg-products-block"),htmlFor:R}),titleTag:"h2"},React.createElement(d.a,{screenReaderLabel:Object(c.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:r,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:R,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(c.__)("Enter code","woo-gutenberg-products-block"),value:O,ariaDescribedBy:k(R),onChange:function(e){j(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),React.createElement(i.a,{className:"wc-block-components-totals-coupon__button",disabled:r||!O,showSpinner:r,onClick:function(e){e.preventDefault(),h(O)},type:"submit"},Object(c.__)("Apply","woo-gutenberg-products-block"))),React.createElement(l.a,{propertyName:"coupon",elementId:R}))))}))},function(e,t,n){"use strict";var r=n(1),o=n(8),c=n(177),a=n(38),i=(n(4),n(41)),s=(n(173),o.B&&o.k);t.a=function(e){var t=e.currency,n=e.values,o=n.total_price,u=n.total_tax;return React.createElement(i.a,{className:"wc-block-components-totals-footer-item",currency:t,label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(o,10),description:s&&React.createElement("p",{className:"wc-block-components-totals-footer-item-tax"},Object(c.a)(Object(r.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:React.createElement(a.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,displayType:"text",value:parseInt(u,10)})}))})}},function(e,t,n){"use strict";var r=n(50),o=React.createElement(r.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},,function(e,t,n){"use strict";var r=n(0),o=n(3),c=n(15),a=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("cartData")),Object(a.useSelect)((function(e,t){if(n.current){var r,o,a=e(c.CART_STORE_KEY),i=a.isResolving,s=a.hasFinishedResolution,u=t.dispatch(c.CART_STORE_KEY),l=u.receiveCart,d=u.receiveError,p=u.startResolution,f=u.finishResolution;i("getCartData",[])||s("getCartData",[])||(p("getCartData",[]),(null===(r=n.current)||void 0===r||null===(o=r.code)||void 0===o?void 0:o.includes("error"))?d(n.current):l(n.current),f("getCartData",[]))}}),[]),React.createElement(e,t)}}},function(e,t,n){e.exports=n(264)},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,n){"use strict";n.r(t);var r=n(1),o=n(240),c=n(129),a=n(81),i=n(88),s=n(58),u=n(45),l=n(8),d=n(177),p=n(181),f=n(108),b=n(5),m=n.n(b),g=n(0),h=n(127),v=n(50),y=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},React.createElement("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"})),O=(n(250),function(e){var t=e.link;return React.createElement("a",{href:t||l.d,className:"wc-block-components-checkout-return-to-cart-button"},React.createElement(h.a,{srcElement:y}),Object(r.__)("Return to Cart","woo-gutenberg-products-block"))}),j=n(98),w=n(149),E=n(178),_=n(278),k=n(74),S=function(){var e=function(){var e=Object(j.b)(),t=e.onSubmit,n=e.isCalculating,o=e.isBeforeProcessing,c=e.isProcessing,a=e.isAfterProcessing,i=e.isComplete,s=e.hasError,u=Object(E.b)().paymentMethods[Object(w.b)().activePaymentMethod]||{};return{submitButtonText:(null==u?void 0:u.placeOrderButtonLabel)||Object(r.__)("Place Order","woo-gutenberg-products-block"),onSubmit:t,isCalculating:n,waitingForProcessing:c||a||o,waitingForRedirect:i&&!s}}(),t=e.submitButtonText,n=e.onSubmit,o=e.isCalculating,c=e.waitingForProcessing,a=e.waitingForRedirect;return React.createElement(k.a,{className:"wc-block-components-checkout-place-order-button",onClick:n,disabled:o||c||a,showSpinner:c},a?React.createElement(h.a,{srcElement:_.a,alt:Object(r.__)("Done","woo-gutenberg-products-block")}):t)},R=n(17),P=(n(251),function(){return React.createElement("ul",{className:"wc-block-components-checkout-policies"},l.v&&React.createElement("li",{className:"wc-block-components-checkout-policies__item"},React.createElement("a",{href:l.v,target:"_blank",rel:"noopener noreferrer"},l.u?Object(R.decodeEntities)(l.u):Object(r.__)("Privacy Policy","woo-gutenberg-products-block"))),l.D&&React.createElement("li",{className:"wc-block-components-checkout-policies__item"},React.createElement("a",{href:l.D,target:"_blank",rel:"noopener noreferrer"},l.C?Object(R.decodeEntities)(l.C):Object(r.__)("Terms and Conditions","woo-gutenberg-products-block"))))}),C=n(87),x=n(116),N=n(6),I=n.n(N),T=n(10),A=n.n(T),M=n(57),D=n.n(M),F=n(80);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=function(e,t,n){var r=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),o="wc-".concat(n,"-new-payment-method");return r.push({key:o,value:t}),r},U=function(){var e=Object(j.b)(),t=e.hasError,n=e.onCheckoutBeforeProcessing,o=e.dispatchActions,c=e.redirectUrl,i=e.isProcessing,u=e.isBeforeProcessing,l=e.isComplete,d=e.orderNotes,p=e.shouldCreateAccount,f=Object(s.b)().hasValidationErrors,b=Object(C.b)(),m=b.shippingAddress,h=b.shippingErrorStatus,v=Object(x.b)().billingData,y=Object(a.a)(),O=y.cartNeedsPayment,E=y.receiveCart,_=Object(w.b)(),k=_.activePaymentMethod,S=_.currentStatus,R=_.paymentMethodData,P=_.expressPaymentMethods,N=_.paymentMethods,I=_.shouldSavePayment,T=Object(F.a)(),M=T.addErrorNotice,L=T.removeNotice,U=T.setIsSuppressed,H=Object(g.useRef)(v),z=Object(g.useRef)(m),q=Object(g.useRef)(c),W=Object(g.useState)(!1),K=A()(W,2),G=K[0],Y=K[1],$=Object.keys(P).includes(k),X=Object(g.useMemo)((function(){var e,t=V(V({},P),N);return null==t||null===(e=t[k])||void 0===e?void 0:e.paymentMethodId}),[k,P,N]),Z=f&&!$||S.hasError||h.hasError;Object(g.useEffect)((function(){U($)}),[$,U]),Object(g.useEffect)((function(){Z===t||!i&&!u||$||o.setHasError(Z)}),[Z,t,i,u,$,o]);var J=!t&&!Z&&(S.isSuccessful||!O)&&i;Object(g.useEffect)((function(){H.current=v,z.current=m,q.current=c}),[v,m,c]);var Q=Object(g.useCallback)((function(){return f?{errorMessage:Object(r.__)("Some input fields are invalid.","woo-gutenberg-products-block")}:S.hasError?{errorMessage:Object(r.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!h.hasError||{errorMessage:Object(r.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}}),[f,S.hasError,h.hasError]);Object(g.useEffect)((function(){var e;return $||(e=n(Q,0)),function(){$||e()}}),[n,Q,$]);var ee=Object(g.useCallback)((function(){Y(!0),L("checkout");var e={billing_address:H.current,shipping_address:z.current,customer_note:d,should_create_account:p};O&&(e=V(V({},e),{},{payment_method:X,payment_data:B(R,I,k)})),D()({path:"/wc/store/checkout",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){D.a.setNonce(e.headers),e.json().then((function(t){e.ok||(t.body&&t.body.message?M(t.body.message,{id:"checkout"}):M(Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"checkout"}),o.setHasError()),o.setAfterProcessing(t),Y(!1)}))})).catch((function(e){e.json().then((function(e){var t;(null===(t=e.data)||void 0===t?void 0:t.cart)&&E(e.data.cart),o.setHasError(),o.setAfterProcessing(e),Y(!1)}))}))}),[M,L,X,k,R,I,O,E,o,d,p]);return Object(g.useEffect)((function(){q.current&&(window.location.href=q.current)}),[l]),Object(g.useEffect)((function(){J&&!G&&ee()}),[ee,J,G]),null},H=function(e){var t=e.children,n=e.redirectUrl;return React.createElement(j.a,{redirectUrl:n,isCart:!1},React.createElement(x.a,null,React.createElement(C.a,null,React.createElement(w.a,null,t,React.createElement(U,null)))))},z=n(118),q=n(194),W=n(78),K=n(145),G=(n(174),function(){var e=Object(E.a)(),t=e.paymentMethods,n=e.isInitialized,o=Object(z.a)().isEditor,c=Object(q.a)().noticeContexts;return!n||n&&0===Object.keys(t).length?o||l.j?React.createElement(i.a,{context:c.EXPRESS_PAYMENTS}):null:React.createElement(React.Fragment,null,React.createElement("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},React.createElement("div",{className:"wc-block-components-express-payment__title-container"},React.createElement(W.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(r.__)("Express checkout","woo-gutenberg-products-block"))),React.createElement("div",{className:"wc-block-components-express-payment__content"},React.createElement(i.a,{context:c.EXPRESS_PAYMENTS},React.createElement("p",null,Object(r.__)("In a hurry? Use one of our express checkout options below:","woo-gutenberg-products-block")),React.createElement(K.a,null)))),React.createElement("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(r.__)("Or continue below","woo-gutenberg-products-block")))}),Y=n(223),$=n(224),X=n(230),Z=n(102),J=n(3),Q=n(4),ee=n.n(Q),te=function(e){var t=e.className,n=e.children,r=e.onSubmit,o=void 0===r?function(e){}:r;return React.createElement("form",{className:m()("wc-block-components-form",t),onSubmit:function(e){e.preventDefault(),o(e)}},n)},ne=n(90),re=n(7);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=function(){var e=Object(j.b)().customerId,t=Object(C.b)(),n=t.shippingAddress,r=t.setShippingAddress,o=t.needsShipping,c=Object(x.b)(),a=c.billingData,i=c.setBillingData,s=Object(g.useState)(a),u=A()(s,2),l=u[0],d=u[1],p=Object(g.useState)((function(){return o&&(!e||(t=n,r=a,Object.keys(ne.a).every((function(e){return t[e]===r[e]}))));var t,r})),f=A()(p,2),b=f[0],m=f[1];Object(g.useEffect)((function(){var e=ce(ce({},b?n:l),{},{email:l.email||a.email,phone:l.phone||a.phone});Object(re.isEqual)(e,a)||i(e)}),[l,b,a,n,i,r]);var h=Object(g.useCallback)((function(e){d((function(t){return ce(ce({},t),e)}))}),[]);return{defaultAddressFields:ne.a,shippingFields:n,setShippingFields:r,billingFields:l,setBillingFields:h,setEmail:function(e){h({email:e})},setPhone:function(e){h({phone:e})},shippingAsBilling:b,setShippingAsBilling:m,showBillingFields:!o||!b}},ie=(n(244),function(e){var t=e.title,n=e.stepHeadingContent;return React.createElement("div",{className:"wc-block-components-checkout-step__heading"},React.createElement(W.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&React.createElement("span",{className:"wc-block-components-checkout-step__heading-content"},n))}),se=function(e){var t=e.id,n=e.className,r=e.title,o=e.legend,c=e.description,a=e.children,i=e.disabled,s=void 0!==i&&i,u=e.showStepNumber,l=void 0===u||u,d=e.stepHeadingContent,p=void 0===d?function(){}:d,f=o||r?"fieldset":"div";return React.createElement(f,{className:m()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":l}),id:t,disabled:s},!(!o&&!r)&&React.createElement("legend",{className:"screen-reader-text"},o||r),!!r&&React.createElement(ie,{title:r,stepHeadingContent:p()}),React.createElement("div",{className:"wc-block-components-checkout-step__container"},!!c&&React.createElement("p",{className:"wc-block-components-checkout-step__description"},c),React.createElement("div",{className:"wc-block-components-checkout-step__content"},a)))},ue=n(268),le=function(e){var t=e.addressFieldsConfig,n=e.billingFields,o=e.defaultAddressFields,c=e.setBillingFields,a=Object(j.b)().isProcessing;return React.createElement(se,{id:"billing-fields",disabled:a,className:"wc-block-checkout__billing-fields",title:Object(r.__)("Billing address","woo-gutenberg-products-block"),description:Object(r.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")},React.createElement(ue.a,{id:"billing",onChange:c,type:"billing",values:n,fields:Object.keys(o),fieldConfig:t}))},de=n(134),pe=n(11),fe=n.n(pe),be=n(14),me=n.n(be),ge=n(100),he=(n(243),Object(ge.a)((function(e){var t=e.className,n=e.label,r=e.id,o=e.instanceId,c=e.onChange,a=me()(e,["className","label","id","instanceId","onChange"]),i=r||"checkbox-control-".concat(o);return React.createElement("label",{className:m()("wc-block-components-checkbox",t),htmlFor:i},React.createElement("input",fe()({id:i,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:function(e){return c(e.target.checked)}},a)),React.createElement("svg",{className:"wc-block-components-checkbox__mark","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})),React.createElement("span",{className:"wc-block-components-checkbox__label"},n))}))),ve="".concat(l.r,"?redirect_to=").concat(encodeURIComponent(window.location.href)),ye=function(){var e=Object(j.b)().customerId;return!l.g||e?null:React.createElement(React.Fragment,null,Object(r.__)("Already have an account? ","woo-gutenberg-products-block"),React.createElement("a",{href:ve},Object(r.__)("Log in.","woo-gutenberg-products-block")))},Oe=function(e){var t=e.emailValue,n=e.onChangeEmail,o=e.allowCreateAccount,c=Object(j.b)(),a=c.isProcessing,i=c.customerId,s=c.shouldCreateAccount,u=c.setShouldCreateAccount,d=!i&&o&&l.e&&l.f&&React.createElement(he,{className:"wc-block-checkout__create-account",label:Object(r.__)("Create an account?","woo-gutenberg-products-block"),checked:s,onChange:function(e){return u(e)}});return React.createElement(se,{id:"contact-fields",disabled:a,className:"wc-block-checkout__contact-fields",title:Object(r.__)("Contact information","woo-gutenberg-products-block"),description:Object(r.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block"),stepHeadingContent:function(){return React.createElement(ye,null)}},React.createElement(de.a,{id:"email",type:"email",label:Object(r.__)("Email address","woo-gutenberg-products-block"),value:t,autoComplete:"email",onChange:n,required:!0}),d)},je=function(e){var t=e.addressFieldsConfig,n=e.defaultAddressFields,o=e.billingFields,c=e.setPhone,a=e.shippingAsBilling,i=e.shippingFields,s=e.showPhoneField,u=e.setShippingFields,l=e.setShippingAsBilling,d=e.requirePhoneField,p=Object(j.b)().isProcessing;return React.createElement(se,{id:"shipping-fields",disabled:p,className:"wc-block-checkout__shipping-fields",title:Object(r.__)("Shipping address","woo-gutenberg-products-block"),description:Object(r.__)("Enter the physical address where you want us to deliver your order.","woo-gutenberg-products-block")},React.createElement(ue.a,{id:"shipping",onChange:u,values:i,fields:Object.keys(n),fieldConfig:t}),s&&React.createElement(de.a,{id:"phone",type:"tel",label:d?Object(r.__)("Phone","woo-gutenberg-products-block"):Object(r.__)("Phone (optional)","woo-gutenberg-products-block"),value:o.phone,autoComplete:"tel",onChange:c,required:d}),React.createElement(he,{className:"wc-block-checkout__use-address-for-billing",label:Object(r.__)("Use same address for billing","woo-gutenberg-products-block"),checked:a,onChange:function(e){return l(e)}}))};n(185);function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,r=e.showApartmentField,o=e.showCompanyField,c=e.showPhoneField,a=e.allowCreateAccount,i=ae(),s=i.defaultAddressFields,u=i.billingFields,l=i.setBillingFields,d=i.setEmail,p=i.setPhone,f=i.setShippingAsBilling,b=i.setShippingFields,m=i.shippingAsBilling,h=i.shippingFields,v=i.showBillingFields,y=Object(C.b)().needsShipping,O=Object(g.useMemo)((function(){return{company:Ee(Ee({},s.company),{},{hidden:!o,required:t}),address_2:Ee(Ee({},s.address_2),{},{hidden:!r})}}),[s,o,t,r]);return React.createElement(React.Fragment,null,React.createElement(Oe,{emailValue:u.email,onChangeEmail:d,allowCreateAccount:a}),y&&React.createElement(je,{addressFieldsConfig:O,billingFields:u,defaultAddressFields:s,requirePhoneField:n,setPhone:p,setShippingAsBilling:f,setShippingFields:b,shippingAsBilling:m,shippingFields:h,showPhoneField:c}),v&&React.createElement(le,{addressFieldsConfig:O,billingFields:u,defaultAddressFields:s,setBillingFields:l}))},ke=(n(249),function(e){var t=e.className,n=void 0===t?"":t,r=e.disabled,o=void 0!==r&&r,c=e.onTextChange,a=e.placeholder,i=e.value,s=void 0===i?"":i;return React.createElement("textarea",{className:m()("wc-block-components-textarea",n),disabled:o,onChange:function(e){c(e.target.value)},placeholder:a,rows:2,value:s})});n(248);ke.propTypes={onTextChange:ee.a.func.isRequired,disabled:ee.a.bool,placeholder:ee.a.string,value:ee.a.string};var Se=function(e){var t=e.disabled,n=e.onChange,o=e.placeholder,c=e.value,a=Object(g.useState)(!1),i=A()(a,2),s=i[0],u=i[1],l=Object(g.useState)(""),d=A()(l,2),p=d[0],f=d[1];return React.createElement("div",{className:"wc-block-checkout__add-note"},React.createElement(he,{disabled:t,label:Object(r.__)("Add a note to your order","woo-gutenberg-products-block"),checked:s,onChange:function(e){u(e),e?c!==p&&n(p):(n(""),f(c))}}),s&&React.createElement(ke,{disabled:t,onTextChange:n,placeholder:o,value:c}))},Re=function(e){var t=e.showOrderNotes,n=Object(C.b)().needsShipping,o=Object(j.b)(),c=o.isProcessing,a=o.orderNotes,i=o.dispatchActions.setOrderNotes;return t?React.createElement(se,{id:"order-notes",showStepNumber:!1},React.createElement(Se,{disabled:c,onChange:i,placeholder:n?Object(r.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(r.__)("Notes about your order.","woo-gutenberg-products-block"),value:a})):null},Pe=n(9),Ce=n(29),xe=n(75);var Ne=function(e){var t=e.icon,n=e.children,r=e.label,o=e.instructions,c=e.className,a=e.notices,i=e.preview,s=e.isColumnLayout,u=Object(Ce.a)(e,["icon","children","label","instructions","className","notices","preview","isColumnLayout"]),l=m()("components-placeholder",c),d=m()("components-placeholder__fieldset",{"is-column-layout":s});return Object(g.createElement)("div",Object(Pe.a)({},u,{className:l}),a,i&&Object(g.createElement)("div",{className:"components-placeholder__preview"},i),Object(g.createElement)("div",{className:"components-placeholder__label"},Object(g.createElement)(xe.a,{icon:t}),r),!!o&&Object(g.createElement)("div",{className:"components-placeholder__instructions"},o),Object(g.createElement)("div",{className:d},n))},Ie=n(76),Te=n(119),Ae=n(238),Me=(n(246),function(){return React.createElement(Ne,{icon:React.createElement(h.a,{srcElement:Ae.a}),label:Object(r.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},React.createElement("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(r.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),React.createElement(Ie.a,{isDefault:!0,href:"".concat(J.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout"),target:"_blank",rel:"noopener noreferrer"},Object(r.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),De=function(){return React.createElement(Te.a,{isDismissible:!1,className:m()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(r.__)("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"))},Fe=function(){return Object(z.a)().isEditor?React.createElement(Me,null):React.createElement(De,null)},Le=n(179);function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function He(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qe(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var We,Ke=n(2);function Ge(e){return Object(Ke.useState)(e)[0]}function Ye(e){return e?e.ownerDocument||e:document}try{We=window}catch(e){}function $e(e){return e&&Ye(e).defaultView||We}var Xe,Ze=(Xe=$e(),Boolean(void 0!==Xe&&Xe.document&&Xe.document.createElement)),Je=Ze?Ke.useLayoutEffect:Ke.useEffect;function Qe(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=qe(e);!(t=o()).done;)r();return n}function et(e){for(var t,n=[],r=qe(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function tt(e){return e.slice().reverse()}function nt(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function rt(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=nt(e.items||[]))||void 0===n?void 0:n.id}function ot(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function ct(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function at(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var it=Object(Ke.createContext)(at);function st(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ut(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&st(t.ref.current,e.ref.current)}))}function lt(e){for(var t,n=0,r=qe(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function dt(e){for(var t=Qe(e),n=lt(t),r=[],o=0;o<n;o+=1)for(var c,a=qe(t);!(c=a()).done;){var i=c.value;i[o]&&r.push(Ue(Ue({},i[o]),{},{groupId:i[o].groupId?""+o:void 0}))}return r}function pt(e,t,n){for(var r,o=lt(e),c=qe(e);!(r=c()).done;)for(var a=r.value,i=0;i<o;i+=1){var s=a[i];if(!s||n&&s.disabled){var u=0===i&&n?nt(a):a[i-1];a[i]=u&&t!==(null==u?void 0:u.id)&&n?u:{id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:null==u?void 0:u.groupId}}}return e}var ft={id:null,ref:{current:null}};function bt(e,t){return e.filter((function(e){return e.groupId===t}))}var mt={horizontal:"vertical",vertical:"horizontal"};function gt(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function ht(e){var t=e.map((function(e,t){return[t,e]})),n=!1;return t.sort((function(e,t){var r=e[0],o=e[1],c=t[0],a=t[1],i=o.ref.current,s=a.ref.current;return i&&s?st(i,s)?(r>c&&(n=!0),-1):(r<c&&(n=!0),1):0})),n?t.map((function(e){e[0];return e[1]})):e}function vt(e,t){var n=ht(e);e!==n&&t(n)}function yt(e,t){"function"==typeof IntersectionObserver?function(e,t){var n=Object(Ke.useRef)([]);Object(Ke.useEffect)((function(){for(var r,o=new IntersectionObserver((function(){!!n.current.length&&vt(e,t),n.current=e}),{root:document.body}),c=qe(e);!(r=c()).done;){var a=r.value;a.ref.current&&o.observe(a.ref.current)}return function(){o.disconnect()}}),[e])}(e,t):function(e,t){Object(Ke.useEffect)((function(){var n=setTimeout((function(){return vt(e,t)}),250);return function(){return clearTimeout(n)}}))}(e,t)}function Ot(e,t){var n=e.unstable_virtual,r=e.rtl,o=e.orientation,c=e.items,a=e.groups,i=e.currentId,s=e.loop,u=e.wrap,l=e.pastIds,d=e.unstable_moves,p=e.unstable_angular,f=e.initialVirtual,b=e.initialRTL,m=e.initialOrientation,g=e.initialCurrentId,h=e.initialLoop,v=e.initialWrap,y=e.hasSetCurrentId;switch(t.type){case"registerGroup":var O=t.group;if(0===a.length)return Ue(Ue({},e),{},{groups:[O]});var j=ut(a,O);return Ue(Ue({},e),{},{groups:gt(a,O,j)});case"unregisterGroup":var w=t.id,E=a.filter((function(e){return e.id!==w}));return E.length===a.length?e:Ue(Ue({},e),{},{groups:E});case"registerItem":var _,k=t.item,S=a.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(k.ref.current)})),R=Ue({groupId:null==S?void 0:S.id},k),P=ut(c,R),C=Ue(Ue({},e),{},{items:gt(c,R,P)});return y||d||void 0!==g?C:Ue(Ue({},C),{},{currentId:null===(_=nt(C.items))||void 0===_?void 0:_.id});case"unregisterItem":var x=t.id,N=c.filter((function(e){return e.id!==x}));if(N.length===c.length)return e;var I=l.filter((function(e){return e!==x})),T=Ue(Ue({},e),{},{pastIds:I,items:N});if(i&&i===x){var A=rt(Ue(Ue({},T),{},{currentId:I[0]}));return Ue(Ue({},T),{},{currentId:A})}return T;case"move":var M=t.id;if(void 0===M)return e;var D=l.filter((function(e){return e!==i&&e!==M})),F=i?[i].concat(D):D,L=Ue(Ue({},e),{},{pastIds:F});if(null===M)return Ue(Ue({},L),{},{unstable_moves:d+1,currentId:rt(L,M)});var V=ot(c,M);return Ue(Ue({},L),{},{unstable_moves:V?d+1:d,currentId:rt(L,null==V?void 0:V.id)});case"next":if(null==i)return Ot(e,Ue(Ue({},t),{},{type:"first"}));var B=r&&"vertical"!==o,U=B?tt(c):c,H=U.find((function(e){return e.id===i}));if(!H)return Ot(e,Ue(Ue({},t),{},{type:"first"}));var z=!!H.groupId,q=U.indexOf(H),W=U.slice(q+1),K=bt(W,H.groupId);if(t.allTheWay){var G=nt(B?bt(U,H.groupId):tt(K));return Ot(e,Ue(Ue({},t),{},{type:"move",id:null==G?void 0:G.id}))}var Y=function(e){return e&&mt[e]}(z?o||"horizontal":o),$=s&&s!==Y,X=z&&u&&u!==Y,Z=t.hasNullItem||!z&&$&&null===g;if($){var J=nt(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[ft]:[],e.slice(0,r))}(X&&!Z?U:bt(U,H.groupId),i,Z),i);return Ot(e,Ue(Ue({},t),{},{type:"move",id:null==J?void 0:J.id}))}if(X){var Q=nt(Z?K:W,i),ee=Z?(null==Q?void 0:Q.id)||null:null==Q?void 0:Q.id;return Ot(e,Ue(Ue({},t),{},{type:"move",id:ee}))}var te=nt(K,i);return Ot(e,!te&&Z?Ue(Ue({},t),{},{type:"move",id:null}):Ue(Ue({},t),{},{type:"move",id:null==te?void 0:te.id}));case"previous":var ne=!!!a.length&&null===g,re=Ot(Ue(Ue({},e),{},{items:tt(c)}),Ue(Ue({},t),{},{type:"next",hasNullItem:ne}));return Ue(Ue({},re),{},{items:c});case"down":var oe=dt(et(pt(Qe(c),i,p))),ce=s&&"horizontal"!==s&&null===g,ae=Ot(Ue(Ue({},e),{},{orientation:"vertical",items:oe}),Ue(Ue({},t),{},{type:"next",hasNullItem:ce}));return Ue(Ue({},ae),{},{orientation:o,items:c});case"up":var ie=dt(tt(et(pt(Qe(c),i,p)))),se=null===g,ue=Ot(Ue(Ue({},e),{},{orientation:"vertical",items:ie}),Ue(Ue({},t),{},{type:"next",hasNullItem:se}));return Ue(Ue({},ue),{},{orientation:o,items:c});case"first":var le=nt(c);return Ot(e,Ue(Ue({},t),{},{type:"move",id:null==le?void 0:le.id}));case"last":var de=Ot(Ue(Ue({},e),{},{items:tt(c)}),Ue(Ue({},t),{},{type:"first"}));return Ue(Ue({},de),{},{items:c});case"sort":return Ue(Ue({},e),{},{items:ht(c),groups:ht(a)});case"setVirtual":return Ue(Ue({},e),{},{unstable_virtual:ct(t.virtual,n)});case"setRTL":return Ue(Ue({},e),{},{rtl:ct(t.rtl,r)});case"setOrientation":return Ue(Ue({},e),{},{orientation:ct(t.orientation,o)});case"setCurrentId":var pe=rt(Ue(Ue({},e),{},{currentId:ct(t.currentId,i)}));return Ue(Ue({},e),{},{currentId:pe,hasSetCurrentId:!0});case"setLoop":return Ue(Ue({},e),{},{loop:ct(t.loop,s)});case"setWrap":return Ue(Ue({},e),{},{wrap:ct(t.wrap,u)});case"reset":return Ue(Ue({},e),{},{unstable_virtual:f,rtl:b,orientation:m,currentId:rt(Ue(Ue({},e),{},{currentId:g})),loop:h,wrap:v,unstable_moves:0,pastIds:[]});case"setItems":return Ue(Ue({},e),{},{items:t.items});default:throw new Error}}function jt(e){return Object(Ke.useCallback)(e,[])}function wt(e){void 0===e&&(e={});var t=Ge(e),n=t.unstable_virtual,r=void 0!==n&&n,o=t.rtl,c=void 0!==o&&o,a=t.orientation,i=t.currentId,s=t.loop,u=void 0!==s&&s,l=t.wrap,d=void 0!==l&&l,p=t.unstable_angular,f=void 0!==p&&p,b=He(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap","unstable_angular"]),m=Object(Ke.useReducer)(Ot,{unstable_virtual:r,rtl:c,orientation:a,items:[],groups:[],currentId:i,loop:u,wrap:d,unstable_moves:0,pastIds:[],unstable_angular:f,initialVirtual:r,initialRTL:c,initialOrientation:a,initialCurrentId:i,initialLoop:u,initialWrap:d}),g=m[0],h=(g.pastIds,g.initialVirtual,g.initialRTL,g.initialOrientation,g.initialCurrentId,g.initialLoop,g.initialWrap,g.hasSetCurrentId,He(g,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),v=m[1],y=Object(Ke.useState)(!1),O=y[0],j=y[1],w=function(e){void 0===e&&(e={});var t=Ge(e).baseId,n=Object(Ke.useContext)(it),r=Object(Ke.useRef)(0),o=Object(Ke.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}(b),E=function(){var e=Object(Ke.useRef)(!1);return Je((function(){return function(){e.current=!0}}),[]),e}(),_=Object(Ke.useCallback)((function(e){return v({type:"setItems",items:e})}),[]);return yt(h.items,_),Ue(Ue(Ue({},w),h),{},{unstable_hasActiveWidget:O,unstable_setHasActiveWidget:j,registerItem:jt((function(e){E.current||v({type:"registerItem",item:e})})),unregisterItem:jt((function(e){E.current||v({type:"unregisterItem",id:e})})),registerGroup:jt((function(e){E.current||v({type:"registerGroup",group:e})})),unregisterGroup:jt((function(e){E.current||v({type:"unregisterGroup",id:e})})),move:jt((function(e){return v({type:"move",id:e})})),next:jt((function(e){return v({type:"next",allTheWay:e})})),previous:jt((function(e){return v({type:"previous",allTheWay:e})})),up:jt((function(e){return v({type:"up",allTheWay:e})})),down:jt((function(e){return v({type:"down",allTheWay:e})})),first:jt((function(){return v({type:"first"})})),last:jt((function(){return v({type:"last"})})),sort:jt((function(){return v({type:"sort"})})),unstable_setVirtual:jt((function(e){return v({type:"setVirtual",virtual:e})})),setRTL:jt((function(e){return v({type:"setRTL",rtl:e})})),setOrientation:jt((function(e){return v({type:"setOrientation",orientation:e})})),setCurrentId:jt((function(e){return v({type:"setCurrentId",currentId:e})})),setLoop:jt((function(e){return v({type:"setLoop",loop:e})})),setWrap:jt((function(e){return v({type:"setWrap",wrap:e})})),reset:jt((function(){return v({type:"reset"})}))})}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function St(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pt(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var Ct=Object(Ke.createContext)({});var xt=function(e,t,n){void 0===n&&(n=t.children);var r=Object(Ke.useContext)(Ct);if(r.useCreateElement)return r.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(St(t,["children"]))}return Object(Ke.createElement)(e,t,n)};function Nt(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var a=c[o];t.indexOf(a)>=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function It(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,a=n;c<a.length;c++){var i=a[c];if(e[i]!==t[i])return!1}return!0}function Tt(e){var t,n=e.as,r=e.useHook,o=e.memo,c=e.propsAreEqual,a=void 0===c?null==r?void 0:r.unstable_propsAreEqual:c,i=e.keys,s=void 0===i?(null==r?void 0:r.__keys)||[]:i,u=e.useCreateElement,l=void 0===u?xt:u,d=function(e,t){var o=e.as,c=void 0===o?n:o,a=St(e,["as"]);if(r){var i,u=Nt(a,s),d=u[0],p=u[1],f=r(d,kt({ref:t},p)),b=f.wrapElement,m=St(f,["wrapElement"]),g=(null===(i=c.render)||void 0===i?void 0:i.__keys)||c.__keys,h=g&&Nt(a,g)[0],v=h?kt(kt({},m),h):m,y=l(c,v);return b?b(y):y}return l(c,kt({ref:t},a))};return t=d,d=Object(Ke.forwardRef)(t),o&&(d=function(e,t){return Object(Ke.memo)(e,t)}(d,a)),d.__keys=s,d.unstable_propsAreEqual=a||It,d}function At(e,t){Object(Ke.useDebugValue)(e);var n=Object(Ke.useContext)(Ct);return null!=n[e]?n[e]:t}function Mt(e){var t,n,r,o=(r=e.compose,Array.isArray(r)?r:void 0!==r?[r]:[]),c=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Options";Object(Ke.useDebugValue)(r);var o=At(r);return o?kt(kt({},t),o(t,n)):t}(e.name,t,n)),e.compose)for(var r,c=Pt(o);!(r=c()).done;){t=r.value.__useOptions(t,n)}return t},a=function(t,n,r){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===r&&(r=!1),r||(t=c(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Props";Object(Ke.useDebugValue)(r);var o=At(r);return o?o(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,i=Pt(o);!(a=i()).done;){n=(0,a.value)(t,n,!0)}var s={},u=n||{};for(var l in u)void 0!==u[l]&&(s[l]=u[l]);return s};a.__useOptions=c;var i=o.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return a.__keys=[].concat(i,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),a.unstable_propsAreEqual=e.propsAreEqual||(null===(n=o[0])||void 0===n?void 0:n.unstable_propsAreEqual)||It,a}var Dt=Mt({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=He(e,["unstable_system"]),o=t.unstable_system,c=He(t,["unstable_system"]);return!(n!==o&&!It(n,o))&&It(r,c)}});Tt({as:"div",useHook:Dt});function Ft(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function Lt(e,t){return Object(Ke.useMemo)((function(){return null==e&&null==t?null:function(n){Ft(e,n),Ft(t,n)}}),[e,t])}function Vt(e){var t=Object(Ke.useRef)(e);return Je((function(){t.current=e})),t}function Bt(e){return e.target===e.currentTarget}var Ut=["button","color","file","image","reset","submit"];function Ht(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==Ut.indexOf(t.type)}return!1}function zt(e){var t=Ye(e).activeElement;return(null==t?void 0:t.nodeName)?t:null}function qt(e,t){return e===t||e.contains(t)}function Wt(e){var t=zt(e);if(!t)return!1;if(qt(e,t))return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&(n===e.id||!!e.querySelector("#"+n))}function Kt(e){return!qt(e.currentTarget,e.target)}function Gt(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function Yt(e,t){if("closest"in e)return e.closest(t);do{if(Gt(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}var $t="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Xt(e){return Gt(e,$t)&&function(e){var t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)}function Zt(e){return!!Ze&&-1!==window.navigator.userAgent.indexOf(e)}var Jt=Zt("Mac")&&!Zt("Chrome")&&(Zt("Safari")||Zt("Firefox"));function Qt(e){Wt(e)||e.focus()}function en(){if(Jt){var e=Object(Ke.useState)(null),t=e[0],n=e[1];return Object(Ke.useEffect)((function(){t&&(Qt(t),n(null))}),[t]),Object(Ke.useCallback)((function(e){var t=e.currentTarget;if(!Kt(e)&&Ht(t)){var r=zt(t);if(r){var o="BODY"===r.tagName,c=function(e){for(;e&&!Xt(e);)e=Yt(e,$t);return e}(t.parentElement);if(r===c||o&&!c)n(t);else if(c){c.addEventListener("focusin",(function(){return n(t)}),{once:!0})}else{r.addEventListener("blur",(function(){return Qt(t)}),{once:!0})}}}}),[])}}function tn(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function nn(e,t){return Object(Ke.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var rn=Mt({name:"Tabbable",compose:Dt,keys:["disabled","focusable"],useOptions:function(e,t){return Ue({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,c=t.onMouseDownCapture,a=t.onMouseDown,i=t.onKeyPressCapture,s=t.style,u=He(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),l=Object(Ke.useRef)(null),d=Vt(o),p=Vt(c),f=Vt(a),b=Vt(i),m=!!e.disabled&&!e.focusable,g=Object(Ke.useState)(!0),h=g[0],v=g[1],y=Object(Ke.useState)(!0),O=y[0],j=y[1],w=e.disabled?Ue({pointerEvents:"none"},s):s,E=en();Je((function(){var e,t=l.current;t&&("BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&v(!1),function(e){return"BUTTON"===e.tagName||"INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName}(t)||j(!1))}),[]);var _=nn(d,e.disabled),k=nn(p,e.disabled),S=nn(b,e.disabled),R=Object(Ke.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),e.defaultPrevented||null==E||E(e)}),[e.disabled,E]);return Ue({ref:Lt(l,n),style:w,tabIndex:tn(m,h,O,r),disabled:!(!m||!O)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:_,onMouseDownCapture:k,onMouseDown:R,onKeyPressCapture:S},u)}});Tt({as:"div",useHook:rn});function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){on(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sn(e,t,n){return void 0===n&&(n={}),"function"==typeof FocusEvent?new FocusEvent(t,n):function(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=Ye(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}(e,t,n)}function un(e,t){var n=sn(e,"blur",t),r=e.dispatchEvent(n),o=an(an({},t),{},{bubbles:!0});return e.dispatchEvent(sn(e,"focusout",o)),r}function ln(e,t,n){return e.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var r=Ye(e).createEvent("KeyboardEvent");return r.initKeyboardEvent(t,n.bubbles,n.cancelable,$e(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),r}(e,t,n))}var dn=Ze&&"msCrypto"in window;var pn=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_angular","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"],fn=pn,bn=Ze&&"msCrypto"in window;function mn(e,t,n){var r=Vt(n);return Object(Ke.useCallback)((function(n){var o;if(null===(o=r.current)||void 0===o||o.call(r,n),!n.defaultPrevented&&e&&function(e){return!!Bt(e)&&(!e.metaKey&&"Tab"!==e.key)}(n)){var c=null==t?void 0:t.ref.current;c&&(ln(c,n.type,n)||n.preventDefault(),n.currentTarget.contains(c)&&n.stopPropagation())}}),[e,t])}function gn(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var hn=Mt({name:"Composite",compose:[rn],keys:pn,useOptions:function(e){return Ue(Ue({},e),{},{currentId:rt(e)})},useProps:function(e,t){var n=t.ref,r=t.onFocusCapture,o=t.onFocus,c=t.onBlurCapture,a=t.onKeyDown,i=t.onKeyDownCapture,s=t.onKeyUpCapture,u=He(t,["ref","onFocusCapture","onFocus","onBlurCapture","onKeyDown","onKeyDownCapture","onKeyUpCapture"]),l=Object(Ke.useRef)(null),d=ot(e.items,e.currentId),p=Object(Ke.useRef)(null),f=Vt(r),b=Vt(o),m=Vt(c),g=Vt(a),h=bn?function(e){var t=Object(Ke.useRef)(null);return Object(Ke.useEffect)((function(){var n=Ye(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(l):void 0;Object(Ke.useEffect)((function(){var t=l.current;e.unstable_moves&&!d&&(null==t||t.focus())}),[e.unstable_moves,d]);var v=mn(e.unstable_virtual,d,i),y=mn(e.unstable_virtual,d,s),O=Object(Ke.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==h?void 0:h.current)||t.relatedTarget,o=gn(e.items,r);Bt(t)&&o&&t.stopPropagation()}}),[e.unstable_virtual,e.items]),j=Object(Ke.useCallback)((function(t){var n;if(null===(n=b.current)||void 0===n||n.call(b,t),!t.defaultPrevented)if(e.unstable_virtual){var r=(null==d?void 0:d.ref.current)||null;Bt(t)&&(null==r||r.focus())}else if(Bt(t)){var o;null===(o=e.setCurrentId)||void 0===o||o.call(e,null)}}),[e.unstable_virtual,d,e.setCurrentId]),w=Object(Ke.useCallback)((function(t){var n;if(null===(n=m.current)||void 0===n||n.call(m,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==d?void 0:d.ref.current)||null,o=function(e){return dn?zt(e.currentTarget):e.relatedTarget}(t),c=gn(e.items,o);if(Bt(t)&&c)o===r?(p.current&&p.current!==o&&un(p.current,t),p.current=r):r&&(un(r,t),p.current=o),t.stopPropagation();else!gn(e.items,t.target)&&r&&un(r,t)}}),[e.unstable_virtual,e.items,d]),E=Object(Ke.useCallback)((function(t){var n,r;if(null===(n=g.current)||void 0===n||n.call(g,t),!t.defaultPrevented&&null===e.currentId&&Bt(t)){var o="horizontal"!==e.orientation,c="vertical"!==e.orientation,a=!!(null===(r=e.groups)||void 0===r?void 0:r.length),i={ArrowUp:(a||o)&&function(){if(a){var t,n=nt(et(tt(Qe(e.items))));if(null==n?void 0:n.id)null===(t=e.move)||void 0===t||t.call(e,n.id)}else{var r;null===(r=e.last)||void 0===r||r.call(e)}},ArrowRight:(a||c)&&e.first,ArrowDown:(a||o)&&e.first,ArrowLeft:(a||c)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];i&&(t.preventDefault(),i())}}),[e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Ue({ref:Lt(l,n),id:e.baseId,onFocus:j,onFocusCapture:O,onBlurCapture:w,onKeyDownCapture:v,onKeyDown:E,onKeyUpCapture:y,"aria-activedescendant":e.unstable_virtual&&(null==d?void 0:d.id)||void 0},u)},useComposeProps:function(e,t){t=Dt(e,t,!0);var n=rn(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Ue(Ue({},t),{},{ref:n.ref})}}),vn=(Tt({as:"div",useHook:hn,useCreateElement:function(e,t,n){return xt(e,t,n)}}),["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_angular","unstable_hasActiveWidget","selectedId","panels","manual","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget","select","setSelectedId","registerPanel","unregisterPanel"]),yn=vn,On=[].concat(yn,["tabId"]),jn=Tt({as:"div",useHook:Mt({name:"TabList",compose:hn,keys:yn,useProps:function(e,t){return Ue({role:"tablist","aria-orientation":e.orientation},t)}}),useCreateElement:function(e,t,n){return xt(e,t,n)}});var wn=Mt({name:"Clickable",compose:rn,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return Ue({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},He(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=He(t,["onKeyDown","onKeyUp"]),c=Object(Ke.useState)(!1),a=c[0],i=c[1],s=Vt(n),u=Vt(r),l=Object(Ke.useCallback)((function(t){var n;if(null===(n=s.current)||void 0===n||n.call(s,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Bt(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Ht(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&i(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=Object(Ke.useCallback)((function(t){var n;if(null===(n=u.current)||void 0===n||n.call(u,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(i(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return Ue({"data-active":a||void 0,onKeyDown:l,onKeyUp:d},o)}}),En=(Tt({as:"button",memo:!0,useHook:wn}),Mt({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=Object(Ke.useContext)(it),r=Object(Ke.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=Object(Ke.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),c=t.id||e.id||""+o+r;return Ue(Ue({},e),{},{id:c})},useProps:function(e,t){return Ue({id:e.id},t)}}));Tt({as:"div",useHook:En});function _n(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function kn(e){var t=zt(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function Sn(e,t){e.value=t}function Rn(e){return e.querySelector("[data-composite-item-widget]")}var Pn=Mt({name:"CompositeItem",compose:[wn,En],keys:fn,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return wn.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=He(e,["currentId","unstable_moves"]),c=t.currentId,a=t.unstable_moves,i=He(t,["currentId","unstable_moves"]);if(c!==n){if(t.id===c||t.id===n)return!1}else if(r!==a)return!1;return wn.unstable_propsAreEqual(o,i)},useOptions:function(e){return Ue(Ue({},e),{},{id:e.id,currentId:rt(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,c=void 0===o?0:o,a=t.onFocus,i=t.onBlurCapture,s=t.onKeyDown,u=t.onClick,l=He(t,["ref","tabIndex","onFocus","onBlurCapture","onKeyDown","onClick"]),d=Object(Ke.useRef)(null),p=e.id,f=e.disabled&&!e.focusable,b=e.currentId===p,m=Vt(b),g=Object(Ke.useRef)(!1),h=function(e){return Object(Ke.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),v=Vt(a),y=Vt(i),O=Vt(s),j=Vt(u),w=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&b||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(Ke.useEffect)((function(){var t;if(p)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:p,ref:d,disabled:!!f}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,p)}}),[p,f,e.registerItem,e.unregisterItem]),Object(Ke.useEffect)((function(){var t=d.current;t&&e.unstable_moves&&m.current&&t.focus()}),[e.unstable_moves]);var E=Object(Ke.useCallback)((function(t){var n,r;if(null===(n=v.current)||void 0===n||n.call(v,t),!t.defaultPrevented&&!Kt(t)&&p&&!function(e,t){if(Bt(e))return!1;for(var n,r=qe(t);!(n=r()).done;){if(n.value.ref.current===e.target)return!0}return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,p),e.unstable_virtual&&e.baseId&&Bt(t))){var o=Ye(t.target).getElementById(e.baseId);o&&(g.current=!0,function(e,t){var n=void 0===t?{}:t,r=n.preventScroll,o=n.isActive,c=void 0===o?kn:o;c(e)||(e.focus({preventScroll:r}),c(e)||requestAnimationFrame((function(){e.focus({preventScroll:r})})))}(o))}}),[p,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),_=Object(Ke.useCallback)((function(t){var n;null===(n=y.current)||void 0===n||n.call(y,t),t.defaultPrevented||e.unstable_virtual&&g.current&&(g.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),k=Object(Ke.useCallback)((function(t){var n;if(Bt(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,c=!!(null==h?void 0:h.groupId),a={ArrowUp:(c||r)&&e.up,ArrowRight:(c||o)&&e.next,ArrowDown:(c||r)&&e.down,ArrowLeft:(c||o)&&e.previous,Home:function(){var n,r;!c||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!c||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;c?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;c?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=O.current)||void 0===n||n.call(O,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var i=Rn(t.currentTarget);i&&_n(i)&&(i.focus(),Sn(i,""))}else if("Delete"===t.key||"Backspace"===t.key){var s=Rn(t.currentTarget);s&&_n(s)&&(t.preventDefault(),Sn(s,""))}}}),[e.orientation,h,e.up,e.next,e.down,e.previous,e.first,e.last]),S=Object(Ke.useCallback)((function(e){var t;if(null===(t=j.current)||void 0===t||t.call(j,e),!e.defaultPrevented){var n=Rn(e.currentTarget);n&&!Wt(n)&&n.focus()}}),[]);return Ue({ref:Lt(d,r),id:p,tabIndex:w?c:-1,"aria-selected":!(!e.unstable_virtual||!b)||void 0,onFocus:E,onBlurCapture:_,onKeyDown:k,onClick:S},l)}});Tt({as:"button",memo:!0,useHook:Pn});var Cn=Tt({as:"button",memo:!0,useHook:Mt({name:"Tab",compose:Pn,keys:vn,useOptions:function(e){var t=e.focusable;return Ue({focusable:void 0===t||t},He(e,["focusable"]))},useProps:function(e,t){var n=t.onClick,r=t.onFocus,o=He(t,["onClick","onFocus"]),c=e.selectedId===e.id,a=function(e){return Object(Ke.useMemo)((function(){var t,n;return(null===(t=e.panels)||void 0===t||null===(n=t.find((function(t){return t.groupId===e.id})))||void 0===n?void 0:n.id)||void 0}),[e.panels,e.id])}(e),i=Vt(n),s=Vt(r),u=Object(Ke.useCallback)((function(t){var n,r;null===(n=i.current)||void 0===n||n.call(i,t),t.defaultPrevented||e.disabled||e.id&&(c||null===(r=e.select)||void 0===r||r.call(e,e.id))}),[e.disabled,c,e.select,e.id]),l=Object(Ke.useCallback)((function(t){var n,r;null===(n=s.current)||void 0===n||n.call(s,t),t.defaultPrevented||e.disabled||e.manual||e.id&&(c||null===(r=e.select)||void 0===r||r.call(e,e.id))}),[e.id,e.disabled,e.manual,c,e.select]);return Ue({role:"tab","aria-selected":c,"aria-controls":a,onClick:u,onFocus:l},o)}})}),xn=Mt({name:"DisclosureContent",compose:Dt,keys:["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],useProps:function(e,t){var n=t.onTransitionEnd,r=t.onAnimationEnd,o=t.style,c=He(t,["onTransitionEnd","onAnimationEnd","style"]),a=e.animated&&e.animating,i=Object(Ke.useState)(null),s=i[0],u=i[1],l=!e.visible&&!a,d=l?Ue({display:"none"},o):o,p=Vt(n),f=Vt(r),b=Object(Ke.useRef)(0);Object(Ke.useEffect)((function(){if(e.animated)return b.current=window.requestAnimationFrame((function(){b.current=window.requestAnimationFrame((function(){e.visible?u("enter"):u(a?"leave":null)}))})),function(){return window.cancelAnimationFrame(b.current)}}),[e.animated,e.visible,a]);var m=Object(Ke.useCallback)((function(t){var n;Bt(t)&&(a&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,a,e.stopAnimation]),g=Object(Ke.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),m(e)}),[m]),h=Object(Ke.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),m(e)}),[m]);return Ue({id:e.baseId,"data-enter":"enter"===s?"":void 0,"data-leave":"leave"===s?"":void 0,onTransitionEnd:g,onAnimationEnd:h,hidden:l,style:d},c)}});Tt({as:"div",useHook:xn});function Nn(e){var t,n,r=null===(t=e.panels)||void 0===t?void 0:t.find((function(t){return t.id===e.id})),o=e.tabId||(null==r?void 0:r.groupId);if(o||!r||!e.panels||!e.items)return o;var c,a,i,s=function(e,t){return e.filter((function(e){return!e.groupId})).indexOf(t)}(e.panels,r);return(null===(n=(c=e.items,a=e.panels,i=a.map((function(e){return e.groupId})).filter(Boolean),c.filter((function(e){return-1===i.indexOf(e.id||void 0)})))[s])||void 0===n?void 0:n.id)||void 0}var In=Tt({as:"div",useHook:Mt({name:"TabPanel",compose:[En,xn],keys:On,useProps:function(e,t){var n=t.ref,r=He(t,["ref"]),o=Object(Ke.useRef)(null),c=Nn(e),a=e.id,i=e.registerPanel,s=e.unregisterPanel;return Object(Ke.useEffect)((function(){if(a)return null==i||i({id:a,ref:o,groupId:c}),function(){null==s||s(a)}}),[c,a,i,s]),Ue({ref:Lt(o,n),role:"tabpanel",tabIndex:0,"aria-labelledby":c},r)},useComposeOptions:function(e){var t=Nn(e);return Ue({visible:!!t&&e.selectedId===t},e)}})}),Tn=(n(247),Object(ge.a)((function(e){var t=e.className,n=e.onSelect,o=void 0===n?function(){return null}:n,c=e.tabs,a=e.activeClass,i=void 0===a?"is-active":a,s=e.initialTabName,u=e.ariaLabel,l=void 0===u?Object(r.__)("Tabbed Content","woo-gutenberg-products-block"):u,d=e.instanceId,p=e.id,f=function(e){void 0===e&&(e={});var t=Ge(e),n=t.selectedId,r=t.loop,o=void 0===r||r,c=t.manual,a=void 0!==c&&c,i=wt(Ue({loop:o,currentId:n},He(t,["selectedId","loop","manual"]))),s=wt(),u=Object(Ke.useState)(n),l=u[0],d=u[1],p=Object(Ke.useCallback)((function(e){i.move(e),d(e)}),[i.move]);return Object(Ke.useEffect)((function(){null!==l&&(i.items.find((function(e){return e.id===l}))||i.currentId&&d(i.currentId))}),[l,i.items,i.currentId]),Ue(Ue({},i),{},{selectedId:l,panels:s.items,manual:a,select:p,setSelectedId:d,registerPanel:Object(Ke.useCallback)((function(e){return s.registerItem(e)}),[s.registerItem]),unregisterPanel:Object(Ke.useCallback)((function(e){return s.unregisterItem(e)}),[s.unregisterItem])})}(s?{selectedId:"".concat(d,"-").concat(s)}:void 0);return 0===c.length?null:React.createElement("div",{className:m()("wc-block-components-tabs",t)},React.createElement(jn,fe()({},f,{id:p,className:"wc-block-components-tabs__list","aria-label":l}),c.map((function(e){var t=e.name,n=e.title,r=e.ariaLabel;return React.createElement(Cn,fe()({},f,{id:"".concat(d,"-").concat(t),manual:!0,className:m()("wc-block-components-tabs__item",I()({},i,"".concat(d,"-").concat(t)===f.selectedId)),onClick:function(){return o(t)},type:"button",key:t,"aria-label":r}),React.createElement("span",{className:"wc-block-components-tabs__item-content"},n))}))),c.map((function(e){var t=e.name,n=e.content;return React.createElement(In,fe()({},f,{key:t,id:"".concat(d,"-").concat(t,"-view"),tabId:"".concat(d,"-").concat(t),className:"wc-block-components-tabs__content"}),f.selectedId==="".concat(d,"-").concat(t)&&n)})))}))),An=n(115),Mn=function(e){var t=e.children,n=e.allowsSaving,o=Object(z.a)().isEditor,c=Object(w.b)(),a=c.shouldSavePayment,i=c.setShouldSavePayment,s=Object(j.b)().customerId;return React.createElement(An.a,{isEditor:o},t,s>0&&n&&React.createElement(he,{className:"wc-block-components-payment-methods__save-card-info",label:Object(r.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i(!a)}}))};function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dn(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ln=function(){var e=Object(w.b)().setActivePaymentMethod,t=Object(E.b)().paymentMethods,n=Object(Le.a)(),o=n.activePaymentMethod,c=me()(n,["activePaymentMethod"]),a=Object(q.a)().noticeContexts,i=Object(F.a)().removeNotice,s=Object(z.a)().isEditor;return React.createElement(Tn,{className:"wc-block-components-checkout-payment-methods",onSelect:function(t){e(t),i("wc-payment-error",a.PAYMENTS)},tabs:Object.keys(t).map((function(e){var n=t[e],r=n.ariaLabel,a=n.edit,i=n.content,u=n.label,l=n.supports,d=s?a:i;return{name:e,title:"string"==typeof u?u:Object(g.cloneElement)(u,{components:c.components}),ariaLabel:r,content:React.createElement(Mn,{allowsSaving:l.savePaymentInfo},Object(g.cloneElement)(d,Fn({activePaymentMethod:o},c)))}})),initialTabName:o,ariaLabel:Object(r.__)("Payment Methods","woo-gutenberg-products-block"),id:"wc-block-payment-methods"})},Vn=n(42),Bn=n.n(Vn),Un=n(117),Hn=n(35),zn=function(e){var t=e.onChange,n=Object(z.a)().isEditor,o=Object(w.b)(),c=o.setPaymentStatus,a=o.customerPaymentMethods,i=o.setActivePaymentMethod,s=Object(g.useState)(""),u=A()(s,2),l=u[0],d=u[1],p=Object(Hn.getPaymentMethods)(),f=Object(g.useRef)([]),b=Object(g.useCallback)((function(e){"0"===e&&c().started(),d(e),t(e)}),[t,d,c]);Object(g.useEffect)((function(){var e=Object.keys(a).flatMap((function(e){return a[e].map((function(t){var n,o=p[t.method.gateway];if(!(null==o||null===(n=o.supports)||void 0===n?void 0:n.savePaymentInfo))return null;var a="cc"===e||"echeck"===e?function(e,t,n){var o=e.method,c=e.expires,a=e.tokenId;return{value:a+"",label:Object(r.sprintf)(Object(r.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-product-blocks"),o.brand,o.last4,c),name:"wc-saved-payment-method-token-".concat(a),onChange:function(e){var r,c="wc-".concat(o.gateway,"-payment-token");t(o.gateway),n().success((r={payment_method:o.gateway},I()(r,c,e),I()(r,"isSavedToken",!0),r))}}}(t,i,c):function(e,t,n){var o=e.method,c=e.tokenId;return{value:c+"",label:Object(r.sprintf)(Object(r.__)("Saved token for %s","woo-gutenberg-products-block"),o.gateway),name:"wc-saved-payment-method-token-".concat(c),onChange:function(e){var r,c="wc-".concat(o.gateway,"-payment-token");t(o.gateway),n().success((r={payment_method:o.gateway},I()(r,c,e),I()(r,"isSavedToken",!0),r))}}}(t,i,c);return t.is_default&&""===l&&(b(t.tokenId+""),a.onChange(t.tokenId)),a}))})).filter(Boolean);f.current=e}),[a,b,l,i,c,p]);var m=n?"0":l+"",h={value:"0",label:Object(r.__)("Use a new payment method","woo-gutenberg-product-blocks"),name:"wc-saved-payment-method-token-new"};return f.current.length>0?React.createElement(Un.a,{id:"wc-payment-method-saved-tokens",selected:m,onChange:b,options:[].concat(Bn()(f.current),[h])}):null},qn=function(){var e=Object(E.b)(),t=e.isInitialized,n=e.paymentMethods,r=Object(g.useState)(!0),o=A()(r,2),c=o[0],a=o[1],i=Object(g.useCallback)((function(e){a("0"===e)}),[a]);return t&&0===Object.keys(n).length?React.createElement(Fe,null):React.createElement(React.Fragment,null,React.createElement(zn,{onChange:i}),c&&React.createElement(Ln,null))},Wn=function(){var e=Object(j.b)().isProcessing,t=Object(a.a)().cartNeedsPayment,n=Object(E.b)().paymentMethods,o=Object(q.a)().noticeContexts;return t?React.createElement(se,{id:"payment-method",disabled:e,className:"wc-block-checkout__payment-method",title:Object(r.__)("Payment method","woo-gutenberg-products-block"),description:Object.keys(n).length>1?Object(r.__)("Select a payment method below.","woo-gutenberg-products-block"):""},React.createElement(i.a,{context:o.PAYMENTS},React.createElement(qn,null))):null},Kn=n(274),Gn=n(153),Yn=n(234),$n=n(38),Xn=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"})),Zn=(n(245),function(){return React.createElement(Ne,{icon:React.createElement(h.a,{srcElement:Xn}),label:Object(r.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},React.createElement("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(r.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),React.createElement(Ie.a,{isDefault:!0,href:"".concat(J.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping"),target:"_blank",rel:"noopener noreferrer"},Object(r.__)("Configure Shipping Options","woo-gutenberg-products-block")))}),Jn=function(e){var t=l.k?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(R.decodeEntities)(e.name),value:e.rate_id,description:Object(R.decodeEntities)(e.description),secondaryLabel:React.createElement($n.a,{currency:Object(Gn.c)(e),value:t}),secondaryDescription:Object(R.decodeEntities)(e.delivery_time)}},Qn=function(){var e=Object(j.b)().isProcessing,t=Object(z.a)().isEditor,n=Object(C.b)(),o=n.shippingRates,c=n.shippingRatesLoading;return n.needsShipping?React.createElement(se,{id:"shipping-option",disabled:e,className:"wc-block-checkout__shipping-option",title:Object(r.__)("Shipping options","woo-gutenberg-products-block"),description:Object(Yn.b)(o)>1?Object(r.__)("Select shipping options below.","woo-gutenberg-products-block"):""},t&&!Object(Yn.a)(o)?React.createElement(Zn,null):React.createElement(Kn.a,{noResultsMessage:Object(r.__)("There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.","woo-gutenberg-products-block"),renderOption:Jn,shippingRates:o,shippingRatesLoading:c})):null},er=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,r=e.showApartmentField,o=e.showCompanyField,c=e.showOrderNotes,a=e.showPhoneField,i=e.allowCreateAccount,s=Object(j.b)().onSubmit;return React.createElement(te,{className:"wc-block-checkout__form",onSubmit:s},React.createElement(_e,{requireCompanyField:t,requirePhoneField:n,showApartmentField:r,showCompanyField:o,showPhoneField:a,allowCreateAccount:i}),React.createElement(Qn,null),React.createElement(Wn,null),React.createElement(Re,{showOrderNotes:c}))},tr=n(180),nr=n(84),rr=n(34),or=n(131),cr=n(225),ar=n(226),ir=n(227),sr=n(228),ur=n(276),lr=n(122),dr=function(e){var t=e.cartItem,n=t.images,o=t.low_stock_remaining,c=void 0===o?null:o,a=t.show_backorder_badge,i=void 0!==a&&a,s=t.name,u=t.permalink,l=t.prices,d=t.quantity,p=t.short_description,f=t.description,b=t.variation,m=Object(Gn.b)(l),g=Object(lr.a)({amount:parseInt(l.raw_prices.price,10),precision:parseInt(l.raw_prices.precision,10)}).multiply(d).convertPrecision(m.minorUnit).getAmount();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(rr.a,{label:d,screenReaderLabel:Object(r.sprintf)(Object(r.__)("%d items","woo-gutenberg-products-block"),d)})),React.createElement(cr.a,{image:n.length?n[0]:{}})),React.createElement("div",{className:"wc-block-components-order-summary-item__description"},React.createElement("div",{className:"wc-block-components-order-summary-item__header"},React.createElement(ar.a,{permalink:u,name:s}),React.createElement(or.a,{currency:m,price:g,priceClassName:"wc-block-components-order-summary-item__total-price"})),i?React.createElement(ir.a,null):!!c&&React.createElement(sr.a,{lowStockRemaining:c}),React.createElement(ur.a,{shortDescription:p,fullDescription:f,variation:b})))},pr=(n(252),function(e){var t=e.cartItems,n=void 0===t?[]:t,o=Object(tr.b)(),c=o.isLarge;return o.hasContainerWidth?React.createElement(nr.a,{className:"wc-block-components-order-summary",initialOpen:c,title:React.createElement("span",{className:"wc-block-components-order-summary__button-text"},Object(r.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},React.createElement("div",{className:"wc-block-components-order-summary__content"},n.map((function(e){return React.createElement(dr,{key:e.key,cartItem:e})})))):null}),fr=n(231),br=n(232),mr=n(233),gr=n(272),hr=n(235),vr=n(236),yr=n(237),Or=n(222),jr=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,r=e.cartItems,o=void 0===r?[]:r,c=e.cartTotals,a=void 0===c?{}:c,i=Object(Or.a)(),s=i.applyCoupon,u=i.removeCoupon,d=i.isApplyingCoupon,p=i.isRemovingCoupon,f=Object(C.b)().needsShipping,b=Object(Gn.c)(a);return React.createElement(React.Fragment,null,React.createElement(pr,{cartItems:o}),React.createElement(fr.a,{currency:b,values:a}),React.createElement(br.a,{currency:b,values:a}),React.createElement(mr.a,{cartCoupons:n,currency:b,isRemovingCoupon:p,removeCoupon:u,values:a}),f&&React.createElement(gr.a,{currency:b,noResultsMessage:null,isCheckout:!0,showCalculator:!1,values:a}),!l.k&&React.createElement(hr.a,{currency:b,values:a}),l.i&&React.createElement(vr.a,{onSubmit:s,initialOpen:!1,isLoading:d}),React.createElement(yr.a,{currency:b,values:a}))},wr=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.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"}),React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"})),Er=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],_r=function(e){var t=e.errorData,n=Object(r.__)("Checkout error","woo-gutenberg-products-block");return Er.includes(t.code)&&(n=Object(r.__)("There is a problem with your cart","woo-gutenberg-products-block")),React.createElement("strong",{className:"wc-block-checkout-error_title"},n)},kr=function(e){var t=e.errorData,n=t.message;return Er.includes(t.code)&&(n=n+" "+Object(r.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),React.createElement("p",{className:"wc-block-checkout-error__description"},n)},Sr=function(e){var t=e.errorData,n=Object(r.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return Er.includes(t.code)&&(n=Object(r.__)("Edit your cart","woo-gutenberg-products-block"),o=l.d),React.createElement("span",{className:"wp-block-button"},React.createElement("a",{href:o,className:"wp-block-button__link"},n))},Rr=function(){var e=Object(J.getSetting)("checkoutData",{}),t={code:e.code||"unknown",message:Object(R.decodeEntities)(e.message)||Object(r.__)("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 React.createElement("div",{className:"wc-block-checkout-error"},React.createElement(h.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:wr,size:100}),React.createElement(_r,{errorData:t}),React.createElement(kr,{errorData:t}),React.createElement(Sr,{errorData:t}))},Pr=(n(242),function(e){var t=e.attributes,n=e.scrollToTop,o=Object(z.a)().isEditor,c=Object(a.a)(),i=c.cartItems,u=c.cartTotals,d=c.cartCoupons,p=c.cartNeedsPayment,f=Object(j.b)(),b=f.hasOrder,h=f.hasError,v=f.isIdle,y=f.customerId,w=Object(s.b)(),E=w.hasValidationErrors,_=w.showAllValidationErrors,k=Object(F.a)().hasNoticesOfType,R=v&&h&&(E||k("default")),C=t.allowCreateAccount&&Object(J.compareWithWooVersion)("4.7.0","<=");if(Object(g.useEffect)((function(){R&&(_(),n({focusableSelector:"input:invalid"}))}),[R,n,_]),!o&&!b)return React.createElement(Rr,null);if(!(o||y||l.e||C&&l.f))return React.createElement(React.Fragment,null,Object(r.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),React.createElement("a",{href:ve},Object(r.__)("Click here to log in.","woo-gutenberg-products-block")));var x=m()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls});return React.createElement(React.Fragment,null,React.createElement(Y.a,{className:x},React.createElement($.a,{className:"wc-block-checkout__main"},p&&React.createElement(G,null),React.createElement(er,{showApartmentField:t.showApartmentField,showCompanyField:t.showCompanyField,showOrderNotes:t.showOrderNotes,showPhoneField:t.showPhoneField,requireCompanyField:t.requireCompanyField,requirePhoneField:t.requirePhoneField,allowCreateAccount:C}),React.createElement("div",{className:"wc-block-checkout__actions"},t.showReturnToCart&&React.createElement(O,{link:Object(J.getSetting)("page-"+(null==t?void 0:t.cartPageId),!1)}),React.createElement(S,null)),t.showPolicyLinks&&React.createElement(P,null)),React.createElement(X.a,{className:"wc-block-checkout__sidebar"},React.createElement(jr,{cartCoupons:d,cartItems:i,cartTotals:u}))))}),Cr=Object(Z.a)((function(e){return React.createElement(H,null,React.createElement(Pr,e))})),xr={isPreview:{type:"boolean",default:!1,save:!1},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},hasDarkControls:{type:"boolean",default:l.m}},Nr=React.createElement(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.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"})),Ir=function(){return React.createElement("div",{className:"wc-block-checkout-empty"},React.createElement(h.a,{className:"wc-block-checkout-empty__image",alt:"",srcElement:Nr,size:100}),React.createElement("strong",{className:"wc-block-checkout-empty__title"},Object(r.__)("Your cart is empty!","woo-gutenberg-products-block")),React.createElement("p",{className:"wc-block-checkout-empty__description"},Object(r.__)("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")),React.createElement("span",{className:"wp-block-button"},React.createElement("a",{href:l.z,className:"wp-block-button__link"},Object(r.__)("Browse store","woo-gutenberg-products-block"))))},Tr=function(){window.location.reload(!0)};Object(f.a)({selector:".wp-block-woocommerce-checkout",Block:Object(o.a)(Object(c.a)((function(e){var t=Object(a.a)(),n=t.cartItems,o=t.cartIsLoading;return React.createElement(React.Fragment,null,o||0!==n.length?React.createElement(u.a,{header:Object(r.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(d.a)(Object(r.__)("The checkout has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:React.createElement("button",{className:"wc-block-link-button",onClick:Tr})}),showErrorMessage:l.j},React.createElement(i.a,{context:"wc/checkout"},React.createElement(s.a,null,React.createElement(Cr,e)))):React.createElement(Ir,null))}))),getProps:function(e){return{attributes:Object(p.a)(xr,e.dataset)}},getErrorBoundaryProps:function(){return{header:Object(r.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(d.a)(Object(r.__)("The checkout has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:React.createElement("button",{className:"wc-block-link-button",onClick:Tr})}),showErrorMessage:l.j}}})},,,,function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(4),a=n.n(c),i=n(134),s=n(11),u=n.n(s),l=n(8),d=n(0),p=n(1),f=n(17),b=n(5),m=n.n(b),g=n(14),h=n.n(g),v=n(2),y=n(58),O=n(36),j=n(100),w=n(148),E=n(26),_=n(9),k=(n(13),n(103),n(86),n(104));function S(e,t){null!==e&&Object(k.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function R(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,c)}),t)}return o.cancel=r,o}function P(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function C(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function x(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}var N=R((function(){T().textContent=""}),500);function I(e,t){var n=T(t);e&&(n.textContent=e,N())}function T(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)}function A(e,t,n,r){if(-1===t)return e>0?0:n-1;var o=t+e;return o<0?r?n-1:0:o>=n?r?0:n-1:o}function M(e,t,n,r){var o,c=n.map((function(e){return r(e).toLowerCase()})),a=t+1;return(o=c.slice(a).findIndex((function(t){return t.startsWith(e)})))>-1?o+a:c.slice(0,a).findIndex((function(t){return t.startsWith(e)}))}function D(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=r in t?t[r]:e[r],n}),{})}function F(e){return/^\S{1}$/.test(e)}function L(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function V(e,t,n){Object.keys(t).forEach((function(r){!function(e,t,n,r){var o="on"+L(e)+"Change";t[o]&&void 0!==r[e]&&r[e]!==n[e]&&t[o](r)}(r,e,t,n)})),e.onStateChange&&void 0!==n&&e.onStateChange(n)}var B=0;function U(){var e=Object(v.useState)(null),t=e[0],n=e[1];return Object(v.useEffect)((function(){return n(++B)}),[]),t}var H={highlightedIndex:-1,isOpen:!1,selectedItem:null};function z(e,t,n){var r=e.items,o=e.initialHighlightedIndex,c=e.defaultHighlightedIndex,a=t.selectedItem,i=t.highlightedIndex;return void 0!==o&&i>-1?o:void 0!==c?c:a?0===n?r.indexOf(a):A(n,r.indexOf(a),r.length,!1):0===n?-1:n<0?r.length-1:0}function q(e,t){var n="default"+L(t);return n in e?e[n]:H[t]}function W(e,t){if(t in e)return e[t];var n="initial"+L(t);return n in e?e[n]:q(e,t)}a.a.array.isRequired,a.a.func,a.a.func,a.a.func,a.a.bool,a.a.number,a.a.number,a.a.number,a.a.bool,a.a.bool,a.a.bool,a.a.any,a.a.any,a.a.any,a.a.string,a.a.string,a.a.string,a.a.func,a.a.string,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});var K=Object.freeze({__proto__:null,MenuKeyDownArrowDown:0,MenuKeyDownArrowUp:1,MenuKeyDownEscape:2,MenuKeyDownHome:3,MenuKeyDownEnd:4,MenuKeyDownEnter:5,MenuKeyDownCharacter:6,MenuBlur:7,MenuMouseLeave:8,ItemMouseMove:9,ItemClick:10,ToggleButtonKeyDownCharacter:11,ToggleButtonKeyDownArrowDown:12,ToggleButtonKeyDownArrowUp:13,ToggleButtonClick:14,FunctionToggleMenu:15,FunctionOpenMenu:16,FunctionCloseMenu:17,FunctionSetHighlightedIndex:18,FunctionSelectItem:19,FunctionClearKeysSoFar:20,FunctionReset:21});function G(e,t){var n,r=t.type,o=t.props,c=t.shiftKey;switch(r){case 9:n={highlightedIndex:t.index};break;case 10:n={isOpen:q(o,"isOpen"),highlightedIndex:q(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case 7:n={isOpen:!1,highlightedIndex:-1};break;case 0:n={highlightedIndex:A(c?5:1,e.highlightedIndex,o.items.length,o.circularNavigation)};break;case 1:n={highlightedIndex:A(c?-5:-1,e.highlightedIndex,o.items.length,o.circularNavigation)};break;case 3:n={highlightedIndex:0};break;case 4:n={highlightedIndex:o.items.length-1};break;case 2:n={isOpen:!1,highlightedIndex:-1};break;case 5:n=Object(_.a)({isOpen:q(o,"isOpen"),highlightedIndex:q(o,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:o.items[e.highlightedIndex]});break;case 6:var a=t.key,i=""+e.keysSoFar+a,s=M(i,e.highlightedIndex,o.items,o.itemToString);n=Object(_.a)({keysSoFar:i},s>=0&&{highlightedIndex:s});break;case 8:n={highlightedIndex:-1};break;case 11:var u=t.key,l=""+e.keysSoFar+u,d=M(l,e.selectedItem?o.items.indexOf(e.selectedItem):-1,o.items,o.itemToString);n=Object(_.a)({keysSoFar:l},d>=0&&{selectedItem:o.items[d]});break;case 12:n={isOpen:!0,highlightedIndex:z(o,e,1)};break;case 13:n={isOpen:!0,highlightedIndex:z(o,e,-1)};break;case 14:case 15:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:z(o,e,0)};break;case 16:n={isOpen:!0,highlightedIndex:z(o,e,0)};break;case 17:n={isOpen:!1};break;case 18:n={highlightedIndex:t.highlightedIndex};break;case 19:n={selectedItem:t.selectedItem};break;case 20:n={keysSoFar:""};break;case 21:n={highlightedIndex:q(o,"highlightedIndex"),isOpen:q(o,"isOpen"),selectedItem:q(o,"selectedItem")};break;default:throw new Error("Reducer called without proper action type.")}return Object(_.a)({},e,{},n)}var Y={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11yStatusMessage:function(e){var t=e.isOpen,n=e.items;if(!n)return"";var r=n.length;return t?0===r?"No results are available":r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":""},getA11ySelectionMessage:function(e){var t=e.selectedItem;return(0,e.itemToString)(t)+" has been selected."},scrollIntoView:S,environment:"undefined"==typeof window?{}:window};function $(e){void 0===e&&(e={});var t=Object(_.a)({},Y,{},e),n=t.items,r=t.itemToString,o=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,a=t.initialIsOpen,i=t.defaultIsOpen,s=t.scrollIntoView,u=t.environment,l=function(e,t,n){var r=Object(v.useCallback)((function(t,n){t=D(t,n.props);var r=n.props.stateReducer,o=e(t,n),c=r(t,Object(_.a)({},n,{changes:o}));return V(n.props,t,c),c}),[e]),o=Object(v.useReducer)(r,t),c=o[0],a=o[1];return[D(c,n),a]}(G,function(e){var t=W(e,"selectedItem"),n=W(e,"highlightedIndex"),r=W(e,"isOpen");return{highlightedIndex:n<0&&t?e.items.indexOf(t):n,isOpen:r,selectedItem:t,keysSoFar:""}}(t),t),d=l[0],p=d.isOpen,f=d.highlightedIndex,b=d.selectedItem,m=d.keysSoFar,g=l[1],h=function(e){return g(Object(_.a)({props:t},e))},y=function(e,t){var n=void 0===t?{}:t,r=n.id,o=n.labelId,c=n.menuId,a=n.getItemId,i=n.toggleButtonId,s=void 0===r?"downshift-"+e():r;return{labelId:o||s+"-label",menuId:c||s+"-menu",getItemId:a||function(e){return s+"-item-"+e},toggleButtonId:i||s+"-toggle-button"}}(U,t),O=y.labelId,j=y.getItemId,w=y.menuId,k=y.toggleButtonId,S=Object(v.useRef)(null),N=Object(v.useRef)(null),T=Object(v.useRef)();T.current=[];var A=Object(v.useRef)(!0),M=Object(v.useRef)(!0),L=Object(v.useRef)(null);Object(v.useEffect)((function(){A.current||I(o({isOpen:p,items:n,selectedItem:b,itemToString:r}),u.document)}),[p]),Object(v.useEffect)((function(){A.current||I(c({isOpen:p,items:n,selectedItem:b,itemToString:r}),u.document)}),[b]),Object(v.useEffect)((function(){A.current&&(L.current=R((function(){h({type:20})}),500)),m&&L.current()}),[m]),Object(v.useEffect)((function(){A.current?(a||i||p)&&N.current.focus():p?N.current.focus():u.document.activeElement===N.current&&S.current.focus()}),[p]),Object(v.useEffect)((function(){f<0||!p||!T.current.length||(!1===M.current?M.current=!0:s(T.current[f],N.current))}),[f]),Object(v.useEffect)((function(){A.current=!1}),[]);var B={ArrowDown:function(e){e.preventDefault(),h({type:0,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),h({type:1,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),h({type:3})},End:function(e){e.preventDefault(),h({type:4})},Escape:function(){h({type:2})},Enter:function(e){e.preventDefault(),h({type:5})},Tab:function(e){e.shiftKey&&h({type:7})}},H={ArrowDown:function(e){e.preventDefault(),h({type:12})},ArrowUp:function(e){e.preventDefault(),h({type:13})}},z=function(e){var t=x(e);t&&B[t]?B[t](e):F(t)&&h({type:6,key:t})},q=function(e){(function(e,t){return e.relatedTarget===t||e.nativeEvent&&(t===e.nativeEvent.explicitOriginalTarget||t.contains(e.nativeEvent.explicitOriginalTarget))})(e,S.current)||h({type:7})},K=function(){h({type:8})},$=function(){h({type:14})},X=function(e){var t=x(e);t&&H[t]?H[t](e):F(t)&&h({type:11,key:t})};return{getToggleButtonProps:function(e){var t,n=void 0===e?{}:e,r=n.onClick,o=n.onKeyDown,c=n.refKey,a=void 0===c?"ref":c,i=n.ref,s=Object(E.a)(n,["onClick","onKeyDown","refKey","ref"]),u=Object(_.a)(((t={})[a]=C(i,(function(e){S.current=e})),t.id=k,t["aria-haspopup"]="listbox",t["aria-expanded"]=p,t["aria-labelledby"]=O+" "+k,t),s);return s.disabled||(u.onClick=P(r,$),u.onKeyDown=P(o,X)),u},getLabelProps:function(e){return Object(_.a)({id:O,htmlFor:k},e)},getMenuProps:function(e){var t,n=void 0===e?{}:e,r=n.onKeyDown,o=n.onBlur,c=n.onMouseLeave,a=n.refKey,i=void 0===a?"ref":a,s=n.ref,u=Object(E.a)(n,["onKeyDown","onBlur","onMouseLeave","refKey","ref"]);return Object(_.a)(((t={})[i]=C(s,(function(e){N.current=e})),t.id=w,t.role="listbox",t["aria-labelledby"]=O,t.tabIndex=-1,t),f>-1&&{"aria-activedescendant":j(f)},{onKeyDown:P(r,z),onBlur:P(o,q),onMouseLeave:P(c,K)},u)},getItemProps:function(e){var t,r=void 0===e?{}:e,o=r.item,c=r.index,a=r.refKey,i=void 0===a?"ref":a,s=r.ref,u=r.onMouseMove,l=r.onClick,d=Object(E.a)(r,["item","index","refKey","ref","onMouseMove","onClick"]),p=function(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}(c,o,n);if(p<0)throw new Error("Pass either item or item index in getItemProps!");var b=Object(_.a)(((t={})[i]=C(s,(function(e){e&&T.current.push(e)})),t.role="option",t),p===f&&{"aria-selected":!0},{id:j(p)},d);return d.disabled||(b.onMouseMove=P(u,(function(){return function(e){e!==f&&(M.current=!1,h({type:9,index:e}))}(p)})),b.onClick=P(l,(function(){return function(e){h({type:10,index:e})}(p)}))),b},toggleMenu:function(){h({type:15})},openMenu:function(){h({type:16})},closeMenu:function(){h({type:17})},setHighlightedIndex:function(e){h({type:18,highlightedIndex:e})},selectItem:function(e){h({type:19,selectedItem:e})},reset:function(){h({type:21})},highlightedIndex:f,isOpen:p,selectedItem:b}}$.stateChangeTypes=K;var X=n(76),Z=n(68),J=function(e){return e&&e.name},Q=function(e,t){var n=e.selectedItem,r=t.type,o=t.changes,c=t.props.items;switch(r){case $.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:c[n?Math.min(c.indexOf(n)+1,c.length-1):0]};case $.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:c[n?Math.max(c.indexOf(n)-1,0):c.length-1]};default:return o}};function ee(e){var t=e.className,n=e.hideLabelFromVision,r=e.label,o=e.options,c=e.onChange,a=e.value,i=$({initialSelectedItem:o[0],items:o,itemToString:J,onSelectedItemChange:c,selectedItem:a,stateReducer:Q}),s=i.getLabelProps,u=i.getToggleButtonProps,l=i.getMenuProps,p=i.getItemProps,f=i.isOpen,b=i.highlightedIndex,g=i.selectedItem,h=l({className:"components-custom-select-control__menu"});return h["aria-activedescendant"]&&"downshift-null"===h["aria-activedescendant"].slice(0,"downshift-null".length)&&delete h["aria-activedescendant"],Object(d.createElement)("div",{className:m()("components-custom-select-control",t)},Object(d.createElement)("label",s({className:m()("components-custom-select-control__label",{"screen-reader-text":n})}),r),Object(d.createElement)(X.a,u({"aria-label":r,"aria-labelledby":void 0,className:"components-custom-select-control__button"}),J(g),Object(d.createElement)(Z.a,{icon:"arrow-down-alt2",className:"components-custom-select-control__button-icon"})),Object(d.createElement)("ul",h,f&&o.map((function(e,t){return Object(d.createElement)("li",p({item:e,index:t,key:e.key,className:m()("components-custom-select-control__item",{"is-highlighted":t===b}),style:e.style}),e===g&&Object(d.createElement)(Z.a,{icon:"saved",className:"components-custom-select-control__item-icon"}),e.name)}))))}n(133);var te=function(e){var t=e.className,n=e.feedback,r=e.id,o=e.label,c=e.onChange,a=e.options,i=e.value;return React.createElement("div",{id:r,className:m()("wc-block-components-select",t,{"is-active":i})},React.createElement(ee,{label:o,onChange:function(e){var t=e.selectedItem;c(t.key)},options:a,value:i}),n)},ne=Object(j.a)((function(e){var t=e.className,n=e.id,r=e.value,c=e.instanceId,a=e.required,i=e.errorId,s=e.errorMessage,l=void 0===s?Object(p.__)("Please select a value.","woo-gutenberg-products-block"):s,d=h()(e,["className","id","value","instanceId","required","errorId","errorMessage"]),f=n||"select-"+c;i=i||f;var b=Object(O.a)(r),g=Object(y.b)(),j=g.getValidationError,E=g.setValidationErrors,_=g.clearValidationError;Object(v.useEffect)((function(){!a||b?_(i):E(o()({},i,{message:l,hidden:!0}))}),[_,b,i,l,a,E]),Object(v.useEffect)((function(){return function(){_(i)}}),[_,i]);var k=j(i)||{};return React.createElement(te,u()({id:f,className:m()(t,{"has-error":k.message&&!k.hidden}),feedback:React.createElement(w.a,{propertyName:i}),value:b},d))})),re=(n(167),function(e){var t=e.className,n=e.countries,r=e.id,o=e.label,c=e.onChange,a=e.value,i=void 0===a?"":a,s=e.autoComplete,u=void 0===s?"off":s,l=e.required,b=void 0!==l&&l,g=e.errorId,h=e.errorMessage,v=void 0===h?Object(p.__)("Please select a country.","woo-gutenberg-products-block"):h,y=Object(d.useMemo)((function(){return Object.keys(n).map((function(e){return{key:e,name:Object(f.decodeEntities)(n[e])}}))}),[n]);return React.createElement("div",{className:m()(t,"wc-block-components-country-input")},React.createElement(ne,{id:r,label:o,onChange:c,options:y,value:y.find((function(e){return e.key===i})),errorId:g,errorMessage:v,required:b}),"off"!==u&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:u,value:i,onChange:function(e){var t=e.target.value,n=y.find((function(e){return e.key===t}));c(n?n.key:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),oe=function(e){return React.createElement(re,u()({countries:l.x},e))},ce=function(e){return React.createElement(re,u()({countries:l.a},e))},ae=(n(168),function(e){var t=e.className,n=e.id,r=e.states,o=e.country,c=e.label,a=e.onChange,s=e.autoComplete,u=void 0===s?"off":s,l=e.value,b=void 0===l?"":l,g=e.required,h=void 0!==g&&g,v=r[o],y=Object(d.useMemo)((function(){return v?Object.keys(v).map((function(e){return{key:e,name:Object(f.decodeEntities)(v[e])}})):[]}),[v]),O=Object(d.useCallback)((function(e){if(y.length>0){var t=y.find((function(t){return t.key===e||t.name===e}));a(t?t.key:"")}else a(e)}),[a,y]);return y.length>0?React.createElement(React.Fragment,null,React.createElement(ne,{className:m()(t,"wc-block-components-state-input"),id:n,label:c,onChange:O,options:y,value:y.find((function(e){return e.key===b})),errorMessage:Object(p.__)("Please select a state.","woo-gutenberg-products-block"),required:h}),"off"!==u&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:u,value:b,onChange:function(e){return O(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):React.createElement(i.a,{className:t,id:n,label:c,onChange:O,autoComplete:u,value:b,required:h})}),ie=function(e){return React.createElement(ae,u()({states:l.y},e))},se=function(e){return React.createElement(ae,u()({states:l.b},e))},ue=n(90);function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pe={city:{index:9},postcode:{index:7}},fe={state:{required:!1}},be={state:{required:!1,hidden:!0}},me={postcode:{required:!1,hidden:!0}},ge={AE:de(de({},me),fe),AF:be,AO:de(de({},me),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),AT:de(de({},pe),be),AU:{city:{label:Object(p.__)("Suburb","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Suburb (optional)","woo-gutenberg-products-block")},postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},AX:de(de({},pe),be),BD:{postcode:{required:!1},state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}},BE:de(de({},pe),be),BH:de({postcode:{required:!1}},be),BI:be,BO:me,BS:me,CA:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},CH:de(de({},pe),{},{state:{label:Object(p.__)("Canton","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Canton (optional)","woo-gutenberg-products-block"),required:!1}}),CL:{city:{require:!0},postcode:{required:!1},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},CN:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},CO:{postcode:{required:!1}},CZ:be,DE:de(de({},pe),be),DK:de(de({},pe),be),EE:de(de({},pe),be),ES:de(de({},pe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),FI:de(de({},pe),be),FR:de(de({},pe),be),GB:{postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},GP:be,GF:be,GR:fe,HK:{postcode:{required:!1},city:{label:Object(p.__)("Town/District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Town/District (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},HU:{state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},ID:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},IE:{postcode:{label:Object(p.__)("Eircode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Eircode (optional)","woo-gutenberg-products-block"),required:!1},state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},IS:de(de({},pe),be),IL:de(de({},pe),be),IM:be,IT:de(de({},pe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),JP:{first_name:{index:2},last_name:{index:1},address_1:{index:7},address_2:{index:8},postcode:{index:4},city:{index:6},state:{label:Object(p.__)("Prefecture","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Prefecture (optional)","woo-gutenberg-products-block"),index:5}},KR:be,KW:be,LB:be,LI:de(de({},pe),{},{state:{label:Object(p.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}}),LK:be,LU:be,LV:{state:{label:Object(p.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}},MQ:be,MT:be,MZ:de(de({},me),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),NL:de(de({},pe),be),NG:de(de({},me),{},{state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}}),NO:de(de({},pe),be),NP:{postcode:{required:!1},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},NZ:{postcode:{label:Object(p.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Region (optional)","woo-gutenberg-products-block")}},PL:de(de({},pe),be),PT:be,RE:be,RO:{state:{label:Object(p.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("County (optional)","woo-gutenberg-products-block")}},RS:be,SE:de(de({},pe),be),SG:de({city:{required:!1}},be),SK:de(de({},pe),be),SI:de(de({},pe),be),SR:de({},me),ST:de(de({},me),{},{state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}}),MD:{state:{label:Object(p.__)("Municipality/District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Municipality/District (optional)","woo-gutenberg-products-block")}},TR:de(de({},pe),{},{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}}),UG:de(de({},me),{},{city:{label:Object(p.__)("Town/Village","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Town/Village (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("District (optional)","woo-gutenberg-products-block")}}),US:{postcode:{label:Object(p.__)("ZIP","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("ZIP (optional)","woo-gutenberg-products-block")},state:{label:Object(p.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("State (optional)","woo-gutenberg-products-block")}},VN:de({city:{index:8},postcode:{index:7,required:!1}},be),WS:me,YT:be,ZA:{state:{label:Object(p.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(p.__)("Province (optional)","woo-gutenberg-products-block")}},ZW:me};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=Object(j.a)((function(e){var t=e.id,n=e.fields,r=void 0===n?Object.keys(ue.a):n,c=e.fieldConfig,a=void 0===c?{}:c,s=e.instanceId,u=e.onChange,l=e.type,f=void 0===l?"shipping":l,b=e.values,m=Object(y.b)(),g=m.getValidationError,h=m.setValidationErrors,v=m.clearValidationError,O=ge[b.country]||{},j=r.map((function(e){return ve(ve(ve({key:e},ue.a[e]),O[e]),a[e])})).sort((function(e,t){return e.index-t.index})),w=g("shipping-missing-country")||{};return Object(d.useEffect)((function(){"shipping"===f&&function(e,t,n,r){r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(p.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&n("shipping-missing-country")}(b,h,v,w.message&&!w.hidden)}),[b,w.message,w.hidden,h,v,f]),t=t||s,React.createElement("div",{id:t,className:"wc-block-components-address-form"},j.map((function(e){if(e.hidden)return null;if("country"===e.key){var n="shipping"===f?oe:ce;return React.createElement(n,{key:e.key,id:"".concat(t,"-").concat(e.key),label:e.required?e.label:e.optionalLabel,value:b.country,autoComplete:e.autocomplete,onChange:function(e){return u(ve(ve({},b),{},{country:e,state:"",city:"",postcode:""}))},errorId:"shipping"===f?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){var r="shipping"===f?ie:se;return React.createElement(r,{key:e.key,id:"".concat(t,"-").concat(e.key),country:b.country,label:e.required?e.label:e.optionalLabel,value:b.state,autoComplete:e.autocomplete,onChange:function(e){return u(ve(ve({},b),{},{state:e}))},errorMessage:e.errorMessage,required:e.required})}return React.createElement(i.a,{key:e.key,id:"".concat(t,"-").concat(e.key),className:"wc-block-components-address-form__".concat(e.key),label:e.required?e.label:e.optionalLabel,value:b[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:function(t){return u(ve(ve({},b),{},o()({},e.key,t)))},errorMessage:e.errorMessage,required:e.required})})))}))},,,,function(e,t,n){"use strict";var r=n(10),o=n.n(r),c=n(1),a=n(8),i=(n(4),n(87)),s=n(6),u=n.n(s),l=n(268),d=n(74),p=n(0),f=n(27),b=n.n(f),m=n(58);n(132);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.address,n=e.onUpdate,r=e.addressFields,a=Object(p.useState)(t),i=o()(a,2),s=i[0],u=i[1],f=Object(m.b)(),g=f.hasValidationErrors,v=f.showAllValidationErrors,y={};return r.forEach((function(e){y[e]=h(h({},y[e]),{},"country"===e?{errorMessage:Object(c.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),required:!0}:{required:!1})})),React.createElement("form",{className:"wc-block-components-shipping-calculator-address"},React.createElement(l.a,{fields:r,fieldConfig:y,onChange:u,values:s}),React.createElement(d.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:b()(s,t),onClick:function(e){if(e.preventDefault(),v(),!g)return n(s)},type:"submit"},Object(c.__)("Update","woo-gutenberg-products-block")))},y=function(e){var t=e.onUpdate,n=void 0===t?function(){}:t,r=e.addressFields,o=void 0===r?["country","state","city","postcode"]:r,c=Object(i.b)(),a=c.shippingAddress,s=c.setShippingAddress;return React.createElement("div",{className:"wc-block-components-shipping-calculator"},React.createElement(v,{address:a,addressFields:o,onUpdate:function(e){s(e),n(e)}}))},O=n(25),j=n.n(O),w=n(17),E=function(e){var t=e.address;if(0===Object.values(t).length)return null;var n="string"==typeof a.x[t.country]?Object(w.decodeEntities)(a.x[t.country]):"",r="object"===j()(a.y[t.country])&&"string"==typeof a.y[t.country][t.state]?Object(w.decodeEntities)(a.y[t.country][t.state]):t.state,o=[];o.push(t.postcode.toUpperCase()),o.push(t.city),o.push(r),o.push(n);var i=o.filter(Boolean).join(", ");return i&&React.createElement("span",{className:"wc-block-components-shipping-address"},Object(c.sprintf)(Object(c.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" ")},_=n(81),k=n(41),S=n(38),R=n(153),P=n(274),C=function(e){var t=a.k?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(w.decodeEntities)(e.name),value:e.rate_id,description:React.createElement(React.Fragment,null,Number.isFinite(t)&&React.createElement(S.a,{currency:Object(R.c)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(w.decodeEntities)(e.delivery_time))}},x=function(e){var t=e.hasRates,n=e.shippingRates,r=e.shippingRatesLoading;return React.createElement("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},React.createElement("legend",{className:"screen-reader-text"},t?Object(c.__)("Shipping options","woo-gutenberg-products-block"):Object(c.__)("Choose a shipping option","woo-gutenberg-products-block")),React.createElement(P.a,{className:"wc-block-components-totals-shipping__options",collapsibleWhenMultiple:!0,noResultsMessage:Object(c.__)("No shipping options were found.","woo-gutenberg-products-block"),renderOption:C,shippingRates:n,shippingRatesLoading:r}))},N=function(e){return e.some((function(e){return e.shipping_rates.length}))};n(166),t.a=function(e){var t=e.currency,n=e.values,r=e.isCheckout,i=void 0!==r&&r,s=e.showCalculator,u=void 0===s||s,l=e.showRatesWithoutAddress,d=void 0!==l&&l,f=Object(p.useState)(!1),b=o()(f,2),m=b[0],g=b[1],h=Object(_.a)(),v=h.shippingRates,O=h.shippingRatesLoading,j=h.hasShippingAddress,w=h.shippingAddress,S=a.k?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),R=N(v)||S,P=d||j;return R||j||i?React.createElement("div",{className:"wc-block-components-totals-shipping"},React.createElement(k.a,{label:Object(c.__)("Shipping","woo-gutenberg-products-block"),value:S||"",description:React.createElement(React.Fragment,null,React.createElement(E,{address:w})," ",u&&React.createElement("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){g(!m)},"aria-expanded":m},Object(c.__)("(change address)","woo-gutenberg-products-block"))),currency:t}),u&&m&&React.createElement(y,{onUpdate:function(){g(!1)}}),!i&&P&&React.createElement(x,{hasRates:R,shippingRates:v,shippingRatesLoading:O})):React.createElement(React.Fragment,null,React.createElement(k.a,{className:"wc-block-components-totals-shipping",label:Object(c.__)("Shipping","woo-gutenberg-products-block"),value:u?React.createElement("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){g(!m)}},Object(c.__)("Calculate","woo-gutenberg-products-block")):React.createElement("em",null,Object(c.__)("Calculated during checkout","woo-gutenberg-products-block"))}),u&&m&&React.createElement(y,{onUpdate:function(){g(!1)}}))}},,function(e,t,n){"use strict";var r=n(1),o=n(2),c=(n(4),n(44)),a=n(66),i=n(234),s=n(14),u=n.n(s),l=n(220),d=n(17),p=n(34),f=n(78),b=n(84),m=n(5),g=n.n(m),h=n(117),v=n(94),y=n(119),O=function(e){var t=e.className,n=e.noResultsMessage,r=e.onChange,o=e.options,c=e.renderOption,a=e.selected;if(0===o.length)return React.createElement(y.a,{isDismissible:!1,className:g()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-message","woocommerce-info")},n);if(o.length>1)return React.createElement(h.a,{className:t,onChange:r,selected:a,options:o.map(c)});var i=c(o[0]),s=i.label,u=i.secondaryLabel,l=i.description,d=i.secondaryDescription;return React.createElement(v.a,{label:s,secondaryLabel:u,description:l,secondaryDescription:d})},j=(n(112),function(e){var t=e.className,n=e.collapsible,o=void 0!==n&&n,c=e.noResultsMessage,a=e.onChange,i=e.renderOption,s=e.selected,u=e.shippingRate,l=e.showItems,m=e.title,h=React.createElement(React.Fragment,null,m&&React.createElement(f.a,{className:"wc-block-components-shipping-rates-control__package-title",headingLevel:"3"},m),l&&React.createElement("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(u.items).map((function(e){var t=Object(d.decodeEntities)(e.name),n=e.quantity;return React.createElement("li",{key:t,className:"wc-block-components-shipping-rates-control__package-item"},React.createElement(p.a,{label:"".concat(t," ×").concat(n),screenReaderLabel:Object(r.sprintf)(Object(r._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),v=React.createElement(O,{className:t,noResultsMessage:c,onChange:a,options:u.shipping_rates,renderOption:i,selected:s});return o?React.createElement(b.a,{className:"wc-block-components-shipping-rates-control__package",hasBorder:!0,initialOpen:!0,title:h},v):React.createElement("div",{className:g()("wc-block-components-shipping-rates-control__package",t)},h,v)}),w=function(e){var t=e.className,n=e.collapsible,r=void 0!==n&&n,o=e.noResultsMessage,c=e.renderOption,a=e.shippingRates,i=void 0===a?[]:a,s=Object(l.a)(i),d=s.selectShippingRate,p=s.selectedShippingRates;return React.createElement("div",{className:"wc-block-components-shipping-rates-control"},i.map((function(e){var n=e.package_id,a=u()(e,["package_id"]);return React.createElement(j,{key:n,className:t,collapsible:r,noResultsMessage:o,onChange:function(e){d(e,n)},renderOption:c,selected:p[n],shippingRate:a,showItems:i.length>1,title:i.length>1?a.name:null})})))};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,s=e.className,u=e.collapsibleWhenMultiple,l=void 0!==u&&u,d=e.noResultsMessage,p=e.renderOption;return Object(o.useEffect)((function(){if(!n){var e=Object(i.a)(t),o=Object(i.b)(t);0===o?Object(c.speak)(Object(r.__)("No shipping options were found.","woo-gutenberg-products-block")):1===e?Object(c.speak)(Object(r.sprintf)(Object(r._n)("%d shipping option was found.","%d shipping options were found.",o,"woo-gutenberg-products-block"),o)):Object(c.speak)(Object(r.sprintf)(Object(r._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(r.sprintf)(Object(r._n)("%d shipping option was found","%d shipping options were found",o,"woo-gutenberg-products-block"),o))}}),[n,t]),React.createElement(a.a,{isLoading:n,screenReaderLabel:Object(r.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},React.createElement(w,{className:s,collapsible:t.length>1&&l,noResultsMessage:d,renderOption:p,shippingRates:t}))}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(6),a=n.n(c),i=n(5),s=n.n(i),u=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},l=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,o=e.alt,c=void 0===o?"":o;return r?React.createElement("img",{className:u(t),src:r,alt:c}):null},d=n(8),p=[{id:"alipay",alt:"Alipay",src:d.E+"img/payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.E+"img/payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.E+"img/payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.E+"img/payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.E+"img/payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.E+"img/payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.E+"img/payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.E+"img/payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.E+"img/payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.E+"img/payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.E+"img/payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.E+"img/payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.E+"img/payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.E+"img/payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.E+"img/payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.E+"img/payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.E+"img/payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.E+"img/payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.E+"img/payment-methods/wechat.svg"}],f=n(25),b=n.n(f);n(175);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icons,n=void 0===t?[]:t,r=e.align,c=void 0===r?"center":r,a=function(e){var t={};return e.forEach((function(e){var n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"===b()(e)&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)}(n);if(0===a.length)return null;var 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});return React.createElement("div",{className:i},a.map((function(e){var t,n=g(g({},e),(t=e.id,p.find((function(e){return e.id===t}))||{}));return React.createElement(l,o()({key:"payment-method-icon-"+e.id},n))})))}},function(e,t,n){"use strict";n(4);var r=n(17),o=n(5),c=n.n(o),a=function(e){var t=e.className,n=e.variation,o=void 0===n?[]:n;if(!o||0===o.length)return null;var a=o.map((function(e){return e.attribute?"".concat(Object(r.decodeEntities)(e.attribute),": ").concat(Object(r.decodeEntities)(e.value)):"".concat(Object(r.decodeEntities)(e.value))})).join(" / ");return React.createElement("div",{className:c()("wc-block-components-product-variation-data",t)},a)},i=n(136),s=n(3),u=function(e){var t=e.className,n=e.shortDescription,r=void 0===n?"":n,o=e.fullDescription,c=r||(void 0===o?"":o);return c?React.createElement(i.a,{className:t,source:c,maxLength:15,countType:Object(s.getSetting)("wordCountType","words")}):null};n(163),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,r=e.fullDescription,o=void 0===r?"":r,c=e.variation,i=void 0===c?[]:c;return React.createElement("div",{className:"wc-block-components-product-metadata"},React.createElement(u,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:o}),React.createElement(a,{className:"wc-block-components-product-metadata__variation-data",variation:i}))}},,function(e,t,n){"use strict";var r=n(50),o=React.createElement(r.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o}]);
|
build/checkout.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', '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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-wordcount'), 'version' => '94361ba07c3d679cda4f4401d06d621a');
|
build/checkout.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.checkout=function(e){function t(t){for(var r,a,s=t[0],i=t[1],u=t[2],b=0,p=[];b<s.length;b++)a=s[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,s=1;s<n.length;s++){var i=n[s];0!==c[i]&&(r=!1)}r&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},c={21:0},o=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var l=i;return o.push([885,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},123:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(9),s=(n(2),n(7)),i=n.n(s),u=n(48),l=(n(266),Object(a.forwardRef)((function(e,t){var n=e.className,r=e.id,a=e.type,s=void 0===a?"text":a,l=e.ariaLabel,b=e.ariaDescribedBy,p=e.label,d=e.screenReaderLabel,m=e.disabled,g=e.help,f=e.autoCapitalize,O=void 0===f?"off":f,h=e.autoComplete,j=void 0===h?"off":h,_=e.value,v=void 0===_?"":_,y=e.onChange,w=e.required,E=void 0!==w&&w,k=e.onBlur,S=void 0===k?function(){}:k,P=e.feedback,C=Object(o.useState)(!1),N=c()(C,2),R=N[0],x=N[1];return Object(o.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":R||v})},Object(o.createElement)("input",{type:s,id:r,value:v,ref:t,autoCapitalize:O,autoComplete:j,onChange:function(e){y(e.target.value)},onFocus:function(){return x(!0)},onBlur:function(){S(),x(!1)},"aria-label":l||p,disabled:m,"aria-describedby":g&&!b?r+"__help":b,required:E}),Object(o.createElement)(u.a,{label:p,screenReaderLabel:d||p,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!g&&Object(o.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},g),P)})));t.a=l},125:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(7)),a=n.n(o),s=n(551);n(365);t.a=function(e){var t=e.children,n=e.className,o=e.screenReaderLabel,i=e.showSpinner,u=void 0!==i&&i,l=e.isLoading;return void 0===l||l?Object(r.createElement)("div",{className:a()(n,"wc-block-components-loading-mask")},u&&Object(r.createElement)(s.a,null),Object(r.createElement)("div",{className:"wc-block-components-loading-mask__children","aria-hidden":!0},t),Object(r.createElement)("span",{className:"screen-reader-text"},o||Object(c.__)("Loading…","woo-gutenberg-products-block"))):t}},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},134:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),o=n(212),a=n(33),s=n(6),i={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),n=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return i;if(n)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var o=e(r.CART_STORE_KEY),u=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),m=!o.hasFinishedResolution("getCartData"),g=o.areShippingRatesLoading(),f=c(r.CART_STORE_KEY).receiveCart,O=Object(s.mapValues)(u.shippingAddress,(function(e){return Object(a.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:d,cartIsLoading:m,cartErrors:p,shippingAddress:O,shippingRates:u.shippingRates||[],shippingRatesLoading:g,hasShippingAddress:!!O.country,receiveCart:f}}),[b]);return p}},136:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(7),u=n.n(i);n(2),n(367);t.a=function(e){var t=e.children,n=e.className,r=e.headingLevel,o=a()(e,["children","className","headingLevel"]),i=u()("wc-block-components-title",n),l="h".concat(r);return Object(s.createElement)(l,c()({className:i},o),t)}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(8),c=n.n(r),o=n(191),a=n(0);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,s=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),b=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,i({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,i({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,i({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,i({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,i({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[n,c]);return i(i(i({notices:t},l),b),{},{setIsSuppressed:s})}},142:function(e,t){!function(){e.exports=this.wp.wordcount}()},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},150:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return b}));var r=n(8),c=n.n(r),o=n(6);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:n}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[r]);switch(n){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},r,b));case u:return b.delete(o),s(s({},e),{},c()({},r,b))}return e}},153:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c);n(2),n(369);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)("div",{className:o()("wc-block-components-product-badge",n)},t)}},154:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(7),s=n.n(a),i=(n(2),n(61)),u=n(57),l=Object(o.createElement)(u.a,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"})),b=Object(o.createElement)(u.a,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"}));n(377),t.a=function(e){var t=e.children,n=e.className,r=e.initialOpen,a=void 0!==r&&r,u=e.hasBorder,p=void 0!==u&&u,d=e.title,m=e.titleTag,g=void 0===m?"div":m,f=Object(o.useState)(a),O=c()(f,2),h=O[0],j=O[1];return Object(o.createElement)("div",{className:s()(n,"wc-blocks-components-panel",{"has-border":p})},Object(o.createElement)(g,null,Object(o.createElement)("button",{"aria-expanded":h,className:"wc-blocks-components-panel__button",onClick:function(){return j(!h)}},Object(o.createElement)(i.a,{"aria-hidden":"true",className:"wc-blocks-components-panel__button-icon",srcElement:h?l:b}),d)),Object(o.createElement)("div",{className:"wc-blocks-components-panel__content",hidden:!h},t))}},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(11),c=n.n(r),o=n(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},156:function(e,t,n){"use strict";n.d(t,"b",(function(){return T})),n.d(t,"a",(function(){return I}));var r=n(11),c=n.n(r),o=n(0),a=n(134),s=n(36),i=n(43),u=n.n(i),l=n(550),b=n(41),p=n(33),d=n(140),m=function(e){return{country:e.country,state:e.state,city:e.city,postcode:e.postcode.replace(" ","").toUpperCase()}},g=function(){var e=Object(a.a)().shippingAddress,t=Object(o.useState)(e),n=c()(t,2),r=n[0],i=n[1],g=Object(l.a)(r,400),f=c()(g,1)[0],O=Object(s.useDispatch)(b.CART_STORE_KEY).updateShippingAddress,h=Object(d.a)().addErrorNotice,j=Object(o.useRef)(e);Object(o.useEffect)((function(){var e,t;f.country&&(e=j.current,t=f,!u()(m(e),m(t)))&&O(f).then((function(){j.current=f})).catch((function(e){h(e.message,{id:"shipping-form"})}))}),[f,O,h]);var _={};return Object.keys(r).forEach((function(e){_[e]=Object(p.decodeEntities)(r[e])})),{shippingAddress:_,setShippingAddress:i}},f=n(864),O=n(170),h={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},j={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"},_={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:function(){return null},shippingErrorTypes:h,shippingRates:[],setShippingRates:function(){return null},shippingRatesLoading:!1,selectedRates:[],setSelectedRates:function(){return null},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:function(){return null},onShippingRateSuccess:function(){return null},onShippingRateFail:function(){return null},onShippingRateSelectSuccess:function(){return null},onShippingRateSelectFail:function(){return null},needsShipping:!1},v=n(150),y=n(396),w="shipping_rates_success",E="shipping_rates_fail",k="shipping_rate_select_success",S="shipping_rate_select_fail",P=function(e){return{onSuccess:Object(y.a)(w,e),onFail:Object(y.a)(E,e),onSelectSuccess:Object(y.a)(k,e),onSelectFail:Object(y.a)(S,e)}},C=n(397),N=h.NONE,R=h.INVALID_ADDRESS,x=h.UNKNOWN,M=function(e,t){var n=t.type;return Object.values(h).includes(n)?n:e},D=Object(o.createContext)(_),T=function(){return Object(o.useContext)(D)},I=function(e){var t=e.children,n=Object(O.b)().dispatchActions,r=Object(a.a)(),s=r.cartNeedsShipping,i=r.shippingRates,u=r.shippingRatesLoading,l=r.cartErrors,b=Object(o.useReducer)(M,N),p=c()(b,2),d=p[0],m=p[1],_=Object(o.useReducer)(v.b,{}),y=c()(_,2),T=y[0],I=y[1],A=g(),L=A.shippingAddress,F=A.setShippingAddress,U=Object(o.useRef)(T),B=Object(f.a)(i),V=B.selectShippingRate,q=B.selectedShippingRates,z=B.isSelectingRate,H=Object(o.useMemo)((function(){return{onShippingRateSuccess:P(I).onSuccess,onShippingRateFail:P(I).onFail,onShippingRateSelectSuccess:P(I).onSelectSuccess,onShippingRateSelectFail:P(I).onSelectFail}}),[I]);Object(o.useEffect)((function(){U.current=T}),[T]),Object(o.useEffect)((function(){u?n.incrementCalculating():n.decrementCalculating()}),[u,n]),Object(o.useEffect)((function(){z?n.incrementCalculating():n.decrementCalculating()}),[z,n]),Object(o.useEffect)((function(){l.length>0&&l.some((function(e){return!(!e.code||!Object.values(j).includes(e.code))}))?m({type:R}):m({type:N})}),[l]);var Y=Object(o.useMemo)((function(){return{isPristine:d===N,isValid:d===N,hasInvalidAddress:d===R,hasError:d===x||d===R}}),[d]);Object(o.useEffect)((function(){u||0!==i.length&&!Y.hasError||Object(C.a)(U.current,E,{hasInvalidAddress:Y.hasInvalidAddress,hasError:Y.hasError})}),[i,u,Y.hasError,Y.hasInvalidAddress]),Object(o.useEffect)((function(){!u&&i.length>0&&!Y.hasError&&Object(C.a)(U.current,w,i)}),[i,u,Y.hasError]),Object(o.useEffect)((function(){!z&&Y.hasError&&Object(C.a)(U.current,S,{hasError:Y.hasError,hasInvalidAddress:Y.hasInvalidAddress})}),[q,z,Y.hasError,Y.hasInvalidAddress]),Object(o.useEffect)((function(){z||!q||Y.hasError||Object(C.a)(U.current,k,q)}),[q,z,Y.hasError]);var G={shippingErrorStatus:Y,dispatchErrorStatus:m,shippingErrorTypes:h,shippingRates:i,setShippingRates:V,shippingRatesLoading:u,selectedRates:q,setSelectedRates:V,isSelectingRate:z,shippingAddress:L,setShippingAddress:F,onShippingRateSuccess:H.onShippingRateSuccess,onShippingRateFail:H.onShippingRateFail,onShippingRateSelectSuccess:H.onShippingRateSelectSuccess,onShippingRateSelectFail:H.onShippingRateSelectFail,needsShipping:s};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(D.Provider,{value:G},t))}},159:function(e,t,n){"use strict";var r=n(1),c={first_name:{label:Object(r.__)("First name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("First name (optional)","woo-gutenberg-products-block"),autocomplete:"given-name",autocapitalize:"sentences",required:!0,hidden:!1,index:1},last_name:{label:Object(r.__)("Last name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Last name (optional)","woo-gutenberg-products-block"),autocomplete:"family-name",autocapitalize:"sentences",required:!0,hidden:!1,index:2},company:{label:Object(r.__)("Company","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Company (optional)","woo-gutenberg-products-block"),autocomplete:"organization",autocapitalize:"sentences",required:!1,hidden:!1,index:3},address_1:{label:Object(r.__)("Address","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Address (optional)","woo-gutenberg-products-block"),autocomplete:"address-line1",autocapitalize:"sentences",required:!0,hidden:!1,index:4},address_2:{label:Object(r.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Apartment, suite, etc. (optional)","woo-gutenberg-products-block"),autocomplete:"address-line2",autocapitalize:"sentences",required:!1,hidden:!1,index:5},country:{label:Object(r.__)("Country/Region","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Country/Region (optional)","woo-gutenberg-products-block"),autocomplete:"country",required:!0,hidden:!1,index:6},city:{label:Object(r.__)("City","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("City (optional)","woo-gutenberg-products-block"),autocomplete:"address-level2",autocapitalize:"sentences",required:!0,hidden:!1,index:7},state:{label:Object(r.__)("State/County","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("State/County (optional)","woo-gutenberg-products-block"),autocomplete:"address-level1",autocapitalize:"sentences",required:!0,hidden:!1,index:8},postcode:{label:Object(r.__)("Postal code","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Postal code (optional)","woo-gutenberg-products-block"),autocomplete:"postal-code",autocapitalize:"characters",required:!0,hidden:!1,index:9}};t.a=c},164:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=n(1),s=n(55),i=n(7),u=n.n(i),l=(n(2),n(237),function(e){var t=e.className,n=e.currency,r=e.maxPrice,c=e.minPrice,a=e.priceClassName,i=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(s.a,{className:u()("wc-block-components-product-price__value",a),currency:n,value:c,style:i})," — ",Object(o.createElement)(s.a,{className:u()("wc-block-components-product-price__value",a),currency:n,value:r,style:i}))}),b=function(e){var t=e.className,n=e.currency,r=e.regularPriceClassName,c=e.regularPriceStyle,i=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(s.a,{currency:n,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",r),style:c},e)},value:i}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(s.a,{currency:n,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,a=e.maxPrice,i=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,m=e.price,g=void 0===m?null:m,f=e.priceClassName,O=e.priceStyle,h=e.regularPrice,j=e.regularPriceClassName,_=e.regularPriceStyle,v=u()(n,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return h&&g!==h?Object(o.createElement)(b,{className:v,currency:r,price:g,priceClassName:f,priceStyle:O,regularPrice:h,regularPriceClassName:j,regularPriceStyle:_}):null!==d&&null!==i?Object(o.createElement)(l,{className:v,currency:r,maxPrice:i,minPrice:d,priceClassName:f,priceStyle:O}):null!==g?Object(o.createElement)("span",{className:v},Object(o.createElement)(s.a,{className:u()("wc-block-components-product-price__value",f),currency:r,value:g,style:O})):Object(o.createElement)("span",{className:v},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",f)}))}},165:function(e,t,n){"use strict";var r=n(0);t.a=function(e){var t=e.label,n=e.secondaryLabel,c=e.description,o=e.secondaryDescription,a=e.id;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?"".concat(a,"__label"):null,className:"wc-block-components-radio-control__label"},t),n&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-label"):null,className:"wc-block-components-radio-control__secondary-label"},n)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},c&&Object(r.createElement)("span",{id:a?"".concat(a,"__description"):null,className:"wc-block-components-radio-control__description"},c),o&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-description"):null,className:"wc-block-components-radio-control__secondary-description"},o)))}},167:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},168:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),c=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},169:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(8),a=n.n(o),s=n(11),i=n.n(s),u=n(27),l=n.n(u),b=n(0),p=n(1),d=n(9),m=(n(2),n(7)),g=n.n(m),f=n(86),O=n(233),h=n(193),j=n(123);n(266);t.a=Object(h.a)((function(e){var t=e.className,n=e.instanceId,r=e.id,o=e.ariaDescribedBy,s=e.errorId,u=e.validateOnMount,m=void 0===u||u,h=e.focusOnMount,_=void 0!==h&&h,v=e.onChange,y=e.showError,w=void 0===y||y,E=l()(e,["className","instanceId","id","ariaDescribedBy","errorId","validateOnMount","focusOnMount","onChange","showError"]),k=Object(d.useState)(!0),S=i()(k,2),P=S[0],C=S[1],N=Object(d.useRef)(),R=Object(f.b)(),x=R.getValidationError,M=R.hideValidationError,D=R.setValidationErrors,T=R.clearValidationError,I=R.getValidationErrorId,A=r||"textinput-"+n;s=s||A;var L=Object(d.useCallback)((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];N.current.checkValidity()?T(s):D(a()({},s,{message:N.current.validationMessage||Object(p.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}),[T,s,D]);Object(d.useEffect)((function(){P&&(_&&N.current.focus(),C(!1))}),[_,P,C]),Object(d.useEffect)((function(){P&&(m&&L(),C(!1))}),[P,C,m,L]),Object(d.useEffect)((function(){return function(){T(s)}}),[T,s]);var F=x(s)||{},U=F.message&&!F.hidden,B=w&&U&&I(s)?I(s):o;return Object(b.createElement)(j.a,c()({className:g()(t,{"has-error":U}),id:A,onBlur:function(){L(!1)},feedback:w&&Object(b.createElement)(O.a,{propertyName:s}),ref:N,onChange:function(e){M(s),v(e)},ariaDescribedBy:B},E))}))},17:function(e,t){!function(){e.exports=this.wp.blocks}()},170:function(e,t,n){"use strict";n.d(t,"b",(function(){return De})),n.d(t,"a",(function(){return Te}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(1),u=n(140),l=n(395),b=n(36),p=n(168),d=n(3),m="pristine",g="idle",f="processing",O="complete",h="before_processing",j="after_processing",_=Object(d.getSetting)("checkoutData",{order_id:0,customer_id:0}),v={redirectUrl:"",status:m,hasError:!1,calculatingCount:0,orderId:_.order_id,orderNotes:"",customerId:_.customer_id,shouldCreateAccount:!1,processingResponse:null},y={SET_IDLE:"set_idle",SET_PRISTINE:"set_pristine",SET_REDIRECT_URL:"set_redirect_url",SET_COMPLETE:"set_checkout_complete",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_PROCESSING:"set_checkout_is_processing",SET_HAS_ERROR:"set_checkout_has_error",SET_NO_ERROR:"set_checkout_no_error",SET_ORDER_ID:"set_checkout_order_id",SET_ORDER_NOTES:"set_checkout_order_notes",INCREMENT_CALCULATING:"increment_calculating",DECREMENT_CALCULATING:"decrement_calculating"},w=y.SET_PRISTINE,E=y.SET_IDLE,k=y.SET_PROCESSING,S=y.SET_BEFORE_PROCESSING,P=y.SET_AFTER_PROCESSING,C=y.SET_PROCESSING_RESPONSE,N=y.SET_REDIRECT_URL,R=y.SET_COMPLETE,x=y.SET_HAS_ERROR,M=y.SET_NO_ERROR,D=y.INCREMENT_CALCULATING,T=y.DECREMENT_CALCULATING,I=y.SET_ORDER_ID,A=y.SET_SHOULD_CREATE_ACCOUNT,L=y.SET_ORDER_NOTES,F=function(){return{type:w}},U=function(){return{type:E}},B=function(){return{type:k}},V=function(e){return{type:N,url:e}},q=function(e){return{type:C,data:e}},z=function(e){return{type:R,data:e}},H=function(){return{type:S}},Y=function(){return{type:P}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?x:M;return{type:t}},W=function(){return{type:D}},$=function(){return{type:T}},K=function(e){return{type:I,orderId:e}},X=function(e){return{type:A,shouldCreateAccount:e}},Z=function(e){return{type:L,orderNotes:e}};function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=y.SET_PRISTINE,te=y.SET_IDLE,ne=y.SET_PROCESSING,re=y.SET_BEFORE_PROCESSING,ce=y.SET_AFTER_PROCESSING,oe=y.SET_PROCESSING_RESPONSE,ae=y.SET_REDIRECT_URL,se=y.SET_COMPLETE,ie=y.SET_HAS_ERROR,ue=y.SET_NO_ERROR,le=y.INCREMENT_CALCULATING,be=y.DECREMENT_CALCULATING,pe=y.SET_ORDER_ID,de=y.SET_ORDER_NOTES,me=y.SET_SHOULD_CREATE_ACCOUNT,ge=m,fe=g,Oe=f,he=h,je=j,_e=O,ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0,n=t.url,r=t.type,c=t.orderId,o=t.orderNotes,a=t.shouldCreateAccount,s=t.data,i=e;switch(r){case ee:i=v;break;case te:i=e.status!==fe?J(J({},e),{},{status:fe}):e;break;case ae:i=n!==e.url?J(J({},e),{},{redirectUrl:n}):e;break;case oe:i=J(J({},e),{},{processingResponse:s});break;case se:i=e.status!==_e?J(J({},e),{},{status:_e,redirectUrl:(null==s?void 0:s.redirectUrl)||e.redirectUrl}):e;break;case ne:i=!1===(i=e.status!==Oe?J(J({},e),{},{status:Oe,hasError:!1}):e).hasError?i:J(J({},i),{},{hasError:!1});break;case re:i=e.status!==he?J(J({},e),{},{status:he,hasError:!1}):e;break;case ce:i=e.status!==je?J(J({},e),{},{status:je}):e;break;case ie:i=e.hasError?e:J(J({},e),{},{hasError:!0}),i=e.status===Oe||e.status===he?J(J({},i),{},{status:fe}):i;break;case ue:i=e.hasError?J(J({},e),{},{hasError:!1}):e;break;case le:i=J(J({},e),{},{calculatingCount:e.calculatingCount+1});break;case be:i=J(J({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case pe:i=J(J({},e),{},{orderId:c});break;case me:a!==e.shouldCreateAccount&&(i=J(J({},e),{},{shouldCreateAccount:a}));break;case de:e.orderNotes!==o&&(i=J(J({},e),{},{orderNotes:o}))}return i!==e&&r!==ee&&i.status===ge&&(i.status=fe),i},ye=n(150),we=n(396),Ee="checkout_before_processing",ke="checkout_after_processing_with_success",Se="checkout_after_processing_with_error",Pe=function(e){return{onCheckoutAfterProcessingWithSuccess:Object(we.a)(ke,e),onCheckoutAfterProcessingWithError:Object(we.a)(Se,e),onCheckoutBeforeProcessing:Object(we.a)(Ee,e)}},Ce=n(397),Ne=n(86);function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Me=Object(s.createContext)({isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onSubmit:function(){},onCheckoutAfterProcessingWithSuccess:function(e){},onCheckoutAfterProcessingWithError:function(e){},onCheckoutBeforeProcessing:function(e){},dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setOrderId:function(e){},setOrderNotes:function(e){}},hasOrder:!1,isCart:!1}),De=function(){return Object(s.useContext)(Me)},Te=function(e){var t=e.children,n=e.redirectUrl,r=e.isCart,c=void 0!==r&&r;v.redirectUrl=n;var o,d=Object(s.useReducer)(ve,v),m=a()(d,2),_=m[0],y=m[1],w=Object(s.useReducer)(ye.b,{}),E=a()(w,2),k=E[0],S=E[1],P=Object(s.useRef)(k),C=Object(Ne.b)().setValidationErrors,N=Object(u.a)(),R=N.addErrorNotice,x=N.removeNotices,M=_.calculatingCount>0,D=Object(l.a)(),T=D.isSuccessResponse,I=D.isErrorResponse,A=D.isFailResponse,L=D.shouldRetry,Q=(o=Object(l.a)().noticeContexts,{checkoutNotices:Object(b.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(b.useSelect)((function(e){return e("core/notices").getNotices(o.EXPRESS_PAYMENTS)}),[o.EXPRESS_PAYMENTS]),paymentNotices:Object(b.useSelect)((function(e){return e("core/notices").getNotices(o.PAYMENTS)}),[o.PAYMENTS])}),J=Q.checkoutNotices,ee=Q.paymentNotices,te=Q.expressPaymentNotices;Object(s.useEffect)((function(){P.current=k}),[k]);var ne=Object(s.useMemo)((function(){return Pe(S).onCheckoutAfterProcessingWithSuccess}),[S]),re=Object(s.useMemo)((function(){return Pe(S).onCheckoutAfterProcessingWithError}),[S]),ce=Object(s.useMemo)((function(){return Pe(S).onCheckoutBeforeProcessing}),[S]),oe=Object(s.useMemo)((function(){return{resetCheckout:function(){y(F())},setRedirectUrl:function(e){y(V(e))},setHasError:function(e){y(G(e))},incrementCalculating:function(){y(W())},decrementCalculating:function(){y($())},setOrderId:function(e){y(K(e))},setOrderNotes:function(e){y(Z(e))},setAfterProcessing:function(e){var t,n,r,c;(!e.payment_result&&e.message&&200!==(null==e||null===(t=e.data)||void 0===t?void 0:t.status)&&(e.payment_result=xe(xe({},e.payment_result),{},{message:e.message})),e.payment_result)&&((null===(n=e.payment_result)||void 0===n?void 0:n.redirect_url)&&y(V(e.payment_result.redirect_url)),y(q((r=e.payment_result,c={message:(null==r?void 0:r.message)||"",paymentStatus:r.payment_status,paymentDetails:{}},Array.isArray(r.payment_details)&&r.payment_details.forEach((function(e){var t=e.key,n=e.value;c.paymentDetails[t]=n})),c))));y(Y())}}}),[]);Object(s.useEffect)((function(){_.status===h&&(x("error"),Object(Ce.a)(P.current,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,n=e.validationErrors;R(t),C(n)})),y(U())):y(B())})))}),[_.status,C,R,x,y]);var ae=Object(p.a)(_.status),se=Object(p.a)(_.hasError);Object(s.useEffect)((function(){if((_.status!==ae||_.hasError!==se)&&_.status===j){var e={redirectUrl:_.redirectUrl,orderId:_.orderId,customerId:_.customerId,customerNote:_.customerNote,processingResponse:_.processingResponse};_.hasError?Object(Ce.b)(P.current,Se,e).then((function(t){if(I(t)||A(t)){if(t.message){var n=t.messageContext?{context:t.messageContext}:void 0;R(t.message,n)}L(t)?y(U()):y(z(t))}else{if(!(J.some((function(e){return"error"===e.status}))||te.some((function(e){return"error"===e.status}))||ee.some((function(e){return"error"===e.status})))){var r,c=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");R(c,{id:"checkout"})}y(U())}})):Object(Ce.b)(P.current,ke,e).then((function(e){if(T(e))y(z(e));else if(I(e)||A(e)){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;R(e.message,t)}L(e)?y(G(!0)):y(z(e))}else y(z())}))}}),[_.status,_.hasError,_.redirectUrl,_.orderId,_.customerId,_.customerNote,_.processingResponse,ae,se,oe,R,I,A,T,L,J,te,ee]);var ie={onSubmit:Object(s.useCallback)((function(){y(H())}),[]),isComplete:_.status===O,isIdle:_.status===g,isCalculating:M,isProcessing:_.status===f,isBeforeProcessing:_.status===h,isAfterProcessing:_.status===j,hasError:_.hasError,redirectUrl:_.redirectUrl,onCheckoutAfterProcessingWithSuccess:ne,onCheckoutAfterProcessingWithError:re,onCheckoutBeforeProcessing:ce,dispatchActions:oe,isCart:c,orderId:_.orderId,hasOrder:!!_.orderId,customerId:_.customerId,orderNotes:_.orderNotes,shouldCreateAccount:_.shouldCreateAccount,setShouldCreateAccount:function(e){return y(X(e))}};return Object(s.createElement)(Me.Provider,{value:ie},t)}},177:function(e,t,n){"use strict";var r=n(0),c=n(142),o=n(95),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},s=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},i=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=s(e),c=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(c,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=s(e),a=c.slice(0,t);if(n)return Object(o.autop)(i(a,r));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(i(b,r))};t.a=function(e){var t=e.source,n=e.maxLength,s=void 0===n?15:n,i=e.countType,b=void 0===i?"words":i,p=e.className,d=void 0===p?"":p,m=Object(r.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",r=Object(o.autop)(e),s=Object(c.count)(r,n);if(s<=t)return r;var i=a(r),b=Object(c.count)(i,n);return b<=t?i:"words"===n?u(i,t):l(i,t,"characters_including_spaces"===n)}(t,s,b)}),[t,s,b]);return Object(r.createElement)(r.RawHTML,{className:d},m)}},18:function(e,t){!function(){e.exports=this.wp.url}()},185:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(22),a=n.n(o),s=n(25),i=n.n(s),u=n(19),l=n.n(u),b=n(23),p=n.n(b),d=n(24),m=n.n(d),g=n(12),f=n.n(g),O=n(8),h=n.n(O),j=n(0),_=n(9);n(260);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return m()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=v(r);function r(){var e;return a()(this,r),e=n.call(this),h()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),h()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),h()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(_.createRef)(),e}return i()(r,[{key:"render",value:function(){return Object(j.createElement)(_.Fragment,null,Object(j.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(j.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(_.Component);return t.displayName="withScrollToTop",t}},189:function(e,t,n){"use strict";var r=n(22),c=n.n(r),o=n(25),a=n.n(o),s=n(19),i=n.n(s),u=n(23),l=n.n(u),b=n(24),p=n.n(b),d=n(12),m=n.n(d),g=n(8),f=n.n(g),O=n(0),h=(n(2),n(9)),j=n(1),_=n(5),v=function(e){var t=e.imageUrl,n=void 0===t?"".concat(_.U,"img/block-error.svg"):t,r=e.header,c=void 0===r?Object(j.__)("Oops!","woo-gutenberg-products-block"):r,o=e.text,a=void 0===o?Object(j.__)("There was an error loading the content.","woo-gutenberg-products-block"):o,s=e.errorMessage,i=e.errorMessagePrefix,u=void 0===i?Object(j.__)("Error:","woo-gutenberg-products-block"):i;return Object(O.createElement)("div",{className:"wc-block-error wc-block-components-error"},n&&Object(O.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,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),a&&Object(O.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},a),s&&Object(O.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",s)))};n(262);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=y(n);function n(){var e;c()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),f()(i()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,c=e.text,o=e.errorMessagePrefix,a=this.state,s=a.errorMessage;return a.hasError?Object(O.createElement)(v,{errorMessage:r?s:null,header:t,imageUrl:n,text:c,errorMessagePrefix:o}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(O.createElement)(h.Fragment,null,Object(O.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);w.defaultProps={showErrorMessage:!0};t.a=w},191:function(e,t,n){"use strict";n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return h}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=(n(2),n(36)),u=n(303),l=n(944),b=n(140),p=n(212),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var c=n.filter((function(e){return"snackbar"===e.type}));return Object(s.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=Object(s.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),O=function(){return Object(s.useContext)(f)},h=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(i.useDispatch)("core/notices"),m=p.createNotice,O=p.removeNotice,h=Object(s.useState)(!1),j=a()(h,2),_=j[0],v=j[1],y=Object(s.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m(e,t,g(g({},n),{},{context:n.context||b}))}),[m,b]),w=Object(s.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;O(e,t)}),[O,b]),E=Object(s.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,g(g({},t),{},{type:"snackbar"}))}),[y]),k={notices:Object(i.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:y,createSnackbarNotice:E,removeNotice:w,context:b,setIsSuppressed:v},S=_?null:Object(s.createElement)(u.a,{className:r,notices:k.notices}),P=_?null:Object(s.createElement)(d,null);return Object(s.createElement)(f.Provider,{value:k},o&&S,t,P)}},194:function(e,t){},203:function(e,t){},204:function(e,t){},208:function(e,t,n){"use strict";var r=n(22),c=n.n(r),o=n(25),a=n.n(o),s=n(19),i=n.n(s),u=n(23),l=n.n(u),b=n(24),p=n.n(b),d=n(12),m=n.n(d),g=n(8),f=n.n(g),O=n(0),h=n(1),j=n(9),_=n(303),v=(n(2),n(5));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=y(n);function n(){var e;c()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),f()(i()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.state,t=e.hasError,n=e.errorMessage,r=this.props.isEditor;if(t){var c=Object(h.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(r||v.l)&&(c=n||Object(h.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));var o=[{id:"0",content:c,isDismissible:!1,status:"error"}];return Object(O.createElement)(_.a,{notices:o})}return this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{errorMessage:e.message,hasError:!0}}}]),n}(j.Component);w.defaultProps={isEditor:!1},t.a=w},209:function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(3),u=n(6),l=n(33);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=Object(i.getSetting)("checkoutData",{}),m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},g=Object(u.mapValues)(d.billing_address,(function(e){return Object(l.decodeEntities)(e)})),f=p(p({},m),g),O={billingData:m,setBillingData:function(){return null}};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(s.createContext)(O),v=function(){return Object(s.useContext)(_)},y=function(e){var t=e.children,n=Object(s.useState)(f),r=a()(n,2),c=r[0],o=r[1],i={billingData:c,setBillingData:Object(s.useCallback)((function(e){o((function(t){return j(j({},t),e)}))}),[])};return Object(s.createElement)(_.Provider,{value:i},t)}},210:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c),a=n(193),s=n(8),i=n.n(s),u=n(165),l=function(e){var t,n=e.checked,c=e.name,a=e.onChange,s=e.option,l=s.value,b=s.label,p=s.description,d=s.secondaryLabel,m=s.secondaryDescription;return Object(r.createElement)("label",{className:"wc-block-components-radio-control__option",htmlFor:"".concat(c,"-").concat(l)},Object(r.createElement)("input",{id:"".concat(c,"-").concat(l),className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:function(e){return a(e.target.value)},checked:n,"aria-describedby":o()((t={},i()(t,"".concat(c,"-").concat(l,"__label"),b),i()(t,"".concat(c,"-").concat(l,"__secondary-label"),d),i()(t,"".concat(c,"-").concat(l,"__description"),p),i()(t,"".concat(c,"-").concat(l,"__secondary-description"),m),t))}),Object(r.createElement)(u.a,{id:"".concat(c,"-").concat(l),label:b,secondaryLabel:d,description:p,secondaryDescription:m}))};n(376),t.a=Object(a.a)((function(e){var t=e.className,n=e.instanceId,c=e.id,a=e.selected,s=e.onChange,i=e.options,u=void 0===i?[]:i,b=c||n;return u.length&&Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},u.map((function(e){return Object(r.createElement)(l,{key:e.value,name:"radio-control-".concat(b),checked:e.value===a,option:e,onChange:function(t){s(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))},212:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(0),c=n(36),o=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),a=function(){return Object(r.useContext)(o)},s=function(e){var t=e.children,n=e.currentPostId,a=void 0===n?0:n,s=e.previewData,i=void 0===s?{}:s,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:i};return Object(r.createElement)(o.Provider,{value:u},t)}},233:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(86),o=(n(2),n(240),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!n){var p=l(a)||{};if(!p.message||p.hidden)return null;n=p.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:b(i)},n))})},237:function(e,t){},238:function(e,t){},239:function(e,t){},240:function(e,t){},259:function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),o=n(60),a=n.n(o),s=n(3);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l,b,p={code:s.CURRENCY.code,symbol:s.CURRENCY.symbol,thousandSeparator:s.CURRENCY.thousandSeparator,decimalSeparator:s.CURRENCY.decimalSeparator,minorUnit:s.CURRENCY.precision,prefix:(l=s.CURRENCY.symbol,b=s.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(s.CURRENCY.symbol,s.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,c=e.currency_decimal_separator,o=e.currency_minor_unit,s=e.currency_prefix,i=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(o)?o:2,prefix:"string"==typeof s?s:"$",suffix:"string"==typeof i?i:""}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=m(t),c=n/Math.pow(10,r.minorUnit),o=r.prefix+c+r.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},26:function(e,t){!function(){e.exports=this.wp.compose}()},260:function(e,t){},262:function(e,t){},263:function(e,t){},264:function(e,t){},265:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(11),a=n.n(o),s=n(27),i=n.n(s),u=n(0),l=n(169),b=n(58),p=n(310);n(2);t.a=function(e){var t=e.onChange,n=e.value,r=void 0===n?"":n,o=i()(e,["onChange","value"]),s=Object(u.useState)(r),d=a()(s,2),m=d[0],g=d[1],f=Object(p.a)((function(e){t(e)}),400),O=a()(f,1)[0],h=Object(b.a)(O);return Object(u.useEffect)((function(){h(m)}),[h,m]),Object(u.createElement)(l.a,c()({onChange:g,value:m},o))}},266:function(e,t){},268:function(e,t){!function(){e.exports=this.wp.deprecated}()},269:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(57),u=Object(s.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=a()(e,["className","size"]);return Object(s.createElement)(i.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),Object(s.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=n(284);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(s.cloneElement)(t,{size:e.size||20,className:e.className}):null}},273:function(e,t,n){"use strict";var r=n(51),c=n.n(r),o=n(0),a=n(1),s=n(4),i=n(36),u=n(40);t.a=function(e){var t=e.setPageId,n=e.pageId,r=e.labels,l=Object(i.useSelect)((function(e){return e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})}),[])||null;return l?Object(o.createElement)(s.PanelBody,{title:r.title},Object(o.createElement)(s.SelectControl,{label:Object(a.__)("Link to","woo-gutenberg-products-block"),value:n,options:[{label:r.default,value:0}].concat(c()(l.map((function(e){return{label:Object(u.a)(e,l),value:parseInt(e.id,10)}})))),onChange:function(e){return t(parseInt(e,10))}})):null}},274:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),c=n(1),o=(n(2),n(61)),a=n(305),s=n(167),i=(n(364),function(e){var t=e.text,n=e.url,i=void 0===n?"https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565":n;return Object(r.createElement)("div",{className:"wc-block-feedback-prompt"},Object(r.createElement)(o.a,{srcElement:a.a}),Object(r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(c.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:i,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(c.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(o.a,{srcElement:s.a,size:16})))}),u=function(){return Object(r.createElement)(i,{text:Object(c.__)("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"})}},275:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=n(388),s=n(387),i=n(212),u=n(281),l=n(208);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(){var e=Object(i.b)().isEditor,t=Object(u.b)(),n=t.setActivePaymentMethod,r=t.activePaymentMethod,c=t.paymentMethodData,b=t.setPaymentStatus,d=Object(a.a)(),m=Object(s.a)().paymentMethods,g=Object(o.useRef)(r),f=Object(o.useRef)(c),O=Object(o.useCallback)((function(e){return function(){g.current=r,f.current=c,b().started(),n(e)}}),[r,c,n,b]),h=Object(o.useCallback)((function(){n(g.current),f.current.isSavedToken&&b().success(f.current)}),[n,b]),j=Object.keys(m),_=j.length>0?j.map((function(t){var n=e?m[t].edit:m[t].content;return Object(o.isValidElement)(n)?Object(o.createElement)("li",{key:t,id:"express-payment-method-".concat(t)},Object(o.cloneElement)(n,p(p({},d),{},{onClick:O(t),onClose:h}))):null})):Object(o.createElement)("li",{key:"noneRegistered"},"No registered Payment Methods");return Object(o.createElement)(l.a,{isEditor:e},Object(o.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},_))}},277:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=(n(2),n(7)),u=n.n(i),l=n(1),b=n(61),p=n(284),d=(n(203),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,o=e.element,i=void 0===o?"li":o,l=e.className,b=void 0===l?"":l,p=e.radius,d=void 0===p?"small":p,m=e.children,g=void 0===m?null:m,f=a()(e,["text","screenReaderText","element","className","radius","children"]),O=i,h=u()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+d),j=Boolean(r&&r!==t);return Object(s.createElement)(O,c()({className:h},f),Object(s.createElement)("span",{"aria-hidden":j,className:"wc-block-components-chip__text"},t),j&&Object(s.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,o=void 0===r?"":r,i=e.disabled,m=void 0!==i&&i,g=e.onRemove,f=void 0===g?function(){}:g,O=e.removeOnAnyClick,h=void 0!==O&&O,j=e.text,_=e.screenReaderText,v=void 0===_?"":_,y=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=h?"span":"button";if(!n){var E=v&&"string"==typeof v?v:j;n="string"!=typeof E?Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var k={"aria-label":n,disabled:m,onClick:f,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||f()}},S=h?k:{},P=h?{"aria-hidden":!0}:k;return Object(s.createElement)(d,c()({},y,S,{className:u()(o,"is-removable"),element:h?"button":y.element,screenReaderText:v,text:j}),Object(s.createElement)(w,c()({className:"wc-block-components-chip__remove"},P),Object(s.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},281:function(e,t,n){"use strict";n.d(t,"b",(function(){return je})),n.d(t,"a",(function(){return _e}));var r=n(51),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(3),u=n(395),l=n(140),b=n(212),p=n(8),d=n.n(p);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){d()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},O=g(g({},f),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),h={currentStatus:f.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},j={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:f,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},_=n(60),v=n.n(_);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){d()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=O.STARTED,k=O.ERROR,S=O.FAILED,P=O.SUCCESS,C=O.PROCESSING,N=O.PRISTINE,R=O.COMPLETE,x=O.SET_REGISTERED_PAYMENT_METHODS,M=O.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,D=O.SET_SHOULD_SAVE_PAYMENT_METHOD,T=function(e){return!("object"!==v()(e)||!e.isSavedToken)},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.paymentMethodData,c=t.shouldSavePaymentMethod,o=t.errorMessage,a=t.paymentMethods;switch(n){case E:return e.currentStatus!==E?w(w({},e),{},{currentStatus:E}):e;case k:return e.currentStatus!==k?w(w({},e),{},{currentStatus:k,errorMessage:o||e.errorMessage}):e;case S:return e.currentStatus!==S?w(w({},e),{},{currentStatus:S,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}):e;case P:return e.currentStatus!==P?w(w({},e),{},{currentStatus:P,paymentMethodData:r||e.paymentMethodData,hasSavedToken:T(r)}):e;case C:return e.currentStatus!==C?w(w({},e),{},{currentStatus:C,errorMessage:""}):e;case R:return e.currentStatus!==R?w(w({},e),{},{currentStatus:R}):e;case N:return w(w({},h),{},{currentStatus:N,paymentMethods:w({},e.paymentMethods),expressPaymentMethods:w({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case x:return w(w({},e),{},{paymentMethods:a});case M:return w(w({},e),{},{expressPaymentMethods:w(w({},e.expressPaymentMethods),a)});case D:return w(w({},e),{},{shouldSavePaymentMethod:c})}return e},A=O.ERROR,L=O.FAILED,F=O.SUCCESS,U=O.SET_REGISTERED_PAYMENT_METHODS,B=O.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,V=O.SET_SHOULD_SAVE_PAYMENT_METHOD,q=function(e){return{type:e}},z=function(e){var t=e.errorMessage,n=e.paymentMethodData;return{type:L,errorMessage:t,paymentMethodData:n}},H=function(e){var t=e.paymentMethodData;return{type:F,paymentMethodData:t}},Y=n(15),G=n.n(Y),W=n(37),$=n.n(W),K=n(1),X=n(56),Z=n(156),Q=n(58),J=n(134),ee=n(5);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){d()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e,t,n,r){var c=Object(s.useState)(!1),o=a()(c,2),i=o[0],u=o[1],p=Object(b.b)().isEditor,m=Object(Z.b)(),g=m.selectedRates,f=m.shippingAddress,O=Object(Q.a)(g),h=Object(Q.a)(n),j=Object(J.a)(),_=j.cartTotals,v=j.cartNeedsShipping,y=Object(s.useRef)({cartTotals:_,cartNeedsShipping:v,shippingAddress:f,selectedShippingMethods:O}),w=Object(l.a)().addErrorNotice;Object(s.useEffect)((function(){y.current={cartTotals:_,cartNeedsShipping:v,shippingAddress:f,selectedShippingMethods:O}}),[_,v,f,O]);var E=Object(s.useCallback)($()(G.a.mark((function n(){var c,o,a,s,i,l,b;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:c={},o=function(e){c=ne(ne({},c),{},d()({},e.name,e))},a=0;case 3:if(!(a<h.length)){n.next=24;break}if(s=h[a],i=t[s]){n.next=8;break}return n.abrupt("continue",21);case 8:return n.prev=8,n.next=11,Promise.resolve(i.canMakePayment(y.current));case 11:if(!(l=n.sent)){n.next=16;break}if(!l.error){n.next=15;break}throw new Error(l.error.message);case 15:o(i);case 16:n.next=21;break;case 18:n.prev=18,n.t0=n.catch(8),(ee.l||p)&&(b=Object(K.sprintf)(Object(K.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),i.paymentMethodId),w("".concat(b," ").concat(n.t0),{context:r,id:"wc-".concat(i.paymentMethodId,"-registration-error")}));case 21:a++,n.next=3;break;case 24:e(c),u(!0);case 26:case"end":return n.stop()}}),n,null,[[8,18]])}))),[w,e,p,r,h,t]);return Object(s.useEffect)((function(){E()}),[E,O]),i},ce=n(209),oe=n(170),ae=n(150),se=n(396),ie="payment_processing",ue=n(397),le=n(86),be=f.STARTED,pe=f.PROCESSING,de=f.COMPLETE,me=f.PRISTINE,ge=f.ERROR,fe=f.FAILED,Oe=f.SUCCESS,he=Object(s.createContext)(j),je=function(){return Object(s.useContext)(he)},_e=function(e){var t=e.children,n=Object(ce.b)().setBillingData,r=Object(oe.b)(),o=r.isProcessing,p=r.isIdle,d=r.isCalculating,m=r.hasError,g=Object(u.a)(),O=g.isSuccessResponse,j=g.isErrorResponse,_=g.isFailResponse,v=g.noticeContexts,y=Object(s.useState)(""),w=a()(y,2),E=w[0],k=w[1],S=Object(s.useReducer)(ae.b,{}),P=a()(S,2),C=P[0],N=P[1],R=Object(s.useRef)(C),x=Object(b.b)(),M=x.isEditor,D=x.previewData,T=Object(s.useReducer)(I,h),L=a()(T,2),F=L[0],Y=L[1],G=Object(s.useCallback)((function(e){k(e),Y(q(me))}),[k,Y]),W=Object(s.useCallback)((function(e){Y(function(e){return{type:U,paymentMethods:e}}(e))}),[Y]),$=Object(s.useCallback)((function(e){Y(function(e){return{type:B,paymentMethods:e}}(e))}),[Y]),K=function(e){var t=Object(X.getPaymentMethods)(),n=Object(u.a)().noticeContexts,r=new Set([].concat(c()(ee.F),c()(Object.keys(t))));return re(e,t,Array.from(r),n.PAYMENTS)}(W),Q=function(e){var t=Object(X.getExpressPaymentMethods)(),n=Object(u.a)().noticeContexts;return re(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}($),J=Object(le.b)().setValidationErrors,te=Object(l.a)(),ne=te.addErrorNotice,je=te.removeNotice,_e=Object(Z.b)().setShippingAddress,ve=Object(s.useCallback)((function(e){Y({type:V,shouldSavePaymentMethod:e})}),[Y]),ye=Object(s.useMemo)((function(){return M&&D.previewSavedPaymentMethods?D.previewSavedPaymentMethods:K&&0!==F.paymentMethods.length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(i.getSetting)("customerPaymentMethods",{}),n=Object.keys(t);if(0===n.length)return{};var r={};return n.forEach((function(n){r[n]=t[n].filter((function(t){return Object.keys(e).includes(t.method.gateway)}))})),r}(F.paymentMethods):{}}),[M,D.previewSavedPaymentMethods,K,F.paymentMethods]),we=Object(s.useCallback)((function(e){e?ne(e,{context:v.EXPRESS_PAYMENTS,id:"wc-express-payment-error"}):je("wc-express-payment-error",v.EXPRESS_PAYMENTS)}),[ne,v.EXPRESS_PAYMENTS,je]);Object(s.useEffect)((function(){R.current=C}),[C]);var Ee=Object(s.useMemo)((function(){return(e=N,{onPaymentProcessing:Object(se.a)(ie,e)}).onPaymentProcessing;var e}),[N]),ke=Object(s.useMemo)((function(){return{isPristine:F.currentStatus===me,isStarted:F.currentStatus===be,isProcessing:F.currentStatus===pe,isFinished:[ge,fe,Oe].includes(F.currentStatus),hasError:F.currentStatus===ge,hasFailed:F.currentStatus===fe,isSuccessful:F.currentStatus===Oe}}),[F.currentStatus]),Se=Object(s.useCallback)((function(){return{started:function(){return Y(q(be))},processing:function(){return Y(q(pe))},completed:function(){return Y(q(de))},error:function(e){return Y(function(e){return{type:A,errorMessage:e}}(e))},failed:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r&&n(r),Y(z({errorMessage:e,paymentMethodData:t}))},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&n(t),null!==r&&(null==r?void 0:r.address)&&_e(r.address),Y(H({paymentMethodData:e}))}}}),[Y,n,_e]);Object(s.useEffect)((function(){!o||m||d||ke.isFinished||Se().processing()}),[o,m,d,ke.isFinished,Se]),Object(s.useEffect)((function(){p&&!ke.isSuccessful&&Y(q(me))}),[p,ke.isSuccessful]),Object(s.useEffect)((function(){m&&ke.isSuccessful&&!F.hasSavedToken&&Y(q(me))}),[m,ke.isSuccessful,F.hasSavedToken]),Object(s.useEffect)((function(){var e=Object.keys(F.paymentMethods),t=[].concat(c()(e),c()(Object.keys(F.expressPaymentMethods)));K&&e.length&&k((function(e){return e&&t.includes(e)?e:(Y(q(me)),Object.keys(F.paymentMethods)[0])}))}),[K,F.paymentMethods,F.expressPaymentMethods,k]),Object(s.useEffect)((function(){ke.isProcessing&&(je("wc-payment-error",v.PAYMENTS),Object(ue.b)(R.current,ie,{}).then((function(e){var t,n,r;if(O(e))Se().success(null==e||null===(t=e.meta)||void 0===t?void 0:t.paymentMethodData,null==e||null===(n=e.meta)||void 0===n?void 0:n.billingData,null==e||null===(r=e.meta)||void 0===r?void 0:r.shippingData);else if(_(e)){var c,o;e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||v.PAYMENTS}),Se().failed(null==e?void 0:e.message,null==e||null===(c=e.meta)||void 0===c?void 0:c.paymentMethodData,null==e||null===(o=e.meta)||void 0===o?void 0:o.billingData)}else j(e)?(e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||v.PAYMENTS}),Se().error(e.message),J(null==e?void 0:e.validationErrors)):Se().success()})))}),[ke.isProcessing,J,Se,je,v.PAYMENTS,O,_,j,ne]);var Pe={setPaymentStatus:Se,currentStatus:ke,paymentStatuses:f,paymentMethodData:F.paymentMethodData,errorMessage:F.errorMessage,activePaymentMethod:E,setActivePaymentMethod:G,onPaymentProcessing:Ee,customerPaymentMethods:ye,paymentMethods:F.paymentMethods,expressPaymentMethods:F.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:Q,setExpressPaymentError:we,shouldSavePayment:F.shouldSavePaymentMethod,setShouldSavePayment:ve};return Object(s.createElement)(he.Provider,{value:Pe},t)}},284:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(57),u=Object(s.createElement)((function(e){var t=e.className,n=e.size,r=a()(e,["className","size"]);return Object(s.createElement)(i.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(s.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},303:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(0),a=(n(2),n(7)),s=n.n(a),i=n(390),u=n(191),l=(n(238),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,a=n.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=s()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(i.a,c()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},305:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{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:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=o},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},36:function(e,t){!function(){e.exports=this.wp.data}()},362:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{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:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},364:function(e,t){},365:function(e,t){},366:function(e,t){},367:function(e,t){},368:function(e,t){},369:function(e,t){},370:function(e,t){},371:function(e,t){},372:function(e,t){},373:function(e,t){},374:function(e,t){},375:function(e,t){},376:function(e,t){},377:function(e,t){},378:function(e,t){},379:function(e,t){},380:function(e,t){},381:function(e,t){},382:function(e,t){},383:function(e,t){},387:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(281),c=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(r.b)(),n=t.paymentMethods,c=t.expressPaymentMethods,o=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized;return e?{paymentMethods:c,isInitialized:a}:{paymentMethods:n,isInitialized:o}},o=function(){return c()},a=function(){return c(!0)}},388:function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r=n(170),c=n(281),o=n(156),a=n(209),s=n(1),i=n(259),u=n(0),l=n(5),b=n(233),p=n(395),d=n(917),m=n(7),g=n.n(m),f=n(57),O=Object(u.createElement)(f.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(u.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),h=n(362),j=n(882),_=Object(u.createElement)(f.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(u.createElement)("path",{d:"M0 0h24v24H0z"}),Object(u.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(u.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"}))),v=n(61),y=(n(383),{bank:O,bill:h.a,card:j.a,checkPayment:_}),w=function(e){var t=e.icon,n=void 0===t?"":t,r=e.text,c=void 0===r?"":r,o=!!n,a=o&&"string"==typeof n&&y[n],s=g()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return Object(u.createElement)("span",{className:s},a?Object(u.createElement)(v.a,{srcElement:y[n]}):n,c)},E=n(134),k=n(866),S=function(e,t){var n=[],r=function(t,n){var r=parseInt(e[n],10);return{label:t,value:r,valueWithTax:r+parseInt(e[n+"_tax"],10)}};return n.push(r(Object(s.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(r(Object(s.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(r(Object(s.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({label:Object(s.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(r(Object(s.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},P=function(){var e=Object(r.b)(),t=e.isCalculating,n=e.isComplete,m=e.isIdle,g=e.isProcessing,f=e.onCheckoutAfterProcessingWithSuccess,O=e.onCheckoutAfterProcessingWithError,h=e.onCheckoutBeforeProcessing,j=e.onSubmit,_=e.customerId,v=Object(c.b)(),y=v.currentStatus,P=v.activePaymentMethod,C=v.onPaymentProcessing,N=v.setExpressPaymentError,R=Object(o.b)(),x=R.shippingErrorStatus,M=R.shippingErrorTypes,D=R.shippingRates,T=R.shippingRatesLoading,I=R.selectedRates,A=R.setSelectedRates,L=R.isSelectingRate,F=R.shippingAddress,U=R.setShippingAddress,B=R.onShippingRateSuccess,V=R.onShippingRateFail,q=R.onShippingRateSelectSuccess,z=R.onShippingRateSelectFail,H=R.needsShipping,Y=Object(a.b)().billingData,G=Object(E.a)().cartTotals,W=Object(k.a)().appliedCoupons,$=Object(p.a)(),K=$.noticeContexts,X=$.responseTypes,Z=Object(u.useRef)(S(G,H)),Q=Object(u.useRef)({label:Object(s.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)});return Object(u.useEffect)((function(){Z.current=S(G,H),Q.current={label:Object(s.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)}}),[G,H]),{checkoutStatus:{isCalculating:t,isComplete:n,isIdle:m,isProcessing:g},paymentStatus:y,shippingStatus:{shippingErrorStatus:x,shippingErrorTypes:M},shippingData:{shippingRates:D,shippingRatesLoading:T,selectedRates:I,setSelectedRates:A,isSelectingRate:L,shippingAddress:F,setShippingAddress:U,needsShipping:H},billing:{billingData:Y,cartTotal:Q.current,currency:Object(i.c)(G),cartTotalItems:Z.current,displayPricesIncludingTax:l.p,appliedCoupons:W,customerId:_},eventRegistration:{onCheckoutAfterProcessingWithSuccess:f,onCheckoutAfterProcessingWithError:O,onCheckoutBeforeProcessing:h,onShippingRateSuccess:B,onShippingRateFail:V,onShippingRateSelectSuccess:q,onShippingRateSelectFail:z,onPaymentProcessing:C},components:{ValidationInputError:b.a,PaymentMethodIcons:d.a,PaymentMethodLabel:w},emitResponse:{noticeContexts:K,responseTypes:X},onSubmit:j,activePaymentMethod:P,setExpressPaymentError:N}}},389:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return b}));var r=n(11),c=n.n(r),o=n(0),a=(n(2),n(938)),s=n(7),i=n.n(s),u=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=function(){return Object(o.useContext)(u)},b=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,s=function(){var e=Object(a.a)(),t=c()(e,2),n=t[0],r=t[1].width,o="";return r>700?o="is-large":r>520?o="is-medium":r>400?o="is-small":r&&(o="is-mobile"),[n,o]}(),l=c()(s,2),b=l[0],p=l[1],d={hasContainerWidth:""!==p,containerClassName:p,isMobile:"is-mobile"===p,isSmall:"is-small"===p,isMedium:"is-medium"===p,isLarge:"is-large"===p};return Object(o.createElement)(u.Provider,{value:d},Object(o.createElement)("div",{className:i()(r,p)},b,t))}},395:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return r(e,c.SUCCESS)},s=function(e){return r(e,c.ERROR)},i=function(e){return r(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},396:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(150),c=function(e,t){return function(n){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=r.a.addEventCallback(e,n,c);return t(o),function(){t(r.a.removeEventCallback(e,o.id))}}}},397:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return d}));var r=n(15),c=n.n(r),o=n(60),a=n.n(o),s=n(37),i=n.n(s);function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,c=function(){};return{s:c,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=i()(c.a.mark((function e(t,n,r){var o,s,i,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,n),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(r));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,n,r){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,n,r){var o,s,i,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,n),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(r));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,n,r){return e.apply(this,arguments)}}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,n){"use strict";n.d(t,"h",(function(){return p})),n.d(t,"e",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"i",(function(){return g})),n.d(t,"f",(function(){return f})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return h})),n.d(t,"g",(function(){return j})),n.d(t,"a",(function(){return _}));var r=n(8),c=n.n(r),o=n(18),a=n(13),s=n.n(a),i=n(6),u=n(5);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,c=void 0===r?"":r,a=e.queryArgs,l=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,c=void 0===r?"":r,a=e.queryArgs,s=void 0===a?[]:a,i={per_page:u.v?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},i),s))];return u.v&&n.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:n})),l}({selected:n,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return s()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},d=function(e){return s()({path:"/wc/store/products/".concat(e)})},m=function(){return s()({path:"wc/store/products/attributes"})},g=function(e){return s()({path:"wc/store/products/attributes/".concat(e,"/terms")})},f=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.y?100:0,orderby:u.y?"count":"name",order:u.y?"desc":"asc",search:r})];return u.y&&n.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:n})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map((function(e){return s()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")}))},O=function(e){return s()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},h=function(e){return s()({path:"wc/store/products/categories/".concat(e)})},j=function(e){return s()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},_=function(e,t){if(!e.title.raw)return e.slug;var n=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(n?"":" - ".concat(e.slug))}},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},43:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=(n(2),n(9)),s=n(7),i=n.n(s);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,s=e.wrapperProps,u=void 0===s?{}:s,b=null!=n,p=null!=r;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:i()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,r)):(t=c||a.Fragment,b&&p&&n!==r?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,u,n))}},5:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"K",(function(){return o})),n.d(t,"Q",(function(){return a})),n.d(t,"A",(function(){return s})),n.d(t,"C",(function(){return i})),n.d(t,"m",(function(){return u})),n.d(t,"B",(function(){return l})),n.d(t,"E",(function(){return b})),n.d(t,"o",(function(){return p})),n.d(t,"D",(function(){return d})),n.d(t,"n",(function(){return m})),n.d(t,"G",(function(){return g})),n.d(t,"v",(function(){return f})),n.d(t,"y",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"u",(function(){return _})),n.d(t,"k",(function(){return v})),n.d(t,"M",(function(){return y})),n.d(t,"R",(function(){return w})),n.d(t,"q",(function(){return E})),n.d(t,"r",(function(){return k})),n.d(t,"p",(function(){return S})),n.d(t,"J",(function(){return P})),n.d(t,"c",(function(){return C})),n.d(t,"w",(function(){return N})),n.d(t,"x",(function(){return R})),n.d(t,"U",(function(){return M})),n.d(t,"V",(function(){return D})),n.d(t,"L",(function(){return T})),n.d(t,"a",(function(){return I})),n.d(t,"O",(function(){return A})),n.d(t,"b",(function(){return L})),n.d(t,"N",(function(){return F})),n.d(t,"F",(function(){return U})),n.d(t,"i",(function(){return B})),n.d(t,"P",(function(){return z})),n.d(t,"h",(function(){return H})),n.d(t,"j",(function(){return Y})),n.d(t,"I",(function(){return G})),n.d(t,"H",(function(){return W})),n.d(t,"T",(function(){return $})),n.d(t,"S",(function(){return K})),n.d(t,"d",(function(){return X})),n.d(t,"e",(function(){return Z})),n.d(t,"f",(function(){return Q})),n.d(t,"g",(function(){return J})),n.d(t,"z",(function(){return ee})),n.d(t,"Y",(function(){return ne})),n.d(t,"Z",(function(){return re})),n.d(t,"W",(function(){return ce})),n.d(t,"X",(function(){return oe}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),a=Object(r.getSetting)("showAvatars",!0),s=Object(r.getSetting)("max_columns",6),i=Object(r.getSetting)("min_columns",1),u=Object(r.getSetting)("default_columns",3),l=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),p=Object(r.getSetting)("default_rows",3),d=Object(r.getSetting)("min_height",500),m=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),f=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),O=Object(r.getSetting)("limitTags"),h=Object(r.getSetting)("hasProducts",!0),j=Object(r.getSetting)("hasTags",!0),_=Object(r.getSetting)("homeUrl",""),v=Object(r.getSetting)("couponsEnabled",!0),y=Object(r.getSetting)("shippingEnabled",!0),w=Object(r.getSetting)("taxesEnabled",!0),E=Object(r.getSetting)("displayItemizedTaxes",!1),k=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),S=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),N=Object(r.getSetting)("isShippingCalculatorEnabled",!0),R=Object(r.getSetting)("isShippingCostHidden",!1),x=Object(r.getSetting)("woocommerceBlocksPhase",1),M=Object(r.getSetting)("wcBlocksAssetUrl",""),D=Object(r.getSetting)("wcBlocksBuildUrl",""),T=Object(r.getSetting)("shippingCountries",{}),I=Object(r.getSetting)("allowedCountries",{}),A=Object(r.getSetting)("shippingStates",{}),L=Object(r.getSetting)("allowedStates",{}),F=Object(r.getSetting)("shippingMethodsExist",!1),U=Object(r.getSetting)("paymentGatewaySortOrder",[]),B=Object(r.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},q=Object(r.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),z=q.shop.permalink,H=q.checkout.id,Y=q.checkout.permalink,G=q.privacy.permalink,W=q.privacy.title,$=q.terms.permalink,K=q.terms.title,X=q.cart.id,Z=q.cart.permalink,Q=Object(r.getSetting)("checkoutAllowsGuest",!1),J=Object(r.getSetting)("checkoutAllowsSignup",!1),ee=Object(r.getSetting)("loginUrl","/wp-login.php"),te=n(17),ne=function(e,t){if(x>2)return Object(te.registerBlockType)(e,t)},re=function(e,t){if(x>1)return Object(te.registerBlockType)(e,t)},ce=function(){return x>2},oe=function(){return x>1}},54:function(e,t){!function(){e.exports=this.wp.keycodes}()},543:function(e,t){},544:function(e,t){},55:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(8),a=n.n(o),s=n(27),i=n.n(s),u=n(0),l=n(184),b=n(7),p=n.n(b);n(194);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.className,n=e.value,r=e.currency,o=e.onValueChange,a=i()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var s=n/Math.pow(10,r.minorUnit);if(!Number.isFinite(s))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=m(m(m({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(r)),{},{value:void 0,currency:void 0,onValueChange:void 0}),g=o?function(e){var t=e.value*Math.pow(10,r.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:s,onValueChange:g}))}},56:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},563:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},58:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),c=n(43),o=n.n(c),a=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(27),a=n.n(o),s=n(9);n(2);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=a()(e,["srcElement","size"]);return Object(s.isValidElement)(t)&&Object(s.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))}},65:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(7)),o=n.n(c),a=n(55);n(371);t.a=function(e){var t=e.className,n=e.currency,c=e.label,s=e.value,i=e.description;return Object(r.createElement)("div",{className:o()("wc-block-components-totals-item",t)},Object(r.createElement)("span",{className:"wc-block-components-totals-item__label"},c),Object(r.isValidElement)(s)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},s):Object(r.createElement)(a.a,{className:"wc-block-components-totals-item__value",currency:n,displayType:"text",value:s}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},i))}},78:function(e,t){!function(){e.exports=this.wp.dom}()},86:function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(6),u=n(43),l=n.n(u);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=Object(s.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),m=function(){return Object(s.useContext)(d)},g=function(e){var t=e.children,n=Object(s.useState)({}),r=a()(n,2),o=r[0],u=r[1],b=Object(s.useCallback)((function(e){return o[e]}),[o]),m=Object(s.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),g=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),f=Object(s.useCallback)((function(){u({})}),[]),O=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,n){return"string"==typeof e.message&&(!t.hasOwnProperty(n)||!l()(t[n],e))})),0===Object.values(e).length?t:p(p({},t),e)}))}),[]),h=Object(s.useCallback)((function(e,t){u((function(n){if(!n.hasOwnProperty(e))return n;var r=p(p({},n[e]),t);return l()(n[e],r)?n:p(p({},n),{},c()({},e,r))}))}),[]),j={getValidationError:b,setValidationErrors:O,clearValidationError:g,clearAllValidationErrors:f,hideValidationError:Object(s.useCallback)((function(e){h(e,{hidden:!0})}),[h]),showValidationError:Object(s.useCallback)((function(e){h(e,{hidden:!1})}),[h]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(n){e[n].hidden&&(t[n]=p(p({},e[n]),{},{hidden:!1}))})),0===Object.values(t).length?e:p(p({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:m};return Object(s.createElement)(d.Provider,{value:j},t)}},864:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(36),i=n(0),u=n(41),l=n(155);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t=Object(l.a)(),n=Object(i.useMemo)((function(){return e.map((function(e){var t;return[e.package_id,null===(t=e.shipping_rates.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id]})).reduce((function(e,t){var n=a()(t,2),r=n[0],c=n[1];return c&&(e[r]=c),e}),{})}),[e]),r=Object(i.useState)(n),o=a()(r,2),b=o[0],d=o[1];Object(i.useEffect)((function(){d(n)}),[n]);var m=Object(s.useDispatch)(u.CART_STORE_KEY).selectShippingRate,g=Object(s.useSelect)((function(e){return e(u.CART_STORE_KEY).isShippingRateBeingSelected()}),[]);return{selectShippingRate:function(e,n){d(p(p({},b),{},c()({},n,e))),m(e,n).catch((function(e){t(e)}))},selectedShippingRates:b,isSelectingRate:g}}},866:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(8),c=n.n(r),o=n(1),a=n(36),s=n(41),i=n(86),u=n(33),l=n(134),b=n(140);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var d=function(){var e=Object(l.a)(),t=e.cartCoupons,n=e.cartIsLoading,r=Object(b.a)(),d=r.addErrorNotice,m=r.addSnackbarNotice,g=Object(i.b)().setValidationErrors;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({appliedCoupons:t,isLoading:n},Object(a.useSelect)((function(e,t){var n=t.dispatch,r=e(s.CART_STORE_KEY),c=r.isApplyingCoupon(),a=r.isRemovingCoupon(),i=n(s.CART_STORE_KEY),l=i.applyCoupon,b=i.removeCoupon,p=i.receiveApplyingCoupon;return{applyCoupon:function(e){l(e).then((function(t){!0===t&&m(Object(o.sprintf)(Object(o.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){g({coupon:{message:Object(u.decodeEntities)(e.message),hidden:!1}}),p("")}))},removeCoupon:function(e){b(e).then((function(t){!0===t&&m(Object(o.sprintf)(Object(o.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){d(e.message,{id:"coupon-form"}),p("")}))},isApplyingCoupon:c,isRemovingCoupon:a}}),[d,m]))}},867:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c),a=(n(2),n(389));n(366);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",n)},t)}},868:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c);n(2);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)("div",{className:o()("wc-block-components-main",n)},t)}},869:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(0),a=n(33),s=n(5);n(2);t.a=function(e){var t=e.image,n=void 0===t?{}:t,r={src:n.thumbnail||s.G,alt:Object(a.decodeEntities)(n.alt)||""};return Object(o.createElement)("img",c()({},r,{alt:r.alt}))}},87:function(e,t){!function(){e.exports=this.wp.a11y}()},870:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(33));n(368);t.a=function(e){var t=e.name,n=e.permalink,o=e.disabled,a=void 0!==o&&o;return Object(r.createElement)("a",{className:"wc-block-components-product-name",href:n,tabIndex:a?-1:0},Object(c.decodeEntities)(t))}},871:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(153);t.a=function(){return Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(c.__)("Available on backorder","woo-gutenberg-products-block"))}},872:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(153));t.a=function(e){var t=e.lowStockRemaining;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(c.sprintf)(Object(c.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},874:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c);n(2);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)("div",{className:o()("wc-block-components-sidebar",n)},t)}},875:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=(n(2),n(65));t.a=function(e){var t=e.currency,n=e.values,s=n.total_items,i=n.total_items_tax,u=parseInt(s,10),l=parseInt(i,10);return Object(r.createElement)(a.a,{currency:t,label:Object(c.__)("Subtotal","woo-gutenberg-products-block"),value:o.p?u+l:u})}},876:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=n(156),s=(n(2),n(65));t.a=function(e){var t=e.currency,n=e.values;if(!Object(a.b)().needsShipping)return null;var i=n.total_fees,u=n.total_fees_tax,l=parseInt(i,10);if(!l)return null;var b=parseInt(u,10);return Object(r.createElement)(s.a,{className:"wc-block-components-totals-fees",currency:t,label:Object(c.__)("Fees","woo-gutenberg-products-block"),value:o.p?l+b:l})}},877:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=n(125),s=n(277),i=(n(2),n(65));n(372);t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,u=e.currency,l=e.isRemovingCoupon,b=e.removeCoupon,p=e.values,d=p.total_discount,m=p.total_discount_tax,g=parseInt(d,10);if(!g&&0===n.length)return null;var f=parseInt(m,10),O=o.p?g+f:g;return Object(r.createElement)(i.a,{className:"wc-block-components-totals-discount",currency:u,description:0!==n.length&&Object(r.createElement)(a.a,{screenReaderLabel:Object(c.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:l,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},n.map((function(e){return Object(r.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,screenReaderText:Object(c.sprintf)(Object(c.__)("Coupon: %s","woo-gutenberg-products-block"),e.code),disabled:l,onRemove:function(){b(e.code)},radius:"large",ariaLabel:Object(c.sprintf)(Object(c.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.code)})})))),label:O?Object(c.__)("Discount","woo-gutenberg-products-block"):Object(c.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},878:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c}));var r=function(e){return e.length},c=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},879:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(5)),a=n(65);n(378);t.a=function(e){var t=e.currency,n=e.values,s=n.total_tax,i=n.tax_lines;return o.R?o.q?Object(r.createElement)(r.Fragment,null,i.map((function(e,n){var c=e.name,o=e.price;return Object(r.createElement)(a.a,{key:"tax-line-".concat(n),className:"wc-block-components-totals-taxes",currency:t,label:c,value:parseInt(o,10)})}))," "):Object(r.createElement)(a.a,{className:"wc-block-components-totals-taxes",currency:t,label:Object(c.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(s,10)}):null}},880:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(1),s=n(99),i=n(169),u=n(48),l=n(233),b=n(125),p=(n(2),n(193)),d=n(86),m=n(154);n(379);t.a=Object(p.a)((function(e){var t=e.instanceId,n=e.isLoading,r=void 0!==n&&n,p=e.initialOpen,g=void 0!==p&&p,f=e.onSubmit,O=void 0===f?function(){}:f,h=Object(o.useState)(""),j=c()(h,2),_=j[0],v=j[1],y=Object(o.useRef)(!1),w=Object(d.b)(),E=w.getValidationError,k=w.getValidationErrorId,S=E("coupon");Object(o.useEffect)((function(){y.current!==r&&(r||!_||S||v(""),y.current=r)}),[r,_,S]);var P="wc-block-components-totals-coupon__input-".concat(t);return Object(o.createElement)(m.a,{className:"wc-block-components-totals-coupon",hasBorder:!0,initialOpen:g,title:Object(o.createElement)(u.a,{label:Object(a.__)("Coupon Code?","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Introduce Coupon Code","woo-gutenberg-products-block"),htmlFor:P}),titleTag:"h2"},Object(o.createElement)(b.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:r,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)(i.a,{id:P,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:_,ariaDescribedBy:k(P),onChange:function(e){v(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(o.createElement)(s.a,{className:"wc-block-components-totals-coupon__button",disabled:r||!_,showSpinner:r,onClick:function(e){e.preventDefault(),O(_)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(o.createElement)(l.a,{propertyName:"coupon",elementId:P}))))}))},881:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=n(192),s=n(55),i=(n(2),n(65)),u=(n(380),o.R&&o.p);t.a=function(e){var t=e.currency,n=e.values,o=n.total_price,l=n.total_tax;return Object(r.createElement)(i.a,{className:"wc-block-components-totals-footer-item",currency:t,label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(o,10),description:u&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(a.a)(Object(c.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,displayType:"text",value:parseInt(l,10)})}))})}},882:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{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:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},885:function(e,t,n){e.exports=n(900)},886:function(e,t){},887:function(e,t){},888:function(e,t){},889:function(e,t){},890:function(e,t){},891:function(e,t){},892:function(e,t){},893:function(e,t){},894:function(e,t){},895:function(e,t){},896:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()},900:function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(1),o=n(61),a=n(882),s=n(7),i=n.n(s),u=n(5),l=n(274),b=n(14),p=n(4),d=n(189),m=n(3),g=n(192),f=n(212),O=n(191),h=n(273),j=n(928),_={cc:[{method:{gateway:"stripe",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]},v=n(57),y=Object(r.createElement)(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},Object(r.createElement)("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"})),w=(n(894),function(e){var t=e.link;return Object(r.createElement)("a",{href:t||u.e,className:"wc-block-components-checkout-return-to-cart-button"},Object(r.createElement)(o.a,{srcElement:y}),Object(c.__)("Return to Cart","woo-gutenberg-products-block"))}),E=n(170),k=n(281),S=n(387),P=n(563),C=n(99),N=function(){var e=function(){var e=Object(E.b)(),t=e.onSubmit,n=e.isCalculating,r=e.isBeforeProcessing,o=e.isProcessing,a=e.isAfterProcessing,s=e.isComplete,i=e.hasError,u=Object(S.b)().paymentMethods[Object(k.b)().activePaymentMethod]||{};return{submitButtonText:(null==u?void 0:u.placeOrderButtonLabel)||Object(c.__)("Place Order","woo-gutenberg-products-block"),onSubmit:t,isCalculating:n,waitingForProcessing:o||a||r,waitingForRedirect:s&&!i}}(),t=e.submitButtonText,n=e.onSubmit,a=e.isCalculating,s=e.waitingForProcessing,i=e.waitingForRedirect;return Object(r.createElement)(C.a,{className:"wc-block-components-checkout-place-order-button",onClick:n,disabled:a||s||i,showSpinner:s},i?Object(r.createElement)(o.a,{srcElement:P.a,alt:Object(c.__)("Done","woo-gutenberg-products-block")}):t)},R=n(33),x=(n(895),function(){return Object(r.createElement)("ul",{className:"wc-block-components-checkout-policies"},u.I&&Object(r.createElement)("li",{className:"wc-block-components-checkout-policies__item"},Object(r.createElement)("a",{href:u.I,target:"_blank",rel:"noopener noreferrer"},u.H?Object(R.decodeEntities)(u.H):Object(c.__)("Privacy Policy","woo-gutenberg-products-block"))),u.T&&Object(r.createElement)("li",{className:"wc-block-components-checkout-policies__item"},Object(r.createElement)("a",{href:u.T,target:"_blank",rel:"noopener noreferrer"},u.S?Object(R.decodeEntities)(u.S):Object(c.__)("Terms and Conditions","woo-gutenberg-products-block"))))}),M=n(156),D=n(209),T=n(8),I=n.n(T),A=n(11),L=n.n(A),F=n(13),U=n.n(F),B=n(86),V=n(134),q=n(140);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e,t,n){var r=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),c="wc-".concat(n,"-new-payment-method");return r.push({key:c,value:t}),r},G=function(){var e=Object(E.b)(),t=e.hasError,n=e.onCheckoutBeforeProcessing,o=e.dispatchActions,a=e.redirectUrl,s=e.isProcessing,i=e.isBeforeProcessing,u=e.isComplete,l=e.orderNotes,b=e.shouldCreateAccount,p=Object(B.b)().hasValidationErrors,d=Object(M.b)(),m=d.shippingAddress,g=d.shippingErrorStatus,f=Object(D.b)().billingData,O=Object(V.a)(),h=O.cartNeedsPayment,j=O.receiveCart,_=Object(k.b)(),v=_.activePaymentMethod,y=_.currentStatus,w=_.paymentMethodData,S=_.expressPaymentMethods,P=_.paymentMethods,C=_.shouldSavePayment,N=Object(q.a)(),R=N.addErrorNotice,x=N.removeNotice,T=N.setIsSuppressed,I=Object(r.useRef)(f),A=Object(r.useRef)(m),F=Object(r.useRef)(a),z=Object(r.useState)(!1),G=L()(z,2),W=G[0],$=G[1],K=Object.keys(S).includes(v),X=Object(r.useMemo)((function(){var e,t=H(H({},S),P);return null==t||null===(e=t[v])||void 0===e?void 0:e.paymentMethodId}),[v,S,P]),Z=p&&!K||y.hasError||g.hasError;Object(r.useEffect)((function(){T(K)}),[K,T]),Object(r.useEffect)((function(){Z===t||!s&&!i||K||o.setHasError(Z)}),[Z,t,s,i,K,o]);var Q=!t&&!Z&&(y.isSuccessful||!h)&&s;Object(r.useEffect)((function(){I.current=f,A.current=m,F.current=a}),[f,m,a]);var J=Object(r.useCallback)((function(){return p?{errorMessage:Object(c.__)("Some input fields are invalid.","woo-gutenberg-products-block")}:y.hasError?{errorMessage:Object(c.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!g.hasError||{errorMessage:Object(c.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}}),[p,y.hasError,g.hasError]);Object(r.useEffect)((function(){var e;return K||(e=n(J,0)),function(){K||e()}}),[n,J,K]);var ee=Object(r.useCallback)((function(){$(!0),x("checkout");var e={billing_address:I.current,shipping_address:A.current,customer_note:l,should_create_account:b};h&&(e=H(H({},e),{},{payment_method:X,payment_data:Y(w,C,v)})),U()({path:"/wc/store/checkout",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){U.a.setNonce(e.headers),e.json().then((function(t){e.ok||(t.body&&t.body.message?R(t.body.message,{id:"checkout"}):R(Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"checkout"}),o.setHasError()),o.setAfterProcessing(t),$(!1)}))})).catch((function(e){e.json().then((function(e){var t;(null===(t=e.data)||void 0===t?void 0:t.cart)&&j(e.data.cart),o.setHasError(),o.setAfterProcessing(e),$(!1)}))}))}),[R,x,X,v,w,C,h,j,o,l,b]);return Object(r.useEffect)((function(){F.current&&(window.location.href=F.current)}),[u]),Object(r.useEffect)((function(){Q&&!W&&ee()}),[ee,Q,W]),null},W=function(e){var t=e.children,n=e.redirectUrl;return Object(r.createElement)(E.a,{redirectUrl:n,isCart:!1},Object(r.createElement)(D.a,null,Object(r.createElement)(M.a,null,Object(r.createElement)(k.a,null,t,Object(r.createElement)(G,null)))))},$=n(395),K=n(136),X=n(275),Z=(n(381),function(){var e=Object(S.a)(),t=e.paymentMethods,n=e.isInitialized,o=Object(f.b)().isEditor,a=Object($.a)().noticeContexts;return!n||n&&0===Object.keys(t).length?o||u.l?Object(r.createElement)(O.a,{context:a.EXPRESS_PAYMENTS}):null:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(r.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(r.createElement)(K.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(c.__)("Express checkout","woo-gutenberg-products-block"))),Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(O.a,{context:a.EXPRESS_PAYMENTS},Object(r.createElement)("p",null,Object(c.__)("In a hurry? Use one of our express checkout options below:","woo-gutenberg-products-block")),Object(r.createElement)(X.a,null)))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(c.__)("Or continue below","woo-gutenberg-products-block")))}),Q=n(867),J=n(868),ee=n(874),te=n(185),ne=n(2),re=n.n(ne),ce=function(e){var t=e.className,n=e.children,c=e.onSubmit,o=void 0===c?function(e){}:c;return Object(r.createElement)("form",{className:i()("wc-block-components-form",t),onSubmit:function(e){e.preventDefault(),o(e)}},n)},oe=n(159),ae=n(6);function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ue=function(){var e=Object(E.b)().customerId,t=Object(M.b)(),n=t.shippingAddress,c=t.setShippingAddress,o=t.needsShipping,a=Object(D.b)(),s=a.billingData,i=a.setBillingData,u=Object(r.useState)(s),l=L()(u,2),b=l[0],p=l[1],d=Object(r.useState)((function(){return o&&(!e||(t=n,r=s,Object.keys(oe.a).every((function(e){return t[e]===r[e]}))));var t,r})),m=L()(d,2),g=m[0],f=m[1];Object(r.useEffect)((function(){var e=ie(ie({},g?n:b),{},{email:b.email||s.email,phone:b.phone||s.phone});Object(ae.isEqual)(e,s)||i(e)}),[b,g,s,n,i,c]);var O=Object(r.useCallback)((function(e){p((function(t){return ie(ie({},t),e)}))}),[]);return{defaultAddressFields:oe.a,shippingFields:n,setShippingFields:c,billingFields:b,setBillingFields:O,setEmail:function(e){O({email:e})},setPhone:function(e){O({phone:e})},shippingAsBilling:g,setShippingAsBilling:f,showBillingFields:!o||!g}},le=(n(888),function(e){var t=e.title,n=e.stepHeadingContent;return Object(r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(r.createElement)(K.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&Object(r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))}),be=function(e){var t=e.id,n=e.className,c=e.title,o=e.legend,a=e.description,s=e.children,u=e.disabled,l=void 0!==u&&u,b=e.showStepNumber,p=void 0===b||b,d=e.stepHeadingContent,m=void 0===d?function(){}:d,g=o||c?"fieldset":"div";return Object(r.createElement)(g,{className:i()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p}),id:t,disabled:l},!(!o&&!c)&&Object(r.createElement)("legend",{className:"screen-reader-text"},o||c),!!c&&Object(r.createElement)(le,{title:c,stepHeadingContent:m()}),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!a&&Object(r.createElement)("p",{className:"wc-block-components-checkout-step__description"},a),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__content"},s)))},pe=n(904),de=function(e){var t=e.addressFieldsConfig,n=e.billingFields,o=e.defaultAddressFields,a=e.setBillingFields,s=Object(E.b)().isProcessing;return Object(r.createElement)(be,{id:"billing-fields",disabled:s,className:"wc-block-checkout__billing-fields",title:Object(c.__)("Billing address","woo-gutenberg-products-block"),description:Object(c.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")},Object(r.createElement)(pe.a,{id:"billing",onChange:a,type:"billing",values:n,fields:Object.keys(o),fieldConfig:t}))},me=n(265),ge=n(10),fe=n.n(ge),Oe=n(27),he=n.n(Oe),je=n(193),_e=(n(887),Object(je.a)((function(e){var t=e.className,n=e.label,c=e.id,o=e.instanceId,a=e.onChange,s=he()(e,["className","label","id","instanceId","onChange"]),u=c||"checkbox-control-".concat(o);return Object(r.createElement)("label",{className:i()("wc-block-components-checkbox",t),htmlFor:u},Object(r.createElement)("input",fe()({id:u,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:function(e){return a(e.target.checked)}},s)),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"})),Object(r.createElement)("span",{className:"wc-block-components-checkbox__label"},n))}))),ve="".concat(u.z,"?redirect_to=").concat(encodeURIComponent(window.location.href)),ye=function(){var e=Object(E.b)().customerId;return!u.i||e?null:Object(r.createElement)(r.Fragment,null,Object(c.__)("Already have an account? ","woo-gutenberg-products-block"),Object(r.createElement)("a",{href:ve},Object(c.__)("Log in.","woo-gutenberg-products-block")))},we=function(e){var t=e.emailValue,n=e.onChangeEmail,o=e.allowCreateAccount,a=Object(E.b)(),s=a.isProcessing,i=a.customerId,l=a.shouldCreateAccount,b=a.setShouldCreateAccount,p=!i&&o&&u.f&&Object(r.createElement)(_e,{className:"wc-block-checkout__create-account",label:Object(c.__)("Create an account?","woo-gutenberg-products-block"),checked:l,onChange:function(e){return b(e)}});return Object(r.createElement)(be,{id:"contact-fields",disabled:s,className:"wc-block-checkout__contact-fields",title:Object(c.__)("Contact information","woo-gutenberg-products-block"),description:Object(c.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block"),stepHeadingContent:function(){return Object(r.createElement)(ye,null)}},Object(r.createElement)(me.a,{id:"email",type:"email",label:Object(c.__)("Email address","woo-gutenberg-products-block"),value:t,autoComplete:"email",onChange:n,required:!0}),p)},Ee=function(e){var t=e.addressFieldsConfig,n=e.defaultAddressFields,o=e.billingFields,a=e.setPhone,s=e.shippingAsBilling,i=e.shippingFields,u=e.showPhoneField,l=e.setShippingFields,b=e.setShippingAsBilling,p=e.requirePhoneField,d=Object(E.b)().isProcessing;return Object(r.createElement)(be,{id:"shipping-fields",disabled:d,className:"wc-block-checkout__shipping-fields",title:Object(c.__)("Shipping address","woo-gutenberg-products-block"),description:Object(c.__)("Enter the physical address where you want us to deliver your order.","woo-gutenberg-products-block")},Object(r.createElement)(pe.a,{id:"shipping",onChange:l,values:i,fields:Object.keys(n),fieldConfig:t}),u&&Object(r.createElement)(me.a,{id:"phone",type:"tel",label:p?Object(c.__)("Phone","woo-gutenberg-products-block"):Object(c.__)("Phone (optional)","woo-gutenberg-products-block"),value:o.phone,autoComplete:"tel",onChange:a,required:p}),Object(r.createElement)(_e,{className:"wc-block-checkout__use-address-for-billing",label:Object(c.__)("Use same address for billing","woo-gutenberg-products-block"),checked:s,onChange:function(e){return b(e)}}))};n(544);function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pe=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,c=e.showApartmentField,o=e.showCompanyField,a=e.showPhoneField,s=e.allowCreateAccount,i=ue(),u=i.defaultAddressFields,l=i.billingFields,b=i.setBillingFields,p=i.setEmail,d=i.setPhone,m=i.setShippingAsBilling,g=i.setShippingFields,f=i.shippingAsBilling,O=i.shippingFields,h=i.showBillingFields,j=Object(M.b)().needsShipping,_=Object(r.useMemo)((function(){return{company:Se(Se({},u.company),{},{hidden:!o,required:t}),address_2:Se(Se({},u.address_2),{},{hidden:!c})}}),[u,o,t,c]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(we,{emailValue:l.email,onChangeEmail:p,allowCreateAccount:s}),j&&Object(r.createElement)(Ee,{addressFieldsConfig:_,billingFields:l,defaultAddressFields:u,requirePhoneField:n,setPhone:d,setShippingAsBilling:m,setShippingFields:g,shippingAsBilling:f,shippingFields:O,showPhoneField:a}),h&&Object(r.createElement)(de,{addressFieldsConfig:_,billingFields:l,defaultAddressFields:u,setBillingFields:b}))},Ce=(n(893),function(e){var t=e.className,n=void 0===t?"":t,c=e.disabled,o=void 0!==c&&c,a=e.onTextChange,s=e.placeholder,u=e.value,l=void 0===u?"":u;return Object(r.createElement)("textarea",{className:i()("wc-block-components-textarea",n),disabled:o,onChange:function(e){a(e.target.value)},placeholder:s,rows:2,value:l})});n(892);Ce.propTypes={onTextChange:re.a.func.isRequired,disabled:re.a.bool,placeholder:re.a.string,value:re.a.string};var Ne=function(e){var t=e.disabled,n=e.onChange,o=e.placeholder,a=e.value,s=Object(r.useState)(!1),i=L()(s,2),u=i[0],l=i[1],b=Object(r.useState)(""),p=L()(b,2),d=p[0],m=p[1];return Object(r.createElement)("div",{className:"wc-block-checkout__add-note"},Object(r.createElement)(_e,{disabled:t,label:Object(c.__)("Add a note to your order","woo-gutenberg-products-block"),checked:u,onChange:function(e){l(e),e?a!==d&&n(d):(n(""),m(a))}}),u&&Object(r.createElement)(Ce,{disabled:t,onTextChange:n,placeholder:o,value:a}))},Re=function(e){var t=e.showOrderNotes,n=Object(M.b)().needsShipping,o=Object(E.b)(),a=o.isProcessing,s=o.orderNotes,i=o.dispatchActions.setOrderNotes;return t?Object(r.createElement)(be,{id:"order-notes",showStepNumber:!1},Object(r.createElement)(Ne,{disabled:a,onChange:i,placeholder:n?Object(c.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(c.__)("Notes about your order.","woo-gutenberg-products-block"),value:s})):null},xe=n(939),Me=n(280),De=n(390),Te=(n(890),function(){return Object(r.createElement)(xe.a,{icon:Object(r.createElement)(o.a,{srcElement:a.a}),label:Object(c.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(c.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(Me.a,{isDefault:!0,href:"".concat(m.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),Ie=function(){return Object(r.createElement)(De.a,{isDismissible:!1,className:i()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(c.__)("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"))},Ae=function(){return Object(f.b)().isEditor?Object(r.createElement)(Te,null):Object(r.createElement)(Ie,null)},Le=n(388),Fe=n(942),Ue=n(940),Be=n(941),Ve=n(943),qe=(n(891),Object(je.a)((function(e){var t=e.className,n=e.onSelect,o=void 0===n?function(){return null}:n,a=e.tabs,s=e.activeClass,u=void 0===s?"is-active":s,l=e.initialTabName,b=e.ariaLabel,p=void 0===b?Object(c.__)("Tabbed Content","woo-gutenberg-products-block"):b,d=e.instanceId,m=e.id,g=l?{selectedId:"".concat(d,"-").concat(l)}:void 0,f=Object(Fe.a)(g);return 0===a.length?null:Object(r.createElement)("div",{className:i()("wc-block-components-tabs",t)},Object(r.createElement)(Ue.a,fe()({},f,{id:m,className:"wc-block-components-tabs__list","aria-label":p}),a.map((function(e){var t=e.name,n=e.title,c=e.ariaLabel;return Object(r.createElement)(Be.a,fe()({},f,{id:"".concat(d,"-").concat(t),manual:!0,className:i()("wc-block-components-tabs__item",I()({},u,"".concat(d,"-").concat(t)===f.selectedId)),onClick:function(){return o(t)},type:"button",key:t,"aria-label":c}),Object(r.createElement)("span",{className:"wc-block-components-tabs__item-content"},n))}))),a.map((function(e){var t=e.name,n=e.content;return Object(r.createElement)(Ve.a,fe()({},f,{key:t,id:"".concat(d,"-").concat(t,"-view"),tabId:"".concat(d,"-").concat(t),className:"wc-block-components-tabs__content"}),f.selectedId==="".concat(d,"-").concat(t)&&n)})))}))),ze=n(208),He=function(e){var t=e.children,n=e.allowsSaving,o=Object(f.b)().isEditor,a=Object(k.b)(),s=a.shouldSavePayment,i=a.setShouldSavePayment,u=Object(E.b)().customerId;return Object(r.createElement)(ze.a,{isEditor:o},t,u>0&&n&&Object(r.createElement)(_e,{className:"wc-block-components-payment-methods__save-card-info",label:Object(c.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:s,onChange:function(){return i(!s)}}))};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We=function(){var e=Object(k.b)().setActivePaymentMethod,t=Object(S.b)().paymentMethods,n=Object(Le.a)(),o=n.activePaymentMethod,a=he()(n,["activePaymentMethod"]),s=Object($.a)().noticeContexts,i=Object(q.a)().removeNotice,u=Object(f.b)().isEditor;return Object(r.createElement)(qe,{className:"wc-block-components-checkout-payment-methods",onSelect:function(t){e(t),i("wc-payment-error",s.PAYMENTS)},tabs:Object.keys(t).map((function(e){var n=t[e],c=n.ariaLabel,s=n.edit,i=n.content,l=n.label,b=n.supports,p=u?s:i;return{name:e,title:"string"==typeof l?l:Object(r.cloneElement)(l,{components:a.components}),ariaLabel:c,content:Object(r.createElement)(He,{allowsSaving:b.savePaymentInfo},Object(r.cloneElement)(p,Ge({activePaymentMethod:o},a)))}})),initialTabName:o,ariaLabel:Object(c.__)("Payment Methods","woo-gutenberg-products-block"),id:"wc-block-payment-methods"})},$e=n(51),Ke=n.n($e),Xe=n(210),Ze=n(56),Qe=function(e){var t=e.onChange,n=Object(f.b)().isEditor,o=Object(k.b)(),a=o.setPaymentStatus,s=o.customerPaymentMethods,i=o.setActivePaymentMethod,u=Object(r.useState)(""),l=L()(u,2),b=l[0],p=l[1],d=Object(Ze.getPaymentMethods)(),m=Object(r.useRef)([]),g=Object(r.useCallback)((function(e){"0"===e&&a().started(),p(e),t(e)}),[t,p,a]);Object(r.useEffect)((function(){var e=Object.keys(s).flatMap((function(e){return s[e].map((function(t){var n,r=d[t.method.gateway];if(!(null==r||null===(n=r.supports)||void 0===n?void 0:n.savePaymentInfo))return null;var o="cc"===e||"echeck"===e?function(e,t,n){var r=e.method,o=e.expires,a=e.tokenId;return{value:a+"",label:Object(c.sprintf)(Object(c.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-product-blocks"),r.brand,r.last4,o),name:"wc-saved-payment-method-token-".concat(a),onChange:function(e){var c,o="wc-".concat(r.gateway,"-payment-token");t(r.gateway),n().success((c={payment_method:r.gateway},I()(c,o,e),I()(c,"isSavedToken",!0),c))}}}(t,i,a):function(e,t,n){var r=e.method,o=e.tokenId;return{value:o+"",label:Object(c.sprintf)(Object(c.__)("Saved token for %s","woo-gutenberg-products-block"),r.gateway),name:"wc-saved-payment-method-token-".concat(o),onChange:function(e){var c,o="wc-".concat(r.gateway,"-payment-token");t(r.gateway),n().success((c={payment_method:r.gateway},I()(c,o,e),I()(c,"isSavedToken",!0),c))}}}(t,i,a);return t.is_default&&""===b&&(g(t.tokenId+""),o.onChange(t.tokenId)),o}))})).filter(Boolean);m.current=e}),[s,g,b,i,a,d]);var O=n?"0":b+"",h={value:"0",label:Object(c.__)("Use a new payment method","woo-gutenberg-product-blocks"),name:"wc-saved-payment-method-token-new"};return m.current.length>0?Object(r.createElement)(Xe.a,{id:"wc-payment-method-saved-tokens",selected:O,onChange:g,options:[].concat(Ke()(m.current),[h])}):null},Je=function(){var e=Object(S.b)(),t=e.isInitialized,n=e.paymentMethods,c=Object(r.useState)(!0),o=L()(c,2),a=o[0],s=o[1],i=Object(r.useCallback)((function(e){s("0"===e)}),[s]);return t&&0===Object.keys(n).length?Object(r.createElement)(Ae,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Qe,{onChange:i}),a&&Object(r.createElement)(We,null))},et=function(){var e=Object(E.b)().isProcessing,t=Object(V.a)().cartNeedsPayment,n=Object(S.b)().paymentMethods,o=Object($.a)().noticeContexts;return t?Object(r.createElement)(be,{id:"payment-method",disabled:e,className:"wc-block-checkout__payment-method",title:Object(c.__)("Payment method","woo-gutenberg-products-block"),description:Object.keys(n).length>1?Object(c.__)("Select a payment method below.","woo-gutenberg-products-block"):""},Object(r.createElement)(O.a,{context:o.PAYMENTS},Object(r.createElement)(Je,null))):null},tt=n(916),nt=n(259),rt=n(878),ct=n(55),ot=Object(r.createElement)(v.a,{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:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"})),at=(n(889),function(){return Object(r.createElement)(xe.a,{icon:Object(r.createElement)(o.a,{srcElement:ot}),label:Object(c.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(c.__)("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(r.createElement)(Me.a,{isDefault:!0,href:"".concat(m.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Configure Shipping Options","woo-gutenberg-products-block")))}),st=function(e){var t=u.p?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(R.decodeEntities)(e.name),value:e.rate_id,description:Object(R.decodeEntities)(e.description),secondaryLabel:Object(r.createElement)(ct.a,{currency:Object(nt.c)(e),value:t}),secondaryDescription:Object(R.decodeEntities)(e.delivery_time)}},it=function(){var e=Object(E.b)().isProcessing,t=Object(f.b)().isEditor,n=Object(M.b)(),o=n.shippingRates,a=n.shippingRatesLoading;return n.needsShipping?Object(r.createElement)(be,{id:"shipping-option",disabled:e,className:"wc-block-checkout__shipping-option",title:Object(c.__)("Shipping options","woo-gutenberg-products-block"),description:Object(rt.b)(o)>1?Object(c.__)("Select shipping options below.","woo-gutenberg-products-block"):""},t&&!Object(rt.a)(o)?Object(r.createElement)(at,null):Object(r.createElement)(tt.a,{noResultsMessage:Object(c.__)("There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.","woo-gutenberg-products-block"),renderOption:st,shippingRates:o,shippingRatesLoading:a})):null},ut=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,c=e.showApartmentField,o=e.showCompanyField,a=e.showOrderNotes,s=e.showPhoneField,i=e.allowCreateAccount,u=Object(E.b)().onSubmit;return Object(r.createElement)(ce,{className:"wc-block-checkout__form",onSubmit:u},Object(r.createElement)(Pe,{requireCompanyField:t,requirePhoneField:n,showApartmentField:c,showCompanyField:o,showPhoneField:s,allowCreateAccount:i}),Object(r.createElement)(it,null),Object(r.createElement)(et,null),Object(r.createElement)(Re,{showOrderNotes:a}))},lt=n(389),bt=n(154),pt=n(48),dt=n(164),mt=n(869),gt=n(870),ft=n(871),Ot=n(872),ht=n(924),jt=n(279),_t=function(e){var t=e.cartItem,n=t.images,o=t.low_stock_remaining,a=void 0===o?null:o,s=t.show_backorder_badge,i=void 0!==s&&s,u=t.name,l=t.permalink,b=t.prices,p=t.quantity,d=t.short_description,m=t.description,g=t.variation,f=Object(nt.b)(b),O=Object(jt.a)({amount:parseInt(b.raw_prices.price,10),precision:parseInt(b.raw_prices.precision,10)}).multiply(p).convertPrecision(f.minorUnit).getAmount();return Object(r.createElement)("div",{className:"wc-block-components-order-summary-item"},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)(pt.a,{label:p,screenReaderLabel:Object(c.sprintf)(Object(c.__)("%d items","woo-gutenberg-products-block"),p)})),Object(r.createElement)(mt.a,{image:n.length?n[0]:{}})),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__header"},Object(r.createElement)(gt.a,{permalink:l,name:u}),Object(r.createElement)(dt.a,{currency:f,price:O,priceClassName:"wc-block-components-order-summary-item__total-price"})),i?Object(r.createElement)(ft.a,null):!!a&&Object(r.createElement)(Ot.a,{lowStockRemaining:a}),Object(r.createElement)(ht.a,{shortDescription:d,fullDescription:m,variation:g})))},vt=(n(896),function(e){var t=e.cartItems,n=void 0===t?[]:t,o=Object(lt.b)(),a=o.isLarge;return o.hasContainerWidth?Object(r.createElement)(bt.a,{className:"wc-block-components-order-summary",initialOpen:a,title:Object(r.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(c.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(r.createElement)("div",{className:"wc-block-components-order-summary__content"},n.map((function(e){return Object(r.createElement)(_t,{key:e.key,cartItem:e})})))):null}),yt=n(875),wt=n(876),Et=n(877),kt=n(908),St=n(879),Pt=n(880),Ct=n(881),Nt=n(866),Rt=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,c=e.cartItems,o=void 0===c?[]:c,a=e.cartTotals,s=void 0===a?{}:a,i=Object(Nt.a)(),l=i.applyCoupon,b=i.removeCoupon,p=i.isApplyingCoupon,d=i.isRemovingCoupon,m=Object(M.b)().needsShipping,g=Object(nt.c)(s);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(vt,{cartItems:o}),Object(r.createElement)(yt.a,{currency:g,values:s}),Object(r.createElement)(wt.a,{currency:g,values:s}),Object(r.createElement)(Et.a,{cartCoupons:n,currency:g,isRemovingCoupon:d,removeCoupon:b,values:s}),m&&Object(r.createElement)(kt.a,{currency:g,noResultsMessage:null,isCheckout:!0,showCalculator:!1,values:s}),!u.p&&Object(r.createElement)(St.a,{currency:g,values:s}),u.k&&Object(r.createElement)(Pt.a,{onSubmit:l,initialOpen:!1,isLoading:p}),Object(r.createElement)(Ct.a,{currency:g,values:s}))},xt=Object(r.createElement)(v.a,{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"})),Mt=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],Dt=function(e){var t=e.errorData,n=Object(c.__)("Checkout error","woo-gutenberg-products-block");return Mt.includes(t.code)&&(n=Object(c.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(r.createElement)("strong",{className:"wc-block-checkout-error_title"},n)},Tt=function(e){var t=e.errorData,n=t.message;return Mt.includes(t.code)&&(n=n+" "+Object(c.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-checkout-error__description"},n)},It=function(e){var t=e.errorData,n=Object(c.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return Mt.includes(t.code)&&(n=Object(c.__)("Edit your cart","woo-gutenberg-products-block"),o=u.e),Object(r.createElement)("span",{className:"wp-block-button"},Object(r.createElement)("a",{href:o,className:"wp-block-button__link"},n))},At=function(){var e=Object(m.getSetting)("checkoutData",{}),t={code:e.code||"unknown",message:Object(R.decodeEntities)(e.message)||Object(c.__)("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(r.createElement)("div",{className:"wc-block-checkout-error"},Object(r.createElement)(o.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:xt,size:100}),Object(r.createElement)(Dt,{errorData:t}),Object(r.createElement)(Tt,{errorData:t}),Object(r.createElement)(It,{errorData:t}))},Lt=(n(886),function(e){var t=e.attributes,n=e.scrollToTop,o=Object(f.b)().isEditor,a=Object(V.a)(),s=a.cartItems,l=a.cartTotals,b=a.cartCoupons,p=a.cartNeedsPayment,d=Object(E.b)(),g=d.hasOrder,O=d.hasError,h=d.isIdle,j=d.customerId,_=Object(B.b)(),v=_.hasValidationErrors,y=_.showAllValidationErrors,k=Object(q.a)().hasNoticesOfType,S=h&&O&&(v||k("default")),P=t.allowCreateAccount&&Object(m.compareWithWooVersion)("4.7.0","<=");if(Object(r.useEffect)((function(){S&&(y(),n({focusableSelector:"input:invalid"}))}),[S,n,y]),!o&&!g)return Object(r.createElement)(At,null);if(!(o||j||u.f||P))return Object(r.createElement)(r.Fragment,null,Object(c.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(r.createElement)("a",{href:ve},Object(c.__)("Click here to log in.","woo-gutenberg-products-block")));var C=i()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Q.a,{className:C},Object(r.createElement)(J.a,{className:"wc-block-checkout__main"},p&&Object(r.createElement)(Z,null),Object(r.createElement)(ut,{showApartmentField:t.showApartmentField,showCompanyField:t.showCompanyField,showOrderNotes:t.showOrderNotes,showPhoneField:t.showPhoneField,requireCompanyField:t.requireCompanyField,requirePhoneField:t.requirePhoneField,allowCreateAccount:P}),Object(r.createElement)("div",{className:"wc-block-checkout__actions"},t.showReturnToCart&&Object(r.createElement)(w,{link:Object(m.getSetting)("page-"+(null==t?void 0:t.cartPageId),!1)}),Object(r.createElement)(N,null)),t.showPolicyLinks&&Object(r.createElement)(x,null)),Object(r.createElement)(ee.a,{className:"wc-block-checkout__sidebar"},Object(r.createElement)(Rt,{cartCoupons:b,cartItems:s,cartTotals:l}))))}),Ft=Object(te.a)((function(e){return Object(r.createElement)(W,null,Object(r.createElement)(Lt,e))})),Ut=(n(543),function(e){var t=e.attributes,n=e.setAttributes,o=t.showCompanyField,a=t.showApartmentField,s=t.showPhoneField,i=t.requireCompanyField,d=t.requirePhoneField,O=t.allowCreateAccount,j=t.showOrderNotes,_=t.showPolicyLinks,v=t.showReturnToCart,y=t.cartPageId,w=t.hasDarkControls,E=Object(f.b)().currentPostId,k=Object(r.useRef)(y).current,S=Object(m.compareWithWooVersion)("4.7.0","<=");return Object(r.createElement)(b.InspectorControls,null,E!==u.h&&Object(r.createElement)(p.Notice,{className:"wc-block-checkout__page-notice",isDismissible:!1,status:"warning"},Object(g.a)(Object(c.__)("If you would like to use this block as your default checkout you must update your <a>page settings in WooCommerce</a>.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(m.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Address options","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("Include additional address fields in the checkout form.","woo-gutenberg-products-block")),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Company","woo-gutenberg-products-block"),checked:o,onChange:function(){return n({showCompanyField:!o})}}),o&&Object(r.createElement)(p.CheckboxControl,{label:Object(c.__)("Require company name?","woo-gutenberg-products-block"),checked:i,onChange:function(){return n({requireCompanyField:!i})},className:"components-base-control--nested"}),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),checked:a,onChange:function(){return n({showApartmentField:!a})}}),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Phone","woo-gutenberg-products-block"),checked:s,onChange:function(){return n({showPhoneField:!s})}}),s&&Object(r.createElement)(p.CheckboxControl,{label:Object(c.__)("Require phone number?","woo-gutenberg-products-block"),checked:d,onChange:function(){return n({requirePhoneField:!d})},className:"components-base-control--nested"})),S&&Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Account options","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Allow shoppers to sign up for a user account during checkout","woo-gutenberg-products-block"),checked:O,onChange:function(){return n({allowCreateAccount:!O})}})),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Order notes","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("Reduce the number of fields to checkout.","woo-gutenberg-products-block")),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Allow shoppers to optionally add order notes","woo-gutenberg-products-block"),checked:j,onChange:function(){return n({showOrderNotes:!j})}})),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Navigation options","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Show links to policies","woo-gutenberg-products-block"),help:Object(c.__)('Shows links to your "terms and conditions" and "privacy policy" pages.',"woo-gutenberg-products-block"),checked:_,onChange:function(){return n({showPolicyLinks:!_})}}),_&&(!u.I||!u.T)&&Object(r.createElement)(p.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(g.a)(Object(c.__)("Pages must be first setup in store settings: <a1>Privacy policy</a1>, <a2>Terms and conditions</a2>.","woo-gutenberg-products-block"),{a1:Object(r.createElement)("a",{href:Object(m.getAdminLink)("admin.php?page=wc-settings&tab=account"),target:"_blank",rel:"noopener noreferrer"}),a2:Object(r.createElement)("a",{href:Object(m.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)('Show a "Return to Cart" link',"woo-gutenberg-products-block"),checked:v,onChange:function(){return n({showReturnToCart:!v})}})),v&&!(E===u.h&&0===k)&&Object(r.createElement)(h.a,{pageId:y,setPageId:function(e){return n({cartPageId:e})},labels:{title:Object(c.__)("Return to Cart button","woo-gutenberg-products-block"),default:Object(c.__)("WooCommerce Cart Page","woo-gutenberg-products-block")}}),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(c.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:w,onChange:function(){return n({hasDarkControls:!w})}})),Object(r.createElement)(l.a,null))}),Bt=function(e){var t=e.attributes,n=e.setAttributes,o=t.className,a=t.isPreview;return Object(r.createElement)(f.a,{previewData:{previewCart:j.a,previewSavedPaymentMethods:_}},Object(r.createElement)("div",{className:i()(o,"wp-block-woocommerce-checkout",{"is-editor-preview":a})},Object(r.createElement)(Ut,{attributes:t,setAttributes:n}),Object(r.createElement)(d.a,{header:Object(c.__)("Checkout Block Error","woo-gutenberg-products-block"),text:Object(c.__)("There was an error whilst rendering the checkout block. If this problem continues, try re-creating the block.","woo-gutenberg-products-block"),showErrorMessage:!0,errorMessagePrefix:Object(c.__)("Error message:","woo-gutenberg-products-block")},Object(r.createElement)(O.a,{context:"wc/checkout"},Object(r.createElement)(p.Disabled,null,Object(r.createElement)(Ft,{attributes:t}))))))},Vt={isPreview:{type:"boolean",default:!1,save:!1},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:u.g},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},hasDarkControls:{type:"boolean",default:u.r}},qt={title:Object(c.__)("Checkout","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(o.a,{srcElement:a.a}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a checkout form so your customers can submit orders.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:Vt,edit:Bt,save:function(e){var t=e.attributes;return Object(r.createElement)("div",{className:i()("is-loading",t.className)})}};Object(u.Z)("woocommerce/checkout",qt)},904:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=(n(2),n(265)),s=n(10),i=n.n(s),u=n(5),l=n(1),b=n(33),p=n(7),d=n.n(p),m=n(27),g=n.n(m),f=n(9),O=n(86),h=n(58),j=n(193),_=n(233),v=n(945),y=(n(264),function(e){var t=e.className,n=e.feedback,r=e.id,c=e.label,a=e.onChange,s=e.options,i=e.value;return Object(o.createElement)("div",{id:r,className:d()("wc-block-components-select",t,{"is-active":i})},Object(o.createElement)(v.a,{label:c,onChange:function(e){var t=e.selectedItem;a(t.key)},options:s,value:i}),n)}),w=Object(j.a)((function(e){var t=e.className,n=e.id,r=e.value,a=e.instanceId,s=e.required,u=e.errorId,b=e.errorMessage,p=void 0===b?Object(l.__)("Please select a value.","woo-gutenberg-products-block"):b,m=g()(e,["className","id","value","instanceId","required","errorId","errorMessage"]),j=n||"select-"+a;u=u||j;var v=Object(h.a)(r),w=Object(O.b)(),E=w.getValidationError,k=w.setValidationErrors,S=w.clearValidationError;Object(f.useEffect)((function(){!s||v?S(u):k(c()({},u,{message:p,hidden:!0}))}),[S,v,u,p,s,k]),Object(f.useEffect)((function(){return function(){S(u)}}),[S,u]);var P=E(u)||{};return Object(o.createElement)(y,i()({id:j,className:d()(t,{"has-error":P.message&&!P.hidden}),feedback:Object(o.createElement)(_.a,{propertyName:u}),value:v},m))})),E=(n(374),function(e){var t=e.className,n=e.countries,r=e.id,c=e.label,a=e.onChange,s=e.value,i=void 0===s?"":s,u=e.autoComplete,p=void 0===u?"off":u,m=e.required,g=void 0!==m&&m,f=e.errorId,O=e.errorMessage,h=void 0===O?Object(l.__)("Please select a country.","woo-gutenberg-products-block"):O,j=Object(o.useMemo)((function(){return Object.keys(n).map((function(e){return{key:e,name:Object(b.decodeEntities)(n[e])}}))}),[n]);return Object(o.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(o.createElement)(w,{id:r,label:c,onChange:a,options:j,value:j.find((function(e){return e.key===i})),errorId:f,errorMessage:h,required:g}),"off"!==p&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:i,onChange:function(e){var t=e.target.value,n=j.find((function(e){return e.key===t}));a(n?n.key:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),k=function(e){return Object(o.createElement)(E,i()({countries:u.L},e))},S=function(e){return Object(o.createElement)(E,i()({countries:u.a},e))},P=(n(375),function(e){var t=e.className,n=e.id,r=e.states,c=e.country,s=e.label,i=e.onChange,u=e.autoComplete,p=void 0===u?"off":u,m=e.value,g=void 0===m?"":m,f=e.required,O=void 0!==f&&f,h=r[c],j=Object(o.useMemo)((function(){return h?Object.keys(h).map((function(e){return{key:e,name:Object(b.decodeEntities)(h[e])}})):[]}),[h]),_=Object(o.useCallback)((function(e){if(j.length>0){var t=j.find((function(t){return t.key===e||t.name===e}));i(t?t.key:"")}else i(e)}),[i,j]);return j.length>0?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{className:d()(t,"wc-block-components-state-input"),id:n,label:s,onChange:_,options:j,value:j.find((function(e){return e.key===g})),errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:O}),"off"!==p&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:g,onChange:function(e){return _(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(o.createElement)(a.a,{className:t,id:n,label:s,onChange:_,autoComplete:p,value:g,required:O})}),C=function(e){return Object(o.createElement)(P,i()({states:u.O},e))},N=function(e){return Object(o.createElement)(P,i()({states:u.b},e))},R=n(159);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var D={city:{index:9},postcode:{index:7}},T={state:{required:!1}},I={state:{required:!1,hidden:!0}},A={postcode:{required:!1,hidden:!0}},L={AE:M(M({},A),T),AF:I,AO:M(M({},A),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),AT:M(M({},D),I),AU:{city:{label:Object(l.__)("Suburb","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Suburb (optional)","woo-gutenberg-products-block")},postcode:{label:Object(l.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}},AX:M(M({},D),I),BD:{postcode:{required:!1},state:{label:Object(l.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("District (optional)","woo-gutenberg-products-block")}},BE:M(M({},D),I),BH:M({postcode:{required:!1}},I),BI:I,BO:A,BS:A,CA:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},CH:M(M({},D),{},{state:{label:Object(l.__)("Canton","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Canton (optional)","woo-gutenberg-products-block"),required:!1}}),CL:{city:{require:!0},postcode:{required:!1},state:{label:Object(l.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Region (optional)","woo-gutenberg-products-block")}},CN:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},CO:{postcode:{required:!1}},CZ:I,DE:M(M({},D),I),DK:M(M({},D),I),EE:M(M({},D),I),ES:M(M({},D),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),FI:M(M({},D),I),FR:M(M({},D),I),GB:{postcode:{label:Object(l.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},GP:I,GF:I,GR:T,HK:{postcode:{required:!1},city:{label:Object(l.__)("Town/District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Town/District (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Region (optional)","woo-gutenberg-products-block")}},HU:{state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},ID:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},IE:{postcode:{label:Object(l.__)("Eircode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Eircode (optional)","woo-gutenberg-products-block"),required:!1},state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},IS:M(M({},D),I),IL:M(M({},D),I),IM:I,IT:M(M({},D),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),JP:{first_name:{index:2},last_name:{index:1},address_1:{index:7},address_2:{index:8},postcode:{index:4},city:{index:6},state:{label:Object(l.__)("Prefecture","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Prefecture (optional)","woo-gutenberg-products-block"),index:5}},KR:I,KW:I,LB:I,LI:M(M({},D),{},{state:{label:Object(l.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}}),LK:I,LU:I,LV:{state:{label:Object(l.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}},MQ:I,MT:I,MZ:M(M({},A),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),NL:M(M({},D),I),NG:M(M({},A),{},{state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}}),NO:M(M({},D),I),NP:{postcode:{required:!1},state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}},NZ:{postcode:{label:Object(l.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Region (optional)","woo-gutenberg-products-block")}},PL:M(M({},D),I),PT:I,RE:I,RO:{state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},RS:I,SE:M(M({},D),I),SG:M({city:{required:!1}},I),SK:M(M({},D),I),SI:M(M({},D),I),SR:M({},A),ST:M(M({},A),{},{state:{label:Object(l.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("District (optional)","woo-gutenberg-products-block")}}),MD:{state:{label:Object(l.__)("Municipality/District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Municipality/District (optional)","woo-gutenberg-products-block")}},TR:M(M({},D),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),UG:M(M({},A),{},{city:{label:Object(l.__)("Town/Village","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Town/Village (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("District (optional)","woo-gutenberg-products-block")}}),US:{postcode:{label:Object(l.__)("ZIP","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("ZIP (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}},VN:M({city:{index:8},postcode:{index:7,required:!1}},I),WS:A,YT:I,ZA:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},ZW:A};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=Object(j.a)((function(e){var t=e.id,n=e.fields,r=void 0===n?Object.keys(R.a):n,s=e.fieldConfig,i=void 0===s?{}:s,u=e.instanceId,b=e.onChange,p=e.type,d=void 0===p?"shipping":p,m=e.values,g=Object(O.b)(),f=g.getValidationError,h=g.setValidationErrors,j=g.clearValidationError,_=L[m.country]||{},v=r.map((function(e){return U(U(U({key:e},R.a[e]),_[e]),i[e])})).sort((function(e,t){return e.index-t.index})),y=f("shipping-missing-country")||{};return Object(o.useEffect)((function(){"shipping"===d&&function(e,t,n,r){r||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}}),r&&e.country&&n("shipping-missing-country")}(m,h,j,y.message&&!y.hidden)}),[m,y.message,y.hidden,h,j,d]),t=t||u,Object(o.createElement)("div",{id:t,className:"wc-block-components-address-form"},v.map((function(e){if(e.hidden)return null;if("country"===e.key){var n="shipping"===d?k:S;return Object(o.createElement)(n,{key:e.key,id:"".concat(t,"-").concat(e.key),label:e.required?e.label:e.optionalLabel,value:m.country,autoComplete:e.autocomplete,onChange:function(e){return b(U(U({},m),{},{country:e,state:"",city:"",postcode:""}))},errorId:"shipping"===d?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){var r="shipping"===d?C:N;return Object(o.createElement)(r,{key:e.key,id:"".concat(t,"-").concat(e.key),country:m.country,label:e.required?e.label:e.optionalLabel,value:m.state,autoComplete:e.autocomplete,onChange:function(e){return b(U(U({},m),{},{state:e}))},errorMessage:e.errorMessage,required:e.required})}return Object(o.createElement)(a.a,{key:e.key,id:"".concat(t,"-").concat(e.key),className:"wc-block-components-address-form__".concat(e.key),label:e.required?e.label:e.optionalLabel,value:m[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:function(t){return b(U(U({},m),{},c()({},e.key,t)))},errorMessage:e.errorMessage,required:e.required})})))}))},908:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(1),s=n(5),i=(n(2),n(156)),u=n(8),l=n.n(u),b=n(904),p=n(99),d=n(43),m=n.n(d),g=n(86);n(263);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e){var t=e.address,n=e.onUpdate,r=e.addressFields,s=Object(o.useState)(t),i=c()(s,2),u=i[0],l=i[1],d=Object(g.b)(),f=d.hasValidationErrors,h=d.showAllValidationErrors,j={};return r.forEach((function(e){j[e]=O(O({},j[e]),{},"country"===e?{errorMessage:Object(a.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),required:!0}:{required:!1})})),Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(b.a,{fields:r,fieldConfig:j,onChange:l,values:u}),Object(o.createElement)(p.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:m()(u,t),onClick:function(e){if(e.preventDefault(),h(),!f)return n(u)},type:"submit"},Object(a.__)("Update","woo-gutenberg-products-block")))},j=function(e){var t=e.onUpdate,n=void 0===t?function(){}:t,r=e.addressFields,c=void 0===r?["country","state","city","postcode"]:r,a=Object(i.b)(),s=a.shippingAddress,u=a.setShippingAddress;return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(h,{address:s,addressFields:c,onUpdate:function(e){u(e),n(e)}}))},_=n(60),v=n.n(_),y=n(33),w=function(e){var t=e.address;if(0===Object.values(t).length)return null;var n="string"==typeof s.L[t.country]?Object(y.decodeEntities)(s.L[t.country]):"",r="object"===v()(s.O[t.country])&&"string"==typeof s.O[t.country][t.state]?Object(y.decodeEntities)(s.O[t.country][t.state]):t.state,c=[];c.push(t.postcode.toUpperCase()),c.push(t.city),c.push(r),c.push(n);var i=c.filter(Boolean).join(", ");return i&&Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(a.sprintf)(Object(a.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" ")},E=n(134),k=n(65),S=n(55),P=n(259),C=n(916),N=function(e){var t=s.p?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(y.decodeEntities)(e.name),value:e.rate_id,description:Object(o.createElement)(o.Fragment,null,Number.isFinite(t)&&Object(o.createElement)(S.a,{currency:Object(P.c)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(y.decodeEntities)(e.delivery_time))}},R=function(e){var t=e.hasRates,n=e.shippingRates,r=e.shippingRatesLoading;return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},t?Object(a.__)("Shipping options","woo-gutenberg-products-block"):Object(a.__)("Choose a shipping option","woo-gutenberg-products-block")),Object(o.createElement)(C.a,{className:"wc-block-components-totals-shipping__options",collapsibleWhenMultiple:!0,noResultsMessage:Object(a.__)("No shipping options were found.","woo-gutenberg-products-block"),renderOption:N,shippingRates:n,shippingRatesLoading:r}))},x=function(e){return e.some((function(e){return e.shipping_rates.length}))};n(373),t.a=function(e){var t=e.currency,n=e.values,r=e.isCheckout,i=void 0!==r&&r,u=e.showCalculator,l=void 0===u||u,b=e.showRatesWithoutAddress,p=void 0!==b&&b,d=Object(o.useState)(!1),m=c()(d,2),g=m[0],f=m[1],O=Object(E.a)(),h=O.shippingRates,_=O.shippingRatesLoading,v=O.hasShippingAddress,y=O.shippingAddress,S=s.p?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),P=x(h)||S,C=p||v;return P||v||i?Object(o.createElement)("div",{className:"wc-block-components-totals-shipping"},Object(o.createElement)(k.a,{label:Object(a.__)("Shipping","woo-gutenberg-products-block"),value:S||"",description:Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{address:y})," ",l&&Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){f(!g)},"aria-expanded":g},Object(a.__)("(change address)","woo-gutenberg-products-block"))),currency:t}),l&&g&&Object(o.createElement)(j,{onUpdate:function(){f(!1)}}),!i&&C&&Object(o.createElement)(R,{hasRates:P,shippingRates:h,shippingRatesLoading:_})):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(k.a,{className:"wc-block-components-totals-shipping",label:Object(a.__)("Shipping","woo-gutenberg-products-block"),value:l?Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){f(!g)}},Object(a.__)("Calculate","woo-gutenberg-products-block")):Object(o.createElement)("em",null,Object(a.__)("Calculated during checkout","woo-gutenberg-products-block"))}),l&&g&&Object(o.createElement)(j,{onUpdate:function(){f(!1)}}))}},916:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(9),a=(n(2),n(87)),s=n(125),i=n(878),u=n(27),l=n.n(u),b=n(864),p=n(33),d=n(48),m=n(136),g=n(154),f=n(7),O=n.n(f),h=n(210),j=n(165),_=n(390),v=function(e){var t=e.className,n=e.noResultsMessage,c=e.onChange,o=e.options,a=e.renderOption,s=e.selected;if(0===o.length)return Object(r.createElement)(_.a,{isDismissible:!1,className:O()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-message","woocommerce-info")},n);if(o.length>1)return Object(r.createElement)(h.a,{className:t,onChange:c,selected:s,options:o.map(a)});var i=a(o[0]),u=i.label,l=i.secondaryLabel,b=i.description,p=i.secondaryDescription;return Object(r.createElement)(j.a,{label:u,secondaryLabel:l,description:b,secondaryDescription:p})},y=(n(204),function(e){var t=e.className,n=e.collapsible,o=void 0!==n&&n,a=e.noResultsMessage,s=e.onChange,i=e.renderOption,u=e.selected,l=e.shippingRate,b=e.showItems,f=e.title,h=Object(r.createElement)(r.Fragment,null,f&&Object(r.createElement)(m.a,{className:"wc-block-components-shipping-rates-control__package-title",headingLevel:"3"},f),b&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map((function(e){var t=Object(p.decodeEntities)(e.name),n=e.quantity;return Object(r.createElement)("li",{key:t,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(d.a,{label:"".concat(t," ×").concat(n),screenReaderLabel:Object(c.sprintf)(Object(c._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),j=Object(r.createElement)(v,{className:t,noResultsMessage:a,onChange:s,options:l.shipping_rates,renderOption:i,selected:u});return o?Object(r.createElement)(g.a,{className:"wc-block-components-shipping-rates-control__package",hasBorder:!0,initialOpen:!0,title:h},j):Object(r.createElement)("div",{className:O()("wc-block-components-shipping-rates-control__package",t)},h,j)}),w=function(e){var t=e.className,n=e.collapsible,c=void 0!==n&&n,o=e.noResultsMessage,a=e.renderOption,s=e.shippingRates,i=void 0===s?[]:s,u=Object(b.a)(i),p=u.selectShippingRate,d=u.selectedShippingRates;return Object(r.createElement)("div",{className:"wc-block-components-shipping-rates-control"},i.map((function(e){var n=e.package_id,s=l()(e,["package_id"]);return Object(r.createElement)(y,{key:n,className:t,collapsible:c,noResultsMessage:o,onChange:function(e){p(e,n)},renderOption:a,selected:d[n],shippingRate:s,showItems:i.length>1,title:i.length>1?s.name:null})})))};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,u=e.className,l=e.collapsibleWhenMultiple,b=void 0!==l&&l,p=e.noResultsMessage,d=e.renderOption;return Object(o.useEffect)((function(){if(!n){var e=Object(i.a)(t),r=Object(i.b)(t);0===r?Object(a.speak)(Object(c.__)("No shipping options were found.","woo-gutenberg-products-block")):1===e?Object(a.speak)(Object(c.sprintf)(Object(c._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(a.speak)(Object(c.sprintf)(Object(c._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(c.sprintf)(Object(c._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))}}),[n,t]),Object(r.createElement)(s.a,{isLoading:n,screenReaderLabel:Object(c.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},Object(r.createElement)(w,{className:u,collapsible:t.length>1&&b,noResultsMessage:p,renderOption:d,shippingRates:t}))}},917:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(8),a=n.n(o),s=n(0),i=n(7),u=n.n(i),l=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},b=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,c=e.alt,o=void 0===c?"":c;return r?Object(s.createElement)("img",{className:l(t),src:r,alt:o}):null},p=n(5),d=[{id:"alipay",alt:"Alipay",src:p.U+"img/payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.U+"img/payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.U+"img/payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.U+"img/payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.U+"img/payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.U+"img/payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.U+"img/payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.U+"img/payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.U+"img/payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.U+"img/payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.U+"img/payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.U+"img/payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.U+"img/payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.U+"img/payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.U+"img/payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.U+"img/payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.U+"img/payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.U+"img/payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.U+"img/payment-methods/wechat.svg"}],m=n(60),g=n.n(m);n(382);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icons,n=void 0===t?[]:t,r=e.align,o=void 0===r?"center":r,a=function(e){var t={};return e.forEach((function(e){var n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"===g()(e)&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)}(n);if(0===a.length)return null;var i=u()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===o,"wc-block-components-payment-method-icons--align-right":"right"===o});return Object(s.createElement)("div",{className:i},a.map((function(e){var t,n=O(O({},e),(t=e.id,d.find((function(e){return e.id===t}))||{}));return Object(s.createElement)(b,c()({key:"payment-method-icon-"+e.id},n))})))}},924:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(33)),o=n(7),a=n.n(o),s=function(e){var t=e.className,n=e.variation,o=void 0===n?[]:n;if(!o||0===o.length)return null;var s=o.map((function(e){return e.attribute?"".concat(Object(c.decodeEntities)(e.attribute),": ").concat(Object(c.decodeEntities)(e.value)):"".concat(Object(c.decodeEntities)(e.value))})).join(" / ");return Object(r.createElement)("div",{className:a()("wc-block-components-product-variation-data",t)},s)},i=n(177),u=n(3),l=function(e){var t=e.className,n=e.shortDescription,c=void 0===n?"":n,o=e.fullDescription,a=c||(void 0===o?"":o);return a?Object(r.createElement)(i.a,{className:t,source:a,maxLength:15,countType:Object(u.getSetting)("wordCountType","words")}):null};n(370),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,c=e.fullDescription,o=void 0===c?"":c,a=e.variation,i=void 0===a?[]:a;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(l,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:o}),Object(r.createElement)(s,{className:"wc-block-components-product-metadata__variation-data",variation:i}))}},928:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),c=n(5),o=[{destination:{},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",rate_id:"free_shipping:1",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",rate_id:"local_pickup:1",method_id:"local_pickup",selected:!1}]}],a={coupons:[],shipping_rates:c.N?o:[],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:c.U+"img/beanie.jpg",thumbnail:c.U+"img/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:"800",regular_price:"800",sale_price:"800",raw_prices:{precision:6,price:"8000000",regular_price:"8000000",sale_price:"8000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"1600",line_subtotal_tax:"0",line_total:"1600",line_total_tax:"0"}},{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:c.U+"img/cap.jpg",thumbnail:c.U+"img/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:"1400",regular_price:"1600",sale_price:"1400",raw_prices:{precision:6,price:"14000000",regular_price:"16000000",sale_price:"14000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"1400",line_subtotal_tax:"0",line_total:"1400",line_total_tax:"0"}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:c.M,totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"3000",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"200",total_shipping_tax:"0",total_tax:"0",total_price:"3200",tax_lines:[]}}},95:function(e,t){!function(){e.exports=this.wp.autop}()},99:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(280),u=(n(2),n(7)),l=n.n(u);n(239);t.a=function(e){var t=e.className,n=e.showSpinner,r=void 0!==n&&n,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return Object(s.createElement)(i.a,c()({className:b},u),r&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.checkout=function(e){function t(t){for(var r,a,s=t[0],i=t[1],u=t[2],b=0,p=[];b<s.length;b++)a=s[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,s=1;s<n.length;s++){var i=n[s];0!==c[i]&&(r=!1)}r&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},c={21:0},o=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var l=i;return o.push([885,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},123:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(9),s=(n(2),n(7)),i=n.n(s),u=n(48),l=(n(266),Object(a.forwardRef)((function(e,t){var n=e.className,r=e.id,a=e.type,s=void 0===a?"text":a,l=e.ariaLabel,b=e.ariaDescribedBy,p=e.label,d=e.screenReaderLabel,m=e.disabled,g=e.help,f=e.autoCapitalize,O=void 0===f?"off":f,h=e.autoComplete,j=void 0===h?"off":h,_=e.value,v=void 0===_?"":_,y=e.onChange,w=e.required,E=void 0!==w&&w,k=e.onBlur,S=void 0===k?function(){}:k,P=e.feedback,C=Object(o.useState)(!1),N=c()(C,2),R=N[0],x=N[1];return Object(o.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":R||v})},Object(o.createElement)("input",{type:s,id:r,value:v,ref:t,autoCapitalize:O,autoComplete:j,onChange:function(e){y(e.target.value)},onFocus:function(){return x(!0)},onBlur:function(){S(),x(!1)},"aria-label":l||p,disabled:m,"aria-describedby":g&&!b?r+"__help":b,required:E}),Object(o.createElement)(u.a,{label:p,screenReaderLabel:d||p,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!g&&Object(o.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},g),P)})));t.a=l},125:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(7)),a=n.n(o),s=n(551);n(365);t.a=function(e){var t=e.children,n=e.className,o=e.screenReaderLabel,i=e.showSpinner,u=void 0!==i&&i,l=e.isLoading;return void 0===l||l?Object(r.createElement)("div",{className:a()(n,"wc-block-components-loading-mask")},u&&Object(r.createElement)(s.a,null),Object(r.createElement)("div",{className:"wc-block-components-loading-mask__children","aria-hidden":!0},t),Object(r.createElement)("span",{className:"screen-reader-text"},o||Object(c.__)("Loading…","woo-gutenberg-products-block"))):t}},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},134:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),o=n(212),a=n(33),s=n(6),i={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),n=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return i;if(n)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var o=e(r.CART_STORE_KEY),u=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),m=!o.hasFinishedResolution("getCartData"),g=o.areShippingRatesLoading(),f=c(r.CART_STORE_KEY).receiveCart,O=Object(s.mapValues)(u.shippingAddress,(function(e){return Object(a.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:d,cartIsLoading:m,cartErrors:p,shippingAddress:O,shippingRates:u.shippingRates||[],shippingRatesLoading:g,hasShippingAddress:!!O.country,receiveCart:f}}),[b]);return p}},136:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(7),u=n.n(i);n(2),n(367);t.a=function(e){var t=e.children,n=e.className,r=e.headingLevel,o=a()(e,["children","className","headingLevel"]),i=u()("wc-block-components-title",n),l="h".concat(r);return Object(s.createElement)(l,c()({className:i},o),t)}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(8),c=n.n(r),o=n(191),a=n(0);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,s=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),b=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,i({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,i({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,i({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,i({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,i({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[n,c]);return i(i(i({notices:t},l),b),{},{setIsSuppressed:s})}},142:function(e,t){!function(){e.exports=this.wp.wordcount}()},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},150:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return b}));var r=n(8),c=n.n(r),o=n(6);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:n}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[r]);switch(n){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},r,b));case u:return b.delete(o),s(s({},e),{},c()({},r,b))}return e}},153:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c);n(2),n(369);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)("div",{className:o()("wc-block-components-product-badge",n)},t)}},154:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(7),s=n.n(a),i=(n(2),n(61)),u=n(57),l=Object(o.createElement)(u.a,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"})),b=Object(o.createElement)(u.a,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"}));n(377),t.a=function(e){var t=e.children,n=e.className,r=e.initialOpen,a=void 0!==r&&r,u=e.hasBorder,p=void 0!==u&&u,d=e.title,m=e.titleTag,g=void 0===m?"div":m,f=Object(o.useState)(a),O=c()(f,2),h=O[0],j=O[1];return Object(o.createElement)("div",{className:s()(n,"wc-blocks-components-panel",{"has-border":p})},Object(o.createElement)(g,null,Object(o.createElement)("button",{"aria-expanded":h,className:"wc-blocks-components-panel__button",onClick:function(){return j(!h)}},Object(o.createElement)(i.a,{"aria-hidden":"true",className:"wc-blocks-components-panel__button-icon",srcElement:h?l:b}),d)),Object(o.createElement)("div",{className:"wc-blocks-components-panel__content",hidden:!h},t))}},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(11),c=n.n(r),o=n(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},156:function(e,t,n){"use strict";n.d(t,"b",(function(){return T})),n.d(t,"a",(function(){return I}));var r=n(11),c=n.n(r),o=n(0),a=n(134),s=n(36),i=n(43),u=n.n(i),l=n(550),b=n(41),p=n(33),d=n(140),m=function(e){return{country:e.country,state:e.state,city:e.city,postcode:e.postcode.replace(" ","").toUpperCase()}},g=function(){var e=Object(a.a)().shippingAddress,t=Object(o.useState)(e),n=c()(t,2),r=n[0],i=n[1],g=Object(l.a)(r,400),f=c()(g,1)[0],O=Object(s.useDispatch)(b.CART_STORE_KEY).updateShippingAddress,h=Object(d.a)().addErrorNotice,j=Object(o.useRef)(e);Object(o.useEffect)((function(){var e,t;f.country&&(e=j.current,t=f,!u()(m(e),m(t)))&&O(f).then((function(){j.current=f})).catch((function(e){h(e.message,{id:"shipping-form"})}))}),[f,O,h]);var _={};return Object.keys(r).forEach((function(e){_[e]=Object(p.decodeEntities)(r[e])})),{shippingAddress:_,setShippingAddress:i}},f=n(864),O=n(170),h={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},j={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"},_={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:function(){return null},shippingErrorTypes:h,shippingRates:[],setShippingRates:function(){return null},shippingRatesLoading:!1,selectedRates:[],setSelectedRates:function(){return null},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:function(){return null},onShippingRateSuccess:function(){return null},onShippingRateFail:function(){return null},onShippingRateSelectSuccess:function(){return null},onShippingRateSelectFail:function(){return null},needsShipping:!1},v=n(150),y=n(396),w="shipping_rates_success",E="shipping_rates_fail",k="shipping_rate_select_success",S="shipping_rate_select_fail",P=function(e){return{onSuccess:Object(y.a)(w,e),onFail:Object(y.a)(E,e),onSelectSuccess:Object(y.a)(k,e),onSelectFail:Object(y.a)(S,e)}},C=n(397),N=h.NONE,R=h.INVALID_ADDRESS,x=h.UNKNOWN,M=function(e,t){var n=t.type;return Object.values(h).includes(n)?n:e},D=Object(o.createContext)(_),T=function(){return Object(o.useContext)(D)},I=function(e){var t=e.children,n=Object(O.b)().dispatchActions,r=Object(a.a)(),s=r.cartNeedsShipping,i=r.shippingRates,u=r.shippingRatesLoading,l=r.cartErrors,b=Object(o.useReducer)(M,N),p=c()(b,2),d=p[0],m=p[1],_=Object(o.useReducer)(v.b,{}),y=c()(_,2),T=y[0],I=y[1],A=g(),L=A.shippingAddress,F=A.setShippingAddress,U=Object(o.useRef)(T),B=Object(f.a)(i),V=B.selectShippingRate,q=B.selectedShippingRates,z=B.isSelectingRate,H=Object(o.useMemo)((function(){return{onShippingRateSuccess:P(I).onSuccess,onShippingRateFail:P(I).onFail,onShippingRateSelectSuccess:P(I).onSelectSuccess,onShippingRateSelectFail:P(I).onSelectFail}}),[I]);Object(o.useEffect)((function(){U.current=T}),[T]),Object(o.useEffect)((function(){u?n.incrementCalculating():n.decrementCalculating()}),[u,n]),Object(o.useEffect)((function(){z?n.incrementCalculating():n.decrementCalculating()}),[z,n]),Object(o.useEffect)((function(){l.length>0&&l.some((function(e){return!(!e.code||!Object.values(j).includes(e.code))}))?m({type:R}):m({type:N})}),[l]);var Y=Object(o.useMemo)((function(){return{isPristine:d===N,isValid:d===N,hasInvalidAddress:d===R,hasError:d===x||d===R}}),[d]);Object(o.useEffect)((function(){u||0!==i.length&&!Y.hasError||Object(C.a)(U.current,E,{hasInvalidAddress:Y.hasInvalidAddress,hasError:Y.hasError})}),[i,u,Y.hasError,Y.hasInvalidAddress]),Object(o.useEffect)((function(){!u&&i.length>0&&!Y.hasError&&Object(C.a)(U.current,w,i)}),[i,u,Y.hasError]),Object(o.useEffect)((function(){!z&&Y.hasError&&Object(C.a)(U.current,S,{hasError:Y.hasError,hasInvalidAddress:Y.hasInvalidAddress})}),[q,z,Y.hasError,Y.hasInvalidAddress]),Object(o.useEffect)((function(){z||!q||Y.hasError||Object(C.a)(U.current,k,q)}),[q,z,Y.hasError]);var G={shippingErrorStatus:Y,dispatchErrorStatus:m,shippingErrorTypes:h,shippingRates:i,setShippingRates:V,shippingRatesLoading:u,selectedRates:q,setSelectedRates:V,isSelectingRate:z,shippingAddress:L,setShippingAddress:F,onShippingRateSuccess:H.onShippingRateSuccess,onShippingRateFail:H.onShippingRateFail,onShippingRateSelectSuccess:H.onShippingRateSelectSuccess,onShippingRateSelectFail:H.onShippingRateSelectFail,needsShipping:s};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(D.Provider,{value:G},t))}},159:function(e,t,n){"use strict";var r=n(1),c={first_name:{label:Object(r.__)("First name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("First name (optional)","woo-gutenberg-products-block"),autocomplete:"given-name",autocapitalize:"sentences",required:!0,hidden:!1,index:1},last_name:{label:Object(r.__)("Last name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Last name (optional)","woo-gutenberg-products-block"),autocomplete:"family-name",autocapitalize:"sentences",required:!0,hidden:!1,index:2},company:{label:Object(r.__)("Company","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Company (optional)","woo-gutenberg-products-block"),autocomplete:"organization",autocapitalize:"sentences",required:!1,hidden:!1,index:3},address_1:{label:Object(r.__)("Address","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Address (optional)","woo-gutenberg-products-block"),autocomplete:"address-line1",autocapitalize:"sentences",required:!0,hidden:!1,index:4},address_2:{label:Object(r.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Apartment, suite, etc. (optional)","woo-gutenberg-products-block"),autocomplete:"address-line2",autocapitalize:"sentences",required:!1,hidden:!1,index:5},country:{label:Object(r.__)("Country/Region","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Country/Region (optional)","woo-gutenberg-products-block"),autocomplete:"country",required:!0,hidden:!1,index:6},city:{label:Object(r.__)("City","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("City (optional)","woo-gutenberg-products-block"),autocomplete:"address-level2",autocapitalize:"sentences",required:!0,hidden:!1,index:7},state:{label:Object(r.__)("State/County","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("State/County (optional)","woo-gutenberg-products-block"),autocomplete:"address-level1",autocapitalize:"sentences",required:!0,hidden:!1,index:8},postcode:{label:Object(r.__)("Postal code","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Postal code (optional)","woo-gutenberg-products-block"),autocomplete:"postal-code",autocapitalize:"characters",required:!0,hidden:!1,index:9}};t.a=c},164:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=n(1),s=n(55),i=n(7),u=n.n(i),l=(n(2),n(237),function(e){var t=e.className,n=e.currency,r=e.maxPrice,c=e.minPrice,a=e.priceClassName,i=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(s.a,{className:u()("wc-block-components-product-price__value",a),currency:n,value:c,style:i})," — ",Object(o.createElement)(s.a,{className:u()("wc-block-components-product-price__value",a),currency:n,value:r,style:i}))}),b=function(e){var t=e.className,n=e.currency,r=e.regularPriceClassName,c=e.regularPriceStyle,i=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(s.a,{currency:n,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",r),style:c},e)},value:i}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(s.a,{currency:n,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,a=e.maxPrice,i=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,m=e.price,g=void 0===m?null:m,f=e.priceClassName,O=e.priceStyle,h=e.regularPrice,j=e.regularPriceClassName,_=e.regularPriceStyle,v=u()(n,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return h&&g!==h?Object(o.createElement)(b,{className:v,currency:r,price:g,priceClassName:f,priceStyle:O,regularPrice:h,regularPriceClassName:j,regularPriceStyle:_}):null!==d&&null!==i?Object(o.createElement)(l,{className:v,currency:r,maxPrice:i,minPrice:d,priceClassName:f,priceStyle:O}):null!==g?Object(o.createElement)("span",{className:v},Object(o.createElement)(s.a,{className:u()("wc-block-components-product-price__value",f),currency:r,value:g,style:O})):Object(o.createElement)("span",{className:v},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",f)}))}},165:function(e,t,n){"use strict";var r=n(0);t.a=function(e){var t=e.label,n=e.secondaryLabel,c=e.description,o=e.secondaryDescription,a=e.id;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?"".concat(a,"__label"):null,className:"wc-block-components-radio-control__label"},t),n&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-label"):null,className:"wc-block-components-radio-control__secondary-label"},n)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},c&&Object(r.createElement)("span",{id:a?"".concat(a,"__description"):null,className:"wc-block-components-radio-control__description"},c),o&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-description"):null,className:"wc-block-components-radio-control__secondary-description"},o)))}},167:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},168:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),c=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},169:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(8),a=n.n(o),s=n(11),i=n.n(s),u=n(27),l=n.n(u),b=n(0),p=n(1),d=n(9),m=(n(2),n(7)),g=n.n(m),f=n(86),O=n(233),h=n(193),j=n(123);n(266);t.a=Object(h.a)((function(e){var t=e.className,n=e.instanceId,r=e.id,o=e.ariaDescribedBy,s=e.errorId,u=e.validateOnMount,m=void 0===u||u,h=e.focusOnMount,_=void 0!==h&&h,v=e.onChange,y=e.showError,w=void 0===y||y,E=l()(e,["className","instanceId","id","ariaDescribedBy","errorId","validateOnMount","focusOnMount","onChange","showError"]),k=Object(d.useState)(!0),S=i()(k,2),P=S[0],C=S[1],N=Object(d.useRef)(),R=Object(f.b)(),x=R.getValidationError,M=R.hideValidationError,D=R.setValidationErrors,T=R.clearValidationError,I=R.getValidationErrorId,A=r||"textinput-"+n;s=s||A;var L=Object(d.useCallback)((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];N.current.checkValidity()?T(s):D(a()({},s,{message:N.current.validationMessage||Object(p.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}),[T,s,D]);Object(d.useEffect)((function(){P&&(_&&N.current.focus(),C(!1))}),[_,P,C]),Object(d.useEffect)((function(){P&&(m&&L(),C(!1))}),[P,C,m,L]),Object(d.useEffect)((function(){return function(){T(s)}}),[T,s]);var F=x(s)||{},U=F.message&&!F.hidden,B=w&&U&&I(s)?I(s):o;return Object(b.createElement)(j.a,c()({className:g()(t,{"has-error":U}),id:A,onBlur:function(){L(!1)},feedback:w&&Object(b.createElement)(O.a,{propertyName:s}),ref:N,onChange:function(e){M(s),v(e)},ariaDescribedBy:B},E))}))},17:function(e,t){!function(){e.exports=this.wp.blocks}()},170:function(e,t,n){"use strict";n.d(t,"b",(function(){return De})),n.d(t,"a",(function(){return Te}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(1),u=n(140),l=n(395),b=n(36),p=n(168),d=n(3),m="pristine",g="idle",f="processing",O="complete",h="before_processing",j="after_processing",_=Object(d.getSetting)("checkoutData",{order_id:0,customer_id:0}),v={redirectUrl:"",status:m,hasError:!1,calculatingCount:0,orderId:_.order_id,orderNotes:"",customerId:_.customer_id,shouldCreateAccount:!1,processingResponse:null},y={SET_IDLE:"set_idle",SET_PRISTINE:"set_pristine",SET_REDIRECT_URL:"set_redirect_url",SET_COMPLETE:"set_checkout_complete",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_PROCESSING:"set_checkout_is_processing",SET_HAS_ERROR:"set_checkout_has_error",SET_NO_ERROR:"set_checkout_no_error",SET_ORDER_ID:"set_checkout_order_id",SET_ORDER_NOTES:"set_checkout_order_notes",INCREMENT_CALCULATING:"increment_calculating",DECREMENT_CALCULATING:"decrement_calculating"},w=y.SET_PRISTINE,E=y.SET_IDLE,k=y.SET_PROCESSING,S=y.SET_BEFORE_PROCESSING,P=y.SET_AFTER_PROCESSING,C=y.SET_PROCESSING_RESPONSE,N=y.SET_REDIRECT_URL,R=y.SET_COMPLETE,x=y.SET_HAS_ERROR,M=y.SET_NO_ERROR,D=y.INCREMENT_CALCULATING,T=y.DECREMENT_CALCULATING,I=y.SET_ORDER_ID,A=y.SET_SHOULD_CREATE_ACCOUNT,L=y.SET_ORDER_NOTES,F=function(){return{type:w}},U=function(){return{type:E}},B=function(){return{type:k}},V=function(e){return{type:N,url:e}},q=function(e){return{type:C,data:e}},z=function(e){return{type:R,data:e}},H=function(){return{type:S}},Y=function(){return{type:P}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?x:M;return{type:t}},W=function(){return{type:D}},$=function(){return{type:T}},K=function(e){return{type:I,orderId:e}},X=function(e){return{type:A,shouldCreateAccount:e}},Z=function(e){return{type:L,orderNotes:e}};function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=y.SET_PRISTINE,te=y.SET_IDLE,ne=y.SET_PROCESSING,re=y.SET_BEFORE_PROCESSING,ce=y.SET_AFTER_PROCESSING,oe=y.SET_PROCESSING_RESPONSE,ae=y.SET_REDIRECT_URL,se=y.SET_COMPLETE,ie=y.SET_HAS_ERROR,ue=y.SET_NO_ERROR,le=y.INCREMENT_CALCULATING,be=y.DECREMENT_CALCULATING,pe=y.SET_ORDER_ID,de=y.SET_ORDER_NOTES,me=y.SET_SHOULD_CREATE_ACCOUNT,ge=m,fe=g,Oe=f,he=h,je=j,_e=O,ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0,n=t.url,r=t.type,c=t.orderId,o=t.orderNotes,a=t.shouldCreateAccount,s=t.data,i=e;switch(r){case ee:i=v;break;case te:i=e.status!==fe?J(J({},e),{},{status:fe}):e;break;case ae:i=n!==e.url?J(J({},e),{},{redirectUrl:n}):e;break;case oe:i=J(J({},e),{},{processingResponse:s});break;case se:i=e.status!==_e?J(J({},e),{},{status:_e,redirectUrl:(null==s?void 0:s.redirectUrl)||e.redirectUrl}):e;break;case ne:i=!1===(i=e.status!==Oe?J(J({},e),{},{status:Oe,hasError:!1}):e).hasError?i:J(J({},i),{},{hasError:!1});break;case re:i=e.status!==he?J(J({},e),{},{status:he,hasError:!1}):e;break;case ce:i=e.status!==je?J(J({},e),{},{status:je}):e;break;case ie:i=e.hasError?e:J(J({},e),{},{hasError:!0}),i=e.status===Oe||e.status===he?J(J({},i),{},{status:fe}):i;break;case ue:i=e.hasError?J(J({},e),{},{hasError:!1}):e;break;case le:i=J(J({},e),{},{calculatingCount:e.calculatingCount+1});break;case be:i=J(J({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case pe:i=J(J({},e),{},{orderId:c});break;case me:a!==e.shouldCreateAccount&&(i=J(J({},e),{},{shouldCreateAccount:a}));break;case de:e.orderNotes!==o&&(i=J(J({},e),{},{orderNotes:o}))}return i!==e&&r!==ee&&i.status===ge&&(i.status=fe),i},ye=n(150),we=n(396),Ee="checkout_before_processing",ke="checkout_after_processing_with_success",Se="checkout_after_processing_with_error",Pe=function(e){return{onCheckoutAfterProcessingWithSuccess:Object(we.a)(ke,e),onCheckoutAfterProcessingWithError:Object(we.a)(Se,e),onCheckoutBeforeProcessing:Object(we.a)(Ee,e)}},Ce=n(397),Ne=n(86);function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Me=Object(s.createContext)({isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onSubmit:function(){},onCheckoutAfterProcessingWithSuccess:function(e){},onCheckoutAfterProcessingWithError:function(e){},onCheckoutBeforeProcessing:function(e){},dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setOrderId:function(e){},setOrderNotes:function(e){}},hasOrder:!1,isCart:!1}),De=function(){return Object(s.useContext)(Me)},Te=function(e){var t=e.children,n=e.redirectUrl,r=e.isCart,c=void 0!==r&&r;v.redirectUrl=n;var o,d=Object(s.useReducer)(ve,v),m=a()(d,2),_=m[0],y=m[1],w=Object(s.useReducer)(ye.b,{}),E=a()(w,2),k=E[0],S=E[1],P=Object(s.useRef)(k),C=Object(Ne.b)().setValidationErrors,N=Object(u.a)(),R=N.addErrorNotice,x=N.removeNotices,M=_.calculatingCount>0,D=Object(l.a)(),T=D.isSuccessResponse,I=D.isErrorResponse,A=D.isFailResponse,L=D.shouldRetry,Q=(o=Object(l.a)().noticeContexts,{checkoutNotices:Object(b.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(b.useSelect)((function(e){return e("core/notices").getNotices(o.EXPRESS_PAYMENTS)}),[o.EXPRESS_PAYMENTS]),paymentNotices:Object(b.useSelect)((function(e){return e("core/notices").getNotices(o.PAYMENTS)}),[o.PAYMENTS])}),J=Q.checkoutNotices,ee=Q.paymentNotices,te=Q.expressPaymentNotices;Object(s.useEffect)((function(){P.current=k}),[k]);var ne=Object(s.useMemo)((function(){return Pe(S).onCheckoutAfterProcessingWithSuccess}),[S]),re=Object(s.useMemo)((function(){return Pe(S).onCheckoutAfterProcessingWithError}),[S]),ce=Object(s.useMemo)((function(){return Pe(S).onCheckoutBeforeProcessing}),[S]),oe=Object(s.useMemo)((function(){return{resetCheckout:function(){y(F())},setRedirectUrl:function(e){y(V(e))},setHasError:function(e){y(G(e))},incrementCalculating:function(){y(W())},decrementCalculating:function(){y($())},setOrderId:function(e){y(K(e))},setOrderNotes:function(e){y(Z(e))},setAfterProcessing:function(e){var t,n,r,c;(!e.payment_result&&e.message&&200!==(null==e||null===(t=e.data)||void 0===t?void 0:t.status)&&(e.payment_result=xe(xe({},e.payment_result),{},{message:e.message})),e.payment_result)&&((null===(n=e.payment_result)||void 0===n?void 0:n.redirect_url)&&y(V(e.payment_result.redirect_url)),y(q((r=e.payment_result,c={message:(null==r?void 0:r.message)||"",paymentStatus:r.payment_status,paymentDetails:{}},Array.isArray(r.payment_details)&&r.payment_details.forEach((function(e){var t=e.key,n=e.value;c.paymentDetails[t]=n})),c))));y(Y())}}}),[]);Object(s.useEffect)((function(){_.status===h&&(x("error"),Object(Ce.a)(P.current,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,n=e.validationErrors;R(t),C(n)})),y(U())):y(B())})))}),[_.status,C,R,x,y]);var ae=Object(p.a)(_.status),se=Object(p.a)(_.hasError);Object(s.useEffect)((function(){if((_.status!==ae||_.hasError!==se)&&_.status===j){var e={redirectUrl:_.redirectUrl,orderId:_.orderId,customerId:_.customerId,customerNote:_.customerNote,processingResponse:_.processingResponse};_.hasError?Object(Ce.b)(P.current,Se,e).then((function(t){if(I(t)||A(t)){if(t.message){var n=t.messageContext?{context:t.messageContext}:void 0;R(t.message,n)}L(t)?y(U()):y(z(t))}else{if(!(J.some((function(e){return"error"===e.status}))||te.some((function(e){return"error"===e.status}))||ee.some((function(e){return"error"===e.status})))){var r,c=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");R(c,{id:"checkout"})}y(U())}})):Object(Ce.b)(P.current,ke,e).then((function(e){if(T(e))y(z(e));else if(I(e)||A(e)){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;R(e.message,t)}L(e)?y(G(!0)):y(z(e))}else y(z())}))}}),[_.status,_.hasError,_.redirectUrl,_.orderId,_.customerId,_.customerNote,_.processingResponse,ae,se,oe,R,I,A,T,L,J,te,ee]);var ie={onSubmit:Object(s.useCallback)((function(){y(H())}),[]),isComplete:_.status===O,isIdle:_.status===g,isCalculating:M,isProcessing:_.status===f,isBeforeProcessing:_.status===h,isAfterProcessing:_.status===j,hasError:_.hasError,redirectUrl:_.redirectUrl,onCheckoutAfterProcessingWithSuccess:ne,onCheckoutAfterProcessingWithError:re,onCheckoutBeforeProcessing:ce,dispatchActions:oe,isCart:c,orderId:_.orderId,hasOrder:!!_.orderId,customerId:_.customerId,orderNotes:_.orderNotes,shouldCreateAccount:_.shouldCreateAccount,setShouldCreateAccount:function(e){return y(X(e))}};return Object(s.createElement)(Me.Provider,{value:ie},t)}},177:function(e,t,n){"use strict";var r=n(0),c=n(142),o=n(95),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},s=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},i=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=s(e),c=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(c,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=s(e),a=c.slice(0,t);if(n)return Object(o.autop)(i(a,r));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(i(b,r))};t.a=function(e){var t=e.source,n=e.maxLength,s=void 0===n?15:n,i=e.countType,b=void 0===i?"words":i,p=e.className,d=void 0===p?"":p,m=Object(r.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",r=Object(o.autop)(e),s=Object(c.count)(r,n);if(s<=t)return r;var i=a(r),b=Object(c.count)(i,n);return b<=t?i:"words"===n?u(i,t):l(i,t,"characters_including_spaces"===n)}(t,s,b)}),[t,s,b]);return Object(r.createElement)(r.RawHTML,{className:d},m)}},18:function(e,t){!function(){e.exports=this.wp.url}()},185:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(22),a=n.n(o),s=n(25),i=n.n(s),u=n(19),l=n.n(u),b=n(23),p=n.n(b),d=n(24),m=n.n(d),g=n(12),f=n.n(g),O=n(8),h=n.n(O),j=n(0),_=n(9);n(260);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return m()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=v(r);function r(){var e;return a()(this,r),e=n.call(this),h()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),h()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),h()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(_.createRef)(),e}return i()(r,[{key:"render",value:function(){return Object(j.createElement)(_.Fragment,null,Object(j.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(j.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(_.Component);return t.displayName="withScrollToTop",t}},189:function(e,t,n){"use strict";var r=n(22),c=n.n(r),o=n(25),a=n.n(o),s=n(19),i=n.n(s),u=n(23),l=n.n(u),b=n(24),p=n.n(b),d=n(12),m=n.n(d),g=n(8),f=n.n(g),O=n(0),h=(n(2),n(9)),j=n(1),_=n(5),v=function(e){var t=e.imageUrl,n=void 0===t?"".concat(_.U,"img/block-error.svg"):t,r=e.header,c=void 0===r?Object(j.__)("Oops!","woo-gutenberg-products-block"):r,o=e.text,a=void 0===o?Object(j.__)("There was an error loading the content.","woo-gutenberg-products-block"):o,s=e.errorMessage,i=e.errorMessagePrefix,u=void 0===i?Object(j.__)("Error:","woo-gutenberg-products-block"):i;return Object(O.createElement)("div",{className:"wc-block-error wc-block-components-error"},n&&Object(O.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,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),a&&Object(O.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},a),s&&Object(O.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",s)))};n(262);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=y(n);function n(){var e;c()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),f()(i()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,c=e.text,o=e.errorMessagePrefix,a=this.state,s=a.errorMessage;return a.hasError?Object(O.createElement)(v,{errorMessage:r?s:null,header:t,imageUrl:n,text:c,errorMessagePrefix:o}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(O.createElement)(h.Fragment,null,Object(O.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);w.defaultProps={showErrorMessage:!0};t.a=w},191:function(e,t,n){"use strict";n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return h}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=(n(2),n(36)),u=n(303),l=n(944),b=n(140),p=n(212),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var c=n.filter((function(e){return"snackbar"===e.type}));return Object(s.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=Object(s.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),O=function(){return Object(s.useContext)(f)},h=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(i.useDispatch)("core/notices"),m=p.createNotice,O=p.removeNotice,h=Object(s.useState)(!1),j=a()(h,2),_=j[0],v=j[1],y=Object(s.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m(e,t,g(g({},n),{},{context:n.context||b}))}),[m,b]),w=Object(s.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;O(e,t)}),[O,b]),E=Object(s.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,g(g({},t),{},{type:"snackbar"}))}),[y]),k={notices:Object(i.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:y,createSnackbarNotice:E,removeNotice:w,context:b,setIsSuppressed:v},S=_?null:Object(s.createElement)(u.a,{className:r,notices:k.notices}),P=_?null:Object(s.createElement)(d,null);return Object(s.createElement)(f.Provider,{value:k},o&&S,t,P)}},194:function(e,t){},203:function(e,t){},204:function(e,t){},208:function(e,t,n){"use strict";var r=n(22),c=n.n(r),o=n(25),a=n.n(o),s=n(19),i=n.n(s),u=n(23),l=n.n(u),b=n(24),p=n.n(b),d=n(12),m=n.n(d),g=n(8),f=n.n(g),O=n(0),h=n(1),j=n(9),_=n(303),v=(n(2),n(5));function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=y(n);function n(){var e;c()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),f()(i()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.state,t=e.hasError,n=e.errorMessage,r=this.props.isEditor;if(t){var c=Object(h.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(r||v.l)&&(c=n||Object(h.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));var o=[{id:"0",content:c,isDismissible:!1,status:"error"}];return Object(O.createElement)(_.a,{notices:o})}return this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{errorMessage:e.message,hasError:!0}}}]),n}(j.Component);w.defaultProps={isEditor:!1},t.a=w},209:function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(3),u=n(6),l=n(33);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=Object(i.getSetting)("checkoutData",{}),m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},g=Object(u.mapValues)(d.billing_address,(function(e){return Object(l.decodeEntities)(e)})),f=p(p({},m),g),O={billingData:m,setBillingData:function(){return null}};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(s.createContext)(O),v=function(){return Object(s.useContext)(_)},y=function(e){var t=e.children,n=Object(s.useState)(f),r=a()(n,2),c=r[0],o=r[1],i={billingData:c,setBillingData:Object(s.useCallback)((function(e){o((function(t){return j(j({},t),e)}))}),[])};return Object(s.createElement)(_.Provider,{value:i},t)}},210:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c),a=n(193),s=n(8),i=n.n(s),u=n(165),l=function(e){var t,n=e.checked,c=e.name,a=e.onChange,s=e.option,l=s.value,b=s.label,p=s.description,d=s.secondaryLabel,m=s.secondaryDescription;return Object(r.createElement)("label",{className:"wc-block-components-radio-control__option",htmlFor:"".concat(c,"-").concat(l)},Object(r.createElement)("input",{id:"".concat(c,"-").concat(l),className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:function(e){return a(e.target.value)},checked:n,"aria-describedby":o()((t={},i()(t,"".concat(c,"-").concat(l,"__label"),b),i()(t,"".concat(c,"-").concat(l,"__secondary-label"),d),i()(t,"".concat(c,"-").concat(l,"__description"),p),i()(t,"".concat(c,"-").concat(l,"__secondary-description"),m),t))}),Object(r.createElement)(u.a,{id:"".concat(c,"-").concat(l),label:b,secondaryLabel:d,description:p,secondaryDescription:m}))};n(376),t.a=Object(a.a)((function(e){var t=e.className,n=e.instanceId,c=e.id,a=e.selected,s=e.onChange,i=e.options,u=void 0===i?[]:i,b=c||n;return u.length&&Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},u.map((function(e){return Object(r.createElement)(l,{key:e.value,name:"radio-control-".concat(b),checked:e.value===a,option:e,onChange:function(t){s(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))},212:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(0),c=n(36),o=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),a=function(){return Object(r.useContext)(o)},s=function(e){var t=e.children,n=e.currentPostId,a=void 0===n?0:n,s=e.previewData,i=void 0===s?{}:s,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:i};return Object(r.createElement)(o.Provider,{value:u},t)}},233:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(86),o=(n(2),n(240),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!n){var p=l(a)||{};if(!p.message||p.hidden)return null;n=p.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:b(i)},n))})},237:function(e,t){},238:function(e,t){},239:function(e,t){},240:function(e,t){},259:function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),o=n(60),a=n.n(o),s=n(3);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l,b,p={code:s.CURRENCY.code,symbol:s.CURRENCY.symbol,thousandSeparator:s.CURRENCY.thousandSeparator,decimalSeparator:s.CURRENCY.decimalSeparator,minorUnit:s.CURRENCY.precision,prefix:(l=s.CURRENCY.symbol,b=s.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(s.CURRENCY.symbol,s.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,c=e.currency_decimal_separator,o=e.currency_minor_unit,s=e.currency_prefix,i=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(o)?o:2,prefix:"string"==typeof s?s:"$",suffix:"string"==typeof i?i:""}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=m(t),c=n/Math.pow(10,r.minorUnit),o=r.prefix+c+r.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},26:function(e,t){!function(){e.exports=this.wp.compose}()},260:function(e,t){},262:function(e,t){},263:function(e,t){},264:function(e,t){},265:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(11),a=n.n(o),s=n(27),i=n.n(s),u=n(0),l=n(169),b=n(58),p=n(310);n(2);t.a=function(e){var t=e.onChange,n=e.value,r=void 0===n?"":n,o=i()(e,["onChange","value"]),s=Object(u.useState)(r),d=a()(s,2),m=d[0],g=d[1],f=Object(p.a)((function(e){t(e)}),400),O=a()(f,1)[0],h=Object(b.a)(O);return Object(u.useEffect)((function(){h(m)}),[h,m]),Object(u.createElement)(l.a,c()({onChange:g,value:m},o))}},266:function(e,t){},268:function(e,t){!function(){e.exports=this.wp.deprecated}()},269:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(57),u=Object(s.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=a()(e,["className","size"]);return Object(s.createElement)(i.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),Object(s.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=n(284);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(s.cloneElement)(t,{size:e.size||20,className:e.className}):null}},273:function(e,t,n){"use strict";var r=n(51),c=n.n(r),o=n(0),a=n(1),s=n(4),i=n(36),u=n(40);t.a=function(e){var t=e.setPageId,n=e.pageId,r=e.labels,l=Object(i.useSelect)((function(e){return e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})}),[])||null;return l?Object(o.createElement)(s.PanelBody,{title:r.title},Object(o.createElement)(s.SelectControl,{label:Object(a.__)("Link to","woo-gutenberg-products-block"),value:n,options:[{label:r.default,value:0}].concat(c()(l.map((function(e){return{label:Object(u.a)(e,l),value:parseInt(e.id,10)}})))),onChange:function(e){return t(parseInt(e,10))}})):null}},274:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),c=n(1),o=(n(2),n(61)),a=n(305),s=n(167),i=(n(364),function(e){var t=e.text,n=e.url,i=void 0===n?"https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565":n;return Object(r.createElement)("div",{className:"wc-block-feedback-prompt"},Object(r.createElement)(o.a,{srcElement:a.a}),Object(r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(c.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:i,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(c.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(o.a,{srcElement:s.a,size:16})))}),u=function(){return Object(r.createElement)(i,{text:Object(c.__)("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"})}},275:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=n(388),s=n(387),i=n(212),u=n(281),l=n(208);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(){var e=Object(i.b)().isEditor,t=Object(u.b)(),n=t.setActivePaymentMethod,r=t.activePaymentMethod,c=t.paymentMethodData,b=t.setPaymentStatus,d=Object(a.a)(),m=Object(s.a)().paymentMethods,g=Object(o.useRef)(r),f=Object(o.useRef)(c),O=Object(o.useCallback)((function(e){return function(){g.current=r,f.current=c,b().started(),n(e)}}),[r,c,n,b]),h=Object(o.useCallback)((function(){n(g.current),f.current.isSavedToken&&b().success(f.current)}),[n,b]),j=Object.keys(m),_=j.length>0?j.map((function(t){var n=e?m[t].edit:m[t].content;return Object(o.isValidElement)(n)?Object(o.createElement)("li",{key:t,id:"express-payment-method-".concat(t)},Object(o.cloneElement)(n,p(p({},d),{},{onClick:O(t),onClose:h}))):null})):Object(o.createElement)("li",{key:"noneRegistered"},"No registered Payment Methods");return Object(o.createElement)(l.a,{isEditor:e},Object(o.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},_))}},277:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=(n(2),n(7)),u=n.n(i),l=n(1),b=n(61),p=n(284),d=(n(203),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,o=e.element,i=void 0===o?"li":o,l=e.className,b=void 0===l?"":l,p=e.radius,d=void 0===p?"small":p,m=e.children,g=void 0===m?null:m,f=a()(e,["text","screenReaderText","element","className","radius","children"]),O=i,h=u()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+d),j=Boolean(r&&r!==t);return Object(s.createElement)(O,c()({className:h},f),Object(s.createElement)("span",{"aria-hidden":j,className:"wc-block-components-chip__text"},t),j&&Object(s.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,o=void 0===r?"":r,i=e.disabled,m=void 0!==i&&i,g=e.onRemove,f=void 0===g?function(){}:g,O=e.removeOnAnyClick,h=void 0!==O&&O,j=e.text,_=e.screenReaderText,v=void 0===_?"":_,y=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=h?"span":"button";if(!n){var E=v&&"string"==typeof v?v:j;n="string"!=typeof E?Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var k={"aria-label":n,disabled:m,onClick:f,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||f()}},S=h?k:{},P=h?{"aria-hidden":!0}:k;return Object(s.createElement)(d,c()({},y,S,{className:u()(o,"is-removable"),element:h?"button":y.element,screenReaderText:v,text:j}),Object(s.createElement)(w,c()({className:"wc-block-components-chip__remove"},P),Object(s.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},281:function(e,t,n){"use strict";n.d(t,"b",(function(){return je})),n.d(t,"a",(function(){return _e}));var r=n(51),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(3),u=n(395),l=n(140),b=n(212),p=n(8),d=n.n(p);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){d()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},O=g(g({},f),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),h={currentStatus:f.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},j={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:f,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},_=n(60),v=n.n(_);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){d()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=O.STARTED,k=O.ERROR,S=O.FAILED,P=O.SUCCESS,C=O.PROCESSING,N=O.PRISTINE,R=O.COMPLETE,x=O.SET_REGISTERED_PAYMENT_METHODS,M=O.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,D=O.SET_SHOULD_SAVE_PAYMENT_METHOD,T=function(e){return!("object"!==v()(e)||!e.isSavedToken)},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.paymentMethodData,c=t.shouldSavePaymentMethod,o=t.errorMessage,a=t.paymentMethods;switch(n){case E:return e.currentStatus!==E?w(w({},e),{},{currentStatus:E}):e;case k:return e.currentStatus!==k?w(w({},e),{},{currentStatus:k,errorMessage:o||e.errorMessage}):e;case S:return e.currentStatus!==S?w(w({},e),{},{currentStatus:S,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}):e;case P:return e.currentStatus!==P?w(w({},e),{},{currentStatus:P,paymentMethodData:r||e.paymentMethodData,hasSavedToken:T(r)}):e;case C:return e.currentStatus!==C?w(w({},e),{},{currentStatus:C,errorMessage:""}):e;case R:return e.currentStatus!==R?w(w({},e),{},{currentStatus:R}):e;case N:return w(w({},h),{},{currentStatus:N,paymentMethods:w({},e.paymentMethods),expressPaymentMethods:w({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case x:return w(w({},e),{},{paymentMethods:a});case M:return w(w({},e),{},{expressPaymentMethods:w(w({},e.expressPaymentMethods),a)});case D:return w(w({},e),{},{shouldSavePaymentMethod:c})}return e},A=O.ERROR,L=O.FAILED,F=O.SUCCESS,U=O.SET_REGISTERED_PAYMENT_METHODS,B=O.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,V=O.SET_SHOULD_SAVE_PAYMENT_METHOD,q=function(e){return{type:e}},z=function(e){var t=e.errorMessage,n=e.paymentMethodData;return{type:L,errorMessage:t,paymentMethodData:n}},H=function(e){var t=e.paymentMethodData;return{type:F,paymentMethodData:t}},Y=n(15),G=n.n(Y),W=n(37),$=n.n(W),K=n(1),X=n(56),Z=n(156),Q=n(58),J=n(134),ee=n(5);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){d()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e,t,n,r){var c=Object(s.useState)(!1),o=a()(c,2),i=o[0],u=o[1],p=Object(b.b)().isEditor,m=Object(Z.b)(),g=m.selectedRates,f=m.shippingAddress,O=Object(Q.a)(g),h=Object(Q.a)(n),j=Object(J.a)(),_=j.cartTotals,v=j.cartNeedsShipping,y=Object(s.useRef)({cartTotals:_,cartNeedsShipping:v,shippingAddress:f,selectedShippingMethods:O}),w=Object(l.a)().addErrorNotice;Object(s.useEffect)((function(){y.current={cartTotals:_,cartNeedsShipping:v,shippingAddress:f,selectedShippingMethods:O}}),[_,v,f,O]);var E=Object(s.useCallback)($()(G.a.mark((function n(){var c,o,a,s,i,l,b;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:c={},o=function(e){c=ne(ne({},c),{},d()({},e.name,e))},a=0;case 3:if(!(a<h.length)){n.next=24;break}if(s=h[a],i=t[s]){n.next=8;break}return n.abrupt("continue",21);case 8:return n.prev=8,n.next=11,Promise.resolve(i.canMakePayment(y.current));case 11:if(!(l=n.sent)){n.next=16;break}if(!l.error){n.next=15;break}throw new Error(l.error.message);case 15:o(i);case 16:n.next=21;break;case 18:n.prev=18,n.t0=n.catch(8),(ee.l||p)&&(b=Object(K.sprintf)(Object(K.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),i.paymentMethodId),w("".concat(b," ").concat(n.t0),{context:r,id:"wc-".concat(i.paymentMethodId,"-registration-error")}));case 21:a++,n.next=3;break;case 24:e(c),u(!0);case 26:case"end":return n.stop()}}),n,null,[[8,18]])}))),[w,e,p,r,h,t]);return Object(s.useEffect)((function(){E()}),[E,O]),i},ce=n(209),oe=n(170),ae=n(150),se=n(396),ie="payment_processing",ue=n(397),le=n(86),be=f.STARTED,pe=f.PROCESSING,de=f.COMPLETE,me=f.PRISTINE,ge=f.ERROR,fe=f.FAILED,Oe=f.SUCCESS,he=Object(s.createContext)(j),je=function(){return Object(s.useContext)(he)},_e=function(e){var t=e.children,n=Object(ce.b)().setBillingData,r=Object(oe.b)(),o=r.isProcessing,p=r.isIdle,d=r.isCalculating,m=r.hasError,g=Object(u.a)(),O=g.isSuccessResponse,j=g.isErrorResponse,_=g.isFailResponse,v=g.noticeContexts,y=Object(s.useState)(""),w=a()(y,2),E=w[0],k=w[1],S=Object(s.useReducer)(ae.b,{}),P=a()(S,2),C=P[0],N=P[1],R=Object(s.useRef)(C),x=Object(b.b)(),M=x.isEditor,D=x.previewData,T=Object(s.useReducer)(I,h),L=a()(T,2),F=L[0],Y=L[1],G=Object(s.useCallback)((function(e){k(e),Y(q(me))}),[k,Y]),W=Object(s.useCallback)((function(e){Y(function(e){return{type:U,paymentMethods:e}}(e))}),[Y]),$=Object(s.useCallback)((function(e){Y(function(e){return{type:B,paymentMethods:e}}(e))}),[Y]),K=function(e){var t=Object(X.getPaymentMethods)(),n=Object(u.a)().noticeContexts,r=new Set([].concat(c()(ee.F),c()(Object.keys(t))));return re(e,t,Array.from(r),n.PAYMENTS)}(W),Q=function(e){var t=Object(X.getExpressPaymentMethods)(),n=Object(u.a)().noticeContexts;return re(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}($),J=Object(le.b)().setValidationErrors,te=Object(l.a)(),ne=te.addErrorNotice,je=te.removeNotice,_e=Object(Z.b)().setShippingAddress,ve=Object(s.useCallback)((function(e){Y({type:V,shouldSavePaymentMethod:e})}),[Y]),ye=Object(s.useMemo)((function(){return M&&D.previewSavedPaymentMethods?D.previewSavedPaymentMethods:K&&0!==F.paymentMethods.length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(i.getSetting)("customerPaymentMethods",{}),n=Object.keys(t);if(0===n.length)return{};var r={};return n.forEach((function(n){r[n]=t[n].filter((function(t){return Object.keys(e).includes(t.method.gateway)}))})),r}(F.paymentMethods):{}}),[M,D.previewSavedPaymentMethods,K,F.paymentMethods]),we=Object(s.useCallback)((function(e){e?ne(e,{context:v.EXPRESS_PAYMENTS,id:"wc-express-payment-error"}):je("wc-express-payment-error",v.EXPRESS_PAYMENTS)}),[ne,v.EXPRESS_PAYMENTS,je]);Object(s.useEffect)((function(){R.current=C}),[C]);var Ee=Object(s.useMemo)((function(){return(e=N,{onPaymentProcessing:Object(se.a)(ie,e)}).onPaymentProcessing;var e}),[N]),ke=Object(s.useMemo)((function(){return{isPristine:F.currentStatus===me,isStarted:F.currentStatus===be,isProcessing:F.currentStatus===pe,isFinished:[ge,fe,Oe].includes(F.currentStatus),hasError:F.currentStatus===ge,hasFailed:F.currentStatus===fe,isSuccessful:F.currentStatus===Oe}}),[F.currentStatus]),Se=Object(s.useCallback)((function(){return{started:function(){return Y(q(be))},processing:function(){return Y(q(pe))},completed:function(){return Y(q(de))},error:function(e){return Y(function(e){return{type:A,errorMessage:e}}(e))},failed:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r&&n(r),Y(z({errorMessage:e,paymentMethodData:t}))},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&n(t),null!==r&&(null==r?void 0:r.address)&&_e(r.address),Y(H({paymentMethodData:e}))}}}),[Y,n,_e]);Object(s.useEffect)((function(){!o||m||d||ke.isFinished||Se().processing()}),[o,m,d,ke.isFinished,Se]),Object(s.useEffect)((function(){p&&!ke.isSuccessful&&Y(q(me))}),[p,ke.isSuccessful]),Object(s.useEffect)((function(){m&&ke.isSuccessful&&!F.hasSavedToken&&Y(q(me))}),[m,ke.isSuccessful,F.hasSavedToken]),Object(s.useEffect)((function(){var e=Object.keys(F.paymentMethods),t=[].concat(c()(e),c()(Object.keys(F.expressPaymentMethods)));K&&e.length&&k((function(e){return e&&t.includes(e)?e:(Y(q(me)),Object.keys(F.paymentMethods)[0])}))}),[K,F.paymentMethods,F.expressPaymentMethods,k]),Object(s.useEffect)((function(){ke.isProcessing&&(je("wc-payment-error",v.PAYMENTS),Object(ue.b)(R.current,ie,{}).then((function(e){var t,n,r;if(O(e))Se().success(null==e||null===(t=e.meta)||void 0===t?void 0:t.paymentMethodData,null==e||null===(n=e.meta)||void 0===n?void 0:n.billingData,null==e||null===(r=e.meta)||void 0===r?void 0:r.shippingData);else if(_(e)){var c,o;e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||v.PAYMENTS}),Se().failed(null==e?void 0:e.message,null==e||null===(c=e.meta)||void 0===c?void 0:c.paymentMethodData,null==e||null===(o=e.meta)||void 0===o?void 0:o.billingData)}else j(e)?(e.message&&e.message.length&&ne(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||v.PAYMENTS}),Se().error(e.message),J(null==e?void 0:e.validationErrors)):Se().success()})))}),[ke.isProcessing,J,Se,je,v.PAYMENTS,O,_,j,ne]);var Pe={setPaymentStatus:Se,currentStatus:ke,paymentStatuses:f,paymentMethodData:F.paymentMethodData,errorMessage:F.errorMessage,activePaymentMethod:E,setActivePaymentMethod:G,onPaymentProcessing:Ee,customerPaymentMethods:ye,paymentMethods:F.paymentMethods,expressPaymentMethods:F.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:Q,setExpressPaymentError:we,shouldSavePayment:F.shouldSavePaymentMethod,setShouldSavePayment:ve};return Object(s.createElement)(he.Provider,{value:Pe},t)}},284:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(57),u=Object(s.createElement)((function(e){var t=e.className,n=e.size,r=a()(e,["className","size"]);return Object(s.createElement)(i.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(s.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},303:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(0),a=(n(2),n(7)),s=n.n(a),i=n(390),u=n(191),l=(n(238),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,a=n.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=s()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(i.a,c()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},305:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{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:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=o},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},36:function(e,t){!function(){e.exports=this.wp.data}()},362:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{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:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},364:function(e,t){},365:function(e,t){},366:function(e,t){},367:function(e,t){},368:function(e,t){},369:function(e,t){},370:function(e,t){},371:function(e,t){},372:function(e,t){},373:function(e,t){},374:function(e,t){},375:function(e,t){},376:function(e,t){},377:function(e,t){},378:function(e,t){},379:function(e,t){},380:function(e,t){},381:function(e,t){},382:function(e,t){},383:function(e,t){},387:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(281),c=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(r.b)(),n=t.paymentMethods,c=t.expressPaymentMethods,o=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized;return e?{paymentMethods:c,isInitialized:a}:{paymentMethods:n,isInitialized:o}},o=function(){return c()},a=function(){return c(!0)}},388:function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r=n(170),c=n(281),o=n(156),a=n(209),s=n(1),i=n(259),u=n(0),l=n(5),b=n(233),p=n(395),d=n(917),m=n(7),g=n.n(m),f=n(57),O=Object(u.createElement)(f.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(u.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),h=n(362),j=n(882),_=Object(u.createElement)(f.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(u.createElement)("path",{d:"M0 0h24v24H0z"}),Object(u.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(u.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"}))),v=n(61),y=(n(383),{bank:O,bill:h.a,card:j.a,checkPayment:_}),w=function(e){var t=e.icon,n=void 0===t?"":t,r=e.text,c=void 0===r?"":r,o=!!n,a=o&&"string"==typeof n&&y[n],s=g()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return Object(u.createElement)("span",{className:s},a?Object(u.createElement)(v.a,{srcElement:y[n]}):n,c)},E=n(134),k=n(866),S=function(e,t){var n=[],r=function(t,n){var r=parseInt(e[n],10);return{label:t,value:r,valueWithTax:r+parseInt(e[n+"_tax"],10)}};return n.push(r(Object(s.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(r(Object(s.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(r(Object(s.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({label:Object(s.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(r(Object(s.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},P=function(){var e=Object(r.b)(),t=e.isCalculating,n=e.isComplete,m=e.isIdle,g=e.isProcessing,f=e.onCheckoutAfterProcessingWithSuccess,O=e.onCheckoutAfterProcessingWithError,h=e.onCheckoutBeforeProcessing,j=e.onSubmit,_=e.customerId,v=Object(c.b)(),y=v.currentStatus,P=v.activePaymentMethod,C=v.onPaymentProcessing,N=v.setExpressPaymentError,R=Object(o.b)(),x=R.shippingErrorStatus,M=R.shippingErrorTypes,D=R.shippingRates,T=R.shippingRatesLoading,I=R.selectedRates,A=R.setSelectedRates,L=R.isSelectingRate,F=R.shippingAddress,U=R.setShippingAddress,B=R.onShippingRateSuccess,V=R.onShippingRateFail,q=R.onShippingRateSelectSuccess,z=R.onShippingRateSelectFail,H=R.needsShipping,Y=Object(a.b)().billingData,G=Object(E.a)().cartTotals,W=Object(k.a)().appliedCoupons,$=Object(p.a)(),K=$.noticeContexts,X=$.responseTypes,Z=Object(u.useRef)(S(G,H)),Q=Object(u.useRef)({label:Object(s.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)});return Object(u.useEffect)((function(){Z.current=S(G,H),Q.current={label:Object(s.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)}}),[G,H]),{checkoutStatus:{isCalculating:t,isComplete:n,isIdle:m,isProcessing:g},paymentStatus:y,shippingStatus:{shippingErrorStatus:x,shippingErrorTypes:M},shippingData:{shippingRates:D,shippingRatesLoading:T,selectedRates:I,setSelectedRates:A,isSelectingRate:L,shippingAddress:F,setShippingAddress:U,needsShipping:H},billing:{billingData:Y,cartTotal:Q.current,currency:Object(i.c)(G),cartTotalItems:Z.current,displayPricesIncludingTax:l.p,appliedCoupons:W,customerId:_},eventRegistration:{onCheckoutAfterProcessingWithSuccess:f,onCheckoutAfterProcessingWithError:O,onCheckoutBeforeProcessing:h,onShippingRateSuccess:B,onShippingRateFail:V,onShippingRateSelectSuccess:q,onShippingRateSelectFail:z,onPaymentProcessing:C},components:{ValidationInputError:b.a,PaymentMethodIcons:d.a,PaymentMethodLabel:w},emitResponse:{noticeContexts:K,responseTypes:X},onSubmit:j,activePaymentMethod:P,setExpressPaymentError:N}}},389:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return b}));var r=n(11),c=n.n(r),o=n(0),a=(n(2),n(938)),s=n(7),i=n.n(s),u=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=function(){return Object(o.useContext)(u)},b=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,s=function(){var e=Object(a.a)(),t=c()(e,2),n=t[0],r=t[1].width,o="";return r>700?o="is-large":r>520?o="is-medium":r>400?o="is-small":r&&(o="is-mobile"),[n,o]}(),l=c()(s,2),b=l[0],p=l[1],d={hasContainerWidth:""!==p,containerClassName:p,isMobile:"is-mobile"===p,isSmall:"is-small"===p,isMedium:"is-medium"===p,isLarge:"is-large"===p};return Object(o.createElement)(u.Provider,{value:d},Object(o.createElement)("div",{className:i()(r,p)},b,t))}},395:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return r(e,c.SUCCESS)},s=function(e){return r(e,c.ERROR)},i=function(e){return r(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},396:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(150),c=function(e,t){return function(n){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=r.a.addEventCallback(e,n,c);return t(o),function(){t(r.a.removeEventCallback(e,o.id))}}}},397:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return d}));var r=n(15),c=n.n(r),o=n(60),a=n.n(o),s=n(37),i=n.n(s);function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,c=function(){};return{s:c,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=i()(c.a.mark((function e(t,n,r){var o,s,i,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,n),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(r));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,n,r){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,n,r){var o,s,i,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,n),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(r));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,n,r){return e.apply(this,arguments)}}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,n){"use strict";n.d(t,"h",(function(){return p})),n.d(t,"e",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"i",(function(){return g})),n.d(t,"f",(function(){return f})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return h})),n.d(t,"g",(function(){return j})),n.d(t,"a",(function(){return _}));var r=n(8),c=n.n(r),o=n(18),a=n(13),s=n.n(a),i=n(6),u=n(5);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,c=void 0===r?"":r,a=e.queryArgs,l=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,c=void 0===r?"":r,a=e.queryArgs,s=void 0===a?[]:a,i={per_page:u.v?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},i),s))];return u.v&&n.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:n})),l}({selected:n,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return s()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},d=function(e){return s()({path:"/wc/store/products/".concat(e)})},m=function(){return s()({path:"wc/store/products/attributes"})},g=function(e){return s()({path:"wc/store/products/attributes/".concat(e,"/terms")})},f=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,r=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.y?100:0,orderby:u.y?"count":"name",order:u.y?"desc":"asc",search:r})];return u.y&&n.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:n})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map((function(e){return s()({path:e})}))).then((function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")}))},O=function(e){return s()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},h=function(e){return s()({path:"wc/store/products/categories/".concat(e)})},j=function(e){return s()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},_=function(e,t){if(!e.title.raw)return e.slug;var n=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(n?"":" - ".concat(e.slug))}},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},43:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=(n(2),n(9)),s=n(7),i=n.n(s);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,s=e.wrapperProps,u=void 0===s?{}:s,b=null!=n,p=null!=r;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:i()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,r)):(t=c||a.Fragment,b&&p&&n!==r?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,u,n))}},5:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"K",(function(){return o})),n.d(t,"Q",(function(){return a})),n.d(t,"A",(function(){return s})),n.d(t,"C",(function(){return i})),n.d(t,"m",(function(){return u})),n.d(t,"B",(function(){return l})),n.d(t,"E",(function(){return b})),n.d(t,"o",(function(){return p})),n.d(t,"D",(function(){return d})),n.d(t,"n",(function(){return m})),n.d(t,"G",(function(){return g})),n.d(t,"v",(function(){return f})),n.d(t,"y",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"u",(function(){return _})),n.d(t,"k",(function(){return v})),n.d(t,"M",(function(){return y})),n.d(t,"R",(function(){return w})),n.d(t,"q",(function(){return E})),n.d(t,"r",(function(){return k})),n.d(t,"p",(function(){return S})),n.d(t,"J",(function(){return P})),n.d(t,"c",(function(){return C})),n.d(t,"w",(function(){return N})),n.d(t,"x",(function(){return R})),n.d(t,"U",(function(){return M})),n.d(t,"V",(function(){return D})),n.d(t,"L",(function(){return T})),n.d(t,"a",(function(){return I})),n.d(t,"O",(function(){return A})),n.d(t,"b",(function(){return L})),n.d(t,"N",(function(){return F})),n.d(t,"F",(function(){return U})),n.d(t,"i",(function(){return B})),n.d(t,"P",(function(){return z})),n.d(t,"h",(function(){return H})),n.d(t,"j",(function(){return Y})),n.d(t,"I",(function(){return G})),n.d(t,"H",(function(){return W})),n.d(t,"T",(function(){return $})),n.d(t,"S",(function(){return K})),n.d(t,"d",(function(){return X})),n.d(t,"e",(function(){return Z})),n.d(t,"f",(function(){return Q})),n.d(t,"g",(function(){return J})),n.d(t,"z",(function(){return ee})),n.d(t,"Y",(function(){return ne})),n.d(t,"Z",(function(){return re})),n.d(t,"W",(function(){return ce})),n.d(t,"X",(function(){return oe}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),a=Object(r.getSetting)("showAvatars",!0),s=Object(r.getSetting)("max_columns",6),i=Object(r.getSetting)("min_columns",1),u=Object(r.getSetting)("default_columns",3),l=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),p=Object(r.getSetting)("default_rows",3),d=Object(r.getSetting)("min_height",500),m=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),f=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),O=Object(r.getSetting)("limitTags"),h=Object(r.getSetting)("hasProducts",!0),j=Object(r.getSetting)("hasTags",!0),_=Object(r.getSetting)("homeUrl",""),v=Object(r.getSetting)("couponsEnabled",!0),y=Object(r.getSetting)("shippingEnabled",!0),w=Object(r.getSetting)("taxesEnabled",!0),E=Object(r.getSetting)("displayItemizedTaxes",!1),k=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),S=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),N=Object(r.getSetting)("isShippingCalculatorEnabled",!0),R=Object(r.getSetting)("isShippingCostHidden",!1),x=Object(r.getSetting)("woocommerceBlocksPhase",1),M=Object(r.getSetting)("wcBlocksAssetUrl",""),D=Object(r.getSetting)("wcBlocksBuildUrl",""),T=Object(r.getSetting)("shippingCountries",{}),I=Object(r.getSetting)("allowedCountries",{}),A=Object(r.getSetting)("shippingStates",{}),L=Object(r.getSetting)("allowedStates",{}),F=Object(r.getSetting)("shippingMethodsExist",!1),U=Object(r.getSetting)("paymentGatewaySortOrder",[]),B=Object(r.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},q=Object(r.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),z=q.shop.permalink,H=q.checkout.id,Y=q.checkout.permalink,G=q.privacy.permalink,W=q.privacy.title,$=q.terms.permalink,K=q.terms.title,X=q.cart.id,Z=q.cart.permalink,Q=Object(r.getSetting)("checkoutAllowsGuest",!1),J=Object(r.getSetting)("checkoutAllowsSignup",!1),ee=Object(r.getSetting)("loginUrl","/wp-login.php"),te=n(17),ne=function(e,t){if(x>2)return Object(te.registerBlockType)(e,t)},re=function(e,t){if(x>1)return Object(te.registerBlockType)(e,t)},ce=function(){return x>2},oe=function(){return x>1}},54:function(e,t){!function(){e.exports=this.wp.keycodes}()},543:function(e,t){},544:function(e,t){},55:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(8),a=n.n(o),s=n(27),i=n.n(s),u=n(0),l=n(184),b=n(7),p=n.n(b);n(194);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.className,n=e.value,r=e.currency,o=e.onValueChange,a=i()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var s=n/Math.pow(10,r.minorUnit);if(!Number.isFinite(s))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=m(m(m({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(r)),{},{value:void 0,currency:void 0,onValueChange:void 0}),g=o?function(e){var t=e.value*Math.pow(10,r.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:s,onValueChange:g}))}},56:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},563:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},58:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),c=n(43),o=n.n(c),a=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(27),a=n.n(o),s=n(9);n(2);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=a()(e,["srcElement","size"]);return Object(s.isValidElement)(t)&&Object(s.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))}},65:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(7)),o=n.n(c),a=n(55);n(371);t.a=function(e){var t=e.className,n=e.currency,c=e.label,s=e.value,i=e.description;return Object(r.createElement)("div",{className:o()("wc-block-components-totals-item",t)},Object(r.createElement)("span",{className:"wc-block-components-totals-item__label"},c),Object(r.isValidElement)(s)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},s):Object(r.createElement)(a.a,{className:"wc-block-components-totals-item__value",currency:n,displayType:"text",value:s}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},i))}},78:function(e,t){!function(){e.exports=this.wp.dom}()},86:function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(0),i=n(6),u=n(43),l=n.n(u);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=Object(s.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),m=function(){return Object(s.useContext)(d)},g=function(e){var t=e.children,n=Object(s.useState)({}),r=a()(n,2),o=r[0],u=r[1],b=Object(s.useCallback)((function(e){return o[e]}),[o]),m=Object(s.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),g=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),f=Object(s.useCallback)((function(){u({})}),[]),O=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,n){return"string"==typeof e.message&&(!t.hasOwnProperty(n)||!l()(t[n],e))})),0===Object.values(e).length?t:p(p({},t),e)}))}),[]),h=Object(s.useCallback)((function(e,t){u((function(n){if(!n.hasOwnProperty(e))return n;var r=p(p({},n[e]),t);return l()(n[e],r)?n:p(p({},n),{},c()({},e,r))}))}),[]),j={getValidationError:b,setValidationErrors:O,clearValidationError:g,clearAllValidationErrors:f,hideValidationError:Object(s.useCallback)((function(e){h(e,{hidden:!0})}),[h]),showValidationError:Object(s.useCallback)((function(e){h(e,{hidden:!1})}),[h]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(n){e[n].hidden&&(t[n]=p(p({},e[n]),{},{hidden:!1}))})),0===Object.values(t).length?e:p(p({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:m};return Object(s.createElement)(d.Provider,{value:j},t)}},864:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(8),c=n.n(r),o=n(11),a=n.n(o),s=n(36),i=n(0),u=n(41),l=n(155);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t=Object(l.a)(),n=Object(i.useMemo)((function(){return e.map((function(e){var t;return[e.package_id,null===(t=e.shipping_rates.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id]})).reduce((function(e,t){var n=a()(t,2),r=n[0],c=n[1];return c&&(e[r]=c),e}),{})}),[e]),r=Object(i.useState)(n),o=a()(r,2),b=o[0],d=o[1];Object(i.useEffect)((function(){d(n)}),[n]);var m=Object(s.useDispatch)(u.CART_STORE_KEY).selectShippingRate,g=Object(s.useSelect)((function(e){return e(u.CART_STORE_KEY).isShippingRateBeingSelected()}),[]);return{selectShippingRate:function(e,n){d(p(p({},b),{},c()({},n,e))),m(e,n).catch((function(e){t(e)}))},selectedShippingRates:b,isSelectingRate:g}}},866:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(8),c=n.n(r),o=n(1),a=n(36),s=n(41),i=n(86),u=n(33),l=n(134),b=n(140);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var d=function(){var e=Object(l.a)(),t=e.cartCoupons,n=e.cartIsLoading,r=Object(b.a)(),d=r.addErrorNotice,m=r.addSnackbarNotice,g=Object(i.b)().setValidationErrors;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({appliedCoupons:t,isLoading:n},Object(a.useSelect)((function(e,t){var n=t.dispatch,r=e(s.CART_STORE_KEY),c=r.isApplyingCoupon(),a=r.isRemovingCoupon(),i=n(s.CART_STORE_KEY),l=i.applyCoupon,b=i.removeCoupon,p=i.receiveApplyingCoupon;return{applyCoupon:function(e){l(e).then((function(t){!0===t&&m(Object(o.sprintf)(Object(o.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){g({coupon:{message:Object(u.decodeEntities)(e.message),hidden:!1}}),p("")}))},removeCoupon:function(e){b(e).then((function(t){!0===t&&m(Object(o.sprintf)(Object(o.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){d(e.message,{id:"coupon-form"}),p("")}))},isApplyingCoupon:c,isRemovingCoupon:a}}),[d,m]))}},867:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c),a=(n(2),n(389));n(366);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",n)},t)}},868:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c);n(2);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)("div",{className:o()("wc-block-components-main",n)},t)}},869:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(0),a=n(33),s=n(5);n(2);t.a=function(e){var t=e.image,n=void 0===t?{}:t,r={src:n.thumbnail||s.G,alt:Object(a.decodeEntities)(n.alt)||""};return Object(o.createElement)("img",c()({},r,{alt:r.alt}))}},87:function(e,t){!function(){e.exports=this.wp.a11y}()},870:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(33));n(368);t.a=function(e){var t=e.name,n=e.permalink,o=e.disabled,a=void 0!==o&&o;return Object(r.createElement)("a",{className:"wc-block-components-product-name",href:n,tabIndex:a?-1:0},Object(c.decodeEntities)(t))}},871:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(153);t.a=function(){return Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(c.__)("Available on backorder","woo-gutenberg-products-block"))}},872:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(153));t.a=function(e){var t=e.lowStockRemaining;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(c.sprintf)(Object(c.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},874:function(e,t,n){"use strict";var r=n(0),c=n(7),o=n.n(c);n(2);t.a=function(e){var t=e.children,n=e.className;return Object(r.createElement)("div",{className:o()("wc-block-components-sidebar",n)},t)}},875:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=(n(2),n(65));t.a=function(e){var t=e.currency,n=e.values,s=n.total_items,i=n.total_items_tax,u=parseInt(s,10),l=parseInt(i,10);return Object(r.createElement)(a.a,{currency:t,label:Object(c.__)("Subtotal","woo-gutenberg-products-block"),value:o.p?u+l:u})}},876:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=n(156),s=(n(2),n(65));t.a=function(e){var t=e.currency,n=e.values;if(!Object(a.b)().needsShipping)return null;var i=n.total_fees,u=n.total_fees_tax,l=parseInt(i,10);if(!l)return null;var b=parseInt(u,10);return Object(r.createElement)(s.a,{className:"wc-block-components-totals-fees",currency:t,label:Object(c.__)("Fees","woo-gutenberg-products-block"),value:o.p?l+b:l})}},877:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=n(125),s=n(277),i=(n(2),n(65));n(372);t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,u=e.currency,l=e.isRemovingCoupon,b=e.removeCoupon,p=e.values,d=p.total_discount,m=p.total_discount_tax,g=parseInt(d,10);if(!g&&0===n.length)return null;var f=parseInt(m,10),O=o.p?g+f:g;return Object(r.createElement)(i.a,{className:"wc-block-components-totals-discount",currency:u,description:0!==n.length&&Object(r.createElement)(a.a,{screenReaderLabel:Object(c.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:l,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},n.map((function(e){return Object(r.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,screenReaderText:Object(c.sprintf)(Object(c.__)("Coupon: %s","woo-gutenberg-products-block"),e.code),disabled:l,onRemove:function(){b(e.code)},radius:"large",ariaLabel:Object(c.sprintf)(Object(c.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.code)})})))),label:O?Object(c.__)("Discount","woo-gutenberg-products-block"):Object(c.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},878:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c}));var r=function(e){return e.length},c=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},879:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(5)),a=n(65);n(378);t.a=function(e){var t=e.currency,n=e.values,s=n.total_tax,i=n.tax_lines;return o.R?o.q?Object(r.createElement)(r.Fragment,null,i.map((function(e,n){var c=e.name,o=e.price;return Object(r.createElement)(a.a,{key:"tax-line-".concat(n),className:"wc-block-components-totals-taxes",currency:t,label:c,value:parseInt(o,10)})}))," "):Object(r.createElement)(a.a,{className:"wc-block-components-totals-taxes",currency:t,label:Object(c.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(s,10)}):null}},880:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(1),s=n(99),i=n(169),u=n(48),l=n(233),b=n(125),p=(n(2),n(193)),d=n(86),m=n(154);n(379);t.a=Object(p.a)((function(e){var t=e.instanceId,n=e.isLoading,r=void 0!==n&&n,p=e.initialOpen,g=void 0!==p&&p,f=e.onSubmit,O=void 0===f?function(){}:f,h=Object(o.useState)(""),j=c()(h,2),_=j[0],v=j[1],y=Object(o.useRef)(!1),w=Object(d.b)(),E=w.getValidationError,k=w.getValidationErrorId,S=E("coupon");Object(o.useEffect)((function(){y.current!==r&&(r||!_||S||v(""),y.current=r)}),[r,_,S]);var P="wc-block-components-totals-coupon__input-".concat(t);return Object(o.createElement)(m.a,{className:"wc-block-components-totals-coupon",hasBorder:!0,initialOpen:g,title:Object(o.createElement)(u.a,{label:Object(a.__)("Coupon Code?","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Introduce Coupon Code","woo-gutenberg-products-block"),htmlFor:P}),titleTag:"h2"},Object(o.createElement)(b.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:r,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)(i.a,{id:P,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:_,ariaDescribedBy:k(P),onChange:function(e){v(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(o.createElement)(s.a,{className:"wc-block-components-totals-coupon__button",disabled:r||!_,showSpinner:r,onClick:function(e){e.preventDefault(),O(_)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(o.createElement)(l.a,{propertyName:"coupon",elementId:P}))))}))},881:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(5),a=n(192),s=n(55),i=(n(2),n(65)),u=(n(380),o.R&&o.p);t.a=function(e){var t=e.currency,n=e.values,o=n.total_price,l=n.total_tax;return Object(r.createElement)(i.a,{className:"wc-block-components-totals-footer-item",currency:t,label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(o,10),description:u&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(a.a)(Object(c.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,displayType:"text",value:parseInt(l,10)})}))})}},882:function(e,t,n){"use strict";var r=n(0),c=n(57),o=Object(r.createElement)(c.a,{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:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},885:function(e,t,n){e.exports=n(900)},886:function(e,t){},887:function(e,t){},888:function(e,t){},889:function(e,t){},890:function(e,t){},891:function(e,t){},892:function(e,t){},893:function(e,t){},894:function(e,t){},895:function(e,t){},896:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()},900:function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(1),o=n(61),a=n(882),s=n(7),i=n.n(s),u=n(5),l=n(274),b=n(14),p=n(4),d=n(189),m=n(3),g=n(192),f=n(212),O=n(191),h=n(273),j=n(928),_={cc:[{method:{gateway:"stripe",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]},v=n(57),y=Object(r.createElement)(v.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},Object(r.createElement)("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"})),w=(n(894),function(e){var t=e.link;return Object(r.createElement)("a",{href:t||u.e,className:"wc-block-components-checkout-return-to-cart-button"},Object(r.createElement)(o.a,{srcElement:y}),Object(c.__)("Return to Cart","woo-gutenberg-products-block"))}),E=n(170),k=n(281),S=n(387),P=n(563),C=n(99),N=function(){var e=function(){var e=Object(E.b)(),t=e.onSubmit,n=e.isCalculating,r=e.isBeforeProcessing,o=e.isProcessing,a=e.isAfterProcessing,s=e.isComplete,i=e.hasError,u=Object(S.b)().paymentMethods[Object(k.b)().activePaymentMethod]||{};return{submitButtonText:(null==u?void 0:u.placeOrderButtonLabel)||Object(c.__)("Place Order","woo-gutenberg-products-block"),onSubmit:t,isCalculating:n,waitingForProcessing:o||a||r,waitingForRedirect:s&&!i}}(),t=e.submitButtonText,n=e.onSubmit,a=e.isCalculating,s=e.waitingForProcessing,i=e.waitingForRedirect;return Object(r.createElement)(C.a,{className:"wc-block-components-checkout-place-order-button",onClick:n,disabled:a||s||i,showSpinner:s},i?Object(r.createElement)(o.a,{srcElement:P.a,alt:Object(c.__)("Done","woo-gutenberg-products-block")}):t)},R=n(33),x=(n(895),function(){return Object(r.createElement)("ul",{className:"wc-block-components-checkout-policies"},u.I&&Object(r.createElement)("li",{className:"wc-block-components-checkout-policies__item"},Object(r.createElement)("a",{href:u.I,target:"_blank",rel:"noopener noreferrer"},u.H?Object(R.decodeEntities)(u.H):Object(c.__)("Privacy Policy","woo-gutenberg-products-block"))),u.T&&Object(r.createElement)("li",{className:"wc-block-components-checkout-policies__item"},Object(r.createElement)("a",{href:u.T,target:"_blank",rel:"noopener noreferrer"},u.S?Object(R.decodeEntities)(u.S):Object(c.__)("Terms and Conditions","woo-gutenberg-products-block"))))}),M=n(156),D=n(209),T=n(8),I=n.n(T),A=n(11),L=n.n(A),F=n(13),U=n.n(F),B=n(86),V=n(134),q=n(140);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e,t,n){var r=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),c="wc-".concat(n,"-new-payment-method");return r.push({key:c,value:t}),r},G=function(){var e=Object(E.b)(),t=e.hasError,n=e.onCheckoutBeforeProcessing,o=e.dispatchActions,a=e.redirectUrl,s=e.isProcessing,i=e.isBeforeProcessing,u=e.isComplete,l=e.orderNotes,b=e.shouldCreateAccount,p=Object(B.b)().hasValidationErrors,d=Object(M.b)(),m=d.shippingAddress,g=d.shippingErrorStatus,f=Object(D.b)().billingData,O=Object(V.a)(),h=O.cartNeedsPayment,j=O.receiveCart,_=Object(k.b)(),v=_.activePaymentMethod,y=_.currentStatus,w=_.paymentMethodData,S=_.expressPaymentMethods,P=_.paymentMethods,C=_.shouldSavePayment,N=Object(q.a)(),R=N.addErrorNotice,x=N.removeNotice,T=N.setIsSuppressed,I=Object(r.useRef)(f),A=Object(r.useRef)(m),F=Object(r.useRef)(a),z=Object(r.useState)(!1),G=L()(z,2),W=G[0],$=G[1],K=Object.keys(S).includes(v),X=Object(r.useMemo)((function(){var e,t=H(H({},S),P);return null==t||null===(e=t[v])||void 0===e?void 0:e.paymentMethodId}),[v,S,P]),Z=p&&!K||y.hasError||g.hasError;Object(r.useEffect)((function(){T(K)}),[K,T]),Object(r.useEffect)((function(){Z===t||!s&&!i||K||o.setHasError(Z)}),[Z,t,s,i,K,o]);var Q=!t&&!Z&&(y.isSuccessful||!h)&&s;Object(r.useEffect)((function(){I.current=f,A.current=m,F.current=a}),[f,m,a]);var J=Object(r.useCallback)((function(){return p?{errorMessage:Object(c.__)("Some input fields are invalid.","woo-gutenberg-products-block")}:y.hasError?{errorMessage:Object(c.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!g.hasError||{errorMessage:Object(c.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}}),[p,y.hasError,g.hasError]);Object(r.useEffect)((function(){var e;return K||(e=n(J,0)),function(){K||e()}}),[n,J,K]);var ee=Object(r.useCallback)((function(){$(!0),x("checkout");var e={billing_address:I.current,shipping_address:A.current,customer_note:l,should_create_account:b};h&&(e=H(H({},e),{},{payment_method:X,payment_data:Y(w,C,v)})),U()({path:"/wc/store/checkout",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){U.a.setNonce(e.headers),e.json().then((function(t){e.ok||(t.body&&t.body.message?R(t.body.message,{id:"checkout"}):R(Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"checkout"}),o.setHasError()),o.setAfterProcessing(t),$(!1)}))})).catch((function(e){e.json().then((function(e){var t;(null===(t=e.data)||void 0===t?void 0:t.cart)&&j(e.data.cart),o.setHasError(),o.setAfterProcessing(e),$(!1)}))}))}),[R,x,X,v,w,C,h,j,o,l,b]);return Object(r.useEffect)((function(){F.current&&(window.location.href=F.current)}),[u]),Object(r.useEffect)((function(){Q&&!W&&ee()}),[ee,Q,W]),null},W=function(e){var t=e.children,n=e.redirectUrl;return Object(r.createElement)(E.a,{redirectUrl:n,isCart:!1},Object(r.createElement)(D.a,null,Object(r.createElement)(M.a,null,Object(r.createElement)(k.a,null,t,Object(r.createElement)(G,null)))))},$=n(395),K=n(136),X=n(275),Z=(n(381),function(){var e=Object(S.a)(),t=e.paymentMethods,n=e.isInitialized,o=Object(f.b)().isEditor,a=Object($.a)().noticeContexts;return!n||n&&0===Object.keys(t).length?o||u.l?Object(r.createElement)(O.a,{context:a.EXPRESS_PAYMENTS}):null:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(r.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(r.createElement)(K.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(c.__)("Express checkout","woo-gutenberg-products-block"))),Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(O.a,{context:a.EXPRESS_PAYMENTS},Object(r.createElement)("p",null,Object(c.__)("In a hurry? Use one of our express checkout options below:","woo-gutenberg-products-block")),Object(r.createElement)(X.a,null)))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(c.__)("Or continue below","woo-gutenberg-products-block")))}),Q=n(867),J=n(868),ee=n(874),te=n(185),ne=n(2),re=n.n(ne),ce=function(e){var t=e.className,n=e.children,c=e.onSubmit,o=void 0===c?function(e){}:c;return Object(r.createElement)("form",{className:i()("wc-block-components-form",t),onSubmit:function(e){e.preventDefault(),o(e)}},n)},oe=n(159),ae=n(6);function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ue=function(){var e=Object(E.b)().customerId,t=Object(M.b)(),n=t.shippingAddress,c=t.setShippingAddress,o=t.needsShipping,a=Object(D.b)(),s=a.billingData,i=a.setBillingData,u=Object(r.useState)(s),l=L()(u,2),b=l[0],p=l[1],d=Object(r.useState)((function(){return o&&(!e||(t=n,r=s,Object.keys(oe.a).every((function(e){return t[e]===r[e]}))));var t,r})),m=L()(d,2),g=m[0],f=m[1];Object(r.useEffect)((function(){var e=ie(ie({},g?n:b),{},{email:b.email||s.email,phone:b.phone||s.phone});Object(ae.isEqual)(e,s)||i(e)}),[b,g,s,n,i,c]);var O=Object(r.useCallback)((function(e){p((function(t){return ie(ie({},t),e)}))}),[]);return{defaultAddressFields:oe.a,shippingFields:n,setShippingFields:c,billingFields:b,setBillingFields:O,setEmail:function(e){O({email:e})},setPhone:function(e){O({phone:e})},shippingAsBilling:g,setShippingAsBilling:f,showBillingFields:!o||!g}},le=(n(888),function(e){var t=e.title,n=e.stepHeadingContent;return Object(r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(r.createElement)(K.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&Object(r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))}),be=function(e){var t=e.id,n=e.className,c=e.title,o=e.legend,a=e.description,s=e.children,u=e.disabled,l=void 0!==u&&u,b=e.showStepNumber,p=void 0===b||b,d=e.stepHeadingContent,m=void 0===d?function(){}:d,g=o||c?"fieldset":"div";return Object(r.createElement)(g,{className:i()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p}),id:t,disabled:l},!(!o&&!c)&&Object(r.createElement)("legend",{className:"screen-reader-text"},o||c),!!c&&Object(r.createElement)(le,{title:c,stepHeadingContent:m()}),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!a&&Object(r.createElement)("p",{className:"wc-block-components-checkout-step__description"},a),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__content"},s)))},pe=n(904),de=function(e){var t=e.addressFieldsConfig,n=e.billingFields,o=e.defaultAddressFields,a=e.setBillingFields,s=Object(E.b)().isProcessing;return Object(r.createElement)(be,{id:"billing-fields",disabled:s,className:"wc-block-checkout__billing-fields",title:Object(c.__)("Billing address","woo-gutenberg-products-block"),description:Object(c.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")},Object(r.createElement)(pe.a,{id:"billing",onChange:a,type:"billing",values:n,fields:Object.keys(o),fieldConfig:t}))},me=n(265),ge=n(10),fe=n.n(ge),Oe=n(27),he=n.n(Oe),je=n(193),_e=(n(887),Object(je.a)((function(e){var t=e.className,n=e.label,c=e.id,o=e.instanceId,a=e.onChange,s=he()(e,["className","label","id","instanceId","onChange"]),u=c||"checkbox-control-".concat(o);return Object(r.createElement)("label",{className:i()("wc-block-components-checkbox",t),htmlFor:u},Object(r.createElement)("input",fe()({id:u,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:function(e){return a(e.target.checked)}},s)),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"})),Object(r.createElement)("span",{className:"wc-block-components-checkbox__label"},n))}))),ve="".concat(u.z,"?redirect_to=").concat(encodeURIComponent(window.location.href)),ye=function(){var e=Object(E.b)().customerId;return!u.i||e?null:Object(r.createElement)(r.Fragment,null,Object(c.__)("Already have an account? ","woo-gutenberg-products-block"),Object(r.createElement)("a",{href:ve},Object(c.__)("Log in.","woo-gutenberg-products-block")))},we=function(e){var t=e.emailValue,n=e.onChangeEmail,o=e.allowCreateAccount,a=Object(E.b)(),s=a.isProcessing,i=a.customerId,l=a.shouldCreateAccount,b=a.setShouldCreateAccount,p=!i&&o&&u.f&&u.g&&Object(r.createElement)(_e,{className:"wc-block-checkout__create-account",label:Object(c.__)("Create an account?","woo-gutenberg-products-block"),checked:l,onChange:function(e){return b(e)}});return Object(r.createElement)(be,{id:"contact-fields",disabled:s,className:"wc-block-checkout__contact-fields",title:Object(c.__)("Contact information","woo-gutenberg-products-block"),description:Object(c.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block"),stepHeadingContent:function(){return Object(r.createElement)(ye,null)}},Object(r.createElement)(me.a,{id:"email",type:"email",label:Object(c.__)("Email address","woo-gutenberg-products-block"),value:t,autoComplete:"email",onChange:n,required:!0}),p)},Ee=function(e){var t=e.addressFieldsConfig,n=e.defaultAddressFields,o=e.billingFields,a=e.setPhone,s=e.shippingAsBilling,i=e.shippingFields,u=e.showPhoneField,l=e.setShippingFields,b=e.setShippingAsBilling,p=e.requirePhoneField,d=Object(E.b)().isProcessing;return Object(r.createElement)(be,{id:"shipping-fields",disabled:d,className:"wc-block-checkout__shipping-fields",title:Object(c.__)("Shipping address","woo-gutenberg-products-block"),description:Object(c.__)("Enter the physical address where you want us to deliver your order.","woo-gutenberg-products-block")},Object(r.createElement)(pe.a,{id:"shipping",onChange:l,values:i,fields:Object.keys(n),fieldConfig:t}),u&&Object(r.createElement)(me.a,{id:"phone",type:"tel",label:p?Object(c.__)("Phone","woo-gutenberg-products-block"):Object(c.__)("Phone (optional)","woo-gutenberg-products-block"),value:o.phone,autoComplete:"tel",onChange:a,required:p}),Object(r.createElement)(_e,{className:"wc-block-checkout__use-address-for-billing",label:Object(c.__)("Use same address for billing","woo-gutenberg-products-block"),checked:s,onChange:function(e){return b(e)}}))};n(544);function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pe=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,c=e.showApartmentField,o=e.showCompanyField,a=e.showPhoneField,s=e.allowCreateAccount,i=ue(),u=i.defaultAddressFields,l=i.billingFields,b=i.setBillingFields,p=i.setEmail,d=i.setPhone,m=i.setShippingAsBilling,g=i.setShippingFields,f=i.shippingAsBilling,O=i.shippingFields,h=i.showBillingFields,j=Object(M.b)().needsShipping,_=Object(r.useMemo)((function(){return{company:Se(Se({},u.company),{},{hidden:!o,required:t}),address_2:Se(Se({},u.address_2),{},{hidden:!c})}}),[u,o,t,c]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(we,{emailValue:l.email,onChangeEmail:p,allowCreateAccount:s}),j&&Object(r.createElement)(Ee,{addressFieldsConfig:_,billingFields:l,defaultAddressFields:u,requirePhoneField:n,setPhone:d,setShippingAsBilling:m,setShippingFields:g,shippingAsBilling:f,shippingFields:O,showPhoneField:a}),h&&Object(r.createElement)(de,{addressFieldsConfig:_,billingFields:l,defaultAddressFields:u,setBillingFields:b}))},Ce=(n(893),function(e){var t=e.className,n=void 0===t?"":t,c=e.disabled,o=void 0!==c&&c,a=e.onTextChange,s=e.placeholder,u=e.value,l=void 0===u?"":u;return Object(r.createElement)("textarea",{className:i()("wc-block-components-textarea",n),disabled:o,onChange:function(e){a(e.target.value)},placeholder:s,rows:2,value:l})});n(892);Ce.propTypes={onTextChange:re.a.func.isRequired,disabled:re.a.bool,placeholder:re.a.string,value:re.a.string};var Ne=function(e){var t=e.disabled,n=e.onChange,o=e.placeholder,a=e.value,s=Object(r.useState)(!1),i=L()(s,2),u=i[0],l=i[1],b=Object(r.useState)(""),p=L()(b,2),d=p[0],m=p[1];return Object(r.createElement)("div",{className:"wc-block-checkout__add-note"},Object(r.createElement)(_e,{disabled:t,label:Object(c.__)("Add a note to your order","woo-gutenberg-products-block"),checked:u,onChange:function(e){l(e),e?a!==d&&n(d):(n(""),m(a))}}),u&&Object(r.createElement)(Ce,{disabled:t,onTextChange:n,placeholder:o,value:a}))},Re=function(e){var t=e.showOrderNotes,n=Object(M.b)().needsShipping,o=Object(E.b)(),a=o.isProcessing,s=o.orderNotes,i=o.dispatchActions.setOrderNotes;return t?Object(r.createElement)(be,{id:"order-notes",showStepNumber:!1},Object(r.createElement)(Ne,{disabled:a,onChange:i,placeholder:n?Object(c.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(c.__)("Notes about your order.","woo-gutenberg-products-block"),value:s})):null},xe=n(939),Me=n(280),De=n(390),Te=(n(890),function(){return Object(r.createElement)(xe.a,{icon:Object(r.createElement)(o.a,{srcElement:a.a}),label:Object(c.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(c.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(Me.a,{isDefault:!0,href:"".concat(m.ADMIN_URL,"admin.php?page=wc-settings&tab=checkout"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Configure Payment Methods","woo-gutenberg-products-block")))}),Ie=function(){return Object(r.createElement)(De.a,{isDismissible:!1,className:i()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(c.__)("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"))},Ae=function(){return Object(f.b)().isEditor?Object(r.createElement)(Te,null):Object(r.createElement)(Ie,null)},Le=n(388),Fe=n(942),Ue=n(940),Be=n(941),Ve=n(943),qe=(n(891),Object(je.a)((function(e){var t=e.className,n=e.onSelect,o=void 0===n?function(){return null}:n,a=e.tabs,s=e.activeClass,u=void 0===s?"is-active":s,l=e.initialTabName,b=e.ariaLabel,p=void 0===b?Object(c.__)("Tabbed Content","woo-gutenberg-products-block"):b,d=e.instanceId,m=e.id,g=l?{selectedId:"".concat(d,"-").concat(l)}:void 0,f=Object(Fe.a)(g);return 0===a.length?null:Object(r.createElement)("div",{className:i()("wc-block-components-tabs",t)},Object(r.createElement)(Ue.a,fe()({},f,{id:m,className:"wc-block-components-tabs__list","aria-label":p}),a.map((function(e){var t=e.name,n=e.title,c=e.ariaLabel;return Object(r.createElement)(Be.a,fe()({},f,{id:"".concat(d,"-").concat(t),manual:!0,className:i()("wc-block-components-tabs__item",I()({},u,"".concat(d,"-").concat(t)===f.selectedId)),onClick:function(){return o(t)},type:"button",key:t,"aria-label":c}),Object(r.createElement)("span",{className:"wc-block-components-tabs__item-content"},n))}))),a.map((function(e){var t=e.name,n=e.content;return Object(r.createElement)(Ve.a,fe()({},f,{key:t,id:"".concat(d,"-").concat(t,"-view"),tabId:"".concat(d,"-").concat(t),className:"wc-block-components-tabs__content"}),f.selectedId==="".concat(d,"-").concat(t)&&n)})))}))),ze=n(208),He=function(e){var t=e.children,n=e.allowsSaving,o=Object(f.b)().isEditor,a=Object(k.b)(),s=a.shouldSavePayment,i=a.setShouldSavePayment,u=Object(E.b)().customerId;return Object(r.createElement)(ze.a,{isEditor:o},t,u>0&&n&&Object(r.createElement)(_e,{className:"wc-block-components-payment-methods__save-card-info",label:Object(c.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:s,onChange:function(){return i(!s)}}))};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We=function(){var e=Object(k.b)().setActivePaymentMethod,t=Object(S.b)().paymentMethods,n=Object(Le.a)(),o=n.activePaymentMethod,a=he()(n,["activePaymentMethod"]),s=Object($.a)().noticeContexts,i=Object(q.a)().removeNotice,u=Object(f.b)().isEditor;return Object(r.createElement)(qe,{className:"wc-block-components-checkout-payment-methods",onSelect:function(t){e(t),i("wc-payment-error",s.PAYMENTS)},tabs:Object.keys(t).map((function(e){var n=t[e],c=n.ariaLabel,s=n.edit,i=n.content,l=n.label,b=n.supports,p=u?s:i;return{name:e,title:"string"==typeof l?l:Object(r.cloneElement)(l,{components:a.components}),ariaLabel:c,content:Object(r.createElement)(He,{allowsSaving:b.savePaymentInfo},Object(r.cloneElement)(p,Ge({activePaymentMethod:o},a)))}})),initialTabName:o,ariaLabel:Object(c.__)("Payment Methods","woo-gutenberg-products-block"),id:"wc-block-payment-methods"})},$e=n(51),Ke=n.n($e),Xe=n(210),Ze=n(56),Qe=function(e){var t=e.onChange,n=Object(f.b)().isEditor,o=Object(k.b)(),a=o.setPaymentStatus,s=o.customerPaymentMethods,i=o.setActivePaymentMethod,u=Object(r.useState)(""),l=L()(u,2),b=l[0],p=l[1],d=Object(Ze.getPaymentMethods)(),m=Object(r.useRef)([]),g=Object(r.useCallback)((function(e){"0"===e&&a().started(),p(e),t(e)}),[t,p,a]);Object(r.useEffect)((function(){var e=Object.keys(s).flatMap((function(e){return s[e].map((function(t){var n,r=d[t.method.gateway];if(!(null==r||null===(n=r.supports)||void 0===n?void 0:n.savePaymentInfo))return null;var o="cc"===e||"echeck"===e?function(e,t,n){var r=e.method,o=e.expires,a=e.tokenId;return{value:a+"",label:Object(c.sprintf)(Object(c.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-product-blocks"),r.brand,r.last4,o),name:"wc-saved-payment-method-token-".concat(a),onChange:function(e){var c,o="wc-".concat(r.gateway,"-payment-token");t(r.gateway),n().success((c={payment_method:r.gateway},I()(c,o,e),I()(c,"isSavedToken",!0),c))}}}(t,i,a):function(e,t,n){var r=e.method,o=e.tokenId;return{value:o+"",label:Object(c.sprintf)(Object(c.__)("Saved token for %s","woo-gutenberg-products-block"),r.gateway),name:"wc-saved-payment-method-token-".concat(o),onChange:function(e){var c,o="wc-".concat(r.gateway,"-payment-token");t(r.gateway),n().success((c={payment_method:r.gateway},I()(c,o,e),I()(c,"isSavedToken",!0),c))}}}(t,i,a);return t.is_default&&""===b&&(g(t.tokenId+""),o.onChange(t.tokenId)),o}))})).filter(Boolean);m.current=e}),[s,g,b,i,a,d]);var O=n?"0":b+"",h={value:"0",label:Object(c.__)("Use a new payment method","woo-gutenberg-product-blocks"),name:"wc-saved-payment-method-token-new"};return m.current.length>0?Object(r.createElement)(Xe.a,{id:"wc-payment-method-saved-tokens",selected:O,onChange:g,options:[].concat(Ke()(m.current),[h])}):null},Je=function(){var e=Object(S.b)(),t=e.isInitialized,n=e.paymentMethods,c=Object(r.useState)(!0),o=L()(c,2),a=o[0],s=o[1],i=Object(r.useCallback)((function(e){s("0"===e)}),[s]);return t&&0===Object.keys(n).length?Object(r.createElement)(Ae,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Qe,{onChange:i}),a&&Object(r.createElement)(We,null))},et=function(){var e=Object(E.b)().isProcessing,t=Object(V.a)().cartNeedsPayment,n=Object(S.b)().paymentMethods,o=Object($.a)().noticeContexts;return t?Object(r.createElement)(be,{id:"payment-method",disabled:e,className:"wc-block-checkout__payment-method",title:Object(c.__)("Payment method","woo-gutenberg-products-block"),description:Object.keys(n).length>1?Object(c.__)("Select a payment method below.","woo-gutenberg-products-block"):""},Object(r.createElement)(O.a,{context:o.PAYMENTS},Object(r.createElement)(Je,null))):null},tt=n(916),nt=n(259),rt=n(878),ct=n(55),ot=Object(r.createElement)(v.a,{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:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"})),at=(n(889),function(){return Object(r.createElement)(xe.a,{icon:Object(r.createElement)(o.a,{srcElement:ot}),label:Object(c.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(c.__)("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(r.createElement)(Me.a,{isDefault:!0,href:"".concat(m.ADMIN_URL,"admin.php?page=wc-settings&tab=shipping"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Configure Shipping Options","woo-gutenberg-products-block")))}),st=function(e){var t=u.p?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(R.decodeEntities)(e.name),value:e.rate_id,description:Object(R.decodeEntities)(e.description),secondaryLabel:Object(r.createElement)(ct.a,{currency:Object(nt.c)(e),value:t}),secondaryDescription:Object(R.decodeEntities)(e.delivery_time)}},it=function(){var e=Object(E.b)().isProcessing,t=Object(f.b)().isEditor,n=Object(M.b)(),o=n.shippingRates,a=n.shippingRatesLoading;return n.needsShipping?Object(r.createElement)(be,{id:"shipping-option",disabled:e,className:"wc-block-checkout__shipping-option",title:Object(c.__)("Shipping options","woo-gutenberg-products-block"),description:Object(rt.b)(o)>1?Object(c.__)("Select shipping options below.","woo-gutenberg-products-block"):""},t&&!Object(rt.a)(o)?Object(r.createElement)(at,null):Object(r.createElement)(tt.a,{noResultsMessage:Object(c.__)("There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.","woo-gutenberg-products-block"),renderOption:st,shippingRates:o,shippingRatesLoading:a})):null},ut=function(e){var t=e.requireCompanyField,n=e.requirePhoneField,c=e.showApartmentField,o=e.showCompanyField,a=e.showOrderNotes,s=e.showPhoneField,i=e.allowCreateAccount,u=Object(E.b)().onSubmit;return Object(r.createElement)(ce,{className:"wc-block-checkout__form",onSubmit:u},Object(r.createElement)(Pe,{requireCompanyField:t,requirePhoneField:n,showApartmentField:c,showCompanyField:o,showPhoneField:s,allowCreateAccount:i}),Object(r.createElement)(it,null),Object(r.createElement)(et,null),Object(r.createElement)(Re,{showOrderNotes:a}))},lt=n(389),bt=n(154),pt=n(48),dt=n(164),mt=n(869),gt=n(870),ft=n(871),Ot=n(872),ht=n(924),jt=n(279),_t=function(e){var t=e.cartItem,n=t.images,o=t.low_stock_remaining,a=void 0===o?null:o,s=t.show_backorder_badge,i=void 0!==s&&s,u=t.name,l=t.permalink,b=t.prices,p=t.quantity,d=t.short_description,m=t.description,g=t.variation,f=Object(nt.b)(b),O=Object(jt.a)({amount:parseInt(b.raw_prices.price,10),precision:parseInt(b.raw_prices.precision,10)}).multiply(p).convertPrecision(f.minorUnit).getAmount();return Object(r.createElement)("div",{className:"wc-block-components-order-summary-item"},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)(pt.a,{label:p,screenReaderLabel:Object(c.sprintf)(Object(c.__)("%d items","woo-gutenberg-products-block"),p)})),Object(r.createElement)(mt.a,{image:n.length?n[0]:{}})),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__header"},Object(r.createElement)(gt.a,{permalink:l,name:u}),Object(r.createElement)(dt.a,{currency:f,price:O,priceClassName:"wc-block-components-order-summary-item__total-price"})),i?Object(r.createElement)(ft.a,null):!!a&&Object(r.createElement)(Ot.a,{lowStockRemaining:a}),Object(r.createElement)(ht.a,{shortDescription:d,fullDescription:m,variation:g})))},vt=(n(896),function(e){var t=e.cartItems,n=void 0===t?[]:t,o=Object(lt.b)(),a=o.isLarge;return o.hasContainerWidth?Object(r.createElement)(bt.a,{className:"wc-block-components-order-summary",initialOpen:a,title:Object(r.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(c.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(r.createElement)("div",{className:"wc-block-components-order-summary__content"},n.map((function(e){return Object(r.createElement)(_t,{key:e.key,cartItem:e})})))):null}),yt=n(875),wt=n(876),Et=n(877),kt=n(908),St=n(879),Pt=n(880),Ct=n(881),Nt=n(866),Rt=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,c=e.cartItems,o=void 0===c?[]:c,a=e.cartTotals,s=void 0===a?{}:a,i=Object(Nt.a)(),l=i.applyCoupon,b=i.removeCoupon,p=i.isApplyingCoupon,d=i.isRemovingCoupon,m=Object(M.b)().needsShipping,g=Object(nt.c)(s);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(vt,{cartItems:o}),Object(r.createElement)(yt.a,{currency:g,values:s}),Object(r.createElement)(wt.a,{currency:g,values:s}),Object(r.createElement)(Et.a,{cartCoupons:n,currency:g,isRemovingCoupon:d,removeCoupon:b,values:s}),m&&Object(r.createElement)(kt.a,{currency:g,noResultsMessage:null,isCheckout:!0,showCalculator:!1,values:s}),!u.p&&Object(r.createElement)(St.a,{currency:g,values:s}),u.k&&Object(r.createElement)(Pt.a,{onSubmit:l,initialOpen:!1,isLoading:p}),Object(r.createElement)(Ct.a,{currency:g,values:s}))},xt=Object(r.createElement)(v.a,{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"})),Mt=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],Dt=function(e){var t=e.errorData,n=Object(c.__)("Checkout error","woo-gutenberg-products-block");return Mt.includes(t.code)&&(n=Object(c.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(r.createElement)("strong",{className:"wc-block-checkout-error_title"},n)},Tt=function(e){var t=e.errorData,n=t.message;return Mt.includes(t.code)&&(n=n+" "+Object(c.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-checkout-error__description"},n)},It=function(e){var t=e.errorData,n=Object(c.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return Mt.includes(t.code)&&(n=Object(c.__)("Edit your cart","woo-gutenberg-products-block"),o=u.e),Object(r.createElement)("span",{className:"wp-block-button"},Object(r.createElement)("a",{href:o,className:"wp-block-button__link"},n))},At=function(){var e=Object(m.getSetting)("checkoutData",{}),t={code:e.code||"unknown",message:Object(R.decodeEntities)(e.message)||Object(c.__)("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(r.createElement)("div",{className:"wc-block-checkout-error"},Object(r.createElement)(o.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:xt,size:100}),Object(r.createElement)(Dt,{errorData:t}),Object(r.createElement)(Tt,{errorData:t}),Object(r.createElement)(It,{errorData:t}))},Lt=(n(886),function(e){var t=e.attributes,n=e.scrollToTop,o=Object(f.b)().isEditor,a=Object(V.a)(),s=a.cartItems,l=a.cartTotals,b=a.cartCoupons,p=a.cartNeedsPayment,d=Object(E.b)(),g=d.hasOrder,O=d.hasError,h=d.isIdle,j=d.customerId,_=Object(B.b)(),v=_.hasValidationErrors,y=_.showAllValidationErrors,k=Object(q.a)().hasNoticesOfType,S=h&&O&&(v||k("default")),P=t.allowCreateAccount&&Object(m.compareWithWooVersion)("4.7.0","<=");if(Object(r.useEffect)((function(){S&&(y(),n({focusableSelector:"input:invalid"}))}),[S,n,y]),!o&&!g)return Object(r.createElement)(At,null);if(!(o||j||u.f||P&&u.g))return Object(r.createElement)(r.Fragment,null,Object(c.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(r.createElement)("a",{href:ve},Object(c.__)("Click here to log in.","woo-gutenberg-products-block")));var C=i()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Q.a,{className:C},Object(r.createElement)(J.a,{className:"wc-block-checkout__main"},p&&Object(r.createElement)(Z,null),Object(r.createElement)(ut,{showApartmentField:t.showApartmentField,showCompanyField:t.showCompanyField,showOrderNotes:t.showOrderNotes,showPhoneField:t.showPhoneField,requireCompanyField:t.requireCompanyField,requirePhoneField:t.requirePhoneField,allowCreateAccount:P}),Object(r.createElement)("div",{className:"wc-block-checkout__actions"},t.showReturnToCart&&Object(r.createElement)(w,{link:Object(m.getSetting)("page-"+(null==t?void 0:t.cartPageId),!1)}),Object(r.createElement)(N,null)),t.showPolicyLinks&&Object(r.createElement)(x,null)),Object(r.createElement)(ee.a,{className:"wc-block-checkout__sidebar"},Object(r.createElement)(Rt,{cartCoupons:b,cartItems:s,cartTotals:l}))))}),Ft=Object(te.a)((function(e){return Object(r.createElement)(W,null,Object(r.createElement)(Lt,e))})),Ut=(n(543),function(e){var t=e.attributes,n=e.setAttributes,o=t.showCompanyField,a=t.showApartmentField,s=t.showPhoneField,i=t.requireCompanyField,d=t.requirePhoneField,O=t.allowCreateAccount,j=t.showOrderNotes,_=t.showPolicyLinks,v=t.showReturnToCart,y=t.cartPageId,w=t.hasDarkControls,E=Object(f.b)().currentPostId,k=Object(r.useRef)(y).current,S=u.g&&Object(m.compareWithWooVersion)("4.7.0","<=");return Object(r.createElement)(b.InspectorControls,null,E!==u.h&&Object(r.createElement)(p.Notice,{className:"wc-block-checkout__page-notice",isDismissible:!1,status:"warning"},Object(g.a)(Object(c.__)("If you would like to use this block as your default checkout you must update your <a>page settings in WooCommerce</a>.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(m.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Address options","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("Include additional address fields in the checkout form.","woo-gutenberg-products-block")),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Company","woo-gutenberg-products-block"),checked:o,onChange:function(){return n({showCompanyField:!o})}}),o&&Object(r.createElement)(p.CheckboxControl,{label:Object(c.__)("Require company name?","woo-gutenberg-products-block"),checked:i,onChange:function(){return n({requireCompanyField:!i})},className:"components-base-control--nested"}),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),checked:a,onChange:function(){return n({showApartmentField:!a})}}),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Phone","woo-gutenberg-products-block"),checked:s,onChange:function(){return n({showPhoneField:!s})}}),s&&Object(r.createElement)(p.CheckboxControl,{label:Object(c.__)("Require phone number?","woo-gutenberg-products-block"),checked:d,onChange:function(){return n({requirePhoneField:!d})},className:"components-base-control--nested"})),S&&Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Account options","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Allow shoppers to sign up for a user account during checkout","woo-gutenberg-products-block"),checked:O,onChange:function(){return n({allowCreateAccount:!O})}})),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Order notes","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(c.__)("Reduce the number of fields to checkout.","woo-gutenberg-products-block")),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Allow shoppers to optionally add order notes","woo-gutenberg-products-block"),checked:j,onChange:function(){return n({showOrderNotes:!j})}})),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Navigation options","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Show links to policies","woo-gutenberg-products-block"),help:Object(c.__)('Shows links to your "terms and conditions" and "privacy policy" pages.',"woo-gutenberg-products-block"),checked:_,onChange:function(){return n({showPolicyLinks:!_})}}),_&&(!u.I||!u.T)&&Object(r.createElement)(p.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(g.a)(Object(c.__)("Pages must be first setup in store settings: <a1>Privacy policy</a1>, <a2>Terms and conditions</a2>.","woo-gutenberg-products-block"),{a1:Object(r.createElement)("a",{href:Object(m.getAdminLink)("admin.php?page=wc-settings&tab=account"),target:"_blank",rel:"noopener noreferrer"}),a2:Object(r.createElement)("a",{href:Object(m.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(p.ToggleControl,{label:Object(c.__)('Show a "Return to Cart" link',"woo-gutenberg-products-block"),checked:v,onChange:function(){return n({showReturnToCart:!v})}})),v&&!(E===u.h&&0===k)&&Object(r.createElement)(h.a,{pageId:y,setPageId:function(e){return n({cartPageId:e})},labels:{title:Object(c.__)("Return to Cart button","woo-gutenberg-products-block"),default:Object(c.__)("WooCommerce Cart Page","woo-gutenberg-products-block")}}),Object(r.createElement)(p.PanelBody,{title:Object(c.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(c.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(c.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:w,onChange:function(){return n({hasDarkControls:!w})}})),Object(r.createElement)(l.a,null))}),Bt=function(e){var t=e.attributes,n=e.setAttributes,o=t.className,a=t.isPreview;return Object(r.createElement)(f.a,{previewData:{previewCart:j.a,previewSavedPaymentMethods:_}},Object(r.createElement)("div",{className:i()(o,"wp-block-woocommerce-checkout",{"is-editor-preview":a})},Object(r.createElement)(Ut,{attributes:t,setAttributes:n}),Object(r.createElement)(d.a,{header:Object(c.__)("Checkout Block Error","woo-gutenberg-products-block"),text:Object(c.__)("There was an error whilst rendering the checkout block. If this problem continues, try re-creating the block.","woo-gutenberg-products-block"),showErrorMessage:!0,errorMessagePrefix:Object(c.__)("Error message:","woo-gutenberg-products-block")},Object(r.createElement)(O.a,{context:"wc/checkout"},Object(r.createElement)(p.Disabled,null,Object(r.createElement)(Ft,{attributes:t}))))))},Vt={isPreview:{type:"boolean",default:!1,save:!1},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},hasDarkControls:{type:"boolean",default:u.r}},qt={title:Object(c.__)("Checkout","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(o.a,{srcElement:a.a}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a checkout form so your customers can submit orders.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:Vt,edit:Bt,save:function(e){var t=e.attributes;return Object(r.createElement)("div",{className:i()("is-loading",t.className)})}};Object(u.Z)("woocommerce/checkout",qt)},904:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),a=(n(2),n(265)),s=n(10),i=n.n(s),u=n(5),l=n(1),b=n(33),p=n(7),d=n.n(p),m=n(27),g=n.n(m),f=n(9),O=n(86),h=n(58),j=n(193),_=n(233),v=n(945),y=(n(264),function(e){var t=e.className,n=e.feedback,r=e.id,c=e.label,a=e.onChange,s=e.options,i=e.value;return Object(o.createElement)("div",{id:r,className:d()("wc-block-components-select",t,{"is-active":i})},Object(o.createElement)(v.a,{label:c,onChange:function(e){var t=e.selectedItem;a(t.key)},options:s,value:i}),n)}),w=Object(j.a)((function(e){var t=e.className,n=e.id,r=e.value,a=e.instanceId,s=e.required,u=e.errorId,b=e.errorMessage,p=void 0===b?Object(l.__)("Please select a value.","woo-gutenberg-products-block"):b,m=g()(e,["className","id","value","instanceId","required","errorId","errorMessage"]),j=n||"select-"+a;u=u||j;var v=Object(h.a)(r),w=Object(O.b)(),E=w.getValidationError,k=w.setValidationErrors,S=w.clearValidationError;Object(f.useEffect)((function(){!s||v?S(u):k(c()({},u,{message:p,hidden:!0}))}),[S,v,u,p,s,k]),Object(f.useEffect)((function(){return function(){S(u)}}),[S,u]);var P=E(u)||{};return Object(o.createElement)(y,i()({id:j,className:d()(t,{"has-error":P.message&&!P.hidden}),feedback:Object(o.createElement)(_.a,{propertyName:u}),value:v},m))})),E=(n(374),function(e){var t=e.className,n=e.countries,r=e.id,c=e.label,a=e.onChange,s=e.value,i=void 0===s?"":s,u=e.autoComplete,p=void 0===u?"off":u,m=e.required,g=void 0!==m&&m,f=e.errorId,O=e.errorMessage,h=void 0===O?Object(l.__)("Please select a country.","woo-gutenberg-products-block"):O,j=Object(o.useMemo)((function(){return Object.keys(n).map((function(e){return{key:e,name:Object(b.decodeEntities)(n[e])}}))}),[n]);return Object(o.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(o.createElement)(w,{id:r,label:c,onChange:a,options:j,value:j.find((function(e){return e.key===i})),errorId:f,errorMessage:h,required:g}),"off"!==p&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:i,onChange:function(e){var t=e.target.value,n=j.find((function(e){return e.key===t}));a(n?n.key:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),k=function(e){return Object(o.createElement)(E,i()({countries:u.L},e))},S=function(e){return Object(o.createElement)(E,i()({countries:u.a},e))},P=(n(375),function(e){var t=e.className,n=e.id,r=e.states,c=e.country,s=e.label,i=e.onChange,u=e.autoComplete,p=void 0===u?"off":u,m=e.value,g=void 0===m?"":m,f=e.required,O=void 0!==f&&f,h=r[c],j=Object(o.useMemo)((function(){return h?Object.keys(h).map((function(e){return{key:e,name:Object(b.decodeEntities)(h[e])}})):[]}),[h]),_=Object(o.useCallback)((function(e){if(j.length>0){var t=j.find((function(t){return t.key===e||t.name===e}));i(t?t.key:"")}else i(e)}),[i,j]);return j.length>0?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{className:d()(t,"wc-block-components-state-input"),id:n,label:s,onChange:_,options:j,value:j.find((function(e){return e.key===g})),errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:O}),"off"!==p&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:g,onChange:function(e){return _(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(o.createElement)(a.a,{className:t,id:n,label:s,onChange:_,autoComplete:p,value:g,required:O})}),C=function(e){return Object(o.createElement)(P,i()({states:u.O},e))},N=function(e){return Object(o.createElement)(P,i()({states:u.b},e))},R=n(159);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var D={city:{index:9},postcode:{index:7}},T={state:{required:!1}},I={state:{required:!1,hidden:!0}},A={postcode:{required:!1,hidden:!0}},L={AE:M(M({},A),T),AF:I,AO:M(M({},A),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),AT:M(M({},D),I),AU:{city:{label:Object(l.__)("Suburb","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Suburb (optional)","woo-gutenberg-products-block")},postcode:{label:Object(l.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}},AX:M(M({},D),I),BD:{postcode:{required:!1},state:{label:Object(l.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("District (optional)","woo-gutenberg-products-block")}},BE:M(M({},D),I),BH:M({postcode:{required:!1}},I),BI:I,BO:A,BS:A,CA:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},CH:M(M({},D),{},{state:{label:Object(l.__)("Canton","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Canton (optional)","woo-gutenberg-products-block"),required:!1}}),CL:{city:{require:!0},postcode:{required:!1},state:{label:Object(l.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Region (optional)","woo-gutenberg-products-block")}},CN:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},CO:{postcode:{required:!1}},CZ:I,DE:M(M({},D),I),DK:M(M({},D),I),EE:M(M({},D),I),ES:M(M({},D),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),FI:M(M({},D),I),FR:M(M({},D),I),GB:{postcode:{label:Object(l.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},GP:I,GF:I,GR:T,HK:{postcode:{required:!1},city:{label:Object(l.__)("Town/District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Town/District (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Region (optional)","woo-gutenberg-products-block")}},HU:{state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},ID:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},IE:{postcode:{label:Object(l.__)("Eircode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Eircode (optional)","woo-gutenberg-products-block"),required:!1},state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},IS:M(M({},D),I),IL:M(M({},D),I),IM:I,IT:M(M({},D),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),JP:{first_name:{index:2},last_name:{index:1},address_1:{index:7},address_2:{index:8},postcode:{index:4},city:{index:6},state:{label:Object(l.__)("Prefecture","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Prefecture (optional)","woo-gutenberg-products-block"),index:5}},KR:I,KW:I,LB:I,LI:M(M({},D),{},{state:{label:Object(l.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}}),LK:I,LU:I,LV:{state:{label:Object(l.__)("Municipality","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Municipality (optional)","woo-gutenberg-products-block"),required:!1}},MQ:I,MT:I,MZ:M(M({},A),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),NL:M(M({},D),I),NG:M(M({},A),{},{state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}}),NO:M(M({},D),I),NP:{postcode:{required:!1},state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}},NZ:{postcode:{label:Object(l.__)("Postcode","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Postcode (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("Region","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Region (optional)","woo-gutenberg-products-block")}},PL:M(M({},D),I),PT:I,RE:I,RO:{state:{label:Object(l.__)("County","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("County (optional)","woo-gutenberg-products-block")}},RS:I,SE:M(M({},D),I),SG:M({city:{required:!1}},I),SK:M(M({},D),I),SI:M(M({},D),I),SR:M({},A),ST:M(M({},A),{},{state:{label:Object(l.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("District (optional)","woo-gutenberg-products-block")}}),MD:{state:{label:Object(l.__)("Municipality/District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Municipality/District (optional)","woo-gutenberg-products-block")}},TR:M(M({},D),{},{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}}),UG:M(M({},A),{},{city:{label:Object(l.__)("Town/Village","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Town/Village (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("District","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("District (optional)","woo-gutenberg-products-block")}}),US:{postcode:{label:Object(l.__)("ZIP","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("ZIP (optional)","woo-gutenberg-products-block")},state:{label:Object(l.__)("State","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("State (optional)","woo-gutenberg-products-block")}},VN:M({city:{index:8},postcode:{index:7,required:!1}},I),WS:A,YT:I,ZA:{state:{label:Object(l.__)("Province","woo-gutenberg-products-block"),optionalLabel:Object(l.__)("Province (optional)","woo-gutenberg-products-block")}},ZW:A};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=Object(j.a)((function(e){var t=e.id,n=e.fields,r=void 0===n?Object.keys(R.a):n,s=e.fieldConfig,i=void 0===s?{}:s,u=e.instanceId,b=e.onChange,p=e.type,d=void 0===p?"shipping":p,m=e.values,g=Object(O.b)(),f=g.getValidationError,h=g.setValidationErrors,j=g.clearValidationError,_=L[m.country]||{},v=r.map((function(e){return U(U(U({key:e},R.a[e]),_[e]),i[e])})).sort((function(e,t){return e.index-t.index})),y=f("shipping-missing-country")||{};return Object(o.useEffect)((function(){"shipping"===d&&function(e,t,n,r){r||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}}),r&&e.country&&n("shipping-missing-country")}(m,h,j,y.message&&!y.hidden)}),[m,y.message,y.hidden,h,j,d]),t=t||u,Object(o.createElement)("div",{id:t,className:"wc-block-components-address-form"},v.map((function(e){if(e.hidden)return null;if("country"===e.key){var n="shipping"===d?k:S;return Object(o.createElement)(n,{key:e.key,id:"".concat(t,"-").concat(e.key),label:e.required?e.label:e.optionalLabel,value:m.country,autoComplete:e.autocomplete,onChange:function(e){return b(U(U({},m),{},{country:e,state:"",city:"",postcode:""}))},errorId:"shipping"===d?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){var r="shipping"===d?C:N;return Object(o.createElement)(r,{key:e.key,id:"".concat(t,"-").concat(e.key),country:m.country,label:e.required?e.label:e.optionalLabel,value:m.state,autoComplete:e.autocomplete,onChange:function(e){return b(U(U({},m),{},{state:e}))},errorMessage:e.errorMessage,required:e.required})}return Object(o.createElement)(a.a,{key:e.key,id:"".concat(t,"-").concat(e.key),className:"wc-block-components-address-form__".concat(e.key),label:e.required?e.label:e.optionalLabel,value:m[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:function(t){return b(U(U({},m),{},c()({},e.key,t)))},errorMessage:e.errorMessage,required:e.required})})))}))},908:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(0),a=n(1),s=n(5),i=(n(2),n(156)),u=n(8),l=n.n(u),b=n(904),p=n(99),d=n(43),m=n.n(d),g=n(86);n(263);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e){var t=e.address,n=e.onUpdate,r=e.addressFields,s=Object(o.useState)(t),i=c()(s,2),u=i[0],l=i[1],d=Object(g.b)(),f=d.hasValidationErrors,h=d.showAllValidationErrors,j={};return r.forEach((function(e){j[e]=O(O({},j[e]),{},"country"===e?{errorMessage:Object(a.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),required:!0}:{required:!1})})),Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(b.a,{fields:r,fieldConfig:j,onChange:l,values:u}),Object(o.createElement)(p.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:m()(u,t),onClick:function(e){if(e.preventDefault(),h(),!f)return n(u)},type:"submit"},Object(a.__)("Update","woo-gutenberg-products-block")))},j=function(e){var t=e.onUpdate,n=void 0===t?function(){}:t,r=e.addressFields,c=void 0===r?["country","state","city","postcode"]:r,a=Object(i.b)(),s=a.shippingAddress,u=a.setShippingAddress;return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(h,{address:s,addressFields:c,onUpdate:function(e){u(e),n(e)}}))},_=n(60),v=n.n(_),y=n(33),w=function(e){var t=e.address;if(0===Object.values(t).length)return null;var n="string"==typeof s.L[t.country]?Object(y.decodeEntities)(s.L[t.country]):"",r="object"===v()(s.O[t.country])&&"string"==typeof s.O[t.country][t.state]?Object(y.decodeEntities)(s.O[t.country][t.state]):t.state,c=[];c.push(t.postcode.toUpperCase()),c.push(t.city),c.push(r),c.push(n);var i=c.filter(Boolean).join(", ");return i&&Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(a.sprintf)(Object(a.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" ")},E=n(134),k=n(65),S=n(55),P=n(259),C=n(916),N=function(e){var t=s.p?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(y.decodeEntities)(e.name),value:e.rate_id,description:Object(o.createElement)(o.Fragment,null,Number.isFinite(t)&&Object(o.createElement)(S.a,{currency:Object(P.c)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(y.decodeEntities)(e.delivery_time))}},R=function(e){var t=e.hasRates,n=e.shippingRates,r=e.shippingRatesLoading;return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},t?Object(a.__)("Shipping options","woo-gutenberg-products-block"):Object(a.__)("Choose a shipping option","woo-gutenberg-products-block")),Object(o.createElement)(C.a,{className:"wc-block-components-totals-shipping__options",collapsibleWhenMultiple:!0,noResultsMessage:Object(a.__)("No shipping options were found.","woo-gutenberg-products-block"),renderOption:N,shippingRates:n,shippingRatesLoading:r}))},x=function(e){return e.some((function(e){return e.shipping_rates.length}))};n(373),t.a=function(e){var t=e.currency,n=e.values,r=e.isCheckout,i=void 0!==r&&r,u=e.showCalculator,l=void 0===u||u,b=e.showRatesWithoutAddress,p=void 0!==b&&b,d=Object(o.useState)(!1),m=c()(d,2),g=m[0],f=m[1],O=Object(E.a)(),h=O.shippingRates,_=O.shippingRatesLoading,v=O.hasShippingAddress,y=O.shippingAddress,S=s.p?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),P=x(h)||S,C=p||v;return P||v||i?Object(o.createElement)("div",{className:"wc-block-components-totals-shipping"},Object(o.createElement)(k.a,{label:Object(a.__)("Shipping","woo-gutenberg-products-block"),value:S||"",description:Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{address:y})," ",l&&Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){f(!g)},"aria-expanded":g},Object(a.__)("(change address)","woo-gutenberg-products-block"))),currency:t}),l&&g&&Object(o.createElement)(j,{onUpdate:function(){f(!1)}}),!i&&C&&Object(o.createElement)(R,{hasRates:P,shippingRates:h,shippingRatesLoading:_})):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(k.a,{className:"wc-block-components-totals-shipping",label:Object(a.__)("Shipping","woo-gutenberg-products-block"),value:l?Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){f(!g)}},Object(a.__)("Calculate","woo-gutenberg-products-block")):Object(o.createElement)("em",null,Object(a.__)("Calculated during checkout","woo-gutenberg-products-block"))}),l&&g&&Object(o.createElement)(j,{onUpdate:function(){f(!1)}}))}},916:function(e,t,n){"use strict";var r=n(0),c=n(1),o=n(9),a=(n(2),n(87)),s=n(125),i=n(878),u=n(27),l=n.n(u),b=n(864),p=n(33),d=n(48),m=n(136),g=n(154),f=n(7),O=n.n(f),h=n(210),j=n(165),_=n(390),v=function(e){var t=e.className,n=e.noResultsMessage,c=e.onChange,o=e.options,a=e.renderOption,s=e.selected;if(0===o.length)return Object(r.createElement)(_.a,{isDismissible:!1,className:O()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-message","woocommerce-info")},n);if(o.length>1)return Object(r.createElement)(h.a,{className:t,onChange:c,selected:s,options:o.map(a)});var i=a(o[0]),u=i.label,l=i.secondaryLabel,b=i.description,p=i.secondaryDescription;return Object(r.createElement)(j.a,{label:u,secondaryLabel:l,description:b,secondaryDescription:p})},y=(n(204),function(e){var t=e.className,n=e.collapsible,o=void 0!==n&&n,a=e.noResultsMessage,s=e.onChange,i=e.renderOption,u=e.selected,l=e.shippingRate,b=e.showItems,f=e.title,h=Object(r.createElement)(r.Fragment,null,f&&Object(r.createElement)(m.a,{className:"wc-block-components-shipping-rates-control__package-title",headingLevel:"3"},f),b&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map((function(e){var t=Object(p.decodeEntities)(e.name),n=e.quantity;return Object(r.createElement)("li",{key:t,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(d.a,{label:"".concat(t," ×").concat(n),screenReaderLabel:Object(c.sprintf)(Object(c._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),j=Object(r.createElement)(v,{className:t,noResultsMessage:a,onChange:s,options:l.shipping_rates,renderOption:i,selected:u});return o?Object(r.createElement)(g.a,{className:"wc-block-components-shipping-rates-control__package",hasBorder:!0,initialOpen:!0,title:h},j):Object(r.createElement)("div",{className:O()("wc-block-components-shipping-rates-control__package",t)},h,j)}),w=function(e){var t=e.className,n=e.collapsible,c=void 0!==n&&n,o=e.noResultsMessage,a=e.renderOption,s=e.shippingRates,i=void 0===s?[]:s,u=Object(b.a)(i),p=u.selectShippingRate,d=u.selectedShippingRates;return Object(r.createElement)("div",{className:"wc-block-components-shipping-rates-control"},i.map((function(e){var n=e.package_id,s=l()(e,["package_id"]);return Object(r.createElement)(y,{key:n,className:t,collapsible:c,noResultsMessage:o,onChange:function(e){p(e,n)},renderOption:a,selected:d[n],shippingRate:s,showItems:i.length>1,title:i.length>1?s.name:null})})))};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,u=e.className,l=e.collapsibleWhenMultiple,b=void 0!==l&&l,p=e.noResultsMessage,d=e.renderOption;return Object(o.useEffect)((function(){if(!n){var e=Object(i.a)(t),r=Object(i.b)(t);0===r?Object(a.speak)(Object(c.__)("No shipping options were found.","woo-gutenberg-products-block")):1===e?Object(a.speak)(Object(c.sprintf)(Object(c._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(a.speak)(Object(c.sprintf)(Object(c._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(c.sprintf)(Object(c._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))}}),[n,t]),Object(r.createElement)(s.a,{isLoading:n,screenReaderLabel:Object(c.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},Object(r.createElement)(w,{className:u,collapsible:t.length>1&&b,noResultsMessage:p,renderOption:d,shippingRates:t}))}},917:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(8),a=n.n(o),s=n(0),i=n(7),u=n.n(i),l=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},b=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,c=e.alt,o=void 0===c?"":c;return r?Object(s.createElement)("img",{className:l(t),src:r,alt:o}):null},p=n(5),d=[{id:"alipay",alt:"Alipay",src:p.U+"img/payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.U+"img/payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.U+"img/payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.U+"img/payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.U+"img/payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.U+"img/payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.U+"img/payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.U+"img/payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.U+"img/payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.U+"img/payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.U+"img/payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.U+"img/payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.U+"img/payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.U+"img/payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.U+"img/payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.U+"img/payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.U+"img/payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.U+"img/payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.U+"img/payment-methods/wechat.svg"}],m=n(60),g=n.n(m);n(382);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icons,n=void 0===t?[]:t,r=e.align,o=void 0===r?"center":r,a=function(e){var t={};return e.forEach((function(e){var n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"===g()(e)&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)}(n);if(0===a.length)return null;var i=u()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===o,"wc-block-components-payment-method-icons--align-right":"right"===o});return Object(s.createElement)("div",{className:i},a.map((function(e){var t,n=O(O({},e),(t=e.id,d.find((function(e){return e.id===t}))||{}));return Object(s.createElement)(b,c()({key:"payment-method-icon-"+e.id},n))})))}},924:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(33)),o=n(7),a=n.n(o),s=function(e){var t=e.className,n=e.variation,o=void 0===n?[]:n;if(!o||0===o.length)return null;var s=o.map((function(e){return e.attribute?"".concat(Object(c.decodeEntities)(e.attribute),": ").concat(Object(c.decodeEntities)(e.value)):"".concat(Object(c.decodeEntities)(e.value))})).join(" / ");return Object(r.createElement)("div",{className:a()("wc-block-components-product-variation-data",t)},s)},i=n(177),u=n(3),l=function(e){var t=e.className,n=e.shortDescription,c=void 0===n?"":n,o=e.fullDescription,a=c||(void 0===o?"":o);return a?Object(r.createElement)(i.a,{className:t,source:a,maxLength:15,countType:Object(u.getSetting)("wordCountType","words")}):null};n(370),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,c=e.fullDescription,o=void 0===c?"":c,a=e.variation,i=void 0===a?[]:a;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(l,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:o}),Object(r.createElement)(s,{className:"wc-block-components-product-metadata__variation-data",variation:i}))}},928:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),c=n(5),o=[{destination:{},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",rate_id:"free_shipping:1",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",rate_id:"local_pickup:1",method_id:"local_pickup",selected:!1}]}],a={coupons:[],shipping_rates:c.N?o:[],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:c.U+"img/beanie.jpg",thumbnail:c.U+"img/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:"800",regular_price:"800",sale_price:"800",raw_prices:{precision:6,price:"8000000",regular_price:"8000000",sale_price:"8000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"1600",line_subtotal_tax:"0",line_total:"1600",line_total_tax:"0"}},{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:c.U+"img/cap.jpg",thumbnail:c.U+"img/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:"1400",regular_price:"1600",sale_price:"1400",raw_prices:{precision:6,price:"14000000",regular_price:"16000000",sale_price:"14000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"1400",line_subtotal_tax:"0",line_total:"1400",line_total_tax:"0"}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:c.M,totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"3000",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"200",total_shipping_tax:"0",total_tax:"0",total_price:"3200",tax_lines:[]}}},95:function(e,t){!function(){e.exports=this.wp.autop}()},99:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(27),a=n.n(o),s=n(0),i=n(280),u=(n(2),n(7)),l=n.n(u);n(239);t.a=function(e){var t=e.className,n=e.showSpinner,r=void 0!==n&&n,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return Object(s.createElement)(i.a,c()({className:b},u),r&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}});
|
build/featured-category.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '9233b52dd250f19e0a5f1fb888152363');
|
build/featured-product.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => 'e8a49efe7c28172cdb427346de24fd56');
|
build/handpicked-products.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => 'a68173ddd5290886558f45b3fc33ceeb');
|
build/price-filter-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '745b39c084c463629b8266cc93b634cb');
|
build/price-filter.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '94ac69d3ad36d93b5e31bba2f7707973');
|
build/product-best-sellers.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '68e9a3a83f4cc563f97a8ea69067dd20');
|
build/product-category.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '6a25becf04113279351613678c032c98');
|
build/product-new.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '068082360d7842a350c9b327dc734dd9');
|
build/product-on-sale.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '7825f89ba2e144b62cd267213435d7f1');
|
build/product-search.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '63e7d121e7f423f8beae5838a72ed096');
|
build/product-tag.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '6716b82ba0a7eea1572d1a10d82c265a');
|
build/product-top-rated.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '03be017d9201cc9b33c84895f02cee94');
|
build/products-by-attribute.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => 'bf425677a7d3dd909daa5c9b6a9e0033');
|
build/reviews-by-category.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '6cec5166858fbaa55295aa79932cafb3');
|
build/reviews-by-product.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-date', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '52398bd6a0388f9b64398283feb96ec6');
|
build/reviews-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '94b4c7a102e4583b4db6b1c0e477be5d');
|
build/single-product-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-wordcount'), 'version' => '27db1d38478df25d60acac32f5ff6c1e');
|
build/single-product.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '7783576d525d9f5aed828053702fcb45');
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
|
|
4 |
Requires at least: 5.3
|
5 |
Tested up to: 5.5
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 3.7.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -85,6 +85,11 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
88 |
= 3.7.0 - 2020-10-29 =
|
89 |
|
90 |
#### Enhancements
|
4 |
Requires at least: 5.3
|
5 |
Tested up to: 5.5
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 3.7.1
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
85 |
|
86 |
== Changelog ==
|
87 |
|
88 |
+
= 3.7.1 - 2020-11-05 =
|
89 |
+
|
90 |
+
#### Bug Fixes
|
91 |
+
- Ensure that accounts are not created via checkout block request if account registration is disabled for WooCommerce ([#3371](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3371))
|
92 |
+
|
93 |
= 3.7.0 - 2020-10-29 =
|
94 |
|
95 |
#### Enhancements
|
src/Assets.php
CHANGED
@@ -142,6 +142,7 @@ class Assets {
|
|
142 |
'privacy' => wc_privacy_policy_page_id(),
|
143 |
'terms' => wc_terms_and_conditions_page_id(),
|
144 |
];
|
|
|
145 |
|
146 |
// Global settings used in each block.
|
147 |
return array_merge(
|
@@ -187,8 +188,14 @@ class Assets {
|
|
187 |
'privacy' => self::format_page_resource( $page_ids['privacy'] ),
|
188 |
'terms' => self::format_page_resource( $page_ids['terms'] ),
|
189 |
],
|
190 |
-
'checkoutAllowsGuest' =>
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
'baseLocation' => wc_get_base_location(),
|
193 |
'woocommerceBlocksPhase' => WOOCOMMERCE_BLOCKS_PHASE,
|
194 |
'hasDarkEditorStyleSupport' => current_theme_supports( 'dark-editor-style' ),
|
142 |
'privacy' => wc_privacy_policy_page_id(),
|
143 |
'terms' => wc_terms_and_conditions_page_id(),
|
144 |
];
|
145 |
+
$checkout = WC()->checkout();
|
146 |
|
147 |
// Global settings used in each block.
|
148 |
return array_merge(
|
188 |
'privacy' => self::format_page_resource( $page_ids['privacy'] ),
|
189 |
'terms' => self::format_page_resource( $page_ids['terms'] ),
|
190 |
],
|
191 |
+
'checkoutAllowsGuest' => $checkout instanceof \WC_Checkout && false === filter_var(
|
192 |
+
$checkout->is_registration_required(),
|
193 |
+
FILTER_VALIDATE_BOOLEAN
|
194 |
+
),
|
195 |
+
'checkoutAllowsSignup' => $checkout instanceof \WC_Checkout && filter_var(
|
196 |
+
$checkout->is_registration_enabled(),
|
197 |
+
FILTER_VALIDATE_BOOLEAN
|
198 |
+
),
|
199 |
'baseLocation' => wc_get_base_location(),
|
200 |
'woocommerceBlocksPhase' => WOOCOMMERCE_BLOCKS_PHASE,
|
201 |
'hasDarkEditorStyleSupport' => current_theme_supports( 'dark-editor-style' ),
|
src/Domain/Services/CreateAccount.php
CHANGED
@@ -139,8 +139,19 @@ class CreateAccount {
|
|
139 |
}
|
140 |
|
141 |
// From here we know that the shopper is not logged in.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
-
if (
|
144 |
// Store requires an account for all checkouts (purchases).
|
145 |
// Create an account independent of shopper option in $request.
|
146 |
// Note - checkbox is not displayed to shopper in this case.
|
139 |
}
|
140 |
|
141 |
// From here we know that the shopper is not logged in.
|
142 |
+
// check for whether account creation is enabled at the global level.
|
143 |
+
$checkout = WC()->checkout();
|
144 |
+
if ( ! $checkout instanceof \WC_Checkout ) {
|
145 |
+
// If checkout class is not available, we have major problems, don't create account.
|
146 |
+
return false;
|
147 |
+
}
|
148 |
+
|
149 |
+
if ( false === filter_var( $checkout->is_registration_enabled(), FILTER_VALIDATE_BOOLEAN ) ) {
|
150 |
+
// Registration is not enabled for the store, so return false.
|
151 |
+
return false;
|
152 |
+
}
|
153 |
|
154 |
+
if ( true === filter_var( $checkout->is_registration_required(), FILTER_VALIDATE_BOOLEAN ) ) {
|
155 |
// Store requires an account for all checkouts (purchases).
|
156 |
// Create an account independent of shopper option in $request.
|
157 |
// Note - checkbox is not displayed to shopper in this case.
|
src/Package.php
CHANGED
@@ -95,7 +95,7 @@ class Package {
|
|
95 |
NewPackage::class,
|
96 |
function ( $container ) {
|
97 |
// leave for automated version bumping.
|
98 |
-
$version = '3.7.
|
99 |
return new NewPackage(
|
100 |
$version,
|
101 |
dirname( __DIR__ )
|
95 |
NewPackage::class,
|
96 |
function ( $container ) {
|
97 |
// leave for automated version bumping.
|
98 |
+
$version = '3.7.1';
|
99 |
return new NewPackage(
|
100 |
$version,
|
101 |
dirname( __DIR__ )
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit9705a18cb2699b55ee2dd8d8854f7329::getLoader();
|
vendor/autoload_packages.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit888c9e499d38b7ffc12f3cc0c86a3d73
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit9705a18cb2699b55ee2dd8d8854f7329
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit9705a18cb2699b55ee2dd8d8854f7329', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9705a18cb2699b55ee2dd8d8854f7329', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit9705a18cb2699b55ee2dd8d8854f7329::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
@@ -40,9 +40,9 @@ class ComposerStaticInit888c9e499d38b7ffc12f3cc0c86a3d73
|
|
40 |
public static function getInitializer(ClassLoader $loader)
|
41 |
{
|
42 |
return \Closure::bind(function () use ($loader) {
|
43 |
-
$loader->prefixLengthsPsr4 =
|
44 |
-
$loader->prefixDirsPsr4 =
|
45 |
-
$loader->classMap =
|
46 |
|
47 |
}, null, ClassLoader::class);
|
48 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit9705a18cb2699b55ee2dd8d8854f7329
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
40 |
public static function getInitializer(ClassLoader $loader)
|
41 |
{
|
42 |
return \Closure::bind(function () use ($loader) {
|
43 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit9705a18cb2699b55ee2dd8d8854f7329::$prefixLengthsPsr4;
|
44 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit9705a18cb2699b55ee2dd8d8854f7329::$prefixDirsPsr4;
|
45 |
+
$loader->classMap = ComposerStaticInit9705a18cb2699b55ee2dd8d8854f7329::$classMap;
|
46 |
|
47 |
}, null, ClassLoader::class);
|
48 |
}
|
vendor/composer/jetpack_autoload_psr4.php
CHANGED
@@ -11,7 +11,7 @@ return array(
|
|
11 |
'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
|
12 |
),
|
13 |
'Automattic\\WooCommerce\\Blocks\\' => array(
|
14 |
-
'version' => '3.7.
|
15 |
'path' => array( $baseDir . '/src' )
|
16 |
),
|
17 |
'Automattic\\Jetpack\\Autoloader\\' => array(
|
11 |
'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
|
12 |
),
|
13 |
'Automattic\\WooCommerce\\Blocks\\' => array(
|
14 |
+
'version' => '3.7.1.0',
|
15 |
'path' => array( $baseDir . '/src' )
|
16 |
),
|
17 |
'Automattic\\Jetpack\\Autoloader\\' => array(
|
vendor/jetpack-autoloader/autoload_functions.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-autoloader-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-autoloader-locator.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-manifest-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-plugins-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-version-loader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-version-selector.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jpa726495f2724a1de0828bfacdb6461b5;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
woocommerce-gutenberg-products-block.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce Blocks
|
4 |
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
|
5 |
* Description: WooCommerce blocks for the Gutenberg editor.
|
6 |
-
* Version: 3.7.
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://woocommerce.com
|
9 |
* Text Domain: woo-gutenberg-products-block
|
3 |
* Plugin Name: WooCommerce Blocks
|
4 |
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
|
5 |
* Description: WooCommerce blocks for the Gutenberg editor.
|
6 |
+
* Version: 3.7.1
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://woocommerce.com
|
9 |
* Text Domain: woo-gutenberg-products-block
|