WooCommerce Gutenberg Products Block - Version 8.0.0

Version Description

  • 2022-07-04 =

Enhancements

  • Make form components require onChange and have a default value. (6636)
  • Footer Template Parts use now <footer> instead of <div> and Header uses <header> instead of <div>. (6596)
  • Replace the ProductTag tax_query field to be the term_id instead of the id. (6585)

Bug Fixes

  • Fix: Correctly calculacte taxes for local pickups. (6631)
  • Fix: Ensure WooCommerce templates show correct titles. (6452)
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Gutenberg Products Block
Version 8.0.0
Comparing to
See all releases

Code changes from version 7.9.0 to 8.0.0

Files changed (40) hide show
  1. assets/js/atomic/utils/render-parent-block.tsx +1 -0
  2. assets/js/base/components/checkbox-list/index.tsx +2 -2
  3. assets/js/base/components/price-slider/index.tsx +2 -2
  4. assets/js/base/components/radio-control/index.tsx +1 -1
  5. assets/js/base/components/sort-select/index.tsx +2 -2
  6. assets/js/blocks/classic-template/constants.ts +9 -0
  7. assets/js/blocks/classic-template/index.tsx +171 -57
  8. build/active-filters.asset.php +1 -1
  9. build/all-products-frontend.asset.php +1 -1
  10. build/all-products-frontend.js +1 -1
  11. build/all-products.asset.php +1 -1
  12. build/all-products.js +1 -1
  13. build/all-reviews.asset.php +1 -1
  14. build/all-reviews.js +1 -1
  15. build/attribute-filter-frontend.asset.php +1 -1
  16. build/attribute-filter-frontend.js +1 -1
  17. build/attribute-filter.asset.php +1 -1
  18. build/attribute-filter.js +1 -1
  19. build/cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend.js +1 -1
  20. build/cart-frontend.asset.php +1 -1
  21. build/cart-frontend.js +2 -2
  22. build/cart.asset.php +1 -1
  23. build/cart.js +1 -1
  24. build/checkout-blocks/payment-frontend.js +1 -1
  25. build/checkout-blocks/shipping-methods-frontend.js +1 -1
  26. build/checkout-frontend.asset.php +1 -1
  27. build/checkout-frontend.js +2 -2
  28. build/checkout.asset.php +1 -1
  29. build/checkout.js +1 -1
  30. build/featured-category.asset.php +1 -1
  31. build/featured-product.asset.php +1 -1
  32. build/handpicked-products.asset.php +1 -1
  33. build/legacy-template.asset.php +1 -1
  34. build/legacy-template.js +2 -2
  35. build/mini-cart-component-frontend.asset.php +1 -1
  36. build/mini-cart-component-frontend.js +1 -1
  37. build/mini-cart-contents.asset.php +1 -1
  38. build/mini-cart.asset.php +1 -1
  39. build/price-filter-frontend.asset.php +1 -1
  40. build/price-filter-frontend.js +1 -1
assets/js/atomic/utils/render-parent-block.tsx CHANGED
@@ -93,6 +93,7 @@ const renderForcedBlocks = (
93
  : getBlockComponentFromMap( blockName, blockMap );
94
  return ForcedComponent ? (
95
  <BlockErrorBoundary
 
96
  text={ `Unexpected error in: ${ blockName }` }
97
  showErrorBlock={ CURRENT_USER_IS_ADMIN as boolean }
98
  >
93
  : getBlockComponentFromMap( blockName, blockMap );
94
  return ForcedComponent ? (
95
  <BlockErrorBoundary
96
+ key={ `${ blockName }_blockerror` }
97
  text={ `Unexpected error in: ${ blockName }` }
98
  showErrorBlock={ CURRENT_USER_IS_ADMIN as boolean }
99
  >
assets/js/base/components/checkbox-list/index.tsx CHANGED
@@ -21,7 +21,7 @@ interface CheckboxListProps {
21
  isDisabled?: boolean;
22
  limit?: number;
23
  checked?: string[];
24
- onChange?: ( value: string ) => void;
25
  options?: CheckboxListOptions[];
26
  }
27
 
@@ -39,7 +39,7 @@ interface CheckboxListProps {
39
  */
40
  const CheckboxList = ( {
41
  className,
42
- onChange = () => void 0,
43
  options = [],
44
  checked = [],
45
  isLoading = false,
21
  isDisabled?: boolean;
22
  limit?: number;
23
  checked?: string[];
24
+ onChange: ( value: string ) => void;
25
  options?: CheckboxListOptions[];
26
  }
27
 
39
  */
40
  const CheckboxList = ( {
41
  className,
42
+ onChange,
43
  options = [],
44
  checked = [],
45
  isLoading = false,
assets/js/base/components/price-slider/index.tsx CHANGED
@@ -49,7 +49,7 @@ export interface PriceSliderProps {
49
  /**
50
  * Function to call on the change event.
51
  */
52
- onChange?: ( value: [ number, number ] ) => void;
53
  /**
54
  * Function to call when submit event fires.
55
  */
@@ -73,7 +73,7 @@ const PriceSlider = ( {
73
  maxPrice,
74
  minConstraint,
75
  maxConstraint,
76
- onChange = () => void 0,
77
  step,
78
  currency,
79
  showInputFields = true,
49
  /**
50
  * Function to call on the change event.
51
  */
52
+ onChange: ( value: [ number, number ] ) => void;
53
  /**
54
  * Function to call when submit event fires.
55
  */
73
  maxPrice,
74
  minConstraint,
75
  maxConstraint,
76
+ onChange,
77
  step,
78
  currency,
79
  showInputFields = true,
assets/js/base/components/radio-control/index.tsx CHANGED
@@ -15,7 +15,7 @@ const RadioControl = ( {
15
  className = '',
16
  id,
17
  selected,
18
- onChange = () => void 0,
19
  options = [],
20
  }: RadioControlProps ): JSX.Element | null => {
21
  const instanceId = useInstanceId( RadioControl );
15
  className = '',
16
  id,
17
  selected,
18
+ onChange,
19
  options = [],
20
  }: RadioControlProps ): JSX.Element | null => {
21
  const instanceId = useInstanceId( RadioControl );
assets/js/base/components/sort-select/index.tsx CHANGED
@@ -42,7 +42,7 @@ interface SortSelectProps {
42
  /**
43
  * The selected value.
44
  */
45
- value: string;
46
  }
47
 
48
  /**
@@ -56,7 +56,7 @@ const SortSelect = ( {
56
  onChange,
57
  options,
58
  screenReaderLabel,
59
- value,
60
  }: SortSelectProps ): JSX.Element => {
61
  const selectId = `wc-block-components-sort-select__select-${ instanceId }`;
62
 
42
  /**
43
  * The selected value.
44
  */
45
+ value?: string;
46
  }
47
 
48
  /**
56
  onChange,
57
  options,
58
  screenReaderLabel,
59
+ value = '',
60
  }: SortSelectProps ): JSX.Element => {
61
  const selectId = `wc-block-components-sort-select__select-${ instanceId }`;
62
 
assets/js/blocks/classic-template/constants.ts CHANGED
@@ -3,6 +3,8 @@
3
  */
4
  import { __ } from '@wordpress/i18n';
5
 
 
 
6
  export const TEMPLATES: Record< string, Record< string, string > > = {
7
  'single-product': {
8
  title: __(
@@ -32,4 +34,11 @@ export const TEMPLATES: Record< string, Record< string, string > > = {
32
  ),
33
  placeholder: 'archive-product',
34
  },
 
 
 
 
 
 
 
35
  };
3
  */
4
  import { __ } from '@wordpress/i18n';
5
 
6
+ export const BLOCK_SLUG = 'woocommerce/legacy-template';
7
+
8
  export const TEMPLATES: Record< string, Record< string, string > > = {
9
  'single-product': {
10
  title: __(
34
  ),
35
  placeholder: 'archive-product',
36
  },
37
+ 'product-search-results': {
38
+ title: __(
39
+ 'WooCommerce Product Search Results Block',
40
+ 'woo-gutenberg-products-block'
41
+ ),
42
+ placeholder: 'archive-product',
43
+ },
44
  };
assets/js/blocks/classic-template/index.tsx CHANGED
@@ -1,7 +1,14 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { createBlock, registerBlockType } from '@wordpress/blocks';
 
 
 
 
 
 
 
5
  import {
6
  isExperimentalBuild,
7
  WC_BLOCKS_IMAGE_URL,
@@ -10,24 +17,26 @@ import { useBlockProps } from '@wordpress/block-editor';
10
  import { Button, Placeholder } from '@wordpress/components';
11
  import { __, sprintf } from '@wordpress/i18n';
12
  import { box, Icon } from '@wordpress/icons';
13
- import { useDispatch } from '@wordpress/data';
 
14
 
15
  /**
16
  * Internal dependencies
17
  */
18
  import './editor.scss';
19
  import './style.scss';
20
- import { TEMPLATES } from './constants';
21
-
22
- interface Props {
23
- attributes: {
24
- template: string;
25
- align: string;
26
- };
27
- clientId: string;
28
- }
29
 
30
- const Edit = ( { clientId, attributes }: Props ) => {
 
 
 
 
31
  const { replaceBlock } = useDispatch( 'core/block-editor' );
32
 
33
  const blockProps = useBlockProps();
@@ -35,6 +44,16 @@ const Edit = ( { clientId, attributes }: Props ) => {
35
  TEMPLATES[ attributes.template ]?.title ?? attributes.template;
36
  const templatePlaceholder =
37
  TEMPLATES[ attributes.template ]?.placeholder ?? 'fallback';
 
 
 
 
 
 
 
 
 
 
38
  return (
39
  <div { ...blockProps }>
40
  <Placeholder
@@ -99,51 +118,146 @@ const Edit = ( { clientId, attributes }: Props ) => {
99
  );
100
  };
101
 
102
- /**
103
- * The 'WooCommerce Legacy Template' block was renamed to 'WooCommerce Classic Template', however, the internal block
104
- * name 'woocommerce/legacy-template' needs to remain the same. Otherwise, it would result in a corrupt block when
105
- * loaded for users who have customized templates using the legacy-template (since the internal block name is
106
- * stored in the database).
107
- *
108
- * See https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/5861 for more context
109
- */
110
- registerBlockType( 'woocommerce/legacy-template', {
111
- title: __( 'WooCommerce Classic Template', 'woo-gutenberg-products-block' ),
112
- icon: (
113
- <Icon icon={ box } className="wc-block-editor-components-block-icon" />
114
- ),
115
- category: 'woocommerce',
116
- apiVersion: 2,
117
- keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
118
- description: __(
119
- 'Renders classic WooCommerce PHP templates.',
120
- 'woo-gutenberg-products-block'
121
- ),
122
- supports: {
123
- align: [ 'wide', 'full' ],
124
- html: false,
125
- multiple: false,
126
- reusable: false,
127
- inserter: false,
128
- },
129
- example: {
130
- attributes: {
131
- isPreview: true,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  },
133
- },
134
- attributes: {
135
- /**
136
- * Template attribute is used to determine which core PHP template gets rendered.
137
- */
138
- template: {
139
- type: 'string',
140
- default: 'any',
 
 
 
 
141
  },
142
- align: {
143
- type: 'string',
144
- default: 'wide',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  },
146
- },
147
- edit: Edit,
148
- save: () => null,
149
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /**
2
  * External dependencies
3
  */
4
+ import {
5
+ Block,
6
+ BlockEditProps,
7
+ createBlock,
8
+ getBlockType,
9
+ registerBlockType,
10
+ unregisterBlockType,
11
+ } from '@wordpress/blocks';
12
  import {
13
  isExperimentalBuild,
14
  WC_BLOCKS_IMAGE_URL,
17
  import { Button, Placeholder } from '@wordpress/components';
18
  import { __, sprintf } from '@wordpress/i18n';
19
  import { box, Icon } from '@wordpress/icons';
20
+ import { select, useDispatch, subscribe } from '@wordpress/data';
21
+ import { useEffect } from '@wordpress/element';
22
 
23
  /**
24
  * Internal dependencies
25
  */
26
  import './editor.scss';
27
  import './style.scss';
28
+ import { BLOCK_SLUG, TEMPLATES } from './constants';
29
+
30
+ type Attributes = {
31
+ template: string;
32
+ align: string;
33
+ };
 
 
 
34
 
35
+ const Edit = ( {
36
+ clientId,
37
+ attributes,
38
+ setAttributes,
39
+ }: BlockEditProps< Attributes > ) => {
40
  const { replaceBlock } = useDispatch( 'core/block-editor' );
41
 
42
  const blockProps = useBlockProps();
44
  TEMPLATES[ attributes.template ]?.title ?? attributes.template;
45
  const templatePlaceholder =
46
  TEMPLATES[ attributes.template ]?.placeholder ?? 'fallback';
47
+
48
+ useEffect(
49
+ () =>
50
+ setAttributes( {
51
+ template: attributes.template,
52
+ align: attributes.align ?? 'wide',
53
+ } ),
54
+ [ attributes.align, attributes.template, setAttributes ]
55
+ );
56
+
57
  return (
58
  <div { ...blockProps }>
59
  <Placeholder
118
  );
119
  };
120
 
121
+ const templates = Object.keys( TEMPLATES );
122
+
123
+ const registerClassicTemplateBlock = ( {
124
+ template,
125
+ inserter,
126
+ }: {
127
+ template?: string;
128
+ inserter: boolean;
129
+ } ) => {
130
+ /**
131
+ * The 'WooCommerce Legacy Template' block was renamed to 'WooCommerce Classic Template', however, the internal block
132
+ * name 'woocommerce/legacy-template' needs to remain the same. Otherwise, it would result in a corrupt block when
133
+ * loaded for users who have customized templates using the legacy-template (since the internal block name is
134
+ * stored in the database).
135
+ *
136
+ * See https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/5861 for more context
137
+ */
138
+ registerBlockType( BLOCK_SLUG, {
139
+ title: template
140
+ ? TEMPLATES[ template ].title
141
+ : __(
142
+ 'WooCommerce Classic Template',
143
+ 'woo-gutenberg-products-block'
144
+ ),
145
+ icon: (
146
+ <Icon
147
+ icon={ box }
148
+ className="wc-block-editor-components-block-icon"
149
+ />
150
+ ),
151
+ category: 'woocommerce',
152
+ apiVersion: 2,
153
+ keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
154
+ description: __(
155
+ 'Renders classic WooCommerce PHP templates.',
156
+ 'woo-gutenberg-products-block'
157
+ ),
158
+ supports: {
159
+ align: [ 'wide', 'full' ],
160
+ html: false,
161
+ multiple: false,
162
+ reusable: false,
163
+ inserter,
164
+ },
165
+ example: {
166
+ attributes: {
167
+ isPreview: true,
168
+ },
169
  },
170
+ attributes: {
171
+ /**
172
+ * Template attribute is used to determine which core PHP template gets rendered.
173
+ */
174
+ template: {
175
+ type: 'string',
176
+ default: 'any',
177
+ },
178
+ align: {
179
+ type: 'string',
180
+ default: 'wide',
181
+ },
182
  },
183
+ edit: ( {
184
+ attributes,
185
+ clientId,
186
+ setAttributes,
187
+ }: BlockEditProps< Attributes > ) => {
188
+ const newTemplate = template ?? attributes.template;
189
+
190
+ return (
191
+ <Edit
192
+ attributes={ {
193
+ ...attributes,
194
+ template: newTemplate,
195
+ } }
196
+ setAttributes={ setAttributes }
197
+ clientId={ clientId }
198
+ />
199
+ );
200
  },
201
+ save: () => null,
202
+ } );
203
+ };
204
+
205
+ const isClassicTemplateBlockRegisteredWithAnotherTitle = (
206
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
207
+ block: Block< any > | undefined,
208
+ parsedTemplate: string
209
+ ) => block?.title !== TEMPLATES[ parsedTemplate ].title;
210
+
211
+ const hasTemplateSupportForClassicTemplateBlock = ( parsedTemplate: string ) =>
212
+ templates.includes( parsedTemplate );
213
+
214
+ // @todo Refactor when there will be possible to show a block according on a template/post with a Gutenberg API. https://github.com/WordPress/gutenberg/pull/41718
215
+
216
+ let currentTemplateId: string | undefined;
217
+
218
+ if ( isExperimentalBuild() ) {
219
+ subscribe( () => {
220
+ const previousTemplateId = currentTemplateId;
221
+ const store = select( 'core/edit-site' );
222
+ currentTemplateId = store?.getEditedPostId() as string | undefined;
223
+
224
+ if ( previousTemplateId === currentTemplateId ) {
225
+ return;
226
+ }
227
+
228
+ const parsedTemplate = currentTemplateId?.split( '//' )[ 1 ];
229
+
230
+ if ( parsedTemplate === null || parsedTemplate === undefined ) {
231
+ return;
232
+ }
233
+
234
+ const block = getBlockType( BLOCK_SLUG );
235
+
236
+ if (
237
+ block !== undefined &&
238
+ ( ! hasTemplateSupportForClassicTemplateBlock( parsedTemplate ) ||
239
+ isClassicTemplateBlockRegisteredWithAnotherTitle(
240
+ block,
241
+ parsedTemplate
242
+ ) )
243
+ ) {
244
+ unregisterBlockType( BLOCK_SLUG );
245
+ currentTemplateId = undefined;
246
+ return;
247
+ }
248
+
249
+ if (
250
+ block === undefined &&
251
+ hasTemplateSupportForClassicTemplateBlock( parsedTemplate )
252
+ ) {
253
+ registerClassicTemplateBlock( {
254
+ template: parsedTemplate,
255
+ inserter: true,
256
+ } );
257
+ }
258
+ } );
259
+ } else {
260
+ registerClassicTemplateBlock( {
261
+ inserter: false,
262
+ } );
263
+ }
build/active-filters.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', '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', 'wp-primitives', 'wp-url'), 'version' => '7fb9264f7003c17daa86c9f31c20381e');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', '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', 'wp-primitives', 'wp-url'), 'version' => 'ccb83a74f24797ba4de25f278269e7b4');
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-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'a89fb5c156480b844c033ce2150841a8');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'c1c29d527b5ef766268ab1a873f6e8ab');
build/all-products-frontend.js CHANGED
@@ -1,6 +1,6 @@
1
  !function(e){function t(t){for(var r,o,c=t[0],i=t[1],s=0,l=[];s<c.length;s++)o=c[s],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);for(a&&a(t);l.length;)l.shift()()}var r={},n={9:0,73:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var c=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=c);var i,s=document.createElement("script");s.charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",1:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6",58:"product-add-to-cart",59:"product-button",60:"product-category-list",61:"product-image",62:"product-price",63:"product-rating",64:"product-sale-badge",65:"product-sku",66:"product-stock-indicator",67:"product-summary",68:"product-tag-list",69:"product-title",74:"vendors--product-add-to-cart"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",1:"cc9016fd3805a088b2e8",58:"1183ebd06ff9ce0807a3",59:"428819e3910f82cf88df",60:"d661fd1a2414c5df92e5",61:"a93336ad5a4f78393e16",62:"5ee407aec5f3e4e87824",63:"55e38930640252d3af8e",64:"731a7688ea9757432368",65:"4801f2c3254f98af0306",66:"260b8a85642edfab8536",67:"7e5ba67a415e2a6e4b78",68:"7a3a7a8ff8f6bda909e2",69:"162305606f780906a834",74:"4f97a2cdac956338218b"}[e]}(e);var a=new Error;i=function(t){s.onerror=s.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",a.name="ChunkLoadError",a.type=o,a.request=c,r[1](a)}n[e]=void 0}};var l=setTimeout((function(){i({type:"timeout",target:s})}),12e4);s.onerror=s.onload=i,document.head.appendChild(s)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var a=i;o(o.s=211)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===c)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.data},,,function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),c=r(0),i=r(3),s=r(1),a=r(46),l=e=>{let{imageUrl:t=a.l+"/block-error.svg",header:r=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),l&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:i,renderError:s,button:a}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof s?s({errorMessage:u}):Object(c.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:i,button:a}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},,function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";(function(e){var n=r(0);r(36);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(54))},function(e,t){e.exports=window.wp.deprecated},,function(e,t,r){"use strict";var n=r(0),o=r(5),c=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:i,wrapperProps:s={}}=e;const a=null!=r,l=null!=o;return!a&&l?(t=i||"span",s={...s,className:c()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,o)):(t=i||n.Fragment,a&&l&&r!==o?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,s,r))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);const o=Object(n.createContext)("page"),c=()=>Object(n.useContext)(o);o.Provider},,function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(n.useContext)(o)},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(13),c=r.n(o);function i(e){const t=Object(n.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(4),o=r(0),c=r(6),i=r(8),s=r(18),a=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(i.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},b=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},f={...m,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},h=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(s.decodeEntities)(r)]})),E={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:f,shippingAddress:m,shippingRates:c.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),s=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();b();const p=Object(i.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingData:f,billingAddress:f,shippingAddress:m,extensions:c.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),i=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),b=o.isCustomerDataUpdating(),{receiveCart:g}=n(c.CART_STORE_KEY),O=h(i.billingAddress),w=i.needsShipping?h(i.shippingAddress):O,j=i.fees.length>0?i.fees.map(e=>h(e)):c.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:j,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(a.a)(O),billingAddress:Object(a.a)(O),shippingAddress:Object(a.a)(w),extensions:i.extensions,shippingRates:i.shippingRates,isLoadingRates:b,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:g}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},,function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),c=r(14),i=function({icon:e,className:t,...r}){const c=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:c},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(i,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&i===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===c.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(c.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0);t.a=Object(c.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(c.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return b}));var n=r(6),o=r(8),c=r(0),i=r(13),s=r.n(i),a=r(32),l=r(60),u=r(26);const d=e=>{const t=Object(u.a)();e=e||t;const r=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:i}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(c.useCallback)(t=>{i(e,t)},[e,i])]},p=(e,t,r)=>{const i=Object(u.a)();r=r||i;const s=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:a}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[s,Object(c.useCallback)(t=>{a(r,e,t)},[r,e,a])]},b=(e,t)=>{const r=Object(u.a)();t=t||r;const[n,o]=d(t),i=Object(a.a)(n),p=Object(a.a)(e),b=Object(l.a)(p),m=Object(c.useRef)(!1);return Object(c.useEffect)(()=>{s()(b,p)||(o(Object.assign({},i,p)),m.current=!0)},[i,p,b,o]),m.current?[n,o]:[e,o]}},,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";var n=r(7),o=r(0),c=r(5),i=r.n(c),s=r(4),a=r(23),l=r.n(a),u=r(11),d=r(44),p=r(70),b=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const c=o.getBoundingClientRect();return new n.DOMRect(e.left+c.left,e.top+c.top,e.width,e.height)}let f=0;function g(e){const t=document.scrollingElement||document.body;e&&(f=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=f)}let h=0;function E(){return Object(o.useEffect)(()=>(0===h&&g(!0),++h,()=>{1===h&&g(!1),--h}),[]),null}var O=r(22);function w(e){const t=Object(o.useContext)(O.a),r=t.slots[e]||{},n=t.fills[e],c=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:c,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var j=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function v({name:e,children:t,registerFill:r,unregisterFill:n}){const c=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(j),[n,c]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(c(t(e)),r(()=>{c(t(e))})),[e]),n})(e),i=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,i.current),()=>n(e,i.current)),[]),Object(o.useLayoutEffect)(()=>{i.current.children=t,c&&c.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==i.current.name&&(n(i.current.name,i.current),i.current.name=e,r(e,i.current))},[e]),c&&c.node?(Object(s.isFunction)(t)&&(t=t(c.props.fillProps)),Object(o.createPortal)(t,c.node)):null}var y=e=>Object(o.createElement)(j.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(v,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class _ extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,c=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(c):c)}}var x=e=>Object(o.createElement)(j.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:c})=>Object(o.createElement)(_,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:c})));function k(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function S({name:e,children:t}){const r=w(e),n=Object(o.useRef)({rerender:k()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var C=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...c},i){const s=Object(o.useContext)(O.a),a=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,a,t),()=>{s.unregisterSlot(e,a)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([i,a])},c))}));function P(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(y,e),Object(o.createElement)(S,e))}r(13),o.Component;const R=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(C,Object(n.a)({},t,{ref:r})):Object(o.createElement)(x,t));function N(e){return"appear"===e?"top":"left"}function T(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:c}=(i=t).ownerDocument.defaultView.getComputedStyle(i);var i;const s=r?parseInt(r,10):0,a=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=c?parseInt(c,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-a,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-a}}function L(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function B(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function A(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const M=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:c,noArrow:s=!0,isAlternate:a,position:f="bottom right",range:g,focusOnMount:h="firstElement",anchorRef:O,shouldAnchorIncludePadding:j,anchorRect:v,getAnchorRect:y,expandOnMobile:_,animate:x=!0,onClickOutside:k,onFocusOutside:S,__unstableStickyBoundaryElement:C,__unstableSlotName:R="Popover",__unstableObserveElement:M,__unstableBoundaryParent:F,__unstableForcePosition:I,__unstableForceXAlignment:D,...z},H)=>{const W=Object(o.useRef)(null),V=Object(o.useRef)(null),Y=Object(o.useRef)(),U=Object(u.useViewportMatch)("medium","<"),[q,G]=Object(o.useState)(),K=w(R),X=_&&U,[J,Z]=Object(u.useResizeObserver)();s=X||s,Object(o.useLayoutEffect)(()=>{if(X)return A(Y.current,"is-without-arrow",s),A(Y.current,"is-alternate",a),L(Y.current,"data-x-axis"),L(Y.current,"data-y-axis"),B(Y.current,"top"),B(Y.current,"left"),B(V.current,"maxHeight"),void B(V.current,"maxWidth");const e=()=>{if(!Y.current||!V.current)return;let e=function(e,t,r,n=!1,o,c){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,c)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,c);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,c);return o?e:T(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,i.bottom-r.top),e.ownerDocument,c);return o?s:T(s,n)}if(!e.current)return;const{parentNode:i}=e.current,s=i.getBoundingClientRect();return o?s:T(s,i)}(W,v,y,O,j,Y.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=Y.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var c;F&&(n=null===(c=Y.current.closest(".popover-slot"))||void 0===c?void 0:c.parentNode);const i=Z.height?Z:V.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:g,contentHeight:h,contentWidth:E}=function(e,t,r="top",n,o,c,i,s,a){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,c,i,s){const{height:a}=t;if(o){const t=o.getBoundingClientRect().top+a-i;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a};let b,m=r,f=null;if(!o&&!s)if("middle"===r&&u.contentHeight===a)m="middle";else if("top"===r&&d.contentHeight===a)m="top";else if("bottom"===r&&p.contentHeight===a)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;f=e!==a?e:null}return b="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:b,contentHeight:f}}(e,t,l,d,n,0,c,s);return{...function(e,t,r,n,o,c,i,s,a){const{width:l}=t;"left"===r&&Object(b.isRTL)()?r="right":"right"===r&&Object(b.isRTL)()&&(r="left"),"left"===n&&Object(b.isRTL)()?n="right":"right"===n&&Object(b.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===c||a||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===c||a||(m=u);const f={popoverLeft:p,contentWidth:p-l>0?l:p},g={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let h,E=r,O=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&f.contentWidth===l)E="left";else if("right"===r&&g.contentWidth===l)E="right";else{E=f.contentWidth>g.contentWidth?"left":"right";const e="left"===E?f.contentWidth:g.contentWidth;l>window.innerWidth&&(O=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(h="center"===E?d.popoverLeft:"left"===E?f.popoverLeft:g.popoverLeft,i){const e=i.getBoundingClientRect();h=Math.min(h,e.right-l),Object(b.isRTL)()||(h=Math.max(h,0))}return{xAxis:E,popoverLeft:h,contentWidth:O}}(e,t,u,d,n,p.yAxis,i,s,a),...p}}(e,i,f,C,Y.current,o,n,I,D);"number"==typeof l&&"number"==typeof u&&(B(Y.current,"top",l+"px"),B(Y.current,"left",u+"px")),A(Y.current,"is-without-arrow",s||"center"===p&&"middle"===g),A(Y.current,"is-alternate",a),L(Y.current,"data-x-axis",p),L(Y.current,"data-y-axis",g),B(V.current,"maxHeight","number"==typeof h?h+"px":""),B(V.current,"maxWidth","number"==typeof E?E+"px":""),G(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=Y.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const c=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",c),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const i=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(O);let l;return i&&i!==t&&(i.defaultView.addEventListener("resize",e),i.defaultView.addEventListener("scroll",e,!0)),M&&(l=new r.MutationObserver(e),l.observe(M,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",c),r.cancelAnimationFrame(o),i&&i!==t&&(i.defaultView.removeEventListener("resize",e),i.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[X,v,y,O,j,f,Z,C,M,F]);const $=(e,r)=>{if("focus-outside"===e&&S)S(r);else if("focus-outside"===e&&k){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),k(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:h,__unstableOnClose:$,onClose:$}),re=Object(u.useMergeRefs)([Y,ee,H]),ne=Boolean(x&&q)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:r=N(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return i()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:i()("components-popover",c,ne,{"is-expanded":X,"is-without-arrow":s,"is-alternate":a})},z,{ref:re},te,{tabIndex:"-1"}),X&&Object(o.createElement)(E,null),X&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Q,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:V,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return K.ref&&(oe=Object(o.createElement)(P,{name:R},oe)),O||v?oe:Object(o.createElement)("span",{ref:W},oe)});M.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(R,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var F=M,I=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const D=Object(o.createElement)("div",{className:"event-catcher"}),z=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(D,e),Object(o.cloneElement)(t,{children:r}),","),e),H=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),W=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var V=function({children:e,position:t,text:r,shortcut:n}){const[c,i]=Object(o.useState)(!1),[a,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{W(e,"onMouseDown",t),document.addEventListener("mouseup",f),i(!0)},b=t=>{W(e,"onMouseUp",t),document.removeEventListener("mouseup",f),i(!1)},m=e=>"mouseUp"===e?b:"mouseDown"===e?p:void 0,f=m("mouseUp"),g=(t,r)=>n=>{if(W(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&c)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==a&&(r?d(o):l(o))},h=()=>{d.cancel(),document.removeEventListener("mouseup",f)};if(Object(o.useEffect)(()=>h,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:g("onMouseEnter",!0),onMouseLeave:g("onMouseLeave"),onClick:g("onClick"),onFocus:g("onFocus"),onBlur:g("onBlur"),onMouseDown:m("mouseDown")},O=o.Children.only(e),{children:w,disabled:j}=O.props;return(j?z:H)({child:O,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:c})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(F,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(I,{className:"components-tooltip__shortcut",shortcut:c}))))({grandchildren:w,isOver:a,position:t,text:r,shortcut:n})})},Y=r(37),U=r(38);const q=["onMouseDown","onClick"];var Q=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:c,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:b,disabled:m,icon:f,iconPosition:g="left",iconSize:h,showTooltip:E,tooltipPosition:O,shortcut:w,label:j,children:v,text:y,variant:_,__experimentalIsFocusable:x,describedBy:k,...S}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:c,...i}){let s=c;var a,u,d,p,b;return t&&(null!==(a=s)&&void 0!==a||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(b=s)&&void 0!==b||(s="link")),{...i,variant:s}}(e),C=i()("components-button",b,{"is-secondary":"secondary"===_,"is-primary":"primary"===_,"is-small":a,"is-tertiary":"tertiary"===_,"is-pressed":u,"is-busy":d,"is-link":"link"===_,"is-destructive":p,"has-text":!!f&&!!v,"has-icon":!!f}),P=m&&!x,R=void 0===r||P?"button":"a",N="a"===R?{href:r,target:c}:{type:"button",disabled:P,"aria-pressed":u};if(m&&x){N["aria-disabled"]=!0;for(const e of q)S[e]=e=>{e.stopPropagation(),e.preventDefault()}}const T=!P&&(E&&j||w||!!j&&(!v||Object(s.isArray)(v)&&!v.length)&&!1!==E),L=k?Object(s.uniqueId)():null,B=S["aria-describedby"]||L,A=Object(o.createElement)(R,Object(n.a)({},N,S,{className:C,"aria-label":S["aria-label"]||j,"aria-describedby":B,ref:t}),f&&"left"===g&&Object(o.createElement)(Y.a,{icon:f,size:h}),y&&Object(o.createElement)(o.Fragment,null,y),f&&"right"===g&&Object(o.createElement)(Y.a,{icon:f,size:h}),v);return T?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(V,{text:k||j,shortcut:w,position:O},A),k&&Object(o.createElement)(U.a,null,Object(o.createElement)("span",{id:L},k))):Object(o.createElement)(o.Fragment,null,A,k&&Object(o.createElement)(U.a,null,Object(o.createElement)("span",{id:L},k)))}))},function(e,t){e.exports=window.wp.dom},function(e,t){e.exports=window.wc.wcBlocksSharedContext},function(e,t,r){"use strict";r.d(t,"n",(function(){return c})),r.d(t,"l",(function(){return i})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return f})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return E}));var n,o=r(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",s=c.pluginUrl+"build/",a=c.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),b=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),f=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),c=r(71),i=r(52);const s=Object(n.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
- Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.a)(e.priority)&&(t.index=e.priority),Object(i.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(s).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,a(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),c=r(0),i=r(16);const s=[".wp-block-woocommerce-cart"],a=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),l=s(e,r),u={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:a={}}=e;Object(c.render)(Object(c.createElement)(i.a,a,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(c.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:c}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:c}=e;const i=document.body.querySelectorAll(o);c&&c.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:c}=e;const i=c.querySelectorAll(o);a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t){var r,n,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===c||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:c}catch(e){r=c}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&b())}function b(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d<t;)a&&a[d].run();d=-1,t=l.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||s(b)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=f,o.addListener=f,o.once=f,o.off=f,o.removeListener=f,o.removeAllListeners=f,o.emit=f,o.prependListener=f,o.prependOnceListener=f,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(42),o=r(0),c=r(33);const i=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return i}));var n=r(0);const o=Object(n.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),c=()=>Object(n.useContext)(o),i=e=>{let{children:t}=e;const[r,c]=Object(n.useState)(!1),i={setIsSuppressed:c,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:i},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(6),o=r(8),c=r(0),i=r(32),s=r(74);const a=e=>{const{namespace:t,resourceName:r,resourceValues:a=[],query:l={},shouldSelect:u=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(c.useRef)({results:[],isLoading:!0}),p=Object(i.a)(l),b=Object(i.a)(a),m=Object(s.a)(),f=Object(o.useSelect)(e=>{if(!u)return null;const o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,p,b],i=o.getCollectionError(...c);if(i){if(!(i instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(i)}return{results:o.getCollection(...c),isLoading:!o.hasFinishedResolution("getCollection",c)}},[t,r,b,p,u]);return null!==f&&(d.current=f),d.current}},,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return a}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:c,detail:i={}}=t;if(!n)return;c||(c=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:i});c.dispatchEvent(s)};let c;const i=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},function(e,t,r){"use strict";var n=r(0),o=r(14);const c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},function(e,t){e.exports=window.wp.blockEditor},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(12),o=r.n(n),c=r(0);r(106);const i=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(c.useRef)(null);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(c.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];i(e),null==e||e.focus()}else i(e)})(e,r):i(e))})(r.current,e)}})))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),c=r(5),i=r.n(c),s=r(1),a=r(21),l=r(70),u=r(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:c=r,onRemove:p=o.noop,isDismissible:b=!0,actions:m=[],politeness:f=d(t),__unstableHTML:g,onDismiss:h=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(a.speak)(r,t)},[r,t])}(c,f);const E=i()(e,"components-notice","is-"+t,{"is-dismissible":b});return g&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:c=!1,onClick:s,url:a},l)=>{let d=o;return"primary"===o||c||(d=a?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:a,variant:d,onClick:a?void 0:s,className:i()("components-notice__action",e)},t)}))),b&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),h(),p()},showTooltip:!1}))}},,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.blocks},,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{icon:t,size:r=24,...o}=e;return Object(n.cloneElement)(t,{width:r,height:r,...o})}},,function(e,t){},,function(e,t,r){"use strict";var n=r(0),o=r(5),c=r.n(o),i=r(25),s=r(11);r(123),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:r,label:o="",onChange:s,options:a,screenReaderLabel:l,value:u}=e;const d="wc-block-components-sort-select__select-"+r;return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,value:u},a&&a.map(e=>Object(n.createElement)("option",{key:e.key,value:e.key},e.label))))})},,,,,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return i}));var n=r(47),o=(r(15),r(2));const c=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),i=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),c=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(c[r]="")}),c}},,,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(12),o=r.n(n),c=r(0),i=r(5),s=r.n(i),a=r(77),l=r(8),u=(r(80),r(59));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:i}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:b}=Object(l.useDispatch)("core/notices"),m=p.filter(e=>"snackbar"!==e.type).concat(n);if(!m.length)return null;const f=s()(t,"wc-block-components-notices");return i?null:Object(c.createElement)("div",{className:f},m.map(e=>Object(c.createElement)(a.a,o()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&b(e.id,r)}}),e.content)))}},,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(17),o=r(0),c=r(46);r.p=c.k,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(62)]).then(r.bind(null,404)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>r.e(61).then(r.bind(null,448)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>r.e(69).then(r.bind(null,449)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>r.e(63).then(r.bind(null,405)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>r.e(59).then(r.bind(null,406)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>r.e(67).then(r.bind(null,407)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>r.e(64).then(r.bind(null,317)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>r.e(65).then(r.bind(null,408)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>r.e(60).then(r.bind(null,409)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>r.e(68).then(r.bind(null,410)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>r.e(66).then(r.bind(null,411)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([r.e(1),r.e(74),r.e(58)]).then(r.bind(null,431)))});const i=e=>Object(n.getRegisteredBlockComponents)(e)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(240)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(59),c=r(51),i=r(3),s=r(1),a=r(4),l=r(5),u=r.n(l),d=r(25);r(214);var p=e=>{let{currentPage:t,displayFirstAndLastPages:r=!0,displayNextAndPreviousArrows:o=!0,pagesToDisplay:c=3,onPageChange:i,totalPages:a}=e,{minIndex:l,maxIndex:p}=((e,t,r)=>{if(r<=2)return{minIndex:null,maxIndex:null};const n=e-1,o=Math.max(Math.floor(t-n/2),2),c=Math.min(Math.ceil(t+(n-(t-o))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(c-t))),2),maxIndex:c}})(c,t,a);const b=r&&Boolean(1!==l),m=r&&Boolean(p!==a),f=r&&Boolean(l&&l>3),g=r&&Boolean(p&&p<a-2);b&&3===l&&(l-=1),m&&p===a-2&&(p+=1);const h=[];if(l&&p)for(let e=l;e<=p;e++)h.push(e);return Object(n.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(n.createElement)(d.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),o&&Object(n.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>i(t-1),title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(n.createElement)(d.a,{label:"←",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),b&&Object(n.createElement)("button",{className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>i(1),disabled:1===t},Object(n.createElement)(d.a,{label:"1",screenReaderLabel:Object(s.sprintf)(
4
  /* translators: %d is the page number (1, 2, 3...). */
5
  Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),h.map(e=>Object(n.createElement)("button",{key:e,className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?void 0:()=>i(e),disabled:t===e},Object(n.createElement)(d.a,{label:e.toString(),screenReaderLabel:Object(s.sprintf)(
6
  /* translators: %d is the page number (1, 2, 3...). */
1
  !function(e){function t(t){for(var r,o,c=t[0],i=t[1],s=0,l=[];s<c.length;s++)o=c[s],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);for(a&&a(t);l.length;)l.shift()()}var r={},n={9:0,73:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var c=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=c);var i,s=document.createElement("script");s.charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",1:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6",58:"product-add-to-cart",59:"product-button",60:"product-category-list",61:"product-image",62:"product-price",63:"product-rating",64:"product-sale-badge",65:"product-sku",66:"product-stock-indicator",67:"product-summary",68:"product-tag-list",69:"product-title",74:"vendors--product-add-to-cart"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",1:"cc9016fd3805a088b2e8",58:"1183ebd06ff9ce0807a3",59:"428819e3910f82cf88df",60:"d661fd1a2414c5df92e5",61:"a93336ad5a4f78393e16",62:"5ee407aec5f3e4e87824",63:"55e38930640252d3af8e",64:"731a7688ea9757432368",65:"4801f2c3254f98af0306",66:"260b8a85642edfab8536",67:"7e5ba67a415e2a6e4b78",68:"7a3a7a8ff8f6bda909e2",69:"162305606f780906a834",74:"4f97a2cdac956338218b"}[e]}(e);var a=new Error;i=function(t){s.onerror=s.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",a.name="ChunkLoadError",a.type=o,a.request=c,r[1](a)}n[e]=void 0}};var l=setTimeout((function(){i({type:"timeout",target:s})}),12e4);s.onerror=s.onload=i,document.head.appendChild(s)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var a=i;o(o.s=211)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===c)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.data},,,function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),c=r(0),i=r(3),s=r(1),a=r(46),l=e=>{let{imageUrl:t=a.l+"/block-error.svg",header:r=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),l&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:i,renderError:s,button:a}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof s?s({errorMessage:u}):Object(c.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:i,button:a}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},,function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";(function(e){var n=r(0);r(36);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(54))},function(e,t){e.exports=window.wp.deprecated},,function(e,t,r){"use strict";var n=r(0),o=r(5),c=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:i,wrapperProps:s={}}=e;const a=null!=r,l=null!=o;return!a&&l?(t=i||"span",s={...s,className:c()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,o)):(t=i||n.Fragment,a&&l&&r!==o?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,s,r))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);const o=Object(n.createContext)("page"),c=()=>Object(n.useContext)(o);o.Provider},,function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(n.useContext)(o)},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(13),c=r.n(o);function i(e){const t=Object(n.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(4),o=r(0),c=r(6),i=r(8),s=r(18),a=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(i.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},b=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},f={...m,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},h=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(s.decodeEntities)(r)]})),E={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:f,shippingAddress:m,shippingRates:c.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),s=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();b();const p=Object(i.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingData:f,billingAddress:f,shippingAddress:m,extensions:c.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),i=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),b=o.isCustomerDataUpdating(),{receiveCart:g}=n(c.CART_STORE_KEY),O=h(i.billingAddress),w=i.needsShipping?h(i.shippingAddress):O,j=i.fees.length>0?i.fees.map(e=>h(e)):c.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:j,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(a.a)(O),billingAddress:Object(a.a)(O),shippingAddress:Object(a.a)(w),extensions:i.extensions,shippingRates:i.shippingRates,isLoadingRates:b,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:g}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},,function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),c=r(14),i=function({icon:e,className:t,...r}){const c=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:c},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(i,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&i===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===c.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(c.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0);t.a=Object(c.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(c.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return b}));var n=r(6),o=r(8),c=r(0),i=r(13),s=r.n(i),a=r(32),l=r(60),u=r(26);const d=e=>{const t=Object(u.a)();e=e||t;const r=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:i}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(c.useCallback)(t=>{i(e,t)},[e,i])]},p=(e,t,r)=>{const i=Object(u.a)();r=r||i;const s=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:a}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[s,Object(c.useCallback)(t=>{a(r,e,t)},[r,e,a])]},b=(e,t)=>{const r=Object(u.a)();t=t||r;const[n,o]=d(t),i=Object(a.a)(n),p=Object(a.a)(e),b=Object(l.a)(p),m=Object(c.useRef)(!1);return Object(c.useEffect)(()=>{s()(b,p)||(o(Object.assign({},i,p)),m.current=!0)},[i,p,b,o]),m.current?[n,o]:[e,o]}},,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";var n=r(7),o=r(0),c=r(5),i=r.n(c),s=r(4),a=r(23),l=r.n(a),u=r(11),d=r(44),p=r(70),b=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const c=o.getBoundingClientRect();return new n.DOMRect(e.left+c.left,e.top+c.top,e.width,e.height)}let f=0;function g(e){const t=document.scrollingElement||document.body;e&&(f=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=f)}let h=0;function E(){return Object(o.useEffect)(()=>(0===h&&g(!0),++h,()=>{1===h&&g(!1),--h}),[]),null}var O=r(22);function w(e){const t=Object(o.useContext)(O.a),r=t.slots[e]||{},n=t.fills[e],c=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:c,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var j=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function v({name:e,children:t,registerFill:r,unregisterFill:n}){const c=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(j),[n,c]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(c(t(e)),r(()=>{c(t(e))})),[e]),n})(e),i=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,i.current),()=>n(e,i.current)),[]),Object(o.useLayoutEffect)(()=>{i.current.children=t,c&&c.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==i.current.name&&(n(i.current.name,i.current),i.current.name=e,r(e,i.current))},[e]),c&&c.node?(Object(s.isFunction)(t)&&(t=t(c.props.fillProps)),Object(o.createPortal)(t,c.node)):null}var y=e=>Object(o.createElement)(j.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(v,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class _ extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,c=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(c):c)}}var x=e=>Object(o.createElement)(j.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:c})=>Object(o.createElement)(_,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:c})));function k(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function S({name:e,children:t}){const r=w(e),n=Object(o.useRef)({rerender:k()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var C=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...c},i){const s=Object(o.useContext)(O.a),a=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,a,t),()=>{s.unregisterSlot(e,a)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([i,a])},c))}));function P(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(y,e),Object(o.createElement)(S,e))}r(13),o.Component;const R=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(C,Object(n.a)({},t,{ref:r})):Object(o.createElement)(x,t));function N(e){return"appear"===e?"top":"left"}function T(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:c}=(i=t).ownerDocument.defaultView.getComputedStyle(i);var i;const s=r?parseInt(r,10):0,a=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=c?parseInt(c,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-a,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-a}}function L(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function B(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function A(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const M=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:c,noArrow:s=!0,isAlternate:a,position:f="bottom right",range:g,focusOnMount:h="firstElement",anchorRef:O,shouldAnchorIncludePadding:j,anchorRect:v,getAnchorRect:y,expandOnMobile:_,animate:x=!0,onClickOutside:k,onFocusOutside:S,__unstableStickyBoundaryElement:C,__unstableSlotName:R="Popover",__unstableObserveElement:M,__unstableBoundaryParent:F,__unstableForcePosition:I,__unstableForceXAlignment:D,...z},H)=>{const W=Object(o.useRef)(null),V=Object(o.useRef)(null),Y=Object(o.useRef)(),U=Object(u.useViewportMatch)("medium","<"),[q,G]=Object(o.useState)(),K=w(R),X=_&&U,[J,Z]=Object(u.useResizeObserver)();s=X||s,Object(o.useLayoutEffect)(()=>{if(X)return A(Y.current,"is-without-arrow",s),A(Y.current,"is-alternate",a),L(Y.current,"data-x-axis"),L(Y.current,"data-y-axis"),B(Y.current,"top"),B(Y.current,"left"),B(V.current,"maxHeight"),void B(V.current,"maxWidth");const e=()=>{if(!Y.current||!V.current)return;let e=function(e,t,r,n=!1,o,c){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,c)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,c);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,c);return o?e:T(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,i.bottom-r.top),e.ownerDocument,c);return o?s:T(s,n)}if(!e.current)return;const{parentNode:i}=e.current,s=i.getBoundingClientRect();return o?s:T(s,i)}(W,v,y,O,j,Y.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=Y.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var c;F&&(n=null===(c=Y.current.closest(".popover-slot"))||void 0===c?void 0:c.parentNode);const i=Z.height?Z:V.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:g,contentHeight:h,contentWidth:E}=function(e,t,r="top",n,o,c,i,s,a){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,c,i,s){const{height:a}=t;if(o){const t=o.getBoundingClientRect().top+a-i;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a};let b,m=r,f=null;if(!o&&!s)if("middle"===r&&u.contentHeight===a)m="middle";else if("top"===r&&d.contentHeight===a)m="top";else if("bottom"===r&&p.contentHeight===a)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;f=e!==a?e:null}return b="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:b,contentHeight:f}}(e,t,l,d,n,0,c,s);return{...function(e,t,r,n,o,c,i,s,a){const{width:l}=t;"left"===r&&Object(b.isRTL)()?r="right":"right"===r&&Object(b.isRTL)()&&(r="left"),"left"===n&&Object(b.isRTL)()?n="right":"right"===n&&Object(b.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===c||a||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===c||a||(m=u);const f={popoverLeft:p,contentWidth:p-l>0?l:p},g={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let h,E=r,O=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&f.contentWidth===l)E="left";else if("right"===r&&g.contentWidth===l)E="right";else{E=f.contentWidth>g.contentWidth?"left":"right";const e="left"===E?f.contentWidth:g.contentWidth;l>window.innerWidth&&(O=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(h="center"===E?d.popoverLeft:"left"===E?f.popoverLeft:g.popoverLeft,i){const e=i.getBoundingClientRect();h=Math.min(h,e.right-l),Object(b.isRTL)()||(h=Math.max(h,0))}return{xAxis:E,popoverLeft:h,contentWidth:O}}(e,t,u,d,n,p.yAxis,i,s,a),...p}}(e,i,f,C,Y.current,o,n,I,D);"number"==typeof l&&"number"==typeof u&&(B(Y.current,"top",l+"px"),B(Y.current,"left",u+"px")),A(Y.current,"is-without-arrow",s||"center"===p&&"middle"===g),A(Y.current,"is-alternate",a),L(Y.current,"data-x-axis",p),L(Y.current,"data-y-axis",g),B(V.current,"maxHeight","number"==typeof h?h+"px":""),B(V.current,"maxWidth","number"==typeof E?E+"px":""),G(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=Y.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const c=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",c),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const i=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(O);let l;return i&&i!==t&&(i.defaultView.addEventListener("resize",e),i.defaultView.addEventListener("scroll",e,!0)),M&&(l=new r.MutationObserver(e),l.observe(M,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",c),r.cancelAnimationFrame(o),i&&i!==t&&(i.defaultView.removeEventListener("resize",e),i.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[X,v,y,O,j,f,Z,C,M,F]);const $=(e,r)=>{if("focus-outside"===e&&S)S(r);else if("focus-outside"===e&&k){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),k(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:h,__unstableOnClose:$,onClose:$}),re=Object(u.useMergeRefs)([Y,ee,H]),ne=Boolean(x&&q)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:r=N(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return i()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:i()("components-popover",c,ne,{"is-expanded":X,"is-without-arrow":s,"is-alternate":a})},z,{ref:re},te,{tabIndex:"-1"}),X&&Object(o.createElement)(E,null),X&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Q,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:V,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return K.ref&&(oe=Object(o.createElement)(P,{name:R},oe)),O||v?oe:Object(o.createElement)("span",{ref:W},oe)});M.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(R,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var F=M,I=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const D=Object(o.createElement)("div",{className:"event-catcher"}),z=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(D,e),Object(o.cloneElement)(t,{children:r}),","),e),H=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),W=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var V=function({children:e,position:t,text:r,shortcut:n}){const[c,i]=Object(o.useState)(!1),[a,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{W(e,"onMouseDown",t),document.addEventListener("mouseup",f),i(!0)},b=t=>{W(e,"onMouseUp",t),document.removeEventListener("mouseup",f),i(!1)},m=e=>"mouseUp"===e?b:"mouseDown"===e?p:void 0,f=m("mouseUp"),g=(t,r)=>n=>{if(W(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&c)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==a&&(r?d(o):l(o))},h=()=>{d.cancel(),document.removeEventListener("mouseup",f)};if(Object(o.useEffect)(()=>h,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:g("onMouseEnter",!0),onMouseLeave:g("onMouseLeave"),onClick:g("onClick"),onFocus:g("onFocus"),onBlur:g("onBlur"),onMouseDown:m("mouseDown")},O=o.Children.only(e),{children:w,disabled:j}=O.props;return(j?z:H)({child:O,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:c})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(F,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(I,{className:"components-tooltip__shortcut",shortcut:c}))))({grandchildren:w,isOver:a,position:t,text:r,shortcut:n})})},Y=r(37),U=r(38);const q=["onMouseDown","onClick"];var Q=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:c,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:b,disabled:m,icon:f,iconPosition:g="left",iconSize:h,showTooltip:E,tooltipPosition:O,shortcut:w,label:j,children:v,text:y,variant:_,__experimentalIsFocusable:x,describedBy:k,...S}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:c,...i}){let s=c;var a,u,d,p,b;return t&&(null!==(a=s)&&void 0!==a||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(b=s)&&void 0!==b||(s="link")),{...i,variant:s}}(e),C=i()("components-button",b,{"is-secondary":"secondary"===_,"is-primary":"primary"===_,"is-small":a,"is-tertiary":"tertiary"===_,"is-pressed":u,"is-busy":d,"is-link":"link"===_,"is-destructive":p,"has-text":!!f&&!!v,"has-icon":!!f}),P=m&&!x,R=void 0===r||P?"button":"a",N="a"===R?{href:r,target:c}:{type:"button",disabled:P,"aria-pressed":u};if(m&&x){N["aria-disabled"]=!0;for(const e of q)S[e]=e=>{e.stopPropagation(),e.preventDefault()}}const T=!P&&(E&&j||w||!!j&&(!v||Object(s.isArray)(v)&&!v.length)&&!1!==E),L=k?Object(s.uniqueId)():null,B=S["aria-describedby"]||L,A=Object(o.createElement)(R,Object(n.a)({},N,S,{className:C,"aria-label":S["aria-label"]||j,"aria-describedby":B,ref:t}),f&&"left"===g&&Object(o.createElement)(Y.a,{icon:f,size:h}),y&&Object(o.createElement)(o.Fragment,null,y),f&&"right"===g&&Object(o.createElement)(Y.a,{icon:f,size:h}),v);return T?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(V,{text:k||j,shortcut:w,position:O},A),k&&Object(o.createElement)(U.a,null,Object(o.createElement)("span",{id:L},k))):Object(o.createElement)(o.Fragment,null,A,k&&Object(o.createElement)(U.a,null,Object(o.createElement)("span",{id:L},k)))}))},function(e,t){e.exports=window.wp.dom},function(e,t){e.exports=window.wc.wcBlocksSharedContext},function(e,t,r){"use strict";r.d(t,"n",(function(){return c})),r.d(t,"l",(function(){return i})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return f})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return E}));var n,o=r(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"images/",s=c.pluginUrl+"build/",a=c.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),b=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),f=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),c=r(71),i=r(52);const s=Object(n.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
+ Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.a)(e.priority)&&(t.index=e.priority),Object(i.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(s).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,a(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),c=r(0),i=r(16);const s=[".wp-block-woocommerce-cart"],a=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),l=s(e,r),u={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:a={}}=e;Object(c.render)(Object(c.createElement)(i.a,a,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(c.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:c}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:c}=e;const i=document.body.querySelectorAll(o);c&&c.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:c}=e;const i=c.querySelectorAll(o);a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t){var r,n,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===c||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:c}catch(e){r=c}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&b())}function b(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d<t;)a&&a[d].run();d=-1,t=l.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function f(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||s(b)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=f,o.addListener=f,o.once=f,o.off=f,o.removeListener=f,o.removeAllListeners=f,o.emit=f,o.prependListener=f,o.prependOnceListener=f,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(42),o=r(0),c=r(33);const i=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return i}));var n=r(0);const o=Object(n.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),c=()=>Object(n.useContext)(o),i=e=>{let{children:t}=e;const[r,c]=Object(n.useState)(!1),i={setIsSuppressed:c,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:i},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(6),o=r(8),c=r(0),i=r(32),s=r(74);const a=e=>{const{namespace:t,resourceName:r,resourceValues:a=[],query:l={},shouldSelect:u=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(c.useRef)({results:[],isLoading:!0}),p=Object(i.a)(l),b=Object(i.a)(a),m=Object(s.a)(),f=Object(o.useSelect)(e=>{if(!u)return null;const o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,p,b],i=o.getCollectionError(...c);if(i){if(!(i instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(i)}return{results:o.getCollection(...c),isLoading:!o.hasFinishedResolution("getCollection",c)}},[t,r,b,p,u]);return null!==f&&(d.current=f),d.current}},,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return a}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:c,detail:i={}}=t;if(!n)return;c||(c=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:i});c.dispatchEvent(s)};let c;const i=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},function(e,t,r){"use strict";var n=r(0),o=r(14);const c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},function(e,t){e.exports=window.wp.blockEditor},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(12),o=r.n(n),c=r(0);r(106);const i=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(c.useRef)(null);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(c.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];i(e),null==e||e.focus()}else i(e)})(e,r):i(e))})(r.current,e)}})))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),c=r(5),i=r.n(c),s=r(1),a=r(21),l=r(70),u=r(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:c=r,onRemove:p=o.noop,isDismissible:b=!0,actions:m=[],politeness:f=d(t),__unstableHTML:g,onDismiss:h=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(a.speak)(r,t)},[r,t])}(c,f);const E=i()(e,"components-notice","is-"+t,{"is-dismissible":b});return g&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:c=!1,onClick:s,url:a},l)=>{let d=o;return"primary"===o||c||(d=a?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:a,variant:d,onClick:a?void 0:s,className:i()("components-notice__action",e)},t)}))),b&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),h(),p()},showTooltip:!1}))}},,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.blocks},,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{icon:t,size:r=24,...o}=e;return Object(n.cloneElement)(t,{width:r,height:r,...o})}},,function(e,t){},,function(e,t,r){"use strict";var n=r(0),o=r(5),c=r.n(o),i=r(25),s=r(11);r(123),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:r,label:o="",onChange:s,options:a,screenReaderLabel:l,value:u=""}=e;const d="wc-block-components-sort-select__select-"+r;return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,value:u},a&&a.map(e=>Object(n.createElement)("option",{key:e.key,value:e.key},e.label))))})},,,,,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return i}));var n=r(47),o=(r(15),r(2));const c=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),i=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),c=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(c[r]="")}),c}},,,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(12),o=r.n(n),c=r(0),i=r(5),s=r.n(i),a=r(77),l=r(8),u=(r(80),r(59));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:i}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:b}=Object(l.useDispatch)("core/notices"),m=p.filter(e=>"snackbar"!==e.type).concat(n);if(!m.length)return null;const f=s()(t,"wc-block-components-notices");return i?null:Object(c.createElement)("div",{className:f},m.map(e=>Object(c.createElement)(a.a,o()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&b(e.id,r)}}),e.content)))}},,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(17),o=r(0),c=r(46);r.p=c.k,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(62)]).then(r.bind(null,404)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>r.e(61).then(r.bind(null,448)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>r.e(69).then(r.bind(null,449)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>r.e(63).then(r.bind(null,405)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>r.e(59).then(r.bind(null,406)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>r.e(67).then(r.bind(null,407)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>r.e(64).then(r.bind(null,317)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>r.e(65).then(r.bind(null,408)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>r.e(60).then(r.bind(null,409)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>r.e(68).then(r.bind(null,410)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>r.e(66).then(r.bind(null,411)))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([r.e(1),r.e(74),r.e(58)]).then(r.bind(null,431)))});const i=e=>Object(n.getRegisteredBlockComponents)(e)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(240)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(59),c=r(51),i=r(3),s=r(1),a=r(4),l=r(5),u=r.n(l),d=r(25);r(214);var p=e=>{let{currentPage:t,displayFirstAndLastPages:r=!0,displayNextAndPreviousArrows:o=!0,pagesToDisplay:c=3,onPageChange:i,totalPages:a}=e,{minIndex:l,maxIndex:p}=((e,t,r)=>{if(r<=2)return{minIndex:null,maxIndex:null};const n=e-1,o=Math.max(Math.floor(t-n/2),2),c=Math.min(Math.ceil(t+(n-(t-o))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(c-t))),2),maxIndex:c}})(c,t,a);const b=r&&Boolean(1!==l),m=r&&Boolean(p!==a),f=r&&Boolean(l&&l>3),g=r&&Boolean(p&&p<a-2);b&&3===l&&(l-=1),m&&p===a-2&&(p+=1);const h=[];if(l&&p)for(let e=l;e<=p;e++)h.push(e);return Object(n.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(n.createElement)(d.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),o&&Object(n.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>i(t-1),title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(n.createElement)(d.a,{label:"←",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),b&&Object(n.createElement)("button",{className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>i(1),disabled:1===t},Object(n.createElement)(d.a,{label:"1",screenReaderLabel:Object(s.sprintf)(
4
  /* translators: %d is the page number (1, 2, 3...). */
5
  Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),h.map(e=>Object(n.createElement)("button",{key:e,className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?void 0:()=>i(e),disabled:t===e},Object(n.createElement)(d.a,{label:e.toString(),screenReaderLabel:Object(s.sprintf)(
6
  /* translators: %d is the page number (1, 2, 3...). */
build/all-products.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'a4e1ecde593ce3f18880460d4239b7be');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '33cf39e9cd4b77b756f9ceea9dc2a7d9');
build/all-products.js CHANGED
@@ -13,7 +13,7 @@ Object(a.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.leng
13
  Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const g=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(n.createElement)(l.a,o()({},g,{className:m,name:"variations-"+r}))}:null),onSearch:p,messages:y,isHierarchical:!0})};v.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=d(Object(b.a)(_(Object(u.withInstanceId)(v))))},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));var r=c(7);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:n,priority:s}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return l.set(r,{priority:s,callback:n}),{...e,[c]:l};case o.REMOVE_EVENT_CALLBACK:return l.delete(r),{...e,[c]:l}}}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(6),o=c.n(r),n=c(0),a=c(1),s=c(3),l=c(115),i=c(529),u=c(4),d=c.n(u),b=c(10),p=c(21),m=c(35),g=c(528),O=c(14);const j=e=>{let{id:t,label:c,popoverContents:r,remove:o,screenReaderLabel:i,className:u=""}=e;const[p,m]=Object(n.useState)(!1),h=Object(b.useInstanceId)(j);if(i=i||c,!c)return null;c=Object(O.decodeEntities)(c);const _=d()("woocommerce-tag",u,{"has-remove":!!o}),E="woocommerce-tag__label-"+h,w=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},i),Object(n.createElement)("span",{"aria-hidden":"true"},c));return Object(n.createElement)("span",{className:_},r?Object(n.createElement)(s.Button,{className:"woocommerce-tag__text",id:E,onClick:()=>m(!0)},w):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:E},w),r&&p&&Object(n.createElement)(s.Popover,{onClose:()=>m(!1)},r),o&&Object(n.createElement)(s.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(a.sprintf)(// Translators: %s label.
14
  Object(a.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":E},Object(n.createElement)(l.a,{icon:g.a,size:20,className:"clear-icon"})))};var h=j;const _=e=>Object(n.createElement)(m.b,e),E=e=>{const{list:t,selected:c,renderItem:r,depth:a=0,onSelect:s,instanceId:l,isSingle:i,search:u}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,r({item:t,isSelected:d,onSelect:s,isSingle:i,search:u,depth:a,controlId:l})),Object(n.createElement)(E,o()({},e,{list:t.children,depth:a+1})))})):null},w=e=>{let{isLoading:t,isSingle:c,selected:r,messages:o,onChange:l,onRemove:i}=e;if(t||c||!r)return null;const u=r.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,o.selected(u)),u>0?Object(n.createElement)(s.Button,{isLink:!0,isDestructive:!0,onClick:()=>l([]),"aria-label":o.clear},Object(a.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(n.createElement)("ul",null,r.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(h,{label:e.name,id:e.id,remove:i})))):null)},f=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:o,...s}=e;const{messages:u,renderItem:d,selected:b,isSingle:p}=s,m=d||_;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(l.a,{icon:i.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(a.sprintf)(u.noResults,c):u.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(E,{list:t,selected:b,renderItem:m,onSelect:r,instanceId:o,isSingle:p,search:c}))},k=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:a,isSingle:l,list:i,messages:u=p.a,onChange:m,onSearch:g,selected:O,debouncedSpeak:j}=e,[h,_]=Object(n.useState)(""),E=Object(b.useInstanceId)(k),y=Object(n.useMemo)(()=>({...p.a,...u}),[u]),v=Object(n.useMemo)(()=>Object(p.c)(i,h,r),[i,h,r]);Object(n.useEffect)(()=>{j&&j(y.updated)},[j,y]),Object(n.useEffect)(()=>{"function"==typeof g&&g(h)},[h,g]);const S=Object(n.useCallback)(e=>()=>{l&&m([]);const t=O.findIndex(t=>{let{id:c}=t;return c===e});m([...O.slice(0,t),...O.slice(t+1)])},[l,O,m]),C=Object(n.useCallback)(e=>()=>{-1===O.findIndex(t=>{let{id:c}=t;return c===e.id})?m(l?[e]:[...O,e]):S(e.id)()},[l,S,m,O]);return Object(n.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(n.createElement)(w,o()({},e,{onRemove:S,messages:y})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(s.TextControl,{label:y.search,type:"search",value:h,onChange:e=>_(e)})),a?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(s.Spinner,null)):Object(n.createElement)(f,o()({},e,{search:h,filteredList:v,messages:y,onSelect:C,instanceId:E})))};Object(s.withSpokenMessages)(k)},,function(e,t,c){"use strict";var r=c(0),o=c(7),n=c(1),a=c(3),s=c(11);function l(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(r.createElement)(s.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(s.Path,{d:c[t]})):null}class i extends r.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(r.createElement)(l,{level:e}),title:Object(n.sprintf)(
15
  /* translators: %s: heading level e.g: "2", "3", "4" */
16
- Object(n.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:n,onChange:s}=this.props;return Object(r.createElement)(a.ToolbarGroup,{isCollapsed:e,icon:Object(r.createElement)(l,{level:n}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,n,s))})}}t.a=i},function(e,t){e.exports=window.wp.warning},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=c(7),n=c(25),a=c.n(n);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(r.useContext)(s),i=e=>{let{children:t}=e;const[c,n]=Object(r.useState)({}),l=Object(r.useCallback)(e=>c[e],[c]),i=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{n({})},[]),b=Object(r.useCallback)(e=>{e&&n(t=>(e=Object(o.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),p=Object(r.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:l,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!0})},[p]),showValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!1})},[p]),showAllValidationErrors:Object(r.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(r.createElement)(s.Provider,{value:m},t)}},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(115),a=c(233),s=c(2),l=c(5),i=c(29);t.a=e=>{const t=(Object(i.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(r.createElement)(l.InspectorControls,null,Object(r.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(r.createElement)("a",{href:`${s.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Edit this product's details","woo-gutenberg-products-block"),Object(r.createElement)(n.a,{icon:a.a,size:16}))),Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(o.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(8);function o(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},,,,,,function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(14),s=c(4),l=c.n(s);c(148),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",target:i,rel:u,style:d,onClick:b,...p}=e;const m=l()("wc-block-components-product-name",t);if(c){const e=p;return Object(n.createElement)("span",o()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(n.createElement)("a",o()({className:m,href:s,target:i},p,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(9);const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(r.select)("core/notices").getNotices(),{removeNotice:o}=Object(r.dispatch)("core/notices"),n=c.filter(t=>t.status===e);n.forEach(e=>o(e.id,t))}},function(e,t,c){"use strict";var r=c(0),o=c(90),n=c(61);const a=e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;";const r=s(e),o=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(o,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;";const o=s(e),a=o.slice(0,t);if(c)return Object(n.autop)(l(a,r));const i=a.match(/([\s]+)/g),u=i?i.length:0,d=o.slice(0,t+u);return Object(n.autop)(l(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l="",style:d={}}=e;const b=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),s=Object(o.count)(r,c);if(s<=t)return r;const l=a(r),d=Object(o.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{style:d,className:l},b)}},,function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(30),s=c(10);c(154),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,label:o="",onChange:s,options:l,screenReaderLabel:i,value:u}=e;const d="wc-block-components-sort-select__select-"+c;return Object(r.createElement)("div",{className:n()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(r.createElement)(a.a,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(r.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,value:u},l&&l.map(e=>Object(r.createElement)("option",{key:e.key,value:e.key},e.label))))})},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(18),o=c(9),n=c(0),a=c(50),s=c(124);const l=e=>{const{namespace:t,resourceName:c,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(n.useRef)({results:[],isLoading:!0}),b=Object(a.a)(i),p=Object(a.a)(l),m=Object(s.a)(),g=Object(o.useSelect)(e=>{if(!u)return null;const o=e(r.COLLECTIONS_STORE_KEY),n=[t,c,b,p],a=o.getCollectionError(...n);if(a){if(!(a instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(a)}return{results:o.getCollection(...n),isLoading:!o.hasFinishedResolution("getCollection",n)}},[t,c,p,b,u]);return null!==g&&(d.current=g),d.current}},,,,function(e,t){},,function(e,t){},,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(r.createElement)("title",null,"Grid Block Preview"),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(3),s=c(4),l=c.n(s);c(179),t.a=function(e){let{className:t="",...c}=e;const r=l()("wc-block-text-toolbar-button",t);return Object(n.createElement)(a.Button,o()({className:r},c))}},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return a}));var r=c(0);const o=Object(r.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),n=()=>Object(r.useContext)(o),a=e=>{let{children:t}=e;const[c,n]=Object(r.useState)(!1),a={setIsSuppressed:n,isSuppressed:c};return Object(r.createElement)(o.Provider,{value:a},t)}},,,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t){},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"number"==typeof e},,,,,,,,,,,,,,,,,,function(e,t){},,,function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(22),s=c(26),l=c(114),i=c(28);t.a=e=>t=>{let{selected:c,...r}=t;const[u,d]=Object(n.useState)(!0),[b,p]=Object(n.useState)(null),[m,g]=Object(n.useState)([]),O=a.o.productCount>100,j=async e=>{const t=await Object(i.a)(e);p(t),d(!1)},h=Object(n.useRef)(c);Object(n.useEffect)(()=>{Object(s.h)({selected:h.current}).then(e=>{g(e),d(!1)}).catch(j)},[h]);const _=Object(l.a)(e=>{Object(s.h)({selected:c,search:e}).then(e=>{g(e),d(!1)}).catch(j)},400),E=Object(n.useCallback)(e=>{d(!0),_(e)},[d,_]);return Object(n.createElement)(e,o()({},r,{selected:c,error:b,products:m,isLoading:u,onSearch:O?E:null}))}},function(e,t){},,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(30),l=c(29),i=c(58),u=(c(359),c(44));t.default=Object(i.withProductDataContext)(e=>{const{className:t,align:c}=e,{parentClassName:n}=Object(l.useInnerBlockLayoutContext)(),{product:i}=Object(l.useProductDataContext)(),d=Object(u.a)(e),b=Object(u.b)(e),p=Object(u.d)(e),m=Object(u.c)(e);if(!i.id||!i.on_sale)return null;const g="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(r.createElement)("div",{className:a()("wc-block-components-product-sale-badge",t,g,{[n+"__product-onsale"]:n},b.className,d.className),style:{...b.style,...d.style,...p.style,...m.style}},Object(r.createElement)(s.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))})},,function(e,t,c){"use strict";var r=c(0),o=c(11);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=n},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=c(104);c(175);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(o.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(n)},t))}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var r=c(6),o=c.n(r),n=c(0),a=c(4),s=c.n(a),l=c(277),i=c(9),u=(c(184),c(142));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},b=e=>{let{className:t,context:c="default",additionalNotices:r=[]}=e;const{isSuppressed:a}=Object(u.b)(),{notices:b}=Object(i.useSelect)(e=>({notices:e("core/notices").getNotices(c)})),{removeNotice:p}=Object(i.useDispatch)("core/notices"),m=b.filter(e=>"snackbar"!==e.type).concat(r);if(!m.length)return null;const g=s()(t,"wc-block-components-notices");return a?null:Object(n.createElement)("div",{className:g},m.map(e=>Object(n.createElement)(l.a,o()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&p(e.id,c)}}),e.content)))}},,,,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return l}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:a={}}=t;if(!r)return;n||(n=document.body);const s=new r(e,{bubbles:c,cancelable:o,detail:a});n.dispatchEvent(s)};let n;const a=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return a}));var r=c(93),o=(c(16),c(2));const n=(e,t)=>Object.keys(o.defaultAddressFields).every(c=>e[c]===t[c]),a=e=>{const t=Object.keys(o.defaultAddressFields),c=Object(r.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(98);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(36);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,c)=>{const n=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t,c){"use strict";var r=c(65);let o={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},linkTarget:{type:"string"},productId:{type:"number",default:0}};Object(r.b)()&&(o={...o,align:{type:"string"}}),t.a=o},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(29),s=c(65),l=c(58),i=c(117),u=c(81),d=(c(358),c(44));const b=e=>{let{children:t,headingLevel:c,elementType:o="h"+c,...n}=e;return Object(r.createElement)(o,n,t)};t.a=Object(l.withProductDataContext)(e=>{const{className:t,headingLevel:c=2,showProductLink:o=!0,linkTarget:l,align:p}=e,{parentClassName:m}=Object(a.useInnerBlockLayoutContext)(),{product:g}=Object(a.useProductDataContext)(),{dispatchStoreEvent:O}=Object(u.a)(),j=Object(d.b)(e),h=Object(d.c)(e),_=Object(d.d)(e);return g.id?Object(r.createElement)(b,{headingLevel:c,className:n()(t,j.className,"wc-block-components-product-title",{[m+"__product-title"]:m,["wc-block-components-product-title--align-"+p]:p&&Object(s.b)()}),style:Object(s.b)()?{...h.style,..._.style,...j.style}:{}},Object(r.createElement)(i.a,{disabled:!o,name:g.name,permalink:g.permalink,target:l,onClick:()=>{O("product-view-link",{product:g})}})):Object(r.createElement)(b,{headingLevel:c,className:n()(t,j.className,"wc-block-components-product-title",{[m+"__product-title"]:m,["wc-block-components-product-title--align-"+p]:p&&Object(s.b)()}),style:Object(s.b)()?{...h.style,..._.style,...j.style}:{}})})},function(e,t,c){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(1),s=c(4),l=c.n(s),i=c(2),u=c(29),d=c(58),b=c(81),p=c(216),m=(c(360),c(44));const g=()=>Object(n.createElement)("img",{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),O=e=>{let{image:t,onLoad:c,loaded:r,showFullSize:a,fallbackAlt:s}=e;const{thumbnail:l,src:i,srcset:u,sizes:d,alt:b}=t||{},p={alt:b||s,onLoad:c,hidden:!r,src:l,...a&&{src:i,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,p.src&&Object(n.createElement)("img",o()({"data-testid":"product-image"},p)),!r&&Object(n.createElement)(g,null))};t.a=Object(d.withProductDataContext)(e=>{const{className:t,imageSizing:c="full-size",showProductLink:r=!0,showSaleBadge:o,saleBadgeAlign:s="right"}=e,{parentClassName:i}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[j,h]=Object(n.useState)(!1),{dispatchStoreEvent:_}=Object(b.a)(),E=Object(m.d)(e),w=Object(m.a)(e),f=Object(m.c)(e);if(!d.id)return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},w.className),style:{...E.style,...w.style,...f.style}},Object(n.createElement)(g,null));const k=!!d.images.length,y=k?d.images[0]:null,v=r?"a":n.Fragment,S=Object(a.sprintf)(
17
  /* translators: %s is referring to the product name */
18
  Object(a.__)("Link to %s","woo-gutenberg-products-block"),d.name),C={href:d.permalink,...!k&&{"aria-label":S},onClick:()=>{_("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},w.className),style:{...E.style,...w.style,...f.style}},Object(n.createElement)(v,r&&C,!!o&&Object(n.createElement)(p.default,{align:s,product:d}),Object(n.createElement)(O,{fallbackAlt:d.name,image:y,onLoad:()=>h(!0),loaded:j,showFullSize:"cropped"!==c})))})},function(e,t,c){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(1),s=c(50),l=c(521),i=c(9);const u={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},d={status:u.PRISTINE,hasError:!1,quantity:0,processingResponse:null,requestParams:{}},b={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:p,SET_IDLE:m,SET_DISABLED:g,SET_PROCESSING:O,SET_BEFORE_PROCESSING:j,SET_AFTER_PROCESSING:h,SET_PROCESSING_RESPONSE:_,SET_HAS_ERROR:E,SET_NO_ERROR:w,SET_QUANTITY:f,SET_REQUEST_PARAMS:k}=b,y=()=>({type:m}),v=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?E:w;return{type:t}},{SET_PRISTINE:S,SET_IDLE:C,SET_DISABLED:x,SET_PROCESSING:N,SET_BEFORE_PROCESSING:P,SET_AFTER_PROCESSING:T,SET_PROCESSING_RESPONSE:R,SET_HAS_ERROR:I,SET_NO_ERROR:A,SET_QUANTITY:B,SET_REQUEST_PARAMS:L}=b,{PRISTINE:D,IDLE:V,DISABLED:F,PROCESSING:M,BEFORE_PROCESSING:z,AFTER_PROCESSING:H}=u,q=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,{quantity:c,type:r,data:o}=arguments.length>1?arguments[1]:void 0;switch(r){case S:e=d;break;case C:e=t.status!==V?{...t,status:V}:t;break;case x:e=t.status!==F?{...t,status:F}:t;break;case B:e=c!==t.quantity?{...t,quantity:c}:t;break;case L:e={...t,requestParams:{...t.requestParams,...o}};break;case R:e={...t,processingResponse:o};break;case N:e=t.status!==M?{...t,status:M,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case P:e=t.status!==z?{...t,status:z,hasError:!1}:t;break;case T:e=t.status!==H?{...t,status:H}:t;break;case I:e=t.hasError?t:{...t,hasError:!0},e=t.status===M||t.status===z?{...e,status:V}:e;break;case A:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&r!==S&&e.status===D&&(e.status=V),e};var G=c(98),Q=c(236);const Y=e=>({onAddToCartAfterProcessingWithSuccess:Object(Q.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(Q.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(Q.a)("add_to_cart_before_processing",e)});var U=c(237),W=c(104),$=c(36),K=c(118);const J=Object(r.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),X=()=>Object(r.useContext)(J),Z=e=>{var t,c,o,n;let{children:b,product:m,showFormElements:E}=e;const[w,S]=Object(r.useReducer)(q,d),[C,x]=Object(r.useReducer)(G.b,{}),N=Object(s.a)(C),{createErrorNotice:P}=Object(i.useDispatch)("core/notices"),{setValidationErrors:T}=Object(W.b)(),{isSuccessResponse:R,isErrorResponse:I,isFailResponse:A}=Object($.d)(),B=Object(r.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:Y(x).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Y(x).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Y(x).onAddToCartBeforeProcessing}),[x]),L=Object(r.useMemo)(()=>({resetForm:()=>{S({type:p})},submitForm:()=>{S({type:j})},setQuantity:e=>{S((e=>({type:f,quantity:e}))(e))},setHasError:e=>{S(v(e))},setRequestParams:e=>{S((e=>({type:k,data:e}))(e))},setAfterProcessing:e=>{S({type:_,data:e}),S({type:h})}}),[]);Object(r.useEffect)(()=>{const e=w.status,t=!m.id||!Object(l.a)(m);e!==u.DISABLED||t?e!==u.DISABLED&&t&&S({type:g}):S(y())},[w.status,m,S]),Object(r.useEffect)(()=>{w.status===u.BEFORE_PROCESSING&&(Object(K.a)("error","wc/add-to-cart"),Object(U.a)(N,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;t&&P(t,{context:"wc/add-to-cart"}),c&&T(c)}),S(y())):S({type:O})}))},[w.status,T,P,S,N,null==m?void 0:m.id]),Object(r.useEffect)(()=>{if(w.status===u.AFTER_PROCESSING){const e={processingResponse:w.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:c,messageContext:r}=e;(I(e)||A(e))&&c&&(t=!0,P(c,r?{context:r}:void 0))}),t};if(w.hasError)return void Object(U.b)(N,"add_to_cart_after_processing_with_error",e).then(c=>{if(!t(c)){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"add-to-cart",context:"woocommerce/single-product/"+((null==m?void 0:m.id)||0)})}S(y())});Object(U.b)(N,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?S(v(!0)):S(y())})}},[w.status,w.hasError,w.processingResponse,L,P,I,A,R,N,null==m?void 0:m.id]);const D=Object(l.b)(m),V={product:m,productType:m.type||"simple",productIsPurchasable:Object(l.a)(m),productHasOptions:m.has_options||!1,supportsFormElements:D,showFormElements:E&&D,quantity:w.quantity||(null==m||null===(t=m.add_to_cart)||void 0===t?void 0:t.minimum)||1,minQuantity:(null==m||null===(c=m.add_to_cart)||void 0===c?void 0:c.minimum)||1,maxQuantity:(null==m||null===(o=m.add_to_cart)||void 0===o?void 0:o.maximum)||99,multipleOf:(null==m||null===(n=m.add_to_cart)||void 0===n?void 0:n.multiple_of)||1,requestParams:w.requestParams,isIdle:w.status===u.IDLE,isDisabled:w.status===u.DISABLED,isProcessing:w.status===u.PROCESSING,isBeforeProcessing:w.status===u.BEFORE_PROCESSING,isAfterProcessing:w.status===u.AFTER_PROCESSING,hasError:w.hasError,eventRegistration:B,dispatchActions:L};return Object(r.createElement)(J.Provider,{value:V},b)};var ee=c(15),te=c.n(ee),ce=c(14),re=c(234),oe=c(40),ne=()=>{const{dispatchActions:e,product:t,quantity:c,eventRegistration:o,hasError:n,isProcessing:s,requestParams:l}=X(),{hasValidationErrors:u,showAllValidationErrors:d}=Object(W.b)(),{createErrorNotice:b,removeNotice:p}=Object(i.useDispatch)("core/notices"),{receiveCart:m}=Object(oe.a)(),[g,O]=Object(r.useState)(!1),j=!n&&s,h=Object(r.useCallback)(()=>!u||(d(),{type:"error"}),[u,d]);Object(r.useEffect)(()=>{const e=o.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[o,h]);const _=Object(r.useCallback)(()=>{O(!0),p("add-to-cart","woocommerce/single-product/"+((null==t?void 0:t.id)||0));const r={id:t.id||0,quantity:c,...l};te()({path:"/wc/store/v1/cart/add-item",method:"POST",data:r,cache:"no-store",parse:!1}).then(c=>{te.a.setNonce(c.headers),c.json().then((function(r){c.ok?m(r):(r.body&&r.body.message?b(Object(ce.decodeEntities)(r.body.message),{id:"add-to-cart",context:"woocommerce/single-product/"+((null==t?void 0:t.id)||0)}):b(Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart",context:"woocommerce/single-product/"+((null==t?void 0:t.id)||0)}),e.setHasError()),Object(re.b)({preserveCartData:!0}),e.setAfterProcessing(r),O(!1)}))}).catch(t=>{t.json().then((function(t){var c;null!==(c=t.data)&&void 0!==c&&c.cart&&m(t.data.cart),e.setHasError(),e.setAfterProcessing(t),O(!1)}))})},[t,b,p,m,e,c,l]);return Object(r.useEffect)(()=>{j&&!g&&_()},[j,_,g]),null};const ae=e=>{let{children:t,product:c,showFormElements:o}=e;return Object(r.createElement)(W.a,null,Object(r.createElement)(Z,{product:c,showFormElements:o},t,Object(r.createElement)(ne,null)))};var se=c(29),le=c(7),ie=c(58),ue=(c(279),c(69)),de=c(115),be=c(548),pe=c(81),me=c(407);const ge=e=>{let{className:t,href:c,text:o,onClick:n}=e;return Object(r.createElement)(ue.a,{className:t,href:c,onClick:n,rel:"nofollow"},o)},Oe=e=>{let{className:t,quantityInCart:c,isProcessing:o,isDisabled:n,isDone:s,onClick:l}=e;return Object(r.createElement)(ue.a,{className:t,disabled:n,showSpinner:o,onClick:l},s&&c>0?Object(a.sprintf)(
19
  /* translators: %s number of products in cart. */
13
  Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const g=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(n.createElement)(l.a,o()({},g,{className:m,name:"variations-"+r}))}:null),onSearch:p,messages:y,isHierarchical:!0})};v.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=d(Object(b.a)(_(Object(u.withInstanceId)(v))))},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));var r=c(7);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:n,priority:s}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return l.set(r,{priority:s,callback:n}),{...e,[c]:l};case o.REMOVE_EVENT_CALLBACK:return l.delete(r),{...e,[c]:l}}}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(6),o=c.n(r),n=c(0),a=c(1),s=c(3),l=c(115),i=c(529),u=c(4),d=c.n(u),b=c(10),p=c(21),m=c(35),g=c(528),O=c(14);const j=e=>{let{id:t,label:c,popoverContents:r,remove:o,screenReaderLabel:i,className:u=""}=e;const[p,m]=Object(n.useState)(!1),h=Object(b.useInstanceId)(j);if(i=i||c,!c)return null;c=Object(O.decodeEntities)(c);const _=d()("woocommerce-tag",u,{"has-remove":!!o}),E="woocommerce-tag__label-"+h,w=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},i),Object(n.createElement)("span",{"aria-hidden":"true"},c));return Object(n.createElement)("span",{className:_},r?Object(n.createElement)(s.Button,{className:"woocommerce-tag__text",id:E,onClick:()=>m(!0)},w):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:E},w),r&&p&&Object(n.createElement)(s.Popover,{onClose:()=>m(!1)},r),o&&Object(n.createElement)(s.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(a.sprintf)(// Translators: %s label.
14
  Object(a.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":E},Object(n.createElement)(l.a,{icon:g.a,size:20,className:"clear-icon"})))};var h=j;const _=e=>Object(n.createElement)(m.b,e),E=e=>{const{list:t,selected:c,renderItem:r,depth:a=0,onSelect:s,instanceId:l,isSingle:i,search:u}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,r({item:t,isSelected:d,onSelect:s,isSingle:i,search:u,depth:a,controlId:l})),Object(n.createElement)(E,o()({},e,{list:t.children,depth:a+1})))})):null},w=e=>{let{isLoading:t,isSingle:c,selected:r,messages:o,onChange:l,onRemove:i}=e;if(t||c||!r)return null;const u=r.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,o.selected(u)),u>0?Object(n.createElement)(s.Button,{isLink:!0,isDestructive:!0,onClick:()=>l([]),"aria-label":o.clear},Object(a.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(n.createElement)("ul",null,r.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(h,{label:e.name,id:e.id,remove:i})))):null)},f=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:o,...s}=e;const{messages:u,renderItem:d,selected:b,isSingle:p}=s,m=d||_;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(l.a,{icon:i.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(a.sprintf)(u.noResults,c):u.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(E,{list:t,selected:b,renderItem:m,onSelect:r,instanceId:o,isSingle:p,search:c}))},k=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:a,isSingle:l,list:i,messages:u=p.a,onChange:m,onSearch:g,selected:O,debouncedSpeak:j}=e,[h,_]=Object(n.useState)(""),E=Object(b.useInstanceId)(k),y=Object(n.useMemo)(()=>({...p.a,...u}),[u]),v=Object(n.useMemo)(()=>Object(p.c)(i,h,r),[i,h,r]);Object(n.useEffect)(()=>{j&&j(y.updated)},[j,y]),Object(n.useEffect)(()=>{"function"==typeof g&&g(h)},[h,g]);const S=Object(n.useCallback)(e=>()=>{l&&m([]);const t=O.findIndex(t=>{let{id:c}=t;return c===e});m([...O.slice(0,t),...O.slice(t+1)])},[l,O,m]),C=Object(n.useCallback)(e=>()=>{-1===O.findIndex(t=>{let{id:c}=t;return c===e.id})?m(l?[e]:[...O,e]):S(e.id)()},[l,S,m,O]);return Object(n.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(n.createElement)(w,o()({},e,{onRemove:S,messages:y})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(s.TextControl,{label:y.search,type:"search",value:h,onChange:e=>_(e)})),a?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(s.Spinner,null)):Object(n.createElement)(f,o()({},e,{search:h,filteredList:v,messages:y,onSelect:C,instanceId:E})))};Object(s.withSpokenMessages)(k)},,function(e,t,c){"use strict";var r=c(0),o=c(7),n=c(1),a=c(3),s=c(11);function l(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(r.createElement)(s.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(s.Path,{d:c[t]})):null}class i extends r.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(r.createElement)(l,{level:e}),title:Object(n.sprintf)(
15
  /* translators: %s: heading level e.g: "2", "3", "4" */
16
+ Object(n.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:n,onChange:s}=this.props;return Object(r.createElement)(a.ToolbarGroup,{isCollapsed:e,icon:Object(r.createElement)(l,{level:n}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,n,s))})}}t.a=i},function(e,t){e.exports=window.wp.warning},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=c(7),n=c(25),a=c.n(n);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(r.useContext)(s),i=e=>{let{children:t}=e;const[c,n]=Object(r.useState)({}),l=Object(r.useCallback)(e=>c[e],[c]),i=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{n({})},[]),b=Object(r.useCallback)(e=>{e&&n(t=>(e=Object(o.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),p=Object(r.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:l,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!0})},[p]),showValidationError:Object(r.useCallback)(e=>{p(e,{hidden:!1})},[p]),showAllValidationErrors:Object(r.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(r.createElement)(s.Provider,{value:m},t)}},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(115),a=c(233),s=c(2),l=c(5),i=c(29);t.a=e=>{const t=(Object(i.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(r.createElement)(l.InspectorControls,null,Object(r.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(r.createElement)("a",{href:`${s.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Edit this product's details","woo-gutenberg-products-block"),Object(r.createElement)(n.a,{icon:a.a,size:16}))),Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(o.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(8);function o(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},,,,,,function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(14),s=c(4),l=c.n(s);c(148),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",target:i,rel:u,style:d,onClick:b,...p}=e;const m=l()("wc-block-components-product-name",t);if(c){const e=p;return Object(n.createElement)("span",o()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(n.createElement)("a",o()({className:m,href:s,target:i},p,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(9);const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(r.select)("core/notices").getNotices(),{removeNotice:o}=Object(r.dispatch)("core/notices"),n=c.filter(t=>t.status===e);n.forEach(e=>o(e.id,t))}},function(e,t,c){"use strict";var r=c(0),o=c(90),n=c(61);const a=e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;";const r=s(e),o=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(o,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;";const o=s(e),a=o.slice(0,t);if(c)return Object(n.autop)(l(a,r));const i=a.match(/([\s]+)/g),u=i?i.length:0,d=o.slice(0,t+u);return Object(n.autop)(l(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l="",style:d={}}=e;const b=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),s=Object(o.count)(r,c);if(s<=t)return r;const l=a(r),d=Object(o.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{style:d,className:l},b)}},,function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(30),s=c(10);c(154),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,label:o="",onChange:s,options:l,screenReaderLabel:i,value:u=""}=e;const d="wc-block-components-sort-select__select-"+c;return Object(r.createElement)("div",{className:n()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(r.createElement)(a.a,{label:o,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(r.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,value:u},l&&l.map(e=>Object(r.createElement)("option",{key:e.key,value:e.key},e.label))))})},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(18),o=c(9),n=c(0),a=c(50),s=c(124);const l=e=>{const{namespace:t,resourceName:c,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(n.useRef)({results:[],isLoading:!0}),b=Object(a.a)(i),p=Object(a.a)(l),m=Object(s.a)(),g=Object(o.useSelect)(e=>{if(!u)return null;const o=e(r.COLLECTIONS_STORE_KEY),n=[t,c,b,p],a=o.getCollectionError(...n);if(a){if(!(a instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(a)}return{results:o.getCollection(...n),isLoading:!o.hasFinishedResolution("getCollection",n)}},[t,c,p,b,u]);return null!==g&&(d.current=g),d.current}},,,,function(e,t){},,function(e,t){},,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(r.createElement)("title",null,"Grid Block Preview"),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(3),s=c(4),l=c.n(s);c(179),t.a=function(e){let{className:t="",...c}=e;const r=l()("wc-block-text-toolbar-button",t);return Object(n.createElement)(a.Button,o()({className:r},c))}},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return a}));var r=c(0);const o=Object(r.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),n=()=>Object(r.useContext)(o),a=e=>{let{children:t}=e;const[c,n]=Object(r.useState)(!1),a={setIsSuppressed:n,isSuppressed:c};return Object(r.createElement)(o.Provider,{value:a},t)}},,,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t){},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"number"==typeof e},,,,,,,,,,,,,,,,,,function(e,t){},,,function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(22),s=c(26),l=c(114),i=c(28);t.a=e=>t=>{let{selected:c,...r}=t;const[u,d]=Object(n.useState)(!0),[b,p]=Object(n.useState)(null),[m,g]=Object(n.useState)([]),O=a.o.productCount>100,j=async e=>{const t=await Object(i.a)(e);p(t),d(!1)},h=Object(n.useRef)(c);Object(n.useEffect)(()=>{Object(s.h)({selected:h.current}).then(e=>{g(e),d(!1)}).catch(j)},[h]);const _=Object(l.a)(e=>{Object(s.h)({selected:c,search:e}).then(e=>{g(e),d(!1)}).catch(j)},400),E=Object(n.useCallback)(e=>{d(!0),_(e)},[d,_]);return Object(n.createElement)(e,o()({},r,{selected:c,error:b,products:m,isLoading:u,onSearch:O?E:null}))}},function(e,t){},,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),a=c.n(n),s=c(30),l=c(29),i=c(58),u=(c(359),c(44));t.default=Object(i.withProductDataContext)(e=>{const{className:t,align:c}=e,{parentClassName:n}=Object(l.useInnerBlockLayoutContext)(),{product:i}=Object(l.useProductDataContext)(),d=Object(u.a)(e),b=Object(u.b)(e),p=Object(u.d)(e),m=Object(u.c)(e);if(!i.id||!i.on_sale)return null;const g="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(r.createElement)("div",{className:a()("wc-block-components-product-sale-badge",t,g,{[n+"__product-onsale"]:n},b.className,d.className),style:{...b.style,...d.style,...p.style,...m.style}},Object(r.createElement)(s.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))})},,function(e,t,c){"use strict";var r=c(0),o=c(11);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=n},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=c(104);c(175);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(o.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(n)},t))}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var r=c(6),o=c.n(r),n=c(0),a=c(4),s=c.n(a),l=c(277),i=c(9),u=(c(184),c(142));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},b=e=>{let{className:t,context:c="default",additionalNotices:r=[]}=e;const{isSuppressed:a}=Object(u.b)(),{notices:b}=Object(i.useSelect)(e=>({notices:e("core/notices").getNotices(c)})),{removeNotice:p}=Object(i.useDispatch)("core/notices"),m=b.filter(e=>"snackbar"!==e.type).concat(r);if(!m.length)return null;const g=s()(t,"wc-block-components-notices");return a?null:Object(n.createElement)("div",{className:g},m.map(e=>Object(n.createElement)(l.a,o()({key:"store-notice-"+e.id},e,{className:s()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&p(e.id,c)}}),e.content)))}},,,,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return l}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:a={}}=t;if(!r)return;n||(n=document.body);const s=new r(e,{bubbles:c,cancelable:o,detail:a});n.dispatchEvent(s)};let n;const a=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return a}));var r=c(93),o=(c(16),c(2));const n=(e,t)=>Object.keys(o.defaultAddressFields).every(c=>e[c]===t[c]),a=e=>{const t=Object.keys(o.defaultAddressFields),c=Object(r.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(98);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(36);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,c)=>{const n=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t,c){"use strict";var r=c(65);let o={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},linkTarget:{type:"string"},productId:{type:"number",default:0}};Object(r.b)()&&(o={...o,align:{type:"string"}}),t.a=o},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(29),s=c(65),l=c(58),i=c(117),u=c(81),d=(c(358),c(44));const b=e=>{let{children:t,headingLevel:c,elementType:o="h"+c,...n}=e;return Object(r.createElement)(o,n,t)};t.a=Object(l.withProductDataContext)(e=>{const{className:t,headingLevel:c=2,showProductLink:o=!0,linkTarget:l,align:p}=e,{parentClassName:m}=Object(a.useInnerBlockLayoutContext)(),{product:g}=Object(a.useProductDataContext)(),{dispatchStoreEvent:O}=Object(u.a)(),j=Object(d.b)(e),h=Object(d.c)(e),_=Object(d.d)(e);return g.id?Object(r.createElement)(b,{headingLevel:c,className:n()(t,j.className,"wc-block-components-product-title",{[m+"__product-title"]:m,["wc-block-components-product-title--align-"+p]:p&&Object(s.b)()}),style:Object(s.b)()?{...h.style,..._.style,...j.style}:{}},Object(r.createElement)(i.a,{disabled:!o,name:g.name,permalink:g.permalink,target:l,onClick:()=>{O("product-view-link",{product:g})}})):Object(r.createElement)(b,{headingLevel:c,className:n()(t,j.className,"wc-block-components-product-title",{[m+"__product-title"]:m,["wc-block-components-product-title--align-"+p]:p&&Object(s.b)()}),style:Object(s.b)()?{...h.style,..._.style,...j.style}:{}})})},function(e,t,c){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var r=c(6),o=c.n(r),n=c(0),a=c(1),s=c(4),l=c.n(s),i=c(2),u=c(29),d=c(58),b=c(81),p=c(216),m=(c(360),c(44));const g=()=>Object(n.createElement)("img",{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),O=e=>{let{image:t,onLoad:c,loaded:r,showFullSize:a,fallbackAlt:s}=e;const{thumbnail:l,src:i,srcset:u,sizes:d,alt:b}=t||{},p={alt:b||s,onLoad:c,hidden:!r,src:l,...a&&{src:i,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,p.src&&Object(n.createElement)("img",o()({"data-testid":"product-image"},p)),!r&&Object(n.createElement)(g,null))};t.a=Object(d.withProductDataContext)(e=>{const{className:t,imageSizing:c="full-size",showProductLink:r=!0,showSaleBadge:o,saleBadgeAlign:s="right"}=e,{parentClassName:i}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[j,h]=Object(n.useState)(!1),{dispatchStoreEvent:_}=Object(b.a)(),E=Object(m.d)(e),w=Object(m.a)(e),f=Object(m.c)(e);if(!d.id)return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},w.className),style:{...E.style,...w.style,...f.style}},Object(n.createElement)(g,null));const k=!!d.images.length,y=k?d.images[0]:null,v=r?"a":n.Fragment,S=Object(a.sprintf)(
17
  /* translators: %s is referring to the product name */
18
  Object(a.__)("Link to %s","woo-gutenberg-products-block"),d.name),C={href:d.permalink,...!k&&{"aria-label":S},onClick:()=>{_("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},w.className),style:{...E.style,...w.style,...f.style}},Object(n.createElement)(v,r&&C,!!o&&Object(n.createElement)(p.default,{align:s,product:d}),Object(n.createElement)(O,{fallbackAlt:d.name,image:y,onLoad:()=>h(!0),loaded:j,showFullSize:"cropped"!==c})))})},function(e,t,c){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),a=c(1),s=c(50),l=c(521),i=c(9);const u={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},d={status:u.PRISTINE,hasError:!1,quantity:0,processingResponse:null,requestParams:{}},b={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:p,SET_IDLE:m,SET_DISABLED:g,SET_PROCESSING:O,SET_BEFORE_PROCESSING:j,SET_AFTER_PROCESSING:h,SET_PROCESSING_RESPONSE:_,SET_HAS_ERROR:E,SET_NO_ERROR:w,SET_QUANTITY:f,SET_REQUEST_PARAMS:k}=b,y=()=>({type:m}),v=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?E:w;return{type:t}},{SET_PRISTINE:S,SET_IDLE:C,SET_DISABLED:x,SET_PROCESSING:N,SET_BEFORE_PROCESSING:P,SET_AFTER_PROCESSING:T,SET_PROCESSING_RESPONSE:R,SET_HAS_ERROR:I,SET_NO_ERROR:A,SET_QUANTITY:B,SET_REQUEST_PARAMS:L}=b,{PRISTINE:D,IDLE:V,DISABLED:F,PROCESSING:M,BEFORE_PROCESSING:z,AFTER_PROCESSING:H}=u,q=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,{quantity:c,type:r,data:o}=arguments.length>1?arguments[1]:void 0;switch(r){case S:e=d;break;case C:e=t.status!==V?{...t,status:V}:t;break;case x:e=t.status!==F?{...t,status:F}:t;break;case B:e=c!==t.quantity?{...t,quantity:c}:t;break;case L:e={...t,requestParams:{...t.requestParams,...o}};break;case R:e={...t,processingResponse:o};break;case N:e=t.status!==M?{...t,status:M,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case P:e=t.status!==z?{...t,status:z,hasError:!1}:t;break;case T:e=t.status!==H?{...t,status:H}:t;break;case I:e=t.hasError?t:{...t,hasError:!0},e=t.status===M||t.status===z?{...e,status:V}:e;break;case A:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&r!==S&&e.status===D&&(e.status=V),e};var G=c(98),Q=c(236);const Y=e=>({onAddToCartAfterProcessingWithSuccess:Object(Q.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(Q.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(Q.a)("add_to_cart_before_processing",e)});var U=c(237),W=c(104),$=c(36),K=c(118);const J=Object(r.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),X=()=>Object(r.useContext)(J),Z=e=>{var t,c,o,n;let{children:b,product:m,showFormElements:E}=e;const[w,S]=Object(r.useReducer)(q,d),[C,x]=Object(r.useReducer)(G.b,{}),N=Object(s.a)(C),{createErrorNotice:P}=Object(i.useDispatch)("core/notices"),{setValidationErrors:T}=Object(W.b)(),{isSuccessResponse:R,isErrorResponse:I,isFailResponse:A}=Object($.d)(),B=Object(r.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:Y(x).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Y(x).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Y(x).onAddToCartBeforeProcessing}),[x]),L=Object(r.useMemo)(()=>({resetForm:()=>{S({type:p})},submitForm:()=>{S({type:j})},setQuantity:e=>{S((e=>({type:f,quantity:e}))(e))},setHasError:e=>{S(v(e))},setRequestParams:e=>{S((e=>({type:k,data:e}))(e))},setAfterProcessing:e=>{S({type:_,data:e}),S({type:h})}}),[]);Object(r.useEffect)(()=>{const e=w.status,t=!m.id||!Object(l.a)(m);e!==u.DISABLED||t?e!==u.DISABLED&&t&&S({type:g}):S(y())},[w.status,m,S]),Object(r.useEffect)(()=>{w.status===u.BEFORE_PROCESSING&&(Object(K.a)("error","wc/add-to-cart"),Object(U.a)(N,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;t&&P(t,{context:"wc/add-to-cart"}),c&&T(c)}),S(y())):S({type:O})}))},[w.status,T,P,S,N,null==m?void 0:m.id]),Object(r.useEffect)(()=>{if(w.status===u.AFTER_PROCESSING){const e={processingResponse:w.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:c,messageContext:r}=e;(I(e)||A(e))&&c&&(t=!0,P(c,r?{context:r}:void 0))}),t};if(w.hasError)return void Object(U.b)(N,"add_to_cart_after_processing_with_error",e).then(c=>{if(!t(c)){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"add-to-cart",context:"woocommerce/single-product/"+((null==m?void 0:m.id)||0)})}S(y())});Object(U.b)(N,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?S(v(!0)):S(y())})}},[w.status,w.hasError,w.processingResponse,L,P,I,A,R,N,null==m?void 0:m.id]);const D=Object(l.b)(m),V={product:m,productType:m.type||"simple",productIsPurchasable:Object(l.a)(m),productHasOptions:m.has_options||!1,supportsFormElements:D,showFormElements:E&&D,quantity:w.quantity||(null==m||null===(t=m.add_to_cart)||void 0===t?void 0:t.minimum)||1,minQuantity:(null==m||null===(c=m.add_to_cart)||void 0===c?void 0:c.minimum)||1,maxQuantity:(null==m||null===(o=m.add_to_cart)||void 0===o?void 0:o.maximum)||99,multipleOf:(null==m||null===(n=m.add_to_cart)||void 0===n?void 0:n.multiple_of)||1,requestParams:w.requestParams,isIdle:w.status===u.IDLE,isDisabled:w.status===u.DISABLED,isProcessing:w.status===u.PROCESSING,isBeforeProcessing:w.status===u.BEFORE_PROCESSING,isAfterProcessing:w.status===u.AFTER_PROCESSING,hasError:w.hasError,eventRegistration:B,dispatchActions:L};return Object(r.createElement)(J.Provider,{value:V},b)};var ee=c(15),te=c.n(ee),ce=c(14),re=c(234),oe=c(40),ne=()=>{const{dispatchActions:e,product:t,quantity:c,eventRegistration:o,hasError:n,isProcessing:s,requestParams:l}=X(),{hasValidationErrors:u,showAllValidationErrors:d}=Object(W.b)(),{createErrorNotice:b,removeNotice:p}=Object(i.useDispatch)("core/notices"),{receiveCart:m}=Object(oe.a)(),[g,O]=Object(r.useState)(!1),j=!n&&s,h=Object(r.useCallback)(()=>!u||(d(),{type:"error"}),[u,d]);Object(r.useEffect)(()=>{const e=o.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[o,h]);const _=Object(r.useCallback)(()=>{O(!0),p("add-to-cart","woocommerce/single-product/"+((null==t?void 0:t.id)||0));const r={id:t.id||0,quantity:c,...l};te()({path:"/wc/store/v1/cart/add-item",method:"POST",data:r,cache:"no-store",parse:!1}).then(c=>{te.a.setNonce(c.headers),c.json().then((function(r){c.ok?m(r):(r.body&&r.body.message?b(Object(ce.decodeEntities)(r.body.message),{id:"add-to-cart",context:"woocommerce/single-product/"+((null==t?void 0:t.id)||0)}):b(Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart",context:"woocommerce/single-product/"+((null==t?void 0:t.id)||0)}),e.setHasError()),Object(re.b)({preserveCartData:!0}),e.setAfterProcessing(r),O(!1)}))}).catch(t=>{t.json().then((function(t){var c;null!==(c=t.data)&&void 0!==c&&c.cart&&m(t.data.cart),e.setHasError(),e.setAfterProcessing(t),O(!1)}))})},[t,b,p,m,e,c,l]);return Object(r.useEffect)(()=>{j&&!g&&_()},[j,_,g]),null};const ae=e=>{let{children:t,product:c,showFormElements:o}=e;return Object(r.createElement)(W.a,null,Object(r.createElement)(Z,{product:c,showFormElements:o},t,Object(r.createElement)(ne,null)))};var se=c(29),le=c(7),ie=c(58),ue=(c(279),c(69)),de=c(115),be=c(548),pe=c(81),me=c(407);const ge=e=>{let{className:t,href:c,text:o,onClick:n}=e;return Object(r.createElement)(ue.a,{className:t,href:c,onClick:n,rel:"nofollow"},o)},Oe=e=>{let{className:t,quantityInCart:c,isProcessing:o,isDisabled:n,isDone:s,onClick:l}=e;return Object(r.createElement)(ue.a,{className:t,disabled:n,showSpinner:o,onClick:l},s&&c>0?Object(a.sprintf)(
19
  /* translators: %s number of products in cart. */
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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '608129f0da1fe5ea624f1281041bdca3');
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-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '5bebd71e9fdae565546dd57944a7a6d4');
build/all-reviews.js CHANGED
@@ -1,4 +1,4 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var o,a,i=t[0],s=t[1],l=t[2],u=0,b=[];u<i.length;u++)a=i[u],Object.prototype.hasOwnProperty.call(n,a)&&n[a]&&b.push(n[a][0]),n[a]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);for(d&&d(t);b.length;)b.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],o=!0,i=1;i<r.length;i++){var s=r[i];0!==n[s]&&(o=!1)}o&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var o={},n={8:0},c=[];function a(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=o,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(r,o,function(t){return e[t]}.bind(null,o));return r},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 i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var d=s;return c.push([395,0]),r()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.compose},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var o=r(0),n=r(1),c=r(5),a=r(2),i=r(3);const s=(e,t,r)=>Object(o.createElement)(c.BlockControls,null,Object(o.createElement)(i.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),l=(e,t)=>{const r=Object(a.getSetting)("showAvatars",!0),c=Object(a.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!c&&Object(o.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your <a>store settings</a>.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.__experimentalToggleGroupControl,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,onChange:e=>t({imageType:e})},Object(o.createElement)(i.__experimentalToggleGroupControlOption,{value:"reviewer",label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block")}),Object(o.createElement)(i.__experimentalToggleGroupControlOption,{value:"product",label:Object(n.__)("Product","woo-gutenberg-products-block")})),"reviewer"===e.imageType&&!r&&Object(o.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your <a>site settings</a>.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(i.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},11:function(e,t){e.exports=window.wp.primitives},116:function(e,t){},121:function(e,t,r){"use strict";var o=r(0),n=r(4),c=r.n(n),a=r(30),i=r(10);r(154),t.a=Object(i.withInstanceId)(e=>{let{className:t,instanceId:r,label:n="",onChange:i,options:s,screenReaderLabel:l,value:d}=e;const u="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:u}}),Object(o.createElement)("select",{id:u,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:i,value:d},s&&s.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},123:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(22);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
2
  /* translators: An example person name used for the block previews. */
3
  reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`<p>${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}</p>\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
4
  /* translators: An example person name used for the block previews. */
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var o,a,i=t[0],s=t[1],l=t[2],u=0,b=[];u<i.length;u++)a=i[u],Object.prototype.hasOwnProperty.call(n,a)&&n[a]&&b.push(n[a][0]),n[a]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);for(d&&d(t);b.length;)b.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],o=!0,i=1;i<r.length;i++){var s=r[i];0!==n[s]&&(o=!1)}o&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var o={},n={8:0},c=[];function a(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=o,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(r,o,function(t){return e[t]}.bind(null,o));return r},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 i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var d=s;return c.push([395,0]),r()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.compose},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var o=r(0),n=r(1),c=r(5),a=r(2),i=r(3);const s=(e,t,r)=>Object(o.createElement)(c.BlockControls,null,Object(o.createElement)(i.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),l=(e,t)=>{const r=Object(a.getSetting)("showAvatars",!0),c=Object(a.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!c&&Object(o.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your <a>store settings</a>.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.__experimentalToggleGroupControl,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,onChange:e=>t({imageType:e})},Object(o.createElement)(i.__experimentalToggleGroupControlOption,{value:"reviewer",label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block")}),Object(o.createElement)(i.__experimentalToggleGroupControlOption,{value:"product",label:Object(n.__)("Product","woo-gutenberg-products-block")})),"reviewer"===e.imageType&&!r&&Object(o.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your <a>site settings</a>.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(i.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(i.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(i.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},11:function(e,t){e.exports=window.wp.primitives},116:function(e,t){},121:function(e,t,r){"use strict";var o=r(0),n=r(4),c=r.n(n),a=r(30),i=r(10);r(154),t.a=Object(i.withInstanceId)(e=>{let{className:t,instanceId:r,label:n="",onChange:i,options:s,screenReaderLabel:l,value:d=""}=e;const u="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:u}}),Object(o.createElement)("select",{id:u,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:i,value:d},s&&s.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},123:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(22);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
2
  /* translators: An example person name used for the block previews. */
3
  reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`<p>${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}</p>\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",
4
  /* translators: An example person name used for the block previews. */
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-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning'), 'version' => '4f77c9578cc24ac7411755e5b12a556e');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning'), 'version' => '6426e31dc2da27bd689c3daaebf6ea06');
build/attribute-filter-frontend.js CHANGED
@@ -2,7 +2,7 @@
2
  /* translators: %s number of products. */
3
  Object(o._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(e){r=c}}();var a,u=[],l=!1,d=-1;function p(){l&&a&&(l=!1,a.length?u=a.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(a=u,u=[];++d<t;)a&&a[d].run();d=-1,t=u.length}a=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new b(e,t)),1!==u.length||l||s(f)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),o=n(8),i=n(0),c=n(32),s=n(74);const a=e=>{const{namespace:t,resourceName:n,resourceValues:a=[],query:u={},shouldSelect:l=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(i.useRef)({results:[],isLoading:!0}),p=Object(c.a)(u),f=Object(c.a)(a),b=Object(s.a)(),m=Object(o.useSelect)(e=>{if(!l)return null;const o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,p,f],c=o.getCollectionError(...i);if(c){if(!(c instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");b(c)}return{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}},[t,n,f,p,l]);return null!==m&&(d.current=m),d.current}},,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(14);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},,function(e,t){e.exports=window.wp.blockEditor},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(5),c=n.n(i),s=n(25);n(107),t.a=e=>{let{className:t,disabled:n,label:
4
  /* translators: Submit button text for filters. */
5
- i=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(r.createElement)("button",{type:"submit",className:c()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:a},Object(r.createElement)(s.a,{label:i,screenReaderLabel:u}))}},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(5),c=n.n(i),s=n(1),a=n(21),u=n(70),l=n(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:n,spokenMessage:i=n,onRemove:p=o.noop,isDismissible:f=!0,actions:b=[],politeness:m=d(t),__unstableHTML:h,onDismiss:g=o.noop}){!function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(a.speak)(n,t)},[n,t])}(i,m);const v=c()(e,"components-notice","is-"+t,{"is-dismissible":f});return h&&(n=Object(r.createElement)(r.RawHTML,null,n)),Object(r.createElement)("div",{className:v},Object(r.createElement)("div",{className:"components-notice__content"},n,Object(r.createElement)("div",{className:"components-notice__actions"},b.map(({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:i=!1,onClick:s,url:a},u)=>{let d=o;return"primary"===o||i||(d=a?"link":"secondary"),void 0===d&&n&&(d="primary"),Object(r.createElement)(l.a,{key:u,href:a,variant:d,onClick:a?void 0:s,className:c()("components-notice__action",e)},t)}))),f&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:u.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return c}));var r=n(15);const o="query_type_",i="filter_";function c(e){return window?Object(r.getQueryArg)(window.location.href,e):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(3),o=n(50);function i(e,t){return e===t}function c(e){return"function"==typeof e?function(){return e}:e}function s(e,t,n){var s=n&&n.equalityFn||i,a=function(e){var t=Object(r.useState)(c(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(c(e))}),[])]}(e),u=a[0],l=a[1],d=Object(o.a)(Object(r.useCallback)((function(e){return l(e)}),[l]),t,n),p=Object(r.useRef)(e);return s(p.current,e)||(d(e),p.current=e),[u,d]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(4);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.filter(e=>e.attribute===n.taxonomy),c=i.length?i[0]:null;if(!(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)))return;const s=c.slug.filter(e=>e!==o),a=e.filter(e=>e.attribute!==n.taxonomy);s.length>0&&(c.slug=s.sort(),a.push(c)),t(Object(r.sortBy)(a,"attribute"))},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";if(!n||!n.taxonomy)return[];const c=e.filter(e=>e.attribute!==n.taxonomy);return 0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(r.sortBy)(c,"attribute"))),c}},,function(e,t){e.exports=window.wp.blocks},,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})}},,,function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(2);const o=Object(r.getSetting)("attributes",[]).reduce((e,t)=>{const n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return n&&n.id&&e.push(n),e},[]),i=e=>{if(e)return o.find(t=>t.id===e)},c=e=>{if(e)return o.find(t=>t.taxonomy===e)}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(5),c=n.n(i);n(126),t.a=e=>{let{className:t,onChange:n=(()=>{}),options:i=[],checked:s=[],isLoading:a=!1,isDisabled:u=!1,limit:l=10}=e;const[d,p]=Object(r.useState)(!1),f=Object(r.useMemo)(()=>[...Array(5)].map((e,t)=>Object(r.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),b=Object(r.useMemo)(()=>{const e=i.length-l;return!d&&Object(r.createElement)("li",{key:"show-more",className:"show-more"},Object(r.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)(
6
  /* translators: %s is referring the remaining count of options */
7
  Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)(
8
  /* translators: %s number of options to reveal. */
2
  /* translators: %s number of products. */
3
  Object(o._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(e){r=c}}();var a,u=[],l=!1,d=-1;function p(){l&&a&&(l=!1,a.length?u=a.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(a=u,u=[];++d<t;)a&&a[d].run();d=-1,t=u.length}a=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new b(e,t)),1!==u.length||l||s(f)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),o=n(8),i=n(0),c=n(32),s=n(74);const a=e=>{const{namespace:t,resourceName:n,resourceValues:a=[],query:u={},shouldSelect:l=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(i.useRef)({results:[],isLoading:!0}),p=Object(c.a)(u),f=Object(c.a)(a),b=Object(s.a)(),m=Object(o.useSelect)(e=>{if(!l)return null;const o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,p,f],c=o.getCollectionError(...i);if(c){if(!(c instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");b(c)}return{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}},[t,n,f,p,l]);return null!==m&&(d.current=m),d.current}},,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(14);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},,function(e,t){e.exports=window.wp.blockEditor},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(5),c=n.n(i),s=n(25);n(107),t.a=e=>{let{className:t,disabled:n,label:
4
  /* translators: Submit button text for filters. */
5
+ i=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(r.createElement)("button",{type:"submit",className:c()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:a},Object(r.createElement)(s.a,{label:i,screenReaderLabel:u}))}},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(5),c=n.n(i),s=n(1),a=n(21),u=n(70),l=n(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:n,spokenMessage:i=n,onRemove:p=o.noop,isDismissible:f=!0,actions:b=[],politeness:m=d(t),__unstableHTML:h,onDismiss:g=o.noop}){!function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(a.speak)(n,t)},[n,t])}(i,m);const v=c()(e,"components-notice","is-"+t,{"is-dismissible":f});return h&&(n=Object(r.createElement)(r.RawHTML,null,n)),Object(r.createElement)("div",{className:v},Object(r.createElement)("div",{className:"components-notice__content"},n,Object(r.createElement)("div",{className:"components-notice__actions"},b.map(({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:i=!1,onClick:s,url:a},u)=>{let d=o;return"primary"===o||i||(d=a?"link":"secondary"),void 0===d&&n&&(d="primary"),Object(r.createElement)(l.a,{key:u,href:a,variant:d,onClick:a?void 0:s,className:c()("components-notice__action",e)},t)}))),f&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:u.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return c}));var r=n(15);const o="query_type_",i="filter_";function c(e){return window?Object(r.getQueryArg)(window.location.href,e):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(3),o=n(50);function i(e,t){return e===t}function c(e){return"function"==typeof e?function(){return e}:e}function s(e,t,n){var s=n&&n.equalityFn||i,a=function(e){var t=Object(r.useState)(c(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(c(e))}),[])]}(e),u=a[0],l=a[1],d=Object(o.a)(Object(r.useCallback)((function(e){return l(e)}),[l]),t,n),p=Object(r.useRef)(e);return s(p.current,e)||(d(e),p.current=e),[u,d]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(4);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.filter(e=>e.attribute===n.taxonomy),c=i.length?i[0]:null;if(!(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)))return;const s=c.slug.filter(e=>e!==o),a=e.filter(e=>e.attribute!==n.taxonomy);s.length>0&&(c.slug=s.sort(),a.push(c)),t(Object(r.sortBy)(a,"attribute"))},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";if(!n||!n.taxonomy)return[];const c=e.filter(e=>e.attribute!==n.taxonomy);return 0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(r.sortBy)(c,"attribute"))),c}},,function(e,t){e.exports=window.wp.blocks},,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})}},,,function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(2);const o=Object(r.getSetting)("attributes",[]).reduce((e,t)=>{const n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return n&&n.id&&e.push(n),e},[]),i=e=>{if(e)return o.find(t=>t.id===e)},c=e=>{if(e)return o.find(t=>t.taxonomy===e)}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(5),c=n.n(i);n(126),t.a=e=>{let{className:t,onChange:n,options:i=[],checked:s=[],isLoading:a=!1,isDisabled:u=!1,limit:l=10}=e;const[d,p]=Object(r.useState)(!1),f=Object(r.useMemo)(()=>[...Array(5)].map((e,t)=>Object(r.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),b=Object(r.useMemo)(()=>{const e=i.length-l;return!d&&Object(r.createElement)("li",{key:"show-more",className:"show-more"},Object(r.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)(
6
  /* translators: %s is referring the remaining count of options */
7
  Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)(
8
  /* translators: %s number of options to reveal. */
build/attribute-filter.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', '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-polyfill', 'wp-primitives', 'wp-url', 'wp-warning'), 'version' => '7ecefc261b1f26c919055dec77075960');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', '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-polyfill', 'wp-primitives', 'wp-url', 'wp-warning'), 'version' => '24a5706813c4001098b19b691496c129');
build/attribute-filter.js CHANGED
@@ -5,7 +5,7 @@ Object(o.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:r,onClick:
5
  /* translators: %s number of products. */
6
  Object(r._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},11:function(e,t){e.exports=window.wp.primitives},110:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));const c=e=>"string"==typeof e},111:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(8);function r(e,t){const n=Object(c.useRef)();return Object(c.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},122:function(e,t,n){"use strict";var c=n(0),r=n(5),o=n(10),l=n(1);n(155),t.a=Object(o.withInstanceId)(e=>{let{className:t,headingLevel:n,onChange:o,heading:a,instanceId:s}=e;const i="h"+n;return Object(c.createElement)(i,{className:t},Object(c.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(l.__)("Block title","woo-gutenberg-products-block")),Object(c.createElement)(r.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:o}))})},124:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(0);const r=()=>{const[,e]=Object(c.useState)();return Object(c.useCallback)(t=>{e(()=>{throw t})},[])}},125:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var c=n(18),r=n(9),o=n(0),l=n(50),a=n(124);const s=e=>{const{namespace:t,resourceName:n,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),d=Object(l.a)(i),p=Object(l.a)(s),m=Object(a.a)(),g=Object(r.useSelect)(e=>{if(!u)return null;const r=e(c.COLLECTIONS_STORE_KEY),o=[t,n,d,p],l=r.getCollectionError(...o);if(l){if(!(l instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(l)}return{results:r.getCollection(...o),isLoading:!r.hasFinishedResolution("getCollection",o)}},[t,n,p,d,u]);return null!==g&&(b.current=g),b.current}},13:function(e,t){e.exports=window.wp.blocks},14:function(e,t){e.exports=window.wp.htmlEntities},143:function(e,t,n){"use strict";var c=n(0),r=n(1),o=n(4),l=n.n(o),a=n(30);n(185),t.a=e=>{let{className:t,disabled:n,label:
7
  /* translators: Submit button text for filters. */
8
- o=Object(r.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:i=Object(r.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(c.createElement)("button",{type:"submit",className:l()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:s},Object(c.createElement)(a.a,{label:o,screenReaderLabel:i}))}},155:function(e,t){},156:function(e,t){},16:function(e,t){e.exports=window.wp.url},166:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return l}));var c=n(16);const r="query_type_",o="filter_";function l(e){return window?Object(c.getQueryArg)(window.location.href,e):null}},170:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var c=n(7);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const o=e.filter(e=>e.attribute===n.taxonomy),l=o.length?o[0]:null;if(!(l&&l.slug&&Array.isArray(l.slug)&&l.slug.includes(r)))return;const a=l.slug.filter(e=>e!==r),s=e.filter(e=>e.attribute!==n.taxonomy);a.length>0&&(l.slug=a.sort(),s.push(l)),t(Object(c.sortBy)(s,"attribute"))},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";if(!n||!n.taxonomy)return[];const l=e.filter(e=>e.attribute!==n.taxonomy);return 0===r.length?t(l):(l.push({attribute:n.taxonomy,operator:o,slug:r.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(c.sortBy)(l,"attribute"))),l}},18:function(e,t){e.exports=window.wc.wcBlocksData},185:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},201:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return l}));var c=n(2);const r=Object(c.getSetting)("attributes",[]).reduce((e,t)=>{const n=(c=t)&&c.attribute_name?{id:parseInt(c.attribute_id,10),name:c.attribute_name,taxonomy:"pa_"+c.attribute_name,label:c.attribute_label}:null;var c;return n&&n.id&&e.push(n),e},[]),o=e=>{if(e)return r.find(t=>t.id===e)},l=e=>{if(e)return r.find(t=>t.taxonomy===e)}},202:function(e,t,n){"use strict";var c=n(0),r=n(1),o=n(4),l=n.n(o);n(246),t.a=e=>{let{className:t,onChange:n=(()=>{}),options:o=[],checked:a=[],isLoading:s=!1,isDisabled:i=!1,limit:u=10}=e;const[b,d]=Object(c.useState)(!1),p=Object(c.useMemo)(()=>[...Array(5)].map((e,t)=>Object(c.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),m=Object(c.useMemo)(()=>{const e=o.length-u;return!b&&Object(c.createElement)("li",{key:"show-more",className:"show-more"},Object(c.createElement)("button",{onClick:()=>{d(!0)},"aria-expanded":!1,"aria-label":Object(r.sprintf)(
9
  /* translators: %s is referring the remaining count of options */
10
  Object(r._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(r.sprintf)(
11
  /* translators: %s number of options to reveal. */
5
  /* translators: %s number of products. */
6
  Object(r._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},11:function(e,t){e.exports=window.wp.primitives},110:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));const c=e=>"string"==typeof e},111:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(8);function r(e,t){const n=Object(c.useRef)();return Object(c.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},122:function(e,t,n){"use strict";var c=n(0),r=n(5),o=n(10),l=n(1);n(155),t.a=Object(o.withInstanceId)(e=>{let{className:t,headingLevel:n,onChange:o,heading:a,instanceId:s}=e;const i="h"+n;return Object(c.createElement)(i,{className:t},Object(c.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(l.__)("Block title","woo-gutenberg-products-block")),Object(c.createElement)(r.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:o}))})},124:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(0);const r=()=>{const[,e]=Object(c.useState)();return Object(c.useCallback)(t=>{e(()=>{throw t})},[])}},125:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var c=n(18),r=n(9),o=n(0),l=n(50),a=n(124);const s=e=>{const{namespace:t,resourceName:n,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),d=Object(l.a)(i),p=Object(l.a)(s),m=Object(a.a)(),g=Object(r.useSelect)(e=>{if(!u)return null;const r=e(c.COLLECTIONS_STORE_KEY),o=[t,n,d,p],l=r.getCollectionError(...o);if(l){if(!(l instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(l)}return{results:r.getCollection(...o),isLoading:!r.hasFinishedResolution("getCollection",o)}},[t,n,p,d,u]);return null!==g&&(b.current=g),b.current}},13:function(e,t){e.exports=window.wp.blocks},14:function(e,t){e.exports=window.wp.htmlEntities},143:function(e,t,n){"use strict";var c=n(0),r=n(1),o=n(4),l=n.n(o),a=n(30);n(185),t.a=e=>{let{className:t,disabled:n,label:
7
  /* translators: Submit button text for filters. */
8
+ o=Object(r.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:i=Object(r.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(c.createElement)("button",{type:"submit",className:l()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:s},Object(c.createElement)(a.a,{label:o,screenReaderLabel:i}))}},155:function(e,t){},156:function(e,t){},16:function(e,t){e.exports=window.wp.url},166:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return l}));var c=n(16);const r="query_type_",o="filter_";function l(e){return window?Object(c.getQueryArg)(window.location.href,e):null}},170:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var c=n(7);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const o=e.filter(e=>e.attribute===n.taxonomy),l=o.length?o[0]:null;if(!(l&&l.slug&&Array.isArray(l.slug)&&l.slug.includes(r)))return;const a=l.slug.filter(e=>e!==r),s=e.filter(e=>e.attribute!==n.taxonomy);a.length>0&&(l.slug=a.sort(),s.push(l)),t(Object(c.sortBy)(s,"attribute"))},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";if(!n||!n.taxonomy)return[];const l=e.filter(e=>e.attribute!==n.taxonomy);return 0===r.length?t(l):(l.push({attribute:n.taxonomy,operator:o,slug:r.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(c.sortBy)(l,"attribute"))),l}},18:function(e,t){e.exports=window.wc.wcBlocksData},185:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},201:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return l}));var c=n(2);const r=Object(c.getSetting)("attributes",[]).reduce((e,t)=>{const n=(c=t)&&c.attribute_name?{id:parseInt(c.attribute_id,10),name:c.attribute_name,taxonomy:"pa_"+c.attribute_name,label:c.attribute_label}:null;var c;return n&&n.id&&e.push(n),e},[]),o=e=>{if(e)return r.find(t=>t.id===e)},l=e=>{if(e)return r.find(t=>t.taxonomy===e)}},202:function(e,t,n){"use strict";var c=n(0),r=n(1),o=n(4),l=n.n(o);n(246),t.a=e=>{let{className:t,onChange:n,options:o=[],checked:a=[],isLoading:s=!1,isDisabled:i=!1,limit:u=10}=e;const[b,d]=Object(c.useState)(!1),p=Object(c.useMemo)(()=>[...Array(5)].map((e,t)=>Object(c.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),m=Object(c.useMemo)(()=>{const e=o.length-u;return!b&&Object(c.createElement)("li",{key:"show-more",className:"show-more"},Object(c.createElement)("button",{onClick:()=>{d(!0)},"aria-expanded":!1,"aria-label":Object(r.sprintf)(
9
  /* translators: %s is referring the remaining count of options */
10
  Object(r._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(r.sprintf)(
11
  /* translators: %s number of options to reveal. */
build/cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend.js CHANGED
@@ -1,4 +1,4 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5],{101:function(e,t,n){"use strict";var a=n(12),c=n.n(a),o=n(0),s=n(139),r=n(5),l=n.n(r);n(196);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:a,onValueChange:r,displayType:p="text",...u}=e;const d="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(d))return null;const b=d/10**a.minorUnit;if(!Number.isFinite(b))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...u,...i(a),value:void 0,currency:void 0,onValueChange:void 0},O=r?e=>{const t=+e.value*10**a.minorUnit;r(t)}:()=>{};return Object(o.createElement)(s.a,c()({className:m,displayType:p},g,{value:b,onValueChange:O}))}},196:function(e,t){},25:function(e,t,n){"use strict";var a=n(0),c=n(5),o=n.n(c);t.a=e=>{let t,{label:n,screenReaderLabel:c,wrapperElement:s,wrapperProps:r={}}=e;const l=null!=n,i=null!=c;return!l&&i?(t=s||"span",r={...r,className:o()(r.className,"screen-reader-text")},Object(a.createElement)(t,r,c)):(t=s||a.Fragment,l&&i&&n!==c?Object(a.createElement)(t,r,Object(a.createElement)("span",{"aria-hidden":"true"},n),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,r,n))}},261:function(e,t){},262:function(e,t){},263:function(e,t,n){"use strict";var a=n(12),c=n.n(a),o=n(0),s=n(43),r=n(5),l=n.n(r),i=n(136);n(264),t.a=e=>{let{className:t,showSpinner:n=!1,children:a,variant:r="contained",...p}=e;const u=l()("wc-block-components-button",t,r,{"wc-block-components-button--loading":n});return Object(o.createElement)(s.a,c()({className:u},p),n&&Object(o.createElement)(i.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},a))}},264:function(e,t){},267:function(e,t,n){"use strict";var a=n(0),c=n(5),o=n.n(c),s=n(268);t.a=e=>{let{checked:t,name:n,onChange:c,option:r}=e;const{value:l,label:i,description:p,secondaryLabel:u,secondaryDescription:d}=r;return Object(a.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${l}`},Object(a.createElement)("input",{id:`${n}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:l,onChange:e=>c(e.target.value),checked:t,"aria-describedby":o()({[`${n}-${l}__label`]:i,[`${n}-${l}__secondary-label`]:u,[`${n}-${l}__description`]:p,[`${n}-${l}__secondary-description`]:d})}),Object(a.createElement)(s.a,{id:`${n}-${l}`,label:i,secondaryLabel:u,description:p,secondaryDescription:d}))}},268:function(e,t,n){"use strict";var a=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:c,secondaryDescription:o,id:s}=e;return Object(a.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(a.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(a.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(a.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(a.createElement)("div",{className:"wc-block-components-radio-control__description-group"},c&&Object(a.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},c),o&&Object(a.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},273:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0),c=n(198);n(261);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(c.b)();if(!t||"string"!=typeof t){const e=s(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(a.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(a.createElement)("p",{id:r(o)},t))}},289:function(e,t,n){"use strict";var a=n(0),c=n(5),o=n.n(c),s=n(11),r=n(267);n(290);const l=e=>{let{className:t="",id:n,selected:c,onChange:i=(()=>{}),options:p=[]}=e;const u=Object(s.useInstanceId)(l),d=n||u;return p.length?Object(a.createElement)("div",{className:o()("wc-block-components-radio-control",t)},p.map(e=>Object(a.createElement)(r.a,{key:`${d}-${e.value}`,name:"radio-control-"+d,checked:e.value===c,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},290:function(e,t){},297:function(e,t,n){"use strict";var a=n(12),c=n.n(a),o=n(0),s=n(1),r=n(3),l=n(5),i=n.n(l),p=n(198),u=n(273),d=n(11),b=n(52),m=n(25);n(262);var g=Object(r.forwardRef)((e,t)=>{let{className:n,id:a,type:s="text",ariaLabel:r,ariaDescribedBy:l,label:p,screenReaderLabel:u,disabled:d,help:b,autoCapitalize:g="off",autoComplete:O="off",value:h="",onChange:j,required:f=!1,onBlur:E=(()=>{}),feedback:k,..._}=e;const[v,y]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":v||h})},Object(o.createElement)("input",c()({type:s,id:a,value:h,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{j(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{E(e.target.value),y(!1)},"aria-label":r||p,disabled:d,"aria-describedby":b&&!l?a+"__help":l,required:f},_)),Object(o.createElement)(m.a,{label:p,screenReaderLabel:u||p,wrapperElement:"label",wrapperProps:{htmlFor:a},htmlFor:a}),!!b&&Object(o.createElement)("p",{id:a+"__help",className:"wc-block-components-text-input__help"},b),k)});t.a=Object(d.withInstanceId)(e=>{let{className:t,instanceId:n,id:a,ariaDescribedBy:l,errorId:d,focusOnMount:m=!1,onChange:O,showError:h=!0,errorMessage:j="",value:f="",...E}=e;const[k,_]=Object(r.useState)(!0),v=Object(r.useRef)(null),{getValidationError:y,hideValidationError:w,setValidationErrors:C,clearValidationError:N,getValidationErrorId:S}=Object(p.b)(),I=void 0!==a?a:"textinput-"+n,R=void 0!==d?d:I,x=Object(r.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const n=t.checkValidity();n?N(R):C({[R]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[N,R,C]);Object(r.useEffect)(()=>{var e;k&&m&&(null===(e=v.current)||void 0===e||e.focus()),_(!1)},[m,k,_]),Object(r.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&x(!0)},[f,x]),Object(r.useEffect)(()=>()=>{N(R)},[N,R]);const L=y(R)||{};Object(b.a)(j)&&""!==j&&(L.message=j);const M=L.message&&!L.hidden,$=h&&M&&S(R)?S(R):l;return Object(o.createElement)(g,c()({className:i()(t,{"has-error":M}),"aria-invalid":!0===M,id:I,onBlur:()=>{x(!1)},feedback:h&&Object(o.createElement)(u.a,{errorMessage:j,propertyName:R}),ref:v,onChange:e=>{w(R),O(e)},ariaDescribedBy:$,value:f},E))})},312:function(e,t){},313:function(e,t){},314:function(e,t){},315:function(e,t){},336:function(e,t){},343:function(e,t,n){"use strict";var a=n(0),c=n(1),o=n(21),s=n(138),r=n(10),l=n(385),i=n(33),p=n(29),u=n(5),d=n.n(u),b=n(18),m=n(25),g=n(68),O=n(289),h=n(268),j=n(41),f=n(101),E=n(2);const k=e=>{const t=Object(E.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(a.createElement)(a.Fragment,null,Number.isFinite(t)&&Object(a.createElement)(f.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var _=e=>{let{className:t="",noResultsMessage:n,onSelectRate:c,rates:o,renderOption:s=k,selectedRate:r}=e;const l=(null==r?void 0:r.rate_id)||"",[i,p]=Object(a.useState)(l);if(Object(a.useEffect)(()=>{l&&p(l)},[l]),0===o.length)return n;if(o.length>1)return Object(a.createElement)(O.a,{className:t,onChange:e=>{p(e),c(e)},selected:i,options:o.map(s)});const{label:u,secondaryLabel:d,description:b,secondaryDescription:m}=s(o[0]);return Object(a.createElement)(h.a,{label:u,secondaryLabel:d,description:b,secondaryDescription:m})};n(315);var v=e=>{let{packageId:t,className:n="",noResultsMessage:o,renderOption:s,packageData:l,collapsible:i=!1,collapse:p=!1,showItems:u=!1}=e;const{selectShippingRate:O}=Object(g.a)(),h=Object(a.createElement)(a.Fragment,null,(u||i)&&Object(a.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),u&&Object(a.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(b.decodeEntities)(e.name),n=e.quantity;return Object(a.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(a.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(c.sprintf)(
2
  /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
3
  Object(c._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),j=Object(a.createElement)(_,{className:n,noResultsMessage:o,rates:l.shipping_rates,onSelectRate:e=>O(e,t),selectedRate:l.shipping_rates.find(e=>e.selected),renderOption:s});return i?Object(a.createElement)(r.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:h},j):Object(a.createElement)("div",{className:d()("wc-block-components-shipping-rates-control__package",n)},h,j)};const y=e=>{let{packages:t,collapse:n,showItems:c,collapsible:o,noResultsMessage:s,renderOption:r}=e;return t.length?Object(a.createElement)(a.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(a.createElement)(v,{key:t,packageId:t,packageData:l,collapsible:o,collapse:n,showItems:c,noResultsMessage:s,renderOption:r})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:n,className:u,collapsible:d=!1,noResultsMessage:b,renderOption:m,context:g}=e;Object(a.useEffect)(()=>{if(n)return;const e=Object(l.a)(t),a=Object(l.b)(t);1===e?Object(o.speak)(Object(c.sprintf)(
4
  /* translators: %d number of shipping options found. */
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5],{101:function(e,t,n){"use strict";var a=n(12),c=n.n(a),o=n(0),s=n(139),r=n(5),l=n.n(r);n(196);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:a,onValueChange:r,displayType:p="text",...u}=e;const d="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(d))return null;const b=d/10**a.minorUnit;if(!Number.isFinite(b))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...u,...i(a),value:void 0,currency:void 0,onValueChange:void 0},O=r?e=>{const t=+e.value*10**a.minorUnit;r(t)}:()=>{};return Object(o.createElement)(s.a,c()({className:m,displayType:p},g,{value:b,onValueChange:O}))}},196:function(e,t){},25:function(e,t,n){"use strict";var a=n(0),c=n(5),o=n.n(c);t.a=e=>{let t,{label:n,screenReaderLabel:c,wrapperElement:s,wrapperProps:r={}}=e;const l=null!=n,i=null!=c;return!l&&i?(t=s||"span",r={...r,className:o()(r.className,"screen-reader-text")},Object(a.createElement)(t,r,c)):(t=s||a.Fragment,l&&i&&n!==c?Object(a.createElement)(t,r,Object(a.createElement)("span",{"aria-hidden":"true"},n),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,r,n))}},261:function(e,t){},262:function(e,t){},263:function(e,t,n){"use strict";var a=n(12),c=n.n(a),o=n(0),s=n(43),r=n(5),l=n.n(r),i=n(136);n(264),t.a=e=>{let{className:t,showSpinner:n=!1,children:a,variant:r="contained",...p}=e;const u=l()("wc-block-components-button",t,r,{"wc-block-components-button--loading":n});return Object(o.createElement)(s.a,c()({className:u},p),n&&Object(o.createElement)(i.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},a))}},264:function(e,t){},267:function(e,t,n){"use strict";var a=n(0),c=n(5),o=n.n(c),s=n(268);t.a=e=>{let{checked:t,name:n,onChange:c,option:r}=e;const{value:l,label:i,description:p,secondaryLabel:u,secondaryDescription:d}=r;return Object(a.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${l}`},Object(a.createElement)("input",{id:`${n}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:l,onChange:e=>c(e.target.value),checked:t,"aria-describedby":o()({[`${n}-${l}__label`]:i,[`${n}-${l}__secondary-label`]:u,[`${n}-${l}__description`]:p,[`${n}-${l}__secondary-description`]:d})}),Object(a.createElement)(s.a,{id:`${n}-${l}`,label:i,secondaryLabel:u,description:p,secondaryDescription:d}))}},268:function(e,t,n){"use strict";var a=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:c,secondaryDescription:o,id:s}=e;return Object(a.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(a.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(a.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(a.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(a.createElement)("div",{className:"wc-block-components-radio-control__description-group"},c&&Object(a.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},c),o&&Object(a.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},273:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0),c=n(198);n(261);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(c.b)();if(!t||"string"!=typeof t){const e=s(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(a.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(a.createElement)("p",{id:r(o)},t))}},289:function(e,t,n){"use strict";var a=n(0),c=n(5),o=n.n(c),s=n(11),r=n(267);n(290);const l=e=>{let{className:t="",id:n,selected:c,onChange:i,options:p=[]}=e;const u=Object(s.useInstanceId)(l),d=n||u;return p.length?Object(a.createElement)("div",{className:o()("wc-block-components-radio-control",t)},p.map(e=>Object(a.createElement)(r.a,{key:`${d}-${e.value}`,name:"radio-control-"+d,checked:e.value===c,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},290:function(e,t){},297:function(e,t,n){"use strict";var a=n(12),c=n.n(a),o=n(0),s=n(1),r=n(3),l=n(5),i=n.n(l),p=n(198),u=n(273),d=n(11),b=n(52),m=n(25);n(262);var g=Object(r.forwardRef)((e,t)=>{let{className:n,id:a,type:s="text",ariaLabel:r,ariaDescribedBy:l,label:p,screenReaderLabel:u,disabled:d,help:b,autoCapitalize:g="off",autoComplete:O="off",value:h="",onChange:j,required:f=!1,onBlur:E=(()=>{}),feedback:k,..._}=e;const[v,y]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":v||h})},Object(o.createElement)("input",c()({type:s,id:a,value:h,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{j(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{E(e.target.value),y(!1)},"aria-label":r||p,disabled:d,"aria-describedby":b&&!l?a+"__help":l,required:f},_)),Object(o.createElement)(m.a,{label:p,screenReaderLabel:u||p,wrapperElement:"label",wrapperProps:{htmlFor:a},htmlFor:a}),!!b&&Object(o.createElement)("p",{id:a+"__help",className:"wc-block-components-text-input__help"},b),k)});t.a=Object(d.withInstanceId)(e=>{let{className:t,instanceId:n,id:a,ariaDescribedBy:l,errorId:d,focusOnMount:m=!1,onChange:O,showError:h=!0,errorMessage:j="",value:f="",...E}=e;const[k,_]=Object(r.useState)(!0),v=Object(r.useRef)(null),{getValidationError:y,hideValidationError:w,setValidationErrors:C,clearValidationError:N,getValidationErrorId:S}=Object(p.b)(),I=void 0!==a?a:"textinput-"+n,R=void 0!==d?d:I,x=Object(r.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const n=t.checkValidity();n?N(R):C({[R]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[N,R,C]);Object(r.useEffect)(()=>{var e;k&&m&&(null===(e=v.current)||void 0===e||e.focus()),_(!1)},[m,k,_]),Object(r.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&x(!0)},[f,x]),Object(r.useEffect)(()=>()=>{N(R)},[N,R]);const L=y(R)||{};Object(b.a)(j)&&""!==j&&(L.message=j);const M=L.message&&!L.hidden,$=h&&M&&S(R)?S(R):l;return Object(o.createElement)(g,c()({className:i()(t,{"has-error":M}),"aria-invalid":!0===M,id:I,onBlur:()=>{x(!1)},feedback:h&&Object(o.createElement)(u.a,{errorMessage:j,propertyName:R}),ref:v,onChange:e=>{w(R),O(e)},ariaDescribedBy:$,value:f},E))})},312:function(e,t){},313:function(e,t){},314:function(e,t){},315:function(e,t){},336:function(e,t){},343:function(e,t,n){"use strict";var a=n(0),c=n(1),o=n(21),s=n(138),r=n(10),l=n(385),i=n(33),p=n(29),u=n(5),d=n.n(u),b=n(18),m=n(25),g=n(68),O=n(289),h=n(268),j=n(41),f=n(101),E=n(2);const k=e=>{const t=Object(E.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(a.createElement)(a.Fragment,null,Number.isFinite(t)&&Object(a.createElement)(f.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var _=e=>{let{className:t="",noResultsMessage:n,onSelectRate:c,rates:o,renderOption:s=k,selectedRate:r}=e;const l=(null==r?void 0:r.rate_id)||"",[i,p]=Object(a.useState)(l);if(Object(a.useEffect)(()=>{l&&p(l)},[l]),0===o.length)return n;if(o.length>1)return Object(a.createElement)(O.a,{className:t,onChange:e=>{p(e),c(e)},selected:i,options:o.map(s)});const{label:u,secondaryLabel:d,description:b,secondaryDescription:m}=s(o[0]);return Object(a.createElement)(h.a,{label:u,secondaryLabel:d,description:b,secondaryDescription:m})};n(315);var v=e=>{let{packageId:t,className:n="",noResultsMessage:o,renderOption:s,packageData:l,collapsible:i=!1,collapse:p=!1,showItems:u=!1}=e;const{selectShippingRate:O}=Object(g.a)(),h=Object(a.createElement)(a.Fragment,null,(u||i)&&Object(a.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),u&&Object(a.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(b.decodeEntities)(e.name),n=e.quantity;return Object(a.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(a.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(c.sprintf)(
2
  /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
3
  Object(c._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),j=Object(a.createElement)(_,{className:n,noResultsMessage:o,rates:l.shipping_rates,onSelectRate:e=>O(e,t),selectedRate:l.shipping_rates.find(e=>e.selected),renderOption:s});return i?Object(a.createElement)(r.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:h},j):Object(a.createElement)("div",{className:d()("wc-block-components-shipping-rates-control__package",n)},h,j)};const y=e=>{let{packages:t,collapse:n,showItems:c,collapsible:o,noResultsMessage:s,renderOption:r}=e;return t.length?Object(a.createElement)(a.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(a.createElement)(v,{key:t,packageId:t,packageData:l,collapsible:o,collapse:n,showItems:c,noResultsMessage:s,renderOption:r})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:n,className:u,collapsible:d=!1,noResultsMessage:b,renderOption:m,context:g}=e;Object(a.useEffect)(()=>{if(n)return;const e=Object(l.a)(t),a=Object(l.b)(t);1===e?Object(o.speak)(Object(c.sprintf)(
4
  /* translators: %d number of shipping options found. */
build/cart-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '82fb473ea65d76b5eaa79bf5bbdb4d9b');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'cd475723292f096536dc9644d7b9f6ad');
build/cart-frontend.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e){function t(t){for(var r,o,s=t[0],a=t[1],i=0,l=[];i<s.length;i++)o=s[i],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(c&&c(t);l.length;)l.shift()()}var r={},n={11:0,7:0,73:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var s=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=s);var a,i=document.createElement("script");i.charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",1:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6",2:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--5b8feb0b",3:"vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542",4:"cart-blocks/cart-line-items--mini-cart-contents-block/products-table",5:"cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping",12:"cart-blocks/cart-accepted-payment-methods",13:"cart-blocks/cart-express-payment",14:"cart-blocks/cart-items",15:"cart-blocks/cart-line-items",16:"cart-blocks/cart-order-summary",17:"cart-blocks/cart-totals",18:"cart-blocks/empty-cart",19:"cart-blocks/filled-cart",20:"cart-blocks/order-summary-coupon-form",21:"cart-blocks/order-summary-discount",22:"cart-blocks/order-summary-fee",23:"cart-blocks/order-summary-heading",24:"cart-blocks/order-summary-shipping",25:"cart-blocks/order-summary-subtotal",26:"cart-blocks/order-summary-taxes",27:"cart-blocks/proceed-to-checkout"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",1:"cc9016fd3805a088b2e8",2:"2448287d629e9e796e22",3:"80c939d54508b87a9652",4:"95ac706a0a831d9ea7dc",5:"941c70dceb4debfc8d4d",12:"e901062024d7d4414626",13:"06cc6dd4d09761436a8f",14:"9c2d532cbcd7116e63f7",15:"cc3e5cde5a1a08a8b18b",16:"b2a96ff987849a487201",17:"9b708988d58530ba1664",18:"854b725b2b73c93534b8",19:"e82c38c6edc87e11a0d8",20:"ec110f01f7d73b195692",21:"be118c45e14281292fa3",22:"8b7b8ceb031ca02b9151",23:"c847d86267822f3924b2",24:"84a244ea52b15342b7fc",25:"c686b68469526b776553",26:"2a6298107180c8ef89be",27:"cf1ad6dec2eca25de61e"}[e]}(e);var c=new Error;a=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+o+": "+s+")",c.name="ChunkLoadError",c.type=o,c.request=s,r[1](c)}n[e]=void 0}};var l=setTimeout((function(){a({type:"timeout",target:i})}),12e4);i.onerror=i.onload=a,document.head.appendChild(i)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=s.push.bind(s);s.push=t,s=s.slice();for(var i=0;i<s.length;i++)t(s[i]);var c=a;o(o.s=229)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var i in n)r.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.wc.blocksCheckout},function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),s=r(0),a=r(3),i=r(1),c=r(46),l=e=>{let{imageUrl:t=c.l+"/block-error.svg",header:r=Object(i.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(i.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(i.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),l&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:i,button:c}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof i?i({errorMessage:u}):Object(s.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:c}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";(function(e){var n=r(0);r(36);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(54))},function(e,t){e.exports=window.wp.deprecated},,,,,function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(n.useContext)(o)},,function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return d}));var n=r(20);let o,s;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(s||(s={}));const a=(e,t)=>Object(n.a)(e)&&"type"in e&&e.type===t,i=e=>a(e,o.SUCCESS),c=e=>a(e,o.ERROR),l=e=>a(e,o.FAIL),u=e=>!Object(n.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:s,shouldRetry:u,isSuccessResponse:i,isErrorResponse:c,isFailResponse:l})},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(13),s=r.n(o);function a(e){const t=Object(n.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(4),o=r(0),s=r(6),a=r(8),i=r(18),c=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(s.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},f=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...m,email:""},b={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:s.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},g=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(i.decodeEntities)(r)]})),E={cartCoupons:s.EMPTY_CART_COUPONS,cartItems:s.EMPTY_CART_ITEMS,cartFees:s.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:b,cartIsLoading:!0,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:m,shippingRates:s.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:s.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:s.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),i=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();f();const p=Object(a.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:s.EMPTY_CART_ERRORS,billingData:h,billingAddress:h,shippingAddress:m,extensions:s.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const o=e(s.CART_STORE_KEY),a=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),f=o.isCustomerDataUpdating(),{receiveCart:b}=n(s.CART_STORE_KEY),y=g(a.billingAddress),v=a.needsShipping?g(a.shippingAddress):y,O=a.fees.length>0?a.fees.map(e=>g(e)):s.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):s.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:O,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(c.a)(y),billingAddress:Object(c.a)(y),shippingAddress:Object(c.a)(v),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:f,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:b}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return P})),r.d(t,"a",(function(){return x}));var n=r(0),o=r(1),s=r(60),a=r(23),i=r.n(a),c=r(52),l=r(20),u=r(8);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),f=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},h=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var b=r(2),g=r(117);let E;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(E||(E={}));const y={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(b.getSetting)("checkoutData",{})||{}},v={redirectUrl:"",status:E.PRISTINE,hasError:!1,calculatingCount:0,orderId:y.order_id,orderNotes:"",customerId:y.customer_id,useShippingAsBilling:Object(g.b)(y.billing_address,y.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:s,extensionData:a,useShippingAsBilling:i,shouldCreateAccount:c,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case d.SET_PRISTINE:u=v;break;case d.SET_IDLE:u=e.status!==E.IDLE?{...e,status:E.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case d.SET_COMPLETE:u=e.status!==E.COMPLETE?{...e,status:E.COMPLETE,redirectUrl:"string"==typeof(null==l?void 0:l.redirectUrl)?l.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==E.PROCESSING?{...e,status:E.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==E.BEFORE_PROCESSING?{...e,status:E.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==E.AFTER_PROCESSING?{...e,status:E.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===E.PROCESSING||e.status===E.BEFORE_PROCESSING?{...u,status:E.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case d.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==i&&i!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:i});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==c&&c!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:c});break;case d.SET_ORDER_NOTES:void 0!==s&&e.orderNotes!==s&&(u={...e,orderNotes:s});break;case d.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(u={...e,extensionData:a})}return u!==e&&r!==d.SET_PRISTINE&&u.status===E.PRISTINE&&(u.status=E.IDLE),u};var _=r(18),S=r(93),k=r(201);var w=r(203),j=r(198),R=r(58),C=r(31),T=r(79);const A=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),P=()=>Object(n.useContext)(A),x=e=>{let{children:t,redirectUrl:r,isCart:a=!1}=e;v.redirectUrl=r;const[b,g]=Object(n.useReducer)(O,v),{setValidationErrors:y}=Object(j.b)(),{createErrorNotice:P}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:x}=Object(R.a)(),M=b.calculatingCount>0,{isSuccessResponse:N,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(C.d)(),{checkoutNotices:F,paymentNotices:V,expressPaymentNotices:B}=(()=>{const{noticeContexts:e}=Object(C.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,H]=Object(n.useReducer)(S.b,{}),G=Object(n.useRef)(U),{onCheckoutAfterProcessingWithSuccess:Y,onCheckoutAfterProcessingWithError:z,onCheckoutValidationBeforeProcessing:q}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(k.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(k.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(k.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{G.current=U},[U]);const W=Object(n.useMemo)(()=>function(){return i()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),X=Object(n.useMemo)(()=>({resetCheckout:()=>{g({type:d.SET_PRISTINE})},setRedirectUrl:e=>{g(f(e))},setHasError:e=>{g(h(e))},incrementCalculating:()=>{g({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{g({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;g((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{g((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{g((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{g((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(_.decodeEntities)(n)})),"message"in e&&(t.message=Object(_.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;g(f((null==t?void 0:t.redirectUrl)||"")),g((r=t,{type:d.SET_PROCESSING_RESPONSE,data:r})),g({type:d.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{b.status===E.BEFORE_PROCESSING&&(Object(T.b)("error"),Object(w.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;P(t,{context:"wc/checkout"}),y(r)}),g(p()),g(h())):g({type:d.SET_PROCESSING})}))},[b.status,y,P,g]);const K=Object(s.a)(b.status),$=Object(s.a)(b.hasError);Object(n.useEffect)(()=>{if((b.status!==K||b.hasError!==$)&&b.status===E.AFTER_PROCESSING){const e={redirectUrl:b.redirectUrl,orderId:b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,processingResponse:b.processingResponse};b.hasError?Object(w.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message&&Object(c.a)(e.message)){const r=e.messageContext&&Object(c.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,P(e.message,r)}}),t})(t);if(null!==r)L(r)?g(p()):g(m(r));else{if(!(F.some(e=>"error"===e.status)||B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"checkout",context:"wc/checkout"})}g(p())}}):Object(w.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{N(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)g(m(t));else if(Object(l.a)(r)){if(r.message&&Object(c.a)(r.message)){const e=r.messageContext&&Object(c.a)(r.messageContext)?{context:r.messageContext}:void 0;P(r.message,e)}L(r)?g(h(!0)):g(m(r))}else g(m())})}},[b.status,b.hasError,b.redirectUrl,b.orderId,b.customerId,b.orderNotes,b.processingResponse,K,$,X,P,I,D,N,L,F,B,V]);const J={onSubmit:Object(n.useCallback)(()=>{x("submit"),g({type:d.SET_BEFORE_PROCESSING})},[x]),isComplete:b.status===E.COMPLETE,isIdle:b.status===E.IDLE,isCalculating:M,isProcessing:b.status===E.PROCESSING,isBeforeProcessing:b.status===E.BEFORE_PROCESSING,isAfterProcessing:b.status===E.AFTER_PROCESSING,hasError:b.hasError,redirectUrl:b.redirectUrl,onCheckoutBeforeProcessing:W,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:Y,onCheckoutAfterProcessingWithError:z,dispatchActions:X,isCart:a,orderId:b.orderId,hasOrder:!!b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,useShippingAsBilling:b.useShippingAsBilling,setUseShippingAsBilling:e=>{return g((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:b.shouldCreateAccount,setShouldCreateAccount:e=>{return g((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:b.extensionData};return Object(n.createElement)(A.Provider,{value:J},t)}},function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(14),a=function({icon:e,className:t,...r}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:s},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(a,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&a===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===s.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(s.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(5),o=r.n(n),s=r(0);t.a=Object(s.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(s.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(5),a=r.n(s),i=r(4),c=r(23),l=r.n(c),u=r(11),d=r(44),p=r(70),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const s=o.getBoundingClientRect();return new n.DOMRect(e.left+s.left,e.top+s.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function E(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var y=r(22);function v(e){const t=Object(o.useContext)(y.a),r=t.slots[e]||{},n=t.fills[e],s=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:s,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const s=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,s]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(s(t(e)),r(()=>{s(t(e))})),[e]),n})(e),a=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,a.current),()=>n(e,a.current)),[]),Object(o.useLayoutEffect)(()=>{a.current.children=t,s&&s.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==a.current.name&&(n(a.current.name,a.current),a.current.name=e,r(e,a.current))},[e]),s&&s.node?(Object(i.isFunction)(t)&&(t=t(s.props.fillProps)),Object(o.createPortal)(t,s.node)):null}var S=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,s=Object(i.map)(n(t,this),e=>{const t=Object(i.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(i.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(i.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(i.isFunction)(e)?e(s):s)}}var w=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:s})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:s})));function j(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function R({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:j()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var C=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...s},a){const i=Object(o.useContext)(y.a),c=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(i.registerSlot(e,c,t),()=>{i.unregisterSlot(e,c)}),[i.registerSlot,i.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{i.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([a,c])},s))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(R,e))}r(13),o.Component;const A=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(C,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function P(e){return"appear"===e?"top":"left"}function x(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:s}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const i=r?parseInt(r,10):0,c=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+i,width:e.width-l-u,height:e.height-i-c,left:e.left+l,right:e.right-u,top:e.top+i,bottom:e.bottom-c}}function M(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function N(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:s,noArrow:i=!0,isAlternate:c,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:y,shouldAnchorIncludePadding:O,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:w=!0,onClickOutside:j,onFocusOutside:R,__unstableStickyBoundaryElement:C,__unstableSlotName:A="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),G=Object(o.useRef)(null),Y=Object(o.useRef)(),z=Object(u.useViewportMatch)("medium","<"),[q,X]=Object(o.useState)(),K=v(A),$=k&&z,[J,Q]=Object(u.useResizeObserver)();i=$||i,Object(o.useLayoutEffect)(()=>{if($)return I(Y.current,"is-without-arrow",i),I(Y.current,"is-alternate",c),M(Y.current,"data-x-axis"),M(Y.current,"data-y-axis"),N(Y.current,"top"),N(Y.current,"left"),N(G.current,"maxHeight"),void N(G.current,"maxWidth");const e=()=>{if(!Y.current||!G.current)return;let e=function(e,t,r,n=!1,o,s){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,s)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,s);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,s);return o?e:x(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),a=t.getBoundingClientRect(),i=m(new window.DOMRect(r.left,r.top,r.width,a.bottom-r.top),e.ownerDocument,s);return o?i:x(i,n)}if(!e.current)return;const{parentNode:a}=e.current,i=a.getBoundingClientRect();return o?i:x(i,a)}(H,_,S,y,O,Y.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=Y.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var s;L&&(n=null===(s=Y.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const a=Q.height?Q:G.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:E}=function(e,t,r="top",n,o,s,a,i,c){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,s,a,i){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-a;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},d={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let f,m=r,h=null;if(!o&&!i)if("middle"===r&&u.contentHeight===c)m="middle";else if("top"===r&&d.contentHeight===c)m="top";else if("bottom"===r&&p.contentHeight===c)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==c?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,s,i);return{...function(e,t,r,n,o,s,a,i,c){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===s||c||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===s||c||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,E=r,y=null;if(!o&&!i)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&h.contentWidth===l)E="left";else if("right"===r&&b.contentWidth===l)E="right";else{E=h.contentWidth>b.contentWidth?"left":"right";const e="left"===E?h.contentWidth:b.contentWidth;l>window.innerWidth&&(y=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===E?d.popoverLeft:"left"===E?h.popoverLeft:b.popoverLeft,a){const e=a.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:E,popoverLeft:g,contentWidth:y}}(e,t,u,d,n,p.yAxis,a,i,c),...p}}(e,a,h,C,Y.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(N(Y.current,"top",l+"px"),N(Y.current,"left",u+"px")),I(Y.current,"is-without-arrow",i||"center"===p&&"middle"===b),I(Y.current,"is-alternate",c),M(Y.current,"data-x-axis",p),M(Y.current,"data-y-axis",b),N(G.current,"maxHeight","number"==typeof g?g+"px":""),N(G.current,"maxWidth","number"==typeof E?E+"px":""),X(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=Y.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const s=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",s),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(y);let l;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",s),r.cancelAnimationFrame(o),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[$,_,S,y,O,h,Q,C,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&R)R(r);else if("focus-outside"===e&&j){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),j(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([Y,ee,U]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return a()("components-animate__loading");const{type:t,origin:r=P(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return a()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:a()("components-popover",s,ne,{"is-expanded":$,"is-without-arrow":i,"is-alternate":c})},B,{ref:re},te,{tabIndex:"-1"}),$&&Object(o.createElement)(E,null),$&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(W,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:G,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return K.ref&&(oe=Object(o.createElement)(T,{name:A},oe)),y||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(A,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(i.isString)(e)&&(r=e),Object(i.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var G=function({children:e,position:t,text:r,shortcut:n}){const[s,a]=Object(o.useState)(!1),[c,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),a(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),a(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&s)return;d.cancel();const o=Object(i.includes)(["focus","mouseenter"],n.type);o!==c&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},y=o.Children.only(e),{children:v,disabled:O}=y.props;return(O?B:U)({child:y,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:s})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:s}))))({grandchildren:v,isOver:c,position:t,text:r,shortcut:n})})},Y=r(37),z=r(38);const q=["onMouseDown","onClick"];var W=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:s,isSmall:c,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:E,tooltipPosition:y,shortcut:v,label:O,children:_,text:S,variant:k,__experimentalIsFocusable:w,describedBy:j,...R}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:s,...a}){let i=s;var c,u,d,p,f;return t&&(null!==(c=i)&&void 0!==c||(i="primary")),n&&(null!==(u=i)&&void 0!==u||(i="tertiary")),r&&(null!==(d=i)&&void 0!==d||(i="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=i)&&void 0!==p||(i="secondary")),o&&(null!==(f=i)&&void 0!==f||(i="link")),{...a,variant:i}}(e),C=a()("components-button",f,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":c,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=m&&!w,A=void 0===r||T?"button":"a",P="a"===A?{href:r,target:s}:{type:"button",disabled:T,"aria-pressed":u};if(m&&w){P["aria-disabled"]=!0;for(const e of q)R[e]=e=>{e.stopPropagation(),e.preventDefault()}}const x=!T&&(E&&O||v||!!O&&(!_||Object(i.isArray)(_)&&!_.length)&&!1!==E),M=j?Object(i.uniqueId)():null,N=R["aria-describedby"]||M,I=Object(o.createElement)(A,Object(n.a)({},P,R,{className:C,"aria-label":R["aria-label"]||O,"aria-describedby":N,ref:t}),h&&"left"===b&&Object(o.createElement)(Y.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(Y.a,{icon:h,size:g}),_);return x?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(G,{text:j||O,shortcut:v,position:y},I),j&&Object(o.createElement)(z.a,null,Object(o.createElement)("span",{id:M},j))):Object(o.createElement)(o.Fragment,null,I,j&&Object(o.createElement)(z.a,null,Object(o.createElement)("span",{id:M},j)))}))},function(e,t){e.exports=window.wp.dom},,function(e,t,r){"use strict";r.d(t,"n",(function(){return s})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return i})),r.d(t,"m",(function(){return c})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return E}));var n,o=r(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=s.pluginUrl+"images/",i=s.pluginUrl+"build/",c=s.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),s=r(71),a=r(52);const i=Object(n.getSetting)("countryLocale",{}),c=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
- Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(s.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(i).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,c(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),o=r(66);const s=Object(n.createContext)({isInitialized:!1,billingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingAddress:()=>{},setShippingAddress:()=>{}}),a=()=>Object(n.useContext)(s),i=e=>{let{children:t}=e;const r=Object(o.a)();return Object(n.createElement)(s.Provider,{value:r},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,s=Object(n.useRef)(null),a=Object(n.useRef)(0),i=Object(n.useRef)(null),c=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=c.current,r=l.current;return c.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(i.current),i.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-s.current,n=e-a.current;return!s.current||r>=t||r<0||b&&n>=g},E=function(t){return i.current=null,h&&c.current?e(t):(c.current=l.current=null,u.current)},y=function(){var e=Date.now();if(n(e))return E(e);if(p.current){var o=e-s.current,i=e-a.current,c=t-o,l=b?Math.min(c,g-i):c;r(y,l)}},v=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var h=Date.now(),g=n(h);if(c.current=d,l.current=o,s.current=h,g){if(!i.current&&p.current)return a.current=s.current,r(y,t),m?e(s.current):u.current;if(b)return r(y,t),e(s.current)}return i.current||r(y,t),u.current};return v.cancel=function(){i.current&&(f?cancelAnimationFrame(i.current):clearTimeout(i.current)),a.current=0,c.current=s.current=l.current=i.current=null},v.isPending=function(){return!!i.current},v.flush=function(){return i.current?E(Date.now()):u.current},v}),[m,b,t,g,h,f])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),s=r(0),a=r(16);const i=[".wp-block-woocommerce-cart"],c=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:i=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const c=n(e,r),l=i(e,r),u={...e.dataset,...c.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:i={},errorBoundaryProps:c={}}=e;Object(s.render)(Object(s.createElement)(a.a,c,Object(s.createElement)(s.Suspense,{fallback:Object(s.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(s.createElement)(t,o()({},i,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:c,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(i.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:s}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:s}=e;const a=document.body.querySelectorAll(o);s&&s.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,s)),c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:s,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:s}=e;const a=s.querySelectorAll(o);c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=i(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||i(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){var n=r(82),o=r(56),s=o.setStyleProp,a=n.html,i=n.svg,c=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],c(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(i,t)?d[(u=i[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return s(e.style,d),d}},function(e,t,r){var n=r(3),o=r(86).default,s={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,s={},a={};for(r in e)n=e[r],o&&(s=t(r,n))&&2===s.length?a[s[0]]=s[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,s))}}},function(e,t,r){for(var n,o=r(92).CASE_SENSITIVE_TAG_NAMES,s={},a=0,i=o.length;a<i;a++)n=o[a],s[n.toLowerCase()]=n;function c(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return s[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:c,formatDOM:function e(t,r,n){r=r||null;for(var o,s,a,i=[],u=0,d=t.length;u<d;u++){switch(o=t[u],a={next:null,prev:i[u-1]||null,parent:r},(s=i[u-1])&&(s.next=a),"#"!==o.nodeName[0]&&(a.name=l(o.nodeName),a.attribs={},o.attributes&&o.attributes.length&&(a.attribs=c(o.attributes))),o.nodeType){case 1:"script"===a.name||"style"===a.name?a.type=a.name:a.type="tag",a.children=e(o.childNodes,a);break;case 3:a.type="text",a.data=o.nodeValue;break;case 8:a.type="comment",a.data=o.nodeValue}i.push(a)}return n&&(i.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:i[0]?i[0]:null,prev:null,parent:r}),i[1]&&(i[1].prev=i[0])),i},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(42),o=r(0),s=r(33);const a=()=>{const e=Object(s.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(0);const o=Object(n.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),s=()=>Object(n.useContext)(o),a=e=>{let{children:t}=e;const[r,s]=Object(n.useState)(!1),a={setIsSuppressed:s,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:a},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},function(e,t,r){var n=r(81),o=r(55),s=r(90),a={decodeEntities:!0,lowerCaseAttributeNames:!1};function i(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(s(e,(t=t||{}).htmlparser2||a),t)}i.domToReact=n,i.htmlToDOM=s,i.attributesToProps=o,e.exports=i,e.exports.default=i},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(6),o=r(8),s=r(0),a=r(13),i=r.n(a),c=r(20),l=r(68);const u=()=>{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:a}=Object(o.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(l.a)(),p=Object(s.useRef)({});return Object(s.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(c.a)(t)&&!i()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:a}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(8),o=r(6);const s=()=>{const{customerData:e,isInitialized:t}=Object(n.useSelect)(e=>{const t=e(o.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:r,setBillingAddress:s}=Object(n.useDispatch)(o.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:s,setShippingAddress:r}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return v})),r.d(t,"a",(function(){return O}));var n=r(0);const o={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},s={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},a={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:o,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},i=(e,t)=>{let{type:r}=t;return Object.values(o).includes(r)?r:e};var c=r(93),l=r(201);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=r(203),p=r(35),f=r(33),m=r(68),h=r(64);const{NONE:b,INVALID_ADDRESS:g,UNKNOWN:E}=o,y=Object(n.createContext)(a),v=()=>Object(n.useContext)(y),O=e=>{let{children:t}=e;const{dispatchActions:r}=Object(p.b)(),{shippingRates:a,isLoadingRates:l,cartErrors:v}=Object(f.a)(),{isSelectingRate:O}=Object(m.a)(),{selectedRates:_}=Object(h.a)(),[S,k]=Object(n.useReducer)(i,b),[w,j]=Object(n.useReducer)(c.b,{}),R=Object(n.useRef)(w),C=Object(n.useMemo)(()=>({onShippingRateSuccess:u(j).onSuccess,onShippingRateFail:u(j).onFail,onShippingRateSelectSuccess:u(j).onSelectSuccess,onShippingRateSelectFail:u(j).onSelectFail}),[j]);Object(n.useEffect)(()=>{R.current=w},[w]),Object(n.useEffect)(()=>{l?r.incrementCalculating():r.decrementCalculating()},[l,r]),Object(n.useEffect)(()=>{O?r.incrementCalculating():r.decrementCalculating()},[O,r]),Object(n.useEffect)(()=>{v.length>0&&v.some(e=>!(!e.code||!Object.values(s).includes(e.code)))?k({type:g}):k({type:b})},[v]);const T=Object(n.useMemo)(()=>({isPristine:S===b,isValid:S===b,hasInvalidAddress:S===g,hasError:S===E||S===g}),[S]);Object(n.useEffect)(()=>{l||0!==a.length&&!T.hasError||Object(d.a)(R.current,"shipping_rates_fail",{hasInvalidAddress:T.hasInvalidAddress,hasError:T.hasError})},[a,l,T.hasError,T.hasInvalidAddress]),Object(n.useEffect)(()=>{!l&&a.length>0&&!T.hasError&&Object(d.a)(R.current,"shipping_rates_success",a)},[a,l,T.hasError]),Object(n.useEffect)(()=>{O||(T.hasError?Object(d.a)(R.current,"shipping_rate_select_fail",{hasError:T.hasError,hasInvalidAddress:T.hasInvalidAddress}):Object(d.a)(R.current,"shipping_rate_select_success",_.current))},[_,O,T.hasError,T.hasInvalidAddress]);const A={shippingErrorStatus:T,dispatchErrorStatus:k,shippingErrorTypes:o,...C};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(y.Provider,{value:A},t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(8),o=r(0),s=r(6),a=r(74),i=r(58);const c=()=>{const e=Object(a.a)(),{dispatchCheckoutEvent:t}=Object(i.a)(),{selectShippingRate:r}=Object(n.useDispatch)(s.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((n,o)=>{r(n,o).then(()=>{t("set-selected-shipping-rate",{shippingRateId:n})}).catch(t=>{e(t)})},[r,t,e]),isSelectingRate:Object(n.useSelect)(e=>e(s.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return c}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:s,detail:a={}}=t;if(!n)return;s||(s=document.body);const i=new n(e,{bubbles:r,cancelable:o,detail:a});s.dispatchEvent(i)};let s;const a=()=>{s&&clearTimeout(s),s=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},c=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const s=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,s),()=>jQuery(document).off(e,s)}},function(e,t,r){"use strict";var n=r(0),o=r(14);const s=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(12),o=r.n(n),s=r(0);r(106);const a=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(s.useRef)(null);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(s.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];a(e),null==e||e.focus()}else a(e)})(e,r):a(e))})(r.current,e)}})))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),s=r(5),a=r.n(s),i=r(1),c=r(21),l=r(70),u=r(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:s=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(c.speak)(r,t)},[r,t])}(s,h);const E=a()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:s=!1,onClick:i,url:c},l)=>{let d=o;return"primary"===o||s||(d=c?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:c,variant:d,onClick:c?void 0:i,className:a()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(i.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(8);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const r=Object(n.select)("core/notices").getNotices(e);return r.some(e=>e.type===t)},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object(n.select)("core/notices").getNotices(),{removeNotice:o}=Object(n.dispatch)("core/notices"),s=r.filter(t=>t.status===e);s.forEach(e=>o(e.id,t))}},function(e,t){},function(e,t,r){var n=r(3),o=r(55),s=r(56),a=s.setStyleProp;function i(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&s.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var s,c,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,E=0,y=t.length;E<y;E++)if(s=t[E],b&&m(c=r.replace(s)))y>1&&(c=p(c,{key:c.key||E})),h.push(c);else if("text"!==s.type){switch(l=s.attribs,i(s)?a(l.style,l):l&&(l=o(l)),u=null,s.type){case"script":case"style":s.children[0]&&(l.dangerouslySetInnerHTML={__html:s.children[0].data});break;case"tag":"textarea"===s.name&&s.children[0]?l.defaultValue=s.children[0].data:s.children&&s.children.length&&(u=e(s.children,r));break;default:continue}y>1&&(l.key=E),h.push(f(s.name,l,u))}else g?s.data.trim()&&h.push(s.data):h.push(s.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(83),o=r(84),s=r(85),a=s.MUST_USE_PROPERTY,i=s.HAS_BOOLEAN_VALUE,c=s.HAS_NUMERIC_VALUE,l=s.HAS_POSITIVE_NUMERIC_VALUE,u=s.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,s,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),s=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(s,a),hasBooleanValue:d(s,i),hasNumericValue:d(s,c),hasPositiveNumericValue:d(s,l),hasOverloadedBooleanValue:d(s,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(87)),s=r(89);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[s.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(88);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var s,a,i=n(e),c="function"==typeof t,l=0,u=i.length;l<u;l++)s=(r=i[l]).property,a=r.value,c?t(s,a,r):a&&(o||(o={}),o[s]=a);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:l,column:d};return function(t){return t.position=new m(e),E(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function E(){g(o)}function y(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function O(){var e=f(),t=g(s);if(t){if(v(),!g(a))return b("property missing ':'");var n=g(i),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(c),o}}return E(),function(){var e,t=[];for(y(t);e=O();)!1!==e&&(t.push(e),y(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,s=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=function(e,t){return t.toUpperCase()},c=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||s.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,c)),e.replace(o,i))}},function(e,t,r){var n=r(91),o=r(57),s=o.formatDOM,a=o.isIE(9),i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(i);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),s(n(e),null,t)}},function(e,t,r){var n=r(57),o=/<([a-zA-Z]+[0-9]?)/,s=/<head.*>/i,a=/<body.*>/i,i=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,c=n.isIE(9),l=c||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=c?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),c&&(e=e.replace(i,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,i,c=e.match(o);switch(c&&c[1]&&(t=c[1].toLowerCase()),t){case"html":return r=d(e),s.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return i=u(e).getElementsByTagName(t),a.test(e)&&s.test(e)?i[0].parentNode.childNodes:i;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i}));var n=r(4);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const s={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:n,callback:s,priority:i}=arguments.length>1?arguments[1]:void 0;const c=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return c.set(n,{priority:i,callback:s}),{...e,[r]:c};case o.REMOVE_EVENT_CALLBACK:return c.delete(n),{...e,[r]:c}}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var n=r(1),o=r(18);const s=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},a=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(o.decodeEntities)(e.message):Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(12)),s=n(r(128)),a=r(3),i=n(a),c=n(r(129)),l=n(r(131)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,s(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var s;return u.und(t[n])?o({},r,((s={})[n]=e[n],s)):r}),{});return o({to:t},r)}var b,g,E=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}return c(t,e),t}(E),v=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}c(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof E)&&(t[r]=n instanceof E?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(E);function O(e,t){b={fn:e,transform:t}}function _(e){g=e}var S,k=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function j(e){S=e}var R,C=function(){return Date.now()};function T(e){R=e}var A,P,x=function(e){return e.current};function M(e){A=e}var N=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:O,get colorNames(){return g},injectColorNames:_,get requestFrame(){return k},get cancelFrame(){return w},injectFrame:function(e,t){k=e,w=t},get interpolation(){return S},injectStringInterpolator:j,get now(){return C},injectNow:function(e){C=e},get defaultElement(){return R},injectDefaultElement:T,get animatedApi(){return x},injectAnimatedApi:function(e){x=e},get createAnimatedStyle(){return A},injectCreateAnimatedStyle:M,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:A(t.style)}):t,n.update=r,n.attach(),n}return c(t,e),t}(v),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=C(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(o>=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}for(var a=s,i=!1,c=0;c<a.configs.length;c++){for(var l=a.configs[c],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var f=l.animatedValues[p];if(!f.done){var m=l.fromValues[p],h=l.toValues[p],b=f.lastPosition,g=h instanceof E,y=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)f.setValue(h),f.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==l.duration)b=m+l.easing((t-f.startTime)/l.duration)*(h-m),u=t>=f.startTime+l.duration;else if(l.decay)b=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,y=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;O<v;++O)b+=1*(y+=(-l.tension*(b-h)+-l.friction*y)/l.mass*1/1e3)/1e3;var _=!(!l.clamp||0===l.tension)&&(m<h?b>h:b<h),S=Math.abs(y)<=l.precision,w=0===l.tension||Math.abs(h-b)<=l.precision;u=_||S&&w,f.lastVelocity=y,f.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(f.value!==h&&(b=h),f.done=!0):i=!0,f.setValue(b),f.lastPosition=b}else f.setValue(h),f.done=!0}}a.props.onFrame&&(a.values[l.name]=l.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),i||(L.delete(a),a.stop(!0))}return L.size?P?P():k(e):D=!1,D};function V(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:r});if(S&&"string"==typeof e.output[0])return S(e);var n=e,o=n.output,s=n.range||[0,1],a=n.extrapolateLeft||n.extrapolate||"extend",i=n.extrapolateRight||n.extrapolate||"extend",c=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,s);return function(e,t,r,n,o,s,a,i,c){var l=c?c(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>r){if("identity"===i)return l;"clamp"===i&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=s(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,s[t],s[t+1],o[t],o[t+1],c,a,i,n.map)}}var B=function(e){function t(r,n,o,s){var a;return(a=e.call(this)||this).calc=void 0,a.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],a.calc=V(n,o,s),a}c(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}c(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(E),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}c(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(y),G=0,Y=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,a=t.to,i=s(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},i,{delay:n,to:a}));else if(a){var c={};Object.entries(a).forEach((function(e){var t,r=e[0],s=e[1],a=o({to:(t={},t[r]=s,t),delay:m(n,r)},i),l=c[a.delay]&&c[a.delay].to;c[a.delay]=o({},c[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(c)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,s=e.to,a=void 0===s?{}:s;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(a)&&(t.merged=o({},t.merged,a))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,a){var i=o.delay,c=s(o,["delay"]),l=function(o){a===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(c.to)||u.fun(c.to);i?setTimeout((function(){r===t.guid&&(d?t.runAsync(c,l):t.diff(c).start(l))}),i):d?t.runAsync(c,l):t.diff(c).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(P||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,s(e,["delay"])),a=this.local,i=Promise.resolve(void 0);if(u.arr(n.to))for(var c=function(e){var t=e,s=o({},n,h(n.to[t]));u.arr(s.config)&&(s.config=s.config[t]),i=i.then((function(){if(a===r.guid)return new Promise((function(e){return r.diff(s).start(e)}))}))},l=0;l<n.to.length;l++)c(l);else if(u.fun(n.to)){var d,p=0;i=i.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,a===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,s=void 0===n?{}:n,a=r.to,i=void 0===a?{}:a,c=r.config,l=void 0===c?{}:c,d=r.reverse,h=r.attach,b=r.reset,E=r.immediate;if(d){var y=[i,s];s=y[0],i=y[1]}this.merged=o({},s,this.merged,i),this.hasChanged=!1;var v=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],a=r[1],i=e[n]||{},c=u.num(a),d=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],h=u.arr(a),y=!c&&!h&&!d,O=u.und(s[n])?a:s[n],_=c||h||d?a:1,k=m(l,n);v&&(_=v.animations[n].parent);var w,j=i.parent,R=i.interpolation,T=f(v?_.getPayload():_),A=a;y&&(A=S({range:[0,1],output:[a,a]})(1));var P,x=R&&R.getValue(),M=!u.und(j)&&i.animatedValues.some((function(e){return!e.done})),N=!u.equ(A,x),I=!u.equ(A,i.previous),D=!u.equ(k,i.config);if(b||I&&N||D){var L;if(c||d)j=R=i.parent||new U(O);else if(h)j=R=i.parent||new H(O);else if(y){var F=i.interpolation&&i.interpolation.calc(i.parent.value);F=void 0===F||b?O:F,i.parent?(j=i.parent).setValue(0,!1):j=new U(0);var V={output:[F,a]};i.interpolation?(R=i.interpolation,i.interpolation.updateConfig(V)):R=j.interpolate(V)}return T=f(v?_.getPayload():_),w=f(j.getPayload()),b&&!y&&j.setValue(O,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=M?e.lastVelocity:void 0,e.lastTime=M?e.lastTime:void 0,e.startTime=C(),e.done=!1,e.animatedStyles.clear()})),m(E,n)&&j.setValue(y?_:a,!1),o({},e,((L={})[n]=o({},i,{name:n,parent:j,interpolation:R,animatedValues:w,toValues:T,previous:A,config:k,fromValues:f(j.getValue()),immediate:m(E,n),initialVelocity:p(k.velocity,0),clamp:p(k.clamp,!1),precision:p(k.precision,.01),tension:p(k.tension,170),friction:p(k.friction,26),mass:p(k.mass,1),duration:k.duration,easing:p(k.easing,(function(e){return e})),decay:k.decay}),L))}return N?e:(y&&(j.setValue(1,!1),R.updateConfig({output:[A,A]})),j.done=!0,t.hasChanged=!0,o({},e,((P={})[n]=o({},e[n],{previous:A}),P)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),z=function(e,t){var r=a.useRef(!1),n=a.useRef(),o=u.fun(t),s=a.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var s=new Y,a=o?m(t,n,s):t[n];return 0===n&&(r=a.ref),s.update(a),r||s.start(),s})),r]}),[e]),i=s[0],c=s[1];n.current=i,a.useImperativeHandle(c,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=a.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?m(e,r,t):e[r]),c||t.start()}))}}),[e]);a.useEffect((function(){r.current?o||l(t):c||n.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},q=0,W=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},X=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,a=s(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:W(t,n)},a)};function K(e,t){var r=function(){if(o){if(s>=n.length)return"break";a=n[s++]}else{if((s=n.next()).done)return"break";a=s.value}var r=a.key,i=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},n=e.current.deleted,o=Array.isArray(n),s=0;for(n=o?n:n[Symbol.iterator]();;){var a;if("break"===r())break}e.current.forceUpdate()}var $=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof E||(t=b.transform(t)),r.payload=t,r}return c(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function ce(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,s=ce(o,n,e+1/3),a=ce(o,n,e),i=ce(o,n,e-1/3);return Math.round(255*s)<<24|Math.round(255*a)<<16|Math.round(255*i)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ae.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ie.exec(t))?parseInt(r[1],16)>>>0:(r=se.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),Ee={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||Ee.hasOwnProperty(e)&&Ee[e]?(""+t).trim():t+"px"}Ee=Object.keys(Ee).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),Ee);var Oe={};M((function(e){return new $(e)})),T("div"),j((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,a=t.scrollLeft,i=s(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in i){var f=c?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,i[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return a.forwardRef((function(t,r){var n=d(),c=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),f=a.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){c.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(r,(function(){return x(p,c,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,s(h,["scrollTop","scrollLeft"])),E=(m=e,!u.fun(m)||m.prototype instanceof i.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return i.createElement(e,o({},g,{ref:E}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),we=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=N,t.useSpring=function(e){var t=u.fun(e),r=z(1,t?e:[e]),n=r[0],o=r[1],s=r[2];return t?[n[0],o,s]:n},t.useTrail=function(e,t){var r=a.useRef(!1),n=u.fun(t),s=m(t),i=a.useRef(),c=z(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},s,{config:m(s.config,e),attach:e>0&&function(){return i.current[e-1]}})})),l=c[0],d=c[1],p=c[2],f=a.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,a=i.current[n];return o({},e,{config:m(e.config||s.config,t),attach:a&&function(){return a}})}))}}),[e,s.reverse]);return a.useEffect((function(){r.current&&!n&&f(t)})),a.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),i=X(n),c=i.lazy,l=void 0!==c&&c,u=(i.unique,i.reset),p=void 0!==u&&u,f=(i.enter,i.leave,i.update,i.onDestroyed),h=(i.keys,i.items,i.onFrame),b=i.onRest,g=i.onStart,E=i.ref,y=s(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=a.useRef(!1),_=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return a.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,a=s(e,["first","prevProps"]),i=X(t),c=i.items,l=i.keys,u=i.initial,d=i.from,p=i.enter,f=i.leave,h=i.update,b=i.trail,g=void 0===b?0:b,E=i.unique,y=i.config,v=i.order,O=void 0===v?["enter","leave","update"]:v,_=X(n),S=_.keys,k=_.items,w=o({},a.current),j=[].concat(a.deleted),R=Object.keys(w),C=new Set(R),T=new Set(l),A=l.filter((function(e){return!C.has(e)})),P=a.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),x=l.filter((function(e){return C.has(e)})),M=-g;O.length;)switch(O.shift()){case"enter":A.forEach((function(e,t){E&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=c[n],s=r&&void 0!==u?"initial":"enter";w[e]={slot:s,originalKey:e,key:E?String(e):q++,item:o,trail:M+=g,config:m(y,o,s),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=S.indexOf(e),r=k[t];j.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:M+=g,config:m(y,r,"leave"),to:m(f,r)})),delete w[e]}));break;case"update":x.forEach((function(e){var t=l.indexOf(e),r=c[t];w[e]=o({},w[e],{item:r,slot:"update",trail:M+=g,config:m(y,r,"update"),to:m(h,r)})}))}var N=l.map((function(e){return w[e]}));return j.forEach((function(e){var t,r=e.left,n=(e.right,s(e,["left","right"]));-1!==(t=N.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),N=[].concat(N.slice(0,t),[n],N.slice(t))})),o({},a,{changed:A.length||P.length||x.length,first:r&&0===A.length,transitions:N,current:w,deleted:j,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,s=e.config,a=e.trail,i=e.key,c=e.item;_.current.instances.has(i)||_.current.instances.set(i,new Y);var u=_.current.instances.get(i),d=o({},y,{to:n,from:r,config:s,ref:E,onRest:function(r){_.current.mounted&&(e.destroyed&&(E||l||K(_,i),f&&f(c)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(E||l)&&_.current.deleted.length>0&&K(_),b&&b(c,t,r))},onStart:g&&function(){return g(c,t)},onFrame:h&&function(e){return h(c,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),a.useEffect((function(){return _.current.mounted=O.current=!0,function(){_.current.mounted=O.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=a.useRef();a.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var s=e.current;if(s){var a=s.controllers;if(a.length){var i=r*t[n];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=z},,,,,,,,,,,function(e,t){},,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(4),s=r(5),a=r.n(s),i=r(21),c=r(1),l=(r(36),r(43));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:s=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(i.speak)(r,t)},[r,t])}(s,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const E=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const y=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:E,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(c.__)("Dismiss this notice")},Object(n.createElement)("div",{className:y},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(54))},function(e,t){e.exports=window.wp.plugins},,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(47),o=(r(15),r(2));const s=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),a=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),s=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(s[r]="")}),s}},,,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(12),o=r.n(n),s=r(0),a=r(5),i=r.n(a),c=r(77),l=r(8),u=(r(80),r(59));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:a}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:f}=Object(l.useDispatch)("core/notices"),m=p.filter(e=>"snackbar"!==e.type).concat(n);if(!m.length)return null;const h=i()(t,"wc-block-components-notices");return a?null:Object(s.createElement)("div",{className:h},m.map(e=>Object(s.createElement)(c.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&f(e.id,r)}}),e.content)))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(51),s=r(2),a=r(61),i=r.n(a),c=r(10),l=r(16);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:a,depth:p=1}=e;return a&&0!==a.length?Array.from(a).map((e,a)=>{const{blockName:f="",...m}={key:`${t}_${p}_${a}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},h=u(f,r);if(!h){const s=i()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof s&&s)return s;if(!Object(n.isValidElement)(s))return null;const a=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return a?Object(n.cloneElement)(s,m,a):Object(n.cloneElement)(s,m)}const b=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${a}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+f,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(b,null,Object(n.createElement)(h,m,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(c.hasInnerBlocks)(e))return null;const a=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(c.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!a.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,i.map((e,r)=>{let{blockName:o,component:a}=e;const i=a||u(o,t);return i?Object(n.createElement)(l.a,{text:"Unexpected error in: "+o,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(i,{key:`${o}_forced_${r}`}))):null}))})(f,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:s=(()=>({})),blockMap:a,blockWrapper:i}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:a,children:e.children||[],blockWrapper:i});return{...s(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(130);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(112),s=r(2),a=r(16),i=r(205),c=r(67),l=r(49),u=r(35),d=r(1),p=r(28),f=r.n(p),m=r(117),h=r(94),b=r(8);const g=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},E=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var y=r(198),v=r(33),O=r(59),_=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:s,isBeforeProcessing:a,isComplete:p,orderNotes:_,shouldCreateAccount:S,extensionData:k}=Object(u.b)(),{hasValidationErrors:w}=Object(y.b)(),{shippingErrorStatus:j}=Object(c.b)(),{billingAddress:R,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:T,cartNeedsShipping:A,receiveCart:P}=Object(v.a)(),{activePaymentMethod:x,isExpressPaymentMethodActive:M,currentStatus:N,paymentMethodData:I,expressPaymentMethods:D,paymentMethods:L,shouldSavePayment:F}=Object(i.b)(),{setIsSuppressed:V}=Object(O.b)(),{createErrorNotice:B,removeNotice:U}=Object(b.useDispatch)("core/notices"),H=Object(n.useRef)(R),G=Object(n.useRef)(C),Y=Object(n.useRef)(o),[z,q]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...D,...L};return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId},[x,D,L]),X=w&&!M||N.hasError||j.hasError,K=!e&&!X&&(N.isSuccessful||!T)&&s;Object(n.useEffect)(()=>{V(M)},[M,V]),Object(n.useEffect)(()=>{X===e||!s&&!a||M||r.setHasError(X)},[X,e,s,a,M,r]),Object(n.useEffect)(()=>{H.current=R,G.current=C,Y.current=o},[R,C,o]);const $=Object(n.useCallback)(()=>!w&&(N.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,N.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return M||(e=t($,0)),()=>{M||e()}},[t,$,M]),Object(n.useEffect)(()=>{Y.current&&(window.location.href=Y.current)},[p]);const J=Object(n.useCallback)(async()=>{if(z)return;q(!0),U("checkout");const e=T?{payment_method:W,payment_data:g(I,F,x)}:{},t={billing_address:Object(m.a)(H.current),customer_note:_,create_account:S,...e,extensions:{...k}};A&&(t.shipping_address=Object(m.a)(G.current)),f()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),B(Object(h.b)(e),{id:"checkout",context:"wc/checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{B(e.message,{id:e.error_code,context:"wc/checkout"})}),r.setAfterProcessing(e)})}catch{var t;B(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout"})}r.setHasError(!0),q(!1)})},[z,U,T,W,I,F,x,_,S,k,A,r,B,P]);return Object(n.useEffect)(()=>{K&&!z&&J()},[J,K,z]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(c.a,null,Object(n.createElement)(i.a,null,t,Object(n.createElement)(a.a,{renderError:s.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(_,null)))))}},,,,function(e,t,r){"use strict";var n=r(0);r(195),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,r){"use strict";var n=r(0),o=r(1),s=r(5),a=r.n(s),i=(r(197),r(136));t.a=e=>{let{children:t,className:r,screenReaderLabel:s,showSpinner:c=!1,isLoading:l=!0}=e;return Object(n.createElement)("div",{className:a()(r,{"wc-block-components-loading-mask":l})},l&&c&&Object(n.createElement)(i.a,null),Object(n.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(n.createElement)("span",{className:"screen-reader-text"},s||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},,,,function(e,t){e.exports=window.wp.keycodes},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(0);const o=Object(n.createContext)({hasDarkControls:!1}),s=()=>Object(n.useContext)(o)},,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-heading-block","version":"1.0.0","title":"Heading","description":"Shows the heading row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"content":{"type":"string","default":"Cart totals"},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(4),s=r(13),a=r.n(s);const i=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),c=()=>Object(n.useContext)(i),l=e=>{let{children:t}=e;const[r,s]=Object(n.useState)({}),c=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{s(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{s({})},[]),p=Object(n.useCallback)(e=>{e&&s(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{s(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return a()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:c,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{s(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(i.Provider,{value:m},t)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(93);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const s=n.a.addEventCallback(e,r,o);return t(s),()=>{t(n.a.removeEventCallback(e,s.id))}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(31);const s=async(e,t,r)=>{const o=n(e,t),s=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&s.push(t)}catch(e){console.error(e)}return!s.length||s},a=async(e,t,r)=>{const s=[],a=n(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return s.push(t),s;s.push(t)}catch(e){return console.error(e),s.push({type:"error"}),s}return s}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return V})),r.d(t,"a",(function(){return B}));var n=r(0),o=r(20),s=r(8);let a,i;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(a||(a={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(i||(i={}));const c={currentStatus:a.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:a,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:s={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case a.PRISTINE:return{...c,...e,errorMessage:"",currentStatus:a.PRISTINE};case a.STARTED:return{...e,currentStatus:a.STARTED};case a.ERROR:return e.currentStatus!==a.ERROR?{...e,currentStatus:a.ERROR,errorMessage:o||e.errorMessage}:e;case a.FAILED:return e.currentStatus!==a.FAILED?{...e,currentStatus:a.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case a.SUCCESS:return e.currentStatus!==a.SUCCESS?{...e,currentStatus:a.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case a.PROCESSING:return e.currentStatus!==a.PROCESSING?{...e,currentStatus:a.PROCESSING,errorMessage:""}:e;case a.COMPLETE:return e.currentStatus!==a.COMPLETE?{...e,currentStatus:a.COMPLETE}:e;case i.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:s};case i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:s};case i.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case i.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},d=r(1),p=r(17),f=r(32),m=r(2),h=r(50),b=r(23),g=r.n(b),E=r(29),y=r(49),v=r(33),O=r(31),_=r(64);const S=(e,t,r,o)=>{const[a,i]=Object(n.useState)(!1),{isEditor:c}=Object(E.a)(),{selectedRates:l}=Object(_.a)(),{billingAddress:u,shippingAddress:p}=Object(y.b)(),b=Object(f.a)(l),O=Object(f.a)(r),S=Object(v.a)(),{cartTotals:k,cartIsLoading:w,cartNeedsShipping:j,paymentRequirements:R}=S,C=Object(n.useRef)({cart:S,cartTotals:k,cartNeedsShipping:j,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:R}),{createErrorNotice:T}=Object(s.useDispatch)("core/notices");Object(n.useEffect)(()=>{C.current={cart:S,cartTotals:k,cartNeedsShipping:j,get billingData(){return g()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:R}},[S,k,j,u,p,b,R]);const A=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<O.length;e++){const r=O[e],s=t[r];if(s)try{const e=!!c||await Promise.resolve(s.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(s)}}catch(e){if(m.CURRENT_USER_IS_ADMIN||c){const t=Object(d.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
6
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),s.paymentMethodId);T(`${t} ${e}`,{context:o,id:`wc-${s.paymentMethodId}-registration-error`})}}}e(r),i(!0)},[T,e,c,o,O,t]),P=Object(h.a)(A,500,{leading:!0});return Object(n.useEffect)(()=>{w||P()},[P,S,b,u,w]),a},k=e=>({type:e}),w=e=>({type:a.ERROR,errorMessage:e}),j=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:a.FAILED,errorMessage:t,paymentMethodData:r}},R=e=>{let{paymentMethodData:t}=e;return{type:a.SUCCESS,paymentMethodData:t}},C=e=>({type:i.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),T=e=>({type:i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),A=e=>({type:i.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),P=(e,t)=>({type:i.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var x=r(66),M=r(35),N=r(93),I=r(201);var D=r(203),L=r(198);const F=Object(n.createContext)(l),V=()=>Object(n.useContext)(F),B=e=>{let{children:t}=e;const{isProcessing:r,isIdle:i,isCalculating:l,hasError:d}=Object(M.b)(),{isEditor:f,getPreviewData:h}=Object(E.a)(),{setValidationErrors:b}=Object(L.b)(),{createErrorNotice:g,removeNotice:y}=Object(s.useDispatch)("core/notices"),{isSuccessResponse:v,isErrorResponse:_,isFailResponse:V,noticeContexts:B}=Object(O.d)(),[U,H]=Object(n.useReducer)(N.b,{}),{onPaymentProcessing:G}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(I.a)("payment_processing",e)}),[e]))(H),Y=Object(n.useRef)(U);Object(n.useEffect)(()=>{Y.current=U},[U]);const[z,q]=Object(n.useReducer)(u,c),{dispatchActions:W,setPaymentStatus:X}=(e=>{const{setBillingAddress:t,setShippingAddress:r}=Object(x.a)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(C(t))},setRegisteredExpressPaymentMethods:t=>{e(T(t))},setShouldSavePayment:t=>{e(A(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(k(a.PRISTINE)),started:()=>e(k(a.STARTED)),processing:()=>e(k(a.PROCESSING)),completed:()=>e(k(a.COMPLETE)),error:t=>e(w(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(j({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof s&&null!=s&&s.address&&r(s.address),e(R({paymentMethodData:n}))}}),[e,t,r])}})(q),K=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:r}=Object(O.d)(),n=new Set([...Object(m.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return S(e,t,Array.from(n),r.PAYMENTS)})(W.setRegisteredPaymentMethods),$=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:r}=Object(O.d)();return S(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),J=Object(n.useMemo)(()=>f?h("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(m.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(z.paymentMethods):{},[f,h,K,z.paymentMethods]),Q=Object(n.useCallback)(e=>{e?g(e,{id:"wc-express-payment-error",context:B.EXPRESS_PAYMENTS}):y("wc-express-payment-error",B.EXPRESS_PAYMENTS)},[g,B.EXPRESS_PAYMENTS,y]),Z=Object.keys(z.expressPaymentMethods).includes(z.activePaymentMethod),ee=Object(n.useMemo)(()=>({isPristine:z.currentStatus===a.PRISTINE,isStarted:z.currentStatus===a.STARTED,isProcessing:z.currentStatus===a.PROCESSING,isFinished:[a.ERROR,a.FAILED,a.SUCCESS].includes(z.currentStatus),hasError:z.currentStatus===a.ERROR,hasFailed:z.currentStatus===a.FAILED,isSuccessful:z.currentStatus===a.SUCCESS,isDoingExpressPayment:z.currentStatus!==a.PRISTINE&&Z}),[z.currentStatus,Z]);Object(n.useEffect)(()=>{const e=Object.keys(z.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(z.expressPaymentMethods)];if(z.activePaymentMethod&&t.includes(z.activePaymentMethod))return;X().pristine();const r=Object.keys(J).flatMap(e=>J[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(z.paymentMethods)[0])},[K,z.paymentMethods,z.expressPaymentMethods,W,X,z.activePaymentMethod,J]),Object(n.useEffect)(()=>{!r||d||l||ee.isFinished||X().processing()},[r,d,l,ee.isFinished,X]),Object(n.useEffect)(()=>{i&&!ee.isSuccessful&&X().pristine()},[i,ee.isSuccessful,X]),Object(n.useEffect)(()=>{d&&ee.isSuccessful&&X().pristine()},[d,ee.isSuccessful,X]),Object(n.useEffect)(()=>{ee.isProcessing&&(y("wc-payment-error",B.PAYMENTS),Object(D.b)(Y.current,"payment_processing",{}).then(e=>{let t,r;var n,o,s,a,i,c;if(e.forEach(e=>{v(e)&&(t=e),(_(e)||V(e))&&(r=e)}),t&&!r)X().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(s=t)||void 0===s||null===(a=s.meta)||void 0===a?void 0:a.billingAddress,null===(i=t)||void 0===i||null===(c=i.meta)||void 0===c?void 0:c.shippingData);else if(r&&V(r)){var l,u,d,p,f,m;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||B.PAYMENTS}),X().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingAddress)}else if(r){var h,E;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(E=r)||void 0===E?void 0:E.messageContext)||B.PAYMENTS}),X().error(r.message),b(null===(h=r)||void 0===h?void 0:h.validationErrors)}else X().success()}))},[ee.isProcessing,b,X,y,B.PAYMENTS,v,V,_,g]);const te="object"==typeof z.paymentMethodData&&Object(o.b)(z.paymentMethodData,"token")?z.paymentMethodData.token+"":"",re={setPaymentStatus:X,currentStatus:ee,paymentStatuses:a,paymentMethodData:z.paymentMethodData,errorMessage:z.errorMessage,activePaymentMethod:z.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:J,paymentMethods:z.paymentMethods,expressPaymentMethods:z.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:$,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:z.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(n.createElement)(F.Provider,{value:re},t)}},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(247)},function(e,t){},,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(145),o=r(0),s=r(33),a=r(17),i=r(127),c=r(46),l=r(10),u={FILLED_CART:r(151),EMPTY_CART:r(152),CART_ITEMS:r(153),CART_EXPRESS_PAYMENT:r(154),CART_LINE_ITEMS:r(155),CART_TOTALS:r(156),PROCEED_TO_CHECKOUT:r(157),CART_ACCEPTED_PAYMENT_METHODS:r(158),CART_ORDER_SUMMARY:r(159),CART_ORDER_SUMMARY_SUBTOTAL:r(160),CART_ORDER_SUMMARY_FEE:r(161),CART_ORDER_SUMMARY_DISCOUNT:r(162),CART_ORDER_SUMMARY_SHIPPING:r(163),CART_ORDER_SUMMARY_COUPON_FORM:r(164),CART_ORDER_SUMMARY_TAXES:r(165),CART_ORDER_SUMMARY_HEADING:r(166)};r.p=c.k,Object(l.registerCheckoutBlock)({metadata:u.FILLED_CART,component:Object(o.lazy)(()=>r.e(19).then(r.bind(null,417)))}),Object(l.registerCheckoutBlock)({metadata:u.EMPTY_CART,component:Object(o.lazy)(()=>r.e(18).then(r.bind(null,418)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ITEMS,component:Object(o.lazy)(()=>r.e(14).then(r.bind(null,419)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_LINE_ITEMS,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(4),r.e(15)]).then(r.bind(null,451)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_TOTALS,component:Object(o.lazy)(()=>r.e(17).then(r.bind(null,420)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_EXPRESS_PAYMENT,component:Object(o.lazy)(()=>r.e(13).then(r.bind(null,440)))}),Object(l.registerCheckoutBlock)({metadata:u.PROCEED_TO_CHECKOUT,component:Object(o.lazy)(()=>r.e(27).then(r.bind(null,452)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ACCEPTED_PAYMENT_METHODS,component:Object(o.lazy)(()=>r.e(12).then(r.bind(null,453)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(16)]).then(r.bind(null,454)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_HEADING,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,441)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_SUBTOTAL,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,455)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_FEE,component:Object(o.lazy)(()=>r.e(22).then(r.bind(null,456)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_DISCOUNT,component:Object(o.lazy)(()=>r.e(21).then(r.bind(null,457)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_COUPON_FORM,component:Object(o.lazy)(()=>r.e(20).then(r.bind(null,458)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_SHIPPING,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(5),r.e(24)]).then(r.bind(null,442)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_TAXES,component:Object(o.lazy)(()=>r.e(26).then(r.bind(null,443)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_HEADING,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,441)))});var d=r(1),p=r(138),f=r(198),m=r(251),h=r(124),b=r(2),g=r(16),E=r(69),y=r(75),v=r(59),O=r(132);const _=e=>{let{children:t,redirectUrl:r}=e;return Object(o.createElement)(O.a,{isCart:!0,redirectUrl:r},t)};var S=r(146);r(230);const k=()=>{window.location.reload(!0)},w=e=>{let{children:t,attributes:r={}}=e;const{cartIsLoading:n}=Object(s.a)(),{hasDarkControls:a}=r;return Object(o.createElement)(p.a,{showSpinner:!0,isLoading:n},Object(o.createElement)(S.a.Provider,{value:{hasDarkControls:a}},Object(o.createElement)(f.a,null,t)))},j=e=>{let{scrollToTop:t}=e;return Object(o.useEffect)(()=>{const e=Object(E.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",t),()=>{e(),document.body.removeEventListener("wc-blocks_added_to_cart",t)}},[t]),null};var R=Object(y.a)(e=>{let{attributes:t,children:r,scrollToTop:n}=e;return Object(o.createElement)(g.a,{header:Object(d.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(d.__)("The cart has encountered an unexpected error. If the error persists, please get in touch with us for help.","woo-gutenberg-products-block"),button:Object(o.createElement)("button",{className:"wc-block-button",onClick:k},Object(d.__)("Reload the page","woo-gutenberg-products-block")),showErrorMessage:b.CURRENT_USER_IS_ADMIN},Object(o.createElement)(m.a,{context:"wc/cart"}),Object(o.createElement)(v.a,null,Object(o.createElement)(h.a,{context:"wc/cart"}),Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)(_,null,Object(o.createElement)(w,{attributes:t},r),Object(o.createElement)(j,{scrollToTop:n})))))});const C={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(b.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(b.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};Object(i.a)({Block:R,blockName:"woocommerce/cart",selector:".wp-block-woocommerce-cart",getProps:e=>({attributes:Object(n.a)(C,e?e.dataset:{})}),blockMap:Object(a.getRegisteredBlockComponents)("woocommerce/cart"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:n,...a}=Object(s.a)();return o.Children.map(t,e=>{if(Object(o.isValidElement)(e)){const t={extensions:r,cart:a};return Object(o.cloneElement)(e,t)}return e})}})},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(0),o=r(7),s=r(5),a=r.n(s),i=r(4),c=r(95),l=r(11),u=r(111),d=function({notices:e,className:t,children:r,onRemove:s=i.noop}){const d=Object(l.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(c.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:d});t=a()("components-snackbar-list",t);const m=e=>()=>s(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(c.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(u.a,Object(o.a)({},Object(i.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},p=r(10),f=r(8),m=r(29);const h={},b=e=>{let{className:t,context:r="default"}=e;const{isEditor:o}=Object(m.a)(),{notices:s}=Object(f.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:i}=Object(f.useDispatch)("core/notices");if(o)return null;const c=s.filter(e=>"snackbar"===e.type),l=c.length>0?c.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):h,u=Object(p.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:l}),b=c.filter(e=>!0===u[e.content]),g=a()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(d,{notices:b,className:g,onRemove:()=>{b.forEach(e=>i(e.id,r))}})}}]);
1
+ !function(e){function t(t){for(var r,o,s=t[0],a=t[1],i=0,l=[];i<s.length;i++)o=s[i],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(c&&c(t);l.length;)l.shift()()}var r={},n={11:0,7:0,73:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var s=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=s);var a,i=document.createElement("script");i.charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",1:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6",2:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--5b8feb0b",3:"vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542",4:"cart-blocks/cart-line-items--mini-cart-contents-block/products-table",5:"cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping",12:"cart-blocks/cart-accepted-payment-methods",13:"cart-blocks/cart-express-payment",14:"cart-blocks/cart-items",15:"cart-blocks/cart-line-items",16:"cart-blocks/cart-order-summary",17:"cart-blocks/cart-totals",18:"cart-blocks/empty-cart",19:"cart-blocks/filled-cart",20:"cart-blocks/order-summary-coupon-form",21:"cart-blocks/order-summary-discount",22:"cart-blocks/order-summary-fee",23:"cart-blocks/order-summary-heading",24:"cart-blocks/order-summary-shipping",25:"cart-blocks/order-summary-subtotal",26:"cart-blocks/order-summary-taxes",27:"cart-blocks/proceed-to-checkout"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",1:"cc9016fd3805a088b2e8",2:"2448287d629e9e796e22",3:"80c939d54508b87a9652",4:"95ac706a0a831d9ea7dc",5:"f8bfba42e82e44056456",12:"e901062024d7d4414626",13:"06cc6dd4d09761436a8f",14:"9c2d532cbcd7116e63f7",15:"cc3e5cde5a1a08a8b18b",16:"b2a96ff987849a487201",17:"9b708988d58530ba1664",18:"854b725b2b73c93534b8",19:"e82c38c6edc87e11a0d8",20:"ec110f01f7d73b195692",21:"be118c45e14281292fa3",22:"8b7b8ceb031ca02b9151",23:"c847d86267822f3924b2",24:"84a244ea52b15342b7fc",25:"c686b68469526b776553",26:"2a6298107180c8ef89be",27:"cf1ad6dec2eca25de61e"}[e]}(e);var c=new Error;a=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+o+": "+s+")",c.name="ChunkLoadError",c.type=o,c.request=s,r[1](c)}n[e]=void 0}};var l=setTimeout((function(){a({type:"timeout",target:i})}),12e4);i.onerror=i.onload=a,document.head.appendChild(i)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=s.push.bind(s);s.push=t,s=s.slice();for(var i=0;i<s.length;i++)t(s[i]);var c=a;o(o.s=229)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var i in n)r.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.wc.blocksCheckout},function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),s=r(0),a=r(3),i=r(1),c=r(46),l=e=>{let{imageUrl:t=c.l+"/block-error.svg",header:r=Object(i.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(i.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(i.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),l&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:i,button:c}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof i?i({errorMessage:u}):Object(s.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:c}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";(function(e){var n=r(0);r(36);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(54))},function(e,t){e.exports=window.wp.deprecated},,,,,function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(n.useContext)(o)},,function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return d}));var n=r(20);let o,s;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(s||(s={}));const a=(e,t)=>Object(n.a)(e)&&"type"in e&&e.type===t,i=e=>a(e,o.SUCCESS),c=e=>a(e,o.ERROR),l=e=>a(e,o.FAIL),u=e=>!Object(n.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:s,shouldRetry:u,isSuccessResponse:i,isErrorResponse:c,isFailResponse:l})},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(13),s=r.n(o);function a(e){const t=Object(n.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(4),o=r(0),s=r(6),a=r(8),i=r(18),c=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(s.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},f=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...m,email:""},b={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:s.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},g=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(i.decodeEntities)(r)]})),E={cartCoupons:s.EMPTY_CART_COUPONS,cartItems:s.EMPTY_CART_ITEMS,cartFees:s.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:b,cartIsLoading:!0,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:m,shippingRates:s.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:s.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:s.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),i=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();f();const p=Object(a.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:s.EMPTY_CART_ERRORS,billingData:h,billingAddress:h,shippingAddress:m,extensions:s.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const o=e(s.CART_STORE_KEY),a=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),f=o.isCustomerDataUpdating(),{receiveCart:b}=n(s.CART_STORE_KEY),y=g(a.billingAddress),v=a.needsShipping?g(a.shippingAddress):y,O=a.fees.length>0?a.fees.map(e=>g(e)):s.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):s.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:O,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(c.a)(y),billingAddress:Object(c.a)(y),shippingAddress:Object(c.a)(v),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:f,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:b}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return P})),r.d(t,"a",(function(){return x}));var n=r(0),o=r(1),s=r(60),a=r(23),i=r.n(a),c=r(52),l=r(20),u=r(8);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),f=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},h=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var b=r(2),g=r(117);let E;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(E||(E={}));const y={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(b.getSetting)("checkoutData",{})||{}},v={redirectUrl:"",status:E.PRISTINE,hasError:!1,calculatingCount:0,orderId:y.order_id,orderNotes:"",customerId:y.customer_id,useShippingAsBilling:Object(g.b)(y.billing_address,y.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:s,extensionData:a,useShippingAsBilling:i,shouldCreateAccount:c,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case d.SET_PRISTINE:u=v;break;case d.SET_IDLE:u=e.status!==E.IDLE?{...e,status:E.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case d.SET_COMPLETE:u=e.status!==E.COMPLETE?{...e,status:E.COMPLETE,redirectUrl:"string"==typeof(null==l?void 0:l.redirectUrl)?l.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==E.PROCESSING?{...e,status:E.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==E.BEFORE_PROCESSING?{...e,status:E.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==E.AFTER_PROCESSING?{...e,status:E.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===E.PROCESSING||e.status===E.BEFORE_PROCESSING?{...u,status:E.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case d.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==i&&i!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:i});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==c&&c!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:c});break;case d.SET_ORDER_NOTES:void 0!==s&&e.orderNotes!==s&&(u={...e,orderNotes:s});break;case d.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(u={...e,extensionData:a})}return u!==e&&r!==d.SET_PRISTINE&&u.status===E.PRISTINE&&(u.status=E.IDLE),u};var _=r(18),S=r(93),k=r(201);var w=r(203),j=r(198),R=r(58),C=r(31),T=r(79);const A=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),P=()=>Object(n.useContext)(A),x=e=>{let{children:t,redirectUrl:r,isCart:a=!1}=e;v.redirectUrl=r;const[b,g]=Object(n.useReducer)(O,v),{setValidationErrors:y}=Object(j.b)(),{createErrorNotice:P}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:x}=Object(R.a)(),M=b.calculatingCount>0,{isSuccessResponse:N,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(C.d)(),{checkoutNotices:F,paymentNotices:V,expressPaymentNotices:B}=(()=>{const{noticeContexts:e}=Object(C.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,H]=Object(n.useReducer)(S.b,{}),G=Object(n.useRef)(U),{onCheckoutAfterProcessingWithSuccess:Y,onCheckoutAfterProcessingWithError:z,onCheckoutValidationBeforeProcessing:q}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(k.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(k.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(k.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{G.current=U},[U]);const W=Object(n.useMemo)(()=>function(){return i()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),X=Object(n.useMemo)(()=>({resetCheckout:()=>{g({type:d.SET_PRISTINE})},setRedirectUrl:e=>{g(f(e))},setHasError:e=>{g(h(e))},incrementCalculating:()=>{g({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{g({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;g((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{g((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{g((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{g((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(_.decodeEntities)(n)})),"message"in e&&(t.message=Object(_.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;g(f((null==t?void 0:t.redirectUrl)||"")),g((r=t,{type:d.SET_PROCESSING_RESPONSE,data:r})),g({type:d.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{b.status===E.BEFORE_PROCESSING&&(Object(T.b)("error"),Object(w.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;P(t,{context:"wc/checkout"}),y(r)}),g(p()),g(h())):g({type:d.SET_PROCESSING})}))},[b.status,y,P,g]);const K=Object(s.a)(b.status),$=Object(s.a)(b.hasError);Object(n.useEffect)(()=>{if((b.status!==K||b.hasError!==$)&&b.status===E.AFTER_PROCESSING){const e={redirectUrl:b.redirectUrl,orderId:b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,processingResponse:b.processingResponse};b.hasError?Object(w.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message&&Object(c.a)(e.message)){const r=e.messageContext&&Object(c.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,P(e.message,r)}}),t})(t);if(null!==r)L(r)?g(p()):g(m(r));else{if(!(F.some(e=>"error"===e.status)||B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"checkout",context:"wc/checkout"})}g(p())}}):Object(w.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{N(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)g(m(t));else if(Object(l.a)(r)){if(r.message&&Object(c.a)(r.message)){const e=r.messageContext&&Object(c.a)(r.messageContext)?{context:r.messageContext}:void 0;P(r.message,e)}L(r)?g(h(!0)):g(m(r))}else g(m())})}},[b.status,b.hasError,b.redirectUrl,b.orderId,b.customerId,b.orderNotes,b.processingResponse,K,$,X,P,I,D,N,L,F,B,V]);const J={onSubmit:Object(n.useCallback)(()=>{x("submit"),g({type:d.SET_BEFORE_PROCESSING})},[x]),isComplete:b.status===E.COMPLETE,isIdle:b.status===E.IDLE,isCalculating:M,isProcessing:b.status===E.PROCESSING,isBeforeProcessing:b.status===E.BEFORE_PROCESSING,isAfterProcessing:b.status===E.AFTER_PROCESSING,hasError:b.hasError,redirectUrl:b.redirectUrl,onCheckoutBeforeProcessing:W,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:Y,onCheckoutAfterProcessingWithError:z,dispatchActions:X,isCart:a,orderId:b.orderId,hasOrder:!!b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,useShippingAsBilling:b.useShippingAsBilling,setUseShippingAsBilling:e=>{return g((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:b.shouldCreateAccount,setShouldCreateAccount:e=>{return g((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:b.extensionData};return Object(n.createElement)(A.Provider,{value:J},t)}},function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(14),a=function({icon:e,className:t,...r}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:s},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(a,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&a===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===s.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(s.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(5),o=r.n(n),s=r(0);t.a=Object(s.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(s.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(5),a=r.n(s),i=r(4),c=r(23),l=r.n(c),u=r(11),d=r(44),p=r(70),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const s=o.getBoundingClientRect();return new n.DOMRect(e.left+s.left,e.top+s.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function E(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var y=r(22);function v(e){const t=Object(o.useContext)(y.a),r=t.slots[e]||{},n=t.fills[e],s=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:s,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const s=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,s]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(s(t(e)),r(()=>{s(t(e))})),[e]),n})(e),a=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,a.current),()=>n(e,a.current)),[]),Object(o.useLayoutEffect)(()=>{a.current.children=t,s&&s.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==a.current.name&&(n(a.current.name,a.current),a.current.name=e,r(e,a.current))},[e]),s&&s.node?(Object(i.isFunction)(t)&&(t=t(s.props.fillProps)),Object(o.createPortal)(t,s.node)):null}var S=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,s=Object(i.map)(n(t,this),e=>{const t=Object(i.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(i.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(i.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(i.isFunction)(e)?e(s):s)}}var w=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:s})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:s})));function j(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function R({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:j()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var C=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...s},a){const i=Object(o.useContext)(y.a),c=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(i.registerSlot(e,c,t),()=>{i.unregisterSlot(e,c)}),[i.registerSlot,i.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{i.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([a,c])},s))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(R,e))}r(13),o.Component;const A=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(C,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function P(e){return"appear"===e?"top":"left"}function x(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:s}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const i=r?parseInt(r,10):0,c=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+i,width:e.width-l-u,height:e.height-i-c,left:e.left+l,right:e.right-u,top:e.top+i,bottom:e.bottom-c}}function M(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function N(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:s,noArrow:i=!0,isAlternate:c,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:y,shouldAnchorIncludePadding:O,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:w=!0,onClickOutside:j,onFocusOutside:R,__unstableStickyBoundaryElement:C,__unstableSlotName:A="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),G=Object(o.useRef)(null),Y=Object(o.useRef)(),z=Object(u.useViewportMatch)("medium","<"),[q,X]=Object(o.useState)(),K=v(A),$=k&&z,[J,Q]=Object(u.useResizeObserver)();i=$||i,Object(o.useLayoutEffect)(()=>{if($)return I(Y.current,"is-without-arrow",i),I(Y.current,"is-alternate",c),M(Y.current,"data-x-axis"),M(Y.current,"data-y-axis"),N(Y.current,"top"),N(Y.current,"left"),N(G.current,"maxHeight"),void N(G.current,"maxWidth");const e=()=>{if(!Y.current||!G.current)return;let e=function(e,t,r,n=!1,o,s){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,s)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,s);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,s);return o?e:x(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),a=t.getBoundingClientRect(),i=m(new window.DOMRect(r.left,r.top,r.width,a.bottom-r.top),e.ownerDocument,s);return o?i:x(i,n)}if(!e.current)return;const{parentNode:a}=e.current,i=a.getBoundingClientRect();return o?i:x(i,a)}(H,_,S,y,O,Y.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=Y.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var s;L&&(n=null===(s=Y.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const a=Q.height?Q:G.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:E}=function(e,t,r="top",n,o,s,a,i,c){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,s,a,i){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-a;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},d={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let f,m=r,h=null;if(!o&&!i)if("middle"===r&&u.contentHeight===c)m="middle";else if("top"===r&&d.contentHeight===c)m="top";else if("bottom"===r&&p.contentHeight===c)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==c?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,s,i);return{...function(e,t,r,n,o,s,a,i,c){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===s||c||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===s||c||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,E=r,y=null;if(!o&&!i)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&h.contentWidth===l)E="left";else if("right"===r&&b.contentWidth===l)E="right";else{E=h.contentWidth>b.contentWidth?"left":"right";const e="left"===E?h.contentWidth:b.contentWidth;l>window.innerWidth&&(y=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===E?d.popoverLeft:"left"===E?h.popoverLeft:b.popoverLeft,a){const e=a.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:E,popoverLeft:g,contentWidth:y}}(e,t,u,d,n,p.yAxis,a,i,c),...p}}(e,a,h,C,Y.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(N(Y.current,"top",l+"px"),N(Y.current,"left",u+"px")),I(Y.current,"is-without-arrow",i||"center"===p&&"middle"===b),I(Y.current,"is-alternate",c),M(Y.current,"data-x-axis",p),M(Y.current,"data-y-axis",b),N(G.current,"maxHeight","number"==typeof g?g+"px":""),N(G.current,"maxWidth","number"==typeof E?E+"px":""),X(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=Y.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const s=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",s),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(y);let l;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",s),r.cancelAnimationFrame(o),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[$,_,S,y,O,h,Q,C,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&R)R(r);else if("focus-outside"===e&&j){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),j(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([Y,ee,U]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return a()("components-animate__loading");const{type:t,origin:r=P(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return a()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:a()("components-popover",s,ne,{"is-expanded":$,"is-without-arrow":i,"is-alternate":c})},B,{ref:re},te,{tabIndex:"-1"}),$&&Object(o.createElement)(E,null),$&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(W,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:G,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return K.ref&&(oe=Object(o.createElement)(T,{name:A},oe)),y||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(A,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(i.isString)(e)&&(r=e),Object(i.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var G=function({children:e,position:t,text:r,shortcut:n}){const[s,a]=Object(o.useState)(!1),[c,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),a(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),a(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&s)return;d.cancel();const o=Object(i.includes)(["focus","mouseenter"],n.type);o!==c&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},y=o.Children.only(e),{children:v,disabled:O}=y.props;return(O?B:U)({child:y,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:s})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:s}))))({grandchildren:v,isOver:c,position:t,text:r,shortcut:n})})},Y=r(37),z=r(38);const q=["onMouseDown","onClick"];var W=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:s,isSmall:c,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:E,tooltipPosition:y,shortcut:v,label:O,children:_,text:S,variant:k,__experimentalIsFocusable:w,describedBy:j,...R}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:s,...a}){let i=s;var c,u,d,p,f;return t&&(null!==(c=i)&&void 0!==c||(i="primary")),n&&(null!==(u=i)&&void 0!==u||(i="tertiary")),r&&(null!==(d=i)&&void 0!==d||(i="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=i)&&void 0!==p||(i="secondary")),o&&(null!==(f=i)&&void 0!==f||(i="link")),{...a,variant:i}}(e),C=a()("components-button",f,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":c,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=m&&!w,A=void 0===r||T?"button":"a",P="a"===A?{href:r,target:s}:{type:"button",disabled:T,"aria-pressed":u};if(m&&w){P["aria-disabled"]=!0;for(const e of q)R[e]=e=>{e.stopPropagation(),e.preventDefault()}}const x=!T&&(E&&O||v||!!O&&(!_||Object(i.isArray)(_)&&!_.length)&&!1!==E),M=j?Object(i.uniqueId)():null,N=R["aria-describedby"]||M,I=Object(o.createElement)(A,Object(n.a)({},P,R,{className:C,"aria-label":R["aria-label"]||O,"aria-describedby":N,ref:t}),h&&"left"===b&&Object(o.createElement)(Y.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(Y.a,{icon:h,size:g}),_);return x?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(G,{text:j||O,shortcut:v,position:y},I),j&&Object(o.createElement)(z.a,null,Object(o.createElement)("span",{id:M},j))):Object(o.createElement)(o.Fragment,null,I,j&&Object(o.createElement)(z.a,null,Object(o.createElement)("span",{id:M},j)))}))},function(e,t){e.exports=window.wp.dom},,function(e,t,r){"use strict";r.d(t,"n",(function(){return s})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return i})),r.d(t,"m",(function(){return c})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return E}));var n,o=r(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=s.pluginUrl+"images/",i=s.pluginUrl+"build/",c=s.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),s=r(71),a=r(52);const i=Object(n.getSetting)("countryLocale",{}),c=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
+ Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(s.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(i).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,c(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),o=r(66);const s=Object(n.createContext)({isInitialized:!1,billingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingAddress:()=>{},setShippingAddress:()=>{}}),a=()=>Object(n.useContext)(s),i=e=>{let{children:t}=e;const r=Object(o.a)();return Object(n.createElement)(s.Provider,{value:r},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,s=Object(n.useRef)(null),a=Object(n.useRef)(0),i=Object(n.useRef)(null),c=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=c.current,r=l.current;return c.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(i.current),i.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-s.current,n=e-a.current;return!s.current||r>=t||r<0||b&&n>=g},E=function(t){return i.current=null,h&&c.current?e(t):(c.current=l.current=null,u.current)},y=function(){var e=Date.now();if(n(e))return E(e);if(p.current){var o=e-s.current,i=e-a.current,c=t-o,l=b?Math.min(c,g-i):c;r(y,l)}},v=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var h=Date.now(),g=n(h);if(c.current=d,l.current=o,s.current=h,g){if(!i.current&&p.current)return a.current=s.current,r(y,t),m?e(s.current):u.current;if(b)return r(y,t),e(s.current)}return i.current||r(y,t),u.current};return v.cancel=function(){i.current&&(f?cancelAnimationFrame(i.current):clearTimeout(i.current)),a.current=0,c.current=s.current=l.current=i.current=null},v.isPending=function(){return!!i.current},v.flush=function(){return i.current?E(Date.now()):u.current},v}),[m,b,t,g,h,f])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),s=r(0),a=r(16);const i=[".wp-block-woocommerce-cart"],c=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:i=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const c=n(e,r),l=i(e,r),u={...e.dataset,...c.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:i={},errorBoundaryProps:c={}}=e;Object(s.render)(Object(s.createElement)(a.a,c,Object(s.createElement)(s.Suspense,{fallback:Object(s.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(s.createElement)(t,o()({},i,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:c,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(i.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:s}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:s}=e;const a=document.body.querySelectorAll(o);s&&s.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,s)),c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:s,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:s}=e;const a=s.querySelectorAll(o);c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=i(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||i(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){var n=r(82),o=r(56),s=o.setStyleProp,a=n.html,i=n.svg,c=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],c(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(i,t)?d[(u=i[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return s(e.style,d),d}},function(e,t,r){var n=r(3),o=r(86).default,s={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,s={},a={};for(r in e)n=e[r],o&&(s=t(r,n))&&2===s.length?a[s[0]]=s[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,s))}}},function(e,t,r){for(var n,o=r(92).CASE_SENSITIVE_TAG_NAMES,s={},a=0,i=o.length;a<i;a++)n=o[a],s[n.toLowerCase()]=n;function c(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return s[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:c,formatDOM:function e(t,r,n){r=r||null;for(var o,s,a,i=[],u=0,d=t.length;u<d;u++){switch(o=t[u],a={next:null,prev:i[u-1]||null,parent:r},(s=i[u-1])&&(s.next=a),"#"!==o.nodeName[0]&&(a.name=l(o.nodeName),a.attribs={},o.attributes&&o.attributes.length&&(a.attribs=c(o.attributes))),o.nodeType){case 1:"script"===a.name||"style"===a.name?a.type=a.name:a.type="tag",a.children=e(o.childNodes,a);break;case 3:a.type="text",a.data=o.nodeValue;break;case 8:a.type="comment",a.data=o.nodeValue}i.push(a)}return n&&(i.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:i[0]?i[0]:null,prev:null,parent:r}),i[1]&&(i[1].prev=i[0])),i},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(42),o=r(0),s=r(33);const a=()=>{const e=Object(s.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(0);const o=Object(n.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),s=()=>Object(n.useContext)(o),a=e=>{let{children:t}=e;const[r,s]=Object(n.useState)(!1),a={setIsSuppressed:s,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:a},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},function(e,t,r){var n=r(81),o=r(55),s=r(90),a={decodeEntities:!0,lowerCaseAttributeNames:!1};function i(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(s(e,(t=t||{}).htmlparser2||a),t)}i.domToReact=n,i.htmlToDOM=s,i.attributesToProps=o,e.exports=i,e.exports.default=i},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(6),o=r(8),s=r(0),a=r(13),i=r.n(a),c=r(20),l=r(68);const u=()=>{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:a}=Object(o.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(l.a)(),p=Object(s.useRef)({});return Object(s.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(c.a)(t)&&!i()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:a}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(8),o=r(6);const s=()=>{const{customerData:e,isInitialized:t}=Object(n.useSelect)(e=>{const t=e(o.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:r,setBillingAddress:s}=Object(n.useDispatch)(o.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:s,setShippingAddress:r}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return v})),r.d(t,"a",(function(){return O}));var n=r(0);const o={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},s={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},a={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:o,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},i=(e,t)=>{let{type:r}=t;return Object.values(o).includes(r)?r:e};var c=r(93),l=r(201);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=r(203),p=r(35),f=r(33),m=r(68),h=r(64);const{NONE:b,INVALID_ADDRESS:g,UNKNOWN:E}=o,y=Object(n.createContext)(a),v=()=>Object(n.useContext)(y),O=e=>{let{children:t}=e;const{dispatchActions:r}=Object(p.b)(),{shippingRates:a,isLoadingRates:l,cartErrors:v}=Object(f.a)(),{isSelectingRate:O}=Object(m.a)(),{selectedRates:_}=Object(h.a)(),[S,k]=Object(n.useReducer)(i,b),[w,j]=Object(n.useReducer)(c.b,{}),R=Object(n.useRef)(w),C=Object(n.useMemo)(()=>({onShippingRateSuccess:u(j).onSuccess,onShippingRateFail:u(j).onFail,onShippingRateSelectSuccess:u(j).onSelectSuccess,onShippingRateSelectFail:u(j).onSelectFail}),[j]);Object(n.useEffect)(()=>{R.current=w},[w]),Object(n.useEffect)(()=>{l?r.incrementCalculating():r.decrementCalculating()},[l,r]),Object(n.useEffect)(()=>{O?r.incrementCalculating():r.decrementCalculating()},[O,r]),Object(n.useEffect)(()=>{v.length>0&&v.some(e=>!(!e.code||!Object.values(s).includes(e.code)))?k({type:g}):k({type:b})},[v]);const T=Object(n.useMemo)(()=>({isPristine:S===b,isValid:S===b,hasInvalidAddress:S===g,hasError:S===E||S===g}),[S]);Object(n.useEffect)(()=>{l||0!==a.length&&!T.hasError||Object(d.a)(R.current,"shipping_rates_fail",{hasInvalidAddress:T.hasInvalidAddress,hasError:T.hasError})},[a,l,T.hasError,T.hasInvalidAddress]),Object(n.useEffect)(()=>{!l&&a.length>0&&!T.hasError&&Object(d.a)(R.current,"shipping_rates_success",a)},[a,l,T.hasError]),Object(n.useEffect)(()=>{O||(T.hasError?Object(d.a)(R.current,"shipping_rate_select_fail",{hasError:T.hasError,hasInvalidAddress:T.hasInvalidAddress}):Object(d.a)(R.current,"shipping_rate_select_success",_.current))},[_,O,T.hasError,T.hasInvalidAddress]);const A={shippingErrorStatus:T,dispatchErrorStatus:k,shippingErrorTypes:o,...C};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(y.Provider,{value:A},t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(8),o=r(0),s=r(6),a=r(74),i=r(58);const c=()=>{const e=Object(a.a)(),{dispatchCheckoutEvent:t}=Object(i.a)(),{selectShippingRate:r}=Object(n.useDispatch)(s.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((n,o)=>{r(n,o).then(()=>{t("set-selected-shipping-rate",{shippingRateId:n})}).catch(t=>{e(t)})},[r,t,e]),isSelectingRate:Object(n.useSelect)(e=>e(s.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return c}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:s,detail:a={}}=t;if(!n)return;s||(s=document.body);const i=new n(e,{bubbles:r,cancelable:o,detail:a});s.dispatchEvent(i)};let s;const a=()=>{s&&clearTimeout(s),s=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},c=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const s=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,s),()=>jQuery(document).off(e,s)}},function(e,t,r){"use strict";var n=r(0),o=r(14);const s=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(12),o=r.n(n),s=r(0);r(106);const a=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(s.useRef)(null);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(s.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];a(e),null==e||e.focus()}else a(e)})(e,r):a(e))})(r.current,e)}})))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),s=r(5),a=r.n(s),i=r(1),c=r(21),l=r(70),u=r(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:s=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(c.speak)(r,t)},[r,t])}(s,h);const E=a()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:s=!1,onClick:i,url:c},l)=>{let d=o;return"primary"===o||s||(d=c?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:c,variant:d,onClick:c?void 0:i,className:a()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(i.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(8);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const r=Object(n.select)("core/notices").getNotices(e);return r.some(e=>e.type===t)},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object(n.select)("core/notices").getNotices(),{removeNotice:o}=Object(n.dispatch)("core/notices"),s=r.filter(t=>t.status===e);s.forEach(e=>o(e.id,t))}},function(e,t){},function(e,t,r){var n=r(3),o=r(55),s=r(56),a=s.setStyleProp;function i(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&s.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var s,c,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,E=0,y=t.length;E<y;E++)if(s=t[E],b&&m(c=r.replace(s)))y>1&&(c=p(c,{key:c.key||E})),h.push(c);else if("text"!==s.type){switch(l=s.attribs,i(s)?a(l.style,l):l&&(l=o(l)),u=null,s.type){case"script":case"style":s.children[0]&&(l.dangerouslySetInnerHTML={__html:s.children[0].data});break;case"tag":"textarea"===s.name&&s.children[0]?l.defaultValue=s.children[0].data:s.children&&s.children.length&&(u=e(s.children,r));break;default:continue}y>1&&(l.key=E),h.push(f(s.name,l,u))}else g?s.data.trim()&&h.push(s.data):h.push(s.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(83),o=r(84),s=r(85),a=s.MUST_USE_PROPERTY,i=s.HAS_BOOLEAN_VALUE,c=s.HAS_NUMERIC_VALUE,l=s.HAS_POSITIVE_NUMERIC_VALUE,u=s.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,s,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),s=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(s,a),hasBooleanValue:d(s,i),hasNumericValue:d(s,c),hasPositiveNumericValue:d(s,l),hasOverloadedBooleanValue:d(s,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(87)),s=r(89);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[s.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(88);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var s,a,i=n(e),c="function"==typeof t,l=0,u=i.length;l<u;l++)s=(r=i[l]).property,a=r.value,c?t(s,a,r):a&&(o||(o={}),o[s]=a);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:l,column:d};return function(t){return t.position=new m(e),E(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function E(){g(o)}function y(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function O(){var e=f(),t=g(s);if(t){if(v(),!g(a))return b("property missing ':'");var n=g(i),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(c),o}}return E(),function(){var e,t=[];for(y(t);e=O();)!1!==e&&(t.push(e),y(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,s=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=function(e,t){return t.toUpperCase()},c=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||s.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,c)),e.replace(o,i))}},function(e,t,r){var n=r(91),o=r(57),s=o.formatDOM,a=o.isIE(9),i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(i);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),s(n(e),null,t)}},function(e,t,r){var n=r(57),o=/<([a-zA-Z]+[0-9]?)/,s=/<head.*>/i,a=/<body.*>/i,i=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,c=n.isIE(9),l=c||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=c?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),c&&(e=e.replace(i,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,i,c=e.match(o);switch(c&&c[1]&&(t=c[1].toLowerCase()),t){case"html":return r=d(e),s.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return i=u(e).getElementsByTagName(t),a.test(e)&&s.test(e)?i[0].parentNode.childNodes:i;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i}));var n=r(4);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const s={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:n,callback:s,priority:i}=arguments.length>1?arguments[1]:void 0;const c=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return c.set(n,{priority:i,callback:s}),{...e,[r]:c};case o.REMOVE_EVENT_CALLBACK:return c.delete(n),{...e,[r]:c}}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var n=r(1),o=r(18);const s=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},a=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(o.decodeEntities)(e.message):Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(12)),s=n(r(128)),a=r(3),i=n(a),c=n(r(129)),l=n(r(131)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,s(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var s;return u.und(t[n])?o({},r,((s={})[n]=e[n],s)):r}),{});return o({to:t},r)}var b,g,E=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}return c(t,e),t}(E),v=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}c(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof E)&&(t[r]=n instanceof E?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(E);function O(e,t){b={fn:e,transform:t}}function _(e){g=e}var S,k=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function j(e){S=e}var R,C=function(){return Date.now()};function T(e){R=e}var A,P,x=function(e){return e.current};function M(e){A=e}var N=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:O,get colorNames(){return g},injectColorNames:_,get requestFrame(){return k},get cancelFrame(){return w},injectFrame:function(e,t){k=e,w=t},get interpolation(){return S},injectStringInterpolator:j,get now(){return C},injectNow:function(e){C=e},get defaultElement(){return R},injectDefaultElement:T,get animatedApi(){return x},injectAnimatedApi:function(e){x=e},get createAnimatedStyle(){return A},injectCreateAnimatedStyle:M,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:A(t.style)}):t,n.update=r,n.attach(),n}return c(t,e),t}(v),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=C(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(o>=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}for(var a=s,i=!1,c=0;c<a.configs.length;c++){for(var l=a.configs[c],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var f=l.animatedValues[p];if(!f.done){var m=l.fromValues[p],h=l.toValues[p],b=f.lastPosition,g=h instanceof E,y=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)f.setValue(h),f.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==l.duration)b=m+l.easing((t-f.startTime)/l.duration)*(h-m),u=t>=f.startTime+l.duration;else if(l.decay)b=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,y=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;O<v;++O)b+=1*(y+=(-l.tension*(b-h)+-l.friction*y)/l.mass*1/1e3)/1e3;var _=!(!l.clamp||0===l.tension)&&(m<h?b>h:b<h),S=Math.abs(y)<=l.precision,w=0===l.tension||Math.abs(h-b)<=l.precision;u=_||S&&w,f.lastVelocity=y,f.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(f.value!==h&&(b=h),f.done=!0):i=!0,f.setValue(b),f.lastPosition=b}else f.setValue(h),f.done=!0}}a.props.onFrame&&(a.values[l.name]=l.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),i||(L.delete(a),a.stop(!0))}return L.size?P?P():k(e):D=!1,D};function V(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:r});if(S&&"string"==typeof e.output[0])return S(e);var n=e,o=n.output,s=n.range||[0,1],a=n.extrapolateLeft||n.extrapolate||"extend",i=n.extrapolateRight||n.extrapolate||"extend",c=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,s);return function(e,t,r,n,o,s,a,i,c){var l=c?c(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>r){if("identity"===i)return l;"clamp"===i&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=s(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,s[t],s[t+1],o[t],o[t+1],c,a,i,n.map)}}var B=function(e){function t(r,n,o,s){var a;return(a=e.call(this)||this).calc=void 0,a.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],a.calc=V(n,o,s),a}c(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}c(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(E),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}c(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(y),G=0,Y=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,a=t.to,i=s(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},i,{delay:n,to:a}));else if(a){var c={};Object.entries(a).forEach((function(e){var t,r=e[0],s=e[1],a=o({to:(t={},t[r]=s,t),delay:m(n,r)},i),l=c[a.delay]&&c[a.delay].to;c[a.delay]=o({},c[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(c)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,s=e.to,a=void 0===s?{}:s;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(a)&&(t.merged=o({},t.merged,a))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,a){var i=o.delay,c=s(o,["delay"]),l=function(o){a===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(c.to)||u.fun(c.to);i?setTimeout((function(){r===t.guid&&(d?t.runAsync(c,l):t.diff(c).start(l))}),i):d?t.runAsync(c,l):t.diff(c).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(P||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,s(e,["delay"])),a=this.local,i=Promise.resolve(void 0);if(u.arr(n.to))for(var c=function(e){var t=e,s=o({},n,h(n.to[t]));u.arr(s.config)&&(s.config=s.config[t]),i=i.then((function(){if(a===r.guid)return new Promise((function(e){return r.diff(s).start(e)}))}))},l=0;l<n.to.length;l++)c(l);else if(u.fun(n.to)){var d,p=0;i=i.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,a===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,s=void 0===n?{}:n,a=r.to,i=void 0===a?{}:a,c=r.config,l=void 0===c?{}:c,d=r.reverse,h=r.attach,b=r.reset,E=r.immediate;if(d){var y=[i,s];s=y[0],i=y[1]}this.merged=o({},s,this.merged,i),this.hasChanged=!1;var v=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],a=r[1],i=e[n]||{},c=u.num(a),d=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],h=u.arr(a),y=!c&&!h&&!d,O=u.und(s[n])?a:s[n],_=c||h||d?a:1,k=m(l,n);v&&(_=v.animations[n].parent);var w,j=i.parent,R=i.interpolation,T=f(v?_.getPayload():_),A=a;y&&(A=S({range:[0,1],output:[a,a]})(1));var P,x=R&&R.getValue(),M=!u.und(j)&&i.animatedValues.some((function(e){return!e.done})),N=!u.equ(A,x),I=!u.equ(A,i.previous),D=!u.equ(k,i.config);if(b||I&&N||D){var L;if(c||d)j=R=i.parent||new U(O);else if(h)j=R=i.parent||new H(O);else if(y){var F=i.interpolation&&i.interpolation.calc(i.parent.value);F=void 0===F||b?O:F,i.parent?(j=i.parent).setValue(0,!1):j=new U(0);var V={output:[F,a]};i.interpolation?(R=i.interpolation,i.interpolation.updateConfig(V)):R=j.interpolate(V)}return T=f(v?_.getPayload():_),w=f(j.getPayload()),b&&!y&&j.setValue(O,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=M?e.lastVelocity:void 0,e.lastTime=M?e.lastTime:void 0,e.startTime=C(),e.done=!1,e.animatedStyles.clear()})),m(E,n)&&j.setValue(y?_:a,!1),o({},e,((L={})[n]=o({},i,{name:n,parent:j,interpolation:R,animatedValues:w,toValues:T,previous:A,config:k,fromValues:f(j.getValue()),immediate:m(E,n),initialVelocity:p(k.velocity,0),clamp:p(k.clamp,!1),precision:p(k.precision,.01),tension:p(k.tension,170),friction:p(k.friction,26),mass:p(k.mass,1),duration:k.duration,easing:p(k.easing,(function(e){return e})),decay:k.decay}),L))}return N?e:(y&&(j.setValue(1,!1),R.updateConfig({output:[A,A]})),j.done=!0,t.hasChanged=!0,o({},e,((P={})[n]=o({},e[n],{previous:A}),P)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),z=function(e,t){var r=a.useRef(!1),n=a.useRef(),o=u.fun(t),s=a.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var s=new Y,a=o?m(t,n,s):t[n];return 0===n&&(r=a.ref),s.update(a),r||s.start(),s})),r]}),[e]),i=s[0],c=s[1];n.current=i,a.useImperativeHandle(c,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=a.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?m(e,r,t):e[r]),c||t.start()}))}}),[e]);a.useEffect((function(){r.current?o||l(t):c||n.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},q=0,W=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},X=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,a=s(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:W(t,n)},a)};function K(e,t){var r=function(){if(o){if(s>=n.length)return"break";a=n[s++]}else{if((s=n.next()).done)return"break";a=s.value}var r=a.key,i=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},n=e.current.deleted,o=Array.isArray(n),s=0;for(n=o?n:n[Symbol.iterator]();;){var a;if("break"===r())break}e.current.forceUpdate()}var $=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof E||(t=b.transform(t)),r.payload=t,r}return c(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function ce(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,s=ce(o,n,e+1/3),a=ce(o,n,e),i=ce(o,n,e-1/3);return Math.round(255*s)<<24|Math.round(255*a)<<16|Math.round(255*i)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ae.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ie.exec(t))?parseInt(r[1],16)>>>0:(r=se.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),Ee={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||Ee.hasOwnProperty(e)&&Ee[e]?(""+t).trim():t+"px"}Ee=Object.keys(Ee).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),Ee);var Oe={};M((function(e){return new $(e)})),T("div"),j((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,a=t.scrollLeft,i=s(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in i){var f=c?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,i[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return a.forwardRef((function(t,r){var n=d(),c=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),f=a.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){c.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(r,(function(){return x(p,c,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,s(h,["scrollTop","scrollLeft"])),E=(m=e,!u.fun(m)||m.prototype instanceof i.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return i.createElement(e,o({},g,{ref:E}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),we=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=N,t.useSpring=function(e){var t=u.fun(e),r=z(1,t?e:[e]),n=r[0],o=r[1],s=r[2];return t?[n[0],o,s]:n},t.useTrail=function(e,t){var r=a.useRef(!1),n=u.fun(t),s=m(t),i=a.useRef(),c=z(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},s,{config:m(s.config,e),attach:e>0&&function(){return i.current[e-1]}})})),l=c[0],d=c[1],p=c[2],f=a.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,a=i.current[n];return o({},e,{config:m(e.config||s.config,t),attach:a&&function(){return a}})}))}}),[e,s.reverse]);return a.useEffect((function(){r.current&&!n&&f(t)})),a.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),i=X(n),c=i.lazy,l=void 0!==c&&c,u=(i.unique,i.reset),p=void 0!==u&&u,f=(i.enter,i.leave,i.update,i.onDestroyed),h=(i.keys,i.items,i.onFrame),b=i.onRest,g=i.onStart,E=i.ref,y=s(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=a.useRef(!1),_=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return a.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,a=s(e,["first","prevProps"]),i=X(t),c=i.items,l=i.keys,u=i.initial,d=i.from,p=i.enter,f=i.leave,h=i.update,b=i.trail,g=void 0===b?0:b,E=i.unique,y=i.config,v=i.order,O=void 0===v?["enter","leave","update"]:v,_=X(n),S=_.keys,k=_.items,w=o({},a.current),j=[].concat(a.deleted),R=Object.keys(w),C=new Set(R),T=new Set(l),A=l.filter((function(e){return!C.has(e)})),P=a.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),x=l.filter((function(e){return C.has(e)})),M=-g;O.length;)switch(O.shift()){case"enter":A.forEach((function(e,t){E&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=c[n],s=r&&void 0!==u?"initial":"enter";w[e]={slot:s,originalKey:e,key:E?String(e):q++,item:o,trail:M+=g,config:m(y,o,s),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=S.indexOf(e),r=k[t];j.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:M+=g,config:m(y,r,"leave"),to:m(f,r)})),delete w[e]}));break;case"update":x.forEach((function(e){var t=l.indexOf(e),r=c[t];w[e]=o({},w[e],{item:r,slot:"update",trail:M+=g,config:m(y,r,"update"),to:m(h,r)})}))}var N=l.map((function(e){return w[e]}));return j.forEach((function(e){var t,r=e.left,n=(e.right,s(e,["left","right"]));-1!==(t=N.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),N=[].concat(N.slice(0,t),[n],N.slice(t))})),o({},a,{changed:A.length||P.length||x.length,first:r&&0===A.length,transitions:N,current:w,deleted:j,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,s=e.config,a=e.trail,i=e.key,c=e.item;_.current.instances.has(i)||_.current.instances.set(i,new Y);var u=_.current.instances.get(i),d=o({},y,{to:n,from:r,config:s,ref:E,onRest:function(r){_.current.mounted&&(e.destroyed&&(E||l||K(_,i),f&&f(c)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(E||l)&&_.current.deleted.length>0&&K(_),b&&b(c,t,r))},onStart:g&&function(){return g(c,t)},onFrame:h&&function(e){return h(c,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),a.useEffect((function(){return _.current.mounted=O.current=!0,function(){_.current.mounted=O.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=a.useRef();a.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var s=e.current;if(s){var a=s.controllers;if(a.length){var i=r*t[n];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=z},,,,,,,,,,,function(e,t){},,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(4),s=r(5),a=r.n(s),i=r(21),c=r(1),l=(r(36),r(43));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:s=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(i.speak)(r,t)},[r,t])}(s,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const E=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const y=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:E,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(c.__)("Dismiss this notice")},Object(n.createElement)("div",{className:y},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(54))},function(e,t){e.exports=window.wp.plugins},,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(47),o=(r(15),r(2));const s=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),a=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),s=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(s[r]="")}),s}},,,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(12),o=r.n(n),s=r(0),a=r(5),i=r.n(a),c=r(77),l=r(8),u=(r(80),r(59));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:a}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:f}=Object(l.useDispatch)("core/notices"),m=p.filter(e=>"snackbar"!==e.type).concat(n);if(!m.length)return null;const h=i()(t,"wc-block-components-notices");return a?null:Object(s.createElement)("div",{className:h},m.map(e=>Object(s.createElement)(c.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&f(e.id,r)}}),e.content)))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(51),s=r(2),a=r(61),i=r.n(a),c=r(10),l=r(16);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:a,depth:p=1}=e;return a&&0!==a.length?Array.from(a).map((e,a)=>{const{blockName:f="",...m}={key:`${t}_${p}_${a}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},h=u(f,r);if(!h){const s=i()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof s&&s)return s;if(!Object(n.isValidElement)(s))return null;const a=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return a?Object(n.cloneElement)(s,m,a):Object(n.cloneElement)(s,m)}const b=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${a}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+f,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(b,null,Object(n.createElement)(h,m,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(c.hasInnerBlocks)(e))return null;const a=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(c.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!a.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,i.map((e,r)=>{let{blockName:o,component:a}=e;const i=a||u(o,t);return i?Object(n.createElement)(l.a,{key:o+"_blockerror",text:"Unexpected error in: "+o,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(i,{key:`${o}_forced_${r}`}))):null}))})(f,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:s=(()=>({})),blockMap:a,blockWrapper:i}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:a,children:e.children||[],blockWrapper:i});return{...s(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(130);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(112),s=r(2),a=r(16),i=r(205),c=r(67),l=r(49),u=r(35),d=r(1),p=r(28),f=r.n(p),m=r(117),h=r(94),b=r(8);const g=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},E=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var y=r(198),v=r(33),O=r(59),_=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:s,isBeforeProcessing:a,isComplete:p,orderNotes:_,shouldCreateAccount:S,extensionData:k}=Object(u.b)(),{hasValidationErrors:w}=Object(y.b)(),{shippingErrorStatus:j}=Object(c.b)(),{billingAddress:R,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:T,cartNeedsShipping:A,receiveCart:P}=Object(v.a)(),{activePaymentMethod:x,isExpressPaymentMethodActive:M,currentStatus:N,paymentMethodData:I,expressPaymentMethods:D,paymentMethods:L,shouldSavePayment:F}=Object(i.b)(),{setIsSuppressed:V}=Object(O.b)(),{createErrorNotice:B,removeNotice:U}=Object(b.useDispatch)("core/notices"),H=Object(n.useRef)(R),G=Object(n.useRef)(C),Y=Object(n.useRef)(o),[z,q]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...D,...L};return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId},[x,D,L]),X=w&&!M||N.hasError||j.hasError,K=!e&&!X&&(N.isSuccessful||!T)&&s;Object(n.useEffect)(()=>{V(M)},[M,V]),Object(n.useEffect)(()=>{X===e||!s&&!a||M||r.setHasError(X)},[X,e,s,a,M,r]),Object(n.useEffect)(()=>{H.current=R,G.current=C,Y.current=o},[R,C,o]);const $=Object(n.useCallback)(()=>!w&&(N.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,N.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return M||(e=t($,0)),()=>{M||e()}},[t,$,M]),Object(n.useEffect)(()=>{Y.current&&(window.location.href=Y.current)},[p]);const J=Object(n.useCallback)(async()=>{if(z)return;q(!0),U("checkout");const e=T?{payment_method:W,payment_data:g(I,F,x)}:{},t={billing_address:Object(m.a)(H.current),customer_note:_,create_account:S,...e,extensions:{...k}};A&&(t.shipping_address=Object(m.a)(G.current)),f()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),B(Object(h.b)(e),{id:"checkout",context:"wc/checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{B(e.message,{id:e.error_code,context:"wc/checkout"})}),r.setAfterProcessing(e)})}catch{var t;B(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout"})}r.setHasError(!0),q(!1)})},[z,U,T,W,I,F,x,_,S,k,A,r,B,P]);return Object(n.useEffect)(()=>{K&&!z&&J()},[J,K,z]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(c.a,null,Object(n.createElement)(i.a,null,t,Object(n.createElement)(a.a,{renderError:s.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(_,null)))))}},,,,function(e,t,r){"use strict";var n=r(0);r(195),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,r){"use strict";var n=r(0),o=r(1),s=r(5),a=r.n(s),i=(r(197),r(136));t.a=e=>{let{children:t,className:r,screenReaderLabel:s,showSpinner:c=!1,isLoading:l=!0}=e;return Object(n.createElement)("div",{className:a()(r,{"wc-block-components-loading-mask":l})},l&&c&&Object(n.createElement)(i.a,null),Object(n.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(n.createElement)("span",{className:"screen-reader-text"},s||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},,,,function(e,t){e.exports=window.wp.keycodes},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(0);const o=Object(n.createContext)({hasDarkControls:!1}),s=()=>Object(n.useContext)(o)},,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-heading-block","version":"1.0.0","title":"Heading","description":"Shows the heading row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"content":{"type":"string","default":"Cart totals"},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},,function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(4),s=r(13),a=r.n(s);const i=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),c=()=>Object(n.useContext)(i),l=e=>{let{children:t}=e;const[r,s]=Object(n.useState)({}),c=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{s(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{s({})},[]),p=Object(n.useCallback)(e=>{e&&s(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{s(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return a()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:c,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{s(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(i.Provider,{value:m},t)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(93);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const s=n.a.addEventCallback(e,r,o);return t(s),()=>{t(n.a.removeEventCallback(e,s.id))}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(31);const s=async(e,t,r)=>{const o=n(e,t),s=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&s.push(t)}catch(e){console.error(e)}return!s.length||s},a=async(e,t,r)=>{const s=[],a=n(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return s.push(t),s;s.push(t)}catch(e){return console.error(e),s.push({type:"error"}),s}return s}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return V})),r.d(t,"a",(function(){return B}));var n=r(0),o=r(20),s=r(8);let a,i;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(a||(a={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(i||(i={}));const c={currentStatus:a.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:a,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:s={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case a.PRISTINE:return{...c,...e,errorMessage:"",currentStatus:a.PRISTINE};case a.STARTED:return{...e,currentStatus:a.STARTED};case a.ERROR:return e.currentStatus!==a.ERROR?{...e,currentStatus:a.ERROR,errorMessage:o||e.errorMessage}:e;case a.FAILED:return e.currentStatus!==a.FAILED?{...e,currentStatus:a.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case a.SUCCESS:return e.currentStatus!==a.SUCCESS?{...e,currentStatus:a.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case a.PROCESSING:return e.currentStatus!==a.PROCESSING?{...e,currentStatus:a.PROCESSING,errorMessage:""}:e;case a.COMPLETE:return e.currentStatus!==a.COMPLETE?{...e,currentStatus:a.COMPLETE}:e;case i.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:s};case i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:s};case i.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case i.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},d=r(1),p=r(17),f=r(32),m=r(2),h=r(50),b=r(23),g=r.n(b),E=r(29),y=r(49),v=r(33),O=r(31),_=r(64);const S=(e,t,r,o)=>{const[a,i]=Object(n.useState)(!1),{isEditor:c}=Object(E.a)(),{selectedRates:l}=Object(_.a)(),{billingAddress:u,shippingAddress:p}=Object(y.b)(),b=Object(f.a)(l),O=Object(f.a)(r),S=Object(v.a)(),{cartTotals:k,cartIsLoading:w,cartNeedsShipping:j,paymentRequirements:R}=S,C=Object(n.useRef)({cart:S,cartTotals:k,cartNeedsShipping:j,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:R}),{createErrorNotice:T}=Object(s.useDispatch)("core/notices");Object(n.useEffect)(()=>{C.current={cart:S,cartTotals:k,cartNeedsShipping:j,get billingData(){return g()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:R}},[S,k,j,u,p,b,R]);const A=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<O.length;e++){const r=O[e],s=t[r];if(s)try{const e=!!c||await Promise.resolve(s.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(s)}}catch(e){if(m.CURRENT_USER_IS_ADMIN||c){const t=Object(d.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
6
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),s.paymentMethodId);T(`${t} ${e}`,{context:o,id:`wc-${s.paymentMethodId}-registration-error`})}}}e(r),i(!0)},[T,e,c,o,O,t]),P=Object(h.a)(A,500,{leading:!0});return Object(n.useEffect)(()=>{w||P()},[P,S,b,u,w]),a},k=e=>({type:e}),w=e=>({type:a.ERROR,errorMessage:e}),j=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:a.FAILED,errorMessage:t,paymentMethodData:r}},R=e=>{let{paymentMethodData:t}=e;return{type:a.SUCCESS,paymentMethodData:t}},C=e=>({type:i.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),T=e=>({type:i.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),A=e=>({type:i.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),P=(e,t)=>({type:i.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var x=r(66),M=r(35),N=r(93),I=r(201);var D=r(203),L=r(198);const F=Object(n.createContext)(l),V=()=>Object(n.useContext)(F),B=e=>{let{children:t}=e;const{isProcessing:r,isIdle:i,isCalculating:l,hasError:d}=Object(M.b)(),{isEditor:f,getPreviewData:h}=Object(E.a)(),{setValidationErrors:b}=Object(L.b)(),{createErrorNotice:g,removeNotice:y}=Object(s.useDispatch)("core/notices"),{isSuccessResponse:v,isErrorResponse:_,isFailResponse:V,noticeContexts:B}=Object(O.d)(),[U,H]=Object(n.useReducer)(N.b,{}),{onPaymentProcessing:G}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(I.a)("payment_processing",e)}),[e]))(H),Y=Object(n.useRef)(U);Object(n.useEffect)(()=>{Y.current=U},[U]);const[z,q]=Object(n.useReducer)(u,c),{dispatchActions:W,setPaymentStatus:X}=(e=>{const{setBillingAddress:t,setShippingAddress:r}=Object(x.a)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(C(t))},setRegisteredExpressPaymentMethods:t=>{e(T(t))},setShouldSavePayment:t=>{e(A(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(k(a.PRISTINE)),started:()=>e(k(a.STARTED)),processing:()=>e(k(a.PROCESSING)),completed:()=>e(k(a.COMPLETE)),error:t=>e(w(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(j({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof s&&null!=s&&s.address&&r(s.address),e(R({paymentMethodData:n}))}}),[e,t,r])}})(q),K=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:r}=Object(O.d)(),n=new Set([...Object(m.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return S(e,t,Array.from(n),r.PAYMENTS)})(W.setRegisteredPaymentMethods),$=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:r}=Object(O.d)();return S(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),J=Object(n.useMemo)(()=>f?h("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(m.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(z.paymentMethods):{},[f,h,K,z.paymentMethods]),Q=Object(n.useCallback)(e=>{e?g(e,{id:"wc-express-payment-error",context:B.EXPRESS_PAYMENTS}):y("wc-express-payment-error",B.EXPRESS_PAYMENTS)},[g,B.EXPRESS_PAYMENTS,y]),Z=Object.keys(z.expressPaymentMethods).includes(z.activePaymentMethod),ee=Object(n.useMemo)(()=>({isPristine:z.currentStatus===a.PRISTINE,isStarted:z.currentStatus===a.STARTED,isProcessing:z.currentStatus===a.PROCESSING,isFinished:[a.ERROR,a.FAILED,a.SUCCESS].includes(z.currentStatus),hasError:z.currentStatus===a.ERROR,hasFailed:z.currentStatus===a.FAILED,isSuccessful:z.currentStatus===a.SUCCESS,isDoingExpressPayment:z.currentStatus!==a.PRISTINE&&Z}),[z.currentStatus,Z]);Object(n.useEffect)(()=>{const e=Object.keys(z.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(z.expressPaymentMethods)];if(z.activePaymentMethod&&t.includes(z.activePaymentMethod))return;X().pristine();const r=Object.keys(J).flatMap(e=>J[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(z.paymentMethods)[0])},[K,z.paymentMethods,z.expressPaymentMethods,W,X,z.activePaymentMethod,J]),Object(n.useEffect)(()=>{!r||d||l||ee.isFinished||X().processing()},[r,d,l,ee.isFinished,X]),Object(n.useEffect)(()=>{i&&!ee.isSuccessful&&X().pristine()},[i,ee.isSuccessful,X]),Object(n.useEffect)(()=>{d&&ee.isSuccessful&&X().pristine()},[d,ee.isSuccessful,X]),Object(n.useEffect)(()=>{ee.isProcessing&&(y("wc-payment-error",B.PAYMENTS),Object(D.b)(Y.current,"payment_processing",{}).then(e=>{let t,r;var n,o,s,a,i,c;if(e.forEach(e=>{v(e)&&(t=e),(_(e)||V(e))&&(r=e)}),t&&!r)X().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(s=t)||void 0===s||null===(a=s.meta)||void 0===a?void 0:a.billingAddress,null===(i=t)||void 0===i||null===(c=i.meta)||void 0===c?void 0:c.shippingData);else if(r&&V(r)){var l,u,d,p,f,m;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||B.PAYMENTS}),X().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingAddress)}else if(r){var h,E;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(E=r)||void 0===E?void 0:E.messageContext)||B.PAYMENTS}),X().error(r.message),b(null===(h=r)||void 0===h?void 0:h.validationErrors)}else X().success()}))},[ee.isProcessing,b,X,y,B.PAYMENTS,v,V,_,g]);const te="object"==typeof z.paymentMethodData&&Object(o.b)(z.paymentMethodData,"token")?z.paymentMethodData.token+"":"",re={setPaymentStatus:X,currentStatus:ee,paymentStatuses:a,paymentMethodData:z.paymentMethodData,errorMessage:z.errorMessage,activePaymentMethod:z.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:J,paymentMethods:z.paymentMethods,expressPaymentMethods:z.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:$,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:z.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(n.createElement)(F.Provider,{value:re},t)}},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(247)},function(e,t){},,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(145),o=r(0),s=r(33),a=r(17),i=r(127),c=r(46),l=r(10),u={FILLED_CART:r(151),EMPTY_CART:r(152),CART_ITEMS:r(153),CART_EXPRESS_PAYMENT:r(154),CART_LINE_ITEMS:r(155),CART_TOTALS:r(156),PROCEED_TO_CHECKOUT:r(157),CART_ACCEPTED_PAYMENT_METHODS:r(158),CART_ORDER_SUMMARY:r(159),CART_ORDER_SUMMARY_SUBTOTAL:r(160),CART_ORDER_SUMMARY_FEE:r(161),CART_ORDER_SUMMARY_DISCOUNT:r(162),CART_ORDER_SUMMARY_SHIPPING:r(163),CART_ORDER_SUMMARY_COUPON_FORM:r(164),CART_ORDER_SUMMARY_TAXES:r(165),CART_ORDER_SUMMARY_HEADING:r(166)};r.p=c.k,Object(l.registerCheckoutBlock)({metadata:u.FILLED_CART,component:Object(o.lazy)(()=>r.e(19).then(r.bind(null,417)))}),Object(l.registerCheckoutBlock)({metadata:u.EMPTY_CART,component:Object(o.lazy)(()=>r.e(18).then(r.bind(null,418)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ITEMS,component:Object(o.lazy)(()=>r.e(14).then(r.bind(null,419)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_LINE_ITEMS,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(4),r.e(15)]).then(r.bind(null,451)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_TOTALS,component:Object(o.lazy)(()=>r.e(17).then(r.bind(null,420)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_EXPRESS_PAYMENT,component:Object(o.lazy)(()=>r.e(13).then(r.bind(null,440)))}),Object(l.registerCheckoutBlock)({metadata:u.PROCEED_TO_CHECKOUT,component:Object(o.lazy)(()=>r.e(27).then(r.bind(null,452)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ACCEPTED_PAYMENT_METHODS,component:Object(o.lazy)(()=>r.e(12).then(r.bind(null,453)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(16)]).then(r.bind(null,454)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_HEADING,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,441)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_SUBTOTAL,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,455)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_FEE,component:Object(o.lazy)(()=>r.e(22).then(r.bind(null,456)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_DISCOUNT,component:Object(o.lazy)(()=>r.e(21).then(r.bind(null,457)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_COUPON_FORM,component:Object(o.lazy)(()=>r.e(20).then(r.bind(null,458)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_SHIPPING,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(5),r.e(24)]).then(r.bind(null,442)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_TAXES,component:Object(o.lazy)(()=>r.e(26).then(r.bind(null,443)))}),Object(l.registerCheckoutBlock)({metadata:u.CART_ORDER_SUMMARY_HEADING,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,441)))});var d=r(1),p=r(138),f=r(198),m=r(251),h=r(124),b=r(2),g=r(16),E=r(69),y=r(75),v=r(59),O=r(132);const _=e=>{let{children:t,redirectUrl:r}=e;return Object(o.createElement)(O.a,{isCart:!0,redirectUrl:r},t)};var S=r(146);r(230);const k=()=>{window.location.reload(!0)},w=e=>{let{children:t,attributes:r={}}=e;const{cartIsLoading:n}=Object(s.a)(),{hasDarkControls:a}=r;return Object(o.createElement)(p.a,{showSpinner:!0,isLoading:n},Object(o.createElement)(S.a.Provider,{value:{hasDarkControls:a}},Object(o.createElement)(f.a,null,t)))},j=e=>{let{scrollToTop:t}=e;return Object(o.useEffect)(()=>{const e=Object(E.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",t),()=>{e(),document.body.removeEventListener("wc-blocks_added_to_cart",t)}},[t]),null};var R=Object(y.a)(e=>{let{attributes:t,children:r,scrollToTop:n}=e;return Object(o.createElement)(g.a,{header:Object(d.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(d.__)("The cart has encountered an unexpected error. If the error persists, please get in touch with us for help.","woo-gutenberg-products-block"),button:Object(o.createElement)("button",{className:"wc-block-button",onClick:k},Object(d.__)("Reload the page","woo-gutenberg-products-block")),showErrorMessage:b.CURRENT_USER_IS_ADMIN},Object(o.createElement)(m.a,{context:"wc/cart"}),Object(o.createElement)(v.a,null,Object(o.createElement)(h.a,{context:"wc/cart"}),Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)(_,null,Object(o.createElement)(w,{attributes:t},r),Object(o.createElement)(j,{scrollToTop:n})))))});const C={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(b.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(b.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};Object(i.a)({Block:R,blockName:"woocommerce/cart",selector:".wp-block-woocommerce-cart",getProps:e=>({attributes:Object(n.a)(C,e?e.dataset:{})}),blockMap:Object(a.getRegisteredBlockComponents)("woocommerce/cart"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:n,...a}=Object(s.a)();return o.Children.map(t,e=>{if(Object(o.isValidElement)(e)){const t={extensions:r,cart:a};return Object(o.cloneElement)(e,t)}return e})}})},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(0),o=r(7),s=r(5),a=r.n(s),i=r(4),c=r(95),l=r(11),u=r(111),d=function({notices:e,className:t,children:r,onRemove:s=i.noop}){const d=Object(l.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(c.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:d});t=a()("components-snackbar-list",t);const m=e=>()=>s(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(c.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(u.a,Object(o.a)({},Object(i.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},p=r(10),f=r(8),m=r(29);const h={},b=e=>{let{className:t,context:r="default"}=e;const{isEditor:o}=Object(m.a)(),{notices:s}=Object(f.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:i}=Object(f.useDispatch)("core/notices");if(o)return null;const c=s.filter(e=>"snackbar"===e.type),l=c.length>0?c.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):h,u=Object(p.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:l}),b=c.filter(e=>!0===u[e.content]),g=a()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(d,{notices:b,className:g,onRemove:()=>{b.forEach(e=>i(e.id,r))}})}}]);
build/cart.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '013f1dbde6cc18d56fbd4c981b644aa0');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '502580a9666278a4868e8d1878277793');
build/cart.js CHANGED
@@ -2,7 +2,7 @@ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.cart=functi
2
  /* translators: %s Field label. */
3
  Object(n.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(o.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(s).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,i(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...n[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var r=c(0);c(151),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(38),a=c(4),s=c.n(a),i=c(27);c(149);const l=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:l,priceStyle:u={}}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.sprintf)(
4
  /* translators: %1$s min price, %2$s max price */
5
- Object(n.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(a),Object(i.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:a,style:u})," — ",Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:i,priceClassName:l,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:i}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",l),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:n,format:a="<price/>",maxPrice:i,minPrice:d,price:p,priceClassName:m,priceStyle:b,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("<price/>")||(a="<price/>",console.error("Price formats need to include the `<price/>` tag."));const E=g&&p!==g;let _=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",m)});return E?_=Object(r.createElement)(u,{currency:n,price:p,priceClassName:m,priceStyle:b,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}):void 0!==d&&void 0!==i?_=Object(r.createElement)(l,{currency:n,maxPrice:i,minPrice:d,priceClassName:m,priceStyle:b}):p&&(_=Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",m),currency:n,value:p,style:b})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(a,{price:_}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return s}));var r=c(7);let n;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(n||(n={}));const o={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:o,priority:s}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case n.ADD_EVENT_CALLBACK:return i.set(r,{priority:s,callback:o}),{...e,[c]:i};case n.REMOVE_EVENT_CALLBACK:return i.delete(r),{...e,[c]:i}}}},,,,,function(e,t){e.exports=window.wp.warning},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=c(7),o=c(25),a=c.n(o);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t}=e;const[c,o]=Object(r.useState)({}),i=Object(r.useCallback)(e=>c[e],[c]),l=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{o(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{o({})},[]),p=Object(r.useCallback)(e=>{e&&o(t=>(e=Object(n.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),m=Object(r.useCallback)((e,t)=>{o(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),b={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{m(e,{hidden:!0})},[m]),showValidationError:Object(r.useCallback)(e=>{m(e,{hidden:!1})},[m]),showAllValidationErrors:Object(r.useCallback)(()=>{o(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:l};return Object(r.createElement)(s.Provider,{value:b},t)}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return _})),c.d(t,"a",(function(){return f}));var r=c(0);const n={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},o={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},a={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:n,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},s=(e,t)=>{let{type:c}=t;return Object.values(n).includes(c)?c:e};var i=c(98),l=c(236);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=c(237),p=c(54),m=c(40),b=c(112),g=c(83);const{NONE:O,INVALID_ADDRESS:h,UNKNOWN:j}=n,E=Object(r.createContext)(a),_=()=>Object(r.useContext)(E),f=e=>{let{children:t}=e;const{dispatchActions:c}=Object(p.b)(),{shippingRates:a,isLoadingRates:l,cartErrors:_}=Object(m.a)(),{isSelectingRate:f}=Object(b.a)(),{selectedRates:y}=Object(g.a)(),[k,v]=Object(r.useReducer)(s,O),[w,S]=Object(r.useReducer)(i.b,{}),C=Object(r.useRef)(w),N=Object(r.useMemo)(()=>({onShippingRateSuccess:u(S).onSuccess,onShippingRateFail:u(S).onFail,onShippingRateSelectSuccess:u(S).onSelectSuccess,onShippingRateSelectFail:u(S).onSelectFail}),[S]);Object(r.useEffect)(()=>{C.current=w},[w]),Object(r.useEffect)(()=>{l?c.incrementCalculating():c.decrementCalculating()},[l,c]),Object(r.useEffect)(()=>{f?c.incrementCalculating():c.decrementCalculating()},[f,c]),Object(r.useEffect)(()=>{_.length>0&&_.some(e=>!(!e.code||!Object.values(o).includes(e.code)))?v({type:h}):v({type:O})},[_]);const I=Object(r.useMemo)(()=>({isPristine:k===O,isValid:k===O,hasInvalidAddress:k===h,hasError:k===j||k===h}),[k]);Object(r.useEffect)(()=>{l||0!==a.length&&!I.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:I.hasInvalidAddress,hasError:I.hasError})},[a,l,I.hasError,I.hasInvalidAddress]),Object(r.useEffect)(()=>{!l&&a.length>0&&!I.hasError&&Object(d.a)(C.current,"shipping_rates_success",a)},[a,l,I.hasError]),Object(r.useEffect)(()=>{f||(I.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:I.hasError,hasInvalidAddress:I.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",y.current))},[y,f,I.hasError,I.hasInvalidAddress]);const M={shippingErrorStatus:I,dispatchErrorStatus:v,shippingErrorTypes:n,...N};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(E.Provider,{value:M},t))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(8);function n(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(9),n=c(0),o=c(18),a=c(124),s=c(81);const i=()=>{const e=Object(a.a)(),{dispatchCheckoutEvent:t}=Object(s.a)(),{selectShippingRate:c}=Object(r.useDispatch)(o.CART_STORE_KEY);return{selectShippingRate:Object(n.useCallback)((r,n)=>{c(r,n).then(()=>{t("set-selected-shipping-rate",{shippingRateId:r})}).catch(t=>{e(t)})},[c,t,e]),isSelectingRate:Object(r.useSelect)(e=>e(o.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(14),s=c(4),i=c.n(s);c(148),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",target:l,rel:u,style:d,onClick:p,...m}=e;const b=i()("wc-block-components-product-name",t);if(c){const e=m;return Object(o.createElement)("span",n()({className:b},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(o.createElement)("a",n()({className:b,href:s,target:l},m,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(9);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(r.select)("core/notices").getNotices(),{removeNotice:n}=Object(r.dispatch)("core/notices"),o=c.filter(t=>t.status===e);o.forEach(e=>n(e.id,t))}},function(e,t,c){"use strict";var r=c(0),n=c(90),o=c(61);const a=e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),i=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;";const r=s(e),n=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(n,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;";const n=s(e),a=n.slice(0,t);if(c)return Object(o.autop)(i(a,r));const l=a.match(/([\s]+)/g),u=l?l.length:0,d=n.slice(0,t+u);return Object(o.autop)(i(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:i="",style:d={}}=e;const p=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(o.autop)(e),s=Object(n.count)(r,c);if(s<=t)return r;const i=a(r),d=Object(n.count)(i,c);return d<=t?i:"words"===c?l(i,t):u(i,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{style:d,className:i},p)}},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(132);t.a=e=>{let{checked:t,name:c,onChange:n,option:s}=e;const{value:i,label:l,description:u,secondaryLabel:d,secondaryDescription:p}=s;return Object(r.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${i}`},Object(r.createElement)("input",{id:`${c}-${i}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:i,onChange:e=>n(e.target.value),checked:t,"aria-describedby":o()({[`${c}-${i}__label`]:l,[`${c}-${i}__secondary-label`]:d,[`${c}-${i}__description`]:u,[`${c}-${i}__secondary-description`]:p})}),Object(r.createElement)(a.a,{id:`${c}-${i}`,label:l,secondaryLabel:d,description:u,secondaryDescription:p}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0);const n=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(8),s=c(1),i=c(22),l=e=>{let{imageUrl:t=i.m+"/block-error.svg",header:c=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:n,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",n),l&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};c(193);class u extends a.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,showErrorBlock:r=!0,text:n,errorMessagePrefix:a,renderError:s,button:i}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof s?s({errorMessage:u}):Object(o.createElement)(l,{showErrorBlock:r,errorMessage:c?u:null,header:e,imageUrl:t,text:n,errorMessagePrefix:a,button:i}):this.props.children}}t.a=u},,function(e,t){},,,function(e,t,c){"use strict";var r=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:n,secondaryDescription:o,id:a}=e;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:a&&a+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(r.createElement)("span",{id:a&&a+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},n&&Object(r.createElement)("span",{id:a&&a+"__description",className:"wc-block-components-radio-control__description"},n),o&&Object(r.createElement)("span",{id:a&&a+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a);c(261),t.a=e=>{let{children:t,className:c,headingLevel:r,...a}=e;const i=s()("wc-block-components-title",c),l="h"+r;return Object(o.createElement)(l,n()({className:i},a),t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return o})),c.d(t,"a",(function(){return a}));var r=c(0);const n=Object(r.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),o=()=>Object(r.useContext)(n),a=e=>{let{children:t}=e;const[c,o]=Object(r.useState)(!1),a={setIsSuppressed:o,isSuppressed:c};return Object(r.createElement)(n.Provider,{value:a},t)}},,,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:c=null,alt:r=""}=e;return c?Object(o.createElement)("img",{className:i(t),src:c,alt:r}):null},u=c(22);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(110);c(190),t.a=e=>{let{icons:t=[],align:c="center",className:r}=e;const a=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===a.length)return null;const i=s()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},r);return Object(o.createElement)("div",{className:i},a.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(o.createElement)(l,n()({key:"payment-method-icon-"+e.id},t))}))}},,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"number"==typeof e},function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(2),l=c(228),u=c(36);class d extends s.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(a.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(a.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const r=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.a,{additionalNotices:r,context:u.c.PAYMENTS})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(10),s=c(120);c(259);const i=e=>{let{className:t="",id:c,selected:n,onChange:l=(()=>{}),options:u=[]}=e;const d=Object(a.useInstanceId)(i),p=c||d;return u.length?Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},u.map(e=>Object(r.createElement)(s.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===n,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=i},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return U})),c.d(t,"a",(function(){return F}));var r=c(0),n=c(34),o=c(9);let a,s;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(a||(a={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(s||(s={}));const i={currentStatus:a.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:a,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:n="",paymentMethods:o={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case a.PRISTINE:return{...i,...e,errorMessage:"",currentStatus:a.PRISTINE};case a.STARTED:return{...e,currentStatus:a.STARTED};case a.ERROR:return e.currentStatus!==a.ERROR?{...e,currentStatus:a.ERROR,errorMessage:n||e.errorMessage}:e;case a.FAILED:return e.currentStatus!==a.FAILED?{...e,currentStatus:a.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:n||e.errorMessage}:e;case a.SUCCESS:return e.currentStatus!==a.SUCCESS?{...e,currentStatus:a.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case a.PROCESSING:return e.currentStatus!==a.PROCESSING?{...e,currentStatus:a.PROCESSING,errorMessage:""}:e;case a.COMPLETE:return e.currentStatus!==a.COMPLETE?{...e,currentStatus:a.COMPLETE}:e;case s.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:o};case s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:o};case s.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case s.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:c||e.paymentMethodData}}},d=c(1),p=c(41),m=c(50),b=c(2),g=c(114),O=c(51),h=c.n(O),j=c(59),E=c(72),_=c(40),f=c(36),y=c(83);const k=(e,t,c,n)=>{const[a,s]=Object(r.useState)(!1),{isEditor:i}=Object(j.b)(),{selectedRates:l}=Object(y.a)(),{billingAddress:u,shippingAddress:p}=Object(E.b)(),O=Object(m.a)(l),f=Object(m.a)(c),k=Object(_.a)(),{cartTotals:v,cartIsLoading:w,cartNeedsShipping:S,paymentRequirements:C}=k,N=Object(r.useRef)({cart:k,cartTotals:v,cartNeedsShipping:S,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:O,paymentRequirements:C}),{createErrorNotice:I}=Object(o.useDispatch)("core/notices");Object(r.useEffect)(()=>{N.current={cart:k,cartTotals:v,cartNeedsShipping:S,get billingData(){return h()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:O,paymentRequirements:C}},[k,v,S,u,p,O,C]);const M=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e<f.length;e++){const c=f[e],o=t[c];if(o)try{const e=!!i||await Promise.resolve(o.canMakePayment(N.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);r(o)}}catch(e){if(b.CURRENT_USER_IS_ADMIN||i){const t=Object(d.sprintf)(
6
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
7
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),o.paymentMethodId);I(`${t} ${e}`,{context:n,id:`wc-${o.paymentMethodId}-registration-error`})}}}e(c),s(!0)},[I,e,i,n,f,t]),x=Object(g.a)(M,500,{leading:!0});return Object(r.useEffect)(()=>{w||x()},[x,k,O,u,w]),a},v=e=>({type:e}),w=e=>({type:a.ERROR,errorMessage:e}),S=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:a.FAILED,errorMessage:t,paymentMethodData:c}},C=e=>{let{paymentMethodData:t}=e;return{type:a.SUCCESS,paymentMethodData:t}},N=e=>({type:s.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),I=e=>({type:s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),M=e=>({type:s.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),x=(e,t)=>({type:s.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var R=c(91),P=c(54),T=c(98),A=c(236);var D=c(237),L=c(104);const B=Object(r.createContext)(l),U=()=>Object(r.useContext)(B),F=e=>{let{children:t}=e;const{isProcessing:c,isIdle:s,isCalculating:l,hasError:d}=Object(P.b)(),{isEditor:m,getPreviewData:g}=Object(j.b)(),{setValidationErrors:O}=Object(L.b)(),{createErrorNotice:h,removeNotice:E}=Object(o.useDispatch)("core/notices"),{isSuccessResponse:_,isErrorResponse:y,isFailResponse:U,noticeContexts:F}=Object(f.d)(),[V,z]=Object(r.useReducer)(T.b,{}),{onPaymentProcessing:Y}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(z),G=Object(r.useRef)(V);Object(r.useEffect)(()=>{G.current=V},[V]);const[q,H]=Object(r.useReducer)(u,i),{dispatchActions:$,setPaymentStatus:W}=(e=>{const{setBillingAddress:t,setShippingAddress:c}=Object(R.a)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(N(t))},setRegisteredExpressPaymentMethods:t=>{e(I(t))},setShouldSavePayment:t=>{e(M(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(x(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(v(a.PRISTINE)),started:()=>e(v(a.STARTED)),processing:()=>e(v(a.PROCESSING)),completed:()=>e(v(a.COMPLETE)),error:t=>e(w(t)),failed:function(c,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),e(S({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),void 0!==typeof o&&null!=o&&o.address&&c(o.address),e(C({paymentMethodData:r}))}}),[e,t,c])}})(H),Q=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:c}=Object(f.d)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return k(e,t,Array.from(r),c.PAYMENTS)})($.setRegisteredPaymentMethods),J=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:c}=Object(f.d)();return k(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})($.setRegisteredExpressPaymentMethods),K=Object(r.useMemo)(()=>m?g("previewSavedPaymentMethods"):Q?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const n=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});n.length&&(r[c]=n)}),r}(q.paymentMethods):{},[m,g,Q,q.paymentMethods]),Z=Object(r.useCallback)(e=>{e?h(e,{id:"wc-express-payment-error",context:F.EXPRESS_PAYMENTS}):E("wc-express-payment-error",F.EXPRESS_PAYMENTS)},[h,F.EXPRESS_PAYMENTS,E]),X=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),ee=Object(r.useMemo)(()=>({isPristine:q.currentStatus===a.PRISTINE,isStarted:q.currentStatus===a.STARTED,isProcessing:q.currentStatus===a.PROCESSING,isFinished:[a.ERROR,a.FAILED,a.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===a.ERROR,hasFailed:q.currentStatus===a.FAILED,isSuccessful:q.currentStatus===a.SUCCESS,isDoingExpressPayment:q.currentStatus!==a.PRISTINE&&X}),[q.currentStatus,X]);Object(r.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!Q||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;W().pristine();const c=Object.keys(K).flatMap(e=>K[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,r=`wc-${t}-payment-token`;$.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e,isSavedToken:!0})}else $.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[Q,q.paymentMethods,q.expressPaymentMethods,$,W,q.activePaymentMethod,K]),Object(r.useEffect)(()=>{!c||d||l||ee.isFinished||W().processing()},[c,d,l,ee.isFinished,W]),Object(r.useEffect)(()=>{s&&!ee.isSuccessful&&W().pristine()},[s,ee.isSuccessful,W]),Object(r.useEffect)(()=>{d&&ee.isSuccessful&&W().pristine()},[d,ee.isSuccessful,W]),Object(r.useEffect)(()=>{ee.isProcessing&&(E("wc-payment-error",F.PAYMENTS),Object(D.b)(G.current,"payment_processing",{}).then(e=>{let t,c;var r,n,o,a,s,i;if(e.forEach(e=>{_(e)&&(t=e),(y(e)||U(e))&&(c=e)}),t&&!c)W().success(null===(r=t)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.meta)||void 0===a?void 0:a.billingAddress,null===(s=t)||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.shippingData);else if(c&&U(c)){var l,u,d,p,m,b;c.message&&c.message.length&&h(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=c)||void 0===b?void 0:b.messageContext)||F.PAYMENTS}),W().failed(null===(l=c)||void 0===l?void 0:l.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(m=p.meta)||void 0===m?void 0:m.billingAddress)}else if(c){var g,j;c.message&&c.message.length&&h(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(j=c)||void 0===j?void 0:j.messageContext)||F.PAYMENTS}),W().error(c.message),O(null===(g=c)||void 0===g?void 0:g.validationErrors)}else W().success()}))},[ee.isProcessing,O,W,E,F.PAYMENTS,_,U,y,h]);const te="object"==typeof q.paymentMethodData&&Object(n.b)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",ce={setPaymentStatus:W,currentStatus:ee,paymentStatuses:a,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:$.setActivePaymentMethod,onPaymentProcessing:Y,customerPaymentMethods:K,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:Q,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:X,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:$.setShouldSavePayment};return Object(r.createElement)(B.Provider,{value:ce},t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(50),n=c(162);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(n.b)(),s=Object(r.a)(t),i=Object(r.a)(c);return{paymentMethods:e?i:s,isInitialized:e?a:o}},a=()=>o(!1),s=()=>o(!0)},,,,function(e,t){},,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(274),a=c(171),s=c(59),i=c(162),l=c(51),u=c.n(l),d=c(158);t.a=()=>{const{isEditor:e}=Object(s.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:l,paymentMethodData:p,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:g}=Object(a.a)(),O=Object(r.useRef)(l),h=Object(r.useRef)(p),j=Object(r.useCallback)(e=>()=>{O.current=l,h.current=p,m().started(),t(e)},[l,p,t,m]),E=Object(r.useCallback)(()=>{m().pristine(),t(O.current,h.current)},[t,m]),_=Object(r.useCallback)(e=>{m().error(e),c(e),t(O.current,h.current)},[t,m,c]),f=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?_(e):c("")}),[c,_]),y=Object.entries(g),k=y.length>0?y.map(t=>{let[c,n]=t;const o=e?n.edit:n.content;return Object(r.isValidElement)(o)?Object(r.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(r.cloneElement)(o,{...b,onClick:j(c),onClose:E,onError:_,setExpressPaymentError:f})):null}):Object(r.createElement)("li",{key:"noneRegistered"},Object(n.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(r.createElement)(d.a,{isEditor:e},Object(r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(1),n=c(9),o=c(18),a=c(14),s=c(40),i=c(104);const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(s.a)(),{createErrorNotice:l}=Object(n.useDispatch)("core/notices"),{createNotice:u}=Object(n.useDispatch)("core/notices"),{setValidationErrors:d}=Object(i.b)(),p=Object(n.useSelect)((t,c)=>{let{dispatch:n}=c;const s=t(o.CART_STORE_KEY),i=s.isApplyingCoupon(),p=s.isRemovingCoupon(),{applyCoupon:m,removeCoupon:b,receiveApplyingCoupon:g}=n(o.CART_STORE_KEY);return{applyCoupon:t=>{m(t).then(c=>{!0===c&&u("info",Object(r.sprintf)(
8
  /* translators: %s coupon code. */
2
  /* translators: %s Field label. */
3
  Object(n.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(o.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(s).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,i(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...n[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var r=c(0);c(151),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(38),a=c(4),s=c.n(a),i=c(27);c(149);const l=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:l,priceStyle:u={}}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.sprintf)(
4
  /* translators: %1$s min price, %2$s max price */
5
+ Object(n.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(a),Object(i.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:a,style:u})," — ",Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:i,priceClassName:l,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:i}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",l),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:n,format:a="<price/>",maxPrice:i,minPrice:d,price:p,priceClassName:m,priceStyle:b,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("<price/>")||(a="<price/>",console.error("Price formats need to include the `<price/>` tag."));const E=g&&p!==g;let _=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",m)});return E?_=Object(r.createElement)(u,{currency:n,price:p,priceClassName:m,priceStyle:b,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}):void 0!==d&&void 0!==i?_=Object(r.createElement)(l,{currency:n,maxPrice:i,minPrice:d,priceClassName:m,priceStyle:b}):p&&(_=Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",m),currency:n,value:p,style:b})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(a,{price:_}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return s}));var r=c(7);let n;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(n||(n={}));const o={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:o,priority:s}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case n.ADD_EVENT_CALLBACK:return i.set(r,{priority:s,callback:o}),{...e,[c]:i};case n.REMOVE_EVENT_CALLBACK:return i.delete(r),{...e,[c]:i}}}},,,,,function(e,t){e.exports=window.wp.warning},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=c(7),o=c(25),a=c.n(o);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t}=e;const[c,o]=Object(r.useState)({}),i=Object(r.useCallback)(e=>c[e],[c]),l=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{o(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{o({})},[]),p=Object(r.useCallback)(e=>{e&&o(t=>(e=Object(n.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),m=Object(r.useCallback)((e,t)=>{o(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),b={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{m(e,{hidden:!0})},[m]),showValidationError:Object(r.useCallback)(e=>{m(e,{hidden:!1})},[m]),showAllValidationErrors:Object(r.useCallback)(()=>{o(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:l};return Object(r.createElement)(s.Provider,{value:b},t)}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return _})),c.d(t,"a",(function(){return f}));var r=c(0);const n={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},o={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},a={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:n,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},s=(e,t)=>{let{type:c}=t;return Object.values(n).includes(c)?c:e};var i=c(98),l=c(236);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=c(237),p=c(54),m=c(40),b=c(112),g=c(83);const{NONE:O,INVALID_ADDRESS:h,UNKNOWN:j}=n,E=Object(r.createContext)(a),_=()=>Object(r.useContext)(E),f=e=>{let{children:t}=e;const{dispatchActions:c}=Object(p.b)(),{shippingRates:a,isLoadingRates:l,cartErrors:_}=Object(m.a)(),{isSelectingRate:f}=Object(b.a)(),{selectedRates:y}=Object(g.a)(),[k,v]=Object(r.useReducer)(s,O),[w,S]=Object(r.useReducer)(i.b,{}),C=Object(r.useRef)(w),N=Object(r.useMemo)(()=>({onShippingRateSuccess:u(S).onSuccess,onShippingRateFail:u(S).onFail,onShippingRateSelectSuccess:u(S).onSelectSuccess,onShippingRateSelectFail:u(S).onSelectFail}),[S]);Object(r.useEffect)(()=>{C.current=w},[w]),Object(r.useEffect)(()=>{l?c.incrementCalculating():c.decrementCalculating()},[l,c]),Object(r.useEffect)(()=>{f?c.incrementCalculating():c.decrementCalculating()},[f,c]),Object(r.useEffect)(()=>{_.length>0&&_.some(e=>!(!e.code||!Object.values(o).includes(e.code)))?v({type:h}):v({type:O})},[_]);const I=Object(r.useMemo)(()=>({isPristine:k===O,isValid:k===O,hasInvalidAddress:k===h,hasError:k===j||k===h}),[k]);Object(r.useEffect)(()=>{l||0!==a.length&&!I.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:I.hasInvalidAddress,hasError:I.hasError})},[a,l,I.hasError,I.hasInvalidAddress]),Object(r.useEffect)(()=>{!l&&a.length>0&&!I.hasError&&Object(d.a)(C.current,"shipping_rates_success",a)},[a,l,I.hasError]),Object(r.useEffect)(()=>{f||(I.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:I.hasError,hasInvalidAddress:I.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",y.current))},[y,f,I.hasError,I.hasInvalidAddress]);const M={shippingErrorStatus:I,dispatchErrorStatus:v,shippingErrorTypes:n,...N};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(E.Provider,{value:M},t))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(8);function n(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(9),n=c(0),o=c(18),a=c(124),s=c(81);const i=()=>{const e=Object(a.a)(),{dispatchCheckoutEvent:t}=Object(s.a)(),{selectShippingRate:c}=Object(r.useDispatch)(o.CART_STORE_KEY);return{selectShippingRate:Object(n.useCallback)((r,n)=>{c(r,n).then(()=>{t("set-selected-shipping-rate",{shippingRateId:r})}).catch(t=>{e(t)})},[c,t,e]),isSelectingRate:Object(r.useSelect)(e=>e(o.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(14),s=c(4),i=c.n(s);c(148),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",target:l,rel:u,style:d,onClick:p,...m}=e;const b=i()("wc-block-components-product-name",t);if(c){const e=m;return Object(o.createElement)("span",n()({className:b},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(o.createElement)("a",n()({className:b,href:s,target:l},m,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(9);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(r.select)("core/notices").getNotices(),{removeNotice:n}=Object(r.dispatch)("core/notices"),o=c.filter(t=>t.status===e);o.forEach(e=>n(e.id,t))}},function(e,t,c){"use strict";var r=c(0),n=c(90),o=c(61);const a=e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),i=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;";const r=s(e),n=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(n,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;";const n=s(e),a=n.slice(0,t);if(c)return Object(o.autop)(i(a,r));const l=a.match(/([\s]+)/g),u=l?l.length:0,d=n.slice(0,t+u);return Object(o.autop)(i(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:i="",style:d={}}=e;const p=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(o.autop)(e),s=Object(n.count)(r,c);if(s<=t)return r;const i=a(r),d=Object(n.count)(i,c);return d<=t?i:"words"===c?l(i,t):u(i,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{style:d,className:i},p)}},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(132);t.a=e=>{let{checked:t,name:c,onChange:n,option:s}=e;const{value:i,label:l,description:u,secondaryLabel:d,secondaryDescription:p}=s;return Object(r.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${i}`},Object(r.createElement)("input",{id:`${c}-${i}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:i,onChange:e=>n(e.target.value),checked:t,"aria-describedby":o()({[`${c}-${i}__label`]:l,[`${c}-${i}__secondary-label`]:d,[`${c}-${i}__description`]:u,[`${c}-${i}__secondary-description`]:p})}),Object(r.createElement)(a.a,{id:`${c}-${i}`,label:l,secondaryLabel:d,description:u,secondaryDescription:p}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0);const n=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(8),s=c(1),i=c(22),l=e=>{let{imageUrl:t=i.m+"/block-error.svg",header:c=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:n,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",n),l&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};c(193);class u extends a.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,showErrorBlock:r=!0,text:n,errorMessagePrefix:a,renderError:s,button:i}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof s?s({errorMessage:u}):Object(o.createElement)(l,{showErrorBlock:r,errorMessage:c?u:null,header:e,imageUrl:t,text:n,errorMessagePrefix:a,button:i}):this.props.children}}t.a=u},,function(e,t){},,,function(e,t,c){"use strict";var r=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:n,secondaryDescription:o,id:a}=e;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:a&&a+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(r.createElement)("span",{id:a&&a+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},n&&Object(r.createElement)("span",{id:a&&a+"__description",className:"wc-block-components-radio-control__description"},n),o&&Object(r.createElement)("span",{id:a&&a+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a);c(261),t.a=e=>{let{children:t,className:c,headingLevel:r,...a}=e;const i=s()("wc-block-components-title",c),l="h"+r;return Object(o.createElement)(l,n()({className:i},a),t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return o})),c.d(t,"a",(function(){return a}));var r=c(0);const n=Object(r.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),o=()=>Object(r.useContext)(n),a=e=>{let{children:t}=e;const[c,o]=Object(r.useState)(!1),a={setIsSuppressed:o,isSuppressed:c};return Object(r.createElement)(n.Provider,{value:a},t)}},,,function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(4),s=c.n(a);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:c=null,alt:r=""}=e;return c?Object(o.createElement)("img",{className:i(t),src:c,alt:r}):null},u=c(22);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(110);c(190),t.a=e=>{let{icons:t=[],align:c="center",className:r}=e;const a=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===a.length)return null;const i=s()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},r);return Object(o.createElement)("div",{className:i},a.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(o.createElement)(l,n()({key:"payment-method-icon-"+e.id},t))}))}},,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>"number"==typeof e},function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(2),l=c(228),u=c(36);class d extends s.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(a.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(a.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const r=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.a,{additionalNotices:r,context:u.c.PAYMENTS})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(10),s=c(120);c(259);const i=e=>{let{className:t="",id:c,selected:n,onChange:l,options:u=[]}=e;const d=Object(a.useInstanceId)(i),p=c||d;return u.length?Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},u.map(e=>Object(r.createElement)(s.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===n,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=i},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return U})),c.d(t,"a",(function(){return F}));var r=c(0),n=c(34),o=c(9);let a,s;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(a||(a={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(s||(s={}));const i={currentStatus:a.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:a,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:n="",paymentMethods:o={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case a.PRISTINE:return{...i,...e,errorMessage:"",currentStatus:a.PRISTINE};case a.STARTED:return{...e,currentStatus:a.STARTED};case a.ERROR:return e.currentStatus!==a.ERROR?{...e,currentStatus:a.ERROR,errorMessage:n||e.errorMessage}:e;case a.FAILED:return e.currentStatus!==a.FAILED?{...e,currentStatus:a.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:n||e.errorMessage}:e;case a.SUCCESS:return e.currentStatus!==a.SUCCESS?{...e,currentStatus:a.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case a.PROCESSING:return e.currentStatus!==a.PROCESSING?{...e,currentStatus:a.PROCESSING,errorMessage:""}:e;case a.COMPLETE:return e.currentStatus!==a.COMPLETE?{...e,currentStatus:a.COMPLETE}:e;case s.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:o};case s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:o};case s.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case s.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:c||e.paymentMethodData}}},d=c(1),p=c(41),m=c(50),b=c(2),g=c(114),O=c(51),h=c.n(O),j=c(59),E=c(72),_=c(40),f=c(36),y=c(83);const k=(e,t,c,n)=>{const[a,s]=Object(r.useState)(!1),{isEditor:i}=Object(j.b)(),{selectedRates:l}=Object(y.a)(),{billingAddress:u,shippingAddress:p}=Object(E.b)(),O=Object(m.a)(l),f=Object(m.a)(c),k=Object(_.a)(),{cartTotals:v,cartIsLoading:w,cartNeedsShipping:S,paymentRequirements:C}=k,N=Object(r.useRef)({cart:k,cartTotals:v,cartNeedsShipping:S,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:O,paymentRequirements:C}),{createErrorNotice:I}=Object(o.useDispatch)("core/notices");Object(r.useEffect)(()=>{N.current={cart:k,cartTotals:v,cartNeedsShipping:S,get billingData(){return h()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:O,paymentRequirements:C}},[k,v,S,u,p,O,C]);const M=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e<f.length;e++){const c=f[e],o=t[c];if(o)try{const e=!!i||await Promise.resolve(o.canMakePayment(N.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);r(o)}}catch(e){if(b.CURRENT_USER_IS_ADMIN||i){const t=Object(d.sprintf)(
6
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
7
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),o.paymentMethodId);I(`${t} ${e}`,{context:n,id:`wc-${o.paymentMethodId}-registration-error`})}}}e(c),s(!0)},[I,e,i,n,f,t]),x=Object(g.a)(M,500,{leading:!0});return Object(r.useEffect)(()=>{w||x()},[x,k,O,u,w]),a},v=e=>({type:e}),w=e=>({type:a.ERROR,errorMessage:e}),S=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:a.FAILED,errorMessage:t,paymentMethodData:c}},C=e=>{let{paymentMethodData:t}=e;return{type:a.SUCCESS,paymentMethodData:t}},N=e=>({type:s.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),I=e=>({type:s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),M=e=>({type:s.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),x=(e,t)=>({type:s.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var R=c(91),P=c(54),T=c(98),A=c(236);var D=c(237),L=c(104);const B=Object(r.createContext)(l),U=()=>Object(r.useContext)(B),F=e=>{let{children:t}=e;const{isProcessing:c,isIdle:s,isCalculating:l,hasError:d}=Object(P.b)(),{isEditor:m,getPreviewData:g}=Object(j.b)(),{setValidationErrors:O}=Object(L.b)(),{createErrorNotice:h,removeNotice:E}=Object(o.useDispatch)("core/notices"),{isSuccessResponse:_,isErrorResponse:y,isFailResponse:U,noticeContexts:F}=Object(f.d)(),[V,z]=Object(r.useReducer)(T.b,{}),{onPaymentProcessing:Y}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(z),G=Object(r.useRef)(V);Object(r.useEffect)(()=>{G.current=V},[V]);const[q,H]=Object(r.useReducer)(u,i),{dispatchActions:$,setPaymentStatus:W}=(e=>{const{setBillingAddress:t,setShippingAddress:c}=Object(R.a)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(N(t))},setRegisteredExpressPaymentMethods:t=>{e(I(t))},setShouldSavePayment:t=>{e(M(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(x(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(v(a.PRISTINE)),started:()=>e(v(a.STARTED)),processing:()=>e(v(a.PROCESSING)),completed:()=>e(v(a.COMPLETE)),error:t=>e(w(t)),failed:function(c,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),e(S({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),void 0!==typeof o&&null!=o&&o.address&&c(o.address),e(C({paymentMethodData:r}))}}),[e,t,c])}})(H),Q=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:c}=Object(f.d)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return k(e,t,Array.from(r),c.PAYMENTS)})($.setRegisteredPaymentMethods),J=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:c}=Object(f.d)();return k(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})($.setRegisteredExpressPaymentMethods),K=Object(r.useMemo)(()=>m?g("previewSavedPaymentMethods"):Q?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const n=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});n.length&&(r[c]=n)}),r}(q.paymentMethods):{},[m,g,Q,q.paymentMethods]),Z=Object(r.useCallback)(e=>{e?h(e,{id:"wc-express-payment-error",context:F.EXPRESS_PAYMENTS}):E("wc-express-payment-error",F.EXPRESS_PAYMENTS)},[h,F.EXPRESS_PAYMENTS,E]),X=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),ee=Object(r.useMemo)(()=>({isPristine:q.currentStatus===a.PRISTINE,isStarted:q.currentStatus===a.STARTED,isProcessing:q.currentStatus===a.PROCESSING,isFinished:[a.ERROR,a.FAILED,a.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===a.ERROR,hasFailed:q.currentStatus===a.FAILED,isSuccessful:q.currentStatus===a.SUCCESS,isDoingExpressPayment:q.currentStatus!==a.PRISTINE&&X}),[q.currentStatus,X]);Object(r.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!Q||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;W().pristine();const c=Object.keys(K).flatMap(e=>K[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,r=`wc-${t}-payment-token`;$.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e,isSavedToken:!0})}else $.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[Q,q.paymentMethods,q.expressPaymentMethods,$,W,q.activePaymentMethod,K]),Object(r.useEffect)(()=>{!c||d||l||ee.isFinished||W().processing()},[c,d,l,ee.isFinished,W]),Object(r.useEffect)(()=>{s&&!ee.isSuccessful&&W().pristine()},[s,ee.isSuccessful,W]),Object(r.useEffect)(()=>{d&&ee.isSuccessful&&W().pristine()},[d,ee.isSuccessful,W]),Object(r.useEffect)(()=>{ee.isProcessing&&(E("wc-payment-error",F.PAYMENTS),Object(D.b)(G.current,"payment_processing",{}).then(e=>{let t,c;var r,n,o,a,s,i;if(e.forEach(e=>{_(e)&&(t=e),(y(e)||U(e))&&(c=e)}),t&&!c)W().success(null===(r=t)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.meta)||void 0===a?void 0:a.billingAddress,null===(s=t)||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.shippingData);else if(c&&U(c)){var l,u,d,p,m,b;c.message&&c.message.length&&h(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=c)||void 0===b?void 0:b.messageContext)||F.PAYMENTS}),W().failed(null===(l=c)||void 0===l?void 0:l.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(m=p.meta)||void 0===m?void 0:m.billingAddress)}else if(c){var g,j;c.message&&c.message.length&&h(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(j=c)||void 0===j?void 0:j.messageContext)||F.PAYMENTS}),W().error(c.message),O(null===(g=c)||void 0===g?void 0:g.validationErrors)}else W().success()}))},[ee.isProcessing,O,W,E,F.PAYMENTS,_,U,y,h]);const te="object"==typeof q.paymentMethodData&&Object(n.b)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",ce={setPaymentStatus:W,currentStatus:ee,paymentStatuses:a,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:$.setActivePaymentMethod,onPaymentProcessing:Y,customerPaymentMethods:K,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:Q,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:X,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:$.setShouldSavePayment};return Object(r.createElement)(B.Provider,{value:ce},t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(50),n=c(162);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(n.b)(),s=Object(r.a)(t),i=Object(r.a)(c);return{paymentMethods:e?i:s,isInitialized:e?a:o}},a=()=>o(!1),s=()=>o(!0)},,,,function(e,t){},,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(274),a=c(171),s=c(59),i=c(162),l=c(51),u=c.n(l),d=c(158);t.a=()=>{const{isEditor:e}=Object(s.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:l,paymentMethodData:p,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:g}=Object(a.a)(),O=Object(r.useRef)(l),h=Object(r.useRef)(p),j=Object(r.useCallback)(e=>()=>{O.current=l,h.current=p,m().started(),t(e)},[l,p,t,m]),E=Object(r.useCallback)(()=>{m().pristine(),t(O.current,h.current)},[t,m]),_=Object(r.useCallback)(e=>{m().error(e),c(e),t(O.current,h.current)},[t,m,c]),f=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?_(e):c("")}),[c,_]),y=Object.entries(g),k=y.length>0?y.map(t=>{let[c,n]=t;const o=e?n.edit:n.content;return Object(r.isValidElement)(o)?Object(r.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(r.cloneElement)(o,{...b,onClick:j(c),onClose:E,onError:_,setExpressPaymentError:f})):null}):Object(r.createElement)("li",{key:"noneRegistered"},Object(n.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(r.createElement)(d.a,{isEditor:e},Object(r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(1),n=c(9),o=c(18),a=c(14),s=c(40),i=c(104);const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(s.a)(),{createErrorNotice:l}=Object(n.useDispatch)("core/notices"),{createNotice:u}=Object(n.useDispatch)("core/notices"),{setValidationErrors:d}=Object(i.b)(),p=Object(n.useSelect)((t,c)=>{let{dispatch:n}=c;const s=t(o.CART_STORE_KEY),i=s.isApplyingCoupon(),p=s.isRemovingCoupon(),{applyCoupon:m,removeCoupon:b,receiveApplyingCoupon:g}=n(o.CART_STORE_KEY);return{applyCoupon:t=>{m(t).then(c=>{!0===c&&u("info",Object(r.sprintf)(
8
  /* translators: %s coupon code. */
build/checkout-blocks/payment-frontend.js CHANGED
@@ -2,7 +2,7 @@
2
  /* translators: %s coupon code. */
3
  Object(n.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form",type:"snackbar",context:e})}).catch(e=>{p({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),h("")})},removeCoupon:t=>{u(t).then(c=>{!0===c&&d("info",Object(n.sprintf)(
4
  /* translators: %s coupon code. */
5
- Object(n.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form",type:"snackbar",context:e})}).catch(t=>{i(t.message,{id:"coupon-form",context:e}),h("")})},isApplyingCoupon:l,isRemovingCoupon:m}},[i,d]);return{appliedCoupons:t,isLoading:c,...m}}},271:function(e,t){},272:function(e,t){},273:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0),o=c(198);c(261);const a=e=>{let{errorMessage:t="",propertyName:c="",elementId:a=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:r(a)},t))}},274:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return r}));var n=c(32),o=c(205);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:s}=Object(o.b)(),r=Object(n.a)(t),l=Object(n.a)(c);return{paymentMethods:e?l:r,isInitialized:e?s:a}},s=()=>a(!1),r=()=>a(!0)},275:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:o=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:o}}}},277:function(e,t,c){"use strict";var n=c(12),o=c.n(n),a=c(0),s=c(5),r=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:n=""}=e;return c?Object(a.createElement)("img",{className:l(t),src:c,alt:n}):null},d=c(46);const p=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var m=c(52);c(271),t.a=e=>{let{icons:t=[],align:c="center",className:n}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(m.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=r()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},n);return Object(a.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,p.find(e=>e.id===c)||{})};var c;return Object(a.createElement)(i,o()({key:"payment-method-icon-"+e.id},t))}))}},287:function(e,t){},288:function(e,t,c){"use strict";var n=c(19),o=c.n(n),a=c(0),s=c(1),r=c(3),l=c(2),i=c(124),d=c(31);class p extends r.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const n=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(a.createElement)(i.a,{additionalNotices:n,context:d.c.PAYMENTS})}return this.props.children}}p.defaultProps={isEditor:!1},t.a=p},289:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(11),r=c(267);c(290);const l=e=>{let{className:t="",id:c,selected:o,onChange:i=(()=>{}),options:d=[]}=e;const p=Object(s.useInstanceId)(l),m=c||p;return d.length?Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},d.map(e=>Object(n.createElement)(r.a,{key:`${m}-${e.value}`,name:"radio-control-"+m,checked:e.value===o,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},290:function(e,t){},295:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(265);c(272);const r=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:l,children:i,disabled:d=!1,showStepNumber:p=!0,stepHeadingContent:m=(()=>{})}=e;const b=s||o?"fieldset":"div";return Object(n.createElement)(b,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p,"wc-block-components-checkout-step--disabled":d}),id:t,disabled:d},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(r,{title:o,stepHeadingContent:m()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},330:function(e,t,c){"use strict";var n=c(7),o=c(0),a=c(5),s=c.n(a),r=c(11),l=c(37);t.a=function({icon:e,children:t,label:c,instructions:a,className:i,notices:d,preview:p,isColumnLayout:m,...b}){const[u,{width:h}]=Object(r.useResizeObserver)();let g;"number"==typeof h&&(g={"is-large":h>=480,"is-medium":h>=160&&h<480,"is-small":h<160});const O=s()("components-placeholder",i,g),j=s()("components-placeholder__fieldset",{"is-column-layout":m});return Object(o.createElement)("div",Object(n.a)({},b,{className:O}),u,d,p&&Object(o.createElement)("div",{className:"components-placeholder__preview"},p),Object(o.createElement)("div",{className:"components-placeholder__label"},Object(o.createElement)(l.a,{icon:e}),c),!!a&&Object(o.createElement)("div",{className:"components-placeholder__instructions"},a),Object(o.createElement)("div",{className:j},t))}},335:function(e,t,c){"use strict";var n=c(0),o=c(14);const a=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));t.a=a},340:function(e,t,c){"use strict";c.d(t,"a",(function(){return T}));var n=c(1),o=c(41),a=c(0),s=c(5),r=c.n(s),l=c(14),i=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(a.createElement)("path",{d:"M0 0h24v24H0z"}),Object(a.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(a.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),d=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(l.Path,{fillRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z",clipRule:"evenodd"})),p=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(l.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})),m=c(335),b=c(104),u=c(52),h=c(20);c(287);const g={bank:d,bill:p,card:m.a,checkPayment:i};var O=e=>{let{icon:t="",text:c=""}=e;const n=!!t,o=Object(a.useCallback)(e=>n&&Object(u.a)(e)&&Object(h.b)(g,e),[n]),s=r()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":n});return Object(a.createElement)("span",{className:s},o(t)?Object(a.createElement)(b.a,{icon:g[t]}):t,c)},j=c(277),v=c(2),y=c(23),k=c.n(y),_=c(138),w=c(273),E=c(33),f=c(270),S=c(31),N=c(35),C=c(205),P=c(67),M=c(49);const x=(e,t)=>{const c=[],o=(t,c)=>{const n=c+"_tax",o=Object(h.b)(e,c)&&Object(u.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(h.b)(e,n)&&Object(u.a)(e[n])?parseInt(e[n],10):0)}};return c.push(o(Object(n.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(n.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(n.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(n.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(n.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c};var R=c(64);const T=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:d,onSubmit:p,customerId:m}=Object(N.b)(),{currentStatus:b,activePaymentMethod:u,onPaymentProcessing:h,setExpressPaymentError:g,shouldSavePayment:y}=Object(C.b)(),{shippingErrorStatus:T,shippingErrorTypes:I,onShippingRateSuccess:A,onShippingRateFail:z,onShippingRateSelectSuccess:L,onShippingRateSelectFail:$}=Object(P.b)(),{shippingRates:D,isLoadingRates:V,selectedRates:F,isSelectingRate:B,selectShippingRate:H,needsShipping:W}=Object(R.a)(),{billingAddress:Y,shippingAddress:G,setShippingAddress:U}=Object(M.b)(),{cartItems:J,cartFees:K,cartTotals:q,extensions:Q}=Object(E.a)(),{appliedCoupons:X}=Object(f.a)(),{noticeContexts:Z,responseTypes:ee}=Object(S.d)(),te=Object(a.useRef)(x(q,W)),ce=Object(a.useRef)({label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)});Object(a.useEffect)(()=>{te.current=x(q,W),ce.current={label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)}},[q,W]);const ne=Object(a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";k()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),g(e)}),[g]);return{activePaymentMethod:u,billing:{appliedCoupons:X,billingAddress:Y,billingData:Y,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(o.getCurrencyFromPriceResponse)(q),customerId:m,displayPricesIncludingTax:Object(v.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:J,cartFees:K,extensions:Q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:_.a,PaymentMethodIcons:j.a,PaymentMethodLabel:O,ValidationInputError:w.a},emitResponse:{noticeContexts:Z,responseTypes:ee},eventRegistration:{onCheckoutAfterProcessingWithError:d,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:h,onShippingRateFail:z,onShippingRateSelectFail:$,onShippingRateSelectSuccess:L,onShippingRateSuccess:A},onSubmit:p,paymentStatus:b,setExpressPaymentError:ne,shippingData:{isSelectingRate:B,needsShipping:W,selectedRates:F,setSelectedRates:H,setShippingAddress:U,shippingAddress:G,shippingRates:D,shippingRatesLoading:V},shippingStatus:{shippingErrorStatus:T,shippingErrorTypes:I},shouldSavePayment:y}}},389:function(e,t){},433:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(5),a=c.n(o),s=c(33),r=c(31),l=c(120),i=c(295),d=c(35),p=c(274),m=c(1),b=c(25),u=c(205),h=c(330),g=c(43),O=c(77),j=c(104),v=c(335),y=c(2),k=c(29);c(389);const _=()=>Object(n.createElement)(h.a,{icon:Object(n.createElement)(j.a,{icon:v.a}),label:Object(m.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(n.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(m.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method it will be shown here.","woo-gutenberg-products-block")),Object(n.createElement)(g.a,{isSecondary:!0,href:y.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(m.__)("Configure Payment Methods","woo-gutenberg-products-block"))),w=()=>Object(n.createElement)(O.a,{isDismissible:!1,className:a()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(m.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var E=()=>{const{isEditor:e}=Object(k.a)();return e?Object(n.createElement)(_,null):Object(n.createElement)(w,null)},f=c(340),S=c(58),N=c(11),C=c(267),P=Object(N.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:s,onChange:r,options:l=[]}=e;const i=o||c;return l.length&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===s;return Object(n.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(n.createElement)(C.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{r(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),M=c(8),x=c(10),R=c(288),T=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:o}=Object(k.a)(),{shouldSavePayment:a,setShouldSavePayment:s}=Object(u.b)(),{customerId:r}=Object(d.b)();return Object(n.createElement)(R.a,{isEditor:o},t,r>0&&c&&Object(n.createElement)(x.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(m.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:()=>s(!a)}))},I=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,isExpressPaymentMethodActive:c,customerPaymentMethods:o}=Object(u.b)(),{paymentMethods:s}=Object(p.b)(),{activePaymentMethod:l,...i}=Object(f.a)(),{noticeContexts:d}=Object(r.d)(),{removeNotice:m}=Object(M.useDispatch)("core/notices"),{dispatchCheckoutEvent:b}=Object(S.a)(),{isEditor:h}=Object(k.a)(),g=Object.keys(s).map(e=>{const{edit:t,content:c,label:o,supports:a}=s[e],r=h?t:c;return{value:e,label:"string"==typeof o?o:Object(n.cloneElement)(o,{components:i.components}),name:"wc-saved-payment-method-token-"+e,content:Object(n.createElement)(T,{showSaveOption:a.showSaveOption},Object(n.cloneElement)(r,{activePaymentMethod:l,...i}))}}),O=Object(n.useCallback)(t=>{e(t),m("wc-payment-error",d.PAYMENTS),b("set-active-payment-method",{value:t})},[b,d.PAYMENTS,m,e]),j=0===Object.keys(o).length&&1===Object.keys(s).length,v=a()({"disable-radio-control":j});return c?null:Object(n.createElement)(P,{id:"wc-payment-method-options",className:v,selected:t?null:l,onChange:O,options:g})},A=c(289);const z=e=>{let{method:t,expires:c}=e;return Object(m.sprintf)(
6
  /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */
7
  Object(m.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),t.brand,t.last4,c)},L=e=>{let{method:t}=e;return t.brand&&t.last4?Object(m.sprintf)(
8
  /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */
2
  /* translators: %s coupon code. */
3
  Object(n.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form",type:"snackbar",context:e})}).catch(e=>{p({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),h("")})},removeCoupon:t=>{u(t).then(c=>{!0===c&&d("info",Object(n.sprintf)(
4
  /* translators: %s coupon code. */
5
+ Object(n.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),t),{id:"coupon-form",type:"snackbar",context:e})}).catch(t=>{i(t.message,{id:"coupon-form",context:e}),h("")})},isApplyingCoupon:l,isRemovingCoupon:m}},[i,d]);return{appliedCoupons:t,isLoading:c,...m}}},271:function(e,t){},272:function(e,t){},273:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0),o=c(198);c(261);const a=e=>{let{errorMessage:t="",propertyName:c="",elementId:a=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:r(a)},t))}},274:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return r}));var n=c(32),o=c(205);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:s}=Object(o.b)(),r=Object(n.a)(t),l=Object(n.a)(c);return{paymentMethods:e?l:r,isInitialized:e?s:a}},s=()=>a(!1),r=()=>a(!0)},275:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:o=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:o}}}},277:function(e,t,c){"use strict";var n=c(12),o=c.n(n),a=c(0),s=c(5),r=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:n=""}=e;return c?Object(a.createElement)("img",{className:l(t),src:c,alt:n}):null},d=c(46);const p=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var m=c(52);c(271),t.a=e=>{let{icons:t=[],align:c="center",className:n}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(m.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=r()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},n);return Object(a.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,p.find(e=>e.id===c)||{})};var c;return Object(a.createElement)(i,o()({key:"payment-method-icon-"+e.id},t))}))}},287:function(e,t){},288:function(e,t,c){"use strict";var n=c(19),o=c.n(n),a=c(0),s=c(1),r=c(3),l=c(2),i=c(124),d=c(31);class p extends r.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const n=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(a.createElement)(i.a,{additionalNotices:n,context:d.c.PAYMENTS})}return this.props.children}}p.defaultProps={isEditor:!1},t.a=p},289:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(11),r=c(267);c(290);const l=e=>{let{className:t="",id:c,selected:o,onChange:i,options:d=[]}=e;const p=Object(s.useInstanceId)(l),m=c||p;return d.length?Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},d.map(e=>Object(n.createElement)(r.a,{key:`${m}-${e.value}`,name:"radio-control-"+m,checked:e.value===o,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},290:function(e,t){},295:function(e,t,c){"use strict";var n=c(0),o=c(5),a=c.n(o),s=c(265);c(272);const r=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:l,children:i,disabled:d=!1,showStepNumber:p=!0,stepHeadingContent:m=(()=>{})}=e;const b=s||o?"fieldset":"div";return Object(n.createElement)(b,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p,"wc-block-components-checkout-step--disabled":d}),id:t,disabled:d},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(r,{title:o,stepHeadingContent:m()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},330:function(e,t,c){"use strict";var n=c(7),o=c(0),a=c(5),s=c.n(a),r=c(11),l=c(37);t.a=function({icon:e,children:t,label:c,instructions:a,className:i,notices:d,preview:p,isColumnLayout:m,...b}){const[u,{width:h}]=Object(r.useResizeObserver)();let g;"number"==typeof h&&(g={"is-large":h>=480,"is-medium":h>=160&&h<480,"is-small":h<160});const O=s()("components-placeholder",i,g),j=s()("components-placeholder__fieldset",{"is-column-layout":m});return Object(o.createElement)("div",Object(n.a)({},b,{className:O}),u,d,p&&Object(o.createElement)("div",{className:"components-placeholder__preview"},p),Object(o.createElement)("div",{className:"components-placeholder__label"},Object(o.createElement)(l.a,{icon:e}),c),!!a&&Object(o.createElement)("div",{className:"components-placeholder__instructions"},a),Object(o.createElement)("div",{className:j},t))}},335:function(e,t,c){"use strict";var n=c(0),o=c(14);const a=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));t.a=a},340:function(e,t,c){"use strict";c.d(t,"a",(function(){return T}));var n=c(1),o=c(41),a=c(0),s=c(5),r=c.n(s),l=c(14),i=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(a.createElement)("path",{d:"M0 0h24v24H0z"}),Object(a.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(a.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),d=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(l.Path,{fillRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z",clipRule:"evenodd"})),p=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(l.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})),m=c(335),b=c(104),u=c(52),h=c(20);c(287);const g={bank:d,bill:p,card:m.a,checkPayment:i};var O=e=>{let{icon:t="",text:c=""}=e;const n=!!t,o=Object(a.useCallback)(e=>n&&Object(u.a)(e)&&Object(h.b)(g,e),[n]),s=r()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":n});return Object(a.createElement)("span",{className:s},o(t)?Object(a.createElement)(b.a,{icon:g[t]}):t,c)},j=c(277),v=c(2),y=c(23),k=c.n(y),_=c(138),w=c(273),E=c(33),f=c(270),S=c(31),N=c(35),C=c(205),P=c(67),M=c(49);const x=(e,t)=>{const c=[],o=(t,c)=>{const n=c+"_tax",o=Object(h.b)(e,c)&&Object(u.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(h.b)(e,n)&&Object(u.a)(e[n])?parseInt(e[n],10):0)}};return c.push(o(Object(n.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(n.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(n.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(n.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(n.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c};var R=c(64);const T=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:d,onSubmit:p,customerId:m}=Object(N.b)(),{currentStatus:b,activePaymentMethod:u,onPaymentProcessing:h,setExpressPaymentError:g,shouldSavePayment:y}=Object(C.b)(),{shippingErrorStatus:T,shippingErrorTypes:I,onShippingRateSuccess:A,onShippingRateFail:z,onShippingRateSelectSuccess:L,onShippingRateSelectFail:$}=Object(P.b)(),{shippingRates:D,isLoadingRates:V,selectedRates:F,isSelectingRate:B,selectShippingRate:H,needsShipping:W}=Object(R.a)(),{billingAddress:Y,shippingAddress:G,setShippingAddress:U}=Object(M.b)(),{cartItems:J,cartFees:K,cartTotals:q,extensions:Q}=Object(E.a)(),{appliedCoupons:X}=Object(f.a)(),{noticeContexts:Z,responseTypes:ee}=Object(S.d)(),te=Object(a.useRef)(x(q,W)),ce=Object(a.useRef)({label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)});Object(a.useEffect)(()=>{te.current=x(q,W),ce.current={label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(q.total_price,10)}},[q,W]);const ne=Object(a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";k()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),g(e)}),[g]);return{activePaymentMethod:u,billing:{appliedCoupons:X,billingAddress:Y,billingData:Y,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(o.getCurrencyFromPriceResponse)(q),customerId:m,displayPricesIncludingTax:Object(v.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:J,cartFees:K,extensions:Q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:_.a,PaymentMethodIcons:j.a,PaymentMethodLabel:O,ValidationInputError:w.a},emitResponse:{noticeContexts:Z,responseTypes:ee},eventRegistration:{onCheckoutAfterProcessingWithError:d,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:h,onShippingRateFail:z,onShippingRateSelectFail:$,onShippingRateSelectSuccess:L,onShippingRateSuccess:A},onSubmit:p,paymentStatus:b,setExpressPaymentError:ne,shippingData:{isSelectingRate:B,needsShipping:W,selectedRates:F,setSelectedRates:H,setShippingAddress:U,shippingAddress:G,shippingRates:D,shippingRatesLoading:V},shippingStatus:{shippingErrorStatus:T,shippingErrorTypes:I},shouldSavePayment:y}}},389:function(e,t){},433:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(5),a=c.n(o),s=c(33),r=c(31),l=c(120),i=c(295),d=c(35),p=c(274),m=c(1),b=c(25),u=c(205),h=c(330),g=c(43),O=c(77),j=c(104),v=c(335),y=c(2),k=c(29);c(389);const _=()=>Object(n.createElement)(h.a,{icon:Object(n.createElement)(j.a,{icon:v.a}),label:Object(m.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(n.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(m.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method it will be shown here.","woo-gutenberg-products-block")),Object(n.createElement)(g.a,{isSecondary:!0,href:y.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(m.__)("Configure Payment Methods","woo-gutenberg-products-block"))),w=()=>Object(n.createElement)(O.a,{isDismissible:!1,className:a()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(m.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var E=()=>{const{isEditor:e}=Object(k.a)();return e?Object(n.createElement)(_,null):Object(n.createElement)(w,null)},f=c(340),S=c(58),N=c(11),C=c(267),P=Object(N.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:s,onChange:r,options:l=[]}=e;const i=o||c;return l.length&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===s;return Object(n.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(n.createElement)(C.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{r(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),M=c(8),x=c(10),R=c(288),T=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:o}=Object(k.a)(),{shouldSavePayment:a,setShouldSavePayment:s}=Object(u.b)(),{customerId:r}=Object(d.b)();return Object(n.createElement)(R.a,{isEditor:o},t,r>0&&c&&Object(n.createElement)(x.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(m.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:()=>s(!a)}))},I=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,isExpressPaymentMethodActive:c,customerPaymentMethods:o}=Object(u.b)(),{paymentMethods:s}=Object(p.b)(),{activePaymentMethod:l,...i}=Object(f.a)(),{noticeContexts:d}=Object(r.d)(),{removeNotice:m}=Object(M.useDispatch)("core/notices"),{dispatchCheckoutEvent:b}=Object(S.a)(),{isEditor:h}=Object(k.a)(),g=Object.keys(s).map(e=>{const{edit:t,content:c,label:o,supports:a}=s[e],r=h?t:c;return{value:e,label:"string"==typeof o?o:Object(n.cloneElement)(o,{components:i.components}),name:"wc-saved-payment-method-token-"+e,content:Object(n.createElement)(T,{showSaveOption:a.showSaveOption},Object(n.cloneElement)(r,{activePaymentMethod:l,...i}))}}),O=Object(n.useCallback)(t=>{e(t),m("wc-payment-error",d.PAYMENTS),b("set-active-payment-method",{value:t})},[b,d.PAYMENTS,m,e]),j=0===Object.keys(o).length&&1===Object.keys(s).length,v=a()({"disable-radio-control":j});return c?null:Object(n.createElement)(P,{id:"wc-payment-method-options",className:v,selected:t?null:l,onChange:O,options:g})},A=c(289);const z=e=>{let{method:t,expires:c}=e;return Object(m.sprintf)(
6
  /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */
7
  Object(m.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),t.brand,t.last4,c)},L=e=>{let{method:t}=e;return t.brand&&t.last4?Object(m.sprintf)(
8
  /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */
build/checkout-blocks/shipping-methods-frontend.js CHANGED
@@ -1,4 +1,4 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[45],{101:function(e,t,n){"use strict";var c=n(12),a=n.n(c),s=n(0),o=n(139),i=n(5),r=n.n(i);n(196);const l=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:i,displayType:p="text",...d}=e;const b="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(b))return null;const u=b/10**c.minorUnit;if(!Number.isFinite(u))return null;const m=r()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...l(c),value:void 0,currency:void 0,onValueChange:void 0},h=i?e=>{const t=+e.value*10**c.minorUnit;i(t)}:()=>{};return Object(s.createElement)(o.a,a()({className:m,displayType:p},g,{value:u,onValueChange:h}))}},136:function(e,t,n){"use strict";var c=n(0);n(195),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},138:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(5),o=n.n(s),i=(n(197),n(136));t.a=e=>{let{children:t,className:n,screenReaderLabel:s,showSpinner:r=!1,isLoading:l=!0}=e;return Object(c.createElement)("div",{className:o()(n,{"wc-block-components-loading-mask":l})},l&&r&&Object(c.createElement)(i.a,null),Object(c.createElement)("div",{className:o()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(c.createElement)("span",{className:"screen-reader-text"},s||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},195:function(e,t){},196:function(e,t){},197:function(e,t){},25:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a);t.a=e=>{let t,{label:n,screenReaderLabel:a,wrapperElement:o,wrapperProps:i={}}=e;const r=null!=n,l=null!=a;return!r&&l?(t=o||"span",i={...i,className:s()(i.className,"screen-reader-text")},Object(c.createElement)(t,i,a)):(t=o||c.Fragment,r&&l&&n!==a?Object(c.createElement)(t,i,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},a)):Object(c.createElement)(t,i,n))}},265:function(e,t,n){"use strict";var c=n(12),a=n.n(c),s=n(0),o=n(5),i=n.n(o);n(266),t.a=e=>{let{children:t,className:n,headingLevel:c,...o}=e;const r=i()("wc-block-components-title",n),l="h"+c;return Object(s.createElement)(l,a()({className:r},o),t)}},266:function(e,t){},267:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(268);t.a=e=>{let{checked:t,name:n,onChange:a,option:i}=e;const{value:r,label:l,description:p,secondaryLabel:d,secondaryDescription:b}=i;return Object(c.createElement)("label",{className:s()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${r}`},Object(c.createElement)("input",{id:`${n}-${r}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:r,onChange:e=>a(e.target.value),checked:t,"aria-describedby":s()({[`${n}-${r}__label`]:l,[`${n}-${r}__secondary-label`]:d,[`${n}-${r}__description`]:p,[`${n}-${r}__secondary-description`]:b})}),Object(c.createElement)(o.a,{id:`${n}-${r}`,label:l,secondaryLabel:d,description:p,secondaryDescription:b}))}},268:function(e,t,n){"use strict";var c=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:a,secondaryDescription:s,id:o}=e;return Object(c.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(c.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(c.createElement)("span",{id:o&&o+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(c.createElement)("span",{id:o&&o+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(c.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(c.createElement)("span",{id:o&&o+"__description",className:"wc-block-components-radio-control__description"},a),s&&Object(c.createElement)("span",{id:o&&o+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},s)))}},272:function(e,t){},275:function(e,t,n){"use strict";var c=n(1);t.a=e=>{let{defaultTitle:t=Object(c.__)("Step","woo-gutenberg-products-block"),defaultDescription:n=Object(c.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:n},showStepNumber:{type:"boolean",default:a}}}},289:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(11),i=n(267);n(290);const r=e=>{let{className:t="",id:n,selected:a,onChange:l=(()=>{}),options:p=[]}=e;const d=Object(o.useInstanceId)(r),b=n||d;return p.length?Object(c.createElement)("div",{className:s()("wc-block-components-radio-control",t)},p.map(e=>Object(c.createElement)(i.a,{key:`${b}-${e.value}`,name:"radio-control-"+b,checked:e.value===a,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=r},290:function(e,t){},295:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(265);n(272);const i=e=>{let{title:t,stepHeadingContent:n}=e;return Object(c.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(c.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&Object(c.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))};t.a=e=>{let{id:t,className:n,title:a,legend:o,description:r,children:l,disabled:p=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const u=o||a?"fieldset":"div";return Object(c.createElement)(u,{className:s()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":p}),id:t,disabled:p},!(!o&&!a)&&Object(c.createElement)("legend",{className:"screen-reader-text"},o||a),!!a&&Object(c.createElement)(i,{title:a,stepHeadingContent:b()}),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!r&&Object(c.createElement)("p",{className:"wc-block-components-checkout-step__description"},r),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__content"},l)))}},315:function(e,t){},330:function(e,t,n){"use strict";var c=n(7),a=n(0),s=n(5),o=n.n(s),i=n(11),r=n(37);t.a=function({icon:e,children:t,label:n,instructions:s,className:l,notices:p,preview:d,isColumnLayout:b,...u}){const[m,{width:g}]=Object(i.useResizeObserver)();let h;"number"==typeof g&&(h={"is-large":g>=480,"is-medium":g>=160&&g<480,"is-small":g<160});const O=o()("components-placeholder",l,h),j=o()("components-placeholder__fieldset",{"is-column-layout":b});return Object(a.createElement)("div",Object(c.a)({},u,{className:O}),m,p,d&&Object(a.createElement)("div",{className:"components-placeholder__preview"},d),Object(a.createElement)("div",{className:"components-placeholder__label"},Object(a.createElement)(r.a,{icon:e}),n),!!s&&Object(a.createElement)("div",{className:"components-placeholder__instructions"},s),Object(a.createElement)("div",{className:j},t))}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(2),a=n(0),s=n(35),o=n(66),i=n(64);const r=()=>{const{needsShipping:e}=Object(i.a)(),{useShippingAsBilling:t,setUseShippingAsBilling:n}=Object(s.b)(),{billingAddress:r,setBillingAddress:l,shippingAddress:p,setShippingAddress:d}=Object(o.a)(),b=Object(a.useCallback)(e=>{l({email:e})},[l]),u=Object(a.useCallback)(e=>{l({phone:e})},[l]),m=Object(a.useCallback)(e=>{d({phone:e})},[d]);return{shippingAddress:p,billingAddress:r,setShippingAddress:d,setBillingAddress:l,setEmail:b,setBillingPhone:u,setShippingPhone:m,defaultAddressFields:c.defaultAddressFields,useShippingAsBilling:t,setUseShippingAsBilling:n,showShippingFields:e,showBillingFields:!e||!t}}},343:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(21),o=n(138),i=n(10),r=n(385),l=n(33),p=n(29),d=n(5),b=n.n(d),u=n(18),m=n(25),g=n(68),h=n(289),O=n(268),j=n(41),_=n(101),k=n(2);const w=e=>{const t=Object(k.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(u.decodeEntities)(e.name),value:e.rate_id,description:Object(c.createElement)(c.Fragment,null,Number.isFinite(t)&&Object(c.createElement)(_.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(u.decodeEntities)(e.delivery_time))}};var E=e=>{let{className:t="",noResultsMessage:n,onSelectRate:a,rates:s,renderOption:o=w,selectedRate:i}=e;const r=(null==i?void 0:i.rate_id)||"",[l,p]=Object(c.useState)(r);if(Object(c.useEffect)(()=>{r&&p(r)},[r]),0===s.length)return n;if(s.length>1)return Object(c.createElement)(h.a,{className:t,onChange:e=>{p(e),a(e)},selected:l,options:s.map(o)});const{label:d,secondaryLabel:b,description:u,secondaryDescription:m}=o(s[0]);return Object(c.createElement)(O.a,{label:d,secondaryLabel:b,description:u,secondaryDescription:m})};n(315);var f=e=>{let{packageId:t,className:n="",noResultsMessage:s,renderOption:o,packageData:r,collapsible:l=!1,collapse:p=!1,showItems:d=!1}=e;const{selectShippingRate:h}=Object(g.a)(),O=Object(c.createElement)(c.Fragment,null,(d||l)&&Object(c.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},r.name),d&&Object(c.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(r.items).map(e=>{const t=Object(u.decodeEntities)(e.name),n=e.quantity;return Object(c.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(c.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(a.sprintf)(
2
  /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
3
  Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),j=Object(c.createElement)(E,{className:n,noResultsMessage:s,rates:r.shipping_rates,onSelectRate:e=>h(e,t),selectedRate:r.shipping_rates.find(e=>e.selected),renderOption:o});return l?Object(c.createElement)(i.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:O},j):Object(c.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},O,j)};const v=e=>{let{packages:t,collapse:n,showItems:a,collapsible:s,noResultsMessage:o,renderOption:i}=e;return t.length?Object(c.createElement)(c.Fragment,null,t.map(e=>{let{package_id:t,...r}=e;return Object(c.createElement)(f,{key:t,packageId:t,packageData:r,collapsible:s,collapse:n,showItems:a,noResultsMessage:o,renderOption:i})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:n,className:d,collapsible:b=!1,noResultsMessage:u,renderOption:m,context:g}=e;Object(c.useEffect)(()=>{if(n)return;const e=Object(r.a)(t),c=Object(r.b)(t);1===e?Object(s.speak)(Object(a.sprintf)(
4
  /* translators: %d number of shipping options found. */
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[45],{101:function(e,t,n){"use strict";var c=n(12),a=n.n(c),s=n(0),o=n(139),i=n(5),r=n.n(i);n(196);const l=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:i,displayType:p="text",...d}=e;const b="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(b))return null;const u=b/10**c.minorUnit;if(!Number.isFinite(u))return null;const m=r()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...l(c),value:void 0,currency:void 0,onValueChange:void 0},h=i?e=>{const t=+e.value*10**c.minorUnit;i(t)}:()=>{};return Object(s.createElement)(o.a,a()({className:m,displayType:p},g,{value:u,onValueChange:h}))}},136:function(e,t,n){"use strict";var c=n(0);n(195),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},138:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(5),o=n.n(s),i=(n(197),n(136));t.a=e=>{let{children:t,className:n,screenReaderLabel:s,showSpinner:r=!1,isLoading:l=!0}=e;return Object(c.createElement)("div",{className:o()(n,{"wc-block-components-loading-mask":l})},l&&r&&Object(c.createElement)(i.a,null),Object(c.createElement)("div",{className:o()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(c.createElement)("span",{className:"screen-reader-text"},s||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},195:function(e,t){},196:function(e,t){},197:function(e,t){},25:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a);t.a=e=>{let t,{label:n,screenReaderLabel:a,wrapperElement:o,wrapperProps:i={}}=e;const r=null!=n,l=null!=a;return!r&&l?(t=o||"span",i={...i,className:s()(i.className,"screen-reader-text")},Object(c.createElement)(t,i,a)):(t=o||c.Fragment,r&&l&&n!==a?Object(c.createElement)(t,i,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},a)):Object(c.createElement)(t,i,n))}},265:function(e,t,n){"use strict";var c=n(12),a=n.n(c),s=n(0),o=n(5),i=n.n(o);n(266),t.a=e=>{let{children:t,className:n,headingLevel:c,...o}=e;const r=i()("wc-block-components-title",n),l="h"+c;return Object(s.createElement)(l,a()({className:r},o),t)}},266:function(e,t){},267:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(268);t.a=e=>{let{checked:t,name:n,onChange:a,option:i}=e;const{value:r,label:l,description:p,secondaryLabel:d,secondaryDescription:b}=i;return Object(c.createElement)("label",{className:s()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${r}`},Object(c.createElement)("input",{id:`${n}-${r}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:r,onChange:e=>a(e.target.value),checked:t,"aria-describedby":s()({[`${n}-${r}__label`]:l,[`${n}-${r}__secondary-label`]:d,[`${n}-${r}__description`]:p,[`${n}-${r}__secondary-description`]:b})}),Object(c.createElement)(o.a,{id:`${n}-${r}`,label:l,secondaryLabel:d,description:p,secondaryDescription:b}))}},268:function(e,t,n){"use strict";var c=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:a,secondaryDescription:s,id:o}=e;return Object(c.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(c.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(c.createElement)("span",{id:o&&o+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(c.createElement)("span",{id:o&&o+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(c.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(c.createElement)("span",{id:o&&o+"__description",className:"wc-block-components-radio-control__description"},a),s&&Object(c.createElement)("span",{id:o&&o+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},s)))}},272:function(e,t){},275:function(e,t,n){"use strict";var c=n(1);t.a=e=>{let{defaultTitle:t=Object(c.__)("Step","woo-gutenberg-products-block"),defaultDescription:n=Object(c.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:n},showStepNumber:{type:"boolean",default:a}}}},289:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(11),i=n(267);n(290);const r=e=>{let{className:t="",id:n,selected:a,onChange:l,options:p=[]}=e;const d=Object(o.useInstanceId)(r),b=n||d;return p.length?Object(c.createElement)("div",{className:s()("wc-block-components-radio-control",t)},p.map(e=>Object(c.createElement)(i.a,{key:`${b}-${e.value}`,name:"radio-control-"+b,checked:e.value===a,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=r},290:function(e,t){},295:function(e,t,n){"use strict";var c=n(0),a=n(5),s=n.n(a),o=n(265);n(272);const i=e=>{let{title:t,stepHeadingContent:n}=e;return Object(c.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(c.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&Object(c.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))};t.a=e=>{let{id:t,className:n,title:a,legend:o,description:r,children:l,disabled:p=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const u=o||a?"fieldset":"div";return Object(c.createElement)(u,{className:s()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":p}),id:t,disabled:p},!(!o&&!a)&&Object(c.createElement)("legend",{className:"screen-reader-text"},o||a),!!a&&Object(c.createElement)(i,{title:a,stepHeadingContent:b()}),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!r&&Object(c.createElement)("p",{className:"wc-block-components-checkout-step__description"},r),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__content"},l)))}},315:function(e,t){},330:function(e,t,n){"use strict";var c=n(7),a=n(0),s=n(5),o=n.n(s),i=n(11),r=n(37);t.a=function({icon:e,children:t,label:n,instructions:s,className:l,notices:p,preview:d,isColumnLayout:b,...u}){const[m,{width:g}]=Object(i.useResizeObserver)();let h;"number"==typeof g&&(h={"is-large":g>=480,"is-medium":g>=160&&g<480,"is-small":g<160});const O=o()("components-placeholder",l,h),j=o()("components-placeholder__fieldset",{"is-column-layout":b});return Object(a.createElement)("div",Object(c.a)({},u,{className:O}),m,p,d&&Object(a.createElement)("div",{className:"components-placeholder__preview"},d),Object(a.createElement)("div",{className:"components-placeholder__label"},Object(a.createElement)(r.a,{icon:e}),n),!!s&&Object(a.createElement)("div",{className:"components-placeholder__instructions"},s),Object(a.createElement)("div",{className:j},t))}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(2),a=n(0),s=n(35),o=n(66),i=n(64);const r=()=>{const{needsShipping:e}=Object(i.a)(),{useShippingAsBilling:t,setUseShippingAsBilling:n}=Object(s.b)(),{billingAddress:r,setBillingAddress:l,shippingAddress:p,setShippingAddress:d}=Object(o.a)(),b=Object(a.useCallback)(e=>{l({email:e})},[l]),u=Object(a.useCallback)(e=>{l({phone:e})},[l]),m=Object(a.useCallback)(e=>{d({phone:e})},[d]);return{shippingAddress:p,billingAddress:r,setShippingAddress:d,setBillingAddress:l,setEmail:b,setBillingPhone:u,setShippingPhone:m,defaultAddressFields:c.defaultAddressFields,useShippingAsBilling:t,setUseShippingAsBilling:n,showShippingFields:e,showBillingFields:!e||!t}}},343:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(21),o=n(138),i=n(10),r=n(385),l=n(33),p=n(29),d=n(5),b=n.n(d),u=n(18),m=n(25),g=n(68),h=n(289),O=n(268),j=n(41),_=n(101),k=n(2);const w=e=>{const t=Object(k.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(u.decodeEntities)(e.name),value:e.rate_id,description:Object(c.createElement)(c.Fragment,null,Number.isFinite(t)&&Object(c.createElement)(_.a,{currency:Object(j.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(u.decodeEntities)(e.delivery_time))}};var E=e=>{let{className:t="",noResultsMessage:n,onSelectRate:a,rates:s,renderOption:o=w,selectedRate:i}=e;const r=(null==i?void 0:i.rate_id)||"",[l,p]=Object(c.useState)(r);if(Object(c.useEffect)(()=>{r&&p(r)},[r]),0===s.length)return n;if(s.length>1)return Object(c.createElement)(h.a,{className:t,onChange:e=>{p(e),a(e)},selected:l,options:s.map(o)});const{label:d,secondaryLabel:b,description:u,secondaryDescription:m}=o(s[0]);return Object(c.createElement)(O.a,{label:d,secondaryLabel:b,description:u,secondaryDescription:m})};n(315);var f=e=>{let{packageId:t,className:n="",noResultsMessage:s,renderOption:o,packageData:r,collapsible:l=!1,collapse:p=!1,showItems:d=!1}=e;const{selectShippingRate:h}=Object(g.a)(),O=Object(c.createElement)(c.Fragment,null,(d||l)&&Object(c.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},r.name),d&&Object(c.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(r.items).map(e=>{const t=Object(u.decodeEntities)(e.name),n=e.quantity;return Object(c.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(c.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(a.sprintf)(
2
  /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
3
  Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),j=Object(c.createElement)(E,{className:n,noResultsMessage:s,rates:r.shipping_rates,onSelectRate:e=>h(e,t),selectedRate:r.shipping_rates.find(e=>e.selected),renderOption:o});return l?Object(c.createElement)(i.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:O},j):Object(c.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},O,j)};const v=e=>{let{packages:t,collapse:n,showItems:a,collapsible:s,noResultsMessage:o,renderOption:i}=e;return t.length?Object(c.createElement)(c.Fragment,null,t.map(e=>{let{package_id:t,...r}=e;return Object(c.createElement)(f,{key:t,packageId:t,packageData:r,collapsible:s,collapse:n,showItems:a,noResultsMessage:o,renderOption:i})})):null};t.a=e=>{let{shippingRates:t,isLoadingRates:n,className:d,collapsible:b=!1,noResultsMessage:u,renderOption:m,context:g}=e;Object(c.useEffect)(()=>{if(n)return;const e=Object(r.a)(t),c=Object(r.b)(t);1===e?Object(s.speak)(Object(a.sprintf)(
4
  /* translators: %d number of shipping options found. */
build/checkout-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '0f19b1bc0413996bcc0d18b03172420a');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '201b8f8e0bfe9a09df51a5dc4e231e1d');
build/checkout-frontend.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(e){function t(t){for(var r,o,s=t[0],c=t[1],a=0,l=[];a<s.length;a++)o=s[a],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(i&&i(t);l.length;)l.shift()()}var r={},n={28:0,7:0,73:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var s=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=s);var c,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",1:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6",2:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--5b8feb0b",3:"vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542",5:"cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping",6:"checkout-blocks/billing-address--checkout-blocks/shipping-address",29:"checkout-blocks/actions",30:"checkout-blocks/billing-address",31:"checkout-blocks/contact-information",32:"checkout-blocks/express-payment",33:"checkout-blocks/fields",34:"checkout-blocks/order-note",35:"checkout-blocks/order-summary",36:"checkout-blocks/order-summary-cart-items",37:"checkout-blocks/order-summary-coupon-form",38:"checkout-blocks/order-summary-discount",39:"checkout-blocks/order-summary-fee",40:"checkout-blocks/order-summary-shipping",41:"checkout-blocks/order-summary-subtotal",42:"checkout-blocks/order-summary-taxes",43:"checkout-blocks/payment",44:"checkout-blocks/shipping-address",45:"checkout-blocks/shipping-methods",46:"checkout-blocks/terms",47:"checkout-blocks/totals"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",1:"cc9016fd3805a088b2e8",2:"2448287d629e9e796e22",3:"80c939d54508b87a9652",5:"941c70dceb4debfc8d4d",6:"d106e1b51eee9e100b38",29:"018f9ac612dc5355ef5d",30:"b70903a5fd2389fed3a5",31:"63b5c83a4511bd1a8306",32:"7b97f8422fda50418f6f",33:"dcfd2651555d5b7c5e52",34:"cca08756e43db036129a",35:"ef1e2946ccf0434835d9",36:"8fd1c24d3dce6e19e05f",37:"7aeedb020ec9b693071e",38:"22e7c12201c353e659f4",39:"8648d854068bbb8fbd44",40:"366876675bcff1d6b6b3",41:"0d2791127956717dcc1d",42:"062b14dc0fdb361c51ab",43:"561e096a3f67567b9acb",44:"4d7f581dcd25c019513f",45:"9ad68f4259e4c5d4af71",46:"4495b932da4304fa8fa4",47:"be39ad0fc9ad707248d0"}[e]}(e);var i=new Error;c=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+s+")",i.name="ChunkLoadError",i.type=o,i.request=s,r[1](i)}n[e]=void 0}};var l=setTimeout((function(){c({type:"timeout",target:a})}),12e4);a.onerror=a.onload=c,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],c=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var i=c;o(o.s=231)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var c=o.apply(null,n);c&&e.push(c)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.wc.blocksCheckout},function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),s=r(0),c=r(3),a=r(1),i=r(46),l=e=>{let{imageUrl:t=i.l+"/block-error.svg",header:r=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:c=Object(a.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",o),l&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends c.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:c,renderError:a,button:i}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof a?a({errorMessage:u}):Object(s.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:c,button:i}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";(function(e){var n=r(0);r(36);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(54))},function(e,t){e.exports=window.wp.deprecated},,,,,function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(n.useContext)(o)},,function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return d}));var n=r(20);let o,s;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(s||(s={}));const c=(e,t)=>Object(n.a)(e)&&"type"in e&&e.type===t,a=e=>c(e,o.SUCCESS),i=e=>c(e,o.ERROR),l=e=>c(e,o.FAIL),u=e=>!Object(n.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:s,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:l})},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=r(13),s=r.n(o);function c(e){const t=Object(n.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(4),o=r(0),s=r(6),c=r(8),a=r(18),i=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(c.dispatch)(s.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...f,email:""},b={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:s.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},g=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(a.decodeEntities)(r)]})),E={cartCoupons:s.EMPTY_CART_COUPONS,cartItems:s.EMPTY_CART_ITEMS,cartFees:s.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:b,cartIsLoading:!0,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:f,shippingRates:s.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:s.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:s.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),a=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();m();const p=Object(c.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:s.EMPTY_CART_ERRORS,billingData:h,billingAddress:h,shippingAddress:f,extensions:s.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(s.CART_STORE_KEY),c=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),{receiveCart:b}=n(s.CART_STORE_KEY),y=g(c.billingAddress),O=c.needsShipping?g(c.shippingAddress):y,v=c.fees.length>0?c.fees.map(e=>g(e)):s.EMPTY_CART_FEES;return{cartCoupons:c.coupons.length>0?c.coupons.map(e=>({...e,label:e.code})):s.EMPTY_CART_COUPONS,cartItems:c.items,cartFees:v,cartItemsCount:c.itemsCount,cartItemsWeight:c.itemsWeight,cartNeedsPayment:c.needsPayment,cartNeedsShipping:c.needsShipping,cartItemErrors:c.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(i.a)(y),billingAddress:Object(i.a)(y),shippingAddress:Object(i.a)(O),extensions:c.extensions,shippingRates:c.shippingRates,isLoadingRates:m,cartHasCalculatedShipping:c.hasCalculatedShipping,paymentRequirements:c.paymentRequirements,receiveCart:b}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return x})),r.d(t,"a",(function(){return P}));var n=r(0),o=r(1),s=r(60),c=r(23),a=r.n(c),i=r(52),l=r(20),u=r(8);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),m=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},h=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var b=r(2),g=r(117);let E;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(E||(E={}));const y={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(b.getSetting)("checkoutData",{})||{}},O={redirectUrl:"",status:E.PRISTINE,hasError:!1,calculatingCount:0,orderId:y.order_id,orderNotes:"",customerId:y.customer_id,useShippingAsBilling:Object(g.b)(y.billing_address,y.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:s,extensionData:c,useShippingAsBilling:a,shouldCreateAccount:i,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case d.SET_PRISTINE:u=O;break;case d.SET_IDLE:u=e.status!==E.IDLE?{...e,status:E.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case d.SET_COMPLETE:u=e.status!==E.COMPLETE?{...e,status:E.COMPLETE,redirectUrl:"string"==typeof(null==l?void 0:l.redirectUrl)?l.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==E.PROCESSING?{...e,status:E.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==E.BEFORE_PROCESSING?{...e,status:E.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==E.AFTER_PROCESSING?{...e,status:E.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===E.PROCESSING||e.status===E.BEFORE_PROCESSING?{...u,status:E.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case d.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==a&&a!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:a});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==i&&i!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:i});break;case d.SET_ORDER_NOTES:void 0!==s&&e.orderNotes!==s&&(u={...e,orderNotes:s});break;case d.SET_EXTENSION_DATA:void 0!==c&&e.extensionData!==c&&(u={...e,extensionData:c})}return u!==e&&r!==d.SET_PRISTINE&&u.status===E.PRISTINE&&(u.status=E.IDLE),u};var _=r(18),S=r(93),k=r(201);var w=r(203),j=r(198),C=r(58),R=r(31),T=r(79);const A=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),x=()=>Object(n.useContext)(A),P=e=>{let{children:t,redirectUrl:r,isCart:c=!1}=e;O.redirectUrl=r;const[b,g]=Object(n.useReducer)(v,O),{setValidationErrors:y}=Object(j.b)(),{createErrorNotice:x}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:P}=Object(C.a)(),M=b.calculatingCount>0,{isSuccessResponse:N,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(R.d)(),{checkoutNotices:F,paymentNotices:U,expressPaymentNotices:V}=(()=>{const{noticeContexts:e}=Object(R.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[B,H]=Object(n.useReducer)(S.b,{}),z=Object(n.useRef)(B),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:Y,onCheckoutValidationBeforeProcessing:q}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(k.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(k.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(k.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{z.current=B},[B]);const W=Object(n.useMemo)(()=>function(){return a()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),K=Object(n.useMemo)(()=>({resetCheckout:()=>{g({type:d.SET_PRISTINE})},setRedirectUrl:e=>{g(m(e))},setHasError:e=>{g(h(e))},incrementCalculating:()=>{g({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{g({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;g((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{g((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{g((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{g((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(_.decodeEntities)(n)})),"message"in e&&(t.message=Object(_.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;g(m((null==t?void 0:t.redirectUrl)||"")),g((r=t,{type:d.SET_PROCESSING_RESPONSE,data:r})),g({type:d.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{b.status===E.BEFORE_PROCESSING&&(Object(T.b)("error"),Object(w.a)(z.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;x(t,{context:"wc/checkout"}),y(r)}),g(p()),g(h())):g({type:d.SET_PROCESSING})}))},[b.status,y,x,g]);const $=Object(s.a)(b.status),X=Object(s.a)(b.hasError);Object(n.useEffect)(()=>{if((b.status!==$||b.hasError!==X)&&b.status===E.AFTER_PROCESSING){const e={redirectUrl:b.redirectUrl,orderId:b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,processingResponse:b.processingResponse};b.hasError?Object(w.b)(z.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message&&Object(i.a)(e.message)){const r=e.messageContext&&Object(i.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,x(e.message,r)}}),t})(t);if(null!==r)L(r)?g(p()):g(f(r));else{if(!(F.some(e=>"error"===e.status)||V.some(e=>"error"===e.status)||U.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(t,{id:"checkout",context:"wc/checkout"})}g(p())}}):Object(w.b)(z.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{N(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)g(f(t));else if(Object(l.a)(r)){if(r.message&&Object(i.a)(r.message)){const e=r.messageContext&&Object(i.a)(r.messageContext)?{context:r.messageContext}:void 0;x(r.message,e)}L(r)?g(h(!0)):g(f(r))}else g(f())})}},[b.status,b.hasError,b.redirectUrl,b.orderId,b.customerId,b.orderNotes,b.processingResponse,$,X,K,x,I,D,N,L,F,V,U]);const J={onSubmit:Object(n.useCallback)(()=>{P("submit"),g({type:d.SET_BEFORE_PROCESSING})},[P]),isComplete:b.status===E.COMPLETE,isIdle:b.status===E.IDLE,isCalculating:M,isProcessing:b.status===E.PROCESSING,isBeforeProcessing:b.status===E.BEFORE_PROCESSING,isAfterProcessing:b.status===E.AFTER_PROCESSING,hasError:b.hasError,redirectUrl:b.redirectUrl,onCheckoutBeforeProcessing:W,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:Y,dispatchActions:K,isCart:c,orderId:b.orderId,hasOrder:!!b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,useShippingAsBilling:b.useShippingAsBilling,setUseShippingAsBilling:e=>{return g((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:b.shouldCreateAccount,setShouldCreateAccount:e=>{return g((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:b.extensionData};return Object(n.createElement)(A.Provider,{value:J},t)}},function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(14),c=function({icon:e,className:t,...r}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:s},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(c,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&c===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===s.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(s.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(5),o=r.n(n),s=r(0);t.a=Object(s.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(s.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(5),c=r.n(s),a=r(4),i=r(23),l=r.n(i),u=r(11),d=r(44),p=r(70),m=r(1);function f(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const s=o.getBoundingClientRect();return new n.DOMRect(e.left+s.left,e.top+s.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function E(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var y=r(22);function O(e){const t=Object(o.useContext)(y.a),r=t.slots[e]||{},n=t.fills[e],s=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:s,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var v=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const s=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(v),[n,s]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(s(t(e)),r(()=>{s(t(e))})),[e]),n})(e),c=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,c.current),()=>n(e,c.current)),[]),Object(o.useLayoutEffect)(()=>{c.current.children=t,s&&s.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==c.current.name&&(n(c.current.name,c.current),c.current.name=e,r(e,c.current))},[e]),s&&s.node?(Object(a.isFunction)(t)&&(t=t(s.props.fillProps)),Object(o.createPortal)(t,s.node)):null}var S=e=>Object(o.createElement)(v.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,s=Object(a.map)(n(t,this),e=>{const t=Object(a.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(a.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(a.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(a.isFunction)(e)?e(s):s)}}var w=e=>Object(o.createElement)(v.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:s})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:s})));function j(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=O(e),n=Object(o.useRef)({rerender:j()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...s},c){const a=Object(o.useContext)(y.a),i=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(a.registerSlot(e,i,t),()=>{a.unregisterSlot(e,i)}),[a.registerSlot,a.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{a.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([c,i])},s))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(C,e))}r(13),o.Component;const A=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function x(e){return"appear"===e?"top":"left"}function P(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:s}=(c=t).ownerDocument.defaultView.getComputedStyle(c);var c;const a=r?parseInt(r,10):0,i=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+a,width:e.width-l-u,height:e.height-a-i,left:e.left+l,right:e.right-u,top:e.top+a,bottom:e.bottom-i}}function M(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function N(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:s,noArrow:a=!0,isAlternate:i,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:y,shouldAnchorIncludePadding:v,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:w=!0,onClickOutside:j,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:A="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:U,...V},B)=>{const H=Object(o.useRef)(null),z=Object(o.useRef)(null),G=Object(o.useRef)(),Y=Object(u.useViewportMatch)("medium","<"),[q,K]=Object(o.useState)(),$=O(A),X=k&&Y,[J,Q]=Object(u.useResizeObserver)();a=X||a,Object(o.useLayoutEffect)(()=>{if(X)return I(G.current,"is-without-arrow",a),I(G.current,"is-alternate",i),M(G.current,"data-x-axis"),M(G.current,"data-y-axis"),N(G.current,"top"),N(G.current,"left"),N(z.current,"maxHeight"),void N(z.current,"maxWidth");const e=()=>{if(!G.current||!z.current)return;let e=function(e,t,r,n=!1,o,s){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return f(t,t.ownerDocument||e.current.ownerDocument,s)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return f(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,s);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=f(n.getBoundingClientRect(),n.ownerDocument,s);return o?e:P(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),c=t.getBoundingClientRect(),a=f(new window.DOMRect(r.left,r.top,r.width,c.bottom-r.top),e.ownerDocument,s);return o?a:P(a,n)}if(!e.current)return;const{parentNode:c}=e.current,a=c.getBoundingClientRect();return o?a:P(a,c)}(H,_,S,y,v,G.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=G.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var s;L&&(n=null===(s=G.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const c=Q.height?Q:z.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:E}=function(e,t,r="top",n,o,s,c,a,i){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,s,c,a){const{height:i}=t;if(o){const t=o.getBoundingClientRect().top+i-c;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-i/2>0?i/2:l)+(l+i/2>window.innerHeight?window.innerHeight-l:i/2)},d={popoverTop:e.top,contentHeight:e.top-10-i>0?i:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+i>window.innerHeight?window.innerHeight-10-e.bottom:i};let m,f=r,h=null;if(!o&&!a)if("middle"===r&&u.contentHeight===i)f="middle";else if("top"===r&&d.contentHeight===i)f="top";else if("bottom"===r&&p.contentHeight===i)f="bottom";else{f=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===f?d.contentHeight:p.contentHeight;h=e!==i?e:null}return m="middle"===f?u.popoverTop:"top"===f?d.popoverTop:p.popoverTop,{yAxis:f,popoverTop:m,contentHeight:h}}(e,t,l,d,n,0,s,a);return{...function(e,t,r,n,o,s,c,a,i){const{width:l}=t;"left"===r&&Object(m.isRTL)()?r="right":"right"===r&&Object(m.isRTL)()&&(r="left"),"left"===n&&Object(m.isRTL)()?n="right":"right"===n&&Object(m.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===s||i||(p=u);let f=e.right;"left"===n?f=e.left:"middle"===s||i||(f=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let g,E=r,y=null;if(!o&&!a)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&h.contentWidth===l)E="left";else if("right"===r&&b.contentWidth===l)E="right";else{E=h.contentWidth>b.contentWidth?"left":"right";const e="left"===E?h.contentWidth:b.contentWidth;l>window.innerWidth&&(y=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===E?d.popoverLeft:"left"===E?h.popoverLeft:b.popoverLeft,c){const e=c.getBoundingClientRect();g=Math.min(g,e.right-l),Object(m.isRTL)()||(g=Math.max(g,0))}return{xAxis:E,popoverLeft:g,contentWidth:y}}(e,t,u,d,n,p.yAxis,c,a,i),...p}}(e,c,h,R,G.current,o,n,F,U);"number"==typeof l&&"number"==typeof u&&(N(G.current,"top",l+"px"),N(G.current,"left",u+"px")),I(G.current,"is-without-arrow",a||"center"===p&&"middle"===b),I(G.current,"is-alternate",i),M(G.current,"data-x-axis",p),M(G.current,"data-y-axis",b),N(z.current,"maxHeight","number"==typeof g?g+"px":""),N(z.current,"maxWidth","number"==typeof E?E+"px":""),K(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=G.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const s=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",s),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const c=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(y);let l;return c&&c!==t&&(c.defaultView.addEventListener("resize",e),c.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",s),r.cancelAnimationFrame(o),c&&c!==t&&(c.defaultView.removeEventListener("resize",e),c.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[X,_,S,y,v,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&j){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),j(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([G,ee,B]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:r=x(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:c()("components-popover",s,ne,{"is-expanded":X,"is-without-arrow":a,"is-alternate":i})},V,{ref:re},te,{tabIndex:"-1"}),X&&Object(o.createElement)(E,null),X&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(W,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:z,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return $.ref&&(oe=Object(o.createElement)(T,{name:A},oe)),y||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(A,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(a.isString)(e)&&(r=e),Object(a.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const U=Object(o.createElement)("div",{className:"event-catcher"}),V=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(U,e),Object(o.cloneElement)(t,{children:r}),","),e),B=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var z=function({children:e,position:t,text:r,shortcut:n}){const[s,c]=Object(o.useState)(!1),[i,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),c(!0)},m=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),c(!1)},f=e=>"mouseUp"===e?m:"mouseDown"===e?p:void 0,h=f("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&s)return;d.cancel();const o=Object(a.includes)(["focus","mouseenter"],n.type);o!==i&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:f("mouseDown")},y=o.Children.only(e),{children:O,disabled:v}=y.props;return(v?V:B)({child:y,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:s})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:s}))))({grandchildren:O,isOver:i,position:t,text:r,shortcut:n})})},G=r(37),Y=r(38);const q=["onMouseDown","onClick"];var W=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:s,isSmall:i,isPressed:u,isBusy:d,isDestructive:p,className:m,disabled:f,icon:h,iconPosition:b="left",iconSize:g,showTooltip:E,tooltipPosition:y,shortcut:O,label:v,children:_,text:S,variant:k,__experimentalIsFocusable:w,describedBy:j,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:s,...c}){let a=s;var i,u,d,p,m;return t&&(null!==(i=a)&&void 0!==i||(a="primary")),n&&(null!==(u=a)&&void 0!==u||(a="tertiary")),r&&(null!==(d=a)&&void 0!==d||(a="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=a)&&void 0!==p||(a="secondary")),o&&(null!==(m=a)&&void 0!==m||(a="link")),{...c,variant:a}}(e),R=c()("components-button",m,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":i,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=f&&!w,A=void 0===r||T?"button":"a",x="a"===A?{href:r,target:s}:{type:"button",disabled:T,"aria-pressed":u};if(f&&w){x["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const P=!T&&(E&&v||O||!!v&&(!_||Object(a.isArray)(_)&&!_.length)&&!1!==E),M=j?Object(a.uniqueId)():null,N=C["aria-describedby"]||M,I=Object(o.createElement)(A,Object(n.a)({},x,C,{className:R,"aria-label":C["aria-label"]||v,"aria-describedby":N,ref:t}),h&&"left"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),_);return P?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z,{text:j||v,shortcut:O,position:y},I),j&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:M},j))):Object(o.createElement)(o.Fragment,null,I,j&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:M},j)))}))},function(e,t){e.exports=window.wp.dom},,function(e,t,r){"use strict";r.d(t,"n",(function(){return s})),r.d(t,"l",(function(){return c})),r.d(t,"k",(function(){return a})),r.d(t,"m",(function(){return i})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return f})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return E}));var n,o=r(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=s.pluginUrl+"images/",a=s.pluginUrl+"build/",i=s.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),f=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),s=r(71),c=r(52);const a=Object(n.getSetting)("countryLocale",{}),i=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
- Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(s.a)(e.priority)&&(t.index=e.priority),Object(c.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(a).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,i(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return a}));var n=r(0),o=r(66);const s=Object(n.createContext)({isInitialized:!1,billingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingAddress:()=>{},setShippingAddress:()=>{}}),c=()=>Object(n.useContext)(s),a=e=>{let{children:t}=e;const r=Object(o.a)();return Object(n.createElement)(s.Provider,{value:r},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,s=Object(n.useRef)(null),c=Object(n.useRef)(0),a=Object(n.useRef)(null),i=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var f=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=i.current,r=l.current;return i.current=l.current=null,c.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-s.current,n=e-c.current;return!s.current||r>=t||r<0||b&&n>=g},E=function(t){return a.current=null,h&&i.current?e(t):(i.current=l.current=null,u.current)},y=function(){var e=Date.now();if(n(e))return E(e);if(p.current){var o=e-s.current,a=e-c.current,i=t-o,l=b?Math.min(i,g-a):i;r(y,l)}},O=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];var h=Date.now(),g=n(h);if(i.current=d,l.current=o,s.current=h,g){if(!a.current&&p.current)return c.current=s.current,r(y,t),f?e(s.current):u.current;if(b)return r(y,t),e(s.current)}return a.current||r(y,t),u.current};return O.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),c.current=0,i.current=s.current=l.current=a.current=null},O.isPending=function(){return!!a.current},O.flush=function(){return a.current?E(Date.now()):u.current},O}),[f,b,t,g,h,m])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),s=r(0),c=r(16);const a=[".wp-block-woocommerce-cart"],i=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:a=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const i=n(e,r),l=a(e,r),u={...e.dataset,...i.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:a={},errorBoundaryProps:i={}}=e;Object(s.render)(Object(s.createElement)(c.a,i,Object(s.createElement)(s.Suspense,{fallback:Object(s.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(s.createElement)(t,o()({},a,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:i,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(a.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:s}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:s}=e;const c=document.body.querySelectorAll(o);s&&s.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,s)),i({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:s,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:s}=e;const c=s.querySelectorAll(o);i({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var i,l=[],u=!1,d=-1;function p(){u&&i&&(u=!1,i.length?l=i.concat(l):d=-1,l.length&&m())}function m(){if(!u){var e=a(p);u=!0;for(var t=l.length;t;){for(i=l,l=[];++d<t;)i&&i[d].run();d=-1,t=l.length}i=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||u||a(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){var n=r(82),o=r(56),s=o.setStyleProp,c=n.html,a=n.svg,i=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],i(t)?d[t]=n:(r=t.toLowerCase(),l.call(c,r)?d[(u=c[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(a,t)?d[(u=a[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return s(e.style,d),d}},function(e,t,r){var n=r(3),o=r(86).default,s={reactCompat:!0},c=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:c,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,s={},c={};for(r in e)n=e[r],o&&(s=t(r,n))&&2===s.length?c[s[0]]=s[1]:"string"==typeof n&&(c[n]=r);return c},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,s))}}},function(e,t,r){for(var n,o=r(92).CASE_SENSITIVE_TAG_NAMES,s={},c=0,a=o.length;c<a;c++)n=o[c],s[n.toLowerCase()]=n;function i(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return s[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:i,formatDOM:function e(t,r,n){r=r||null;for(var o,s,c,a=[],u=0,d=t.length;u<d;u++){switch(o=t[u],c={next:null,prev:a[u-1]||null,parent:r},(s=a[u-1])&&(s.next=c),"#"!==o.nodeName[0]&&(c.name=l(o.nodeName),c.attribs={},o.attributes&&o.attributes.length&&(c.attribs=i(o.attributes))),o.nodeType){case 1:"script"===c.name||"style"===c.name?c.type=c.name:c.type="tag",c.children=e(o.childNodes,c);break;case 3:c.type="text",c.data=o.nodeValue;break;case 8:c.type="comment",c.data=o.nodeValue}a.push(c)}return n&&(a.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:a[0]?a[0]:null,prev:null,parent:r}),a[1]&&(a[1].prev=a[0])),a},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(42),o=r(0),s=r(33);const c=()=>{const e=Object(s.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return c}));var n=r(0);const o=Object(n.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),s=()=>Object(n.useContext)(o),c=e=>{let{children:t}=e;const[r,s]=Object(n.useState)(!1),c={setIsSuppressed:s,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:c},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},function(e,t,r){var n=r(81),o=r(55),s=r(90),c={decodeEntities:!0,lowerCaseAttributeNames:!1};function a(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(s(e,(t=t||{}).htmlparser2||c),t)}a.domToReact=n,a.htmlToDOM=s,a.attributesToProps=o,e.exports=a,e.exports.default=a},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(6),o=r(8),s=r(0),c=r(13),a=r.n(c),i=r(20),l=r(68);const u=()=>{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:c}=Object(o.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(l.a)(),p=Object(s.useRef)({});return Object(s.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(i.a)(t)&&!a()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:c}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(8),o=r(6);const s=()=>{const{customerData:e,isInitialized:t}=Object(n.useSelect)(e=>{const t=e(o.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:r,setBillingAddress:s}=Object(n.useDispatch)(o.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:s,setShippingAddress:r}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return O})),r.d(t,"a",(function(){return v}));var n=r(0);const o={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},s={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},c={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:o,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},a=(e,t)=>{let{type:r}=t;return Object.values(o).includes(r)?r:e};var i=r(93),l=r(201);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=r(203),p=r(35),m=r(33),f=r(68),h=r(64);const{NONE:b,INVALID_ADDRESS:g,UNKNOWN:E}=o,y=Object(n.createContext)(c),O=()=>Object(n.useContext)(y),v=e=>{let{children:t}=e;const{dispatchActions:r}=Object(p.b)(),{shippingRates:c,isLoadingRates:l,cartErrors:O}=Object(m.a)(),{isSelectingRate:v}=Object(f.a)(),{selectedRates:_}=Object(h.a)(),[S,k]=Object(n.useReducer)(a,b),[w,j]=Object(n.useReducer)(i.b,{}),C=Object(n.useRef)(w),R=Object(n.useMemo)(()=>({onShippingRateSuccess:u(j).onSuccess,onShippingRateFail:u(j).onFail,onShippingRateSelectSuccess:u(j).onSelectSuccess,onShippingRateSelectFail:u(j).onSelectFail}),[j]);Object(n.useEffect)(()=>{C.current=w},[w]),Object(n.useEffect)(()=>{l?r.incrementCalculating():r.decrementCalculating()},[l,r]),Object(n.useEffect)(()=>{v?r.incrementCalculating():r.decrementCalculating()},[v,r]),Object(n.useEffect)(()=>{O.length>0&&O.some(e=>!(!e.code||!Object.values(s).includes(e.code)))?k({type:g}):k({type:b})},[O]);const T=Object(n.useMemo)(()=>({isPristine:S===b,isValid:S===b,hasInvalidAddress:S===g,hasError:S===E||S===g}),[S]);Object(n.useEffect)(()=>{l||0!==c.length&&!T.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:T.hasInvalidAddress,hasError:T.hasError})},[c,l,T.hasError,T.hasInvalidAddress]),Object(n.useEffect)(()=>{!l&&c.length>0&&!T.hasError&&Object(d.a)(C.current,"shipping_rates_success",c)},[c,l,T.hasError]),Object(n.useEffect)(()=>{v||(T.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:T.hasError,hasInvalidAddress:T.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",_.current))},[_,v,T.hasError,T.hasInvalidAddress]);const A={shippingErrorStatus:T,dispatchErrorStatus:k,shippingErrorTypes:o,...R};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(y.Provider,{value:A},t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(8),o=r(0),s=r(6),c=r(74),a=r(58);const i=()=>{const e=Object(c.a)(),{dispatchCheckoutEvent:t}=Object(a.a)(),{selectShippingRate:r}=Object(n.useDispatch)(s.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((n,o)=>{r(n,o).then(()=>{t("set-selected-shipping-rate",{shippingRateId:n})}).catch(t=>{e(t)})},[r,t,e]),isSelectingRate:Object(n.useSelect)(e=>e(s.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return i}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:s,detail:c={}}=t;if(!n)return;s||(s=document.body);const a=new n(e,{bubbles:r,cancelable:o,detail:c});s.dispatchEvent(a)};let s;const c=()=>{s&&clearTimeout(s),s=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const s=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,s),()=>jQuery(document).off(e,s)}},function(e,t,r){"use strict";var n=r(0),o=r(14);const s=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(12),o=r.n(n),s=r(0);r(106);const c=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(s.useRef)(null);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(s.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];c(e),null==e||e.focus()}else c(e)})(e,r):c(e))})(r.current,e)}})))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),s=r(5),c=r.n(s),a=r(1),i=r(21),l=r(70),u=r(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:s=r,onRemove:p=o.noop,isDismissible:m=!0,actions:f=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(i.speak)(r,t)},[r,t])}(s,h);const E=c()(e,"components-notice","is-"+t,{"is-dismissible":m});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},f.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:s=!1,onClick:a,url:i},l)=>{let d=o;return"primary"===o||s||(d=i?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:i,variant:d,onClick:i?void 0:a,className:c()("components-notice__action",e)},t)}))),m&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(a.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(8);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const r=Object(n.select)("core/notices").getNotices(e);return r.some(e=>e.type===t)},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object(n.select)("core/notices").getNotices(),{removeNotice:o}=Object(n.dispatch)("core/notices"),s=r.filter(t=>t.status===e);s.forEach(e=>o(e.id,t))}},function(e,t){},function(e,t,r){var n=r(3),o=r(55),s=r(56),c=s.setStyleProp;function a(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&s.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var s,i,l,u,d=(r=r||{}).library||n,p=d.cloneElement,m=d.createElement,f=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,E=0,y=t.length;E<y;E++)if(s=t[E],b&&f(i=r.replace(s)))y>1&&(i=p(i,{key:i.key||E})),h.push(i);else if("text"!==s.type){switch(l=s.attribs,a(s)?c(l.style,l):l&&(l=o(l)),u=null,s.type){case"script":case"style":s.children[0]&&(l.dangerouslySetInnerHTML={__html:s.children[0].data});break;case"tag":"textarea"===s.name&&s.children[0]?l.defaultValue=s.children[0].data:s.children&&s.children.length&&(u=e(s.children,r));break;default:continue}y>1&&(l.key=E),h.push(m(s.name,l,u))}else g?s.data.trim()&&h.push(s.data):h.push(s.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(83),o=r(84),s=r(85),c=s.MUST_USE_PROPERTY,a=s.HAS_BOOLEAN_VALUE,i=s.HAS_NUMERIC_VALUE,l=s.HAS_POSITIVE_NUMERIC_VALUE,u=s.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,s,p=e.Properties,m=e.DOMAttributeNames;for(o in p)n=m[o]||(r?o:o.toLowerCase()),s=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(s,c),hasBooleanValue:d(s,a),hasNumericValue:d(s,i),hasPositiveNumericValue:d(s,l),hasOverloadedBooleanValue:d(s,u)}}var m={};p(n,m);var f={};p(o,f,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:m,svg:f,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(87)),s=r(89);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[s.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(88);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var s,c,a=n(e),i="function"==typeof t,l=0,u=a.length;l<u;l++)s=(r=a[l]).property,c=r.value,i?t(s,c,r):c&&(o||(o={}),o[s]=c);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function m(){var e={line:l,column:d};return function(t){return t.position=new f(e),E(),t}}function f(e){this.start=e,this.end={line:l,column:d},this.source=t.source}f.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function E(){g(o)}function y(e){var t;for(e=e||[];t=O();)!1!==t&&e.push(t);return e}function O(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function v(){var e=m(),t=g(s);if(t){if(O(),!g(c))return b("property missing ':'");var n=g(a),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(i),o}}return E(),function(){var e,t=[];for(y(t);e=v();)!1!==e&&(t.push(e),y(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,s=/^[^-]+$/,c=/^-(webkit|moz|ms|o|khtml)-/,a=function(e,t){return t.toUpperCase()},i=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||s.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(c,i)),e.replace(o,a))}},function(e,t,r){var n=r(91),o=r(57),s=o.formatDOM,c=o.isIE(9),a=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(a);return r&&r[1]&&(t=r[1],c&&(e=e.replace(r[0],""))),s(n(e),null,t)}},function(e,t,r){var n=r(57),o=/<([a-zA-Z]+[0-9]?)/,s=/<head.*>/i,c=/<body.*>/i,a=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,i=n.isIE(9),l=i||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,m=i?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),i&&(e=e.replace(a,"<$1$2$3/>")),p.parseFromString(e,m)}}if(document.implementation){var f=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f;try{return f.documentElement.innerHTML=e,f}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,a,i=e.match(o);switch(i&&i[1]&&(t=i[1].toLowerCase()),t){case"html":return r=d(e),s.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),c.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return a=u(e).getElementsByTagName(t),c.test(e)&&s.test(e)?a[0].parentNode.childNodes:a;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var n=r(4);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const s={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},c={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:n,callback:s,priority:a}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return i.set(n,{priority:a,callback:s}),{...e,[r]:i};case o.REMOVE_EVENT_CALLBACK:return i.delete(n),{...e,[r]:i}}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return c}));var n=r(1),o=r(18);const s=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(o.decodeEntities)(e.message):Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(12)),s=n(r(128)),c=r(3),a=n(c),i=n(r(129)),l=n(r(131)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,s(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var s;return u.und(t[n])?o({},r,((s={})[n]=e[n],s)):r}),{});return o({to:t},r)}var b,g,E=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}return i(t,e),t}(E),O=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}i(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof E)&&(t[r]=n instanceof E?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(E);function v(e,t){b={fn:e,transform:t}}function _(e){g=e}var S,k=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function j(e){S=e}var C,R=function(){return Date.now()};function T(e){C=e}var A,x,P=function(e){return e.current};function M(e){A=e}var N=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:v,get colorNames(){return g},injectColorNames:_,get requestFrame(){return k},get cancelFrame(){return w},injectFrame:function(e,t){k=e,w=t},get interpolation(){return S},injectStringInterpolator:j,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return C},injectDefaultElement:T,get animatedApi(){return P},injectAnimatedApi:function(e){P=e},get createAnimatedStyle(){return A},injectCreateAnimatedStyle:M,get manualFrameloop(){return x},injectManualFrameloop:function(e){x=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:A(t.style)}):t,n.update=r,n.attach(),n}return i(t,e),t}(O),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=R(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(o>=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}for(var c=s,a=!1,i=0;i<c.configs.length;i++){for(var l=c.configs[i],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var m=l.animatedValues[p];if(!m.done){var f=l.fromValues[p],h=l.toValues[p],b=m.lastPosition,g=h instanceof E,y=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)m.setValue(h),m.done=!0;else if("string"!=typeof f&&"string"!=typeof h){if(void 0!==l.duration)b=f+l.easing((t-m.startTime)/l.duration)*(h-f),u=t>=m.startTime+l.duration;else if(l.decay)b=f+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-b)<.1)&&(h=b);else{d=void 0!==m.lastTime?m.lastTime:t,y=void 0!==m.lastVelocity?m.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),v=0;v<O;++v)b+=1*(y+=(-l.tension*(b-h)+-l.friction*y)/l.mass*1/1e3)/1e3;var _=!(!l.clamp||0===l.tension)&&(f<h?b>h:b<h),S=Math.abs(y)<=l.precision,w=0===l.tension||Math.abs(h-b)<=l.precision;u=_||S&&w,m.lastVelocity=y,m.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(m.value!==h&&(b=h),m.done=!0):a=!0,m.setValue(b),m.lastPosition=b}else m.setValue(h),m.done=!0}}c.props.onFrame&&(c.values[l.name]=l.interpolation.getValue())}c.props.onFrame&&c.props.onFrame(c.values),a||(L.delete(c),c.stop(!0))}return L.size?x?x():k(e):D=!1,D};function U(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return U({range:e,output:t,extrapolate:r});if(S&&"string"==typeof e.output[0])return S(e);var n=e,o=n.output,s=n.range||[0,1],c=n.extrapolateLeft||n.extrapolate||"extend",a=n.extrapolateRight||n.extrapolate||"extend",i=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,s);return function(e,t,r,n,o,s,c,a,i){var l=i?i(e):e;if(l<t){if("identity"===c)return l;"clamp"===c&&(l=t)}if(l>r){if("identity"===a)return l;"clamp"===a&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=s(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,s[t],s[t+1],o[t],o[t+1],i,c,a,n.map)}}var V=function(e){function t(r,n,o,s){var c;return(c=e.call(this)||this).calc=void 0,c.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],c.calc=U(n,o,s),c}i(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=U(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),B=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}i(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new V(this,e,t,r)},t}(E),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new B(e)})),r}i(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new V(this,e,t)},t}(y),z=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,c=t.to,a=s(t,["delay","to"]);if(u.arr(c)||u.fun(c))this.queue.push(o({},a,{delay:n,to:c}));else if(c){var i={};Object.entries(c).forEach((function(e){var t,r=e[0],s=e[1],c=o({to:(t={},t[r]=s,t),delay:f(n,r)},a),l=i[c.delay]&&i[c.delay].to;i[c.delay]=o({},i[c.delay],c,{to:o({},l,c.to)})})),this.queue=Object.values(i)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,s=e.to,c=void 0===s?{}:s;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(c)&&(t.merged=o({},t.merged,c))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,c){var a=o.delay,i=s(o,["delay"]),l=function(o){c===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(i.to)||u.fun(i.to);a?setTimeout((function(){r===t.guid&&(d?t.runAsync(i,l):t.diff(i).start(l))}),a):d?t.runAsync(i,l):t.diff(i).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(x||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,s(e,["delay"])),c=this.local,a=Promise.resolve(void 0);if(u.arr(n.to))for(var i=function(e){var t=e,s=o({},n,h(n.to[t]));u.arr(s.config)&&(s.config=s.config[t]),a=a.then((function(){if(c===r.guid)return new Promise((function(e){return r.diff(s).start(e)}))}))},l=0;l<n.to.length;l++)i(l);else if(u.fun(n.to)){var d,p=0;a=a.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,c===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,s=void 0===n?{}:n,c=r.to,a=void 0===c?{}:c,i=r.config,l=void 0===i?{}:i,d=r.reverse,h=r.attach,b=r.reset,E=r.immediate;if(d){var y=[a,s];s=y[0],a=y[1]}this.merged=o({},s,this.merged,a),this.hasChanged=!1;var O=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],c=r[1],a=e[n]||{},i=u.num(c),d=u.str(c)&&!c.startsWith("#")&&!/\d/.test(c)&&!g[c],h=u.arr(c),y=!i&&!h&&!d,v=u.und(s[n])?c:s[n],_=i||h||d?c:1,k=f(l,n);O&&(_=O.animations[n].parent);var w,j=a.parent,C=a.interpolation,T=m(O?_.getPayload():_),A=c;y&&(A=S({range:[0,1],output:[c,c]})(1));var x,P=C&&C.getValue(),M=!u.und(j)&&a.animatedValues.some((function(e){return!e.done})),N=!u.equ(A,P),I=!u.equ(A,a.previous),D=!u.equ(k,a.config);if(b||I&&N||D){var L;if(i||d)j=C=a.parent||new B(v);else if(h)j=C=a.parent||new H(v);else if(y){var F=a.interpolation&&a.interpolation.calc(a.parent.value);F=void 0===F||b?v:F,a.parent?(j=a.parent).setValue(0,!1):j=new B(0);var U={output:[F,c]};a.interpolation?(C=a.interpolation,a.interpolation.updateConfig(U)):C=j.interpolate(U)}return T=m(O?_.getPayload():_),w=m(j.getPayload()),b&&!y&&j.setValue(v,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=M?e.lastVelocity:void 0,e.lastTime=M?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),f(E,n)&&j.setValue(y?_:c,!1),o({},e,((L={})[n]=o({},a,{name:n,parent:j,interpolation:C,animatedValues:w,toValues:T,previous:A,config:k,fromValues:m(j.getValue()),immediate:f(E,n),initialVelocity:p(k.velocity,0),clamp:p(k.clamp,!1),precision:p(k.precision,.01),tension:p(k.tension,170),friction:p(k.friction,26),mass:p(k.mass,1),duration:k.duration,easing:p(k.easing,(function(e){return e})),decay:k.decay}),L))}return N?e:(y&&(j.setValue(1,!1),C.updateConfig({output:[A,A]})),j.done=!0,t.hasChanged=!0,o({},e,((x={})[n]=o({},e[n],{previous:A}),x)))}),this.animations),this.hasChanged)for(var v in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[v]=this.animations[v].interpolation,this.values[v]=this.animations[v].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),Y=function(e,t){var r=c.useRef(!1),n=c.useRef(),o=u.fun(t),s=c.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var s=new G,c=o?f(t,n,s):t[n];return 0===n&&(r=c.ref),s.update(c),r||s.start(),s})),r]}),[e]),a=s[0],i=s[1];n.current=a,c.useImperativeHandle(i,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=c.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?f(e,r,t):e[r]),i||t.start()}))}}),[e]);c.useEffect((function(){r.current?o||l(t):i||n.current.forEach((function(e){return e.start()}))})),c.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},q=0,W=function(e,t){return("function"==typeof t?e.map(t):m(t)).map(String)},K=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,c=s(e,["items","keys"]);return t=m(void 0!==t?t:null),o({items:t,keys:W(t,n)},c)};function $(e,t){var r=function(){if(o){if(s>=n.length)return"break";c=n[s++]}else{if((s=n.next()).done)return"break";c=s.value}var r=c.key,a=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},n=e.current.deleted,o=Array.isArray(n),s=0;for(n=o?n:n[Symbol.iterator]();;){var c;if("break"===r())break}e.current.forceUpdate()}var X=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof E||(t=b.transform(t)),r.payload=t,r}return i(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ie(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,s=ie(o,n,e+1/3),c=ie(o,n,e),a=ie(o,n,e-1/3);return Math.round(255*s)<<24|Math.round(255*c)<<16|Math.round(255*a)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function me(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function fe(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ce.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ae.exec(t))?parseInt(r[1],16)>>>0:(r=se.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),me(r[2]),me(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),me(r[2]),me(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),Ee={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||Ee.hasOwnProperty(e)&&Ee[e]?(""+t).trim():t+"px"}Ee=Object.keys(Ee).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),Ee);var ve={};M((function(e){return new X(e)})),T("div"),j((function(e){var t=e.output.map((function(e){return e.replace(be,fe)})).map((function(e){return e.replace(ge,fe)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return U(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),v((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,c=t.scrollLeft,a=s(t,["style","children","scrollTop","scrollLeft"]),i="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==c&&(e.scrollLeft=c),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=Oe(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in a){var m=i?p:ve[p]||(ve[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,a[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return c.forwardRef((function(t,r){var n=d(),i=c.useRef(!0),l=c.useRef(null),p=c.useRef(null),m=c.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){i.current=!1,l.current&&l.current.detach()}}),[]),c.useImperativeHandle(r,(function(){return P(p,i,n)})),m(t);var f,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,s(h,["scrollTop","scrollLeft"])),E=(f=e,!u.fun(f)||f.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return a.createElement(e,o({},g,{ref:E}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),we=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new V(e,t,r)},t.Globals=N,t.useSpring=function(e){var t=u.fun(e),r=Y(1,t?e:[e]),n=r[0],o=r[1],s=r[2];return t?[n[0],o,s]:n},t.useTrail=function(e,t){var r=c.useRef(!1),n=u.fun(t),s=f(t),a=c.useRef(),i=Y(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},s,{config:f(s.config,e),attach:e>0&&function(){return a.current[e-1]}})})),l=i[0],d=i[1],p=i[2],m=c.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,c=a.current[n];return o({},e,{config:f(e.config||s.config,t),attach:c&&function(){return c}})}))}}),[e,s.reverse]);return c.useEffect((function(){r.current&&!n&&m(t)})),c.useEffect((function(){r.current=!0}),[]),n?[l,m,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),a=K(n),i=a.lazy,l=void 0!==i&&i,u=(a.unique,a.reset),p=void 0!==u&&u,m=(a.enter,a.leave,a.update,a.onDestroyed),h=(a.keys,a.items,a.onFrame),b=a.onRest,g=a.onStart,E=a.ref,y=s(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),v=c.useRef(!1),_=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!v.current&&new Map,forceUpdate:O});return c.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,c=s(e,["first","prevProps"]),a=K(t),i=a.items,l=a.keys,u=a.initial,d=a.from,p=a.enter,m=a.leave,h=a.update,b=a.trail,g=void 0===b?0:b,E=a.unique,y=a.config,O=a.order,v=void 0===O?["enter","leave","update"]:O,_=K(n),S=_.keys,k=_.items,w=o({},c.current),j=[].concat(c.deleted),C=Object.keys(w),R=new Set(C),T=new Set(l),A=l.filter((function(e){return!R.has(e)})),x=c.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),P=l.filter((function(e){return R.has(e)})),M=-g;v.length;)switch(v.shift()){case"enter":A.forEach((function(e,t){E&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=i[n],s=r&&void 0!==u?"initial":"enter";w[e]={slot:s,originalKey:e,key:E?String(e):q++,item:o,trail:M+=g,config:f(y,o,s),from:f(r&&void 0!==u?u||{}:d,o),to:f(p,o)}}));break;case"leave":x.forEach((function(e){var t=S.indexOf(e),r=k[t];j.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:M+=g,config:f(y,r,"leave"),to:f(m,r)})),delete w[e]}));break;case"update":P.forEach((function(e){var t=l.indexOf(e),r=i[t];w[e]=o({},w[e],{item:r,slot:"update",trail:M+=g,config:f(y,r,"update"),to:f(h,r)})}))}var N=l.map((function(e){return w[e]}));return j.forEach((function(e){var t,r=e.left,n=(e.right,s(e,["left","right"]));-1!==(t=N.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),N=[].concat(N.slice(0,t),[n],N.slice(t))})),o({},c,{changed:A.length||x.length||P.length,first:r&&0===A.length,transitions:N,current:w,deleted:j,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,s=e.config,c=e.trail,a=e.key,i=e.item;_.current.instances.has(a)||_.current.instances.set(a,new G);var u=_.current.instances.get(a),d=o({},y,{to:n,from:r,config:s,ref:E,onRest:function(r){_.current.mounted&&(e.destroyed&&(E||l||$(_,a),m&&m(i)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(E||l)&&_.current.deleted.length>0&&$(_),b&&b(i,t,r))},onStart:g&&function(){return g(i,t)},onFrame:h&&function(e){return h(i,t,e)},delay:c,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),c.useEffect((function(){return _.current.mounted=v.current=!0,function(){_.current.mounted=v.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=c.useRef();c.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var s=e.current;if(s){var c=s.controllers;if(c.length){var a=r*t[n];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=Y},,,,,,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{icon:t,size:r=24,...o}=e;return Object(n.cloneElement)(t,{width:r,height:r,...o})}},,function(e,t){},,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(4),s=r(5),c=r.n(s),a=r(21),i=r(1),l=(r(36),r(43));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:s=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:m=null,explicitDismiss:f=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(a.speak)(r,t)},[r,t])}(s,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{f||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const E=c()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!f});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const y=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!m});return Object(n.createElement)("div",{ref:b,className:E,onClick:f?o.noop:g,tabIndex:"0",role:f?"":"button",onKeyPress:f?o.noop:g,"aria-label":f?"":Object(i.__)("Dismiss this notice")},Object(n.createElement)("div",{className:y},m&&Object(n.createElement)("div",{className:"components-snackbar__icon"},m),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),f&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(54))},function(e,t){e.exports=window.wp.plugins},,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return c}));var n=r(47),o=(r(15),r(2));const s=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),c=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),s=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(s[r]="")}),s}},,,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(12),o=r.n(n),s=r(0),c=r(5),a=r.n(c),i=r(77),l=r(8),u=(r(80),r(59));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:c}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:m}=Object(l.useDispatch)("core/notices"),f=p.filter(e=>"snackbar"!==e.type).concat(n);if(!f.length)return null;const h=a()(t,"wc-block-components-notices");return c?null:Object(s.createElement)("div",{className:h},f.map(e=>Object(s.createElement)(i.a,o()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&m(e.id,r)}}),e.content)))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(51),s=r(2),c=r(61),a=r.n(c),i=r(10),l=r(16);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:c,depth:p=1}=e;return c&&0!==c.length?Array.from(c).map((e,c)=>{const{blockName:m="",...f}={key:`${t}_${p}_${c}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},h=u(m,r);if(!h){const s=a()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof s&&s)return s;if(!Object(n.isValidElement)(s))return null;const c=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return c?Object(n.cloneElement)(s,f,c):Object(n.cloneElement)(s,f)}const b=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${c}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+m,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(b,null,Object(n.createElement)(h,f,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(i.hasInnerBlocks)(e))return null;const c=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],a=Object(i.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!c.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,a.map((e,r)=>{let{blockName:o,component:c}=e;const a=c||u(o,t);return a?Object(n.createElement)(l.a,{text:"Unexpected error in: "+o,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(a,{key:`${o}_forced_${r}`}))):null}))})(m,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:s=(()=>({})),blockMap:c,blockWrapper:a}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:c,children:e.children||[],blockWrapper:a});return{...s(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(130);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(112),s=r(2),c=r(16),a=r(205),i=r(67),l=r(49),u=r(35),d=r(1),p=r(28),m=r.n(p),f=r(117),h=r(94),b=r(8);const g=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},E=(e,t)=>{m.a.setNonce&&"function"==typeof m.a.setNonce&&m.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var y=r(198),O=r(33),v=r(59),_=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:s,isBeforeProcessing:c,isComplete:p,orderNotes:_,shouldCreateAccount:S,extensionData:k}=Object(u.b)(),{hasValidationErrors:w}=Object(y.b)(),{shippingErrorStatus:j}=Object(i.b)(),{billingAddress:C,shippingAddress:R}=Object(l.b)(),{cartNeedsPayment:T,cartNeedsShipping:A,receiveCart:x}=Object(O.a)(),{activePaymentMethod:P,isExpressPaymentMethodActive:M,currentStatus:N,paymentMethodData:I,expressPaymentMethods:D,paymentMethods:L,shouldSavePayment:F}=Object(a.b)(),{setIsSuppressed:U}=Object(v.b)(),{createErrorNotice:V,removeNotice:B}=Object(b.useDispatch)("core/notices"),H=Object(n.useRef)(C),z=Object(n.useRef)(R),G=Object(n.useRef)(o),[Y,q]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...D,...L};return null==t||null===(e=t[P])||void 0===e?void 0:e.paymentMethodId},[P,D,L]),K=w&&!M||N.hasError||j.hasError,$=!e&&!K&&(N.isSuccessful||!T)&&s;Object(n.useEffect)(()=>{U(M)},[M,U]),Object(n.useEffect)(()=>{K===e||!s&&!c||M||r.setHasError(K)},[K,e,s,c,M,r]),Object(n.useEffect)(()=>{H.current=C,z.current=R,G.current=o},[C,R,o]);const X=Object(n.useCallback)(()=>!w&&(N.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,N.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return M||(e=t(X,0)),()=>{M||e()}},[t,X,M]),Object(n.useEffect)(()=>{G.current&&(window.location.href=G.current)},[p]);const J=Object(n.useCallback)(async()=>{if(Y)return;q(!0),B("checkout");const e=T?{payment_method:W,payment_data:g(I,F,P)}:{},t={billing_address:Object(f.a)(H.current),customer_note:_,create_account:S,...e,extensions:{...k}};A&&(t.shipping_address=Object(f.a)(z.current)),m()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&x(e.data.cart),V(Object(h.b)(e),{id:"checkout",context:"wc/checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{V(e.message,{id:e.error_code,context:"wc/checkout"})}),r.setAfterProcessing(e)})}catch{var t;V(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout"})}r.setHasError(!0),q(!1)})},[Y,B,T,W,I,F,P,_,S,k,A,r,V,x]);return Object(n.useEffect)(()=>{$&&!Y&&J()},[J,$,Y]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(i.a,null,Object(n.createElement)(a.a,null,t,Object(n.createElement)(c.a,{renderError:s.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(_,null)))))}},,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(0);const o=Object(n.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),s=(Object(n.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),()=>Object(n.useContext)(o))},function(e,t){e.exports=window.wp.keycodes},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},,,,,,,,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-cart-items-block","version":"1.0.0","title":"Cart Items","description":"Shows cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"showCompanyField":{"type":"boolean","default":false},"requireCompanyField":{"type":"boolean","default":false},"allowCreateAccount":{"type":"boolean","default":false},"showApartmentField":{"type":"boolean","default":true},"showPhoneField":{"type":"boolean","default":true},"requirePhoneField":{"type":"boolean","default":false}},"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(4),s=r(13),c=r.n(s);const a=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(n.useContext)(a),l=e=>{let{children:t}=e;const[r,s]=Object(n.useState)({}),i=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{s(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{s({})},[]),p=Object(n.useCallback)(e=>{e&&s(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),m=Object(n.useCallback)((e,t)=>{s(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return c()(r[e],n)?r:{...r,[e]:n}})},[]),f={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{m(e,{hidden:!0})},[m]),showValidationError:Object(n.useCallback)(e=>{m(e,{hidden:!1})},[m]),showAllValidationErrors:Object(n.useCallback)(()=>{s(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(a.Provider,{value:f},t)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(93);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const s=n.a.addEventCallback(e,r,o);return t(s),()=>{t(n.a.removeEventCallback(e,s.id))}}},function(e,t){},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return c}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(31);const s=async(e,t,r)=>{const o=n(e,t),s=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&s.push(t)}catch(e){console.error(e)}return!s.length||s},c=async(e,t,r)=>{const s=[],c=n(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return s.push(t),s;s.push(t)}catch(e){return console.error(e),s.push({type:"error"}),s}return s}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return U})),r.d(t,"a",(function(){return V}));var n=r(0),o=r(20),s=r(8);let c,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(c||(c={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const i={currentStatus:c.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:c,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:s={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case c.PRISTINE:return{...i,...e,errorMessage:"",currentStatus:c.PRISTINE};case c.STARTED:return{...e,currentStatus:c.STARTED};case c.ERROR:return e.currentStatus!==c.ERROR?{...e,currentStatus:c.ERROR,errorMessage:o||e.errorMessage}:e;case c.FAILED:return e.currentStatus!==c.FAILED?{...e,currentStatus:c.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case c.SUCCESS:return e.currentStatus!==c.SUCCESS?{...e,currentStatus:c.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case c.PROCESSING:return e.currentStatus!==c.PROCESSING?{...e,currentStatus:c.PROCESSING,errorMessage:""}:e;case c.COMPLETE:return e.currentStatus!==c.COMPLETE?{...e,currentStatus:c.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:s};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:s};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},d=r(1),p=r(17),m=r(32),f=r(2),h=r(50),b=r(23),g=r.n(b),E=r(29),y=r(49),O=r(33),v=r(31),_=r(64);const S=(e,t,r,o)=>{const[c,a]=Object(n.useState)(!1),{isEditor:i}=Object(E.a)(),{selectedRates:l}=Object(_.a)(),{billingAddress:u,shippingAddress:p}=Object(y.b)(),b=Object(m.a)(l),v=Object(m.a)(r),S=Object(O.a)(),{cartTotals:k,cartIsLoading:w,cartNeedsShipping:j,paymentRequirements:C}=S,R=Object(n.useRef)({cart:S,cartTotals:k,cartNeedsShipping:j,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:C}),{createErrorNotice:T}=Object(s.useDispatch)("core/notices");Object(n.useEffect)(()=>{R.current={cart:S,cartTotals:k,cartNeedsShipping:j,get billingData(){return g()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:C}},[S,k,j,u,p,b,C]);const A=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<v.length;e++){const r=v[e],s=t[r];if(s)try{const e=!!i||await Promise.resolve(s.canMakePayment(R.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(s)}}catch(e){if(f.CURRENT_USER_IS_ADMIN||i){const t=Object(d.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
6
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),s.paymentMethodId);T(`${t} ${e}`,{context:o,id:`wc-${s.paymentMethodId}-registration-error`})}}}e(r),a(!0)},[T,e,i,o,v,t]),x=Object(h.a)(A,500,{leading:!0});return Object(n.useEffect)(()=>{w||x()},[x,S,b,u,w]),c},k=e=>({type:e}),w=e=>({type:c.ERROR,errorMessage:e}),j=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:c.FAILED,errorMessage:t,paymentMethodData:r}},C=e=>{let{paymentMethodData:t}=e;return{type:c.SUCCESS,paymentMethodData:t}},R=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),T=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),A=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),x=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var P=r(66),M=r(35),N=r(93),I=r(201);var D=r(203),L=r(198);const F=Object(n.createContext)(l),U=()=>Object(n.useContext)(F),V=e=>{let{children:t}=e;const{isProcessing:r,isIdle:a,isCalculating:l,hasError:d}=Object(M.b)(),{isEditor:m,getPreviewData:h}=Object(E.a)(),{setValidationErrors:b}=Object(L.b)(),{createErrorNotice:g,removeNotice:y}=Object(s.useDispatch)("core/notices"),{isSuccessResponse:O,isErrorResponse:_,isFailResponse:U,noticeContexts:V}=Object(v.d)(),[B,H]=Object(n.useReducer)(N.b,{}),{onPaymentProcessing:z}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(I.a)("payment_processing",e)}),[e]))(H),G=Object(n.useRef)(B);Object(n.useEffect)(()=>{G.current=B},[B]);const[Y,q]=Object(n.useReducer)(u,i),{dispatchActions:W,setPaymentStatus:K}=(e=>{const{setBillingAddress:t,setShippingAddress:r}=Object(P.a)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(R(t))},setRegisteredExpressPaymentMethods:t=>{e(T(t))},setShouldSavePayment:t=>{e(A(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(x(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(k(c.PRISTINE)),started:()=>e(k(c.STARTED)),processing:()=>e(k(c.PROCESSING)),completed:()=>e(k(c.COMPLETE)),error:t=>e(w(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(j({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof s&&null!=s&&s.address&&r(s.address),e(C({paymentMethodData:n}))}}),[e,t,r])}})(q),$=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:r}=Object(v.d)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return S(e,t,Array.from(n),r.PAYMENTS)})(W.setRegisteredPaymentMethods),X=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.d)();return S(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),J=Object(n.useMemo)(()=>m?h("previewSavedPaymentMethods"):$?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(Y.paymentMethods):{},[m,h,$,Y.paymentMethods]),Q=Object(n.useCallback)(e=>{e?g(e,{id:"wc-express-payment-error",context:V.EXPRESS_PAYMENTS}):y("wc-express-payment-error",V.EXPRESS_PAYMENTS)},[g,V.EXPRESS_PAYMENTS,y]),Z=Object.keys(Y.expressPaymentMethods).includes(Y.activePaymentMethod),ee=Object(n.useMemo)(()=>({isPristine:Y.currentStatus===c.PRISTINE,isStarted:Y.currentStatus===c.STARTED,isProcessing:Y.currentStatus===c.PROCESSING,isFinished:[c.ERROR,c.FAILED,c.SUCCESS].includes(Y.currentStatus),hasError:Y.currentStatus===c.ERROR,hasFailed:Y.currentStatus===c.FAILED,isSuccessful:Y.currentStatus===c.SUCCESS,isDoingExpressPayment:Y.currentStatus!==c.PRISTINE&&Z}),[Y.currentStatus,Z]);Object(n.useEffect)(()=>{const e=Object.keys(Y.paymentMethods);if(!$||!e.length)return;const t=[...e,...Object.keys(Y.expressPaymentMethods)];if(Y.activePaymentMethod&&t.includes(Y.activePaymentMethod))return;K().pristine();const r=Object.keys(J).flatMap(e=>J[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(Y.paymentMethods)[0])},[$,Y.paymentMethods,Y.expressPaymentMethods,W,K,Y.activePaymentMethod,J]),Object(n.useEffect)(()=>{!r||d||l||ee.isFinished||K().processing()},[r,d,l,ee.isFinished,K]),Object(n.useEffect)(()=>{a&&!ee.isSuccessful&&K().pristine()},[a,ee.isSuccessful,K]),Object(n.useEffect)(()=>{d&&ee.isSuccessful&&K().pristine()},[d,ee.isSuccessful,K]),Object(n.useEffect)(()=>{ee.isProcessing&&(y("wc-payment-error",V.PAYMENTS),Object(D.b)(G.current,"payment_processing",{}).then(e=>{let t,r;var n,o,s,c,a,i;if(e.forEach(e=>{O(e)&&(t=e),(_(e)||U(e))&&(r=e)}),t&&!r)K().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(s=t)||void 0===s||null===(c=s.meta)||void 0===c?void 0:c.billingAddress,null===(a=t)||void 0===a||null===(i=a.meta)||void 0===i?void 0:i.shippingData);else if(r&&U(r)){var l,u,d,p,m,f;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(f=r)||void 0===f?void 0:f.messageContext)||V.PAYMENTS}),K().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(m=p.meta)||void 0===m?void 0:m.billingAddress)}else if(r){var h,E;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(E=r)||void 0===E?void 0:E.messageContext)||V.PAYMENTS}),K().error(r.message),b(null===(h=r)||void 0===h?void 0:h.validationErrors)}else K().success()}))},[ee.isProcessing,b,K,y,V.PAYMENTS,O,U,_,g]);const te="object"==typeof Y.paymentMethodData&&Object(o.b)(Y.paymentMethodData,"token")?Y.paymentMethodData.token+"":"",re={setPaymentStatus:K,currentStatus:ee,paymentStatuses:c,paymentMethodData:Y.paymentMethodData,errorMessage:Y.errorMessage,activePaymentMethod:Y.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:z,customerPaymentMethods:J,paymentMethods:Y.paymentMethods,expressPaymentMethods:Y.expressPaymentMethods,paymentMethodsInitialized:$,expressPaymentMethodsInitialized:X,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:Y.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(n.createElement)(F.Provider,{value:re},t)}},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(241)},function(e,t){},function(e,t){},function(e,t){},,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(145),s=r(33),c=r(13),a=r.n(c),i=r(35),l=r(198),u=r(17),d=r(127),p=r(46),m=r(10),f={CHECKOUT_ACTIONS:r(167),CHECKOUT_BILLING_ADDRESS:r(168),CHECKOUT_CONTACT_INFORMATION:r(169),CHECKOUT_EXPRESS_PAYMENT:r(170),CHECKOUT_FIELDS:r(171),CHECKOUT_ORDER_NOTE:r(172),CHECKOUT_PAYMENT:r(173),CHECKOUT_SHIPPING_ADDRESS:r(174),CHECKOUT_SHIPPING_METHODS:r(175),CHECKOUT_TERMS:r(176),CHECKOUT_TOTALS:r(177),CHECKOUT_ORDER_SUMMARY:r(178),CHECKOUT_ORDER_SUMMARY_SUBTOTAL:r(179),CHECKOUT_ORDER_SUMMARY_FEE:r(180),CHECKOUT_ORDER_SUMMARY_DISCOUNT:r(181),CHECKOUT_ORDER_SUMMARY_SHIPPING:r(182),CHECKOUT_ORDER_SUMMARY_COUPON_FORM:r(183),CHECKOUT_ORDER_SUMMARY_TAXES:r(184),CHECKOUT_ORDER_SUMMARY_CART_ITEMS:r(185)};r.p=p.k,Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_FIELDS,component:Object(n.lazy)(()=>r.e(33).then(r.bind(null,422)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_EXPRESS_PAYMENT,component:Object(n.lazy)(()=>r.e(32).then(r.bind(null,459)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_CONTACT_INFORMATION,component:Object(n.lazy)(()=>r.e(31).then(r.bind(null,438)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_SHIPPING_ADDRESS,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(2),r.e(6),r.e(44)]).then(r.bind(null,444)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_BILLING_ADDRESS,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(2),r.e(6),r.e(30)]).then(r.bind(null,445)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_SHIPPING_METHODS,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(45)]).then(r.bind(null,437)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_PAYMENT,component:Object(n.lazy)(()=>r.e(43).then(r.bind(null,433)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_NOTE,component:Object(n.lazy)(()=>r.e(34).then(r.bind(null,446)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_TERMS,component:Object(n.lazy)(()=>r.e(46).then(r.bind(null,460)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ACTIONS,component:Object(n.lazy)(()=>r.e(29).then(r.bind(null,436)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_TOTALS,component:Object(n.lazy)(()=>r.e(47).then(r.bind(null,423)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(35)]).then(r.bind(null,461)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_CART_ITEMS,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(36)]).then(r.bind(null,439)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_SUBTOTAL,component:Object(n.lazy)(()=>r.e(41).then(r.bind(null,462)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_FEE,component:Object(n.lazy)(()=>r.e(39).then(r.bind(null,463)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_DISCOUNT,component:Object(n.lazy)(()=>r.e(38).then(r.bind(null,464)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_COUPON_FORM,component:Object(n.lazy)(()=>r.e(37).then(r.bind(null,465)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_SHIPPING,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(5),r.e(40)]).then(r.bind(null,466)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_TAXES,component:Object(n.lazy)(()=>r.e(42).then(r.bind(null,447)))});var h=r(1),b=r(5),g=r.n(b),E=r(251),y=r(132),O=r(124),v=r(16),_=r(254),S=r(2),k=r(75),w=(r(232),r(14)),j=Object(n.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"})),C=r(104);r(233);var R=()=>Object(n.createElement)("div",{className:"wc-block-checkout-empty"},Object(n.createElement)(C.a,{className:"wc-block-checkout-empty__image",icon:j,size:100}),Object(n.createElement)("strong",{className:"wc-block-checkout-empty__title"},Object(h.__)("Your cart is empty!","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-empty__description"},Object(h.__)("Checkout is not available whilst your cart is empty—please take a look through our store and come back when you're ready to place an order.","woo-gutenberg-products-block")),p.i&&Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:p.i,className:"wp-block-button__link"},Object(h.__)("Browse store","woo-gutenberg-products-block")))),T=Object(n.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),A=r(18);r(234);const x=["woocommerce_rest_product_out_of_stock","woocommerce_rest_product_not_purchasable","woocommerce_rest_product_partially_out_of_stock","woocommerce_rest_product_too_many_in_cart","woocommerce_rest_cart_item_error"],P=Object(S.getSetting)("checkoutData",{}),M=e=>{let{errorData:t}=e,r=Object(h.__)("Checkout error","woo-gutenberg-products-block");return x.includes(t.code)&&(r=Object(h.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(n.createElement)("strong",{className:"wc-block-checkout-error_title"},r)},N=e=>{let{errorData:t}=e,r=t.message;return x.includes(t.code)&&(r=r+" "+Object(h.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-error__description"},r)},I=e=>{let{errorData:t}=e,r=Object(h.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return x.includes(t.code)&&(r=Object(h.__)("Edit your cart","woo-gutenberg-products-block"),o=p.c),Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:o,className:"wp-block-button__link"},r))};var D=()=>{const e={code:"",message:"",...P||{}},t={code:e.code||"unknown",message:Object(A.decodeEntities)(e.message)||Object(h.__)("There was a problem checking out. Please try again. If the problem persists, please get in touch with us so we can assist.","woo-gutenberg-products-block")};return Object(n.createElement)("div",{className:"wc-block-checkout-error"},Object(n.createElement)(C.a,{className:"wc-block-checkout-error__image",icon:T,size:100}),Object(n.createElement)(M,{errorData:t}),Object(n.createElement)(N,{errorData:t}),Object(n.createElement)(I,{errorData:t}))};const L=`${p.e}?redirect_to=${encodeURIComponent(window.location.href)}`,F=()=>{window.location.reload(!0)};var U=r(141),V=r(79),B=r(59);const H=()=>Object(n.createElement)(n.Fragment,null,Object(h.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:L},Object(h.__)("Click here to log in.","woo-gutenberg-products-block"))),z=e=>{let{attributes:t,children:r}=e;const{hasOrder:o,customerId:c}=Object(i.b)(),{cartItems:a,cartIsLoading:l}=Object(s.a)(),{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:m,showPhoneField:f,requirePhoneField:h}=t;return l||0!==a.length?o?((e=>!e&&!Object(S.getSetting)("checkoutAllowsGuest",!1))(c)&&u&&Object(S.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(H,null),Object(n.createElement)(U.a.Provider,{value:{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:m,showPhoneField:f,requirePhoneField:h}},r)):Object(n.createElement)(D,null):Object(n.createElement)(R,null)},G=e=>{let{scrollToTop:t}=e;const{hasError:r,isIdle:o}=Object(i.b)(),{hasValidationErrors:s,showAllValidationErrors:c}=Object(l.b)(),a=o&&r&&(s||Object(V.a)("wc/checkout","default"));return Object(n.useEffect)(()=>{let e;return a&&(c(),e=window.setTimeout(()=>{t({focusableSelector:"input:invalid, .has-error input"})},50)),()=>{clearTimeout(e)}},[a,t,c]),null};var Y=Object(k.a)(e=>{let{attributes:t,children:r,scrollToTop:o}=e;return Object(n.createElement)(v.a,{header:Object(h.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(n.createInterpolateElement)(Object(h.__)("The checkout has encountered an unexpected error. <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:Object(n.createElement)("button",{className:"wc-block-link-button",onClick:F})}),showErrorMessage:S.CURRENT_USER_IS_ADMIN},Object(n.createElement)(E.a,{context:"wc/checkout"}),Object(n.createElement)(B.a,null,Object(n.createElement)(O.a,{context:"wc/checkout"}),Object(n.createElement)(l.a,null,Object(n.createElement)(m.SlotFillProvider,null,Object(n.createElement)(y.a,null,Object(n.createElement)(_.a,{className:g()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(n.createElement)(z,{attributes:t},r),Object(n.createElement)(G,{scrollToTop:o})))))))});const q={hasDarkControls:{type:"boolean",default:Object(S.getSetting)("hasDarkEditorStyleSupport",!1)},showRateAfterTaxName:{type:"boolean",default:Object(S.getSetting)("displayCartPricesIncludingTax",!1)}};var W=r(186);Object(d.a)({Block:Y,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:e=>({attributes:Object(o.a)({...W.attributes,...q},e instanceof HTMLElement?e.dataset:{})}),blockMap:Object(u.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:o,...c}=Object(s.a)(),u=(()=>{const{dispatchActions:e,extensionData:t}=Object(i.b)(),r=Object(n.useRef)(t);Object(n.useEffect)(()=>{a()(t,r.current)||(r.current=t)},[t]);const o=Object(n.useCallback)((t,n,o)=>{const s=r.current[t]||{};e.setExtensionData({...r.current,[t]:{...s,[n]:o}})},[e]);return{extensionData:r.current,setExtensionData:o}})(),d=(()=>{const{hasValidationErrors:e,getValidationError:t,clearValidationError:r,hideValidationError:o,setValidationErrors:s}=Object(l.b)(),c="extensions-errors";return{hasValidationErrors:e,getValidationError:Object(n.useCallback)(e=>t(`${c}-${e}`),[t]),clearValidationError:Object(n.useCallback)(e=>r(`${c}-${e}`),[r]),hideValidationError:Object(n.useCallback)(e=>o(`${c}-${e}`),[o]),setValidationErrors:Object(n.useCallback)(e=>s(Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[`${c}-${t}`,r]}))),[s])}})();return n.Children.map(t,e=>{if(Object(n.isValidElement)(e)){const t={extensions:r,cart:c,checkoutExtensionData:u,validation:d};return Object(n.cloneElement)(e,t)}return e})}})},,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(11),s=r(5),c=r.n(s);const a=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(n.useContext)(a),l=e=>{let{children:t,className:r=""}=e;const[s,i]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let r="";return t>700?r="is-large":t>520?r="is-medium":t>400?r="is-small":t&&(r="is-mobile"),[e,r]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(n.createElement)(a.Provider,{value:l},Object(n.createElement)("div",{className:c()(r,i)},s,t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(0),o=r(7),s=r(5),c=r.n(s),a=r(4),i=r(95),l=r(11),u=r(111),d=function({notices:e,className:t,children:r,onRemove:s=a.noop}){const d=Object(l.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),m=Object(i.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:d});t=c()("components-snackbar-list",t);const f=e=>()=>s(e.id);return Object(n.createElement)("div",{className:t},r,m.map(({item:e,key:t,props:r})=>Object(n.createElement)(i.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(u.a,Object(o.a)({},Object(a.omit)(e,["content"]),{onRemove:f(e)}),e.content)))))},p=r(10),m=r(8),f=r(29);const h={},b=e=>{let{className:t,context:r="default"}=e;const{isEditor:o}=Object(f.a)(),{notices:s}=Object(m.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:a}=Object(m.useDispatch)("core/notices");if(o)return null;const i=s.filter(e=>"snackbar"===e.type),l=i.length>0?i.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):h,u=Object(p.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:l}),b=i.filter(e=>!0===u[e.content]),g=c()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(d,{notices:b,className:g,onRemove:()=>{b.forEach(e=>a(e.id,r))}})}},,,function(e,t,r){"use strict";var n=r(0),o=r(5),s=r.n(o),c=r(250);r(202),t.a=e=>{let{children:t,className:r}=e;return Object(n.createElement)(c.a,{className:s()("wc-block-components-sidebar-layout",r)},t)}}]);
1
+ !function(e){function t(t){for(var r,o,s=t[0],c=t[1],a=0,l=[];a<s.length;a++)o=s[a],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(i&&i(t);l.length;)l.shift()()}var r={},n={28:0,7:0,73:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var s=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=s);var c,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",1:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6",2:"vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--5b8feb0b",3:"vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542",5:"cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping",6:"checkout-blocks/billing-address--checkout-blocks/shipping-address",29:"checkout-blocks/actions",30:"checkout-blocks/billing-address",31:"checkout-blocks/contact-information",32:"checkout-blocks/express-payment",33:"checkout-blocks/fields",34:"checkout-blocks/order-note",35:"checkout-blocks/order-summary",36:"checkout-blocks/order-summary-cart-items",37:"checkout-blocks/order-summary-coupon-form",38:"checkout-blocks/order-summary-discount",39:"checkout-blocks/order-summary-fee",40:"checkout-blocks/order-summary-shipping",41:"checkout-blocks/order-summary-subtotal",42:"checkout-blocks/order-summary-taxes",43:"checkout-blocks/payment",44:"checkout-blocks/shipping-address",45:"checkout-blocks/shipping-methods",46:"checkout-blocks/terms",47:"checkout-blocks/totals"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",1:"cc9016fd3805a088b2e8",2:"2448287d629e9e796e22",3:"80c939d54508b87a9652",5:"f8bfba42e82e44056456",6:"d106e1b51eee9e100b38",29:"018f9ac612dc5355ef5d",30:"b70903a5fd2389fed3a5",31:"63b5c83a4511bd1a8306",32:"7b97f8422fda50418f6f",33:"dcfd2651555d5b7c5e52",34:"cca08756e43db036129a",35:"ef1e2946ccf0434835d9",36:"8fd1c24d3dce6e19e05f",37:"7aeedb020ec9b693071e",38:"22e7c12201c353e659f4",39:"8648d854068bbb8fbd44",40:"366876675bcff1d6b6b3",41:"0d2791127956717dcc1d",42:"062b14dc0fdb361c51ab",43:"9a940164982bc97cd090",44:"4d7f581dcd25c019513f",45:"c2241b5156eb2b69fb78",46:"4495b932da4304fa8fa4",47:"be39ad0fc9ad707248d0"}[e]}(e);var i=new Error;c=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+s+")",i.name="ChunkLoadError",i.type=o,i.request=s,r[1](i)}n[e]=void 0}};var l=setTimeout((function(){c({type:"timeout",target:a})}),12e4);a.onerror=a.onload=c,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],c=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var i=c;o(o.s=231)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var c=o.apply(null,n);c&&e.push(c)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.wc.blocksCheckout},function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),s=r(0),c=r(3),a=r(1),i=r(46),l=e=>{let{imageUrl:t=i.l+"/block-error.svg",header:r=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:c=Object(a.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",o),l&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends c.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:c,renderError:a,button:i}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof a?a({errorMessage:u}):Object(s.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:c,button:i}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},function(e,t){e.exports=window.wp.a11y},function(e,t,r){"use strict";(function(e){var n=r(0);r(36);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(54))},function(e,t){e.exports=window.wp.deprecated},,,,,function(e,t){e.exports=window.wp.apiFetch},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(n.useContext)(o)},,function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"d",(function(){return d}));var n=r(20);let o,s;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(s||(s={}));const c=(e,t)=>Object(n.a)(e)&&"type"in e&&e.type===t,a=e=>c(e,o.SUCCESS),i=e=>c(e,o.ERROR),l=e=>c(e,o.FAIL),u=e=>!Object(n.a)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:s,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:l})},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=r(13),s=r.n(o);function c(e){const t=Object(n.useRef)(e);return s()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(4),o=r(0),s=r(6),c=r(8),a=r(18),i=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(c.dispatch)(s.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...f,email:""},b={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:s.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},g=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(a.decodeEntities)(r)]})),E={cartCoupons:s.EMPTY_CART_COUPONS,cartItems:s.EMPTY_CART_ITEMS,cartFees:s.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:b,cartIsLoading:!0,cartErrors:s.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:f,shippingRates:s.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:s.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:s.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),a=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();m();const p=Object(c.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return E;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:s.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:s.EMPTY_CART_ERRORS,billingData:h,billingAddress:h,shippingAddress:f,extensions:s.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(s.CART_STORE_KEY),c=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),{receiveCart:b}=n(s.CART_STORE_KEY),y=g(c.billingAddress),O=c.needsShipping?g(c.shippingAddress):y,v=c.fees.length>0?c.fees.map(e=>g(e)):s.EMPTY_CART_FEES;return{cartCoupons:c.coupons.length>0?c.coupons.map(e=>({...e,label:e.code})):s.EMPTY_CART_COUPONS,cartItems:c.items,cartFees:v,cartItemsCount:c.itemsCount,cartItemsWeight:c.itemsWeight,cartNeedsPayment:c.needsPayment,cartNeedsShipping:c.needsShipping,cartItemErrors:c.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(i.a)(y),billingAddress:Object(i.a)(y),shippingAddress:Object(i.a)(O),extensions:c.extensions,shippingRates:c.shippingRates,isLoadingRates:m,cartHasCalculatedShipping:c.hasCalculatedShipping,paymentRequirements:c.paymentRequirements,receiveCart:b}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},function(e,t,r){"use strict";r.d(t,"b",(function(){return x})),r.d(t,"a",(function(){return P}));var n=r(0),o=r(1),s=r(60),c=r(23),a=r.n(c),i=r(52),l=r(20),u=r(8);let d;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS="set_shipping_address_as_billing_address",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(d||(d={}));const p=()=>({type:d.SET_IDLE}),m=e=>({type:d.SET_REDIRECT_URL,redirectUrl:e}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:d.SET_COMPLETE,data:e}},h=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?d.SET_HAS_ERROR:d.SET_NO_ERROR}};var b=r(2),g=r(117);let E;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(E||(E={}));const y={order_id:0,customer_id:0,billing_address:{},shipping_address:{},...Object(b.getSetting)("checkoutData",{})||{}},O={redirectUrl:"",status:E.PRISTINE,hasError:!1,calculatingCount:0,orderId:y.order_id,orderNotes:"",customerId:y.customer_id,useShippingAsBilling:Object(g.b)(y.billing_address,y.shipping_address),shouldCreateAccount:!1,processingResponse:null,extensionData:{}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:s,extensionData:c,useShippingAsBilling:a,shouldCreateAccount:i,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case d.SET_PRISTINE:u=O;break;case d.SET_IDLE:u=e.status!==E.IDLE?{...e,status:E.IDLE}:e;break;case d.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case d.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case d.SET_COMPLETE:u=e.status!==E.COMPLETE?{...e,status:E.COMPLETE,redirectUrl:"string"==typeof(null==l?void 0:l.redirectUrl)?l.redirectUrl:e.redirectUrl}:e;break;case d.SET_PROCESSING:u=e.status!==E.PROCESSING?{...e,status:E.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case d.SET_BEFORE_PROCESSING:u=e.status!==E.BEFORE_PROCESSING?{...e,status:E.BEFORE_PROCESSING,hasError:!1}:e;break;case d.SET_AFTER_PROCESSING:u=e.status!==E.AFTER_PROCESSING?{...e,status:E.AFTER_PROCESSING}:e;break;case d.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===E.PROCESSING||e.status===E.BEFORE_PROCESSING?{...u,status:E.IDLE}:u;break;case d.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case d.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case d.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case d.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case d.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:void 0!==a&&a!==e.useShippingAsBilling&&(u={...e,useShippingAsBilling:a});break;case d.SET_SHOULD_CREATE_ACCOUNT:void 0!==i&&i!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:i});break;case d.SET_ORDER_NOTES:void 0!==s&&e.orderNotes!==s&&(u={...e,orderNotes:s});break;case d.SET_EXTENSION_DATA:void 0!==c&&e.extensionData!==c&&(u={...e,extensionData:c})}return u!==e&&r!==d.SET_PRISTINE&&u.status===E.PRISTINE&&(u.status=E.IDLE),u};var _=r(18),S=r(93),k=r(201);var w=r(203),j=r(198),C=r(58),R=r(31),T=r(79);const A=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,useShippingAsBilling:!1,setUseShippingAsBilling:e=>{},shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),x=()=>Object(n.useContext)(A),P=e=>{let{children:t,redirectUrl:r,isCart:c=!1}=e;O.redirectUrl=r;const[b,g]=Object(n.useReducer)(v,O),{setValidationErrors:y}=Object(j.b)(),{createErrorNotice:x}=Object(u.useDispatch)("core/notices"),{dispatchCheckoutEvent:P}=Object(C.a)(),M=b.calculatingCount>0,{isSuccessResponse:N,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(R.d)(),{checkoutNotices:F,paymentNotices:U,expressPaymentNotices:V}=(()=>{const{noticeContexts:e}=Object(R.d)();return{checkoutNotices:Object(u.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(u.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[B,H]=Object(n.useReducer)(S.b,{}),z=Object(n.useRef)(B),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:Y,onCheckoutValidationBeforeProcessing:q}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(k.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(k.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(k.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{z.current=B},[B]);const W=Object(n.useMemo)(()=>function(){return a()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),K=Object(n.useMemo)(()=>({resetCheckout:()=>{g({type:d.SET_PRISTINE})},setRedirectUrl:e=>{g(m(e))},setHasError:e=>{g(h(e))},incrementCalculating:()=>{g({type:d.INCREMENT_CALCULATING})},decrementCalculating:()=>{g({type:d.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;g((t=e,{type:d.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{g((e=>({type:d.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{g((e=>({type:d.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{g((e=>({type:d.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(_.decodeEntities)(n)})),"message"in e&&(t.message=Object(_.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;g(m((null==t?void 0:t.redirectUrl)||"")),g((r=t,{type:d.SET_PROCESSING_RESPONSE,data:r})),g({type:d.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{b.status===E.BEFORE_PROCESSING&&(Object(T.b)("error"),Object(w.a)(z.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;x(t,{context:"wc/checkout"}),y(r)}),g(p()),g(h())):g({type:d.SET_PROCESSING})}))},[b.status,y,x,g]);const $=Object(s.a)(b.status),X=Object(s.a)(b.hasError);Object(n.useEffect)(()=>{if((b.status!==$||b.hasError!==X)&&b.status===E.AFTER_PROCESSING){const e={redirectUrl:b.redirectUrl,orderId:b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,processingResponse:b.processingResponse};b.hasError?Object(w.b)(z.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message&&Object(i.a)(e.message)){const r=e.messageContext&&Object(i.a)(e.messageContent)?{context:e.messageContext}:void 0;t=e,x(e.message,r)}}),t})(t);if(null!==r)L(r)?g(p()):g(f(r));else{if(!(F.some(e=>"error"===e.status)||V.some(e=>"error"===e.status)||U.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(t,{id:"checkout",context:"wc/checkout"})}g(p())}}):Object(w.b)(z.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{N(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)g(f(t));else if(Object(l.a)(r)){if(r.message&&Object(i.a)(r.message)){const e=r.messageContext&&Object(i.a)(r.messageContext)?{context:r.messageContext}:void 0;x(r.message,e)}L(r)?g(h(!0)):g(f(r))}else g(f())})}},[b.status,b.hasError,b.redirectUrl,b.orderId,b.customerId,b.orderNotes,b.processingResponse,$,X,K,x,I,D,N,L,F,V,U]);const J={onSubmit:Object(n.useCallback)(()=>{P("submit"),g({type:d.SET_BEFORE_PROCESSING})},[P]),isComplete:b.status===E.COMPLETE,isIdle:b.status===E.IDLE,isCalculating:M,isProcessing:b.status===E.PROCESSING,isBeforeProcessing:b.status===E.BEFORE_PROCESSING,isAfterProcessing:b.status===E.AFTER_PROCESSING,hasError:b.hasError,redirectUrl:b.redirectUrl,onCheckoutBeforeProcessing:W,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:Y,dispatchActions:K,isCart:c,orderId:b.orderId,hasOrder:!!b.orderId,customerId:b.customerId,orderNotes:b.orderNotes,useShippingAsBilling:b.useShippingAsBilling,setUseShippingAsBilling:e=>{return g((t=e,{type:d.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,useShippingAsBilling:t}));var t},shouldCreateAccount:b.shouldCreateAccount,setShouldCreateAccount:e=>{return g((t=e,{type:d.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:b.extensionData};return Object(n.createElement)(A.Provider,{value:J},t)}},function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(14),c=function({icon:e,className:t,...r}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:s},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(c,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&c===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===s.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(s.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(5),o=r.n(n),s=r(0);t.a=Object(s.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(s.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},function(e,t,r){"use strict";var n=r(7),o=r(0),s=r(5),c=r.n(s),a=r(4),i=r(23),l=r.n(i),u=r(11),d=r(44),p=r(70),m=r(1);function f(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const s=o.getBoundingClientRect();return new n.DOMRect(e.left+s.left,e.top+s.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function E(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var y=r(22);function O(e){const t=Object(o.useContext)(y.a),r=t.slots[e]||{},n=t.fills[e],s=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:s,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var v=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const s=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(v),[n,s]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(s(t(e)),r(()=>{s(t(e))})),[e]),n})(e),c=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,c.current),()=>n(e,c.current)),[]),Object(o.useLayoutEffect)(()=>{c.current.children=t,s&&s.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==c.current.name&&(n(c.current.name,c.current),c.current.name=e,r(e,c.current))},[e]),s&&s.node?(Object(a.isFunction)(t)&&(t=t(s.props.fillProps)),Object(o.createPortal)(t,s.node)):null}var S=e=>Object(o.createElement)(v.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,s=Object(a.map)(n(t,this),e=>{const t=Object(a.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(a.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(a.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(a.isFunction)(e)?e(s):s)}}var w=e=>Object(o.createElement)(v.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:s})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:s})));function j(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=O(e),n=Object(o.useRef)({rerender:j()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...s},c){const a=Object(o.useContext)(y.a),i=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(a.registerSlot(e,i,t),()=>{a.unregisterSlot(e,i)}),[a.registerSlot,a.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{a.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([c,i])},s))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(C,e))}r(13),o.Component;const A=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function x(e){return"appear"===e?"top":"left"}function P(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:s}=(c=t).ownerDocument.defaultView.getComputedStyle(c);var c;const a=r?parseInt(r,10):0,i=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=s?parseInt(s,10):0;return{x:e.left+l,y:e.top+a,width:e.width-l-u,height:e.height-a-i,left:e.left+l,right:e.right-u,top:e.top+a,bottom:e.bottom-i}}function M(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function N(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:s,noArrow:a=!0,isAlternate:i,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:y,shouldAnchorIncludePadding:v,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:w=!0,onClickOutside:j,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:A="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:U,...V},B)=>{const H=Object(o.useRef)(null),z=Object(o.useRef)(null),G=Object(o.useRef)(),Y=Object(u.useViewportMatch)("medium","<"),[q,K]=Object(o.useState)(),$=O(A),X=k&&Y,[J,Q]=Object(u.useResizeObserver)();a=X||a,Object(o.useLayoutEffect)(()=>{if(X)return I(G.current,"is-without-arrow",a),I(G.current,"is-alternate",i),M(G.current,"data-x-axis"),M(G.current,"data-y-axis"),N(G.current,"top"),N(G.current,"left"),N(z.current,"maxHeight"),void N(z.current,"maxWidth");const e=()=>{if(!G.current||!z.current)return;let e=function(e,t,r,n=!1,o,s){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return f(t,t.ownerDocument||e.current.ownerDocument,s)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return f(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,s);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=f(n.getBoundingClientRect(),n.ownerDocument,s);return o?e:P(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),c=t.getBoundingClientRect(),a=f(new window.DOMRect(r.left,r.top,r.width,c.bottom-r.top),e.ownerDocument,s);return o?a:P(a,n)}if(!e.current)return;const{parentNode:c}=e.current,a=c.getBoundingClientRect();return o?a:P(a,c)}(H,_,S,y,v,G.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=G.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var s;L&&(n=null===(s=G.current.closest(".popover-slot"))||void 0===s?void 0:s.parentNode);const c=Q.height?Q:z.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:E}=function(e,t,r="top",n,o,s,c,a,i){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,s,c,a){const{height:i}=t;if(o){const t=o.getBoundingClientRect().top+i-c;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-i/2>0?i/2:l)+(l+i/2>window.innerHeight?window.innerHeight-l:i/2)},d={popoverTop:e.top,contentHeight:e.top-10-i>0?i:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+i>window.innerHeight?window.innerHeight-10-e.bottom:i};let m,f=r,h=null;if(!o&&!a)if("middle"===r&&u.contentHeight===i)f="middle";else if("top"===r&&d.contentHeight===i)f="top";else if("bottom"===r&&p.contentHeight===i)f="bottom";else{f=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===f?d.contentHeight:p.contentHeight;h=e!==i?e:null}return m="middle"===f?u.popoverTop:"top"===f?d.popoverTop:p.popoverTop,{yAxis:f,popoverTop:m,contentHeight:h}}(e,t,l,d,n,0,s,a);return{...function(e,t,r,n,o,s,c,a,i){const{width:l}=t;"left"===r&&Object(m.isRTL)()?r="right":"right"===r&&Object(m.isRTL)()&&(r="left"),"left"===n&&Object(m.isRTL)()?n="right":"right"===n&&Object(m.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===s||i||(p=u);let f=e.right;"left"===n?f=e.left:"middle"===s||i||(f=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let g,E=r,y=null;if(!o&&!a)if("center"===r&&d.contentWidth===l)E="center";else if("left"===r&&h.contentWidth===l)E="left";else if("right"===r&&b.contentWidth===l)E="right";else{E=h.contentWidth>b.contentWidth?"left":"right";const e="left"===E?h.contentWidth:b.contentWidth;l>window.innerWidth&&(y=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===E?d.popoverLeft:"left"===E?h.popoverLeft:b.popoverLeft,c){const e=c.getBoundingClientRect();g=Math.min(g,e.right-l),Object(m.isRTL)()||(g=Math.max(g,0))}return{xAxis:E,popoverLeft:g,contentWidth:y}}(e,t,u,d,n,p.yAxis,c,a,i),...p}}(e,c,h,R,G.current,o,n,F,U);"number"==typeof l&&"number"==typeof u&&(N(G.current,"top",l+"px"),N(G.current,"left",u+"px")),I(G.current,"is-without-arrow",a||"center"===p&&"middle"===b),I(G.current,"is-alternate",i),M(G.current,"data-x-axis",p),M(G.current,"data-y-axis",b),N(z.current,"maxHeight","number"==typeof g?g+"px":""),N(z.current,"maxWidth","number"==typeof E?E+"px":""),K(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=G.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const s=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",s),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const c=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(y);let l;return c&&c!==t&&(c.defaultView.addEventListener("resize",e),c.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",s),r.cancelAnimationFrame(o),c&&c!==t&&(c.defaultView.removeEventListener("resize",e),c.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[X,_,S,y,v,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&j){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),j(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([G,ee,B]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:r=x(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:c()("components-popover",s,ne,{"is-expanded":X,"is-without-arrow":a,"is-alternate":i})},V,{ref:re},te,{tabIndex:"-1"}),X&&Object(o.createElement)(E,null),X&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(W,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:z,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return $.ref&&(oe=Object(o.createElement)(T,{name:A},oe)),y||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(A,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(a.isString)(e)&&(r=e),Object(a.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const U=Object(o.createElement)("div",{className:"event-catcher"}),V=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(U,e),Object(o.cloneElement)(t,{children:r}),","),e),B=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var z=function({children:e,position:t,text:r,shortcut:n}){const[s,c]=Object(o.useState)(!1),[i,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),c(!0)},m=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),c(!1)},f=e=>"mouseUp"===e?m:"mouseDown"===e?p:void 0,h=f("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&s)return;d.cancel();const o=Object(a.includes)(["focus","mouseenter"],n.type);o!==i&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:f("mouseDown")},y=o.Children.only(e),{children:O,disabled:v}=y.props;return(v?V:B)({child:y,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:s})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:s}))))({grandchildren:O,isOver:i,position:t,text:r,shortcut:n})})},G=r(37),Y=r(38);const q=["onMouseDown","onClick"];var W=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:s,isSmall:i,isPressed:u,isBusy:d,isDestructive:p,className:m,disabled:f,icon:h,iconPosition:b="left",iconSize:g,showTooltip:E,tooltipPosition:y,shortcut:O,label:v,children:_,text:S,variant:k,__experimentalIsFocusable:w,describedBy:j,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:s,...c}){let a=s;var i,u,d,p,m;return t&&(null!==(i=a)&&void 0!==i||(a="primary")),n&&(null!==(u=a)&&void 0!==u||(a="tertiary")),r&&(null!==(d=a)&&void 0!==d||(a="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=a)&&void 0!==p||(a="secondary")),o&&(null!==(m=a)&&void 0!==m||(a="link")),{...c,variant:a}}(e),R=c()("components-button",m,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":i,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=f&&!w,A=void 0===r||T?"button":"a",x="a"===A?{href:r,target:s}:{type:"button",disabled:T,"aria-pressed":u};if(f&&w){x["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const P=!T&&(E&&v||O||!!v&&(!_||Object(a.isArray)(_)&&!_.length)&&!1!==E),M=j?Object(a.uniqueId)():null,N=C["aria-describedby"]||M,I=Object(o.createElement)(A,Object(n.a)({},x,C,{className:R,"aria-label":C["aria-label"]||v,"aria-describedby":N,ref:t}),h&&"left"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),_);return P?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z,{text:j||v,shortcut:O,position:y},I),j&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:M},j))):Object(o.createElement)(o.Fragment,null,I,j&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:M},j)))}))},function(e,t){e.exports=window.wp.dom},,function(e,t,r){"use strict";r.d(t,"n",(function(){return s})),r.d(t,"l",(function(){return c})),r.d(t,"k",(function(){return a})),r.d(t,"m",(function(){return i})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return f})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return E}));var n,o=r(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=s.pluginUrl+"images/",a=s.pluginUrl+"build/",i=s.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),f=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),E=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),s=r(71),c=r(52);const a=Object(n.getSetting)("countryLocale",{}),i=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
+ Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(s.a)(e.priority)&&(t.index=e.priority),Object(c.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(a).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,i(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return a}));var n=r(0),o=r(66);const s=Object(n.createContext)({isInitialized:!1,billingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingAddress:()=>{},setShippingAddress:()=>{}}),c=()=>Object(n.useContext)(s),a=e=>{let{children:t}=e;const r=Object(o.a)();return Object(n.createElement)(s.Provider,{value:r},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,s=Object(n.useRef)(null),c=Object(n.useRef)(0),a=Object(n.useRef)(null),i=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var f=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=i.current,r=l.current;return i.current=l.current=null,c.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-s.current,n=e-c.current;return!s.current||r>=t||r<0||b&&n>=g},E=function(t){return a.current=null,h&&i.current?e(t):(i.current=l.current=null,u.current)},y=function(){var e=Date.now();if(n(e))return E(e);if(p.current){var o=e-s.current,a=e-c.current,i=t-o,l=b?Math.min(i,g-a):i;r(y,l)}},O=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];var h=Date.now(),g=n(h);if(i.current=d,l.current=o,s.current=h,g){if(!a.current&&p.current)return c.current=s.current,r(y,t),f?e(s.current):u.current;if(b)return r(y,t),e(s.current)}return a.current||r(y,t),u.current};return O.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),c.current=0,i.current=s.current=l.current=a.current=null},O.isPending=function(){return!!a.current},O.flush=function(){return a.current?E(Date.now()):u.current},O}),[f,b,t,g,h,m])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),s=r(0),c=r(16);const a=[".wp-block-woocommerce-cart"],i=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:a=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const i=n(e,r),l=a(e,r),u={...e.dataset,...i.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:a={},errorBoundaryProps:i={}}=e;Object(s.render)(Object(s.createElement)(c.a,i,Object(s.createElement)(s.Suspense,{fallback:Object(s.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(s.createElement)(t,o()({},a,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:i,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(a.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:s}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:s}=e;const c=document.body.querySelectorAll(o);s&&s.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,s)),i({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:s,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:s}=e;const c=s.querySelectorAll(o);i({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,function(e,t){var r,n,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var i,l=[],u=!1,d=-1;function p(){u&&i&&(u=!1,i.length?l=i.concat(l):d=-1,l.length&&m())}function m(){if(!u){var e=a(p);u=!0;for(var t=l.length;t;){for(i=l,l=[];++d<t;)i&&i[d].run();d=-1,t=l.length}i=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||u||a(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){var n=r(82),o=r(56),s=o.setStyleProp,c=n.html,a=n.svg,i=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],i(t)?d[t]=n:(r=t.toLowerCase(),l.call(c,r)?d[(u=c[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(a,t)?d[(u=a[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return s(e.style,d),d}},function(e,t,r){var n=r(3),o=r(86).default,s={reactCompat:!0},c=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:c,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,s={},c={};for(r in e)n=e[r],o&&(s=t(r,n))&&2===s.length?c[s[0]]=s[1]:"string"==typeof n&&(c[n]=r);return c},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,s))}}},function(e,t,r){for(var n,o=r(92).CASE_SENSITIVE_TAG_NAMES,s={},c=0,a=o.length;c<a;c++)n=o[c],s[n.toLowerCase()]=n;function i(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return s[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:i,formatDOM:function e(t,r,n){r=r||null;for(var o,s,c,a=[],u=0,d=t.length;u<d;u++){switch(o=t[u],c={next:null,prev:a[u-1]||null,parent:r},(s=a[u-1])&&(s.next=c),"#"!==o.nodeName[0]&&(c.name=l(o.nodeName),c.attribs={},o.attributes&&o.attributes.length&&(c.attribs=i(o.attributes))),o.nodeType){case 1:"script"===c.name||"style"===c.name?c.type=c.name:c.type="tag",c.children=e(o.childNodes,c);break;case 3:c.type="text",c.data=o.nodeValue;break;case 8:c.type="comment",c.data=o.nodeValue}a.push(c)}return n&&(a.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:a[0]?a[0]:null,prev:null,parent:r}),a[1]&&(a[1].prev=a[0])),a},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(42),o=r(0),s=r(33);const c=()=>{const e=Object(s.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return c}));var n=r(0);const o=Object(n.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),s=()=>Object(n.useContext)(o),c=e=>{let{children:t}=e;const[r,s]=Object(n.useState)(!1),c={setIsSuppressed:s,isSuppressed:r};return Object(n.createElement)(o.Provider,{value:c},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},function(e,t,r){var n=r(81),o=r(55),s=r(90),c={decodeEntities:!0,lowerCaseAttributeNames:!1};function a(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(s(e,(t=t||{}).htmlparser2||c),t)}a.domToReact=n,a.htmlToDOM=s,a.attributesToProps=o,e.exports=a,e.exports.default=a},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(6),o=r(8),s=r(0),c=r(13),a=r.n(c),i=r(20),l=r(68);const u=()=>{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:c}=Object(o.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{shippingRates:t.getShippingRates(),needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isCustomerDataUpdating()}}),{isSelectingRate:u,selectShippingRate:d}=Object(l.a)(),p=Object(s.useRef)({});return Object(s.useEffect)(()=>{const t=(e=>Object.fromEntries(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})))(e);Object(i.a)(t)&&!a()(p.current,t)&&(p.current=t)},[e]),{isSelectingRate:u,selectedRates:p.current,selectShippingRate:d,shippingRates:e,needsShipping:t,hasCalculatedShipping:r,isLoadingRates:c}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(8),o=r(6);const s=()=>{const{customerData:e,isInitialized:t}=Object(n.useSelect)(e=>{const t=e(o.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:r,setBillingAddress:s}=Object(n.useDispatch)(o.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:s,setShippingAddress:r}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return O})),r.d(t,"a",(function(){return v}));var n=r(0);const o={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},s={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},c={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:o,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},a=(e,t)=>{let{type:r}=t;return Object.values(o).includes(r)?r:e};var i=r(93),l=r(201);const u=e=>({onSuccess:Object(l.a)("shipping_rates_success",e),onFail:Object(l.a)("shipping_rates_fail",e),onSelectSuccess:Object(l.a)("shipping_rate_select_success",e),onSelectFail:Object(l.a)("shipping_rate_select_fail",e)});var d=r(203),p=r(35),m=r(33),f=r(68),h=r(64);const{NONE:b,INVALID_ADDRESS:g,UNKNOWN:E}=o,y=Object(n.createContext)(c),O=()=>Object(n.useContext)(y),v=e=>{let{children:t}=e;const{dispatchActions:r}=Object(p.b)(),{shippingRates:c,isLoadingRates:l,cartErrors:O}=Object(m.a)(),{isSelectingRate:v}=Object(f.a)(),{selectedRates:_}=Object(h.a)(),[S,k]=Object(n.useReducer)(a,b),[w,j]=Object(n.useReducer)(i.b,{}),C=Object(n.useRef)(w),R=Object(n.useMemo)(()=>({onShippingRateSuccess:u(j).onSuccess,onShippingRateFail:u(j).onFail,onShippingRateSelectSuccess:u(j).onSelectSuccess,onShippingRateSelectFail:u(j).onSelectFail}),[j]);Object(n.useEffect)(()=>{C.current=w},[w]),Object(n.useEffect)(()=>{l?r.incrementCalculating():r.decrementCalculating()},[l,r]),Object(n.useEffect)(()=>{v?r.incrementCalculating():r.decrementCalculating()},[v,r]),Object(n.useEffect)(()=>{O.length>0&&O.some(e=>!(!e.code||!Object.values(s).includes(e.code)))?k({type:g}):k({type:b})},[O]);const T=Object(n.useMemo)(()=>({isPristine:S===b,isValid:S===b,hasInvalidAddress:S===g,hasError:S===E||S===g}),[S]);Object(n.useEffect)(()=>{l||0!==c.length&&!T.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:T.hasInvalidAddress,hasError:T.hasError})},[c,l,T.hasError,T.hasInvalidAddress]),Object(n.useEffect)(()=>{!l&&c.length>0&&!T.hasError&&Object(d.a)(C.current,"shipping_rates_success",c)},[c,l,T.hasError]),Object(n.useEffect)(()=>{v||(T.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:T.hasError,hasInvalidAddress:T.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",_.current))},[_,v,T.hasError,T.hasInvalidAddress]);const A={shippingErrorStatus:T,dispatchErrorStatus:k,shippingErrorTypes:o,...R};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(y.Provider,{value:A},t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(8),o=r(0),s=r(6),c=r(74),a=r(58);const i=()=>{const e=Object(c.a)(),{dispatchCheckoutEvent:t}=Object(a.a)(),{selectShippingRate:r}=Object(n.useDispatch)(s.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((n,o)=>{r(n,o).then(()=>{t("set-selected-shipping-rate",{shippingRateId:n})}).catch(t=>{e(t)})},[r,t,e]),isSelectingRate:Object(n.useSelect)(e=>e(s.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return i}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:s,detail:c={}}=t;if(!n)return;s||(s=document.body);const a=new n(e,{bubbles:r,cancelable:o,detail:c});s.dispatchEvent(a)};let s;const c=()=>{s&&clearTimeout(s),s=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const s=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,s),()=>jQuery(document).off(e,s)}},function(e,t,r){"use strict";var n=r(0),o=r(14);const s=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,r){"use strict";var n=r(12),o=r.n(n),s=r(0);r(106);const c=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(s.useRef)(null);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(s.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];c(e),null==e||e.focus()}else c(e)})(e,r):c(e))})(r.current,e)}})))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),s=r(5),c=r.n(s),a=r(1),i=r(21),l=r(70),u=r(43);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:s=r,onRemove:p=o.noop,isDismissible:m=!0,actions:f=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(i.speak)(r,t)},[r,t])}(s,h);const E=c()(e,"components-notice","is-"+t,{"is-dismissible":m});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:E},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},f.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:s=!1,onClick:a,url:i},l)=>{let d=o;return"primary"===o||s||(d=i?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:i,variant:d,onClick:i?void 0:a,className:c()("components-notice__action",e)},t)}))),m&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(a.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(8);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const r=Object(n.select)("core/notices").getNotices(e);return r.some(e=>e.type===t)},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object(n.select)("core/notices").getNotices(),{removeNotice:o}=Object(n.dispatch)("core/notices"),s=r.filter(t=>t.status===e);s.forEach(e=>o(e.id,t))}},function(e,t){},function(e,t,r){var n=r(3),o=r(55),s=r(56),c=s.setStyleProp;function a(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&s.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var s,i,l,u,d=(r=r||{}).library||n,p=d.cloneElement,m=d.createElement,f=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,E=0,y=t.length;E<y;E++)if(s=t[E],b&&f(i=r.replace(s)))y>1&&(i=p(i,{key:i.key||E})),h.push(i);else if("text"!==s.type){switch(l=s.attribs,a(s)?c(l.style,l):l&&(l=o(l)),u=null,s.type){case"script":case"style":s.children[0]&&(l.dangerouslySetInnerHTML={__html:s.children[0].data});break;case"tag":"textarea"===s.name&&s.children[0]?l.defaultValue=s.children[0].data:s.children&&s.children.length&&(u=e(s.children,r));break;default:continue}y>1&&(l.key=E),h.push(m(s.name,l,u))}else g?s.data.trim()&&h.push(s.data):h.push(s.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(83),o=r(84),s=r(85),c=s.MUST_USE_PROPERTY,a=s.HAS_BOOLEAN_VALUE,i=s.HAS_NUMERIC_VALUE,l=s.HAS_POSITIVE_NUMERIC_VALUE,u=s.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,s,p=e.Properties,m=e.DOMAttributeNames;for(o in p)n=m[o]||(r?o:o.toLowerCase()),s=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(s,c),hasBooleanValue:d(s,a),hasNumericValue:d(s,i),hasPositiveNumericValue:d(s,l),hasOverloadedBooleanValue:d(s,u)}}var m={};p(n,m);var f={};p(o,f,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:m,svg:f,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(87)),s=r(89);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[s.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(88);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var s,c,a=n(e),i="function"==typeof t,l=0,u=a.length;l<u;l++)s=(r=a[l]).property,c=r.value,i?t(s,c,r):c&&(o||(o={}),o[s]=c);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function m(){var e={line:l,column:d};return function(t){return t.position=new f(e),E(),t}}function f(e){this.start=e,this.end={line:l,column:d},this.source=t.source}f.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function E(){g(o)}function y(e){var t;for(e=e||[];t=O();)!1!==t&&e.push(t);return e}function O(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function v(){var e=m(),t=g(s);if(t){if(O(),!g(c))return b("property missing ':'");var n=g(a),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(i),o}}return E(),function(){var e,t=[];for(y(t);e=v();)!1!==e&&(t.push(e),y(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,s=/^[^-]+$/,c=/^-(webkit|moz|ms|o|khtml)-/,a=function(e,t){return t.toUpperCase()},i=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||s.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(c,i)),e.replace(o,a))}},function(e,t,r){var n=r(91),o=r(57),s=o.formatDOM,c=o.isIE(9),a=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(a);return r&&r[1]&&(t=r[1],c&&(e=e.replace(r[0],""))),s(n(e),null,t)}},function(e,t,r){var n=r(57),o=/<([a-zA-Z]+[0-9]?)/,s=/<head.*>/i,c=/<body.*>/i,a=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,i=n.isIE(9),l=i||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,m=i?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),i&&(e=e.replace(a,"<$1$2$3/>")),p.parseFromString(e,m)}}if(document.implementation){var f=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f;try{return f.documentElement.innerHTML=e,f}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,a,i=e.match(o);switch(i&&i[1]&&(t=i[1].toLowerCase()),t){case"html":return r=d(e),s.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),c.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return a=u(e).getElementsByTagName(t),c.test(e)&&s.test(e)?a[0].parentNode.childNodes:a;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var n=r(4);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const s={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},c={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:n,callback:s,priority:a}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return i.set(n,{priority:a,callback:s}),{...e,[r]:i};case o.REMOVE_EVENT_CALLBACK:return i.delete(n),{...e,[r]:i}}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return c}));var n=r(1),o=r(18);const s=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return null!=e&&e.message?Object(o.decodeEntities)(e.message):Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(12)),s=n(r(128)),c=r(3),a=n(c),i=n(r(129)),l=n(r(131)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,s(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var s;return u.und(t[n])?o({},r,((s={})[n]=e[n],s)):r}),{});return o({to:t},r)}var b,g,E=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}return i(t,e),t}(E),O=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof E&&e.removeChild(l(t))}))},t}i(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof E)&&(t[r]=n instanceof E?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(E);function v(e,t){b={fn:e,transform:t}}function _(e){g=e}var S,k=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function j(e){S=e}var C,R=function(){return Date.now()};function T(e){C=e}var A,x,P=function(e){return e.current};function M(e){A=e}var N=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:v,get colorNames(){return g},injectColorNames:_,get requestFrame(){return k},get cancelFrame(){return w},injectFrame:function(e,t){k=e,w=t},get interpolation(){return S},injectStringInterpolator:j,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return C},injectDefaultElement:T,get animatedApi(){return P},injectAnimatedApi:function(e){P=e},get createAnimatedStyle(){return A},injectCreateAnimatedStyle:M,get manualFrameloop(){return x},injectManualFrameloop:function(e){x=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:A(t.style)}):t,n.update=r,n.attach(),n}return i(t,e),t}(O),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=R(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(o>=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}for(var c=s,a=!1,i=0;i<c.configs.length;i++){for(var l=c.configs[i],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var m=l.animatedValues[p];if(!m.done){var f=l.fromValues[p],h=l.toValues[p],b=m.lastPosition,g=h instanceof E,y=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)m.setValue(h),m.done=!0;else if("string"!=typeof f&&"string"!=typeof h){if(void 0!==l.duration)b=f+l.easing((t-m.startTime)/l.duration)*(h-f),u=t>=m.startTime+l.duration;else if(l.decay)b=f+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-b)<.1)&&(h=b);else{d=void 0!==m.lastTime?m.lastTime:t,y=void 0!==m.lastVelocity?m.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),v=0;v<O;++v)b+=1*(y+=(-l.tension*(b-h)+-l.friction*y)/l.mass*1/1e3)/1e3;var _=!(!l.clamp||0===l.tension)&&(f<h?b>h:b<h),S=Math.abs(y)<=l.precision,w=0===l.tension||Math.abs(h-b)<=l.precision;u=_||S&&w,m.lastVelocity=y,m.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(m.value!==h&&(b=h),m.done=!0):a=!0,m.setValue(b),m.lastPosition=b}else m.setValue(h),m.done=!0}}c.props.onFrame&&(c.values[l.name]=l.interpolation.getValue())}c.props.onFrame&&c.props.onFrame(c.values),a||(L.delete(c),c.stop(!0))}return L.size?x?x():k(e):D=!1,D};function U(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return U({range:e,output:t,extrapolate:r});if(S&&"string"==typeof e.output[0])return S(e);var n=e,o=n.output,s=n.range||[0,1],c=n.extrapolateLeft||n.extrapolate||"extend",a=n.extrapolateRight||n.extrapolate||"extend",i=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,s);return function(e,t,r,n,o,s,c,a,i){var l=i?i(e):e;if(l<t){if("identity"===c)return l;"clamp"===c&&(l=t)}if(l>r){if("identity"===a)return l;"clamp"===a&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=s(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,s[t],s[t+1],o[t],o[t+1],i,c,a,n.map)}}var V=function(e){function t(r,n,o,s){var c;return(c=e.call(this)||this).calc=void 0,c.payload=r instanceof y&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],c.calc=U(n,o,s),c}i(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=U(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(y),B=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}i(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new V(this,e,t,r)},t}(E),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new B(e)})),r}i(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new V(this,e,t)},t}(y),z=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,c=t.to,a=s(t,["delay","to"]);if(u.arr(c)||u.fun(c))this.queue.push(o({},a,{delay:n,to:c}));else if(c){var i={};Object.entries(c).forEach((function(e){var t,r=e[0],s=e[1],c=o({to:(t={},t[r]=s,t),delay:f(n,r)},a),l=i[c.delay]&&i[c.delay].to;i[c.delay]=o({},i[c.delay],c,{to:o({},l,c.to)})})),this.queue=Object.values(i)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,s=e.to,c=void 0===s?{}:s;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(c)&&(t.merged=o({},t.merged,c))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,c){var a=o.delay,i=s(o,["delay"]),l=function(o){c===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(i.to)||u.fun(i.to);a?setTimeout((function(){r===t.guid&&(d?t.runAsync(i,l):t.diff(i).start(l))}),a):d?t.runAsync(i,l):t.diff(i).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(x||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,s(e,["delay"])),c=this.local,a=Promise.resolve(void 0);if(u.arr(n.to))for(var i=function(e){var t=e,s=o({},n,h(n.to[t]));u.arr(s.config)&&(s.config=s.config[t]),a=a.then((function(){if(c===r.guid)return new Promise((function(e){return r.diff(s).start(e)}))}))},l=0;l<n.to.length;l++)i(l);else if(u.fun(n.to)){var d,p=0;a=a.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,c===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,s=void 0===n?{}:n,c=r.to,a=void 0===c?{}:c,i=r.config,l=void 0===i?{}:i,d=r.reverse,h=r.attach,b=r.reset,E=r.immediate;if(d){var y=[a,s];s=y[0],a=y[1]}this.merged=o({},s,this.merged,a),this.hasChanged=!1;var O=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],c=r[1],a=e[n]||{},i=u.num(c),d=u.str(c)&&!c.startsWith("#")&&!/\d/.test(c)&&!g[c],h=u.arr(c),y=!i&&!h&&!d,v=u.und(s[n])?c:s[n],_=i||h||d?c:1,k=f(l,n);O&&(_=O.animations[n].parent);var w,j=a.parent,C=a.interpolation,T=m(O?_.getPayload():_),A=c;y&&(A=S({range:[0,1],output:[c,c]})(1));var x,P=C&&C.getValue(),M=!u.und(j)&&a.animatedValues.some((function(e){return!e.done})),N=!u.equ(A,P),I=!u.equ(A,a.previous),D=!u.equ(k,a.config);if(b||I&&N||D){var L;if(i||d)j=C=a.parent||new B(v);else if(h)j=C=a.parent||new H(v);else if(y){var F=a.interpolation&&a.interpolation.calc(a.parent.value);F=void 0===F||b?v:F,a.parent?(j=a.parent).setValue(0,!1):j=new B(0);var U={output:[F,c]};a.interpolation?(C=a.interpolation,a.interpolation.updateConfig(U)):C=j.interpolate(U)}return T=m(O?_.getPayload():_),w=m(j.getPayload()),b&&!y&&j.setValue(v,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=M?e.lastVelocity:void 0,e.lastTime=M?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),f(E,n)&&j.setValue(y?_:c,!1),o({},e,((L={})[n]=o({},a,{name:n,parent:j,interpolation:C,animatedValues:w,toValues:T,previous:A,config:k,fromValues:m(j.getValue()),immediate:f(E,n),initialVelocity:p(k.velocity,0),clamp:p(k.clamp,!1),precision:p(k.precision,.01),tension:p(k.tension,170),friction:p(k.friction,26),mass:p(k.mass,1),duration:k.duration,easing:p(k.easing,(function(e){return e})),decay:k.decay}),L))}return N?e:(y&&(j.setValue(1,!1),C.updateConfig({output:[A,A]})),j.done=!0,t.hasChanged=!0,o({},e,((x={})[n]=o({},e[n],{previous:A}),x)))}),this.animations),this.hasChanged)for(var v in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[v]=this.animations[v].interpolation,this.values[v]=this.animations[v].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),Y=function(e,t){var r=c.useRef(!1),n=c.useRef(),o=u.fun(t),s=c.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var s=new G,c=o?f(t,n,s):t[n];return 0===n&&(r=c.ref),s.update(c),r||s.start(),s})),r]}),[e]),a=s[0],i=s[1];n.current=a,c.useImperativeHandle(i,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=c.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?f(e,r,t):e[r]),i||t.start()}))}}),[e]);c.useEffect((function(){r.current?o||l(t):i||n.current.forEach((function(e){return e.start()}))})),c.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},q=0,W=function(e,t){return("function"==typeof t?e.map(t):m(t)).map(String)},K=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,c=s(e,["items","keys"]);return t=m(void 0!==t?t:null),o({items:t,keys:W(t,n)},c)};function $(e,t){var r=function(){if(o){if(s>=n.length)return"break";c=n[s++]}else{if((s=n.next()).done)return"break";c=s.value}var r=c.key,a=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},n=e.current.deleted,o=Array.isArray(n),s=0;for(n=o?n:n[Symbol.iterator]();;){var c;if("break"===r())break}e.current.forceUpdate()}var X=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof E||(t=b.transform(t)),r.payload=t,r}return i(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ie(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,s=ie(o,n,e+1/3),c=ie(o,n,e),a=ie(o,n,e-1/3);return Math.round(255*s)<<24|Math.round(255*c)<<16|Math.round(255*a)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function me(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function fe(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ce.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=ae.exec(t))?parseInt(r[1],16)>>>0:(r=se.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),me(r[2]),me(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),me(r[2]),me(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),Ee={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||Ee.hasOwnProperty(e)&&Ee[e]?(""+t).trim():t+"px"}Ee=Object.keys(Ee).reduce((function(e,t){return ye.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),Ee);var ve={};M((function(e){return new X(e)})),T("div"),j((function(e){var t=e.output.map((function(e){return e.replace(be,fe)})).map((function(e){return e.replace(ge,fe)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return U(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),v((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,c=t.scrollLeft,a=s(t,["style","children","scrollTop","scrollLeft"]),i="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==c&&(e.scrollLeft=c),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=Oe(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in a){var m=i?p:ve[p]||(ve[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,a[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return c.forwardRef((function(t,r){var n=d(),i=c.useRef(!0),l=c.useRef(null),p=c.useRef(null),m=c.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){i.current=!1,l.current&&l.current.detach()}}),[]),c.useImperativeHandle(r,(function(){return P(p,i,n)})),m(t);var f,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,s(h,["scrollTop","scrollLeft"])),E=(f=e,!u.fun(f)||f.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return a.createElement(e,o({},g,{ref:E}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),we=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new V(e,t,r)},t.Globals=N,t.useSpring=function(e){var t=u.fun(e),r=Y(1,t?e:[e]),n=r[0],o=r[1],s=r[2];return t?[n[0],o,s]:n},t.useTrail=function(e,t){var r=c.useRef(!1),n=u.fun(t),s=f(t),a=c.useRef(),i=Y(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},s,{config:f(s.config,e),attach:e>0&&function(){return a.current[e-1]}})})),l=i[0],d=i[1],p=i[2],m=c.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,c=a.current[n];return o({},e,{config:f(e.config||s.config,t),attach:c&&function(){return c}})}))}}),[e,s.reverse]);return c.useEffect((function(){r.current&&!n&&m(t)})),c.useEffect((function(){r.current=!0}),[]),n?[l,m,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),a=K(n),i=a.lazy,l=void 0!==i&&i,u=(a.unique,a.reset),p=void 0!==u&&u,m=(a.enter,a.leave,a.update,a.onDestroyed),h=(a.keys,a.items,a.onFrame),b=a.onRest,g=a.onStart,E=a.ref,y=s(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),v=c.useRef(!1),_=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!v.current&&new Map,forceUpdate:O});return c.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,c=s(e,["first","prevProps"]),a=K(t),i=a.items,l=a.keys,u=a.initial,d=a.from,p=a.enter,m=a.leave,h=a.update,b=a.trail,g=void 0===b?0:b,E=a.unique,y=a.config,O=a.order,v=void 0===O?["enter","leave","update"]:O,_=K(n),S=_.keys,k=_.items,w=o({},c.current),j=[].concat(c.deleted),C=Object.keys(w),R=new Set(C),T=new Set(l),A=l.filter((function(e){return!R.has(e)})),x=c.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),P=l.filter((function(e){return R.has(e)})),M=-g;v.length;)switch(v.shift()){case"enter":A.forEach((function(e,t){E&&j.find((function(t){return t.originalKey===e}))&&(j=j.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=i[n],s=r&&void 0!==u?"initial":"enter";w[e]={slot:s,originalKey:e,key:E?String(e):q++,item:o,trail:M+=g,config:f(y,o,s),from:f(r&&void 0!==u?u||{}:d,o),to:f(p,o)}}));break;case"leave":x.forEach((function(e){var t=S.indexOf(e),r=k[t];j.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:M+=g,config:f(y,r,"leave"),to:f(m,r)})),delete w[e]}));break;case"update":P.forEach((function(e){var t=l.indexOf(e),r=i[t];w[e]=o({},w[e],{item:r,slot:"update",trail:M+=g,config:f(y,r,"update"),to:f(h,r)})}))}var N=l.map((function(e){return w[e]}));return j.forEach((function(e){var t,r=e.left,n=(e.right,s(e,["left","right"]));-1!==(t=N.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),N=[].concat(N.slice(0,t),[n],N.slice(t))})),o({},c,{changed:A.length||x.length||P.length,first:r&&0===A.length,transitions:N,current:w,deleted:j,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,s=e.config,c=e.trail,a=e.key,i=e.item;_.current.instances.has(a)||_.current.instances.set(a,new G);var u=_.current.instances.get(a),d=o({},y,{to:n,from:r,config:s,ref:E,onRest:function(r){_.current.mounted&&(e.destroyed&&(E||l||$(_,a),m&&m(i)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(E||l)&&_.current.deleted.length>0&&$(_),b&&b(i,t,r))},onStart:g&&function(){return g(i,t)},onFrame:h&&function(e){return h(i,t,e)},delay:c,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),c.useEffect((function(){return _.current.mounted=v.current=!0,function(){_.current.mounted=v.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=c.useRef();c.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var s=e.current;if(s){var c=s.controllers;if(c.length){var a=r*t[n];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=Y},,,,,,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{icon:t,size:r=24,...o}=e;return Object(n.cloneElement)(t,{width:r,height:r,...o})}},,function(e,t){},,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(4),s=r(5),c=r.n(s),a=r(21),i=r(1),l=(r(36),r(43));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:s=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:m=null,explicitDismiss:f=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(a.speak)(r,t)},[r,t])}(s,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{f||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const E=c()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!f});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const y=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!m});return Object(n.createElement)("div",{ref:b,className:E,onClick:f?o.noop:g,tabIndex:"0",role:f?"":"button",onKeyPress:f?o.noop:g,"aria-label":f?"":Object(i.__)("Dismiss this notice")},Object(n.createElement)("div",{className:y},m&&Object(n.createElement)("div",{className:"components-snackbar__icon"},m),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),f&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(54))},function(e,t){e.exports=window.wp.plugins},,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return c}));var n=r(47),o=(r(15),r(2));const s=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),c=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),s=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(s[r]="")}),s}},,,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(12),o=r.n(n),s=r(0),c=r(5),a=r.n(c),i=r(77),l=r(8),u=(r(80),r(59));const d=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""},p=e=>{let{className:t,context:r="default",additionalNotices:n=[]}=e;const{isSuppressed:c}=Object(u.b)(),{notices:p}=Object(l.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:m}=Object(l.useDispatch)("core/notices"),f=p.filter(e=>"snackbar"!==e.type).concat(n);if(!f.length)return null;const h=a()(t,"wc-block-components-notices");return c?null:Object(s.createElement)("div",{className:h},f.map(e=>Object(s.createElement)(i.a,o()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&m(e.id,r)}}),e.content)))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(51),s=r(2),c=r(61),a=r.n(c),i=r(10),l=r(16);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:c,depth:p=1}=e;return c&&0!==c.length?Array.from(c).map((e,c)=>{const{blockName:m="",...f}={key:`${t}_${p}_${c}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},h=u(m,r);if(!h){const s=a()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof s&&s)return s;if(!Object(n.isValidElement)(s))return null;const c=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return c?Object(n.cloneElement)(s,f,c):Object(n.cloneElement)(s,f)}const b=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${c}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+m,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(b,null,Object(n.createElement)(h,f,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(i.hasInnerBlocks)(e))return null;const c=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],a=Object(i.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!c.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,a.map((e,r)=>{let{blockName:o,component:c}=e;const a=c||u(o,t);return a?Object(n.createElement)(l.a,{key:o+"_blockerror",text:"Unexpected error in: "+o,showErrorBlock:s.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(a,{key:`${o}_forced_${r}`}))):null}))})(m,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:s=(()=>({})),blockMap:c,blockWrapper:a}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:c,children:e.children||[],blockWrapper:a});return{...s(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(130);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(112),s=r(2),c=r(16),a=r(205),i=r(67),l=r(49),u=r(35),d=r(1),p=r(28),m=r.n(p),f=r(117),h=r(94),b=r(8);const g=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},E=(e,t)=>{m.a.setNonce&&"function"==typeof m.a.setNonce&&m.a.setNonce(e),null!=e&&e.get("User-ID")&&t.setCustomerId(parseInt(e.get("User-ID")||"0",10))};var y=r(198),O=r(33),v=r(59),_=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:s,isBeforeProcessing:c,isComplete:p,orderNotes:_,shouldCreateAccount:S,extensionData:k}=Object(u.b)(),{hasValidationErrors:w}=Object(y.b)(),{shippingErrorStatus:j}=Object(i.b)(),{billingAddress:C,shippingAddress:R}=Object(l.b)(),{cartNeedsPayment:T,cartNeedsShipping:A,receiveCart:x}=Object(O.a)(),{activePaymentMethod:P,isExpressPaymentMethodActive:M,currentStatus:N,paymentMethodData:I,expressPaymentMethods:D,paymentMethods:L,shouldSavePayment:F}=Object(a.b)(),{setIsSuppressed:U}=Object(v.b)(),{createErrorNotice:V,removeNotice:B}=Object(b.useDispatch)("core/notices"),H=Object(n.useRef)(C),z=Object(n.useRef)(R),G=Object(n.useRef)(o),[Y,q]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...D,...L};return null==t||null===(e=t[P])||void 0===e?void 0:e.paymentMethodId},[P,D,L]),K=w&&!M||N.hasError||j.hasError,$=!e&&!K&&(N.isSuccessful||!T)&&s;Object(n.useEffect)(()=>{U(M)},[M,U]),Object(n.useEffect)(()=>{K===e||!s&&!c||M||r.setHasError(K)},[K,e,s,c,M,r]),Object(n.useEffect)(()=>{H.current=C,z.current=R,G.current=o},[C,R,o]);const X=Object(n.useCallback)(()=>!w&&(N.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,N.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return M||(e=t(X,0)),()=>{M||e()}},[t,X,M]),Object(n.useEffect)(()=>{G.current&&(window.location.href=G.current)},[p]);const J=Object(n.useCallback)(async()=>{if(Y)return;q(!0),B("checkout");const e=T?{payment_method:W,payment_data:g(I,F,P)}:{},t={billing_address:Object(f.a)(H.current),customer_note:_,create_account:S,...e,extensions:{...k}};A&&(t.shipping_address=Object(f.a)(z.current)),m()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&x(e.data.cart),V(Object(h.b)(e),{id:"checkout",context:"wc/checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{V(e.message,{id:e.error_code,context:"wc/checkout"})}),r.setAfterProcessing(e)})}catch{var t;V(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout"})}r.setHasError(!0),q(!1)})},[Y,B,T,W,I,F,P,_,S,k,A,r,V,x]);return Object(n.useEffect)(()=>{$&&!Y&&J()},[J,$,Y]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(i.a,null,Object(n.createElement)(a.a,null,t,Object(n.createElement)(c.a,{renderError:s.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(_,null)))))}},,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(0);const o=Object(n.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),s=(Object(n.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),()=>Object(n.useContext)(o))},function(e,t){e.exports=window.wp.keycodes},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},,,,,,,,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-subtotal-block","version":"1.0.0","title":"Subtotal","description":"Shows the cart subtotal row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-fee-block","version":"1.0.0","title":"Fees","description":"Shows the cart fee row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-discount-block","version":"1.0.0","title":"Discount","description":"Shows the cart discount row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-shipping-block","version":"1.0.0","title":"Shipping","description":"Shows the cart shipping row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-coupon-form-block","version":"1.0.0","title":"Coupon Form","description":"Shows the apply coupon form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-taxes-block","version":"1.0.0","title":"Taxes","description":"Shows the cart taxes row.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-cart-items-block","version":"1.0.0","title":"Cart Items","description":"Shows cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"showCompanyField":{"type":"boolean","default":false},"requireCompanyField":{"type":"boolean","default":false},"allowCreateAccount":{"type":"boolean","default":false},"showApartmentField":{"type":"boolean","default":true},"showPhoneField":{"type":"boolean","default":true},"requirePhoneField":{"type":"boolean","default":false}},"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(4),s=r(13),c=r.n(s);const a=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(n.useContext)(a),l=e=>{let{children:t}=e;const[r,s]=Object(n.useState)({}),i=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{s(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{s({})},[]),p=Object(n.useCallback)(e=>{e&&s(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),m=Object(n.useCallback)((e,t)=>{s(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return c()(r[e],n)?r:{...r,[e]:n}})},[]),f={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{m(e,{hidden:!0})},[m]),showValidationError:Object(n.useCallback)(e=>{m(e,{hidden:!1})},[m]),showAllValidationErrors:Object(n.useCallback)(()=>{s(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(a.Provider,{value:f},t)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(93);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const s=n.a.addEventCallback(e,r,o);return t(s),()=>{t(n.a.removeEventCallback(e,s.id))}}},function(e,t){},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return c}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(31);const s=async(e,t,r)=>{const o=n(e,t),s=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&s.push(t)}catch(e){console.error(e)}return!s.length||s},c=async(e,t,r)=>{const s=[],c=n(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return s.push(t),s;s.push(t)}catch(e){return console.error(e),s.push({type:"error"}),s}return s}},,function(e,t,r){"use strict";r.d(t,"b",(function(){return U})),r.d(t,"a",(function(){return V}));var n=r(0),o=r(20),s=r(8);let c,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(c||(c={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const i={currentStatus:c.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:c,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:s={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case c.PRISTINE:return{...i,...e,errorMessage:"",currentStatus:c.PRISTINE};case c.STARTED:return{...e,currentStatus:c.STARTED};case c.ERROR:return e.currentStatus!==c.ERROR?{...e,currentStatus:c.ERROR,errorMessage:o||e.errorMessage}:e;case c.FAILED:return e.currentStatus!==c.FAILED?{...e,currentStatus:c.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case c.SUCCESS:return e.currentStatus!==c.SUCCESS?{...e,currentStatus:c.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case c.PROCESSING:return e.currentStatus!==c.PROCESSING?{...e,currentStatus:c.PROCESSING,errorMessage:""}:e;case c.COMPLETE:return e.currentStatus!==c.COMPLETE?{...e,currentStatus:c.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:s};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:s};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},d=r(1),p=r(17),m=r(32),f=r(2),h=r(50),b=r(23),g=r.n(b),E=r(29),y=r(49),O=r(33),v=r(31),_=r(64);const S=(e,t,r,o)=>{const[c,a]=Object(n.useState)(!1),{isEditor:i}=Object(E.a)(),{selectedRates:l}=Object(_.a)(),{billingAddress:u,shippingAddress:p}=Object(y.b)(),b=Object(m.a)(l),v=Object(m.a)(r),S=Object(O.a)(),{cartTotals:k,cartIsLoading:w,cartNeedsShipping:j,paymentRequirements:C}=S,R=Object(n.useRef)({cart:S,cartTotals:k,cartNeedsShipping:j,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:C}),{createErrorNotice:T}=Object(s.useDispatch)("core/notices");Object(n.useEffect)(()=>{R.current={cart:S,cartTotals:k,cartNeedsShipping:j,get billingData(){return g()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:b,paymentRequirements:C}},[S,k,j,u,p,b,C]);const A=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<v.length;e++){const r=v[e],s=t[r];if(s)try{const e=!!i||await Promise.resolve(s.canMakePayment(R.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(s)}}catch(e){if(f.CURRENT_USER_IS_ADMIN||i){const t=Object(d.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
6
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),s.paymentMethodId);T(`${t} ${e}`,{context:o,id:`wc-${s.paymentMethodId}-registration-error`})}}}e(r),a(!0)},[T,e,i,o,v,t]),x=Object(h.a)(A,500,{leading:!0});return Object(n.useEffect)(()=>{w||x()},[x,S,b,u,w]),c},k=e=>({type:e}),w=e=>({type:c.ERROR,errorMessage:e}),j=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:c.FAILED,errorMessage:t,paymentMethodData:r}},C=e=>{let{paymentMethodData:t}=e;return{type:c.SUCCESS,paymentMethodData:t}},R=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),T=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),A=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),x=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var P=r(66),M=r(35),N=r(93),I=r(201);var D=r(203),L=r(198);const F=Object(n.createContext)(l),U=()=>Object(n.useContext)(F),V=e=>{let{children:t}=e;const{isProcessing:r,isIdle:a,isCalculating:l,hasError:d}=Object(M.b)(),{isEditor:m,getPreviewData:h}=Object(E.a)(),{setValidationErrors:b}=Object(L.b)(),{createErrorNotice:g,removeNotice:y}=Object(s.useDispatch)("core/notices"),{isSuccessResponse:O,isErrorResponse:_,isFailResponse:U,noticeContexts:V}=Object(v.d)(),[B,H]=Object(n.useReducer)(N.b,{}),{onPaymentProcessing:z}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(I.a)("payment_processing",e)}),[e]))(H),G=Object(n.useRef)(B);Object(n.useEffect)(()=>{G.current=B},[B]);const[Y,q]=Object(n.useReducer)(u,i),{dispatchActions:W,setPaymentStatus:K}=(e=>{const{setBillingAddress:t,setShippingAddress:r}=Object(P.a)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(R(t))},setRegisteredExpressPaymentMethods:t=>{e(T(t))},setShouldSavePayment:t=>{e(A(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(x(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(k(c.PRISTINE)),started:()=>e(k(c.STARTED)),processing:()=>e(k(c.PROCESSING)),completed:()=>e(k(c.COMPLETE)),error:t=>e(w(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(j({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof s&&null!=s&&s.address&&r(s.address),e(C({paymentMethodData:n}))}}),[e,t,r])}})(q),$=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:r}=Object(v.d)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return S(e,t,Array.from(n),r.PAYMENTS)})(W.setRegisteredPaymentMethods),X=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.d)();return S(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),J=Object(n.useMemo)(()=>m?h("previewSavedPaymentMethods"):$?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(Y.paymentMethods):{},[m,h,$,Y.paymentMethods]),Q=Object(n.useCallback)(e=>{e?g(e,{id:"wc-express-payment-error",context:V.EXPRESS_PAYMENTS}):y("wc-express-payment-error",V.EXPRESS_PAYMENTS)},[g,V.EXPRESS_PAYMENTS,y]),Z=Object.keys(Y.expressPaymentMethods).includes(Y.activePaymentMethod),ee=Object(n.useMemo)(()=>({isPristine:Y.currentStatus===c.PRISTINE,isStarted:Y.currentStatus===c.STARTED,isProcessing:Y.currentStatus===c.PROCESSING,isFinished:[c.ERROR,c.FAILED,c.SUCCESS].includes(Y.currentStatus),hasError:Y.currentStatus===c.ERROR,hasFailed:Y.currentStatus===c.FAILED,isSuccessful:Y.currentStatus===c.SUCCESS,isDoingExpressPayment:Y.currentStatus!==c.PRISTINE&&Z}),[Y.currentStatus,Z]);Object(n.useEffect)(()=>{const e=Object.keys(Y.paymentMethods);if(!$||!e.length)return;const t=[...e,...Object.keys(Y.expressPaymentMethods)];if(Y.activePaymentMethod&&t.includes(Y.activePaymentMethod))return;K().pristine();const r=Object.keys(J).flatMap(e=>J[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(Y.paymentMethods)[0])},[$,Y.paymentMethods,Y.expressPaymentMethods,W,K,Y.activePaymentMethod,J]),Object(n.useEffect)(()=>{!r||d||l||ee.isFinished||K().processing()},[r,d,l,ee.isFinished,K]),Object(n.useEffect)(()=>{a&&!ee.isSuccessful&&K().pristine()},[a,ee.isSuccessful,K]),Object(n.useEffect)(()=>{d&&ee.isSuccessful&&K().pristine()},[d,ee.isSuccessful,K]),Object(n.useEffect)(()=>{ee.isProcessing&&(y("wc-payment-error",V.PAYMENTS),Object(D.b)(G.current,"payment_processing",{}).then(e=>{let t,r;var n,o,s,c,a,i;if(e.forEach(e=>{O(e)&&(t=e),(_(e)||U(e))&&(r=e)}),t&&!r)K().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(s=t)||void 0===s||null===(c=s.meta)||void 0===c?void 0:c.billingAddress,null===(a=t)||void 0===a||null===(i=a.meta)||void 0===i?void 0:i.shippingData);else if(r&&U(r)){var l,u,d,p,m,f;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(f=r)||void 0===f?void 0:f.messageContext)||V.PAYMENTS}),K().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(m=p.meta)||void 0===m?void 0:m.billingAddress)}else if(r){var h,E;r.message&&r.message.length&&g(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(E=r)||void 0===E?void 0:E.messageContext)||V.PAYMENTS}),K().error(r.message),b(null===(h=r)||void 0===h?void 0:h.validationErrors)}else K().success()}))},[ee.isProcessing,b,K,y,V.PAYMENTS,O,U,_,g]);const te="object"==typeof Y.paymentMethodData&&Object(o.b)(Y.paymentMethodData,"token")?Y.paymentMethodData.token+"":"",re={setPaymentStatus:K,currentStatus:ee,paymentStatuses:c,paymentMethodData:Y.paymentMethodData,errorMessage:Y.errorMessage,activePaymentMethod:Y.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:z,customerPaymentMethods:J,paymentMethods:Y.paymentMethods,expressPaymentMethods:Y.expressPaymentMethods,paymentMethodsInitialized:$,expressPaymentMethodsInitialized:X,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:Y.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(n.createElement)(F.Provider,{value:re},t)}},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(241)},function(e,t){},function(e,t){},function(e,t){},,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(145),s=r(33),c=r(13),a=r.n(c),i=r(35),l=r(198),u=r(17),d=r(127),p=r(46),m=r(10),f={CHECKOUT_ACTIONS:r(167),CHECKOUT_BILLING_ADDRESS:r(168),CHECKOUT_CONTACT_INFORMATION:r(169),CHECKOUT_EXPRESS_PAYMENT:r(170),CHECKOUT_FIELDS:r(171),CHECKOUT_ORDER_NOTE:r(172),CHECKOUT_PAYMENT:r(173),CHECKOUT_SHIPPING_ADDRESS:r(174),CHECKOUT_SHIPPING_METHODS:r(175),CHECKOUT_TERMS:r(176),CHECKOUT_TOTALS:r(177),CHECKOUT_ORDER_SUMMARY:r(178),CHECKOUT_ORDER_SUMMARY_SUBTOTAL:r(179),CHECKOUT_ORDER_SUMMARY_FEE:r(180),CHECKOUT_ORDER_SUMMARY_DISCOUNT:r(181),CHECKOUT_ORDER_SUMMARY_SHIPPING:r(182),CHECKOUT_ORDER_SUMMARY_COUPON_FORM:r(183),CHECKOUT_ORDER_SUMMARY_TAXES:r(184),CHECKOUT_ORDER_SUMMARY_CART_ITEMS:r(185)};r.p=p.k,Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_FIELDS,component:Object(n.lazy)(()=>r.e(33).then(r.bind(null,422)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_EXPRESS_PAYMENT,component:Object(n.lazy)(()=>r.e(32).then(r.bind(null,459)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_CONTACT_INFORMATION,component:Object(n.lazy)(()=>r.e(31).then(r.bind(null,438)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_SHIPPING_ADDRESS,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(2),r.e(6),r.e(44)]).then(r.bind(null,444)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_BILLING_ADDRESS,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(2),r.e(6),r.e(30)]).then(r.bind(null,445)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_SHIPPING_METHODS,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(45)]).then(r.bind(null,437)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_PAYMENT,component:Object(n.lazy)(()=>r.e(43).then(r.bind(null,433)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_NOTE,component:Object(n.lazy)(()=>r.e(34).then(r.bind(null,446)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_TERMS,component:Object(n.lazy)(()=>r.e(46).then(r.bind(null,460)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ACTIONS,component:Object(n.lazy)(()=>r.e(29).then(r.bind(null,436)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_TOTALS,component:Object(n.lazy)(()=>r.e(47).then(r.bind(null,423)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(35)]).then(r.bind(null,461)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_CART_ITEMS,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(36)]).then(r.bind(null,439)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_SUBTOTAL,component:Object(n.lazy)(()=>r.e(41).then(r.bind(null,462)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_FEE,component:Object(n.lazy)(()=>r.e(39).then(r.bind(null,463)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_DISCOUNT,component:Object(n.lazy)(()=>r.e(38).then(r.bind(null,464)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_COUPON_FORM,component:Object(n.lazy)(()=>r.e(37).then(r.bind(null,465)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_SHIPPING,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(5),r.e(40)]).then(r.bind(null,466)))}),Object(m.registerCheckoutBlock)({metadata:f.CHECKOUT_ORDER_SUMMARY_TAXES,component:Object(n.lazy)(()=>r.e(42).then(r.bind(null,447)))});var h=r(1),b=r(5),g=r.n(b),E=r(251),y=r(132),O=r(124),v=r(16),_=r(254),S=r(2),k=r(75),w=(r(232),r(14)),j=Object(n.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"})),C=r(104);r(233);var R=()=>Object(n.createElement)("div",{className:"wc-block-checkout-empty"},Object(n.createElement)(C.a,{className:"wc-block-checkout-empty__image",icon:j,size:100}),Object(n.createElement)("strong",{className:"wc-block-checkout-empty__title"},Object(h.__)("Your cart is empty!","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-empty__description"},Object(h.__)("Checkout is not available whilst your cart is empty—please take a look through our store and come back when you're ready to place an order.","woo-gutenberg-products-block")),p.i&&Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:p.i,className:"wp-block-button__link"},Object(h.__)("Browse store","woo-gutenberg-products-block")))),T=Object(n.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),A=r(18);r(234);const x=["woocommerce_rest_product_out_of_stock","woocommerce_rest_product_not_purchasable","woocommerce_rest_product_partially_out_of_stock","woocommerce_rest_product_too_many_in_cart","woocommerce_rest_cart_item_error"],P=Object(S.getSetting)("checkoutData",{}),M=e=>{let{errorData:t}=e,r=Object(h.__)("Checkout error","woo-gutenberg-products-block");return x.includes(t.code)&&(r=Object(h.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(n.createElement)("strong",{className:"wc-block-checkout-error_title"},r)},N=e=>{let{errorData:t}=e,r=t.message;return x.includes(t.code)&&(r=r+" "+Object(h.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-error__description"},r)},I=e=>{let{errorData:t}=e,r=Object(h.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return x.includes(t.code)&&(r=Object(h.__)("Edit your cart","woo-gutenberg-products-block"),o=p.c),Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:o,className:"wp-block-button__link"},r))};var D=()=>{const e={code:"",message:"",...P||{}},t={code:e.code||"unknown",message:Object(A.decodeEntities)(e.message)||Object(h.__)("There was a problem checking out. Please try again. If the problem persists, please get in touch with us so we can assist.","woo-gutenberg-products-block")};return Object(n.createElement)("div",{className:"wc-block-checkout-error"},Object(n.createElement)(C.a,{className:"wc-block-checkout-error__image",icon:T,size:100}),Object(n.createElement)(M,{errorData:t}),Object(n.createElement)(N,{errorData:t}),Object(n.createElement)(I,{errorData:t}))};const L=`${p.e}?redirect_to=${encodeURIComponent(window.location.href)}`,F=()=>{window.location.reload(!0)};var U=r(141),V=r(79),B=r(59);const H=()=>Object(n.createElement)(n.Fragment,null,Object(h.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:L},Object(h.__)("Click here to log in.","woo-gutenberg-products-block"))),z=e=>{let{attributes:t,children:r}=e;const{hasOrder:o,customerId:c}=Object(i.b)(),{cartItems:a,cartIsLoading:l}=Object(s.a)(),{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:m,showPhoneField:f,requirePhoneField:h}=t;return l||0!==a.length?o?((e=>!e&&!Object(S.getSetting)("checkoutAllowsGuest",!1))(c)&&u&&Object(S.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(H,null),Object(n.createElement)(U.a.Provider,{value:{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:m,showPhoneField:f,requirePhoneField:h}},r)):Object(n.createElement)(D,null):Object(n.createElement)(R,null)},G=e=>{let{scrollToTop:t}=e;const{hasError:r,isIdle:o}=Object(i.b)(),{hasValidationErrors:s,showAllValidationErrors:c}=Object(l.b)(),a=o&&r&&(s||Object(V.a)("wc/checkout","default"));return Object(n.useEffect)(()=>{let e;return a&&(c(),e=window.setTimeout(()=>{t({focusableSelector:"input:invalid, .has-error input"})},50)),()=>{clearTimeout(e)}},[a,t,c]),null};var Y=Object(k.a)(e=>{let{attributes:t,children:r,scrollToTop:o}=e;return Object(n.createElement)(v.a,{header:Object(h.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(n.createInterpolateElement)(Object(h.__)("The checkout has encountered an unexpected error. <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:Object(n.createElement)("button",{className:"wc-block-link-button",onClick:F})}),showErrorMessage:S.CURRENT_USER_IS_ADMIN},Object(n.createElement)(E.a,{context:"wc/checkout"}),Object(n.createElement)(B.a,null,Object(n.createElement)(O.a,{context:"wc/checkout"}),Object(n.createElement)(l.a,null,Object(n.createElement)(m.SlotFillProvider,null,Object(n.createElement)(y.a,null,Object(n.createElement)(_.a,{className:g()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(n.createElement)(z,{attributes:t},r),Object(n.createElement)(G,{scrollToTop:o})))))))});const q={hasDarkControls:{type:"boolean",default:Object(S.getSetting)("hasDarkEditorStyleSupport",!1)},showRateAfterTaxName:{type:"boolean",default:Object(S.getSetting)("displayCartPricesIncludingTax",!1)}};var W=r(186);Object(d.a)({Block:Y,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:e=>({attributes:Object(o.a)({...W.attributes,...q},e instanceof HTMLElement?e.dataset:{})}),blockMap:Object(u.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:o,...c}=Object(s.a)(),u=(()=>{const{dispatchActions:e,extensionData:t}=Object(i.b)(),r=Object(n.useRef)(t);Object(n.useEffect)(()=>{a()(t,r.current)||(r.current=t)},[t]);const o=Object(n.useCallback)((t,n,o)=>{const s=r.current[t]||{};e.setExtensionData({...r.current,[t]:{...s,[n]:o}})},[e]);return{extensionData:r.current,setExtensionData:o}})(),d=(()=>{const{hasValidationErrors:e,getValidationError:t,clearValidationError:r,hideValidationError:o,setValidationErrors:s}=Object(l.b)(),c="extensions-errors";return{hasValidationErrors:e,getValidationError:Object(n.useCallback)(e=>t(`${c}-${e}`),[t]),clearValidationError:Object(n.useCallback)(e=>r(`${c}-${e}`),[r]),hideValidationError:Object(n.useCallback)(e=>o(`${c}-${e}`),[o]),setValidationErrors:Object(n.useCallback)(e=>s(Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[`${c}-${t}`,r]}))),[s])}})();return n.Children.map(t,e=>{if(Object(n.isValidElement)(e)){const t={extensions:r,cart:c,checkoutExtensionData:u,validation:d};return Object(n.cloneElement)(e,t)}return e})}})},,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(11),s=r(5),c=r.n(s);const a=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(n.useContext)(a),l=e=>{let{children:t,className:r=""}=e;const[s,i]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let r="";return t>700?r="is-large":t>520?r="is-medium":t>400?r="is-small":t&&(r="is-mobile"),[e,r]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(n.createElement)(a.Provider,{value:l},Object(n.createElement)("div",{className:c()(r,i)},s,t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(0),o=r(7),s=r(5),c=r.n(s),a=r(4),i=r(95),l=r(11),u=r(111),d=function({notices:e,className:t,children:r,onRemove:s=a.noop}){const d=Object(l.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),m=Object(i.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:d});t=c()("components-snackbar-list",t);const f=e=>()=>s(e.id);return Object(n.createElement)("div",{className:t},r,m.map(({item:e,key:t,props:r})=>Object(n.createElement)(i.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(u.a,Object(o.a)({},Object(a.omit)(e,["content"]),{onRemove:f(e)}),e.content)))))},p=r(10),m=r(8),f=r(29);const h={},b=e=>{let{className:t,context:r="default"}=e;const{isEditor:o}=Object(f.a)(),{notices:s}=Object(m.useSelect)(e=>({notices:e("core/notices").getNotices(r)})),{removeNotice:a}=Object(m.useDispatch)("core/notices");if(o)return null;const i=s.filter(e=>"snackbar"===e.type),l=i.length>0?i.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):h,u=Object(p.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:l}),b=i.filter(e=>!0===u[e.content]),g=c()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(d,{notices:b,className:g,onRemove:()=>{b.forEach(e=>a(e.id,r))}})}},,,function(e,t,r){"use strict";var n=r(0),o=r(5),s=r.n(o),c=r(250);r(202),t.a=e=>{let{children:t,className:r}=e;return Object(n.createElement)(c.a,{className:s()("wc-block-components-sidebar-layout",r)},t)}}]);
build/checkout.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f37515d3e4153f45cf7c1bcba1469952');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'd7148e3b7cabed31e804c6429d2eb21d');
build/checkout.js CHANGED
@@ -2,7 +2,7 @@ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.checkout=fu
2
  /* translators: %s Field label. */
3
  Object(r.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(s.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},i=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,l(c)]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{})]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=c&&void 0!==i[c]?i[c]:{};return e.map(e=>({key:e,...o.defaultAddressFields[e]||{},...r[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var o=c(0);c(151),t.a=()=>Object(o.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(38),s=c(4),a=c.n(s),l=c(27);c(149);const i=e=>{let{currency:t,maxPrice:c,minPrice:s,priceClassName:i,priceStyle:u={}}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.sprintf)(
4
  /* translators: %1$s min price, %2$s max price */
5
- Object(r.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(s),Object(l.formatPrice)(c))),Object(o.createElement)("span",{"aria-hidden":!0},Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:s,style:u})," — ",Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:s,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("del",{className:a()("wc-block-components-product-price__regular",c),style:s},e),value:l}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("ins",{className:a()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:r,format:s="<price/>",maxPrice:l,minPrice:d,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}=e;const j=a()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});s.includes("<price/>")||(s="<price/>",console.error("Price formats need to include the `<price/>` tag."));const _=g&&p!==g;let E=Object(o.createElement)("span",{className:a()("wc-block-components-product-price__value",b)});return _?E=Object(o.createElement)(u,{currency:r,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}):void 0!==d&&void 0!==l?E=Object(o.createElement)(i,{currency:r,maxPrice:l,minPrice:d,priceClassName:b,priceStyle:m}):p&&(E=Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",b),currency:r,value:p,style:m})),Object(o.createElement)("span",{className:j},Object(o.createInterpolateElement)(s,{price:E}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));var o=c(7);let r;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(r||(r={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:r.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:r.REMOVE_EVENT_CALLBACK,eventType:e})},s={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,eventType:c,id:o,callback:n,priority:a}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case r.ADD_EVENT_CALLBACK:return l.set(o,{priority:a,callback:n}),{...e,[c]:l};case r.REMOVE_EVENT_CALLBACK:return l.delete(o),{...e,[c]:l}}}},,,,,function(e,t){e.exports=window.wp.warning},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var o=c(0),r=c(7),n=c(25),s=c.n(n);const a=Object(o.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(o.useContext)(a),i=e=>{let{children:t}=e;const[c,n]=Object(o.useState)({}),l=Object(o.useCallback)(e=>c[e],[c]),i=Object(o.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(o.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...o}=t;return o})},[]),d=Object(o.useCallback)(()=>{n({})},[]),p=Object(o.useCallback)(e=>{e&&n(t=>(e=Object(r.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&s()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),b=Object(o.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const o={...c[e],...t};return s()(c[e],o)?c:{...c,[e]:o}})},[]),m={getValidationError:l,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(o.useCallback)(e=>{b(e,{hidden:!0})},[b]),showValidationError:Object(o.useCallback)(e=>{b(e,{hidden:!1})},[b]),showAllValidationErrors:Object(o.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(o.createElement)(a.Provider,{value:m},t)}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return E})),c.d(t,"a",(function(){return k}));var o=c(0);const r={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},n={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},s={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:r,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},a=(e,t)=>{let{type:c}=t;return Object.values(r).includes(c)?c:e};var l=c(98),i=c(236);const u=e=>({onSuccess:Object(i.a)("shipping_rates_success",e),onFail:Object(i.a)("shipping_rates_fail",e),onSelectSuccess:Object(i.a)("shipping_rate_select_success",e),onSelectFail:Object(i.a)("shipping_rate_select_fail",e)});var d=c(237),p=c(54),b=c(40),m=c(112),g=c(83);const{NONE:h,INVALID_ADDRESS:O,UNKNOWN:j}=r,_=Object(o.createContext)(s),E=()=>Object(o.useContext)(_),k=e=>{let{children:t}=e;const{dispatchActions:c}=Object(p.b)(),{shippingRates:s,isLoadingRates:i,cartErrors:E}=Object(b.a)(),{isSelectingRate:k}=Object(m.a)(),{selectedRates:f}=Object(g.a)(),[y,w]=Object(o.useReducer)(a,h),[v,S]=Object(o.useReducer)(l.b,{}),C=Object(o.useRef)(v),N=Object(o.useMemo)(()=>({onShippingRateSuccess:u(S).onSuccess,onShippingRateFail:u(S).onFail,onShippingRateSelectSuccess:u(S).onSelectSuccess,onShippingRateSelectFail:u(S).onSelectFail}),[S]);Object(o.useEffect)(()=>{C.current=v},[v]),Object(o.useEffect)(()=>{i?c.incrementCalculating():c.decrementCalculating()},[i,c]),Object(o.useEffect)(()=>{k?c.incrementCalculating():c.decrementCalculating()},[k,c]),Object(o.useEffect)(()=>{E.length>0&&E.some(e=>!(!e.code||!Object.values(n).includes(e.code)))?w({type:O}):w({type:h})},[E]);const P=Object(o.useMemo)(()=>({isPristine:y===h,isValid:y===h,hasInvalidAddress:y===O,hasError:y===j||y===O}),[y]);Object(o.useEffect)(()=>{i||0!==s.length&&!P.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:P.hasInvalidAddress,hasError:P.hasError})},[s,i,P.hasError,P.hasInvalidAddress]),Object(o.useEffect)(()=>{!i&&s.length>0&&!P.hasError&&Object(d.a)(C.current,"shipping_rates_success",s)},[s,i,P.hasError]),Object(o.useEffect)(()=>{k||(P.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:P.hasError,hasInvalidAddress:P.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",f.current))},[f,k,P.hasError,P.hasInvalidAddress]);const R={shippingErrorStatus:P,dispatchErrorStatus:w,shippingErrorTypes:r,...N};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_.Provider,{value:R},t))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"string"==typeof e},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(8);function r(e,t){const c=Object(o.useRef)();return Object(o.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var o=c(9),r=c(0),n=c(18),s=c(124),a=c(81);const l=()=>{const e=Object(s.a)(),{dispatchCheckoutEvent:t}=Object(a.a)(),{selectShippingRate:c}=Object(o.useDispatch)(n.CART_STORE_KEY);return{selectShippingRate:Object(r.useCallback)((o,r)=>{c(o,r).then(()=>{t("set-selected-shipping-rate",{shippingRateId:o})}).catch(t=>{e(t)})},[c,t,e]),isSelectingRate:Object(o.useSelect)(e=>e(n.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(14),a=c(4),l=c.n(a);c(148),t.a=e=>{let{className:t="",disabled:c=!1,name:o,permalink:a="",target:i,rel:u,style:d,onClick:p,...b}=e;const m=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",r()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(o)}}))}return Object(n.createElement)("a",r()({className:m,href:a,target:i},b,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(o)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(9);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(o.select)("core/notices").getNotices(),{removeNotice:r}=Object(o.dispatch)("core/notices"),n=c.filter(t=>t.status===e);n.forEach(e=>r(e.id,t))}},function(e,t,c){"use strict";var o=c(0),r=c(90),n=c(61);const s=e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},a=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;";const o=a(e),r=o.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(r,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;";const r=a(e),s=r.slice(0,t);if(c)return Object(n.autop)(l(s,o));const i=s.match(/([\s]+)/g),u=i?i.length:0,d=r.slice(0,t+u);return Object(n.autop)(l(d,o))};t.a=e=>{let{source:t,maxLength:c=15,countType:a="words",className:l="",style:d={}}=e;const p=Object(o.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const o=Object(n.autop)(e),a=Object(r.count)(o,c);if(a<=t)return o;const l=s(o),d=Object(r.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,a),[t,c,a]);return Object(o.createElement)(o.RawHTML,{style:d,className:l},p)}},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),s=c(132);t.a=e=>{let{checked:t,name:c,onChange:r,option:a}=e;const{value:l,label:i,description:u,secondaryLabel:d,secondaryDescription:p}=a;return Object(o.createElement)("label",{className:n()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(o.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>r(e.target.value),checked:t,"aria-describedby":n()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:d,[`${c}-${l}__description`]:u,[`${c}-${l}__secondary-description`]:p})}),Object(o.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:d,description:u,secondaryDescription:p}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(0);const r=()=>{const[,e]=Object(o.useState)();return Object(o.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,c){"use strict";var o=c(24),r=c.n(o),n=c(0),s=c(8),a=c(1),l=c(22),i=e=>{let{imageUrl:t=l.m+"/block-error.svg",header:c=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:o=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:r,errorMessagePrefix:s=Object(a.__)("Error:","woo-gutenberg-products-block"),button:i,showErrorBlock:u=!0}=e;return u?Object(n.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(n.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(n.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(n.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),o&&Object(n.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},o),r&&Object(n.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",r),i&&Object(n.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i))):null};c(193);class u extends s.Component{constructor(){super(...arguments),r()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,showErrorBlock:o=!0,text:r,errorMessagePrefix:s,renderError:a,button:l}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof a?a({errorMessage:u}):Object(n.createElement)(i,{showErrorBlock:o,errorMessage:c?u:null,header:e,imageUrl:t,text:r,errorMessagePrefix:s,button:l}):this.props.children}}t.a=u},,function(e,t){},,,function(e,t,c){"use strict";var o=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:r,secondaryDescription:n,id:s}=e;return Object(o.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(o.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(o.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(o.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(o.createElement)("div",{className:"wc-block-components-radio-control__description-group"},r&&Object(o.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},r),n&&Object(o.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},n)))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s);c(261),t.a=e=>{let{children:t,className:c,headingLevel:o,...s}=e;const l=a()("wc-block-components-title",c),i="h"+o;return Object(n.createElement)(i,r()({className:l},s),t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return s}));var o=c(0);const r=Object(o.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),n=()=>Object(o.useContext)(r),s=e=>{let{children:t}=e;const[c,n]=Object(o.useState)(!1),s={setIsSuppressed:n,isSuppressed:c};return Object(o.createElement)(r.Provider,{value:s},t)}},,,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:o=""}=e;return c?Object(n.createElement)("img",{className:l(t),src:c,alt:o}):null},u=c(22);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(110);c(190),t.a=e=>{let{icons:t=[],align:c="center",className:o}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},o);return Object(n.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(n.createElement)(i,r()({key:"payment-method-icon-"+e.id},t))}))}},,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"number"==typeof e},function(e,t,c){"use strict";var o=c(24),r=c.n(o),n=c(0),s=c(1),a=c(8),l=c(2),i=c(228),u=c(36);class d extends a.Component{constructor(){super(...arguments),r()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const o=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(n.createElement)(i.a,{additionalNotices:o,context:u.c.PAYMENTS})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),s=c(10),a=c(120);c(259);const l=e=>{let{className:t="",id:c,selected:r,onChange:i=(()=>{}),options:u=[]}=e;const d=Object(s.useInstanceId)(l),p=c||d;return u.length?Object(o.createElement)("div",{className:n()("wc-block-components-radio-control",t)},u.map(e=>Object(o.createElement)(a.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===r,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return F})),c.d(t,"a",(function(){return U}));var o=c(0),r=c(34),n=c(9);let s,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(s||(s={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const l={currentStatus:s.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},i={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:s,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,{type:t,paymentMethodData:c,shouldSavePaymentMethod:o=!1,errorMessage:r="",paymentMethods:n={},paymentMethod:i=""}=arguments.length>1?arguments[1]:void 0;switch(t){case s.PRISTINE:return{...l,...e,errorMessage:"",currentStatus:s.PRISTINE};case s.STARTED:return{...e,currentStatus:s.STARTED};case s.ERROR:return e.currentStatus!==s.ERROR?{...e,currentStatus:s.ERROR,errorMessage:r||e.errorMessage}:e;case s.FAILED:return e.currentStatus!==s.FAILED?{...e,currentStatus:s.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:r||e.errorMessage}:e;case s.SUCCESS:return e.currentStatus!==s.SUCCESS?{...e,currentStatus:s.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case s.PROCESSING:return e.currentStatus!==s.PROCESSING?{...e,currentStatus:s.PROCESSING,errorMessage:""}:e;case s.COMPLETE:return e.currentStatus!==s.COMPLETE?{...e,currentStatus:s.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:n};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:n};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:o};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:i,paymentMethodData:c||e.paymentMethodData}}},d=c(1),p=c(41),b=c(50),m=c(2),g=c(114),h=c(51),O=c.n(h),j=c(59),_=c(72),E=c(40),k=c(36),f=c(83);const y=(e,t,c,r)=>{const[s,a]=Object(o.useState)(!1),{isEditor:l}=Object(j.b)(),{selectedRates:i}=Object(f.a)(),{billingAddress:u,shippingAddress:p}=Object(_.b)(),h=Object(b.a)(i),k=Object(b.a)(c),y=Object(E.a)(),{cartTotals:w,cartIsLoading:v,cartNeedsShipping:S,paymentRequirements:C}=y,N=Object(o.useRef)({cart:y,cartTotals:w,cartNeedsShipping:S,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:h,paymentRequirements:C}),{createErrorNotice:P}=Object(n.useDispatch)("core/notices");Object(o.useEffect)(()=>{N.current={cart:y,cartTotals:w,cartNeedsShipping:S,get billingData(){return O()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:h,paymentRequirements:C}},[y,w,S,u,p,h,C]);const R=Object(o.useCallback)(async()=>{let c={};const o=e=>{c={...c,[e.name]:e}};for(let e=0;e<k.length;e++){const c=k[e],n=t[c];if(n)try{const e=!!l||await Promise.resolve(n.canMakePayment(N.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);o(n)}}catch(e){if(m.CURRENT_USER_IS_ADMIN||l){const t=Object(d.sprintf)(
6
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
7
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),n.paymentMethodId);P(`${t} ${e}`,{context:r,id:`wc-${n.paymentMethodId}-registration-error`})}}}e(c),a(!0)},[P,e,l,r,k,t]),x=Object(g.a)(R,500,{leading:!0});return Object(o.useEffect)(()=>{v||x()},[x,y,h,u,v]),s},w=e=>({type:e}),v=e=>({type:s.ERROR,errorMessage:e}),S=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:s.FAILED,errorMessage:t,paymentMethodData:c}},C=e=>{let{paymentMethodData:t}=e;return{type:s.SUCCESS,paymentMethodData:t}},N=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),P=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),x=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var T=c(91),A=c(54),I=c(98),M=c(236);var D=c(237),B=c(104);const L=Object(o.createContext)(i),F=()=>Object(o.useContext)(L),U=e=>{let{children:t}=e;const{isProcessing:c,isIdle:a,isCalculating:i,hasError:d}=Object(A.b)(),{isEditor:b,getPreviewData:g}=Object(j.b)(),{setValidationErrors:h}=Object(B.b)(),{createErrorNotice:O,removeNotice:_}=Object(n.useDispatch)("core/notices"),{isSuccessResponse:E,isErrorResponse:f,isFailResponse:F,noticeContexts:U}=Object(k.d)(),[V,q]=Object(o.useReducer)(I.b,{}),{onPaymentProcessing:G}=(e=>Object(o.useMemo)(()=>({onPaymentProcessing:Object(M.a)("payment_processing",e)}),[e]))(q),$=Object(o.useRef)(V);Object(o.useEffect)(()=>{$.current=V},[V]);const[H,Y]=Object(o.useReducer)(u,l),{dispatchActions:z,setPaymentStatus:W}=(e=>{const{setBillingAddress:t,setShippingAddress:c}=Object(T.a)();return{dispatchActions:Object(o.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(N(t))},setRegisteredExpressPaymentMethods:t=>{e(P(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(x(t,c))}}),[e]),setPaymentStatus:Object(o.useCallback)(()=>({pristine:()=>e(w(s.PRISTINE)),started:()=>e(w(s.STARTED)),processing:()=>e(w(s.PROCESSING)),completed:()=>e(w(s.COMPLETE)),error:t=>e(v(t)),failed:function(c,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r&&t(r),e(S({errorMessage:c||"",paymentMethodData:o||{}}))},success:function(o){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r&&t(r),void 0!==typeof n&&null!=n&&n.address&&c(n.address),e(C({paymentMethodData:o}))}}),[e,t,c])}})(Y),J=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:c}=Object(k.d)(),o=new Set([...Object(m.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return y(e,t,Array.from(o),c.PAYMENTS)})(z.setRegisteredPaymentMethods),K=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:c}=Object(k.d)();return y(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(z.setRegisteredExpressPaymentMethods),X=Object(o.useMemo)(()=>b?g("previewSavedPaymentMethods"):J?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(m.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),o={};return c.forEach(c=>{const r=t[c].filter(t=>{var c;let{method:{gateway:o}}=t;return o in e&&(null===(c=e[o].supports)||void 0===c?void 0:c.showSavedCards)});r.length&&(o[c]=r)}),o}(H.paymentMethods):{},[b,g,J,H.paymentMethods]),Q=Object(o.useCallback)(e=>{e?O(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):_("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[O,U.EXPRESS_PAYMENTS,_]),Z=Object.keys(H.expressPaymentMethods).includes(H.activePaymentMethod),ee=Object(o.useMemo)(()=>({isPristine:H.currentStatus===s.PRISTINE,isStarted:H.currentStatus===s.STARTED,isProcessing:H.currentStatus===s.PROCESSING,isFinished:[s.ERROR,s.FAILED,s.SUCCESS].includes(H.currentStatus),hasError:H.currentStatus===s.ERROR,hasFailed:H.currentStatus===s.FAILED,isSuccessful:H.currentStatus===s.SUCCESS,isDoingExpressPayment:H.currentStatus!==s.PRISTINE&&Z}),[H.currentStatus,Z]);Object(o.useEffect)(()=>{const e=Object.keys(H.paymentMethods);if(!J||!e.length)return;const t=[...e,...Object.keys(H.expressPaymentMethods)];if(H.activePaymentMethod&&t.includes(H.activePaymentMethod))return;W().pristine();const c=Object.keys(X).flatMap(e=>X[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,o=`wc-${t}-payment-token`;z.setActivePaymentMethod(t,{token:e,payment_method:t,[o]:e,isSavedToken:!0})}else z.setActivePaymentMethod(Object.keys(H.paymentMethods)[0])},[J,H.paymentMethods,H.expressPaymentMethods,z,W,H.activePaymentMethod,X]),Object(o.useEffect)(()=>{!c||d||i||ee.isFinished||W().processing()},[c,d,i,ee.isFinished,W]),Object(o.useEffect)(()=>{a&&!ee.isSuccessful&&W().pristine()},[a,ee.isSuccessful,W]),Object(o.useEffect)(()=>{d&&ee.isSuccessful&&W().pristine()},[d,ee.isSuccessful,W]),Object(o.useEffect)(()=>{ee.isProcessing&&(_("wc-payment-error",U.PAYMENTS),Object(D.b)($.current,"payment_processing",{}).then(e=>{let t,c;var o,r,n,s,a,l;if(e.forEach(e=>{E(e)&&(t=e),(f(e)||F(e))&&(c=e)}),t&&!c)W().success(null===(o=t)||void 0===o||null===(r=o.meta)||void 0===r?void 0:r.paymentMethodData,null===(n=t)||void 0===n||null===(s=n.meta)||void 0===s?void 0:s.billingAddress,null===(a=t)||void 0===a||null===(l=a.meta)||void 0===l?void 0:l.shippingData);else if(c&&F(c)){var i,u,d,p,b,m;c.message&&c.message.length&&O(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),W().failed(null===(i=c)||void 0===i?void 0:i.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingAddress)}else if(c){var g,j;c.message&&c.message.length&&O(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(j=c)||void 0===j?void 0:j.messageContext)||U.PAYMENTS}),W().error(c.message),h(null===(g=c)||void 0===g?void 0:g.validationErrors)}else W().success()}))},[ee.isProcessing,h,W,_,U.PAYMENTS,E,F,f,O]);const te="object"==typeof H.paymentMethodData&&Object(r.b)(H.paymentMethodData,"token")?H.paymentMethodData.token+"":"",ce={setPaymentStatus:W,currentStatus:ee,paymentStatuses:s,paymentMethodData:H.paymentMethodData,errorMessage:H.errorMessage,activePaymentMethod:H.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:z.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:X,paymentMethods:H.paymentMethods,expressPaymentMethods:H.expressPaymentMethods,paymentMethodsInitialized:J,expressPaymentMethodsInitialized:K,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:H.shouldSavePaymentMethod,setShouldSavePayment:z.setShouldSavePayment};return Object(o.createElement)(L.Provider,{value:ce},t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var o=c(50),r=c(162);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:n,expressPaymentMethodsInitialized:s}=Object(r.b)(),a=Object(o.a)(t),l=Object(o.a)(c);return{paymentMethods:e?l:a,isInitialized:e?s:n}},s=()=>n(!1),a=()=>n(!0)},,,,function(e,t){},,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(274),s=c(171),a=c(59),l=c(162),i=c(51),u=c.n(i),d=c(158);t.a=()=>{const{isEditor:e}=Object(a.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:i,paymentMethodData:p,setPaymentStatus:b}=Object(l.b)(),m=Object(n.a)(),{paymentMethods:g}=Object(s.a)(),h=Object(o.useRef)(i),O=Object(o.useRef)(p),j=Object(o.useCallback)(e=>()=>{h.current=i,O.current=p,b().started(),t(e)},[i,p,t,b]),_=Object(o.useCallback)(()=>{b().pristine(),t(h.current,O.current)},[t,b]),E=Object(o.useCallback)(e=>{b().error(e),c(e),t(h.current,O.current)},[t,b,c]),k=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?E(e):c("")}),[c,E]),f=Object.entries(g),y=f.length>0?f.map(t=>{let[c,r]=t;const n=e?r.edit:r.content;return Object(o.isValidElement)(n)?Object(o.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(o.cloneElement)(n,{...m,onClick:j(c),onClose:_,onError:E,setExpressPaymentError:k})):null}):Object(o.createElement)("li",{key:"noneRegistered"},Object(r.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(o.createElement)(d.a,{isEditor:e},Object(o.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},y))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var o=c(1),r=c(9),n=c(18),s=c(14),a=c(40),l=c(104);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(a.a)(),{createErrorNotice:i}=Object(r.useDispatch)("core/notices"),{createNotice:u}=Object(r.useDispatch)("core/notices"),{setValidationErrors:d}=Object(l.b)(),p=Object(r.useSelect)((t,c)=>{let{dispatch:r}=c;const a=t(n.CART_STORE_KEY),l=a.isApplyingCoupon(),p=a.isRemovingCoupon(),{applyCoupon:b,removeCoupon:m,receiveApplyingCoupon:g}=r(n.CART_STORE_KEY);return{applyCoupon:t=>{b(t).then(c=>{!0===c&&u("info",Object(o.sprintf)(
8
  /* translators: %s coupon code. */
2
  /* translators: %s Field label. */
3
  Object(r.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(s.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},i=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,l(c)]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{})]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=c&&void 0!==i[c]?i[c]:{};return e.map(e=>({key:e,...o.defaultAddressFields[e]||{},...r[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var o=c(0);c(151),t.a=()=>Object(o.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(38),s=c(4),a=c.n(s),l=c(27);c(149);const i=e=>{let{currency:t,maxPrice:c,minPrice:s,priceClassName:i,priceStyle:u={}}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.sprintf)(
4
  /* translators: %1$s min price, %2$s max price */
5
+ Object(r.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(s),Object(l.formatPrice)(c))),Object(o.createElement)("span",{"aria-hidden":!0},Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:s,style:u})," — ",Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:s,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("del",{className:a()("wc-block-components-product-price__regular",c),style:s},e),value:l}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("ins",{className:a()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:r,format:s="<price/>",maxPrice:l,minPrice:d,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}=e;const j=a()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});s.includes("<price/>")||(s="<price/>",console.error("Price formats need to include the `<price/>` tag."));const _=g&&p!==g;let E=Object(o.createElement)("span",{className:a()("wc-block-components-product-price__value",b)});return _?E=Object(o.createElement)(u,{currency:r,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}):void 0!==d&&void 0!==l?E=Object(o.createElement)(i,{currency:r,maxPrice:l,minPrice:d,priceClassName:b,priceStyle:m}):p&&(E=Object(o.createElement)(n.a,{className:a()("wc-block-components-product-price__value",b),currency:r,value:p,style:m})),Object(o.createElement)("span",{className:j},Object(o.createInterpolateElement)(s,{price:E}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));var o=c(7);let r;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(r||(r={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:r.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:r.REMOVE_EVENT_CALLBACK,eventType:e})},s={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,eventType:c,id:o,callback:n,priority:a}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case r.ADD_EVENT_CALLBACK:return l.set(o,{priority:a,callback:n}),{...e,[c]:l};case r.REMOVE_EVENT_CALLBACK:return l.delete(o),{...e,[c]:l}}}},,,,,function(e,t){e.exports=window.wp.warning},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var o=c(0),r=c(7),n=c(25),s=c.n(n);const a=Object(o.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(o.useContext)(a),i=e=>{let{children:t}=e;const[c,n]=Object(o.useState)({}),l=Object(o.useCallback)(e=>c[e],[c]),i=Object(o.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(o.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...o}=t;return o})},[]),d=Object(o.useCallback)(()=>{n({})},[]),p=Object(o.useCallback)(e=>{e&&n(t=>(e=Object(r.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&s()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),b=Object(o.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const o={...c[e],...t};return s()(c[e],o)?c:{...c,[e]:o}})},[]),m={getValidationError:l,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(o.useCallback)(e=>{b(e,{hidden:!0})},[b]),showValidationError:Object(o.useCallback)(e=>{b(e,{hidden:!1})},[b]),showAllValidationErrors:Object(o.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(o.createElement)(a.Provider,{value:m},t)}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return E})),c.d(t,"a",(function(){return k}));var o=c(0);const r={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},n={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},s={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:r,shippingRates:[],isLoadingRates:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},a=(e,t)=>{let{type:c}=t;return Object.values(r).includes(c)?c:e};var l=c(98),i=c(236);const u=e=>({onSuccess:Object(i.a)("shipping_rates_success",e),onFail:Object(i.a)("shipping_rates_fail",e),onSelectSuccess:Object(i.a)("shipping_rate_select_success",e),onSelectFail:Object(i.a)("shipping_rate_select_fail",e)});var d=c(237),p=c(54),b=c(40),m=c(112),g=c(83);const{NONE:h,INVALID_ADDRESS:O,UNKNOWN:j}=r,_=Object(o.createContext)(s),E=()=>Object(o.useContext)(_),k=e=>{let{children:t}=e;const{dispatchActions:c}=Object(p.b)(),{shippingRates:s,isLoadingRates:i,cartErrors:E}=Object(b.a)(),{isSelectingRate:k}=Object(m.a)(),{selectedRates:f}=Object(g.a)(),[y,w]=Object(o.useReducer)(a,h),[v,S]=Object(o.useReducer)(l.b,{}),C=Object(o.useRef)(v),N=Object(o.useMemo)(()=>({onShippingRateSuccess:u(S).onSuccess,onShippingRateFail:u(S).onFail,onShippingRateSelectSuccess:u(S).onSelectSuccess,onShippingRateSelectFail:u(S).onSelectFail}),[S]);Object(o.useEffect)(()=>{C.current=v},[v]),Object(o.useEffect)(()=>{i?c.incrementCalculating():c.decrementCalculating()},[i,c]),Object(o.useEffect)(()=>{k?c.incrementCalculating():c.decrementCalculating()},[k,c]),Object(o.useEffect)(()=>{E.length>0&&E.some(e=>!(!e.code||!Object.values(n).includes(e.code)))?w({type:O}):w({type:h})},[E]);const P=Object(o.useMemo)(()=>({isPristine:y===h,isValid:y===h,hasInvalidAddress:y===O,hasError:y===j||y===O}),[y]);Object(o.useEffect)(()=>{i||0!==s.length&&!P.hasError||Object(d.a)(C.current,"shipping_rates_fail",{hasInvalidAddress:P.hasInvalidAddress,hasError:P.hasError})},[s,i,P.hasError,P.hasInvalidAddress]),Object(o.useEffect)(()=>{!i&&s.length>0&&!P.hasError&&Object(d.a)(C.current,"shipping_rates_success",s)},[s,i,P.hasError]),Object(o.useEffect)(()=>{k||(P.hasError?Object(d.a)(C.current,"shipping_rate_select_fail",{hasError:P.hasError,hasInvalidAddress:P.hasInvalidAddress}):Object(d.a)(C.current,"shipping_rate_select_success",f.current))},[f,k,P.hasError,P.hasInvalidAddress]);const R={shippingErrorStatus:P,dispatchErrorStatus:w,shippingErrorTypes:r,...N};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_.Provider,{value:R},t))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"string"==typeof e},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(8);function r(e,t){const c=Object(o.useRef)();return Object(o.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var o=c(9),r=c(0),n=c(18),s=c(124),a=c(81);const l=()=>{const e=Object(s.a)(),{dispatchCheckoutEvent:t}=Object(a.a)(),{selectShippingRate:c}=Object(o.useDispatch)(n.CART_STORE_KEY);return{selectShippingRate:Object(r.useCallback)((o,r)=>{c(o,r).then(()=>{t("set-selected-shipping-rate",{shippingRateId:o})}).catch(t=>{e(t)})},[c,t,e]),isSelectingRate:Object(o.useSelect)(e=>e(n.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(14),a=c(4),l=c.n(a);c(148),t.a=e=>{let{className:t="",disabled:c=!1,name:o,permalink:a="",target:i,rel:u,style:d,onClick:p,...b}=e;const m=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",r()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(o)}}))}return Object(n.createElement)("a",r()({className:m,href:a,target:i},b,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(o)},style:d}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(9);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const c=Object(o.select)("core/notices").getNotices(),{removeNotice:r}=Object(o.dispatch)("core/notices"),n=c.filter(t=>t.status===e);n.forEach(e=>r(e.id,t))}},function(e,t,c){"use strict";var o=c(0),r=c(90),n=c(61);const s=e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},a=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;";const o=a(e),r=o.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(r,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;";const r=a(e),s=r.slice(0,t);if(c)return Object(n.autop)(l(s,o));const i=s.match(/([\s]+)/g),u=i?i.length:0,d=r.slice(0,t+u);return Object(n.autop)(l(d,o))};t.a=e=>{let{source:t,maxLength:c=15,countType:a="words",className:l="",style:d={}}=e;const p=Object(o.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const o=Object(n.autop)(e),a=Object(r.count)(o,c);if(a<=t)return o;const l=s(o),d=Object(r.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,a),[t,c,a]);return Object(o.createElement)(o.RawHTML,{style:d,className:l},p)}},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),s=c(132);t.a=e=>{let{checked:t,name:c,onChange:r,option:a}=e;const{value:l,label:i,description:u,secondaryLabel:d,secondaryDescription:p}=a;return Object(o.createElement)("label",{className:n()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(o.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>r(e.target.value),checked:t,"aria-describedby":n()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:d,[`${c}-${l}__description`]:u,[`${c}-${l}__secondary-description`]:p})}),Object(o.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:d,description:u,secondaryDescription:p}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(0);const r=()=>{const[,e]=Object(o.useState)();return Object(o.useCallback)(t=>{e(()=>{throw t})},[])}},,,function(e,t,c){"use strict";var o=c(24),r=c.n(o),n=c(0),s=c(8),a=c(1),l=c(22),i=e=>{let{imageUrl:t=l.m+"/block-error.svg",header:c=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:o=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:r,errorMessagePrefix:s=Object(a.__)("Error:","woo-gutenberg-products-block"),button:i,showErrorBlock:u=!0}=e;return u?Object(n.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(n.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(n.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(n.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),o&&Object(n.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},o),r&&Object(n.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",r),i&&Object(n.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i))):null};c(193);class u extends s.Component{constructor(){super(...arguments),r()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,showErrorBlock:o=!0,text:r,errorMessagePrefix:s,renderError:a,button:l}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof a?a({errorMessage:u}):Object(n.createElement)(i,{showErrorBlock:o,errorMessage:c?u:null,header:e,imageUrl:t,text:r,errorMessagePrefix:s,button:l}):this.props.children}}t.a=u},,function(e,t){},,,function(e,t,c){"use strict";var o=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:r,secondaryDescription:n,id:s}=e;return Object(o.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(o.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(o.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(o.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(o.createElement)("div",{className:"wc-block-components-radio-control__description-group"},r&&Object(o.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},r),n&&Object(o.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},n)))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s);c(261),t.a=e=>{let{children:t,className:c,headingLevel:o,...s}=e;const l=a()("wc-block-components-title",c),i="h"+o;return Object(n.createElement)(i,r()({className:l},s),t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return n})),c.d(t,"a",(function(){return s}));var o=c(0);const r=Object(o.createContext)({setIsSuppressed:e=>{},isSuppressed:!1}),n=()=>Object(o.useContext)(r),s=e=>{let{children:t}=e;const[c,n]=Object(o.useState)(!1),s={setIsSuppressed:n,isSuppressed:c};return Object(o.createElement)(r.Provider,{value:s},t)}},,,function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),s=c(4),a=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:o=""}=e;return c?Object(n.createElement)("img",{className:l(t),src:c,alt:o}):null},u=c(22);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(110);c(190),t.a=e=>{let{icons:t=[],align:c="center",className:o}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.a)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},o);return Object(n.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(n.createElement)(i,r()({key:"payment-method-icon-"+e.id},t))}))}},,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"number"==typeof e},function(e,t,c){"use strict";var o=c(24),r=c.n(o),n=c(0),s=c(1),a=c(8),l=c(2),i=c(228),u=c(36);class d extends a.Component{constructor(){super(...arguments),r()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const o=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(n.createElement)(i.a,{additionalNotices:o,context:u.c.PAYMENTS})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),s=c(10),a=c(120);c(259);const l=e=>{let{className:t="",id:c,selected:r,onChange:i,options:u=[]}=e;const d=Object(s.useInstanceId)(l),p=c||d;return u.length?Object(o.createElement)("div",{className:n()("wc-block-components-radio-control",t)},u.map(e=>Object(o.createElement)(a.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===r,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}}))):null};t.a=l},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return F})),c.d(t,"a",(function(){return U}));var o=c(0),r=c(34),n=c(9);let s,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(s||(s={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const l={currentStatus:s.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},i={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:s,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,{type:t,paymentMethodData:c,shouldSavePaymentMethod:o=!1,errorMessage:r="",paymentMethods:n={},paymentMethod:i=""}=arguments.length>1?arguments[1]:void 0;switch(t){case s.PRISTINE:return{...l,...e,errorMessage:"",currentStatus:s.PRISTINE};case s.STARTED:return{...e,currentStatus:s.STARTED};case s.ERROR:return e.currentStatus!==s.ERROR?{...e,currentStatus:s.ERROR,errorMessage:r||e.errorMessage}:e;case s.FAILED:return e.currentStatus!==s.FAILED?{...e,currentStatus:s.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:r||e.errorMessage}:e;case s.SUCCESS:return e.currentStatus!==s.SUCCESS?{...e,currentStatus:s.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case s.PROCESSING:return e.currentStatus!==s.PROCESSING?{...e,currentStatus:s.PROCESSING,errorMessage:""}:e;case s.COMPLETE:return e.currentStatus!==s.COMPLETE?{...e,currentStatus:s.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:n};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:n};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:o};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:i,paymentMethodData:c||e.paymentMethodData}}},d=c(1),p=c(41),b=c(50),m=c(2),g=c(114),h=c(51),O=c.n(h),j=c(59),_=c(72),E=c(40),k=c(36),f=c(83);const y=(e,t,c,r)=>{const[s,a]=Object(o.useState)(!1),{isEditor:l}=Object(j.b)(),{selectedRates:i}=Object(f.a)(),{billingAddress:u,shippingAddress:p}=Object(_.b)(),h=Object(b.a)(i),k=Object(b.a)(c),y=Object(E.a)(),{cartTotals:w,cartIsLoading:v,cartNeedsShipping:S,paymentRequirements:C}=y,N=Object(o.useRef)({cart:y,cartTotals:w,cartNeedsShipping:S,billingData:u,billingAddress:u,shippingAddress:p,selectedShippingMethods:h,paymentRequirements:C}),{createErrorNotice:P}=Object(n.useDispatch)("core/notices");Object(o.useEffect)(()=>{N.current={cart:y,cartTotals:w,cartNeedsShipping:S,get billingData(){return O()("billingData",{alternative:"billingAddress",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-blocks/pull/6369"}),this.billingAddress},billingAddress:u,shippingAddress:p,selectedShippingMethods:h,paymentRequirements:C}},[y,w,S,u,p,h,C]);const R=Object(o.useCallback)(async()=>{let c={};const o=e=>{c={...c,[e.name]:e}};for(let e=0;e<k.length;e++){const c=k[e],n=t[c];if(n)try{const e=!!l||await Promise.resolve(n.canMakePayment(N.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);o(n)}}catch(e){if(m.CURRENT_USER_IS_ADMIN||l){const t=Object(d.sprintf)(
6
  /* translators: %s the id of the payment method being registered (bank transfer, cheque...) */
7
  Object(d.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),n.paymentMethodId);P(`${t} ${e}`,{context:r,id:`wc-${n.paymentMethodId}-registration-error`})}}}e(c),a(!0)},[P,e,l,r,k,t]),x=Object(g.a)(R,500,{leading:!0});return Object(o.useEffect)(()=>{v||x()},[x,y,h,u,v]),s},w=e=>({type:e}),v=e=>({type:s.ERROR,errorMessage:e}),S=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:s.FAILED,errorMessage:t,paymentMethodData:c}},C=e=>{let{paymentMethodData:t}=e;return{type:s.SUCCESS,paymentMethodData:t}},N=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),P=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),x=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var T=c(91),A=c(54),I=c(98),M=c(236);var D=c(237),B=c(104);const L=Object(o.createContext)(i),F=()=>Object(o.useContext)(L),U=e=>{let{children:t}=e;const{isProcessing:c,isIdle:a,isCalculating:i,hasError:d}=Object(A.b)(),{isEditor:b,getPreviewData:g}=Object(j.b)(),{setValidationErrors:h}=Object(B.b)(),{createErrorNotice:O,removeNotice:_}=Object(n.useDispatch)("core/notices"),{isSuccessResponse:E,isErrorResponse:f,isFailResponse:F,noticeContexts:U}=Object(k.d)(),[V,q]=Object(o.useReducer)(I.b,{}),{onPaymentProcessing:G}=(e=>Object(o.useMemo)(()=>({onPaymentProcessing:Object(M.a)("payment_processing",e)}),[e]))(q),$=Object(o.useRef)(V);Object(o.useEffect)(()=>{$.current=V},[V]);const[H,Y]=Object(o.useReducer)(u,l),{dispatchActions:z,setPaymentStatus:W}=(e=>{const{setBillingAddress:t,setShippingAddress:c}=Object(T.a)();return{dispatchActions:Object(o.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(N(t))},setRegisteredExpressPaymentMethods:t=>{e(P(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(x(t,c))}}),[e]),setPaymentStatus:Object(o.useCallback)(()=>({pristine:()=>e(w(s.PRISTINE)),started:()=>e(w(s.STARTED)),processing:()=>e(w(s.PROCESSING)),completed:()=>e(w(s.COMPLETE)),error:t=>e(v(t)),failed:function(c,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r&&t(r),e(S({errorMessage:c||"",paymentMethodData:o||{}}))},success:function(o){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r&&t(r),void 0!==typeof n&&null!=n&&n.address&&c(n.address),e(C({paymentMethodData:o}))}}),[e,t,c])}})(Y),J=(e=>{const t=Object(p.getPaymentMethods)(),{noticeContexts:c}=Object(k.d)(),o=new Set([...Object(m.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return y(e,t,Array.from(o),c.PAYMENTS)})(z.setRegisteredPaymentMethods),K=(e=>{const t=Object(p.getExpressPaymentMethods)(),{noticeContexts:c}=Object(k.d)();return y(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(z.setRegisteredExpressPaymentMethods),X=Object(o.useMemo)(()=>b?g("previewSavedPaymentMethods"):J?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(m.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),o={};return c.forEach(c=>{const r=t[c].filter(t=>{var c;let{method:{gateway:o}}=t;return o in e&&(null===(c=e[o].supports)||void 0===c?void 0:c.showSavedCards)});r.length&&(o[c]=r)}),o}(H.paymentMethods):{},[b,g,J,H.paymentMethods]),Q=Object(o.useCallback)(e=>{e?O(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):_("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[O,U.EXPRESS_PAYMENTS,_]),Z=Object.keys(H.expressPaymentMethods).includes(H.activePaymentMethod),ee=Object(o.useMemo)(()=>({isPristine:H.currentStatus===s.PRISTINE,isStarted:H.currentStatus===s.STARTED,isProcessing:H.currentStatus===s.PROCESSING,isFinished:[s.ERROR,s.FAILED,s.SUCCESS].includes(H.currentStatus),hasError:H.currentStatus===s.ERROR,hasFailed:H.currentStatus===s.FAILED,isSuccessful:H.currentStatus===s.SUCCESS,isDoingExpressPayment:H.currentStatus!==s.PRISTINE&&Z}),[H.currentStatus,Z]);Object(o.useEffect)(()=>{const e=Object.keys(H.paymentMethods);if(!J||!e.length)return;const t=[...e,...Object.keys(H.expressPaymentMethods)];if(H.activePaymentMethod&&t.includes(H.activePaymentMethod))return;W().pristine();const c=Object.keys(X).flatMap(e=>X[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,o=`wc-${t}-payment-token`;z.setActivePaymentMethod(t,{token:e,payment_method:t,[o]:e,isSavedToken:!0})}else z.setActivePaymentMethod(Object.keys(H.paymentMethods)[0])},[J,H.paymentMethods,H.expressPaymentMethods,z,W,H.activePaymentMethod,X]),Object(o.useEffect)(()=>{!c||d||i||ee.isFinished||W().processing()},[c,d,i,ee.isFinished,W]),Object(o.useEffect)(()=>{a&&!ee.isSuccessful&&W().pristine()},[a,ee.isSuccessful,W]),Object(o.useEffect)(()=>{d&&ee.isSuccessful&&W().pristine()},[d,ee.isSuccessful,W]),Object(o.useEffect)(()=>{ee.isProcessing&&(_("wc-payment-error",U.PAYMENTS),Object(D.b)($.current,"payment_processing",{}).then(e=>{let t,c;var o,r,n,s,a,l;if(e.forEach(e=>{E(e)&&(t=e),(f(e)||F(e))&&(c=e)}),t&&!c)W().success(null===(o=t)||void 0===o||null===(r=o.meta)||void 0===r?void 0:r.paymentMethodData,null===(n=t)||void 0===n||null===(s=n.meta)||void 0===s?void 0:s.billingAddress,null===(a=t)||void 0===a||null===(l=a.meta)||void 0===l?void 0:l.shippingData);else if(c&&F(c)){var i,u,d,p,b,m;c.message&&c.message.length&&O(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),W().failed(null===(i=c)||void 0===i?void 0:i.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingAddress)}else if(c){var g,j;c.message&&c.message.length&&O(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(j=c)||void 0===j?void 0:j.messageContext)||U.PAYMENTS}),W().error(c.message),h(null===(g=c)||void 0===g?void 0:g.validationErrors)}else W().success()}))},[ee.isProcessing,h,W,_,U.PAYMENTS,E,F,f,O]);const te="object"==typeof H.paymentMethodData&&Object(r.b)(H.paymentMethodData,"token")?H.paymentMethodData.token+"":"",ce={setPaymentStatus:W,currentStatus:ee,paymentStatuses:s,paymentMethodData:H.paymentMethodData,errorMessage:H.errorMessage,activePaymentMethod:H.activePaymentMethod,activeSavedToken:te,setActivePaymentMethod:z.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:X,paymentMethods:H.paymentMethods,expressPaymentMethods:H.expressPaymentMethods,paymentMethodsInitialized:J,expressPaymentMethodsInitialized:K,setExpressPaymentError:Q,isExpressPaymentMethodActive:Z,shouldSavePayment:H.shouldSavePaymentMethod,setShouldSavePayment:z.setShouldSavePayment};return Object(o.createElement)(L.Provider,{value:ce},t)}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var o=c(50),r=c(162);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:n,expressPaymentMethodsInitialized:s}=Object(r.b)(),a=Object(o.a)(t),l=Object(o.a)(c);return{paymentMethods:e?l:a,isInitialized:e?s:n}},s=()=>n(!1),a=()=>n(!0)},,,,function(e,t){},,,,,,,,,function(e,t){},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(274),s=c(171),a=c(59),l=c(162),i=c(51),u=c.n(i),d=c(158);t.a=()=>{const{isEditor:e}=Object(a.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:i,paymentMethodData:p,setPaymentStatus:b}=Object(l.b)(),m=Object(n.a)(),{paymentMethods:g}=Object(s.a)(),h=Object(o.useRef)(i),O=Object(o.useRef)(p),j=Object(o.useCallback)(e=>()=>{h.current=i,O.current=p,b().started(),t(e)},[i,p,t,b]),_=Object(o.useCallback)(()=>{b().pristine(),t(h.current,O.current)},[t,b]),E=Object(o.useCallback)(e=>{b().error(e),c(e),t(h.current,O.current)},[t,b,c]),k=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?E(e):c("")}),[c,E]),f=Object.entries(g),y=f.length>0?f.map(t=>{let[c,r]=t;const n=e?r.edit:r.content;return Object(o.isValidElement)(n)?Object(o.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(o.cloneElement)(n,{...m,onClick:j(c),onClose:_,onError:E,setExpressPaymentError:k})):null}):Object(o.createElement)("li",{key:"noneRegistered"},Object(r.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(o.createElement)(d.a,{isEditor:e},Object(o.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},y))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var o=c(1),r=c(9),n=c(18),s=c(14),a=c(40),l=c(104);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{cartCoupons:t,cartIsLoading:c}=Object(a.a)(),{createErrorNotice:i}=Object(r.useDispatch)("core/notices"),{createNotice:u}=Object(r.useDispatch)("core/notices"),{setValidationErrors:d}=Object(l.b)(),p=Object(r.useSelect)((t,c)=>{let{dispatch:r}=c;const a=t(n.CART_STORE_KEY),l=a.isApplyingCoupon(),p=a.isRemovingCoupon(),{applyCoupon:b,removeCoupon:m,receiveApplyingCoupon:g}=r(n.CART_STORE_KEY);return{applyCoupon:t=>{b(t).then(c=>{!0===c&&u("info",Object(o.sprintf)(
8
  /* translators: %s coupon code. */
build/featured-category.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-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '4fbaf91398375bb6dfe66bf092f0fde1');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '03a0638191d8610b60d00f9977e08d1b');
build/featured-product.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-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3dcd545091fcf6a91ece42085bc70401');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '5ce4439c70e5fb202eac482e1f00df03');
build/handpicked-products.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-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => '873f8ae7632e5168bb379714842d4da9');
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-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => 'e620425887e50b11aca9186701f88333');
build/legacy-template.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '3a5329cec6798bc4d74b0011efe89637');
1
+ <?php return array('dependencies' => array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '73f7ee6705958bf864232a209ee8e9dd');
build/legacy-template.js CHANGED
@@ -1,3 +1,3 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["legacy-template"]=function(e){function t(t){for(var c,l,i=t[0],a=t[1],u=t[2],p=0,d=[];p<i.length;p++)l=i[p],Object.prototype.hasOwnProperty.call(r,l)&&r[l]&&d.push(r[l][0]),r[l]=0;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);for(s&&s(t);d.length;)d.shift()();return n.push.apply(n,u||[]),o()}function o(){for(var e,t=0;t<n.length;t++){for(var o=n[t],c=!0,i=1;i<o.length;i++){var a=o[i];0!==r[a]&&(c=!1)}c&&(n.splice(t--,1),e=l(l.s=o[0]))}return e}var c={},r={15:0},n=[];function l(t){if(c[t])return c[t].exports;var o=c[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,l),o.l=!0,o.exports}l.m=e,l.c=c,l.d=function(e,t,o){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(l.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)l.d(o,c,function(t){return e[t]}.bind(null,c));return o},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var s=a;return n.push([481,0]),o()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t){e.exports=window.wp.primitives},13:function(e,t){e.exports=window.wp.blocks},2:function(e,t){e.exports=window.wc.wcSettings},22:function(e,t,o){"use strict";o.d(t,"o",(function(){return n})),o.d(t,"m",(function(){return l})),o.d(t,"l",(function(){return i})),o.d(t,"n",(function(){return a})),o.d(t,"j",(function(){return u})),o.d(t,"e",(function(){return s})),o.d(t,"f",(function(){return p})),o.d(t,"g",(function(){return d})),o.d(t,"k",(function(){return b})),o.d(t,"c",(function(){return m})),o.d(t,"d",(function(){return f})),o.d(t,"h",(function(){return w})),o.d(t,"a",(function(){return g})),o.d(t,"i",(function(){return h})),o.d(t,"b",(function(){return k}));var c,r=o(2);const n=Object(r.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=n.pluginUrl+"images/",i=n.pluginUrl+"build/",a=n.buildPhase,u=null===(c=r.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,s=r.STORE_PAGES.checkout.id,p=r.STORE_PAGES.checkout.permalink,d=r.STORE_PAGES.privacy.permalink,b=(r.STORE_PAGES.privacy.title,r.STORE_PAGES.terms.permalink),m=(r.STORE_PAGES.terms.title,r.STORE_PAGES.cart.id),f=r.STORE_PAGES.cart.permalink,w=(r.STORE_PAGES.myaccount.permalink?r.STORE_PAGES.myaccount.permalink:Object(r.getSetting)("wpLoginUrl","/wp-login.php"),Object(r.getSetting)("shippingCountries",{})),g=Object(r.getSetting)("allowedCountries",{}),h=Object(r.getSetting)("shippingStates",{}),k=Object(r.getSetting)("allowedStates",{})},3:function(e,t){e.exports=window.wp.components},481:function(e,t,o){e.exports=o(512)},482:function(e,t){},483:function(e,t){},5:function(e,t){e.exports=window.wp.blockEditor},512:function(e,t,o){"use strict";o.r(t);var c=o(0),r=o(13),n=o(65),l=o(22),i=o(5),a=o(3),u=o(1),s=o(547),p=o(115),d=o(9);o(482),o(483);const b={"single-product":{title:Object(u.__)("WooCommerce Single Product Block","woo-gutenberg-products-block"),placeholder:"single-product"},"archive-product":{title:Object(u.__)("WooCommerce Product Grid Block","woo-gutenberg-products-block"),placeholder:"archive-product"},"taxonomy-product_cat":{title:Object(u.__)("WooCommerce Product Taxonomy Block","woo-gutenberg-products-block"),placeholder:"archive-product"},"taxonomy-product_tag":{title:Object(u.__)("WooCommerce Product Tag Block","woo-gutenberg-products-block"),placeholder:"archive-product"}};Object(r.registerBlockType)("woocommerce/legacy-template",{title:Object(u.__)("WooCommerce Classic Template","woo-gutenberg-products-block"),icon:Object(c.createElement)(p.a,{icon:s.a,className:"wc-block-editor-components-block-icon"}),category:"woocommerce",apiVersion:2,keywords:[Object(u.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(u.__)("Renders classic WooCommerce PHP templates.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1,inserter:!1},example:{attributes:{isPreview:!0}},attributes:{template:{type:"string",default:"any"},align:{type:"string",default:"wide"}},edit:e=>{var t,o,p,m;let{clientId:f,attributes:w}=e;const{replaceBlock:g}=Object(d.useDispatch)("core/block-editor"),h=Object(i.useBlockProps)(),k=null!==(t=null===(o=b[w.template])||void 0===o?void 0:o.title)&&void 0!==t?t:w.template,O=null!==(p=null===(m=b[w.template])||void 0===m?void 0:m.placeholder)&&void 0!==p?p:"fallback";return Object(c.createElement)("div",h,Object(c.createElement)(a.Placeholder,{icon:s.a,label:k,className:"wp-block-woocommerce-classic-template__placeholder"},Object(c.createElement)("div",{className:"wp-block-woocommerce-classic-template__placeholder-copy"},Object(c.createElement)("p",{className:"wp-block-woocommerce-classic-template__placeholder-warning"},Object(c.createElement)("strong",null,Object(u.__)("Attention: Do not remove this block!","woo-gutenberg-products-block"))," ",Object(u.__)("Removal will cause unintended effects on your store.","woo-gutenberg-products-block")),Object(c.createElement)("p",null,Object(u.sprintf)(
2
  /* translators: %s is the template title */
3
- Object(u.__)("This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your product image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.","woo-gutenberg-products-block"),k))),Object(c.createElement)("div",{className:"wp-block-woocommerce-classic-template__placeholder-wireframe"},Object(n.a)()&&Object(c.createElement)("div",{className:"wp-block-woocommerce-classic-template__placeholder-migration-button-container"},Object(c.createElement)(a.Button,{isPrimary:!0,onClick:()=>{g(f,Object(r.createBlock)("core/paragraph",{content:"Instead of this block, the new Product Grid Block will be rendered"}))},text:Object(u.__)("Use the blockified Product Grid Block","woo-gutenberg-products-block")})),Object(c.createElement)("img",{className:"wp-block-woocommerce-classic-template__placeholder-image",src:`${l.m}template-placeholders/${O}.svg`,alt:k}))))},save:()=>null})},65:function(e,t,o){"use strict";o.d(t,"c",(function(){return n})),o.d(t,"d",(function(){return l})),o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return a}));var c=o(13),r=o(22);const n=(e,t)=>{if(r.n>2)return Object(c.registerBlockType)(e,t)},l=(e,t)=>{if(r.n>1)return Object(c.registerBlockType)(e,t)},i=()=>r.n>2,a=()=>r.n>1},9:function(e,t){e.exports=window.wp.data}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["legacy-template"]=function(e){function t(t){for(var r,l,i=t[0],u=t[1],a=t[2],p=0,d=[];p<i.length;p++)l=i[p],Object.prototype.hasOwnProperty.call(c,l)&&c[l]&&d.push(c[l][0]),c[l]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);d.length;)d.shift()();return n.push.apply(n,a||[]),o()}function o(){for(var e,t=0;t<n.length;t++){for(var o=n[t],r=!0,i=1;i<o.length;i++){var u=o[i];0!==c[u]&&(r=!1)}r&&(n.splice(t--,1),e=l(l.s=o[0]))}return e}var r={},c={15:0},n=[];function l(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,l),o.l=!0,o.exports}l.m=e,l.c=r,l.d=function(e,t,o){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(l.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(o,r,function(t){return e[t]}.bind(null,r));return o},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var a=0;a<i.length;a++)t(i[a]);var s=u;return n.push([481,0]),o()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t){e.exports=window.wp.primitives},13:function(e,t){e.exports=window.wp.blocks},2:function(e,t){e.exports=window.wc.wcSettings},22:function(e,t,o){"use strict";o.d(t,"o",(function(){return n})),o.d(t,"m",(function(){return l})),o.d(t,"l",(function(){return i})),o.d(t,"n",(function(){return u})),o.d(t,"j",(function(){return a})),o.d(t,"e",(function(){return s})),o.d(t,"f",(function(){return p})),o.d(t,"g",(function(){return d})),o.d(t,"k",(function(){return b})),o.d(t,"c",(function(){return m})),o.d(t,"d",(function(){return f})),o.d(t,"h",(function(){return g})),o.d(t,"a",(function(){return w})),o.d(t,"i",(function(){return O})),o.d(t,"b",(function(){return h}));var r,c=o(2);const n=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=n.pluginUrl+"images/",i=n.pluginUrl+"build/",u=n.buildPhase,a=null===(r=c.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,s=c.STORE_PAGES.checkout.id,p=c.STORE_PAGES.checkout.permalink,d=c.STORE_PAGES.privacy.permalink,b=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),m=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),f=c.STORE_PAGES.cart.permalink,g=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),w=Object(c.getSetting)("allowedCountries",{}),O=Object(c.getSetting)("shippingStates",{}),h=Object(c.getSetting)("allowedStates",{})},3:function(e,t){e.exports=window.wp.components},481:function(e,t,o){e.exports=o(512)},482:function(e,t){},483:function(e,t){},5:function(e,t){e.exports=window.wp.blockEditor},512:function(e,t,o){"use strict";o.r(t);var r=o(0),c=o(13),n=o(65),l=o(22),i=o(5),u=o(3),a=o(1),s=o(547),p=o(115),d=o(9);o(482),o(483);const b="woocommerce/legacy-template",m={"single-product":{title:Object(a.__)("WooCommerce Single Product Block","woo-gutenberg-products-block"),placeholder:"single-product"},"archive-product":{title:Object(a.__)("WooCommerce Product Grid Block","woo-gutenberg-products-block"),placeholder:"archive-product"},"taxonomy-product_cat":{title:Object(a.__)("WooCommerce Product Taxonomy Block","woo-gutenberg-products-block"),placeholder:"archive-product"},"taxonomy-product_tag":{title:Object(a.__)("WooCommerce Product Tag Block","woo-gutenberg-products-block"),placeholder:"archive-product"},"product-search-results":{title:Object(a.__)("WooCommerce Product Search Results Block","woo-gutenberg-products-block"),placeholder:"archive-product"}},f=e=>{var t,o,p,b;let{clientId:f,attributes:g,setAttributes:w}=e;const{replaceBlock:O}=Object(d.useDispatch)("core/block-editor"),h=Object(i.useBlockProps)(),k=null!==(t=null===(o=m[g.template])||void 0===o?void 0:o.title)&&void 0!==t?t:g.template,v=null!==(p=null===(b=m[g.template])||void 0===b?void 0:b.placeholder)&&void 0!==p?p:"fallback";return Object(r.useEffect)(()=>{var e;return w({template:g.template,align:null!==(e=g.align)&&void 0!==e?e:"wide"})},[g.align,g.template,w]),Object(r.createElement)("div",h,Object(r.createElement)(u.Placeholder,{icon:s.a,label:k,className:"wp-block-woocommerce-classic-template__placeholder"},Object(r.createElement)("div",{className:"wp-block-woocommerce-classic-template__placeholder-copy"},Object(r.createElement)("p",{className:"wp-block-woocommerce-classic-template__placeholder-warning"},Object(r.createElement)("strong",null,Object(a.__)("Attention: Do not remove this block!","woo-gutenberg-products-block"))," ",Object(a.__)("Removal will cause unintended effects on your store.","woo-gutenberg-products-block")),Object(r.createElement)("p",null,Object(a.sprintf)(
2
  /* translators: %s is the template title */
3
+ Object(a.__)("This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your product image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.","woo-gutenberg-products-block"),k))),Object(r.createElement)("div",{className:"wp-block-woocommerce-classic-template__placeholder-wireframe"},Object(n.a)()&&Object(r.createElement)("div",{className:"wp-block-woocommerce-classic-template__placeholder-migration-button-container"},Object(r.createElement)(u.Button,{isPrimary:!0,onClick:()=>{O(f,Object(c.createBlock)("core/paragraph",{content:"Instead of this block, the new Product Grid Block will be rendered"}))},text:Object(a.__)("Use the blockified Product Grid Block","woo-gutenberg-products-block")})),Object(r.createElement)("img",{className:"wp-block-woocommerce-classic-template__placeholder-image",src:`${l.m}template-placeholders/${v}.svg`,alt:k}))))},g=Object.keys(m),w=e=>{let{template:t,inserter:o}=e;Object(c.registerBlockType)(b,{title:t?m[t].title:Object(a.__)("WooCommerce Classic Template","woo-gutenberg-products-block"),icon:Object(r.createElement)(p.a,{icon:s.a,className:"wc-block-editor-components-block-icon"}),category:"woocommerce",apiVersion:2,keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Renders classic WooCommerce PHP templates.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1,inserter:o},example:{attributes:{isPreview:!0}},attributes:{template:{type:"string",default:"any"},align:{type:"string",default:"wide"}},edit:e=>{let{attributes:o,clientId:c,setAttributes:n}=e;const l=null!=t?t:o.template;return Object(r.createElement)(f,{attributes:{...o,template:l},setAttributes:n,clientId:c})},save:()=>null})},O=e=>g.includes(e);let h;Object(n.a)()?Object(d.subscribe)(()=>{var e;const t=h,o=Object(d.select)("core/edit-site");if(h=null==o?void 0:o.getEditedPostId(),t===h)return;const r=null===(e=h)||void 0===e?void 0:e.split("//")[1];if(null==r)return;const n=Object(c.getBlockType)(b);if(void 0!==n&&(!O(r)||((e,t)=>(null==e?void 0:e.title)!==m[t].title)(n,r)))return Object(c.unregisterBlockType)(b),void(h=void 0);void 0===n&&O(r)&&w({template:r,inserter:!0})}):w({inserter:!1})},65:function(e,t,o){"use strict";o.d(t,"c",(function(){return n})),o.d(t,"d",(function(){return l})),o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return u}));var r=o(13),c=o(22);const n=(e,t)=>{if(c.n>2)return Object(r.registerBlockType)(e,t)},l=(e,t)=>{if(c.n>1)return Object(r.registerBlockType)(e,t)},i=()=>c.n>2,u=()=>c.n>1},9:function(e,t){e.exports=window.wp.data}});
build/mini-cart-component-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '20b263c4d4d5b34fa5da7de387f40984');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '504dfc71f103c3a33f0a4749987a23aa');
build/mini-cart-component-frontend.js CHANGED
@@ -1,5 +1,5 @@
1
  !function(e){function t(t){for(var r,o,c=t[0],a=t[1],i=0,l=[];i<c.length;i++)o=c[i],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);l.length;)l.shift()()}var r={},n={49:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var c=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=c);var a,i=document.createElement("script");i.charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",3:"vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542",4:"cart-blocks/cart-line-items--mini-cart-contents-block/products-table",7:"mini-cart-contents-block/footer--mini-cart-contents-block/products-table",50:"mini-cart-contents-block/empty-cart",51:"mini-cart-contents-block/filled-cart",52:"mini-cart-contents-block/footer",53:"mini-cart-contents-block/items",54:"mini-cart-contents-block/products-table",55:"mini-cart-contents-block/shopping-button",56:"mini-cart-contents-block/title",73:"vendors--mini-cart-contents-block/footer"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",3:"80c939d54508b87a9652",4:"95ac706a0a831d9ea7dc",7:"9a98acb270875de4fab2",50:"3731b4028d1ec9fe2a24",51:"c4f4ddce631cc98a99a4",52:"a4dd530ecf2cd9aa11d2",53:"c56be49dc75375588a50",54:"884062170f87e183935d",55:"be39a7afbedce9d45ed2",56:"e762255b9d09ddec58db",73:"b8a05cff51814574cdf4"}[e]}(e);var s=new Error;a=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",s.name="ChunkLoadError",s.type=o,s.request=c,r[1](s)}n[e]=void 0}};var l=setTimeout((function(){a({type:"timeout",target:i})}),12e4);i.onerror=i.onload=a,document.head.appendChild(i)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=c.push.bind(c);c.push=t,c=c.slice();for(var i=0;i<c.length;i++)t(c[i]);var s=a;o(o.s=243)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===c)if(n.toString===Object.prototype.toString)for(var i in n)r.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},,function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.wc.blocksCheckout},function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),c=r(0),a=r(3),i=r(1),s=r(46),l=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:r=Object(i.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(i.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(i.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),l&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:i,button:s}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof i?i({errorMessage:u}):Object(c.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:s}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},function(e,t){e.exports=window.wp.a11y},,function(e,t){e.exports=window.wp.deprecated},,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(n.useContext)(o)},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return k}));var n=r(4),o=r(0),c=r(6),a=r(8),i=r(18),s=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},b={...f,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},h=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(i.decodeEntities)(r)]})),y={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:f,shippingRates:c.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),i=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();m();const p=Object(a.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return y;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingData:b,billingAddress:b,shippingAddress:f,extensions:c.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),a=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),{receiveCart:g}=n(c.CART_STORE_KEY),k=h(a.billingAddress),w=a.needsShipping?h(a.shippingAddress):k,v=a.fees.length>0?a.fees.map(e=>h(e)):c.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(s.a)(k),billingAddress:Object(s.a)(k),shippingAddress:Object(s.a)(w),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:g}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},,function(e,t){e.exports=window.wp.warning},,,,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.dom},,function(e,t,r){"use strict";r.d(t,"n",(function(){return c})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return i})),r.d(t,"m",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return f})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return y}));var n,o=r(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",i=c.pluginUrl+"build/",s=c.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),f=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),y=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),c=r(71),a=r(52);const i=Object(n.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
- Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(i).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,c=Object(n.useRef)(null),a=Object(n.useRef)(0),i=Object(n.useRef)(null),s=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var f=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,g="maxWait"in r,h=g?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=l.current;return s.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(i.current),i.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-c.current,n=e-a.current;return!c.current||r>=t||r<0||g&&n>=h},y=function(t){return i.current=null,b&&s.current?e(t):(s.current=l.current=null,u.current)},k=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-c.current,i=e-a.current,s=t-o,l=g?Math.min(s,h-i):s;r(k,l)}},w=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];var b=Date.now(),h=n(b);if(s.current=d,l.current=o,c.current=b,h){if(!i.current&&p.current)return a.current=c.current,r(k,t),f?e(c.current):u.current;if(g)return r(k,t),e(c.current)}return i.current||r(k,t),u.current};return w.cancel=function(){i.current&&(m?cancelAnimationFrame(i.current):clearTimeout(i.current)),a.current=0,s.current=c.current=l.current=i.current=null},w.isPending=function(){return!!i.current},w.flush=function(){return i.current?y(Date.now()):u.current},w}),[f,g,t,h,b,m])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),c=r(0),a=r(16);const i=[".wp-block-woocommerce-cart"],s=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:i=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const s=n(e,r),l=i(e,r),u={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:i={},errorBoundaryProps:s={}}=e;Object(c.render)(Object(c.createElement)(a.a,s,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(c.createElement)(t,o()({},i,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(i.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:c}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:c}=e;const a=document.body.querySelectorAll(o);c&&c.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:c}=e;const a=c.querySelectorAll(o);s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,,function(e,t,r){var n=r(82),o=r(56),c=o.setStyleProp,a=n.html,i=n.svg,s=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],s(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(i,t)?d[(u=i[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return c(e.style,d),d}},function(e,t,r){var n=r(3),o=r(86).default,c={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,c={},a={};for(r in e)n=e[r],o&&(c=t(r,n))&&2===c.length?a[c[0]]=c[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,c))}}},function(e,t,r){for(var n,o=r(92).CASE_SENSITIVE_TAG_NAMES,c={},a=0,i=o.length;a<i;a++)n=o[a],c[n.toLowerCase()]=n;function s(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return c[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:s,formatDOM:function e(t,r,n){r=r||null;for(var o,c,a,i=[],u=0,d=t.length;u<d;u++){switch(o=t[u],a={next:null,prev:i[u-1]||null,parent:r},(c=i[u-1])&&(c.next=a),"#"!==o.nodeName[0]&&(a.name=l(o.nodeName),a.attribs={},o.attributes&&o.attributes.length&&(a.attribs=s(o.attributes))),o.nodeType){case 1:"script"===a.name||"style"===a.name?a.type=a.name:a.type="tag",a.children=e(o.childNodes,a);break;case 3:a.type="text",a.data=o.nodeValue;break;case 8:a.type="comment",a.data=o.nodeValue}i.push(a)}return n&&(i.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:i[0]?i[0]:null,prev:null,parent:r}),i[1]&&(i[1].prev=i[0])),i},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},,,,function(e,t,r){var n=r(81),o=r(55),c=r(90),a={decodeEntities:!0,lowerCaseAttributeNames:!1};function i(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(c(e,(t=t||{}).htmlparser2||a),t)}i.domToReact=n,i.htmlToDOM=c,i.attributesToProps=o,e.exports=i,e.exports.default=i},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return s}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:c,detail:a={}}=t;if(!n)return;c||(c=document.body);const i=new n(e,{bubbles:r,cancelable:o,detail:a});c.dispatchEvent(i)};let c;const a=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,,,,,,,,function(e,t,r){var n=r(3),o=r(55),c=r(56),a=c.setStyleProp;function i(e){return c.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&c.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var c,s,l,u,d=(r=r||{}).library||n,p=d.cloneElement,m=d.createElement,f=d.isValidElement,b=[],g="function"==typeof r.replace,h=r.trim,y=0,k=t.length;y<k;y++)if(c=t[y],g&&f(s=r.replace(c)))k>1&&(s=p(s,{key:s.key||y})),b.push(s);else if("text"!==c.type){switch(l=c.attribs,i(c)?a(l.style,l):l&&(l=o(l)),u=null,c.type){case"script":case"style":c.children[0]&&(l.dangerouslySetInnerHTML={__html:c.children[0].data});break;case"tag":"textarea"===c.name&&c.children[0]?l.defaultValue=c.children[0].data:c.children&&c.children.length&&(u=e(c.children,r));break;default:continue}k>1&&(l.key=y),b.push(m(c.name,l,u))}else h?c.data.trim()&&b.push(c.data):b.push(c.data);return 1===b.length?b[0]:b}},function(e,t,r){var n=r(83),o=r(84),c=r(85),a=c.MUST_USE_PROPERTY,i=c.HAS_BOOLEAN_VALUE,s=c.HAS_NUMERIC_VALUE,l=c.HAS_POSITIVE_NUMERIC_VALUE,u=c.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,c,p=e.Properties,m=e.DOMAttributeNames;for(o in p)n=m[o]||(r?o:o.toLowerCase()),c=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(c,a),hasBooleanValue:d(c,i),hasNumericValue:d(c,s),hasPositiveNumericValue:d(c,l),hasOverloadedBooleanValue:d(c,u)}}var m={};p(n,m);var f={};p(o,f,!0);var b={};p(n,b),p(o,b,!0),e.exports={html:m,svg:f,properties:b,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(87)),c=r(89);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[c.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(88);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var c,a,i=n(e),s="function"==typeof t,l=0,u=i.length;l<u;l++)c=(r=i[l]).property,a=r.value,s?t(c,a,r):a&&(o||(o={}),o[c]=a);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,c=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function m(){var e={line:l,column:d};return function(t){return t.position=new f(e),y(),t}}function f(e){this.start=e,this.end={line:l,column:d},this.source=t.source}f.prototype.content=e;var b=[];function g(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;b.push(n)}function h(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function y(){h(o)}function k(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return g("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function v(){var e=m(),t=h(c);if(t){if(w(),!h(a))return g("property missing ':'");var n=h(i),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return h(s),o}}return y(),function(){var e,t=[];for(k(t);e=v();)!1!==e&&(t.push(e),k(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,c=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=function(e,t){return t.toUpperCase()},s=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||c.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,s)),e.replace(o,i))}},function(e,t,r){var n=r(91),o=r(57),c=o.formatDOM,a=o.isIE(9),i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(i);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),c(n(e),null,t)}},function(e,t,r){var n=r(57),o=/<([a-zA-Z]+[0-9]?)/,c=/<head.*>/i,a=/<body.*>/i,i=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,s=n.isIE(9),l=s||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,m=s?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),s&&(e=e.replace(i,"<$1$2$3/>")),p.parseFromString(e,m)}}if(document.implementation){var f=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f;try{return f.documentElement.innerHTML=e,f}catch(t){if(d)return d(e)}}}var b,g=document.createElement("template");g.content&&(b=function(e){return g.innerHTML=e,g.content.childNodes}),e.exports=function(e){var t,r,n,i,s=e.match(o);switch(s&&s[1]&&(t=s[1].toLowerCase()),t){case"html":return r=d(e),c.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return i=u(e).getElementsByTagName(t),a.test(e)&&c.test(e)?i[0].parentNode.childNodes:i;default:return b?b(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),o=r(50);function c(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function i(e,t,r){var i=r&&r.equalityFn||c,s=function(e){var t=Object(n.useState)(a(e)),r=t[0],o=t[1];return[r,Object(n.useCallback)((function(e){return o(a(e))}),[])]}(e),l=s[0],u=s[1],d=Object(o.a)(Object(n.useCallback)((function(e){return u(e)}),[u]),t,r),p=Object(n.useRef)(e);return i(p.current,e)||(d(e),p.current=e),[l,d]}},,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{icon:t,size:r=24,...o}=e;return Object(n.cloneElement)(t,{width:r,height:r,...o})}},,,,,,,,,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return a}));var n=r(47),o=(r(15),r(2));const c=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),a=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),c=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(c[r]="")}),c}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"boolean"==typeof e},,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(51),c=r(2),a=r(61),i=r.n(a),s=r(10),l=r(16);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:a,depth:p=1}=e;return a&&0!==a.length?Array.from(a).map((e,a)=>{const{blockName:m="",...f}={key:`${t}_${p}_${a}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},b=u(m,r);if(!b){const c=i()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof c&&c)return c;if(!Object(n.isValidElement)(c))return null;const a=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return a?Object(n.cloneElement)(c,f,a):Object(n.cloneElement)(c,f)}const g=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${a}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+m,showErrorBlock:c.CURRENT_USER_IS_ADMIN},Object(n.createElement)(g,null,Object(n.createElement)(b,f,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const a=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!a.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,i.map((e,r)=>{let{blockName:o,component:a}=e;const i=a||u(o,t);return i?Object(n.createElement)(l.a,{text:"Unexpected error in: "+o,showErrorBlock:c.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(i,{key:`${o}_forced_${r}`}))):null}))})(m,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:c=(()=>({})),blockMap:a,blockWrapper:i}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:a,children:e.children||[],blockWrapper:i});return{...c(e,t),children:r}}})}},,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.keycodes},,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-mini-cart-contents-block","version":"1.0.0","title":"Filled Mini Cart Contents","description":"Contains blocks that are displayed when the mini cart has products.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-mini-cart-contents-block","version":"1.0.0","title":"Empty Mini Cart Contents","description":"Contains blocks that are displayed when the mini cart is empty.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-title-block","version":"1.0.0","title":"Mini Cart Title","description":"Block that displays the title of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-items-block","version":"1.0.0","title":"Mini Cart Items","description":"Contains the products table and other custom blocks of filled mini cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-products-table-block","version":"1.0.0","title":"Mini Cart Products Table","description":"Block that displays the products table of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/mini-cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-footer-block","version":"1.0.0","title":"Mini Cart Footer","description":"Block that displays the footer of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-shopping-button-block","version":"1.0.0","title":"Mini Cart Shopping Button","description":"Block that displays the shopping button for the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"attributes":{"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/empty-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t){e.exports=window.wp.components},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){},,,,,function(e,t,r){"use strict";r.r(t);var n=r(51),o=r(0),c=r(127),a=r(1),i=r(194),s=r(99),l=r(5),u=r.n(l);r(238);var d=e=>{let{children:t,className:r,isOpen:n,onClose:c,slideIn:l=!0,slideOut:d=!0,title:p}=e;const[m]=Object(s.a)(n,300);return n||!n&&m?Object(o.createElement)(i.Modal,{title:p,focusOnMount:!0,onRequestClose:c,className:u()(r,"wc-block-components-drawer"),overlayClassName:u()("wc-block-components-drawer__screen-overlay",{"wc-block-components-drawer__screen-overlay--is-hidden":!n,"wc-block-components-drawer__screen-overlay--with-slide-in":l,"wc-block-components-drawer__screen-overlay--with-slide-out":d}),closeButtonLabel:Object(a.__)("Close mini cart","woo-gutenberg-products-block")},t):null},p=r(33),m=r(69),f=r(17),b=r(41),g=r(2),h=r(118),y=r(20);const k=e=>!!Object(y.a)(e)&&Object.keys({total_items:0,total_items_tax:0,total_fees:0,total_fees_tax:0,total_discount:0,total_discount_tax:0,total_shipping:0,total_shipping_tax:0,total_price:0,total_tax:0,tax_lines:0,currency_code:0,currency_symbol:0,currency_minor_unit:0,currency_decimal_separator:0,currency_thousand_separator:0,currency_prefix:0,currency_suffix:0}).every(t=>t in e);var w=r(71),v=r(52),_=r(14),E=Object(o.createElement)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.84614 18.2769C7.89712 18.2769 7.93845 18.2356 7.93845 18.1846C7.93845 18.1336 7.89712 18.0923 7.84614 18.0923C7.79516 18.0923 7.75384 18.1336 7.75384 18.1846C7.75384 18.2356 7.79516 18.2769 7.84614 18.2769ZM6.03076 18.1846C6.03076 17.182 6.84353 16.3692 7.84614 16.3692C8.84875 16.3692 9.66152 17.182 9.66152 18.1846C9.66152 19.1872 8.84875 20 7.84614 20C6.84353 20 6.03076 19.1872 6.03076 18.1846Z",fill:"currentColor"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.3231 18.2769C17.3741 18.2769 17.4154 18.2356 17.4154 18.1846C17.4154 18.1336 17.3741 18.0923 17.3231 18.0923C17.2721 18.0923 17.2308 18.1336 17.2308 18.1846C17.2308 18.2356 17.2721 18.2769 17.3231 18.2769ZM15.5077 18.1846C15.5077 17.182 16.3205 16.3692 17.3231 16.3692C18.3257 16.3692 19.1385 17.182 19.1385 18.1846C19.1385 19.1872 18.3257 20 17.3231 20C16.3205 20 15.5077 19.1872 15.5077 18.1846Z",fill:"currentColor"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.0631 9.53835L19.4662 12.6685L19.4648 12.6757L19.4648 12.6757C19.3424 13.2919 19.0072 13.8454 18.5178 14.2394C18.031 14.6312 17.4226 14.8404 16.798 14.8308H8.44017C7.81556 14.8404 7.20714 14.6312 6.72038 14.2394C6.2312 13.8456 5.89605 13.2924 5.77352 12.6765L5.77335 12.6757L4.33477 5.48814C4.3286 5.46282 4.32345 5.43711 4.31934 5.41104L3.61815 1.90768H0.953842C0.42705 1.90768 0 1.48063 0 0.953842C0 0.42705 0.42705 0 0.953842 0H4.4C4.85462 0 5.24607 0.320858 5.33529 0.766644L6.04403 4.30769H12.785C13.0114 4.99157 13.3319 5.63258 13.7312 6.21538H6.42585L7.64421 12.3026L7.64449 12.304C7.67966 12.4811 7.77599 12.6402 7.91662 12.7534C8.05725 12.8666 8.23322 12.9267 8.41372 12.9233L8.432 12.9231H16.8062L16.8244 12.9233C17.0049 12.9267 17.1809 12.8666 17.3215 12.7534C17.4614 12.6408 17.5575 12.4828 17.5931 12.3068L17.5937 12.304L18.1649 9.30867C18.762 9.45873 19.387 9.53842 20.0307 9.53842C20.0415 9.53842 20.0523 9.5384 20.0631 9.53835Z",fill:"currentColor"})),O=r(104);r(237);var x=e=>{let{count:t,colorClassNames:r,style:n}=e;return Object(o.createElement)("span",{className:"wc-block-mini-cart__quantity-badge"},Object(o.createElement)(O.a,{className:"wc-block-mini-cart__icon",size:20,icon:E}),Object(o.createElement)("span",{className:"wc-block-mini-cart__badge "+r,style:n},t))},C=r(46),S=r(10),j=r(188),T=r(187),R=r(189),A=r(191),M=r(192),P=r(190),N=r(193);r.p=C.k,Object(S.registerCheckoutBlock)({metadata:T,component:Object(o.lazy)(()=>r.e(51).then(r.bind(null,424)))}),Object(S.registerCheckoutBlock)({metadata:j,component:Object(o.lazy)(()=>r.e(50).then(r.bind(null,425)))}),Object(S.registerCheckoutBlock)({metadata:R,component:Object(o.lazy)(()=>r.e(56).then(r.bind(null,426)))}),Object(S.registerCheckoutBlock)({metadata:P,component:Object(o.lazy)(()=>r.e(53).then(r.bind(null,427)))}),Object(S.registerCheckoutBlock)({metadata:A,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(7),r.e(4),r.e(54)]).then(r.bind(null,428)))}),Object(S.registerCheckoutBlock)({metadata:M,component:Object(o.lazy)(()=>Promise.all([r.e(73),r.e(7),r.e(52)]).then(r.bind(null,429)))}),Object(S.registerCheckoutBlock)({metadata:N,component:Object(o.lazy)(()=>r.e(55).then(r.bind(null,430)))});const L=e=>{let{children:t}=e;return Object(o.createElement)(o.Fragment,null,t)};r(147);const B="woocommerce/mini-cart-contents";var I=e=>{var t,r;let{isInitiallyOpen:n=!1,colorClassNames:i,style:s,contents:l="",addToCartBehaviour:y="none"}=e;const{cartItemsCount:_,cartIsLoading:E,cartTotals:O}=Object(p.a)(),C=Object(o.useRef)(E);Object(o.useEffect)(()=>{C.current&&!E&&(C.current=!1)},[E,C]);const[S,j]=Object(o.useState)(n),[T,R]=Object(o.useState)(n),[A,M]=Object(o.useState)(null),P=Object(o.useCallback)(e=>{M(e)},[]);Object(o.useEffect)(()=>{const e=document.querySelector("body");e&&(S?Object.assign(e.style,{overflow:"hidden"}):Object.assign(e.style,{overflow:""}))},[S]),Object(o.useEffect)(()=>{if(A instanceof Element){if(!A.querySelector(".wp-block-woocommerce-mini-cart-contents"))return;S&&Object(c.a)({Block:L,blockName:B,selector:".wp-block-woocommerce-mini-cart-contents",blockMap:Object(f.getRegisteredBlockComponents)(B)})}return()=>{if(A instanceof Element&&S){const e=A.querySelector(".wp-block-woocommerce-mini-cart-contents");e&&Object(o.unmountComponentAtNode)(e)}}},[S,A]),Object(o.useEffect)(()=>{const e=()=>{"open_drawer"===y&&(R(!1),j(!0))},t=Object(m.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",e),()=>{t(),document.body.removeEventListener("wc-blocks_added_to_cart",e)}},[y]);const N=Object(g.getSettingWithCoercion)("displayCartPricesIncludingTax",!1,h.a),I=Object(g.getSettingWithCoercion)("cartTotals",null,k),F=Object(g.getSettingWithCoercion)("cartItemsCount",0,w.a),D=Object(g.getSettingWithCoercion)("taxLabel","",v.a),U=C.current&&null!==I?I:O,H=C.current?F:_,V=N?parseInt(U.total_items,10)+parseInt(U.total_items_tax,10):parseInt(U.total_items,10),z=Object(a.sprintf)(
4
  /* translators: %1$d is the number of products in the cart. %2$s is the cart total */
5
  Object(a._n)("%1$d item in cart, total price of %2$s","%1$d items in cart, total price of %2$s",H,"woo-gutenberg-products-block"),H,Object(b.formatPrice)(V,Object(b.getCurrencyFromPriceResponse)(U))),q={backgroundColor:null==s||null===(t=s.color)||void 0===t?void 0:t.background,color:null==s||null===(r=s.color)||void 0===r?void 0:r.text};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("button",{className:"wc-block-mini-cart__button "+i,style:q,onClick:()=>{S||(j(!0),R(!1))},"aria-label":z},Object(o.createElement)("span",{className:"wc-block-mini-cart__amount"},Object(b.formatPrice)(V,Object(b.getCurrencyFromPriceResponse)(U))),""!==D&&0!==V&&Object(o.createElement)("small",{className:"wc-block-mini-cart__tax-label"},D),Object(o.createElement)(x,{count:H})),Object(o.createElement)(d,{className:u()("wc-block-mini-cart__drawer","is-mobile",{"is-loading":E}),title:"",isOpen:S,onClose:()=>{j(!1)},slideIn:!T},Object(o.createElement)("div",{className:"wc-block-mini-cart__template-part",ref:P,dangerouslySetInnerHTML:{__html:l}})))};(()=>{let e=null;if(document.activeElement&&document.activeElement.classList.contains("wc-block-mini-cart__button")&&document.activeElement.parentNode instanceof HTMLElement&&(e=document.activeElement.parentNode),Object(n.a)({selector:".wc-block-mini-cart",Block:I,getProps:e=>{var t,r;let n="";const o=e.querySelector(".wc-block-mini-cart__button");return null!==o&&(n=o.classList.toString().replace("wc-block-mini-cart__button","")),{isDataOutdated:e.dataset.isDataOutdated,isInitiallyOpen:"true"===e.dataset.isInitiallyOpen,colorClassNames:n,style:e.dataset.style?JSON.parse(e.dataset.style):{},addToCartBehaviour:e.dataset.addToCartBehaviour||"none",contents:null!==(t=null===(r=e.querySelector(".wc-block-mini-cart__template-part"))||void 0===r?void 0:r.innerHTML)&&void 0!==t?t:""}}}),e instanceof HTMLElement&&!e.dataset.isInitiallyOpen){const t=e.querySelector(".wc-block-mini-cart__button");t instanceof HTMLElement&&t.focus()}})()}]);
1
  !function(e){function t(t){for(var r,o,c=t[0],a=t[1],i=0,l=[];i<c.length;i++)o=c[i],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);l.length;)l.shift()()}var r={},n={49:0};function o(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,o),n.l=!0,n.exports}o.e=function(e){var t=[],r=n[e];if(0!==r)if(r)t.push(r[2]);else{var c=new Promise((function(t,o){r=n[e]=[t,o]}));t.push(r[2]=c);var a,i=document.createElement("script");i.charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.src=function(e){return o.p+""+({0:"vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66",3:"vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542",4:"cart-blocks/cart-line-items--mini-cart-contents-block/products-table",7:"mini-cart-contents-block/footer--mini-cart-contents-block/products-table",50:"mini-cart-contents-block/empty-cart",51:"mini-cart-contents-block/filled-cart",52:"mini-cart-contents-block/footer",53:"mini-cart-contents-block/items",54:"mini-cart-contents-block/products-table",55:"mini-cart-contents-block/shopping-button",56:"mini-cart-contents-block/title",73:"vendors--mini-cart-contents-block/footer"}[e]||e)+"-frontend.js?ver="+{0:"1d36f73838f02eb72b0e",3:"80c939d54508b87a9652",4:"95ac706a0a831d9ea7dc",7:"9a98acb270875de4fab2",50:"3731b4028d1ec9fe2a24",51:"c4f4ddce631cc98a99a4",52:"a4dd530ecf2cd9aa11d2",53:"c56be49dc75375588a50",54:"884062170f87e183935d",55:"be39a7afbedce9d45ed2",56:"e762255b9d09ddec58db",73:"b8a05cff51814574cdf4"}[e]}(e);var s=new Error;a=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=n[e];if(0!==r){if(r){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",s.name="ChunkLoadError",s.type=o,s.request=c,r[1](s)}n[e]=void 0}};var l=setTimeout((function(){a({type:"timeout",target:i})}),12e4);i.onerror=i.onload=a,document.head.appendChild(i)}return Promise.all(t)},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=c.push.bind(c);c.push=t,c=c.slice();for(var i=0;i<c.length;i++)t(c[i]);var s=a;o(o.s=243)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===c)if(n.toString===Object.prototype.toString)for(var i in n)r.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=window.wc.wcBlocksData},,function(e,t){e.exports=window.wp.data},,function(e,t){e.exports=window.wc.blocksCheckout},function(e,t){e.exports=window.wp.compose},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t){e.exports=window.wp.primitives},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";var n=r(19),o=r.n(n),c=r(0),a=r(3),i=r(1),s=r(46),l=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:r=Object(i.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(i.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(i.__)("Error:","woo-gutenberg-products-block"),button:l,showErrorBlock:u=!0}=e;return u?Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),l&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l))):null};r(34);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:i,button:s}=this.props,{errorMessage:u,hasError:d}=this.state;return d?"function"==typeof i?i({errorMessage:u}):Object(c.createElement)(l,{showErrorBlock:n,errorMessage:r?u:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:s}):this.props.children}}t.a=u},function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},function(e,t){e.exports=window.wp.a11y},,function(e,t){e.exports=window.wp.deprecated},,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);r(8);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(n.useContext)(o)},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return k}));var n=r(4),o=r(0),c=r(6),a=r(8),i=r(18),s=r(117),l=r(29),u=r(69);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},b={...f,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},h=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(i.decodeEntities)(r)]})),y={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:f,shippingRates:c.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(l.a)(),i=null==r?void 0:r.previewCart,{shouldSelect:u}=e,d=Object(o.useRef)();m();const p=Object(a.useSelect)((e,r)=>{let{dispatch:n}=r;if(!u)return y;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingData:b,billingAddress:b,shippingAddress:f,extensions:c.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),a=o.getCartData(),l=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),{receiveCart:g}=n(c.CART_STORE_KEY),k=h(a.billingAddress),w=a.needsShipping?h(a.shippingAddress):k,v=a.fees.length>0?a.fees.map(e=>h(e)):c.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:v,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:l,billingData:Object(s.a)(k),billingAddress:Object(s.a)(k),shippingAddress:Object(s.a)(w),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:g}},[u]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){},,function(e,t){e.exports=window.wp.warning},,,,,function(e,t){e.exports=window.wc.priceFormat},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.dom},,function(e,t,r){"use strict";r.d(t,"n",(function(){return c})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return i})),r.d(t,"m",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return f})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return y}));var n,o=r(2);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",i=c.pluginUrl+"build/",s=c.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),f=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),y=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";var n=r(2),o=r(1),c=r(71),a=r(52);const i=Object(n.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)(
2
  /* translators: %s Field label. */
3
+ Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.a)(e.priority)&&(t.index=e.priority),Object(a.a)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(i).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==l[r]?l[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,c=Object(n.useRef)(null),a=Object(n.useRef)(0),i=Object(n.useRef)(null),s=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var f=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,g="maxWait"in r,h=g?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=l.current;return s.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(i.current),i.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-c.current,n=e-a.current;return!c.current||r>=t||r<0||g&&n>=h},y=function(t){return i.current=null,b&&s.current?e(t):(s.current=l.current=null,u.current)},k=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-c.current,i=e-a.current,s=t-o,l=g?Math.min(s,h-i):s;r(k,l)}},w=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];var b=Date.now(),h=n(b);if(s.current=d,l.current=o,c.current=b,h){if(!i.current&&p.current)return a.current=c.current,r(k,t),f?e(c.current):u.current;if(g)return r(k,t),e(c.current)}return i.current||r(k,t),u.current};return w.cancel=function(){i.current&&(m?cancelAnimationFrame(i.current):clearTimeout(i.current)),a.current=0,s.current=c.current=l.current=i.current=null},w.isPending=function(){return!!i.current},w.flush=function(){return i.current?y(Date.now()):u.current},w}),[f,g,t,h,b,m])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(12),o=r.n(n),c=r(0),a=r(16);const i=[".wp-block-woocommerce-cart"],s=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:i=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const s=n(e,r),l=i(e,r),u={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:i={},errorBoundaryProps:s={}}=e;Object(c.render)(Object(c.createElement)(a.a,s,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(c.createElement)(t,o()({},i,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(i.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:c}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:c}=e;const a=document.body.querySelectorAll(o);c&&c.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:c}=e;const a=c.querySelectorAll(o);s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},,,function(e,t,r){var n=r(82),o=r(56),c=o.setStyleProp,a=n.html,i=n.svg,s=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],s(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(i,t)?d[(u=i[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return c(e.style,d),d}},function(e,t,r){var n=r(3),o=r(86).default,c={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,c={},a={};for(r in e)n=e[r],o&&(c=t(r,n))&&2===c.length?a[c[0]]=c[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,c))}}},function(e,t,r){for(var n,o=r(92).CASE_SENSITIVE_TAG_NAMES,c={},a=0,i=o.length;a<i;a++)n=o[a],c[n.toLowerCase()]=n;function s(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return c[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:s,formatDOM:function e(t,r,n){r=r||null;for(var o,c,a,i=[],u=0,d=t.length;u<d;u++){switch(o=t[u],a={next:null,prev:i[u-1]||null,parent:r},(c=i[u-1])&&(c.next=a),"#"!==o.nodeName[0]&&(a.name=l(o.nodeName),a.attribs={},o.attributes&&o.attributes.length&&(a.attribs=s(o.attributes))),o.nodeType){case 1:"script"===a.name||"style"===a.name?a.type=a.name:a.type="tag",a.children=e(o.childNodes,a);break;case 3:a.type="text",a.data=o.nodeValue;break;case 8:a.type="comment",a.data=o.nodeValue}i.push(a)}return n&&(i.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:i[0]?i[0]:null,prev:null,parent:r}),i[1]&&(i[1].prev=i[0])),i},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},,,,function(e,t,r){var n=r(81),o=r(55),c=r(90),a={decodeEntities:!0,lowerCaseAttributeNames:!1};function i(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(c(e,(t=t||{}).htmlparser2||a),t)}i.domToReact=n,i.htmlToDOM=c,i.attributesToProps=o,e.exports=i,e.exports.default=i},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return s}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:c,detail:a={}}=t;if(!n)return;c||(c=document.body);const i=new n(e,{bubbles:r,cancelable:o,detail:a});c.dispatchEvent(i)};let c;const a=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=e=>{let{preserveCartData:t=!1}=e;o("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"number"==typeof e},,,,,,,,,,function(e,t,r){var n=r(3),o=r(55),c=r(56),a=c.setStyleProp;function i(e){return c.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&c.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var c,s,l,u,d=(r=r||{}).library||n,p=d.cloneElement,m=d.createElement,f=d.isValidElement,b=[],g="function"==typeof r.replace,h=r.trim,y=0,k=t.length;y<k;y++)if(c=t[y],g&&f(s=r.replace(c)))k>1&&(s=p(s,{key:s.key||y})),b.push(s);else if("text"!==c.type){switch(l=c.attribs,i(c)?a(l.style,l):l&&(l=o(l)),u=null,c.type){case"script":case"style":c.children[0]&&(l.dangerouslySetInnerHTML={__html:c.children[0].data});break;case"tag":"textarea"===c.name&&c.children[0]?l.defaultValue=c.children[0].data:c.children&&c.children.length&&(u=e(c.children,r));break;default:continue}k>1&&(l.key=y),b.push(m(c.name,l,u))}else h?c.data.trim()&&b.push(c.data):b.push(c.data);return 1===b.length?b[0]:b}},function(e,t,r){var n=r(83),o=r(84),c=r(85),a=c.MUST_USE_PROPERTY,i=c.HAS_BOOLEAN_VALUE,s=c.HAS_NUMERIC_VALUE,l=c.HAS_POSITIVE_NUMERIC_VALUE,u=c.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,c,p=e.Properties,m=e.DOMAttributeNames;for(o in p)n=m[o]||(r?o:o.toLowerCase()),c=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(c,a),hasBooleanValue:d(c,i),hasNumericValue:d(c,s),hasPositiveNumericValue:d(c,l),hasOverloadedBooleanValue:d(c,u)}}var m={};p(n,m);var f={};p(o,f,!0);var b={};p(n,b),p(o,b,!0),e.exports={html:m,svg:f,properties:b,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(87)),c=r(89);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[c.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(88);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var c,a,i=n(e),s="function"==typeof t,l=0,u=i.length;l<u;l++)c=(r=i[l]).property,a=r.value,s?t(c,a,r):a&&(o||(o={}),o[c]=a);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,c=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function m(){var e={line:l,column:d};return function(t){return t.position=new f(e),y(),t}}function f(e){this.start=e,this.end={line:l,column:d},this.source=t.source}f.prototype.content=e;var b=[];function g(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;b.push(n)}function h(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function y(){h(o)}function k(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return g("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function v(){var e=m(),t=h(c);if(t){if(w(),!h(a))return g("property missing ':'");var n=h(i),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return h(s),o}}return y(),function(){var e,t=[];for(k(t);e=v();)!1!==e&&(t.push(e),k(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,c=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=function(e,t){return t.toUpperCase()},s=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||c.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,s)),e.replace(o,i))}},function(e,t,r){var n=r(91),o=r(57),c=o.formatDOM,a=o.isIE(9),i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(i);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),c(n(e),null,t)}},function(e,t,r){var n=r(57),o=/<([a-zA-Z]+[0-9]?)/,c=/<head.*>/i,a=/<body.*>/i,i=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,s=n.isIE(9),l=s||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,m=s?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),s&&(e=e.replace(i,"<$1$2$3/>")),p.parseFromString(e,m)}}if(document.implementation){var f=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f;try{return f.documentElement.innerHTML=e,f}catch(t){if(d)return d(e)}}}var b,g=document.createElement("template");g.content&&(b=function(e){return g.innerHTML=e,g.content.childNodes}),e.exports=function(e){var t,r,n,i,s=e.match(o);switch(s&&s[1]&&(t=s[1].toLowerCase()),t){case"html":return r=d(e),c.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return i=u(e).getElementsByTagName(t),a.test(e)&&c.test(e)?i[0].parentNode.childNodes:i;default:return b?b(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),o=r(50);function c(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function i(e,t,r){var i=r&&r.equalityFn||c,s=function(e){var t=Object(n.useState)(a(e)),r=t[0],o=t[1];return[r,Object(n.useCallback)((function(e){return o(a(e))}),[])]}(e),l=s[0],u=s[1],d=Object(o.a)(Object(n.useCallback)((function(e){return u(e)}),[u]),t,r),p=Object(n.useRef)(e);return i(p.current,e)||(d(e),p.current=e),[l,d]}},,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{icon:t,size:r=24,...o}=e;return Object(n.cloneElement)(t,{width:r,height:r,...o})}},,,,,,,,,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return a}));var n=r(47),o=(r(15),r(2));const c=(e,t)=>Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r]),a=e=>{const t=Object.keys(o.defaultAddressFields),r=Object(n.a)(t,{},e.country),c=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(c[r]="")}),c}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"boolean"==typeof e},,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(51),c=r(2),a=r(61),i=r.n(a),s=r(10),l=r(16);const u=(e,t)=>e&&t[e]?t[e]:null,d=e=>{let{block:t,blockMap:r,blockWrapper:o,children:a,depth:p=1}=e;return a&&0!==a.length?Array.from(a).map((e,a)=>{const{blockName:m="",...f}={key:`${t}_${p}_${a}`,...e instanceof HTMLElement?e.dataset:{},className:e instanceof Element?null==e?void 0:e.className:""},b=u(m,r);if(!b){const c=i()(e instanceof Element&&(null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof c&&c)return c;if(!Object(n.isValidElement)(c))return null;const a=e.childNodes.length?d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}):void 0;return a?Object(n.cloneElement)(c,f,a):Object(n.cloneElement)(c,f)}const g=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${p}_${a}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(l.a,{text:"Unexpected error in: "+m,showErrorBlock:c.CURRENT_USER_IS_ADMIN},Object(n.createElement)(g,null,Object(n.createElement)(b,f,d({block:t,blockMap:r,children:e.childNodes,depth:p+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const a=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!a.includes(t)}),d=o||n.Fragment;return Object(n.createElement)(n.Fragment,null,i.map((e,r)=>{let{blockName:o,component:a}=e;const i=a||u(o,t);return i?Object(n.createElement)(l.a,{key:o+"_blockerror",text:"Unexpected error in: "+o,showErrorBlock:c.CURRENT_USER_IS_ADMIN},Object(n.createElement)(d,null,Object(n.createElement)(i,{key:`${o}_forced_${r}`}))):null}))})(m,r,e.childNodes,o)))))}):null},p=e=>{let{Block:t,selector:r,blockName:n,getProps:c=(()=>({})),blockMap:a,blockWrapper:i}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=d({block:n,blockMap:a,children:e.children||[],blockWrapper:i});return{...c(e,t),children:r}}})}},,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.keycodes},,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-mini-cart-contents-block","version":"1.0.0","title":"Filled Mini Cart Contents","description":"Contains blocks that are displayed when the mini cart has products.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-mini-cart-contents-block","version":"1.0.0","title":"Empty Mini Cart Contents","description":"Contains blocks that are displayed when the mini cart is empty.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-title-block","version":"1.0.0","title":"Mini Cart Title","description":"Block that displays the title of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-items-block","version":"1.0.0","title":"Mini Cart Items","description":"Contains the products table and other custom blocks of filled mini cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-products-table-block","version":"1.0.0","title":"Mini Cart Products Table","description":"Block that displays the products table of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/mini-cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-footer-block","version":"1.0.0","title":"Mini Cart Footer","description":"Block that displays the footer of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-shopping-button-block","version":"1.0.0","title":"Mini Cart Shopping Button","description":"Block that displays the shopping button for the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"attributes":{"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/empty-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t){e.exports=window.wp.components},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){},,,,,function(e,t,r){"use strict";r.r(t);var n=r(51),o=r(0),c=r(127),a=r(1),i=r(194),s=r(99),l=r(5),u=r.n(l);r(238);var d=e=>{let{children:t,className:r,isOpen:n,onClose:c,slideIn:l=!0,slideOut:d=!0,title:p}=e;const[m]=Object(s.a)(n,300);return n||!n&&m?Object(o.createElement)(i.Modal,{title:p,focusOnMount:!0,onRequestClose:c,className:u()(r,"wc-block-components-drawer"),overlayClassName:u()("wc-block-components-drawer__screen-overlay",{"wc-block-components-drawer__screen-overlay--is-hidden":!n,"wc-block-components-drawer__screen-overlay--with-slide-in":l,"wc-block-components-drawer__screen-overlay--with-slide-out":d}),closeButtonLabel:Object(a.__)("Close mini cart","woo-gutenberg-products-block")},t):null},p=r(33),m=r(69),f=r(17),b=r(41),g=r(2),h=r(118),y=r(20);const k=e=>!!Object(y.a)(e)&&Object.keys({total_items:0,total_items_tax:0,total_fees:0,total_fees_tax:0,total_discount:0,total_discount_tax:0,total_shipping:0,total_shipping_tax:0,total_price:0,total_tax:0,tax_lines:0,currency_code:0,currency_symbol:0,currency_minor_unit:0,currency_decimal_separator:0,currency_thousand_separator:0,currency_prefix:0,currency_suffix:0}).every(t=>t in e);var w=r(71),v=r(52),_=r(14),E=Object(o.createElement)(_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.84614 18.2769C7.89712 18.2769 7.93845 18.2356 7.93845 18.1846C7.93845 18.1336 7.89712 18.0923 7.84614 18.0923C7.79516 18.0923 7.75384 18.1336 7.75384 18.1846C7.75384 18.2356 7.79516 18.2769 7.84614 18.2769ZM6.03076 18.1846C6.03076 17.182 6.84353 16.3692 7.84614 16.3692C8.84875 16.3692 9.66152 17.182 9.66152 18.1846C9.66152 19.1872 8.84875 20 7.84614 20C6.84353 20 6.03076 19.1872 6.03076 18.1846Z",fill:"currentColor"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.3231 18.2769C17.3741 18.2769 17.4154 18.2356 17.4154 18.1846C17.4154 18.1336 17.3741 18.0923 17.3231 18.0923C17.2721 18.0923 17.2308 18.1336 17.2308 18.1846C17.2308 18.2356 17.2721 18.2769 17.3231 18.2769ZM15.5077 18.1846C15.5077 17.182 16.3205 16.3692 17.3231 16.3692C18.3257 16.3692 19.1385 17.182 19.1385 18.1846C19.1385 19.1872 18.3257 20 17.3231 20C16.3205 20 15.5077 19.1872 15.5077 18.1846Z",fill:"currentColor"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.0631 9.53835L19.4662 12.6685L19.4648 12.6757L19.4648 12.6757C19.3424 13.2919 19.0072 13.8454 18.5178 14.2394C18.031 14.6312 17.4226 14.8404 16.798 14.8308H8.44017C7.81556 14.8404 7.20714 14.6312 6.72038 14.2394C6.2312 13.8456 5.89605 13.2924 5.77352 12.6765L5.77335 12.6757L4.33477 5.48814C4.3286 5.46282 4.32345 5.43711 4.31934 5.41104L3.61815 1.90768H0.953842C0.42705 1.90768 0 1.48063 0 0.953842C0 0.42705 0.42705 0 0.953842 0H4.4C4.85462 0 5.24607 0.320858 5.33529 0.766644L6.04403 4.30769H12.785C13.0114 4.99157 13.3319 5.63258 13.7312 6.21538H6.42585L7.64421 12.3026L7.64449 12.304C7.67966 12.4811 7.77599 12.6402 7.91662 12.7534C8.05725 12.8666 8.23322 12.9267 8.41372 12.9233L8.432 12.9231H16.8062L16.8244 12.9233C17.0049 12.9267 17.1809 12.8666 17.3215 12.7534C17.4614 12.6408 17.5575 12.4828 17.5931 12.3068L17.5937 12.304L18.1649 9.30867C18.762 9.45873 19.387 9.53842 20.0307 9.53842C20.0415 9.53842 20.0523 9.5384 20.0631 9.53835Z",fill:"currentColor"})),O=r(104);r(237);var x=e=>{let{count:t,colorClassNames:r,style:n}=e;return Object(o.createElement)("span",{className:"wc-block-mini-cart__quantity-badge"},Object(o.createElement)(O.a,{className:"wc-block-mini-cart__icon",size:20,icon:E}),Object(o.createElement)("span",{className:"wc-block-mini-cart__badge "+r,style:n},t))},C=r(46),S=r(10),j=r(188),T=r(187),R=r(189),A=r(191),M=r(192),P=r(190),N=r(193);r.p=C.k,Object(S.registerCheckoutBlock)({metadata:T,component:Object(o.lazy)(()=>r.e(51).then(r.bind(null,424)))}),Object(S.registerCheckoutBlock)({metadata:j,component:Object(o.lazy)(()=>r.e(50).then(r.bind(null,425)))}),Object(S.registerCheckoutBlock)({metadata:R,component:Object(o.lazy)(()=>r.e(56).then(r.bind(null,426)))}),Object(S.registerCheckoutBlock)({metadata:P,component:Object(o.lazy)(()=>r.e(53).then(r.bind(null,427)))}),Object(S.registerCheckoutBlock)({metadata:A,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(3),r.e(7),r.e(4),r.e(54)]).then(r.bind(null,428)))}),Object(S.registerCheckoutBlock)({metadata:M,component:Object(o.lazy)(()=>Promise.all([r.e(73),r.e(7),r.e(52)]).then(r.bind(null,429)))}),Object(S.registerCheckoutBlock)({metadata:N,component:Object(o.lazy)(()=>r.e(55).then(r.bind(null,430)))});const L=e=>{let{children:t}=e;return Object(o.createElement)(o.Fragment,null,t)};r(147);const B="woocommerce/mini-cart-contents";var I=e=>{var t,r;let{isInitiallyOpen:n=!1,colorClassNames:i,style:s,contents:l="",addToCartBehaviour:y="none"}=e;const{cartItemsCount:_,cartIsLoading:E,cartTotals:O}=Object(p.a)(),C=Object(o.useRef)(E);Object(o.useEffect)(()=>{C.current&&!E&&(C.current=!1)},[E,C]);const[S,j]=Object(o.useState)(n),[T,R]=Object(o.useState)(n),[A,M]=Object(o.useState)(null),P=Object(o.useCallback)(e=>{M(e)},[]);Object(o.useEffect)(()=>{const e=document.querySelector("body");e&&(S?Object.assign(e.style,{overflow:"hidden"}):Object.assign(e.style,{overflow:""}))},[S]),Object(o.useEffect)(()=>{if(A instanceof Element){if(!A.querySelector(".wp-block-woocommerce-mini-cart-contents"))return;S&&Object(c.a)({Block:L,blockName:B,selector:".wp-block-woocommerce-mini-cart-contents",blockMap:Object(f.getRegisteredBlockComponents)(B)})}return()=>{if(A instanceof Element&&S){const e=A.querySelector(".wp-block-woocommerce-mini-cart-contents");e&&Object(o.unmountComponentAtNode)(e)}}},[S,A]),Object(o.useEffect)(()=>{const e=()=>{"open_drawer"===y&&(R(!1),j(!0))},t=Object(m.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",e),()=>{t(),document.body.removeEventListener("wc-blocks_added_to_cart",e)}},[y]);const N=Object(g.getSettingWithCoercion)("displayCartPricesIncludingTax",!1,h.a),I=Object(g.getSettingWithCoercion)("cartTotals",null,k),F=Object(g.getSettingWithCoercion)("cartItemsCount",0,w.a),D=Object(g.getSettingWithCoercion)("taxLabel","",v.a),U=C.current&&null!==I?I:O,H=C.current?F:_,V=N?parseInt(U.total_items,10)+parseInt(U.total_items_tax,10):parseInt(U.total_items,10),z=Object(a.sprintf)(
4
  /* translators: %1$d is the number of products in the cart. %2$s is the cart total */
5
  Object(a._n)("%1$d item in cart, total price of %2$s","%1$d items in cart, total price of %2$s",H,"woo-gutenberg-products-block"),H,Object(b.formatPrice)(V,Object(b.getCurrencyFromPriceResponse)(U))),q={backgroundColor:null==s||null===(t=s.color)||void 0===t?void 0:t.background,color:null==s||null===(r=s.color)||void 0===r?void 0:r.text};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("button",{className:"wc-block-mini-cart__button "+i,style:q,onClick:()=>{S||(j(!0),R(!1))},"aria-label":z},Object(o.createElement)("span",{className:"wc-block-mini-cart__amount"},Object(b.formatPrice)(V,Object(b.getCurrencyFromPriceResponse)(U))),""!==D&&0!==V&&Object(o.createElement)("small",{className:"wc-block-mini-cart__tax-label"},D),Object(o.createElement)(x,{count:H})),Object(o.createElement)(d,{className:u()("wc-block-mini-cart__drawer","is-mobile",{"is-loading":E}),title:"",isOpen:S,onClose:()=>{j(!1)},slideIn:!T},Object(o.createElement)("div",{className:"wc-block-mini-cart__template-part",ref:P,dangerouslySetInnerHTML:{__html:l}})))};(()=>{let e=null;if(document.activeElement&&document.activeElement.classList.contains("wc-block-mini-cart__button")&&document.activeElement.parentNode instanceof HTMLElement&&(e=document.activeElement.parentNode),Object(n.a)({selector:".wc-block-mini-cart",Block:I,getProps:e=>{var t,r;let n="";const o=e.querySelector(".wc-block-mini-cart__button");return null!==o&&(n=o.classList.toString().replace("wc-block-mini-cart__button","")),{isDataOutdated:e.dataset.isDataOutdated,isInitiallyOpen:"true"===e.dataset.isInitiallyOpen,colorClassNames:n,style:e.dataset.style?JSON.parse(e.dataset.style):{},addToCartBehaviour:e.dataset.addToCartBehaviour||"none",contents:null!==(t=null===(r=e.querySelector(".wc-block-mini-cart__template-part"))||void 0===r?void 0:r.innerHTML)&&void 0!==t?t:""}}}),e instanceof HTMLElement&&!e.dataset.isInitiallyOpen){const t=e.querySelector(".wc-block-mini-cart__button");t instanceof HTMLElement&&t.focus()}})()}]);
build/mini-cart-contents.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '411a60125645edfe39837240f8c9204d');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '01795e137d0a667f78513daf639673c6');
build/mini-cart.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('react', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '92216188cab27716af649960a477d123');
1
+ <?php return array('dependencies' => array('react', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'bd3fa181fb5f86ef5c92b757f4ff601e');
build/price-filter-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '3e87eb794c3838cdb9a5614a5efcc42d');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '6b4122e133226e6c6f8ccfa1678b8d8a');
build/price-filter-frontend.js CHANGED
@@ -1,3 +1,3 @@
1
- !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=215)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},101:function(e,t,r){"use strict";var n=r(12),o=r.n(n),i=r(0),a=r(139),c=r(5),s=r.n(c);r(196);const u=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:r,currency:n,onValueChange:c,displayType:l="text",...p}=e;const f="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(f))return null;const m=f/10**n.minorUnit;if(!Number.isFinite(m))return null;const d=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),b={...p,...u(n),value:void 0,currency:void 0,onValueChange:void 0},g=c?e=>{const t=+e.value*10**n.minorUnit;c(t)}:()=>{};return Object(i.createElement)(a.a,o()({className:d,displayType:l},b,{value:m,onValueChange:g}))}},107:function(e,t){},118:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"boolean"==typeof e},12:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},13:function(e,t){e.exports=window.wp.isShallowEqual},139:function(e,t,r){"use strict";var n=r(3),o=r.n(n);function i(){}function a(e){return!!(e||"").match(/\d/)}function c(e){return null==e}function s(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function u(e,t){void 0===t&&(t=!0);var r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNagation:r,addNegation:n}}function l(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function p(e,t){return Array(t+1).join(e)}function f(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function m(e,t,r){return Math.min(Math.max(e,t),r)}function d(e){return Math.max(e.selectionStart,e.selectionEnd)}var b={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:i,onChange:i,onKeyDown:i,onMouseUp:i,onFocus:i,onBlur:i,isAllowed:function(){return!0}},g=function(e){function t(t){e.call(this,t);var r=t.defaultValue;this.validateProps();var n=this.formatValueProp(r);this.state={value:n,numAsString:this.removeFormatting(n),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this.props,r=this.state,n=this.focusedElm,o=r.value,i=r.numAsString;if(void 0===i&&(i=""),e!==t){this.validateProps();var a=this.formatNumString(i),s=c(t.value)?a:this.formatValueProp(),u=this.removeFormatting(s),l=parseFloat(u),p=parseFloat(i);(isNaN(l)&&isNaN(p)||l===p)&&a===o&&(null!==n||s===o)||this.updateValue({formattedValue:s,numAsString:u,input:n,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,r=this.getSeparators().decimalSeparator,n=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var i=(e=(e.match(n)||[]).join("").replace(r,".")).indexOf(".");return-1!==i&&(e=e.substring(0,i)+"."+e.substring(i+1,e.length).replace(new RegExp(s(r),"g"),"")),o&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var r=this.props,n=r.format,o=r.decimalScale,i=r.customNumerals,a=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(!a||0===o||t||n?"":"|"+s(a)),e?"g":void 0)},t.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"==typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},t.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},t.prototype.setPatchedCaretPosition=function(e,t,r){f(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===r&&f(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,r){var n=this.props,o=n.prefix,i=n.suffix,c=n.format;if(""===e)return 0;if(t=m(t,0,e.length),!c){var s="-"===e[0];return m(t,o.length+(s?1:0),e.length-i.length)}if("function"==typeof c)return t;if("#"===c[t]&&a(e[t]))return t;if("#"===c[t-1]&&a(e[t-1]))return t;var u=c.indexOf("#");t=m(t,u,c.lastIndexOf("#")+1);for(var l=c.substring(t,c.length).indexOf("#"),p=t,f=t+(-1===l?0:l);p>u&&("#"!==c[p]||!a(e[p]));)p-=1;return!a(e[f])||"left"===r&&t!==u||t-p<f-t?a(e[p])?p+1:p:f},t.prototype.getCaretPosition=function(e,t,r){var n,o,i=this.props.format,a=this.state.value,c=this.getNumberRegex(!0),s=(e.match(c)||[]).join(""),u=(t.match(c)||[]).join("");for(n=0,o=0;o<r;o++){var l=e[o]||"",p=t[n]||"";if((l.match(c)||l===p)&&("0"!==l||!p.match(c)||"0"===p||s.length===u.length)){for(;l!==t[n]&&n<t.length;)n++;n++}}return"string"!=typeof i||a||(n=t.length),this.correctCaretPosition(t,n)},t.prototype.removePrefixAndSuffix=function(e){var t=this.props,r=t.format,n=t.prefix,o=t.suffix;if(!r&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var a=(e=n&&0===e.indexOf(n)?e.substring(n.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,i&&(e="-"+e)}return e},t.prototype.removePatternFormatting=function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),r=0,n="",o=0,i=t.length;o<=i;o++){var a=t[o]||"",c=o===i?e.length:e.indexOf(a,r);if(-1===c){n=e;break}n+=e.substring(r,c),r=c+a.length}return(n.match(this.getNumberRegex(!0))||[]).join("")},t.prototype.removeFormatting=function(e){var t=this.props,r=t.format,n=t.removeFormatting;return e?(r?e="string"==typeof r?this.removePatternFormatting(e):"function"==typeof n?n(e):(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e},t.prototype.formatWithPattern=function(e){for(var t=this.props.format,r=0,n=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(n[o]=e[r]||this.getMaskAtIndex(r),r+=1);return n.join("")},t.prototype.formatAsNumber=function(e){var t=this.props,r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix,i=t.suffix,a=t.allowNegative,c=t.thousandsGroupStyle,s=this.getSeparators(),p=s.thousandSeparator,f=s.decimalSeparator,m=-1!==e.indexOf(".")||r&&n,d=u(e,a),b=d.beforeDecimal,g=d.afterDecimal,h=d.addNegation;return void 0!==r&&(g=l(g,r,n)),p&&(b=function(e,t,r){var n=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}(b,p,c)),o&&(b=o+b),i&&(g+=i),h&&(b="-"+b),b+(m&&f||"")+g},t.prototype.formatNumString=function(e){void 0===e&&(e="");var t=this.props,r=t.format,n=t.allowEmptyFormatting,o=t.customNumerals,i=e;if(o&&10===o.length){var a=new RegExp("["+o.join("")+"]","g");i=e.replace(a,(function(e){return o.indexOf(e).toString()}))}return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(i):"function"==typeof r?r(i):this.formatAsNumber(i):"-":""},t.prototype.formatValueProp=function(e){var t=this.props,r=t.format,n=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,a=this.props,s=a.value,f=a.isNumericString,m=!(s=c(s)?e:s)&&0!==s;return m&&i&&(s=""),m&&!i?"":("number"==typeof s&&(s=function(e){var t="-"===(e+="")[0]?"-":"";t&&(e=e.substring(1));var r=e.split(/[eE]/g),n=r[0],o=r[1];if(!(o=Number(o)))return t+n;var i=1+o,a=(n=n.replace(".","")).length;return i<0?n="0."+p("0",Math.abs(i))+n:i>=a?n+=p("0",i-a):n=(n.substring(0,i)||"0")+"."+n.substring(i),t+n}(s),f=!0),"Infinity"===s&&f&&(s=""),f&&!r&&"number"==typeof n&&(s=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,o=u(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNagation,s=parseFloat("0."+(a||"0")),p=(a.length<=t?"0."+a:s.toFixed(t)).split(".");return(c?"-":"")+i.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),p[0])+(n?".":"")+l(p[1]||"",Math.min(t,a.length),r)}(s,n,o)),f?this.formatNumString(s):this.formatInput(s))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var r=this.props,n=r.format,o=r.prefix,i=r.suffix,a=r.decimalScale,c=r.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e<o.length||e>=t.length-i.length||a&&c&&t[e]===s))},t.prototype.correctInputValue=function(e,t,r){var n=this,o=this.props,i=o.format,a=o.allowNegative,c=o.prefix,s=o.suffix,l=o.decimalScale,p=this.getSeparators(),f=p.allowedDecimalSeparators,m=p.decimalSeparator,d=this.state.numAsString||"",b=this.selectionBeforeInput,g=b.selectionStart,h=b.selectionEnd,v=function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{start:r,end:o-n}}(t,r),w=v.start,O=v.end;if(!i&&w===O&&-1!==f.indexOf(r[g])){var y=0===l?"":m;return r.substr(0,g)+y+r.substr(g+1,r.length)}var j=i?0:c.length,_=t.length-(i?0:s.length);if(r.length>t.length||!r.length||w===O||0===g&&h===t.length||0===w&&O===t.length||g===j&&h===_)return r;var S=t.substr(w,O-w);if([].concat(S).find((function(e,r){return n.isCharacterAFormat(r+w,t)}))){var x=t.substr(w),E={},k=[];[].concat(x).forEach((function(e,r){n.isCharacterAFormat(r+w,t)?E[r]=e:r>S.length-1&&k.push(e)})),Object.keys(E).forEach((function(e){k.length>e?k.splice(e,0,E[e]):k.push(E[e])})),r=t.substr(0,w)+k.join("")}if(!i){var P=this.removeFormatting(r),N=u(P,a),F=N.beforeDecimal,C=N.afterDecimal,A=N.addNegation,R=e<r.indexOf(m)+1;if(P.length<d.length&&R&&""===F&&!parseFloat(C))return A?"-":""}return r},t.prototype.updateValue=function(e){var t=e.formattedValue,r=e.input,n=e.setCaretPosition;void 0===n&&(n=!0);var o=e.source,i=e.event,a=e.numAsString,c=e.caretPos,s=this.props.onValueChange,u=this.state.value;if(r){if(void 0===c&&n){var l=e.inputValue||r.value,p=d(r);r.value=t,c=this.getCaretPosition(l,t,p)}r.value=t,n&&this.setPatchedCaretPosition(r,c,t)}void 0===a&&(a=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:a}),s(this.getValueObject(t,a),{event:i,source:o}))},t.prototype.onChange=function(e){var t=e.target,r=t.value,n=this.state,o=this.props,i=o.isAllowed,a=n.value||"",c=d(t);r=this.correctInputValue(c,a,r);var s=this.formatInput(r)||"",u=this.removeFormatting(s),l=i(this.getValueObject(s,u));l||(s=a),this.updateValue({formattedValue:s,numAsString:u,inputValue:r,input:t,event:e,source:"event"}),l&&o.onChange(e)},t.prototype.onBlur=function(e){var t=this.props,r=this.state,n=t.format,o=t.onBlur,i=t.allowLeadingZeros,a=r.numAsString,c=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!n){isNaN(parseFloat(a))&&(a=""),i||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}(a));var s=this.formatNumString(a);if(s!==c)return this.updateValue({formattedValue:s,numAsString:a,input:e.target,setCaretPosition:!1,event:e,source:"event"}),void o(e)}o(e)},t.prototype.onKeyDown=function(e){var t,r=e.target,n=e.key,o=r.selectionStart,i=r.selectionEnd,a=r.value;void 0===a&&(a="");var c=this.props,s=c.decimalScale,u=c.fixedDecimalScale,l=c.prefix,p=c.suffix,f=c.format,m=c.onKeyDown,d=void 0!==s&&u,b=this.getNumberRegex(!1,d),g=new RegExp("-"),h="string"==typeof f;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===n||"Backspace"===n?t=o-1:"ArrowRight"===n?t=o+1:"Delete"===n&&(t=o),void 0!==t&&o===i){var v=t,w=h?f.indexOf("#"):l.length,O=h?f.lastIndexOf("#")+1:a.length-p.length;if("ArrowLeft"===n||"ArrowRight"===n){var y="ArrowLeft"===n?"left":"right";v=this.correctCaretPosition(a,t,y)}else if("Delete"!==n||b.test(a[t])||g.test(a[t])){if("Backspace"===n&&!b.test(a[t]))if(o<=w+1&&"-"===a[0]&&void 0===f){var j=a.substring(1);this.updateValue({formattedValue:j,caretPos:v,input:r,event:e,source:"event"})}else if(!g.test(a[t])){for(;!b.test(a[v-1])&&v>w;)v--;v=this.correctCaretPosition(a,v,"left")}}else for(;!b.test(a[v])&&v<O;)v++;(v!==t||t<w||t>O)&&(e.preventDefault(),this.setPatchedCaretPosition(r,v,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,v,a),m(e)}else m(e)},t.prototype.onMouseUp=function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),r===n){var i=this.correctCaretPosition(o,r);i!==r&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,o=r.selectionEnd,i=r.value;void 0===i&&(i="");var a=t.correctCaretPosition(i,n);a===n||0===n&&o===i.length||t.setPatchedCaretPosition(r,a,i),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,r=e.displayType,n=e.customInput,i=e.renderText,a=e.getInputRef,c=e.format,s=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(r[n]=e[n]);return r}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),u=this.state,l=u.value,p=u.mounted&&function(e){return e||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(c)?"numeric":void 0,f=Object.assign({inputMode:p},s,{type:t,value:l,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return i?i(l,s)||null:o.a.createElement("span",Object.assign({},s,{ref:a}),l);if(n){var m=n;return o.a.createElement(m,Object.assign({},f,{ref:a}))}return o.a.createElement("input",Object.assign({},f,{ref:a}))},t}(o.a.Component);g.defaultProps=b,t.a=g},144:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(99),i=r(4),a=r(32),c=r(20),s=r(39),u=r(63),l=r(26);const p=e=>{let{queryAttribute:t,queryPrices:r,queryStock:p,queryState:f}=e,m=Object(l.a)();m+="-collection-data";const[d]=Object(s.a)(m),[b,g]=Object(s.b)("calculate_attribute_counts",[],m),[h,v]=Object(s.b)("calculate_price_range",null,m),[w,O]=Object(s.b)("calculate_stock_status_counts",null,m),y=Object(a.a)(t||{}),j=Object(a.a)(r),_=Object(a.a)(p);Object(n.useEffect)(()=>{"object"==typeof y&&Object.keys(y).length&&(b.find(e=>Object(c.b)(y,"taxonomy")&&e.taxonomy===y.taxonomy)||g([...b,y]))},[y,b,g]),Object(n.useEffect)(()=>{h!==j&&void 0!==j&&v(j)},[j,v,h]),Object(n.useEffect)(()=>{w!==_&&void 0!==_&&O(_)},[_,O,w]);const[S,x]=Object(n.useState)(!1),[E]=Object(o.a)(S,200);S||x(!0);const k=Object(n.useMemo)(()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=Object(i.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:r}=e;return{taxonomy:t,query_type:r}}),["taxonomy","query_type"])),t})(d),[d]);return Object(u.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...f,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...k},shouldSelect:E})}},149:function(e){e.exports=JSON.parse('{"name":"woocommerce/price-filter","version":"1.0.0","title":"Filter Products by Price","description":"Allow customers to filter the products by choosing a lower or upper price limit. Works in combination with the All Products block.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"multiple":false,"color":{"text":true,"background":false}},"example":{"attributes":{"isPreview":true}},"attributes":{"className":{"type":"string","default":""},"showInputFields":{"type":"boolean","default":true},"showFilterButton":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3}},"textdomain":"woo-gutenberg-products-block","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},15:function(e,t){e.exports=window.wp.url},16:function(e,t,r){"use strict";var n=r(19),o=r.n(n),i=r(0),a=r(3),c=r(1),s=r(46),u=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:r=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(c.__)("Error:","woo-gutenberg-products-block"),button:u,showErrorBlock:l=!0}=e;return l?Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),u&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u))):null};r(34);class l extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:c,button:s}=this.props,{errorMessage:l,hasError:p}=this.state;return p?"function"==typeof c?c({errorMessage:l}):Object(i.createElement)(u,{showErrorBlock:n,errorMessage:r?l:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:s}):this.props.children}}t.a=l},19:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},196:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},20:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},215:function(e,t,r){e.exports=r(244)},216:function(e,t){},217:function(e,t){},244:function(e,t,r){"use strict";r.r(t);var n=r(51),o=r(0),i=r(60),a=r(39),c=r(144),s=r(1),u=r(5),l=r.n(u),p=r(101),f=r(20);r(217);const m=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],[i,a]=e;const c=e=>Number.isFinite(e);return c(i)||(i=t||0),c(a)||(a=r||n),c(t)&&t>i&&(i=t),c(r)&&r<=i&&(i=r-n),c(t)&&t>=a&&(a=t+n),c(r)&&r<a&&(a=r),!o&&i>=a&&(i=a-n),o&&a<=i&&(a=i+n),[i,a]};var d=r(76);const b=e=>{let{maxConstraint:t,minorUnit:r}=e;return e=>{let{floatValue:n}=e;return void 0!==n&&n<=t/10**r&&n>0}},g=e=>{let{minConstraint:t,currentMaxValue:r,minorUnit:n}=e;return e=>{let{floatValue:o}=e;return void 0!==o&&o>=t/10**n&&o<r/10**n}};var h=e=>{let{minPrice:t,maxPrice:r,minConstraint:n,maxConstraint:i,onChange:a=(()=>{}),step:c,currency:u,showInputFields:h=!0,showFilterButton:v=!1,isLoading:w=!1,onSubmit:O=(()=>{})}=e;const y=Object(o.useRef)(null),j=Object(o.useRef)(null),_=c||10**u.minorUnit,[S,x]=Object(o.useState)(t),[E,k]=Object(o.useState)(r);Object(o.useEffect)(()=>{x(t)},[t]),Object(o.useEffect)(()=>{k(r)},[r]);const P=Object(o.useMemo)(()=>isFinite(n)&&isFinite(i),[n,i]),N=Object(o.useMemo)(()=>isFinite(t)&&isFinite(r)&&P?{"--low":Math.round((t-n)/(i-n)*100)-.5+"%","--high":Math.round((r-n)/(i-n)*100)+.5+"%"}:{"--low":"0%","--high":"100%"},[t,r,n,i,P]),F=Object(o.useCallback)(e=>{if(w||!P||!y.current||!j.current)return;const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=y.current.offsetWidth,o=+y.current.value,a=j.current.offsetWidth,c=+j.current.value,s=n*(o/i),u=a*(c/i);Math.abs(r-s)>Math.abs(r-u)?(y.current.style.zIndex="20",j.current.style.zIndex="21"):(y.current.style.zIndex="21",j.current.style.zIndex="20")},[w,i,P]),C=Object(o.useCallback)(e=>{const o=e.target.classList.contains("wc-block-price-filter__range-input--min"),c=+e.target.value,s=o?[Math.round(c/_)*_,r]:[t,Math.round(c/_)*_],u=m(s,n,i,_,o);a(u)},[a,t,r,n,i,_]),A=Object(o.useCallback)(e=>{if(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))return;const t=e.target.classList.contains("wc-block-price-filter__amount--min");if(S>=E){const e=m([0,E],null,null,_,t);return a([parseInt(e[0],10),parseInt(e[1],10)])}const r=m([S,E],null,null,_,t);a(r)},[a,_,S,E]),R=l()("wc-block-price-filter","wc-block-components-price-slider",h&&"wc-block-price-filter--has-input-fields",h&&"wc-block-components-price-slider--has-input-fields",v&&"wc-block-price-filter--has-filter-button",v&&"wc-block-components-price-slider--has-filter-button",w&&"is-loading",!P&&"is-disabled"),T=Object(f.a)(y.current)?y.current.ownerDocument.activeElement:void 0,M=T&&T===y.current?_:1,U=T&&T===j.current?_:1,B=String(S/10**u.minorUnit),D=String(E/10**u.minorUnit);return Object(o.createElement)("div",{className:R},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:F,onFocus:F},P&&Object(o.createElement)("div",{"aria-hidden":h},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:N}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":Object(s.__)("Filter products by minimum price","woo-gutenberg-products-block"),"aria-valuetext":B,value:Number.isFinite(t)?t:n,onChange:C,step:M,min:n,max:i,ref:y,disabled:w,tabIndex:h?-1:0}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":Object(s.__)("Filter products by maximum price","woo-gutenberg-products-block"),"aria-valuetext":D,value:Number.isFinite(r)?r:i,onChange:C,step:U,min:n,max:i,ref:j,disabled:w,tabIndex:h?-1:0}))),Object(o.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},h&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--min wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--min","aria-label":Object(s.__)("Filter products by minimum price","woo-gutenberg-products-block"),allowNegative:!1,isAllowed:g({minConstraint:n,minorUnit:u.minorUnit,currentMaxValue:E}),onValueChange:e=>{e!==S&&x(e)},onBlur:A,disabled:w||!P,value:S}),Object(o.createElement)(p.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--max wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--max","aria-label":Object(s.__)("Filter products by maximum price","woo-gutenberg-products-block"),isAllowed:b({maxConstraint:i,minorUnit:u.minorUnit}),onValueChange:e=>{e!==E&&k(e)},onBlur:A,disabled:w||!P,value:E})),!h&&!w&&Number.isFinite(t)&&Number.isFinite(r)&&Object(o.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(s.__)("Price","woo-gutenberg-products-block"),":  ",Object(o.createElement)(p.a,{currency:u,value:t})," – ",Object(o.createElement)(p.a,{currency:u,value:r})),v&&Object(o.createElement)(d.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:w||!P,onClick:O,screenReaderLabel:Object(s.__)("Apply price filter","woo-gutenberg-products-block")})))},v=r(50),w=r(41),O=r(2),y=r(15),j=r(118),_=r(52);const S=(e,t,r)=>{const n=10*10**t;let o=null;const a=parseFloat(e);isNaN(a)||("ROUND_UP"===r?o=Math.ceil(a/n)*n:"ROUND_DOWN"===r&&(o=Math.floor(a/n)*n));const c=Object(i.a)(o,Number.isFinite);return Number.isFinite(o)?o:c};var x=r(98);function E(e,t){return Number(e)*10**t}r(216);var k=r(149);const P={heading:{type:"string",default:Object(s.__)("Filter by price","woo-gutenberg-products-block")}};Object(n.a)({selector:".wp-block-woocommerce-price-filter",Block:e=>{let{attributes:t,isEditor:r=!1}=e;const n=Object(O.getSettingWithCoercion)("has_filterable_products",!1,j.a),s=Object(O.getSettingWithCoercion)("is_rendering_php_template",!1,j.a),[u,l]=Object(o.useState)(!1),p=Object(x.c)("min_price"),m=Object(x.c)("max_price"),[d]=Object(a.a)(),{results:b,isLoading:g}=Object(c.a)({queryPrices:!0,queryState:d}),k=Object(w.getCurrencyFromPriceResponse)(Object(f.b)(b,"price_range")?b.price_range:void 0),[P,N]=Object(a.b)("min_price",E(p,k.minorUnit)||null),[F,C]=Object(a.b)("max_price",E(m,k.minorUnit)||null),[A,R]=Object(o.useState)(E(p,k.minorUnit)||null),[T,M]=Object(o.useState)(E(m,k.minorUnit)||null),{minConstraint:U,maxConstraint:B}=(e=>{let{minPrice:t,maxPrice:r,minorUnit:n}=e;return{minConstraint:S(t||"",n,"ROUND_DOWN"),maxConstraint:S(r||"",n,"ROUND_UP")}})({minPrice:Object(f.b)(b,"price_range")&&Object(f.b)(b.price_range,"min_price")&&Object(_.a)(b.price_range.min_price)?b.price_range.min_price:void 0,maxPrice:Object(f.b)(b,"price_range")&&Object(f.b)(b.price_range,"max_price")&&Object(_.a)(b.price_range.max_price)?b.price_range.max_price:void 0,minorUnit:k.minorUnit});Object(o.useEffect)(()=>{!u&&s&&(N(E(p,k.minorUnit)),C(E(m,k.minorUnit)),l(!0))},[k.minorUnit,s,u,m,p,C,N]);const D=Object(o.useCallback)((e,t)=>{const r=t>=Number(B)?void 0:t,n=e<=Number(U)?void 0:e;if(s&&window){const e=function(e,t){const r={};for(const[e,n]of Object.entries(t))n?r[e]=n.toString():delete r[e];const n=Object(y.removeQueryArgs)(e,...Object.keys(t));return Object(y.addQueryArgs)(n,r)}(window.location.href,{min_price:n/10**k.minorUnit,max_price:r/10**k.minorUnit});window.location.href!==e&&(window.location.href=e)}else N(n),C(r)},[U,B,N,C,s,k.minorUnit]),V=Object(v.a)(D,500),I=Object(o.useCallback)(e=>{e[0]!==A&&R(e[0]),e[1]!==T&&M(e[1]),s&&u&&!t.showFilterButton&&V(e[0],e[1])},[A,T,R,M,s,u,V,t.showFilterButton]);Object(o.useEffect)(()=>{t.showFilterButton||s||V(A,T)},[A,T,t.showFilterButton,V,s]);const L=Object(i.a)(P),q=Object(i.a)(F),G=Object(i.a)(U),K=Object(i.a)(B);if(Object(o.useEffect)(()=>{(!Number.isFinite(A)||P!==L&&P!==A||U!==G&&U!==A)&&R(Number.isFinite(P)?P:U),(!Number.isFinite(T)||F!==q&&F!==T||B!==K&&B!==T)&&M(Number.isFinite(F)?F:B)},[A,T,P,F,U,B,G,K,L,q]),!n)return null;if(!g&&(null===U||null===B||U===B))return null;const W="h"+t.headingLevel;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(W,{className:"wc-block-price-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-price-slider"},Object(o.createElement)(h,{minConstraint:U,maxConstraint:B,minPrice:A,maxPrice:T,currency:k,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:I,onSubmit:()=>D(A,T),isLoading:g})))},getProps:e=>({attributes:{showInputFields:"true"===e.dataset.showinputfields,showFilterButton:"true"===e.dataset.showfilterbutton,heading:e.dataset.heading||P.heading.default,headingLevel:e.dataset.headingLevel?parseInt(e.dataset.headingLevel,10):k.attributes.headingLevel.default},isEditor:!1})})},25:function(e,t,r){"use strict";var n=r(0),o=r(5),i=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:a,wrapperProps:c={}}=e;const s=null!=r,u=null!=o;return!s&&u?(t=a||"span",c={...c,className:i()(c.className,"screen-reader-text")},Object(n.createElement)(t,c,o)):(t=a||n.Fragment,s&&u&&r!==o?Object(n.createElement)(t,c,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,c,r))}},26:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);const o=Object(n.createContext)("page"),i=()=>Object(n.useContext)(o);o.Provider},3:function(e,t){e.exports=window.React},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(13),i=r.n(o);function a(e){const t=Object(n.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},34:function(e,t){},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(6),o=r(8),i=r(0),a=r(13),c=r.n(a),s=r(32),u=r(60),l=r(26);const p=e=>{const t=Object(l.a)();e=e||t;const r=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(i.useCallback)(t=>{a(e,t)},[e,a])]},f=(e,t,r)=>{const a=Object(l.a)();r=r||a;const c=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(i.useCallback)(t=>{s(r,e,t)},[r,e,s])]},m=(e,t)=>{const r=Object(l.a)();t=t||r;const[n,o]=p(t),a=Object(s.a)(n),f=Object(s.a)(e),m=Object(u.a)(f),d=Object(i.useRef)(!1);return Object(i.useEffect)(()=>{c()(m,f)||(o(Object.assign({},a,f)),d.current=!0)},[a,f,m,o]),d.current?[n,o]:[e,o]}},4:function(e,t){e.exports=window.lodash},41:function(e,t){e.exports=window.wc.priceFormat},46:function(e,t,r){"use strict";r.d(t,"n",(function(){return i})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return c})),r.d(t,"m",(function(){return s})),r.d(t,"i",(function(){return u})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return p})),r.d(t,"j",(function(){return f})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return v}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",c=i.pluginUrl+"build/",s=i.buildPhase,u=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),d=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},5:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var c in n)r.call(n,c)&&n[c]&&e.push(c);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},50:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),a=Object(n.useRef)(0),c=Object(n.useRef)(null),s=Object(n.useRef)([]),u=Object(n.useRef)(),l=Object(n.useRef)(),p=Object(n.useRef)(e),f=Object(n.useRef)(!0);p.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var d=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,g="maxWait"in r,h=g?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return f.current=!0,function(){f.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=u.current;return s.current=u.current=null,a.current=e,l.current=p.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(c.current),c.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!f.current)return!1;var r=e-i.current,n=e-a.current;return!i.current||r>=t||r<0||g&&n>=h},v=function(t){return c.current=null,b&&s.current?e(t):(s.current=u.current=null,l.current)},w=function(){var e=Date.now();if(n(e))return v(e);if(f.current){var o=e-i.current,c=e-a.current,s=t-o,u=g?Math.min(s,h-c):s;r(w,u)}},O=function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];var b=Date.now(),h=n(b);if(s.current=p,u.current=o,i.current=b,h){if(!c.current&&f.current)return a.current=i.current,r(w,t),d?e(i.current):l.current;if(g)return r(w,t),e(i.current)}return c.current||r(w,t),l.current};return O.cancel=function(){c.current&&(m?cancelAnimationFrame(c.current):clearTimeout(c.current)),a.current=0,s.current=i.current=u.current=c.current=null},O.isPending=function(){return!!c.current},O.flush=function(){return c.current?v(Date.now()):l.current},O}),[d,g,t,h,b,m])}},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(12),o=r.n(n),i=r(0),a=r(16);const c=[".wp-block-woocommerce-cart"],s=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const s=n(e,r),u=c(e,r),l={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:c={},errorBoundaryProps:s={}}=e;Object(i.render)(Object(i.createElement)(a.a,s,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},c,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:l,errorBoundaryProps:u})})},u=e=>{const t=document.body.querySelectorAll(c.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},6:function(e,t){e.exports=window.wc.wcBlocksData},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},63:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(6),o=r(8),i=r(0),a=r(32),c=r(74);const s=e=>{const{namespace:t,resourceName:r,resourceValues:s=[],query:u={},shouldSelect:l=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const p=Object(i.useRef)({results:[],isLoading:!0}),f=Object(a.a)(u),m=Object(a.a)(s),d=Object(c.a)(),b=Object(o.useSelect)(e=>{if(!l)return null;const o=e(n.COLLECTIONS_STORE_KEY),i=[t,r,f,m],a=o.getCollectionError(...i);if(a){if(!(a instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");d(a)}return{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}},[t,r,m,f,l]);return null!==b&&(p.current=b),p.current}},74:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},76:function(e,t,r){"use strict";var n=r(0),o=r(1),i=r(5),a=r.n(i),c=r(25);r(107),t.a=e=>{let{className:t,disabled:r,label:
2
  /* translators: Submit button text for filters. */
3
  i=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:a()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:s},Object(n.createElement)(c.a,{label:i,screenReaderLabel:u}))}},8:function(e,t){e.exports=window.wp.data},98:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return a}));var n=r(15);const o="query_typ
1
+ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=215)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},101:function(e,t,r){"use strict";var n=r(12),o=r.n(n),i=r(0),a=r(139),c=r(5),s=r.n(c);r(196);const u=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:r,currency:n,onValueChange:c,displayType:l="text",...p}=e;const f="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(f))return null;const m=f/10**n.minorUnit;if(!Number.isFinite(m))return null;const d=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),b={...p,...u(n),value:void 0,currency:void 0,onValueChange:void 0},g=c?e=>{const t=+e.value*10**n.minorUnit;c(t)}:()=>{};return Object(i.createElement)(a.a,o()({className:d,displayType:l},b,{value:m,onValueChange:g}))}},107:function(e,t){},118:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"boolean"==typeof e},12:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},13:function(e,t){e.exports=window.wp.isShallowEqual},139:function(e,t,r){"use strict";var n=r(3),o=r.n(n);function i(){}function a(e){return!!(e||"").match(/\d/)}function c(e){return null==e}function s(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function u(e,t){void 0===t&&(t=!0);var r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNagation:r,addNegation:n}}function l(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function p(e,t){return Array(t+1).join(e)}function f(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function m(e,t,r){return Math.min(Math.max(e,t),r)}function d(e){return Math.max(e.selectionStart,e.selectionEnd)}var b={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:i,onChange:i,onKeyDown:i,onMouseUp:i,onFocus:i,onBlur:i,isAllowed:function(){return!0}},g=function(e){function t(t){e.call(this,t);var r=t.defaultValue;this.validateProps();var n=this.formatValueProp(r);this.state={value:n,numAsString:this.removeFormatting(n),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this.props,r=this.state,n=this.focusedElm,o=r.value,i=r.numAsString;if(void 0===i&&(i=""),e!==t){this.validateProps();var a=this.formatNumString(i),s=c(t.value)?a:this.formatValueProp(),u=this.removeFormatting(s),l=parseFloat(u),p=parseFloat(i);(isNaN(l)&&isNaN(p)||l===p)&&a===o&&(null!==n||s===o)||this.updateValue({formattedValue:s,numAsString:u,input:n,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,r=this.getSeparators().decimalSeparator,n=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var i=(e=(e.match(n)||[]).join("").replace(r,".")).indexOf(".");return-1!==i&&(e=e.substring(0,i)+"."+e.substring(i+1,e.length).replace(new RegExp(s(r),"g"),"")),o&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var r=this.props,n=r.format,o=r.decimalScale,i=r.customNumerals,a=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(!a||0===o||t||n?"":"|"+s(a)),e?"g":void 0)},t.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"==typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},t.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},t.prototype.setPatchedCaretPosition=function(e,t,r){f(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===r&&f(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,r){var n=this.props,o=n.prefix,i=n.suffix,c=n.format;if(""===e)return 0;if(t=m(t,0,e.length),!c){var s="-"===e[0];return m(t,o.length+(s?1:0),e.length-i.length)}if("function"==typeof c)return t;if("#"===c[t]&&a(e[t]))return t;if("#"===c[t-1]&&a(e[t-1]))return t;var u=c.indexOf("#");t=m(t,u,c.lastIndexOf("#")+1);for(var l=c.substring(t,c.length).indexOf("#"),p=t,f=t+(-1===l?0:l);p>u&&("#"!==c[p]||!a(e[p]));)p-=1;return!a(e[f])||"left"===r&&t!==u||t-p<f-t?a(e[p])?p+1:p:f},t.prototype.getCaretPosition=function(e,t,r){var n,o,i=this.props.format,a=this.state.value,c=this.getNumberRegex(!0),s=(e.match(c)||[]).join(""),u=(t.match(c)||[]).join("");for(n=0,o=0;o<r;o++){var l=e[o]||"",p=t[n]||"";if((l.match(c)||l===p)&&("0"!==l||!p.match(c)||"0"===p||s.length===u.length)){for(;l!==t[n]&&n<t.length;)n++;n++}}return"string"!=typeof i||a||(n=t.length),this.correctCaretPosition(t,n)},t.prototype.removePrefixAndSuffix=function(e){var t=this.props,r=t.format,n=t.prefix,o=t.suffix;if(!r&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var a=(e=n&&0===e.indexOf(n)?e.substring(n.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,i&&(e="-"+e)}return e},t.prototype.removePatternFormatting=function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),r=0,n="",o=0,i=t.length;o<=i;o++){var a=t[o]||"",c=o===i?e.length:e.indexOf(a,r);if(-1===c){n=e;break}n+=e.substring(r,c),r=c+a.length}return(n.match(this.getNumberRegex(!0))||[]).join("")},t.prototype.removeFormatting=function(e){var t=this.props,r=t.format,n=t.removeFormatting;return e?(r?e="string"==typeof r?this.removePatternFormatting(e):"function"==typeof n?n(e):(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e},t.prototype.formatWithPattern=function(e){for(var t=this.props.format,r=0,n=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(n[o]=e[r]||this.getMaskAtIndex(r),r+=1);return n.join("")},t.prototype.formatAsNumber=function(e){var t=this.props,r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix,i=t.suffix,a=t.allowNegative,c=t.thousandsGroupStyle,s=this.getSeparators(),p=s.thousandSeparator,f=s.decimalSeparator,m=-1!==e.indexOf(".")||r&&n,d=u(e,a),b=d.beforeDecimal,g=d.afterDecimal,h=d.addNegation;return void 0!==r&&(g=l(g,r,n)),p&&(b=function(e,t,r){var n=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}(b,p,c)),o&&(b=o+b),i&&(g+=i),h&&(b="-"+b),b+(m&&f||"")+g},t.prototype.formatNumString=function(e){void 0===e&&(e="");var t=this.props,r=t.format,n=t.allowEmptyFormatting,o=t.customNumerals,i=e;if(o&&10===o.length){var a=new RegExp("["+o.join("")+"]","g");i=e.replace(a,(function(e){return o.indexOf(e).toString()}))}return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(i):"function"==typeof r?r(i):this.formatAsNumber(i):"-":""},t.prototype.formatValueProp=function(e){var t=this.props,r=t.format,n=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,a=this.props,s=a.value,f=a.isNumericString,m=!(s=c(s)?e:s)&&0!==s;return m&&i&&(s=""),m&&!i?"":("number"==typeof s&&(s=function(e){var t="-"===(e+="")[0]?"-":"";t&&(e=e.substring(1));var r=e.split(/[eE]/g),n=r[0],o=r[1];if(!(o=Number(o)))return t+n;var i=1+o,a=(n=n.replace(".","")).length;return i<0?n="0."+p("0",Math.abs(i))+n:i>=a?n+=p("0",i-a):n=(n.substring(0,i)||"0")+"."+n.substring(i),t+n}(s),f=!0),"Infinity"===s&&f&&(s=""),f&&!r&&"number"==typeof n&&(s=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,o=u(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNagation,s=parseFloat("0."+(a||"0")),p=(a.length<=t?"0."+a:s.toFixed(t)).split(".");return(c?"-":"")+i.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),p[0])+(n?".":"")+l(p[1]||"",Math.min(t,a.length),r)}(s,n,o)),f?this.formatNumString(s):this.formatInput(s))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var r=this.props,n=r.format,o=r.prefix,i=r.suffix,a=r.decimalScale,c=r.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e<o.length||e>=t.length-i.length||a&&c&&t[e]===s))},t.prototype.correctInputValue=function(e,t,r){var n=this,o=this.props,i=o.format,a=o.allowNegative,c=o.prefix,s=o.suffix,l=o.decimalScale,p=this.getSeparators(),f=p.allowedDecimalSeparators,m=p.decimalSeparator,d=this.state.numAsString||"",b=this.selectionBeforeInput,g=b.selectionStart,h=b.selectionEnd,v=function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{start:r,end:o-n}}(t,r),w=v.start,O=v.end;if(!i&&w===O&&-1!==f.indexOf(r[g])){var y=0===l?"":m;return r.substr(0,g)+y+r.substr(g+1,r.length)}var j=i?0:c.length,_=t.length-(i?0:s.length);if(r.length>t.length||!r.length||w===O||0===g&&h===t.length||0===w&&O===t.length||g===j&&h===_)return r;var S=t.substr(w,O-w);if([].concat(S).find((function(e,r){return n.isCharacterAFormat(r+w,t)}))){var x=t.substr(w),E={},k=[];[].concat(x).forEach((function(e,r){n.isCharacterAFormat(r+w,t)?E[r]=e:r>S.length-1&&k.push(e)})),Object.keys(E).forEach((function(e){k.length>e?k.splice(e,0,E[e]):k.push(E[e])})),r=t.substr(0,w)+k.join("")}if(!i){var P=this.removeFormatting(r),N=u(P,a),F=N.beforeDecimal,C=N.afterDecimal,A=N.addNegation,R=e<r.indexOf(m)+1;if(P.length<d.length&&R&&""===F&&!parseFloat(C))return A?"-":""}return r},t.prototype.updateValue=function(e){var t=e.formattedValue,r=e.input,n=e.setCaretPosition;void 0===n&&(n=!0);var o=e.source,i=e.event,a=e.numAsString,c=e.caretPos,s=this.props.onValueChange,u=this.state.value;if(r){if(void 0===c&&n){var l=e.inputValue||r.value,p=d(r);r.value=t,c=this.getCaretPosition(l,t,p)}r.value=t,n&&this.setPatchedCaretPosition(r,c,t)}void 0===a&&(a=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:a}),s(this.getValueObject(t,a),{event:i,source:o}))},t.prototype.onChange=function(e){var t=e.target,r=t.value,n=this.state,o=this.props,i=o.isAllowed,a=n.value||"",c=d(t);r=this.correctInputValue(c,a,r);var s=this.formatInput(r)||"",u=this.removeFormatting(s),l=i(this.getValueObject(s,u));l||(s=a),this.updateValue({formattedValue:s,numAsString:u,inputValue:r,input:t,event:e,source:"event"}),l&&o.onChange(e)},t.prototype.onBlur=function(e){var t=this.props,r=this.state,n=t.format,o=t.onBlur,i=t.allowLeadingZeros,a=r.numAsString,c=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!n){isNaN(parseFloat(a))&&(a=""),i||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}(a));var s=this.formatNumString(a);if(s!==c)return this.updateValue({formattedValue:s,numAsString:a,input:e.target,setCaretPosition:!1,event:e,source:"event"}),void o(e)}o(e)},t.prototype.onKeyDown=function(e){var t,r=e.target,n=e.key,o=r.selectionStart,i=r.selectionEnd,a=r.value;void 0===a&&(a="");var c=this.props,s=c.decimalScale,u=c.fixedDecimalScale,l=c.prefix,p=c.suffix,f=c.format,m=c.onKeyDown,d=void 0!==s&&u,b=this.getNumberRegex(!1,d),g=new RegExp("-"),h="string"==typeof f;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===n||"Backspace"===n?t=o-1:"ArrowRight"===n?t=o+1:"Delete"===n&&(t=o),void 0!==t&&o===i){var v=t,w=h?f.indexOf("#"):l.length,O=h?f.lastIndexOf("#")+1:a.length-p.length;if("ArrowLeft"===n||"ArrowRight"===n){var y="ArrowLeft"===n?"left":"right";v=this.correctCaretPosition(a,t,y)}else if("Delete"!==n||b.test(a[t])||g.test(a[t])){if("Backspace"===n&&!b.test(a[t]))if(o<=w+1&&"-"===a[0]&&void 0===f){var j=a.substring(1);this.updateValue({formattedValue:j,caretPos:v,input:r,event:e,source:"event"})}else if(!g.test(a[t])){for(;!b.test(a[v-1])&&v>w;)v--;v=this.correctCaretPosition(a,v,"left")}}else for(;!b.test(a[v])&&v<O;)v++;(v!==t||t<w||t>O)&&(e.preventDefault(),this.setPatchedCaretPosition(r,v,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,v,a),m(e)}else m(e)},t.prototype.onMouseUp=function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),r===n){var i=this.correctCaretPosition(o,r);i!==r&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,o=r.selectionEnd,i=r.value;void 0===i&&(i="");var a=t.correctCaretPosition(i,n);a===n||0===n&&o===i.length||t.setPatchedCaretPosition(r,a,i),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,r=e.displayType,n=e.customInput,i=e.renderText,a=e.getInputRef,c=e.format,s=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(r[n]=e[n]);return r}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),u=this.state,l=u.value,p=u.mounted&&function(e){return e||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(c)?"numeric":void 0,f=Object.assign({inputMode:p},s,{type:t,value:l,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return i?i(l,s)||null:o.a.createElement("span",Object.assign({},s,{ref:a}),l);if(n){var m=n;return o.a.createElement(m,Object.assign({},f,{ref:a}))}return o.a.createElement("input",Object.assign({},f,{ref:a}))},t}(o.a.Component);g.defaultProps=b,t.a=g},144:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(99),i=r(4),a=r(32),c=r(20),s=r(39),u=r(63),l=r(26);const p=e=>{let{queryAttribute:t,queryPrices:r,queryStock:p,queryState:f}=e,m=Object(l.a)();m+="-collection-data";const[d]=Object(s.a)(m),[b,g]=Object(s.b)("calculate_attribute_counts",[],m),[h,v]=Object(s.b)("calculate_price_range",null,m),[w,O]=Object(s.b)("calculate_stock_status_counts",null,m),y=Object(a.a)(t||{}),j=Object(a.a)(r),_=Object(a.a)(p);Object(n.useEffect)(()=>{"object"==typeof y&&Object.keys(y).length&&(b.find(e=>Object(c.b)(y,"taxonomy")&&e.taxonomy===y.taxonomy)||g([...b,y]))},[y,b,g]),Object(n.useEffect)(()=>{h!==j&&void 0!==j&&v(j)},[j,v,h]),Object(n.useEffect)(()=>{w!==_&&void 0!==_&&O(_)},[_,O,w]);const[S,x]=Object(n.useState)(!1),[E]=Object(o.a)(S,200);S||x(!0);const k=Object(n.useMemo)(()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=Object(i.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:r}=e;return{taxonomy:t,query_type:r}}),["taxonomy","query_type"])),t})(d),[d]);return Object(u.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...f,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...k},shouldSelect:E})}},149:function(e){e.exports=JSON.parse('{"name":"woocommerce/price-filter","version":"1.0.0","title":"Filter Products by Price","description":"Allow customers to filter the products by choosing a lower or upper price limit. Works in combination with the All Products block.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"multiple":false,"color":{"text":true,"background":false}},"example":{"attributes":{"isPreview":true}},"attributes":{"className":{"type":"string","default":""},"showInputFields":{"type":"boolean","default":true},"showFilterButton":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3}},"textdomain":"woo-gutenberg-products-block","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},15:function(e,t){e.exports=window.wp.url},16:function(e,t,r){"use strict";var n=r(19),o=r.n(n),i=r(0),a=r(3),c=r(1),s=r(46),u=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:r=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(c.__)("Error:","woo-gutenberg-products-block"),button:u,showErrorBlock:l=!0}=e;return l?Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),u&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u))):null};r(34);class l extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:c,button:s}=this.props,{errorMessage:l,hasError:p}=this.state;return p?"function"==typeof c?c({errorMessage:l}):Object(i.createElement)(u,{showErrorBlock:n,errorMessage:r?l:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:s}):this.props.children}}t.a=l},19:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},196:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},20:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));const n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function o(e,t){return n(e)&&t in e}},215:function(e,t,r){e.exports=r(244)},216:function(e,t){},217:function(e,t){},244:function(e,t,r){"use strict";r.r(t);var n=r(51),o=r(0),i=r(60),a=r(39),c=r(144),s=r(1),u=r(5),l=r.n(u),p=r(101),f=r(20);r(217);const m=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],[i,a]=e;const c=e=>Number.isFinite(e);return c(i)||(i=t||0),c(a)||(a=r||n),c(t)&&t>i&&(i=t),c(r)&&r<=i&&(i=r-n),c(t)&&t>=a&&(a=t+n),c(r)&&r<a&&(a=r),!o&&i>=a&&(i=a-n),o&&a<=i&&(a=i+n),[i,a]};var d=r(76);const b=e=>{let{maxConstraint:t,minorUnit:r}=e;return e=>{let{floatValue:n}=e;return void 0!==n&&n<=t/10**r&&n>0}},g=e=>{let{minConstraint:t,currentMaxValue:r,minorUnit:n}=e;return e=>{let{floatValue:o}=e;return void 0!==o&&o>=t/10**n&&o<r/10**n}};var h=e=>{let{minPrice:t,maxPrice:r,minConstraint:n,maxConstraint:i,onChange:a,step:c,currency:u,showInputFields:h=!0,showFilterButton:v=!1,isLoading:w=!1,onSubmit:O=(()=>{})}=e;const y=Object(o.useRef)(null),j=Object(o.useRef)(null),_=c||10**u.minorUnit,[S,x]=Object(o.useState)(t),[E,k]=Object(o.useState)(r);Object(o.useEffect)(()=>{x(t)},[t]),Object(o.useEffect)(()=>{k(r)},[r]);const P=Object(o.useMemo)(()=>isFinite(n)&&isFinite(i),[n,i]),N=Object(o.useMemo)(()=>isFinite(t)&&isFinite(r)&&P?{"--low":Math.round((t-n)/(i-n)*100)-.5+"%","--high":Math.round((r-n)/(i-n)*100)+.5+"%"}:{"--low":"0%","--high":"100%"},[t,r,n,i,P]),F=Object(o.useCallback)(e=>{if(w||!P||!y.current||!j.current)return;const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=y.current.offsetWidth,o=+y.current.value,a=j.current.offsetWidth,c=+j.current.value,s=n*(o/i),u=a*(c/i);Math.abs(r-s)>Math.abs(r-u)?(y.current.style.zIndex="20",j.current.style.zIndex="21"):(y.current.style.zIndex="21",j.current.style.zIndex="20")},[w,i,P]),C=Object(o.useCallback)(e=>{const o=e.target.classList.contains("wc-block-price-filter__range-input--min"),c=+e.target.value,s=o?[Math.round(c/_)*_,r]:[t,Math.round(c/_)*_],u=m(s,n,i,_,o);a(u)},[a,t,r,n,i,_]),A=Object(o.useCallback)(e=>{if(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))return;const t=e.target.classList.contains("wc-block-price-filter__amount--min");if(S>=E){const e=m([0,E],null,null,_,t);return a([parseInt(e[0],10),parseInt(e[1],10)])}const r=m([S,E],null,null,_,t);a(r)},[a,_,S,E]),R=l()("wc-block-price-filter","wc-block-components-price-slider",h&&"wc-block-price-filter--has-input-fields",h&&"wc-block-components-price-slider--has-input-fields",v&&"wc-block-price-filter--has-filter-button",v&&"wc-block-components-price-slider--has-filter-button",w&&"is-loading",!P&&"is-disabled"),T=Object(f.a)(y.current)?y.current.ownerDocument.activeElement:void 0,M=T&&T===y.current?_:1,U=T&&T===j.current?_:1,B=String(S/10**u.minorUnit),D=String(E/10**u.minorUnit);return Object(o.createElement)("div",{className:R},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:F,onFocus:F},P&&Object(o.createElement)("div",{"aria-hidden":h},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:N}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":Object(s.__)("Filter products by minimum price","woo-gutenberg-products-block"),"aria-valuetext":B,value:Number.isFinite(t)?t:n,onChange:C,step:M,min:n,max:i,ref:y,disabled:w,tabIndex:h?-1:0}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":Object(s.__)("Filter products by maximum price","woo-gutenberg-products-block"),"aria-valuetext":D,value:Number.isFinite(r)?r:i,onChange:C,step:U,min:n,max:i,ref:j,disabled:w,tabIndex:h?-1:0}))),Object(o.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},h&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--min wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--min","aria-label":Object(s.__)("Filter products by minimum price","woo-gutenberg-products-block"),allowNegative:!1,isAllowed:g({minConstraint:n,minorUnit:u.minorUnit,currentMaxValue:E}),onValueChange:e=>{e!==S&&x(e)},onBlur:A,disabled:w||!P,value:S}),Object(o.createElement)(p.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--max wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--max","aria-label":Object(s.__)("Filter products by maximum price","woo-gutenberg-products-block"),isAllowed:b({maxConstraint:i,minorUnit:u.minorUnit}),onValueChange:e=>{e!==E&&k(e)},onBlur:A,disabled:w||!P,value:E})),!h&&!w&&Number.isFinite(t)&&Number.isFinite(r)&&Object(o.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(s.__)("Price","woo-gutenberg-products-block"),":  ",Object(o.createElement)(p.a,{currency:u,value:t})," – ",Object(o.createElement)(p.a,{currency:u,value:r})),v&&Object(o.createElement)(d.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:w||!P,onClick:O,screenReaderLabel:Object(s.__)("Apply price filter","woo-gutenberg-products-block")})))},v=r(50),w=r(41),O=r(2),y=r(15),j=r(118),_=r(52);const S=(e,t,r)=>{const n=10*10**t;let o=null;const a=parseFloat(e);isNaN(a)||("ROUND_UP"===r?o=Math.ceil(a/n)*n:"ROUND_DOWN"===r&&(o=Math.floor(a/n)*n));const c=Object(i.a)(o,Number.isFinite);return Number.isFinite(o)?o:c};var x=r(98);function E(e,t){return Number(e)*10**t}r(216);var k=r(149);const P={heading:{type:"string",default:Object(s.__)("Filter by price","woo-gutenberg-products-block")}};Object(n.a)({selector:".wp-block-woocommerce-price-filter",Block:e=>{let{attributes:t,isEditor:r=!1}=e;const n=Object(O.getSettingWithCoercion)("has_filterable_products",!1,j.a),s=Object(O.getSettingWithCoercion)("is_rendering_php_template",!1,j.a),[u,l]=Object(o.useState)(!1),p=Object(x.c)("min_price"),m=Object(x.c)("max_price"),[d]=Object(a.a)(),{results:b,isLoading:g}=Object(c.a)({queryPrices:!0,queryState:d}),k=Object(w.getCurrencyFromPriceResponse)(Object(f.b)(b,"price_range")?b.price_range:void 0),[P,N]=Object(a.b)("min_price",E(p,k.minorUnit)||null),[F,C]=Object(a.b)("max_price",E(m,k.minorUnit)||null),[A,R]=Object(o.useState)(E(p,k.minorUnit)||null),[T,M]=Object(o.useState)(E(m,k.minorUnit)||null),{minConstraint:U,maxConstraint:B}=(e=>{let{minPrice:t,maxPrice:r,minorUnit:n}=e;return{minConstraint:S(t||"",n,"ROUND_DOWN"),maxConstraint:S(r||"",n,"ROUND_UP")}})({minPrice:Object(f.b)(b,"price_range")&&Object(f.b)(b.price_range,"min_price")&&Object(_.a)(b.price_range.min_price)?b.price_range.min_price:void 0,maxPrice:Object(f.b)(b,"price_range")&&Object(f.b)(b.price_range,"max_price")&&Object(_.a)(b.price_range.max_price)?b.price_range.max_price:void 0,minorUnit:k.minorUnit});Object(o.useEffect)(()=>{!u&&s&&(N(E(p,k.minorUnit)),C(E(m,k.minorUnit)),l(!0))},[k.minorUnit,s,u,m,p,C,N]);const D=Object(o.useCallback)((e,t)=>{const r=t>=Number(B)?void 0:t,n=e<=Number(U)?void 0:e;if(s&&window){const e=function(e,t){const r={};for(const[e,n]of Object.entries(t))n?r[e]=n.toString():delete r[e];const n=Object(y.removeQueryArgs)(e,...Object.keys(t));return Object(y.addQueryArgs)(n,r)}(window.location.href,{min_price:n/10**k.minorUnit,max_price:r/10**k.minorUnit});window.location.href!==e&&(window.location.href=e)}else N(n),C(r)},[U,B,N,C,s,k.minorUnit]),V=Object(v.a)(D,500),I=Object(o.useCallback)(e=>{e[0]!==A&&R(e[0]),e[1]!==T&&M(e[1]),s&&u&&!t.showFilterButton&&V(e[0],e[1])},[A,T,R,M,s,u,V,t.showFilterButton]);Object(o.useEffect)(()=>{t.showFilterButton||s||V(A,T)},[A,T,t.showFilterButton,V,s]);const L=Object(i.a)(P),q=Object(i.a)(F),G=Object(i.a)(U),K=Object(i.a)(B);if(Object(o.useEffect)(()=>{(!Number.isFinite(A)||P!==L&&P!==A||U!==G&&U!==A)&&R(Number.isFinite(P)?P:U),(!Number.isFinite(T)||F!==q&&F!==T||B!==K&&B!==T)&&M(Number.isFinite(F)?F:B)},[A,T,P,F,U,B,G,K,L,q]),!n)return null;if(!g&&(null===U||null===B||U===B))return null;const W="h"+t.headingLevel;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(W,{className:"wc-block-price-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-price-slider"},Object(o.createElement)(h,{minConstraint:U,maxConstraint:B,minPrice:A,maxPrice:T,currency:k,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:I,onSubmit:()=>D(A,T),isLoading:g})))},getProps:e=>({attributes:{showInputFields:"true"===e.dataset.showinputfields,showFilterButton:"true"===e.dataset.showfilterbutton,heading:e.dataset.heading||P.heading.default,headingLevel:e.dataset.headingLevel?parseInt(e.dataset.headingLevel,10):k.attributes.headingLevel.default},isEditor:!1})})},25:function(e,t,r){"use strict";var n=r(0),o=r(5),i=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:a,wrapperProps:c={}}=e;const s=null!=r,u=null!=o;return!s&&u?(t=a||"span",c={...c,className:i()(c.className,"screen-reader-text")},Object(n.createElement)(t,c,o)):(t=a||n.Fragment,s&&u&&r!==o?Object(n.createElement)(t,c,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,c,r))}},26:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);const o=Object(n.createContext)("page"),i=()=>Object(n.useContext)(o);o.Provider},3:function(e,t){e.exports=window.React},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(13),i=r.n(o);function a(e){const t=Object(n.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},34:function(e,t){},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(6),o=r(8),i=r(0),a=r(13),c=r.n(a),s=r(32),u=r(60),l=r(26);const p=e=>{const t=Object(l.a)();e=e||t;const r=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(i.useCallback)(t=>{a(e,t)},[e,a])]},f=(e,t,r)=>{const a=Object(l.a)();r=r||a;const c=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(i.useCallback)(t=>{s(r,e,t)},[r,e,s])]},m=(e,t)=>{const r=Object(l.a)();t=t||r;const[n,o]=p(t),a=Object(s.a)(n),f=Object(s.a)(e),m=Object(u.a)(f),d=Object(i.useRef)(!1);return Object(i.useEffect)(()=>{c()(m,f)||(o(Object.assign({},a,f)),d.current=!0)},[a,f,m,o]),d.current?[n,o]:[e,o]}},4:function(e,t){e.exports=window.lodash},41:function(e,t){e.exports=window.wc.priceFormat},46:function(e,t,r){"use strict";r.d(t,"n",(function(){return i})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return c})),r.d(t,"m",(function(){return s})),r.d(t,"i",(function(){return u})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return p})),r.d(t,"j",(function(){return f})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return v}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",c=i.pluginUrl+"build/",s=i.buildPhase,u=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),d=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},5:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var c in n)r.call(n,c)&&n[c]&&e.push(c);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},50:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),a=Object(n.useRef)(0),c=Object(n.useRef)(null),s=Object(n.useRef)([]),u=Object(n.useRef)(),l=Object(n.useRef)(),p=Object(n.useRef)(e),f=Object(n.useRef)(!0);p.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var d=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,g="maxWait"in r,h=g?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return f.current=!0,function(){f.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=u.current;return s.current=u.current=null,a.current=e,l.current=p.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(c.current),c.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!f.current)return!1;var r=e-i.current,n=e-a.current;return!i.current||r>=t||r<0||g&&n>=h},v=function(t){return c.current=null,b&&s.current?e(t):(s.current=u.current=null,l.current)},w=function(){var e=Date.now();if(n(e))return v(e);if(f.current){var o=e-i.current,c=e-a.current,s=t-o,u=g?Math.min(s,h-c):s;r(w,u)}},O=function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];var b=Date.now(),h=n(b);if(s.current=p,u.current=o,i.current=b,h){if(!c.current&&f.current)return a.current=i.current,r(w,t),d?e(i.current):l.current;if(g)return r(w,t),e(i.current)}return c.current||r(w,t),l.current};return O.cancel=function(){c.current&&(m?cancelAnimationFrame(c.current):clearTimeout(c.current)),a.current=0,s.current=i.current=u.current=c.current=null},O.isPending=function(){return!!c.current},O.flush=function(){return c.current?v(Date.now()):l.current},O}),[d,g,t,h,b,m])}},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(12),o=r.n(n),i=r(0),a=r(16);const c=[".wp-block-woocommerce-cart"],s=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const s=n(e,r),u=c(e,r),l={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:c={},errorBoundaryProps:s={}}=e;Object(i.render)(Object(i.createElement)(a.a,s,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},c,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:l,errorBoundaryProps:u})})},u=e=>{const t=document.body.querySelectorAll(c.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},6:function(e,t){e.exports=window.wc.wcBlocksData},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},63:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(6),o=r(8),i=r(0),a=r(32),c=r(74);const s=e=>{const{namespace:t,resourceName:r,resourceValues:s=[],query:u={},shouldSelect:l=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const p=Object(i.useRef)({results:[],isLoading:!0}),f=Object(a.a)(u),m=Object(a.a)(s),d=Object(c.a)(),b=Object(o.useSelect)(e=>{if(!l)return null;const o=e(n.COLLECTIONS_STORE_KEY),i=[t,r,f,m],a=o.getCollectionError(...i);if(a){if(!(a instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");d(a)}return{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}},[t,r,m,f,l]);return null!==b&&(p.current=b),p.current}},74:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},76:function(e,t,r){"use strict";var n=r(0),o=r(1),i=r(5),a=r.n(i),c=r(25);r(107),t.a=e=>{let{className:t,disabled:r,label:
2
  /* translators: Submit button text for filters. */
3
  i=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:a()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:s},Object(n.createElement)(c.a,{label:i,screenReaderLabel:u}))}},8:function(e,t){e.exports=window.wp.data},98:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return a}));var n=r(15);const o="query_typ