Version Description
Download this release
Release Info
Developer | Kloon |
Plugin | WooCommerce |
Version | 3.7.0-rc.1 |
Comparing to | |
See all releases |
Code changes from version 3.7.0-beta.1 to 3.7.0-rc.1
- i18n/languages/woocommerce.pot +15 -15
- includes/class-wc-cart.php +1 -0
- includes/class-wc-tax.php +18 -0
- includes/tracks/events/class-wc-orders-tracking.php +4 -0
- includes/wc-template-functions.php +1 -1
- includes/wc-update-functions.php +1 -0
- packages/woocommerce-blocks/assets/js/blocks/featured-category/block.js +1 -1
- packages/woocommerce-blocks/build/blocks.js +1 -1
- packages/woocommerce-blocks/build/featured-category.js +1 -1
- packages/woocommerce-blocks/build/featured-product.js +1 -1
- packages/woocommerce-blocks/build/frontend.js +12 -1
- packages/woocommerce-blocks/build/handpicked-products.js +1 -1
- packages/woocommerce-blocks/build/packages.js +0 -1
- packages/woocommerce-blocks/build/product-best-sellers.js +1 -1
- packages/woocommerce-blocks/build/product-categories.js +1 -1
- packages/woocommerce-blocks/build/product-category.js +1 -1
- packages/woocommerce-blocks/build/product-new.js +1 -1
- packages/woocommerce-blocks/build/product-on-sale.js +1 -1
- packages/woocommerce-blocks/build/product-tag.js +1 -1
- packages/woocommerce-blocks/build/product-top-rated.js +1 -1
- packages/woocommerce-blocks/build/products-by-attribute.js +1 -1
- packages/woocommerce-blocks/build/vendors.js +2 -2
i18n/languages/woocommerce.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Â
# This file is distributed under the same license as the WooCommerce package.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce 3.7.0-
|
6 |
Â
"Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n"
|
7 |
-
"POT-Creation-Date: 2019-07-
|
8 |
Â
"MIME-Version: 1.0\n"
|
9 |
Â
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
Â
"Content-Transfer-Encoding: 8bit\n"
|
@@ -6486,7 +6486,7 @@ msgid "via %s"
|
|
6486 |
Â
msgstr ""
|
6487 |
Â
|
6488 |
Â
#: includes/abstracts/abstract-wc-order.php:1821
|
6489 |
-
#: includes/class-wc-cart.php:
|
6490 |
Â
msgid "Free!"
|
6491 |
Â
msgstr ""
|
6492 |
Â
|
@@ -10797,7 +10797,7 @@ msgstr ""
|
|
10797 |
Â
#: includes/admin/reports/class-wc-report-taxes-by-code.php:190
|
10798 |
Â
#: includes/admin/settings/class-wc-settings-tax.php:29
|
10799 |
Â
#: includes/class-wc-countries.php:403 includes/class-wc-order-item-tax.php:170
|
10800 |
-
#: includes/class-wc-tax.php:
|
10801 |
Â
msgid "Tax"
|
10802 |
Â
msgstr ""
|
10803 |
Â
|
@@ -17064,7 +17064,7 @@ msgid "%1$s was called with an invalid level \"%2$s\"."
|
|
17064 |
Â
msgstr ""
|
17065 |
Â
|
17066 |
Â
#: includes/class-wc-order-item-fee.php:131
|
17067 |
-
#: includes/class-wc-order-item-product.php:60 includes/class-wc-tax.php:
|
17068 |
Â
msgid "Invalid tax class"
|
17069 |
Â
msgstr ""
|
17070 |
Â
|
@@ -18098,19 +18098,19 @@ msgstr[1] ""
|
|
18098 |
Â
msgid "Everywhere"
|
18099 |
Â
msgstr ""
|
18100 |
Â
|
18101 |
-
#: includes/class-wc-tax.php:
|
18102 |
Â
msgid "Tax class requires a valid name"
|
18103 |
Â
msgstr ""
|
18104 |
Â
|
18105 |
-
#: includes/class-wc-tax.php:
|
18106 |
Â
msgid "Tax class already exists"
|
18107 |
Â
msgstr ""
|
18108 |
Â
|
18109 |
-
#: includes/class-wc-tax.php:
|
18110 |
Â
msgid "Tax class slug already exists"
|
18111 |
Â
msgstr ""
|
18112 |
Â
|
18113 |
-
#: includes/class-wc-tax.php:
|
18114 |
Â
msgid "Invalid field"
|
18115 |
Â
msgstr ""
|
18116 |
Â
|
@@ -22406,6 +22406,11 @@ msgstr ""
|
|
22406 |
Â
msgid "Reviews (%d)"
|
22407 |
Â
msgstr ""
|
22408 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
22409 |
Â
#: includes/wc-template-functions.php:2233
|
22410 |
Â
msgid "Place order"
|
22411 |
Â
msgstr ""
|
@@ -22756,7 +22761,7 @@ msgstr ""
|
|
22756 |
Â
msgid "Top rated products"
|
22757 |
Â
msgstr ""
|
22758 |
Â
|
22759 |
-
#: packages/woocommerce-blocks/src/BlockTypes/AbstractProductGrid.php:
|
22760 |
Â
#: templates/loop/sale-flash.php:27 templates/single-product/sale-flash.php:27
|
22761 |
Â
msgid "Sale!"
|
22762 |
Â
msgstr ""
|
@@ -27018,11 +27023,6 @@ msgstr ""
|
|
27018 |
Â
msgid "Cart totals"
|
27019 |
Â
msgstr ""
|
27020 |
Â
|
27021 |
-
#: templates/cart/cart-totals.php:30 templates/cart/cart-totals.php:31
|
27022 |
-
#: templates/checkout/review-order.php:56
|
27023 |
-
msgid "Subtotal"
|
27024 |
-
msgstr ""
|
27025 |
-
|
27026 |
Â
#: templates/cart/cart-totals.php:72
|
27027 |
Â
#. translators: %s location.
|
27028 |
Â
msgid "(estimated for %s)"
|
2 |
Â
# This file is distributed under the same license as the WooCommerce package.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce 3.7.0-rc.1\n"
|
6 |
Â
"Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n"
|
7 |
+
"POT-Creation-Date: 2019-07-29 11:49:15+00:00\n"
|
8 |
Â
"MIME-Version: 1.0\n"
|
9 |
Â
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
Â
"Content-Transfer-Encoding: 8bit\n"
|
6486 |
Â
msgstr ""
|
6487 |
Â
|
6488 |
Â
#: includes/abstracts/abstract-wc-order.php:1821
|
6489 |
+
#: includes/class-wc-cart.php:1409 includes/class-wc-product-grouped.php:120
|
6490 |
Â
msgid "Free!"
|
6491 |
Â
msgstr ""
|
6492 |
Â
|
10797 |
Â
#: includes/admin/reports/class-wc-report-taxes-by-code.php:190
|
10798 |
Â
#: includes/admin/settings/class-wc-settings-tax.php:29
|
10799 |
Â
#: includes/class-wc-countries.php:403 includes/class-wc-order-item-tax.php:170
|
10800 |
+
#: includes/class-wc-tax.php:954
|
10801 |
Â
msgid "Tax"
|
10802 |
Â
msgstr ""
|
10803 |
Â
|
17064 |
Â
msgstr ""
|
17065 |
Â
|
17066 |
Â
#: includes/class-wc-order-item-fee.php:131
|
17067 |
+
#: includes/class-wc-order-item-product.php:60 includes/class-wc-tax.php:889
|
17068 |
Â
msgid "Invalid tax class"
|
17069 |
Â
msgstr ""
|
17070 |
Â
|
18098 |
Â
msgid "Everywhere"
|
18099 |
Â
msgstr ""
|
18100 |
Â
|
18101 |
+
#: includes/class-wc-tax.php:797
|
18102 |
Â
msgid "Tax class requires a valid name"
|
18103 |
Â
msgstr ""
|
18104 |
Â
|
18105 |
+
#: includes/class-wc-tax.php:804
|
18106 |
Â
msgid "Tax class already exists"
|
18107 |
Â
msgstr ""
|
18108 |
Â
|
18109 |
+
#: includes/class-wc-tax.php:812
|
18110 |
Â
msgid "Tax class slug already exists"
|
18111 |
Â
msgstr ""
|
18112 |
Â
|
18113 |
+
#: includes/class-wc-tax.php:845 includes/class-wc-tax.php:883
|
18114 |
Â
msgid "Invalid field"
|
18115 |
Â
msgstr ""
|
18116 |
Â
|
22406 |
Â
msgid "Reviews (%d)"
|
22407 |
Â
msgstr ""
|
22408 |
Â
|
22409 |
+
#: includes/wc-template-functions.php:2093 templates/cart/cart-totals.php:30
|
22410 |
+
#: templates/cart/cart-totals.php:31 templates/checkout/review-order.php:56
|
22411 |
+
msgid "Subtotal"
|
22412 |
+
msgstr ""
|
22413 |
+
|
22414 |
Â
#: includes/wc-template-functions.php:2233
|
22415 |
Â
msgid "Place order"
|
22416 |
Â
msgstr ""
|
22761 |
Â
msgid "Top rated products"
|
22762 |
Â
msgstr ""
|
22763 |
Â
|
22764 |
+
#: packages/woocommerce-blocks/src/BlockTypes/AbstractProductGrid.php:435
|
22765 |
Â
#: templates/loop/sale-flash.php:27 templates/single-product/sale-flash.php:27
|
22766 |
Â
msgid "Sale!"
|
22767 |
Â
msgstr ""
|
27023 |
Â
msgid "Cart totals"
|
27024 |
Â
msgstr ""
|
27025 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
27026 |
Â
#: templates/cart/cart-totals.php:72
|
27027 |
Â
#. translators: %s location.
|
27028 |
Â
msgid "(estimated for %s)"
|
includes/class-wc-cart.php
CHANGED
@@ -1172,6 +1172,7 @@ class WC_Cart extends WC_Legacy_Cart {
|
|
1172 |
Â
*/
|
1173 |
Â
public function set_quantity( $cart_item_key, $quantity = 1, $refresh_totals = true ) {
|
1174 |
Â
if ( 0 === $quantity || $quantity < 0 ) {
|
Â
|
|
1175 |
Â
// If we're setting qty to 0 we're removing the item from the cart.
|
1176 |
Â
return $this->remove_cart_item( $cart_item_key );
|
1177 |
Â
}
|
1172 |
Â
*/
|
1173 |
Â
public function set_quantity( $cart_item_key, $quantity = 1, $refresh_totals = true ) {
|
1174 |
Â
if ( 0 === $quantity || $quantity < 0 ) {
|
1175 |
+
wc_do_deprecated_action( 'woocommerce_before_cart_item_quantity_zero', array( $cart_item_key, $this ), '3.7.0', 'woocommerce_remove_cart_item' );
|
1176 |
Â
// If we're setting qty to 0 we're removing the item from the cart.
|
1177 |
Â
return $this->remove_cart_item( $cart_item_key );
|
1178 |
Â
}
|
includes/class-wc-tax.php
CHANGED
@@ -36,6 +36,24 @@ class WC_Tax {
|
|
36 |
Â
self::$round_at_subtotal = 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' );
|
37 |
Â
}
|
38 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
39 |
Â
/**
|
40 |
Â
* Calculate tax for a line.
|
41 |
Â
*
|
36 |
Â
self::$round_at_subtotal = 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' );
|
37 |
Â
}
|
38 |
Â
|
39 |
+
/**
|
40 |
+
* When the woocommerce_tax_classes option is changed, remove any orphan rates.
|
41 |
+
*
|
42 |
+
* @deprecated 3.7.0
|
43 |
+
* @param string $old_value Old rates value.
|
44 |
+
* @param string $value New rates value.
|
45 |
+
*/
|
46 |
+
public static function maybe_remove_tax_class_rates( $old_value, $value ) {
|
47 |
+
wc_deprecated_function( 'WC_Tax::maybe_remove_tax_class_rates', '3.7', 'WC_Tax::delete_tax_class_by' );
|
48 |
+
|
49 |
+
$tax_classes = array_filter( array_map( 'trim', explode( "\n", $value ) ) );
|
50 |
+
$existing_tax_classes = self::get_tax_classes();
|
51 |
+
$removed = array_diff( $existing_tax_classes, $tax_classes );
|
52 |
+
foreach ( $removed as $name ) {
|
53 |
+
self::delete_tax_class_by( 'name', $name );
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
Â
/**
|
58 |
Â
* Calculate tax for a line.
|
59 |
Â
*
|
includes/tracks/events/class-wc-orders-tracking.php
CHANGED
@@ -73,6 +73,10 @@ class WC_Orders_Tracking {
|
|
73 |
Â
return;
|
74 |
Â
}
|
75 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
76 |
Â
$order = wc_get_order( $id );
|
77 |
Â
$date_created = $order->get_date_created()->date( 'Y-m-d H:i:s' );
|
78 |
Â
// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification
|
73 |
Â
return;
|
74 |
Â
}
|
75 |
Â
|
76 |
+
if ( 'auto-draft' === get_post_status( $id ) ) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
Â
$order = wc_get_order( $id );
|
81 |
Â
$date_created = $order->get_date_created()->date( 'Y-m-d H:i:s' );
|
82 |
Â
// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification
|
includes/wc-template-functions.php
CHANGED
@@ -2090,7 +2090,7 @@ if ( ! function_exists( 'woocommerce_widget_shopping_cart_subtotal' ) ) {
|
|
2090 |
Â
* @since 3.7.0
|
2091 |
Â
*/
|
2092 |
Â
function woocommerce_widget_shopping_cart_subtotal() {
|
2093 |
-
echo '<strong>' .
|
2094 |
Â
}
|
2095 |
Â
}
|
2096 |
Â
|
2090 |
Â
* @since 3.7.0
|
2091 |
Â
*/
|
2092 |
Â
function woocommerce_widget_shopping_cart_subtotal() {
|
2093 |
+
echo '<strong>' . esc_html__( 'Subtotal', 'woocommerce' ) . ':</strong> ' . WC()->cart->get_cart_subtotal(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
2094 |
Â
}
|
2095 |
Â
}
|
2096 |
Â
|
includes/wc-update-functions.php
CHANGED
@@ -1993,6 +1993,7 @@ function wc_update_370_tax_rate_classes() {
|
|
1993 |
Â
WC_Tax::create_tax_class( $class );
|
1994 |
Â
}
|
1995 |
Â
}
|
Â
|
|
1996 |
Â
}
|
1997 |
Â
|
1998 |
Â
/**
|
1993 |
Â
WC_Tax::create_tax_class( $class );
|
1994 |
Â
}
|
1995 |
Â
}
|
1996 |
+
delete_option( 'woocommerce_tax_classes' );
|
1997 |
Â
}
|
1998 |
Â
|
1999 |
Â
/**
|
packages/woocommerce-blocks/assets/js/blocks/featured-category/block.js
CHANGED
@@ -217,7 +217,7 @@ class FeaturedCategory extends Component {
|
|
217 |
Â
const id = value[ 0 ] ? value[ 0 ].id : 0;
|
218 |
Â
setAttributes( { categoryId: id, mediaId: 0, mediaSrc: '' } );
|
219 |
Â
} }
|
220 |
-
|
221 |
Â
/>
|
222 |
Â
<Button isDefault onClick={ onDone }>
|
223 |
Â
{ __( 'Done', 'woo-gutenberg-products-block' ) }
|
217 |
Â
const id = value[ 0 ] ? value[ 0 ].id : 0;
|
218 |
Â
setAttributes( { categoryId: id, mediaId: 0, mediaSrc: '' } );
|
219 |
Â
} }
|
220 |
+
isSingle
|
221 |
Â
/>
|
222 |
Â
<Button isDefault onClick={ onDone }>
|
223 |
Â
{ __( 'Done', 'woo-gutenberg-products-block' ) }
|
packages/woocommerce-blocks/build/blocks.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],h=0,f=[];h<l.length;h++)i=l[h],r[i]&&f.push(r[i][0]),r[i]=0;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);for(u&&u(t);f.length;)f.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var a=n[l];0!==r[a]&&(c=!1)}c&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var c={},r={
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],h=0,f=[];h<l.length;h++)i=l[h],r[i]&&f.push(r[i][0]),r[i]=0;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);for(u&&u(t);f.length;)f.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var a=n[l];0!==r[a]&&(c=!1)}c&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var c={},r={3:0},o=[];function i(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=c,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)i.d(n,c,function(t){return e[t]}.bind(null,c));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=a;return o.push([259,0,2,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},259:function(e,t,n){"use strict";n.r(t);var c=n(60),r=n.n(c),o=n(0),i=n(18),l=n(1),a=(n(263),n(266),n(27));Object(i.setCategories)([].concat(r()(Object(i.getCategories)().filter(function(e){return"woocommerce"!==e.slug})),[{slug:"woocommerce",title:Object(l.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(o.createElement)(a.g,null)}]))},263:function(e,t,n){var c=n(264);"string"==typeof c&&(c=[[e.i,c,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(38)(c,r);c.locals&&(e.exports=c.locals)},264:function(e,t,n){},27:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=n(6),f=n.n(h),m=n(4),p=n.n(m),v=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:f()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};v.propTypes={size:p.a.number,className:p.a.string};var w=v;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return w})},3:function(e,t){!function(){e.exports=this.wp.components}()}});
|
packages/woocommerce-blocks/build/featured-category.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],d=0,b=[];d<i.length;d++)a=i[d],c[a]&&b.push(c[a][0]),c[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);b.length;)b.shift()();return r.push.apply(r,s||[]),o()}function o(){for(var e,t=0;t<r.length;t++){for(var o=r[t],n=!0,i=1;i<o.length;i++){var l=o[i];0!==c[l]&&(n=!1)}n&&(r.splice(t--,1),e=a(a.s=o[0]))}return e}var n={},c={5:0},r=[];function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=n,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},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||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return r.push([548,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t,o){"use strict";var n=o(0),c=o(3),r=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=o(6),b=o.n(d),g=o(4),p=o.n(g),h=function(e){var t=e.size,o=void 0===t?20:t,r=e.className;return Object(n.createElement)(c.Icon,{className:b()("woo-icon",r),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};h.propTypes={size:p.a.number,className:p.a.string};var m=h;o.d(t,"a",function(){return r}),o.d(t,"b",function(){return a}),o.d(t,"c",function(){return i}),o.d(t,"d",function(){return l}),o.d(t,"e",function(){return s}),o.d(t,"f",function(){return u}),o.d(t,"g",function(){return m})},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},50:function(e,t,o){"use strict";var n=o(40),c=o.n(n),r=o(20),a=o.n(r),i=o(21),l=o.n(i),s=o(22),u=o.n(s),d=o(23),b=o.n(d),g=o(17),p=o.n(g),h=o(24),m=o.n(h),f=o(0),w=o(1),O=o(26),v=o(16),j=o.n(v),y=o(5),_=o(4),k=o.n(_),E=o(34),C=o(3),x=(o(98),function(e){function t(){var e;return a()(this,t),(e=u()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(p()(e)),e}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(O.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,n=e.depth,r=void 0===n?0:n,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===r&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(f.createElement)(E.b,c()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,n=this.props,c=n.onChange,r=n.onOperatorChange,a=n.operator,i=n.selected,l=n.isSingle,s={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(f.createElement)(f.Fragment,null,Object(f.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:c,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:l}),!!r&&Object(f.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(f.createElement)(C.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:r,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(f.Component));x.propTypes={onChange:k.a.func.isRequired,onOperatorChange:k.a.func,operator:k.a.oneOf(["all","any"]),selected:k.a.array.isRequired,isSingle:k.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},52:function(e,t){!function(){e.exports=this.wp.viewport}()},538:function(e,t,o){var n=o(539);"string"==typeof n&&(n=[[e.i,n,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};o(51)(n,c);n.locals&&(e.exports=n.locals)},539:function(e,t,o){},548:function(e,t,o){"use strict";o.r(t);var n=o(0),c=o(1),r=o(15),a=o(25),i=(o(536),o(538),o(20)),l=o.n(i),s=o(21),u=o.n(s),d=o(22),b=o.n(d),g=o(23),p=o.n(g),h=o(17),m=o.n(h),f=o(24),w=o.n(f),O=o(16),v=o.n(O),j=o(3),y=o(6),_=o.n(y),k=o(28),E=o(5),C=o(4),x=o.n(C),S=o(36),M=o(50),I=wc_product_block_data.min_height;function z(e){return Object(E.isObject)(e.image)?e.image.src:""}var P=function(e){function t(){var e;return l()(this,t),(e=b()(this,p()(t).apply(this,arguments))).state={category:!1,loaded:!1},e.debouncedGetCategory=Object(E.debounce)(e.getCategory.bind(m()(e)),200),e}return w()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.getCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.debouncedGetCategory()}},{key:"getCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?v()({path:"/wc/blocks/products/categories/".concat(t)}).then(function(t){e.setState({category:t,loaded:!0})}).catch(function(){e.setState({category:!1,loaded:!0})}):this.setState({category:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,a=e.overlayColor,i=e.setOverlayColor,l=t.mediaSrc||z(this.state.category),s=t.focalPoint,u=void 0===s?{x:.5,y:.5}:s;return Object(n.createElement)(r.InspectorControls,{key:"inspector"},Object(n.createElement)(j.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(j.ToggleControl,{label:Object(c.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return o({showDesc:!t.showDesc})}})),Object(n.createElement)(r.PanelColorSettings,{title:Object(c.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:a.color,onChange:i,label:Object(c.__)("Overlay Color","woo-gutenberg-products-block")}]},Object(n.createElement)(j.RangeControl,{label:Object(c.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return o({dimRatio:e})},min:0,max:100,step:10}),!!j.FocalPointPicker&&!!l&&Object(n.createElement)(j.FocalPointPicker,{label:Object(c.__)("Focal Point Picker"),url:l,value:u,onChange:function(e){return o({focalPoint:e})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,o=e.debouncedSpeak,r=e.setAttributes;return Object(n.createElement)(j.Placeholder,{icon:Object(n.createElement)(S.b,null),label:Object(c.__)("Featured Category","woo-gutenberg-products-block"),className:"wc-block-featured-category"},Object(c.__)("Visually highlight a product category and encourage prompt action","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-featured-category__selection"},Object(n.createElement)(M.a,{selected:[t.categoryId],onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({categoryId:t,mediaId:0,mediaSrc:""})},multiple:!1}),Object(n.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),o(Object(c.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,o=this,a=this.props,i=a.attributes,l=a.isSelected,s=a.overlayColor,u=a.setAttributes,d=i.className,b=i.contentAlign,g=i.dimRatio,p=i.editMode,h=i.focalPoint,m=i.height,f=i.showDesc,w=this.state,O=w.loaded,v=w.category,y=_()("wc-block-featured-category",{"is-selected":l,"is-loading":!v&&!O,"is-not-found":!v&&O,"has-background-dim":0!==g},0===(e=g)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==b&&"has-".concat(b,"-content"),d),k=i.mediaId||function(e){return Object(E.isObject)(e.image)?e.image.id:0}(v),C=i.mediaSrc||z(this.state.category),x=v?(t=C)?{backgroundImage:"url(".concat(t,")")}:{}:{};s.color&&(x.backgroundColor=s.color),h&&(x.backgroundPosition="".concat(100*h.x,"% ").concat(100*h.y,"%"));return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(r.BlockControls,null,Object(n.createElement)(r.AlignmentToolbar,{value:b,onChange:function(e){u({contentAlign:e})}}),Object(n.createElement)(r.MediaUploadCheck,null,Object(n.createElement)(j.Toolbar,null,Object(n.createElement)(r.MediaUpload,{onSelect:function(e){u({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:k,render:function(e){var t=e.open;return Object(n.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(c.__)("Edit media"),icon:"format-image",onClick:t,disabled:!o.state.category})}})))),!i.editMode&&this.getInspectorControls(),p?this.renderEditMode():Object(n.createElement)(n.Fragment,null,v?Object(n.createElement)(j.ResizableBox,{className:y,size:{height:m},minHeight:I,enable:{bottom:!0},onResizeStop:function(e,t,o){u({height:parseInt(o.style.height)})},style:x},Object(n.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:v.name}}),f&&Object(n.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:v.description}}),Object(n.createElement)("div",{className:"wc-block-featured-category__link"},Object(n.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(c.__)("Shop now","woo-gutenberg-products-block"),url:v.permalink,align:"center"}]],templateLock:"all"})))):Object(n.createElement)(j.Placeholder,{className:"wc-block-featured-category",icon:Object(n.createElement)(S.b,null),label:Object(c.__)("Featured Category","woo-gutenberg-products-block")},O?Object(c.__)("No product category is selected.","woo-gutenberg-products-block"):Object(n.createElement)(j.Spinner,null))))}}]),t}(n.Component);P.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var B=Object(k.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(P);Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(c.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(S.b,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(c.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0}},edit:function(e){return Object(n.createElement)(B,e)},save:function(){return Object(n.createElement)(r.InnerBlocks.Content,null)}})},61:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],d=0,b=[];d<i.length;d++)a=i[d],c[a]&&b.push(c[a][0]),c[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);b.length;)b.shift()();return r.push.apply(r,s||[]),o()}function o(){for(var e,t=0;t<r.length;t++){for(var o=r[t],n=!0,i=1;i<o.length;i++){var l=o[i];0!==c[l]&&(n=!1)}n&&(r.splice(t--,1),e=a(a.s=o[0]))}return e}var n={},c={4:0},r=[];function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=n,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},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||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return r.push([520,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},27:function(e,t,o){"use strict";var n=o(0),c=o(3),r=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=o(6),b=o.n(d),g=o(4),p=o.n(g),h=function(e){var t=e.size,o=void 0===t?20:t,r=e.className;return Object(n.createElement)(c.Icon,{className:b()("woo-icon",r),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};h.propTypes={size:p.a.number,className:p.a.string};var m=h;o.d(t,"a",function(){return r}),o.d(t,"b",function(){return a}),o.d(t,"c",function(){return i}),o.d(t,"d",function(){return l}),o.d(t,"e",function(){return s}),o.d(t,"f",function(){return u}),o.d(t,"g",function(){return m})},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var n=o(29),c=o.n(n),r=o(13),a=o.n(r),i=o(14),l=o.n(i),s=o(15),u=o.n(s),d=o(16),b=o.n(d),g=o(12),p=o.n(g),h=o(17),m=o.n(h),f=o(0),w=o(1),O=o(19),v=o(10),j=o.n(v),y=o(5),_=o(4),k=o.n(_),E=o(24),C=o(3),x=(o(79),function(e){function t(){var e;return a()(this,t),(e=u()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(p()(e)),e}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(O.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,n=e.depth,r=void 0===n?0:n,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===r&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(f.createElement)(E.b,c()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,n=this.props,c=n.onChange,r=n.onOperatorChange,a=n.operator,i=n.selected,l=n.isSingle,s={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(f.createElement)(f.Fragment,null,Object(f.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:c,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:l}),!!r&&Object(f.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(f.createElement)(C.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:r,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(f.Component));x.propTypes={onChange:k.a.func.isRequired,onOperatorChange:k.a.func,operator:k.a.oneOf(["all","any"]),selected:k.a.array.isRequired,isSingle:k.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},510:function(e,t,o){var n=o(511);"string"==typeof n&&(n=[[e.i,n,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};o(38)(n,c);n.locals&&(e.exports=n.locals)},511:function(e,t,o){},52:function(e,t){!function(){e.exports=this.wp.date}()},520:function(e,t,o){"use strict";o.r(t);var n=o(0),c=o(1),r=o(9),a=o(18),i=(o(508),o(510),o(13)),l=o.n(i),s=o(14),u=o.n(s),d=o(15),b=o.n(d),g=o(16),p=o.n(g),h=o(12),m=o.n(h),f=o(17),w=o.n(f),O=o(10),v=o.n(O),j=o(3),y=o(6),_=o.n(y),k=o(22),E=o(5),C=o(4),x=o.n(C),S=o(27),M=o(37),I=wc_product_block_data.min_height;function z(e){return Object(E.isObject)(e.image)?e.image.src:""}var P=function(e){function t(){var e;return l()(this,t),(e=b()(this,p()(t).apply(this,arguments))).state={category:!1,loaded:!1},e.debouncedGetCategory=Object(E.debounce)(e.getCategory.bind(m()(e)),200),e}return w()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.getCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.debouncedGetCategory()}},{key:"getCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?v()({path:"/wc/blocks/products/categories/".concat(t)}).then(function(t){e.setState({category:t,loaded:!0})}).catch(function(){e.setState({category:!1,loaded:!0})}):this.setState({category:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,a=e.overlayColor,i=e.setOverlayColor,l=t.mediaSrc||z(this.state.category),s=t.focalPoint,u=void 0===s?{x:.5,y:.5}:s;return Object(n.createElement)(r.InspectorControls,{key:"inspector"},Object(n.createElement)(j.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(j.ToggleControl,{label:Object(c.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return o({showDesc:!t.showDesc})}})),Object(n.createElement)(r.PanelColorSettings,{title:Object(c.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:a.color,onChange:i,label:Object(c.__)("Overlay Color","woo-gutenberg-products-block")}]},Object(n.createElement)(j.RangeControl,{label:Object(c.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return o({dimRatio:e})},min:0,max:100,step:10}),!!j.FocalPointPicker&&!!l&&Object(n.createElement)(j.FocalPointPicker,{label:Object(c.__)("Focal Point Picker"),url:l,value:u,onChange:function(e){return o({focalPoint:e})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,o=e.debouncedSpeak,r=e.setAttributes;return Object(n.createElement)(j.Placeholder,{icon:Object(n.createElement)(S.b,null),label:Object(c.__)("Featured Category","woo-gutenberg-products-block"),className:"wc-block-featured-category"},Object(c.__)("Visually highlight a product category and encourage prompt action","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-featured-category__selection"},Object(n.createElement)(M.a,{selected:[t.categoryId],onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({categoryId:t,mediaId:0,mediaSrc:""})},isSingle:!0}),Object(n.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),o(Object(c.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,o=this,a=this.props,i=a.attributes,l=a.isSelected,s=a.overlayColor,u=a.setAttributes,d=i.className,b=i.contentAlign,g=i.dimRatio,p=i.editMode,h=i.focalPoint,m=i.height,f=i.showDesc,w=this.state,O=w.loaded,v=w.category,y=_()("wc-block-featured-category",{"is-selected":l,"is-loading":!v&&!O,"is-not-found":!v&&O,"has-background-dim":0!==g},0===(e=g)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==b&&"has-".concat(b,"-content"),d),k=i.mediaId||function(e){return Object(E.isObject)(e.image)?e.image.id:0}(v),C=i.mediaSrc||z(this.state.category),x=v?(t=C)?{backgroundImage:"url(".concat(t,")")}:{}:{};s.color&&(x.backgroundColor=s.color),h&&(x.backgroundPosition="".concat(100*h.x,"% ").concat(100*h.y,"%"));return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(r.BlockControls,null,Object(n.createElement)(r.AlignmentToolbar,{value:b,onChange:function(e){u({contentAlign:e})}}),Object(n.createElement)(r.MediaUploadCheck,null,Object(n.createElement)(j.Toolbar,null,Object(n.createElement)(r.MediaUpload,{onSelect:function(e){u({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:k,render:function(e){var t=e.open;return Object(n.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(c.__)("Edit media"),icon:"format-image",onClick:t,disabled:!o.state.category})}})))),!i.editMode&&this.getInspectorControls(),p?this.renderEditMode():Object(n.createElement)(n.Fragment,null,v?Object(n.createElement)(j.ResizableBox,{className:y,size:{height:m},minHeight:I,enable:{bottom:!0},onResizeStop:function(e,t,o){u({height:parseInt(o.style.height)})},style:x},Object(n.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:v.name}}),f&&Object(n.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:v.description}}),Object(n.createElement)("div",{className:"wc-block-featured-category__link"},Object(n.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(c.__)("Shop now","woo-gutenberg-products-block"),url:v.permalink,align:"center"}]],templateLock:"all"})))):Object(n.createElement)(j.Placeholder,{className:"wc-block-featured-category",icon:Object(n.createElement)(S.b,null),label:Object(c.__)("Featured Category","woo-gutenberg-products-block")},O?Object(c.__)("No product category is selected.","woo-gutenberg-products-block"):Object(n.createElement)(j.Spinner,null))))}}]),t}(n.Component);P.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var B=Object(k.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(P);Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(c.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(S.b,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(c.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0}},edit:function(e){return Object(n.createElement)(B,e)},save:function(){return Object(n.createElement)(r.InnerBlocks.Content,null)}})},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/featured-product.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var c,a,i=t[0],s=t[1],l=t[2],d=0,p=[];d<i.length;d++)a=i[d],o[a]&&p.push(o[a][0]),o[a]=0;for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&(e[c]=s[c]);for(u&&u(t);p.length;)p.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],c=!0,i=1;i<n.length;i++){var s=n[i];0!==o[s]&&(c=!1)}c&&(r.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},o={6:0},r=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var 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 u=s;return r.push([540,1,3,2,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t,n){"use strict";var c=n(0),o=n(3),r=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},l=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),p=n.n(d),b=n(4),h=n.n(b),m=function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(c.createElement)(o.Icon,{className:p()("woo-icon",r),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:h.a.number,className:h.a.string};var f=m;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return i}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return f})},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},52:function(e,t){!function(){e.exports=this.wp.viewport}()},528:function(e,t,n){var c=n(529);"string"==typeof c&&(c=[[e.i,c,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(51)(c,o);c.locals&&(e.exports=c.locals)},529:function(e,t,n){},540:function(e,t,n){"use strict";n.r(t);var c=n(0),o=n(1),r=n(15),a=n(25),i=(n(526),n(528),n(20)),s=n.n(i),l=n(21),u=n.n(l),d=n(22),p=n.n(d),b=n(23),h=n.n(b),m=n(17),f=n.n(m),g=n(24),v=n.n(g),w=n(16),O=n.n(w),j=n(3),_=n(6),k=n.n(_),y=n(28),E=n(5),S=n(4),x=n.n(S),C=n(70),P=n.n(C),M=n(40),I=n.n(M),z=n(111),L=n.n(z),N=n(14),B=n.n(N),R=n(26),T=n(34),H=n(56),A=n(36);n(530);function F(e,t){if(!t)return e;var n=new RegExp(Object(E.escapeRegExp)(t),"ig");return e.replace(n,"<strong>$&</strong>")}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(c.createElement)(A.d,null):Object(c.createElement)(A.e,null)},q=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(f()(e)),400),e.debouncedGetVariations=Object(E.debounce)(e.getVariations.bind(f()(e)),200),e.renderItem=e.renderItem.bind(f()(e)),e.onProductSelect=e.onProductSelect.bind(f()(e)),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(H.b)({selected:t}).then(function(t){t=t.map(function(e){var t=e.variations?e.variations.length:0;return B()({},e,{parent:0,count:t})}),e.setState({products:t,loading:!1})}).catch(function(){e.setState({products:[],loading:!1})})}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,n=t.product,c=t.variationsList;if(n){var o=this.state.products.find(function(e){return e.id===n});o.variations&&0!==o.variations.length&&(c[n]||this.setState({variationsLoading:!0}),O()({path:Object(R.addQueryArgs)("/wc/blocks/products/".concat(n,"/variations"),{per_page:-1})}).then(function(t){t=t.map(function(e){return B()({},e,{parent:n})}),e.setState(function(e){return{variationsList:B()({},e.variationsList,L()({},n,t)),variationsLoading:!1}})}).catch(function(){e.setState({termsLoading:!1})}))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(H.b)({selected:n,search:e}).then(function(e){t.setState({products:e,loading:!1})}).catch(function(){t.setState({products:[],loading:!1})})}},{key:"onProductSelect",value:function(e,t){var n=this;return function(){n.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,n=e.item,r=e.search,a=e.depth,i=void 0===a?0:a,s=e.isSelected,l=e.onSelect,u=this.state,d=u.product,p=u.variationsLoading,b=k()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(i),{"is-searching":r.length>0,"is-skip-level":0===i&&0!==n.parent,"is-variable":n.count>0}),h=Object.assign({},e);delete h.isSingle;var m={role:"menuitemradio"};return n.breadcrumbs.length&&(m["aria-label"]="".concat(n.breadcrumbs[0],": ").concat(n.name)),n.count&&(m["aria-expanded"]=n.id===d),n.breadcrumbs.length?(Object(E.isEmpty)(n.variation)||(n.name=n.variation),Object(c.createElement)(T.b,I()({className:b},e,m))):[Object(c.createElement)(j.MenuItem,I()({key:"product-".concat(n.id),isSelected:s},h,m,{className:b,onClick:function(){l(n)(),t.onProductSelect(n,s)()}}),Object(c.createElement)("span",{className:"woocommerce-search-list__item-state"},D(s)),Object(c.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(c.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:F(n.name,r)}})),n.count?Object(c.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(o.sprintf)(Object(o._n)("%d variation","%d variations",n.count,"woo-gutenberg-products-block"),n.count)):null),d===n.id&&n.count>0&&p&&Object(c.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(c.createElement)(j.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,n=e.loading,r=e.product,a=e.variationsList,i=this.props,s=i.onChange,l=i.selected,u=a[r]||[],d=[].concat(P()(t),P()(u)),p={list:Object(o.__)("Products","woo-gutenberg-products-block"),noItems:Object(o.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(o.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(o.__)("Product search results updated.","woo-gutenberg-products-block")},b=l?[Object(E.find)(d,{id:l})]:[];return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(T.a,{className:"woocommerce-products",list:d,isLoading:n,isSingle:!0,selected:b,onChange:s,onSearch:H.d?this.debouncedOnSearch:null,messages:p,renderItem:this.renderItem,isHierarchical:!0}))}}]),t}(c.Component);q.propTypes={onChange:x.a.func.isRequired,selected:x.a.number.isRequired};var V=q;function Q(e){var t=e.images,n=void 0===t?[]:t;return n.length&&n[0].src||""}var G=wc_product_block_data.min_height;var U=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={product:!1,loaded:!1},e.debouncedGetProduct=Object(E.debounce)(e.getProduct.bind(f()(e)),200),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.getProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.debouncedGetProduct()}},{key:"getProduct",value:function(){var e=this,t=this.props.attributes.productId;t?O()({path:"/wc/blocks/products/".concat(t)}).then(function(t){e.setState({product:t,loaded:!0})}).catch(function(){e.setState({product:!1,loaded:!0})}):this.setState({product:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,a=e.overlayColor,i=e.setOverlayColor,s=t.mediaSrc||Q(this.state.product),l=t.focalPoint,u=void 0===l?{x:.5,y:.5}:l;return Object(c.createElement)(r.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return n({showDesc:!t.showDesc})}}),Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show price","woo-gutenberg-products-block"),checked:t.showPrice,onChange:function(){return n({showPrice:!t.showPrice})}})),Object(c.createElement)(r.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:a.color,onChange:i,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},Object(c.createElement)(j.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10}),!!j.FocalPointPicker&&!!s&&Object(c.createElement)(j.FocalPointPicker,{label:Object(o.__)("Focal Point Picker"),url:s,value:u,onChange:function(e){return n({focalPoint:e})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(c.createElement)(j.Placeholder,{icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(o.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-product__selection"},Object(c.createElement)(V,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({productId:t,mediaId:0,mediaSrc:""})}}),Object(c.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,n,a,i=this,s=this.props,l=s.attributes,u=s.isSelected,d=s.overlayColor,p=s.setAttributes,b=l.className,h=l.contentAlign,m=l.dimRatio,f=l.editMode,g=l.focalPoint,v=l.height,w=l.showDesc,O=l.showPrice,_=this.state,y=_.loaded,S=_.product,x=k()("wc-block-featured-product",{"is-selected":u,"is-loading":!S&&!y,"is-not-found":!S&&y,"has-background-dim":0!==m},0===(e=m)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==h&&"has-".concat(h,"-content"),b),C=l.mediaId||(t=S.images,(n=void 0===t?[]:t).length&&n[0].id||0),P=S?(a=l.mediaSrc||S,Object(E.isObject)(a)&&(a=Q(a)),a?{backgroundImage:"url(".concat(a,")")}:{}):{};d.color&&(P.backgroundColor=d.color),g&&(P.backgroundPosition="".concat(100*g.x,"% ").concat(100*g.y,"%"));return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(r.BlockControls,null,Object(c.createElement)(r.AlignmentToolbar,{value:h,onChange:function(e){p({contentAlign:e})}}),Object(c.createElement)(r.MediaUploadCheck,null,Object(c.createElement)(j.Toolbar,null,Object(c.createElement)(r.MediaUpload,{onSelect:function(e){p({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:C,render:function(e){var t=e.open;return Object(c.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit media"),icon:"format-image",onClick:t,disabled:!i.state.product})}})))),!l.editMode&&this.getInspectorControls(),f?this.renderEditMode():Object(c.createElement)(c.Fragment,null,S?Object(c.createElement)(j.ResizableBox,{className:x,size:{height:v},minHeight:G,enable:{bottom:!0},onResizeStop:function(e,t,n){p({height:parseInt(n.style.height)})},style:P},Object(c.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:S.name}}),!Object(E.isEmpty)(S.variation)&&Object(c.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:S.variation}}),w&&Object(c.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:S.description}}),O&&Object(c.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:S.price_html}}),Object(c.createElement)("div",{className:"wc-block-featured-product__link"},Object(c.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:S.permalink,align:"center"}]],templateLock:"all"})))):Object(c.createElement)(j.Placeholder,{className:"wc-block-featured-product",icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block")},y?Object(o.__)("No product is selected.","woo-gutenberg-products-block"):Object(c.createElement)(j.Spinner,null))))}}]),t}(c.Component);U.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var W=Object(y.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(U);Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(o.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:"star-filled",foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(W,e)},save:function(){return Object(c.createElement)(r.InnerBlocks.Content,null)}})},56:function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"a",function(){return d});var c=n(26),o=n(16),r=n.n(o),a=n(5),i=wc_product_block_data.isLargeCatalog||!1,s=wc_product_block_data.limitTags||!1,l=wc_product_block_data.hasTags||!1,u=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products",{per_page:i?100:-1,catalog_visibility:"visible",status:"publish",search:o})];return i&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products/tags",{per_page:s?100:-1,orderby:s?"count":"name",order:s?"desc":"asc",search:o})];return s&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})}},61:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var c,a,i=t[0],s=t[1],l=t[2],d=0,p=[];d<i.length;d++)a=i[d],o[a]&&p.push(o[a][0]),o[a]=0;for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&(e[c]=s[c]);for(u&&u(t);p.length;)p.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],c=!0,i=1;i<n.length;i++){var s=n[i];0!==o[s]&&(c=!1)}c&&(r.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},o={5:0},r=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var 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 u=s;return r.push([513,0,2,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},27:function(e,t,n){"use strict";var c=n(0),o=n(3),r=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},l=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),p=n.n(d),b=n(4),h=n.n(b),m=function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(c.createElement)(o.Icon,{className:p()("woo-icon",r),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:h.a.number,className:h.a.string};var f=m;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return i}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return f})},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t){!function(){e.exports=this.ReactDOM}()},39:function(e,t){!function(){e.exports=this.wp.viewport}()},43:function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"a",function(){return d});var c=n(19),o=n(10),r=n.n(o),a=n(5),i=wc_product_block_data.isLargeCatalog||!1,s=wc_product_block_data.limitTags||!1,l=wc_product_block_data.hasTags||!1,u=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products",{per_page:i?100:-1,catalog_visibility:"visible",status:"publish",search:o})];return i&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products/tags",{per_page:s?100:-1,orderby:s?"count":"name",order:s?"desc":"asc",search:o})];return s&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})}},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},500:function(e,t,n){var c=n(501);"string"==typeof c&&(c=[[e.i,c,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(38)(c,o);c.locals&&(e.exports=c.locals)},501:function(e,t,n){},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},513:function(e,t,n){"use strict";n.r(t);var c=n(0),o=n(1),r=n(9),a=n(18),i=(n(498),n(500),n(13)),s=n.n(i),l=n(14),u=n.n(l),d=n(15),p=n.n(d),b=n(16),h=n.n(b),m=n(12),f=n.n(m),g=n(17),v=n.n(g),w=n(10),O=n.n(w),j=n(3),_=n(6),k=n.n(_),y=n(22),E=n(5),S=n(4),x=n.n(S),C=n(60),P=n.n(C),M=n(29),I=n.n(M),z=n(92),L=n.n(z),N=n(8),B=n.n(N),R=n(19),T=n(24),H=n(43),A=n(27);n(502);function F(e,t){if(!t)return e;var n=new RegExp(Object(E.escapeRegExp)(t),"ig");return e.replace(n,"<strong>$&</strong>")}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(c.createElement)(A.d,null):Object(c.createElement)(A.e,null)},q=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(f()(e)),400),e.debouncedGetVariations=Object(E.debounce)(e.getVariations.bind(f()(e)),200),e.renderItem=e.renderItem.bind(f()(e)),e.onProductSelect=e.onProductSelect.bind(f()(e)),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(H.b)({selected:t}).then(function(t){t=t.map(function(e){var t=e.variations?e.variations.length:0;return B()({},e,{parent:0,count:t})}),e.setState({products:t,loading:!1})}).catch(function(){e.setState({products:[],loading:!1})})}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,n=t.product,c=t.variationsList;if(n){var o=this.state.products.find(function(e){return e.id===n});o.variations&&0!==o.variations.length&&(c[n]||this.setState({variationsLoading:!0}),O()({path:Object(R.addQueryArgs)("/wc/blocks/products/".concat(n,"/variations"),{per_page:-1})}).then(function(t){t=t.map(function(e){return B()({},e,{parent:n})}),e.setState(function(e){return{variationsList:B()({},e.variationsList,L()({},n,t)),variationsLoading:!1}})}).catch(function(){e.setState({termsLoading:!1})}))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(H.b)({selected:n,search:e}).then(function(e){t.setState({products:e,loading:!1})}).catch(function(){t.setState({products:[],loading:!1})})}},{key:"onProductSelect",value:function(e,t){var n=this;return function(){n.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,n=e.item,r=e.search,a=e.depth,i=void 0===a?0:a,s=e.isSelected,l=e.onSelect,u=this.state,d=u.product,p=u.variationsLoading,b=k()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(i),{"is-searching":r.length>0,"is-skip-level":0===i&&0!==n.parent,"is-variable":n.count>0}),h=Object.assign({},e);delete h.isSingle;var m={role:"menuitemradio"};return n.breadcrumbs.length&&(m["aria-label"]="".concat(n.breadcrumbs[0],": ").concat(n.name)),n.count&&(m["aria-expanded"]=n.id===d),n.breadcrumbs.length?(Object(E.isEmpty)(n.variation)||(n.name=n.variation),Object(c.createElement)(T.b,I()({className:b},e,m))):[Object(c.createElement)(j.MenuItem,I()({key:"product-".concat(n.id),isSelected:s},h,m,{className:b,onClick:function(){l(n)(),t.onProductSelect(n,s)()}}),Object(c.createElement)("span",{className:"woocommerce-search-list__item-state"},D(s)),Object(c.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(c.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:F(n.name,r)}})),n.count?Object(c.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(o.sprintf)(Object(o._n)("%d variation","%d variations",n.count,"woo-gutenberg-products-block"),n.count)):null),d===n.id&&n.count>0&&p&&Object(c.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(c.createElement)(j.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,n=e.loading,r=e.product,a=e.variationsList,i=this.props,s=i.onChange,l=i.selected,u=a[r]||[],d=[].concat(P()(t),P()(u)),p={list:Object(o.__)("Products","woo-gutenberg-products-block"),noItems:Object(o.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(o.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(o.__)("Product search results updated.","woo-gutenberg-products-block")},b=l?[Object(E.find)(d,{id:l})]:[];return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(T.a,{className:"woocommerce-products",list:d,isLoading:n,isSingle:!0,selected:b,onChange:s,onSearch:H.d?this.debouncedOnSearch:null,messages:p,renderItem:this.renderItem,isHierarchical:!0}))}}]),t}(c.Component);q.propTypes={onChange:x.a.func.isRequired,selected:x.a.number.isRequired};var V=q;function Q(e){var t=e.images,n=void 0===t?[]:t;return n.length&&n[0].src||""}var G=wc_product_block_data.min_height;var U=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={product:!1,loaded:!1},e.debouncedGetProduct=Object(E.debounce)(e.getProduct.bind(f()(e)),200),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.getProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.debouncedGetProduct()}},{key:"getProduct",value:function(){var e=this,t=this.props.attributes.productId;t?O()({path:"/wc/blocks/products/".concat(t)}).then(function(t){e.setState({product:t,loaded:!0})}).catch(function(){e.setState({product:!1,loaded:!0})}):this.setState({product:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,a=e.overlayColor,i=e.setOverlayColor,s=t.mediaSrc||Q(this.state.product),l=t.focalPoint,u=void 0===l?{x:.5,y:.5}:l;return Object(c.createElement)(r.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return n({showDesc:!t.showDesc})}}),Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show price","woo-gutenberg-products-block"),checked:t.showPrice,onChange:function(){return n({showPrice:!t.showPrice})}})),Object(c.createElement)(r.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:a.color,onChange:i,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},Object(c.createElement)(j.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10}),!!j.FocalPointPicker&&!!s&&Object(c.createElement)(j.FocalPointPicker,{label:Object(o.__)("Focal Point Picker"),url:s,value:u,onChange:function(e){return n({focalPoint:e})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(c.createElement)(j.Placeholder,{icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(o.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-product__selection"},Object(c.createElement)(V,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({productId:t,mediaId:0,mediaSrc:""})}}),Object(c.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,n,a,i=this,s=this.props,l=s.attributes,u=s.isSelected,d=s.overlayColor,p=s.setAttributes,b=l.className,h=l.contentAlign,m=l.dimRatio,f=l.editMode,g=l.focalPoint,v=l.height,w=l.showDesc,O=l.showPrice,_=this.state,y=_.loaded,S=_.product,x=k()("wc-block-featured-product",{"is-selected":u,"is-loading":!S&&!y,"is-not-found":!S&&y,"has-background-dim":0!==m},0===(e=m)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==h&&"has-".concat(h,"-content"),b),C=l.mediaId||(t=S.images,(n=void 0===t?[]:t).length&&n[0].id||0),P=S?(a=l.mediaSrc||S,Object(E.isObject)(a)&&(a=Q(a)),a?{backgroundImage:"url(".concat(a,")")}:{}):{};d.color&&(P.backgroundColor=d.color),g&&(P.backgroundPosition="".concat(100*g.x,"% ").concat(100*g.y,"%"));return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(r.BlockControls,null,Object(c.createElement)(r.AlignmentToolbar,{value:h,onChange:function(e){p({contentAlign:e})}}),Object(c.createElement)(r.MediaUploadCheck,null,Object(c.createElement)(j.Toolbar,null,Object(c.createElement)(r.MediaUpload,{onSelect:function(e){p({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:C,render:function(e){var t=e.open;return Object(c.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit media"),icon:"format-image",onClick:t,disabled:!i.state.product})}})))),!l.editMode&&this.getInspectorControls(),f?this.renderEditMode():Object(c.createElement)(c.Fragment,null,S?Object(c.createElement)(j.ResizableBox,{className:x,size:{height:v},minHeight:G,enable:{bottom:!0},onResizeStop:function(e,t,n){p({height:parseInt(n.style.height)})},style:P},Object(c.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:S.name}}),!Object(E.isEmpty)(S.variation)&&Object(c.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:S.variation}}),w&&Object(c.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:S.description}}),O&&Object(c.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:S.price_html}}),Object(c.createElement)("div",{className:"wc-block-featured-product__link"},Object(c.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:S.permalink,align:"center"}]],templateLock:"all"})))):Object(c.createElement)(j.Placeholder,{className:"wc-block-featured-product",icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block")},y?Object(o.__)("No product is selected.","woo-gutenberg-products-block"):Object(c.createElement)(j.Spinner,null))))}}]),t}(c.Component);U.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var W=Object(y.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(U);Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(o.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:"star-filled",foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(W,e)},save:function(){return Object(c.createElement)(r.InnerBlocks.Content,null)}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/frontend.js
CHANGED
@@ -1 +1,12 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.frontend=function(e){function t(t){for(var r,i,a=t[0],l=t[1],s=t[2],h=0,d=[];h<a.length;h++)i=a[h],c[i]&&d.push(c[i][0]),c[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(u&&u(t);d.length;)d.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,a=1;a<n.length;a++){var l=n[a];0!==c[l]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={7:0},o=[];function i(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,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=a.push.bind(a);a.push=t,a=a.slice();for(var s=0;s<a.length;s++)t(a[s]);var u=l;return o.push([296,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},112:function(e,t,n){"use strict";var r=n(20),c=n.n(r),o=n(21),i=n.n(o),a=n(22),l=n.n(a),s=n(23),u=n.n(s),h=n(17),d=n.n(h),p=n(24),b=n.n(p),f=n(0),m=n(1),v=n(6),w=n.n(v),g=n(3),O=n(5),j=n(4),E=n.n(j),y=n(28),z=n(70),k=n.n(z),_=n(14),x=n.n(_);var M=n(36);function C(e){var t=e.hasEmpty,n=e.isHierarchical,r=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return n?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(O.groupBy)(e,"parent"),n=function e(n){return n.map(function(n){var r=t[n.term_id];return delete t[n.term_id],x()({},n,{children:r&&r.length?e(r):[]})})},r=n(t[0]||[]);return delete t[0],Object(O.forEach)(t,function(e){r.push.apply(r,k()(n(e||[])))}),r}(r):r}var N=function(e){function t(){var e;return c()(this,t),(e=l()(this,u()(t).apply(this,arguments))).select=Object(f.createRef)(),e.onNavigate=e.onNavigate.bind(d()(e)),e.renderList=e.renderList.bind(d()(e)),e.renderOptions=e.renderOptions.bind(d()(e)),e}return b()(t,e),i()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var r=wc_product_block_data.homeUrl;t||0!==n.indexOf(r)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props.isPreview,c=void 0!==r&&r,o=this.props.attributes.hasCount,i="parent-"+e[0].term_id;return Object(f.createElement)("ul",{key:i},e.map(function(e){var r=o?Object(f.createElement)("span",null,"(",e.count,")"):null;return[Object(f.createElement)("li",{key:e.term_id},Object(f.createElement)("a",{href:c?null:e.link},e.name)," ",r," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props.attributes.hasCount;return e.map(function(e){var c=r?"(".concat(e.count,")"):null;return[Object(f.createElement)("option",{key:e.term_id,value:e.link},Object(O.repeat)("–",n)," ",e.name," ",c),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.instanceId,r=t.className,c=t.isDropdown,o=C(t),i=w()("wc-block-product-categories",r,{"is-dropdown":c,"is-list":!c}),a="prod-categories-".concat(n);return Object(f.createElement)(f.Fragment,null,o.length>0?Object(f.createElement)("div",{className:i},c?Object(f.createElement)(f.Fragment,null,Object(f.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(f.createElement)("label",{className:"screen-reader-text",htmlFor:a},Object(m.__)("Select a category","woo-gutenberg-products-block")),Object(f.createElement)("select",{id:a,ref:this.select},Object(f.createElement)("option",{value:"false",hidden:!0},Object(m.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(o))),Object(f.createElement)(g.IconButton,{icon:"arrow-right-alt2",label:Object(m.__)("Go to category","woo-gutenberg-products-block"),onClick:this.onNavigate})):this.renderList(o)):Object(f.createElement)(g.Placeholder,{className:"wc-block-product-categories",icon:Object(f.createElement)(M.a,null),label:Object(m.__)("Product Categories List","woo-gutenberg-products-block")},Object(m.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))}}]),t}(f.Component);N.propTypes={attributes:E.a.object.isRequired,instanceId:E.a.number,isPreview:E.a.bool};t.a=Object(y.withInstanceId)(N)},28:function(e,t){!function(){e.exports=this.wp.compose}()},296:function(e,t,n){e.exports=n(297)},297:function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(5),o=n(112),i=document.querySelectorAll(".wp-block-woocommerce-product-categories");i.length&&Object(c.forEach)(i,function(e){var t=JSON.parse(JSON.stringify(e.dataset)),n={hasCount:"true"===t.hasCount,hasEmpty:"true"===t.hasEmpty,isDropdown:"true"===t.isDropdown,isHierarchical:"true"===t.isHierarchical};e.classList.remove("is-loading"),Object(r.render)(Object(r.createElement)(o.a,{attributes:n}),e)})},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t,n){"use strict";var r=n(0),c=n(3),o=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(r.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},a=function(){return Object(r.createElement)(c.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(r.createElement)(c.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=n(6),d=n.n(h),p=n(4),b=n.n(p),f=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(r.createElement)(c.Icon,{className:d()("woo-icon",o),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};f.propTypes={size:b.a.number,className:b.a.string};var m=f;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return m})},5:function(e,t){!function(){e.exports=this.lodash}()}});
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){e.exports=n(17)()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r;
|
2 |
+
/*!
|
3 |
+
Copyright (c) 2017 Jed Watson.
|
4 |
+
Licensed under the MIT License (MIT), see
|
5 |
+
http://jedwatson.github.io/classnames
|
6 |
+
*/
|
7 |
+
/*!
|
8 |
+
Copyright (c) 2017 Jed Watson.
|
9 |
+
Licensed under the MIT License (MIT), see
|
10 |
+
http://jedwatson.github.io/classnames
|
11 |
+
*/
|
12 |
+
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(15),o=n(5);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(16);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){var r=n(19),o=n(20),c=n(21);e.exports=function(e){return r(e)||o(e)||c()}},function(e,t,n){var r=n(22);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(18);function o(){}e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(2),c=n(7),i=n.n(c),a=n(8),u=n.n(a),l=n(9),s=n.n(l),p=n(10),f=n.n(p),b=n(5),d=n.n(b),h=n(11),y=n.n(h),m=n(4),v=n(6),O=n.n(v),g=n(1),j=n(3),w=n.n(j),_=n(12),x=n(13),E=n.n(x),S=n(14),k=n.n(S);var P=function(){return Object(r.createElement)(g.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},T=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(r.createElement)(g.Icon,{className:O()("woo-icon",o),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};T.propTypes={size:w.a.number,className:w.a.string};function C(e){var t=e.hasEmpty,n=e.isHierarchical,r=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return n?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(o.groupBy)(e,"parent"),n=function e(n){return n.map(function(n){var r=t[n.term_id];return delete t[n.term_id],k()({},n,{children:r&&r.length?e(r):[]})})},r=n(t[0]||[]);return delete t[0],Object(o.forEach)(t,function(e){r.push.apply(r,E()(n(e||[])))}),r}(r):r}var N=function(e){function t(){var e;return i()(this,t),(e=s()(this,f()(t).apply(this,arguments))).select=Object(r.createRef)(),e.onNavigate=e.onNavigate.bind(d()(e)),e.renderList=e.renderList.bind(d()(e)),e.renderOptions=e.renderOptions.bind(d()(e)),e}return y()(t,e),u()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var r=wc_product_block_data.homeUrl;t||0!==n.indexOf(r)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.props.isPreview,c=void 0!==o&&o,i=this.props.attributes.hasCount,a="parent-"+e[0].term_id;return Object(r.createElement)("ul",{key:a},e.map(function(e){var o=i?Object(r.createElement)("span",null,"(",e.count,")"):null;return[Object(r.createElement)("li",{key:e.term_id},Object(r.createElement)("a",{href:c?null:e.link},e.name)," ",o," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.attributes.hasCount;return e.map(function(e){var i=c?"(".concat(e.count,")"):null;return[Object(r.createElement)("option",{key:e.term_id,value:e.link},Object(o.repeat)("–",n)," ",e.name," ",i),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.instanceId,o=t.className,c=t.isDropdown,i=C(t),a=O()("wc-block-product-categories",o,{"is-dropdown":c,"is-list":!c}),u="prod-categories-".concat(n);return Object(r.createElement)(r.Fragment,null,i.length>0?Object(r.createElement)("div",{className:a},c?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(r.createElement)("label",{className:"screen-reader-text",htmlFor:u},Object(m.__)("Select a category","woo-gutenberg-products-block")),Object(r.createElement)("select",{id:u,ref:this.select},Object(r.createElement)("option",{value:"false",hidden:!0},Object(m.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(i))),Object(r.createElement)(g.IconButton,{icon:"arrow-right-alt2",label:Object(m.__)("Go to category","woo-gutenberg-products-block"),onClick:this.onNavigate})):this.renderList(i)):Object(r.createElement)(g.Placeholder,{className:"wc-block-product-categories",icon:Object(r.createElement)(P,null),label:Object(m.__)("Product Categories List","woo-gutenberg-products-block")},Object(m.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))}}]),t}(r.Component);N.propTypes={attributes:w.a.object.isRequired,instanceId:w.a.number,isPreview:w.a.bool};var z=Object(_.withInstanceId)(N),I=document.querySelectorAll(".wp-block-woocommerce-product-categories");I.length&&Object(o.forEach)(I,function(e){var t=JSON.parse(JSON.stringify(e.dataset)),n={hasCount:"true"===t.hasCount,hasEmpty:"true"===t.hasEmpty,isDropdown:"true"===t.isDropdown,isHierarchical:"true"===t.isHierarchical};e.classList.remove("is-loading"),Object(r.render)(Object(r.createElement)(z,{attributes:n}),e)})}]);
|
packages/woocommerce-blocks/build/handpicked-products.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var o,i,u=t[0],a=t[1],s=t[2],d=0,b=[];d<u.length;d++)i=u[d],c[i]&&b.push(c[i][0]),c[i]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(l&&l(t);b.length;)b.shift()();return r.push.apply(r,s||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],o=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(o=!1)}o&&(r.splice(t--,1),e=i(i.s=n[0]))}return e}var o={},c={8:0},r=[];function i(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var s=0;s<u.length;s++)t(u[s]);var l=a;return r.push([544,1,3,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},300:function(e,t,n){var o=n(301);"string"==typeof o&&(o=[[e.i,o,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};n(51)(o,c);o.locals&&(e.exports=o.locals)},301:function(e,t,n){},36:function(e,t,n){"use strict";var o=n(0),c=n(3),r=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(o.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},u=function(){return Object(o.createElement)(c.Icon,{className:"material-icon",icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(o.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},a=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},l=function(){return Object(o.createElement)(c.Icon,{className:"material-icon",icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(o.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),b=n.n(d),p=n(4),g=n.n(p),h=function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(o.createElement)(c.Icon,{className:b()("woo-icon",r),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(o.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(o.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};h.propTypes={size:g.a.number,className:g.a.string};var f=h;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return u}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return f})},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},42:function(e,t,n){"use strict";var o=n(14),c=n.n(o),r=n(0),i=n(1),u=n(4),a=n.n(u),s=n(3),l=function(e){var t=e.onChange,n=e.settings,o=n.button,u=n.price,a=n.rating,l=n.title;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(c()({},n,{title:!l}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:u?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(c()({},n,{price:!u}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(c()({},n,{rating:!a}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:o?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return t(c()({},n,{button:!o}))}}))};l.propTypes={settings:a.a.shape({button:a.a.bool.isRequired,price:a.a.bool.isRequired,rating:a.a.bool.isRequired,title:a.a.bool.isRequired}).isRequired,onChange:a.a.func.isRequired},t.a=l},47:function(e,t,n){"use strict";var o=n(0),c=n(6),r=n.n(c),i=n(63),u=n.n(i);n.d(t,"a",function(){return a});var a=function(e){return function(t){var n=t.attributes,c=n.align,i=n.contentVisibility,a=r()(c?"align".concat(c):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(o.createElement)(o.RawHTML,{className:a},function(e,t){var n=e.attributes,o=n.attributes,c=n.attrOperator,r=n.categories,i=n.catOperator,a=n.orderby,s=n.products,l=n.columns||wc_product_block_data.default_columns,d=n.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),r&&r.length&&(b.set("category",r.join(",")),i&&"all"===i&&b.set("cat_operator","AND")),o&&o.length&&(b.set("terms",o.map(function(e){return e.id}).join(",")),b.set("attribute",o[0].attr_slug),c&&"all"===c&&b.set("terms_operator","AND")),a&&("price_desc"===a?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===a?(b.set("orderby","price"),b.set("order","ASC")):"date"===a?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",a)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";b.set("ids",s.join(",")),b.set("limit",s.length);break;case"woocommerce/product-category":if(!r||!r.length)return"";break;case"woocommerce/products-by-attribute":if(!o||!o.length)return""}var p="[products",g=!0,h=!1,f=void 0;try{for(var m,w=b[Symbol.iterator]();!(g=(m=w.next()).done);g=!0){var _=u()(m.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){h=!0,f=e}finally{try{g||null==w.return||w.return()}finally{if(h)throw f}}return p+="]"}(t,e))}}},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},52:function(e,t){!function(){e.exports=this.wp.viewport}()},544:function(e,t,n){"use strict";n.r(t);var o=n(0),c=n(1),r=n(25),i=(n(300),n(20)),u=n.n(i),a=n(21),s=n.n(a),l=n(22),d=n.n(l),b=n(23),p=n.n(b),g=n(24),h=n.n(g),f=n(15),m=n(3),w=n(4),_=n.n(w),O=n(42),v=n(36),j=n(17),k=n.n(j),y=n(5),E=n(34),C=n(56),x=function(e){function t(){var e;return u()(this,t),(e=d()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(y.debounce)(e.onSearch.bind(k()(e)),400),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(C.b)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(C.b)({selected:n,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var e=this.state,t=e.list,n=e.loading,r=this.props,i=r.onChange,u=r.selected,a={clear:Object(c.__)("Clear all products","woo-gutenberg-products-block"),list:Object(c.__)("Products","woo-gutenberg-products-block"),noItems:Object(c.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(c.__)("Search for products to display","woo-gutenberg-products-block"),selected:function(e){return Object(c.sprintf)(Object(c._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e)},updated:Object(c.__)("Product search results updated.","woo-gutenberg-products-block")};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(E.a,{className:"woocommerce-products",list:t,isLoading:n,selected:u.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onSearch:C.d?this.debouncedOnSearch:null,onChange:i,messages:a}))}}]),t}(o.Component);x.propTypes={onChange:_.a.func.isRequired,selected:_.a.array.isRequired};var M=x,z=n(62),P=function(e){function t(){return u()(this,t),d()(this,p()(t).apply(this,arguments))}return h()(t,e),s()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.columns,i=t.contentVisibility,u=t.orderby,a=t.alignButtons;return Object(o.createElement)(f.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(m.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:r,onChange:function(e){return n({columns:e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(o.createElement)(m.ToggleControl,{label:Object(c.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(c.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return n({alignButtons:!a})}})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(O.a,{settings:i,onChange:function(e){return n({contentVisibility:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(z.a,{setAttributes:n,value:u})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(M,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({products:t})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(o.createElement)(m.Placeholder,{icon:Object(o.createElement)(v.f,null),label:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(c.__)("Display a selection of hand-picked products in a grid","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(o.createElement)(M,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});r({products:t})}}),Object(o.createElement)(m.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(c.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name,r=e.setAttributes,i=t.editMode;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(f.BlockControls,null,Object(o.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(c.__)("Edit"),onClick:function(){return r({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(o.createElement)(m.Disabled,null,Object(o.createElement)(f.ServerSideRender,{block:n,attributes:t})))}}]),t}(o.Component);P.propTypes={attributes:_.a.object.isRequired,name:_.a.string.isRequired,setAttributes:_.a.func.isRequired,debouncedSpeak:_.a.func.isRequired};var S=Object(m.withSpokenMessages)(P),B=n(47);Object(r.registerBlockType)("woocommerce/handpicked-products",{title:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(v.f,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},save:Object(B.a)("woocommerce/handpicked-products")}],edit:function(e){return Object(o.createElement)(S,e)},save:function(){return null}})},56:function(e,t,n){"use strict";n.d(t,"d",function(){return u}),n.d(t,"e",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"a",function(){return d});var o=n(26),c=n(16),r=n.n(c),i=n(5),u=wc_product_block_data.isLargeCatalog||!1,a=wc_product_block_data.limitTags||!1,s=wc_product_block_data.hasTags||!1,l=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products",{per_page:u?100:-1,catalog_visibility:"visible",status:"publish",search:c})];return u&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products/tags",{per_page:a?100:-1,orderby:a?"count":"name",order:a?"desc":"asc",search:c})];return a&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})}},61:function(e,t){!function(){e.exports=this.wp.hooks}()},62:function(e,t,n){"use strict";var o=n(0),c=n(1),r=n(3),i=n(4),u=n.n(i),a=function(e){var t=e.value,n=e.setAttributes;return Object(o.createElement)(r.SelectControl,{label:Object(c.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(c.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(c.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(c.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(c.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(c.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(c.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(c.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return n({orderby:e})}})};a.propTypes={setAttributes:u.a.func.isRequired,value:u.a.string.isRequired},t.a=a},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var o,i,u=t[0],a=t[1],s=t[2],d=0,b=[];d<u.length;d++)i=u[d],c[i]&&b.push(c[i][0]),c[i]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(l&&l(t);b.length;)b.shift()();return r.push.apply(r,s||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],o=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(o=!1)}o&&(r.splice(t--,1),e=i(i.s=n[0]))}return e}var o={},c={6:0},r=[];function i(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var s=0;s<u.length;s++)t(u[s]);var l=a;return r.push([515,0,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},27:function(e,t,n){"use strict";var o=n(0),c=n(3),r=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(o.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},u=function(){return Object(o.createElement)(c.Icon,{className:"material-icon",icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(o.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},a=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},l=function(){return Object(o.createElement)(c.Icon,{className:"material-icon",icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(o.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),b=n.n(d),p=n(4),g=n.n(p),h=function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(o.createElement)(c.Icon,{className:b()("woo-icon",r),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(o.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(o.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};h.propTypes={size:g.a.number,className:g.a.string};var f=h;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return u}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return f})},270:function(e,t,n){var o=n(271);"string"==typeof o&&(o=[[e.i,o,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};n(38)(o,c);o.locals&&(e.exports=o.locals)},271:function(e,t,n){},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},31:function(e,t,n){"use strict";var o=n(8),c=n.n(o),r=n(0),i=n(1),u=n(4),a=n.n(u),s=n(3),l=function(e){var t=e.onChange,n=e.settings,o=n.button,u=n.price,a=n.rating,l=n.title;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(c()({},n,{title:!l}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:u?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(c()({},n,{price:!u}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(c()({},n,{rating:!a}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:o?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return t(c()({},n,{button:!o}))}}))};l.propTypes={settings:a.a.shape({button:a.a.bool.isRequired,price:a.a.bool.isRequired,rating:a.a.bool.isRequired,title:a.a.bool.isRequired}).isRequired,onChange:a.a.func.isRequired},t.a=l},35:function(e,t,n){"use strict";var o=n(0),c=n(6),r=n.n(c),i=n(48),u=n.n(i);n.d(t,"a",function(){return a});var a=function(e){return function(t){var n=t.attributes,c=n.align,i=n.contentVisibility,a=r()(c?"align".concat(c):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(o.createElement)(o.RawHTML,{className:a},function(e,t){var n=e.attributes,o=n.attributes,c=n.attrOperator,r=n.categories,i=n.catOperator,a=n.orderby,s=n.products,l=n.columns||wc_product_block_data.default_columns,d=n.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),r&&r.length&&(b.set("category",r.join(",")),i&&"all"===i&&b.set("cat_operator","AND")),o&&o.length&&(b.set("terms",o.map(function(e){return e.id}).join(",")),b.set("attribute",o[0].attr_slug),c&&"all"===c&&b.set("terms_operator","AND")),a&&("price_desc"===a?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===a?(b.set("orderby","price"),b.set("order","ASC")):"date"===a?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",a)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";b.set("ids",s.join(",")),b.set("limit",s.length);break;case"woocommerce/product-category":if(!r||!r.length)return"";break;case"woocommerce/products-by-attribute":if(!o||!o.length)return""}var p="[products",g=!0,h=!1,f=void 0;try{for(var m,w=b[Symbol.iterator]();!(g=(m=w.next()).done);g=!0){var _=u()(m.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){h=!0,f=e}finally{try{g||null==w.return||w.return()}finally{if(h)throw f}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},39:function(e,t){!function(){e.exports=this.wp.viewport}()},43:function(e,t,n){"use strict";n.d(t,"d",function(){return u}),n.d(t,"e",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"a",function(){return d});var o=n(19),c=n(10),r=n.n(c),i=n(5),u=wc_product_block_data.isLargeCatalog||!1,a=wc_product_block_data.limitTags||!1,s=wc_product_block_data.hasTags||!1,l=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products",{per_page:u?100:-1,catalog_visibility:"visible",status:"publish",search:c})];return u&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products/tags",{per_page:a?100:-1,orderby:a?"count":"name",order:a?"desc":"asc",search:c})];return a&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})}},46:function(e,t){!function(){e.exports=this.wp.hooks}()},47:function(e,t,n){"use strict";var o=n(0),c=n(1),r=n(3),i=n(4),u=n.n(i),a=function(e){var t=e.value,n=e.setAttributes;return Object(o.createElement)(r.SelectControl,{label:Object(c.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(c.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(c.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(c.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(c.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(c.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(c.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(c.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return n({orderby:e})}})};a.propTypes={setAttributes:u.a.func.isRequired,value:u.a.string.isRequired},t.a=a},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},515:function(e,t,n){"use strict";n.r(t);var o=n(0),c=n(1),r=n(18),i=(n(270),n(13)),u=n.n(i),a=n(14),s=n.n(a),l=n(15),d=n.n(l),b=n(16),p=n.n(b),g=n(17),h=n.n(g),f=n(9),m=n(3),w=n(4),_=n.n(w),O=n(31),v=n(27),j=n(12),k=n.n(j),y=n(5),E=n(24),C=n(43),x=function(e){function t(){var e;return u()(this,t),(e=d()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(y.debounce)(e.onSearch.bind(k()(e)),400),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(C.b)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(C.b)({selected:n,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var e=this.state,t=e.list,n=e.loading,r=this.props,i=r.onChange,u=r.selected,a={clear:Object(c.__)("Clear all products","woo-gutenberg-products-block"),list:Object(c.__)("Products","woo-gutenberg-products-block"),noItems:Object(c.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(c.__)("Search for products to display","woo-gutenberg-products-block"),selected:function(e){return Object(c.sprintf)(Object(c._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e)},updated:Object(c.__)("Product search results updated.","woo-gutenberg-products-block")};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(E.a,{className:"woocommerce-products",list:t,isLoading:n,selected:u.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onSearch:C.d?this.debouncedOnSearch:null,onChange:i,messages:a}))}}]),t}(o.Component);x.propTypes={onChange:_.a.func.isRequired,selected:_.a.array.isRequired};var M=x,z=n(47),P=function(e){function t(){return u()(this,t),d()(this,p()(t).apply(this,arguments))}return h()(t,e),s()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.columns,i=t.contentVisibility,u=t.orderby,a=t.alignButtons;return Object(o.createElement)(f.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(m.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:r,onChange:function(e){return n({columns:e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(o.createElement)(m.ToggleControl,{label:Object(c.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(c.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return n({alignButtons:!a})}})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(O.a,{settings:i,onChange:function(e){return n({contentVisibility:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(z.a,{setAttributes:n,value:u})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(M,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({products:t})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(o.createElement)(m.Placeholder,{icon:Object(o.createElement)(v.f,null),label:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(c.__)("Display a selection of hand-picked products in a grid","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(o.createElement)(M,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});r({products:t})}}),Object(o.createElement)(m.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(c.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name,r=e.setAttributes,i=t.editMode;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(f.BlockControls,null,Object(o.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(c.__)("Edit"),onClick:function(){return r({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(o.createElement)(m.Disabled,null,Object(o.createElement)(f.ServerSideRender,{block:n,attributes:t})))}}]),t}(o.Component);P.propTypes={attributes:_.a.object.isRequired,name:_.a.string.isRequired,setAttributes:_.a.func.isRequired,debouncedSpeak:_.a.func.isRequired};var S=Object(m.withSpokenMessages)(P),B=n(35);Object(r.registerBlockType)("woocommerce/handpicked-products",{title:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(v.f,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},save:Object(B.a)("woocommerce/handpicked-products")}],edit:function(e){return Object(o.createElement)(S,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/packages.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{116:function(e,t,a){var r=a(117),n=a(138);e.exports=a(99)?function(e,t,a){return r.f(e,t,n(1,a))}:function(e,t,a){return e[t]=a,e}},117:function(e,t,a){var r=a(118),n=a(348),o=a(349),c=Object.defineProperty;t.f=a(99)?Object.defineProperty:function(e,t,a){if(r(e),t=o(t,!0),r(a),n)try{return c(e,t,a)}catch(e){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(e[t]=a.value),e}},118:function(e,t,a){var r=a(136);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},119:function(e,t){var a={}.hasOwnProperty;e.exports=function(e,t){return a.call(e,t)}},135:function(e,t,a){var r=a(88),n=a(89),o=a(116),c=a(192),i=a(194),s=function(e,t,a){var l,u,m,d,p=e&s.F,f=e&s.G,b=e&s.S,h=e&s.P,g=e&s.B,v=f?r:b?r[t]||(r[t]={}):(r[t]||{}).prototype,O=f?n:n[t]||(n[t]={}),y=O.prototype||(O.prototype={});for(l in f&&(a=t),a)m=((u=!p&&v&&void 0!==v[l])?v:a)[l],d=g&&u?i(m,r):h&&"function"==typeof m?i(Function.call,m):m,v&&c(v,l,m,e&s.U),O[l]!=m&&o(O,l,d),h&&y[l]!=m&&(y[l]=m)};r.core=n,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},136:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},137:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},138:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},139:function(e,t){var a=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++a+r).toString(36))}},140:function(e,t,a){var r=a(89),n=a(88),o=n["__core-js_shared__"]||(n["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:a(193)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},141:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},142:function(e,t){var a=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:a)(e)}},143:function(e,t,a){var r=a(140)("keys"),n=a(139);e.exports=function(e){return r[e]||(r[e]=n(e))}},144:function(e,t,a){var r=a(141);e.exports=function(e){return Object(r(e))}},145:function(e,t){e.exports={}},167:function(e,t,a){"use strict";var r=a(332),n=a(333),o=a(189);e.exports={formats:o,parse:n,stringify:r}},170:function(e,t,a){"use strict";var r=a(421),n=a(422),o=a(240);e.exports={formats:o,parse:n,stringify:r}},188:function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,n=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(a[r]=e[r]);return a};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce(function(e,a){return e[a]=t[a],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],a=[],r=0;r<t.length;++r)for(var o=t[r],c=o.obj[o.prop],i=Object.keys(c),s=0;s<i.length;++s){var l=i[s],u=c[l];"object"==typeof u&&null!==u&&-1===a.indexOf(u)&&(t.push({obj:c,prop:l}),a.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],o=0;o<a.length;++o)void 0!==a[o]&&r.push(a[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,a){var r=e.replace(/\+/g," ");if("iso-8859-1"===a)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,a){if(0===e.length)return e;var r="string"==typeof e?e:String(e);if("iso-8859-1"===a)return escape(r).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var n="",c=0;c<r.length;++c){var i=r.charCodeAt(c);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=r.charAt(c):i<128?n+=o[i]:i<2048?n+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?n+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(c+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(c)),n+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,a,o){if(!a)return t;if("object"!=typeof a){if(n(t))t.push(a);else{if(!t||"object"!=typeof t)return[t,a];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,a))&&(t[a]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(a);var i=t;return n(t)&&!n(a)&&(i=c(t,o)),n(t)&&n(a)?(a.forEach(function(a,n){if(r.call(t,n)){var c=t[n];c&&"object"==typeof c&&a&&"object"==typeof a?t[n]=e(c,a,o):t.push(a)}else t[n]=a}),t):Object.keys(a).reduce(function(t,n){var c=a[n];return r.call(t,n)?t[n]=e(t[n],c,o):t[n]=c,t},i)}}},189:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},190:function(e,t,a){a(347),e.exports=a(89).Object.assign},191:function(e,t,a){var r=a(136),n=a(88).document,o=r(n)&&r(n.createElement);e.exports=function(e){return o?n.createElement(e):{}}},192:function(e,t,a){var r=a(88),n=a(116),o=a(119),c=a(139)("src"),i=a(350),s=(""+i).split("toString");a(89).inspectSource=function(e){return i.call(e)},(e.exports=function(e,t,a,i){var l="function"==typeof a;l&&(o(a,"name")||n(a,"name",t)),e[t]!==a&&(l&&(o(a,c)||n(a,c,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=a:i?e[t]?e[t]=a:n(e,t,a):(delete e[t],n(e,t,a)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[c]||i.call(this)})},193:function(e,t){e.exports=!1},194:function(e,t,a){var r=a(351);e.exports=function(e,t,a){if(r(e),void 0===t)return e;switch(a){case 1:return function(a){return e.call(t,a)};case 2:return function(a,r){return e.call(t,a,r)};case 3:return function(a,r,n){return e.call(t,a,r,n)}}return function(){return e.apply(t,arguments)}}},195:function(e,t,a){var r=a(353),n=a(200);e.exports=Object.keys||function(e){return r(e,n)}},196:function(e,t,a){var r=a(197),n=a(141);e.exports=function(e){return r(n(e))}},197:function(e,t,a){var r=a(198);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},198:function(e,t){var a={}.toString;e.exports=function(e){return a.call(e).slice(8,-1)}},199:function(e,t,a){var r=a(142),n=Math.min;e.exports=function(e){return e>0?n(r(e),9007199254740991):0}},2:function(e,t,a){e.exports=a(326)()},200:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},201:function(e,t,a){a(358),a(366),e.exports=a(89).Array.from},202:function(e,t,a){var r=a(117).f,n=a(119),o=a(83)("toStringTag");e.exports=function(e,t,a){e&&!n(e=a?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},239:function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,n=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(a[r]=e[r]);return a};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce(function(e,a){return e[a]=t[a],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],a=[],r=0;r<t.length;++r)for(var o=t[r],c=o.obj[o.prop],i=Object.keys(c),s=0;s<i.length;++s){var l=i[s],u=c[l];"object"==typeof u&&null!==u&&-1===a.indexOf(u)&&(t.push({obj:c,prop:l}),a.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],o=0;o<a.length;++o)void 0!==a[o]&&r.push(a[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,a){var r=e.replace(/\+/g," ");if("iso-8859-1"===a)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,a){if(0===e.length)return e;var r="string"==typeof e?e:String(e);if("iso-8859-1"===a)return escape(r).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var n="",c=0;c<r.length;++c){var i=r.charCodeAt(c);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=r.charAt(c):i<128?n+=o[i]:i<2048?n+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?n+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(c+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(c)),n+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,a,o){if(!a)return t;if("object"!=typeof a){if(n(t))t.push(a);else{if(!t||"object"!=typeof t)return[t,a];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,a))&&(t[a]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(a);var i=t;return n(t)&&!n(a)&&(i=c(t,o)),n(t)&&n(a)?(a.forEach(function(a,n){if(r.call(t,n)){var c=t[n];c&&"object"==typeof c&&a&&"object"==typeof a?t[n]=e(c,a,o):t.push(a)}else t[n]=a}),t):Object.keys(a).reduce(function(t,n){var c=a[n];return r.call(t,n)?t[n]=e(t[n],c,o):t[n]=c,t},i)}}},240:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},326:function(e,t,a){"use strict";var r=a(327);function n(){}function o(){}o.resetWarningCache=n,e.exports=function(){function e(e,t,a,n,o,c){if(c!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:n};return a.PropTypes=a,a}},327:function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},332:function(e,t,a){"use strict";var r=a(188),n=a(189),o=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Array.isArray,s=Array.prototype.push,l=function(e,t){s.apply(e,i(t)?t:[t])},u=Date.prototype.toISOString,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:n.formatters[n.default],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,a,n,o,c,s,u,d,p,f,b,h,g){var v=t;if("function"==typeof u?v=u(a,v):v instanceof Date?v=f(v):"comma"===n&&i(v)&&(v=v.join(",")),null===v){if(o)return s&&!h?s(a,m.encoder,g):a;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||r.isBuffer(v))return s?[b(h?a:s(a,m.encoder,g))+"="+b(s(v,m.encoder,g))]:[b(a)+"="+b(String(v))];var O,y=[];if(void 0===v)return y;if(i(u))O=u;else{var j=Object.keys(v);O=d?j.sort(d):j}for(var w=0;w<O.length;++w){var _=O[w];c&&null===v[_]||(i(v)?l(y,e(v[_],"function"==typeof n?n(a,_):a,n,o,c,s,u,d,p,f,b,h,g)):l(y,e(v[_],a+(p?"."+_:"["+_+"]"),n,o,c,s,u,d,p,f,b,h,g)))}return y};e.exports=function(e,t){var a,r=e,s=function(e){if(!e)return m;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=n.default;if(void 0!==e.format){if(!o.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");a=e.format}var r=n.formatters[a],c=m.filter;return("function"==typeof e.filter||i(e.filter))&&(c=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:c,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof s.filter?r=(0,s.filter)("",r):i(s.filter)&&(a=s.filter);var u,p=[];if("object"!=typeof r||null===r)return"";u=t&&t.arrayFormat in c?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=c[u];a||(a=Object.keys(r)),s.sort&&a.sort(s.sort);for(var b=0;b<a.length;++b){var h=a[b];s.skipNulls&&null===r[h]||l(p,d(r[h],h,f,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.formatter,s.encodeValuesOnly,s.charset))}var g=p.join(s.delimiter),v=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),g.length>0?v+g:""}},333:function(e,t,a){"use strict";var r=a(188),n=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},i=function(e,t,a){if(e){var r=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,c=/(\[[^[\]]*])/.exec(r),i=c?r.slice(0,c.index):r,s=[];if(i){if(!a.plainObjects&&n.call(Object.prototype,i)&&!a.allowPrototypes)return;s.push(i)}for(var l=0;null!==(c=o.exec(r))&&l<a.depth;){if(l+=1,!a.plainObjects&&n.call(Object.prototype,c[1].slice(1,-1))&&!a.allowPrototypes)return;s.push(c[1])}return c&&s.push("["+r.slice(c.index)+"]"),function(e,t,a){for(var r=t,n=e.length-1;n>=0;--n){var o,c=e[n];if("[]"===c&&a.parseArrays)o=[].concat(r);else{o=a.plainObjects?Object.create(null):{};var i="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,s=parseInt(i,10);a.parseArrays||""!==i?!isNaN(s)&&c!==i&&String(s)===i&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(o=[])[s]=r:o[i]=r:o={0:r}}r=o}return r}(s,t,a)}};e.exports=function(e,t){var a=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth?e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return a.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var a,i={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,u=s.split(t.delimiter,l),m=-1,d=t.charset;if(t.charsetSentinel)for(a=0;a<u.length;++a)0===u[a].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[a]?d="utf-8":"utf8=%26%2310003%3B"===u[a]&&(d="iso-8859-1"),m=a,a=u.length);for(a=0;a<u.length;++a)if(a!==m){var p,f,b=u[a],h=b.indexOf("]="),g=-1===h?b.indexOf("="):h+1;-1===g?(p=t.decoder(b,o.decoder,d),f=t.strictNullHandling?null:""):(p=t.decoder(b.slice(0,g),o.decoder,d),f=t.decoder(b.slice(g+1),o.decoder,d)),f&&t.interpretNumericEntities&&"iso-8859-1"===d&&(f=c(f)),f&&t.comma&&f.indexOf(",")>-1&&(f=f.split(",")),n.call(i,p)?i[p]=r.combine(i[p],f):i[p]=f}return i}(e,a):e,l=a.plainObjects?Object.create(null):{},u=Object.keys(s),m=0;m<u.length;++m){var d=u[m],p=i(d,s[d],a);l=r.merge(l,p,a)}return r.compact(l)}},34:function(e,t,a){"use strict";a(302);var r,n=a(43),o=a(31),c=a(30),i=a(10),s=a(9),l=a(11),u=a(12),m=a(7),d=a(13),p=a(0),f=a(1),b=a(3),h=a(5),g=a(2),v=a.n(g),O=a(37),y=a.n(O),j=a(38),w=a.n(j),_=a(6),k=a.n(_),E=a(131),C=a(167),N=a(284);function S(){return r||(r=Object(N.a)()),r}function x(e,t){return Object(h.compact)(Object.keys(t).map(function(a){var r=t[a];if(r.rules){var n=Object(h.find)(r.rules,function(t){return e.hasOwnProperty(R(a,t.value))});if(n){var o=e[R(a,n.value)];return{key:a,rule:n.value,value:o}}return null}return e[a]?{key:a,value:e[a]}:null}))}function F(e,t){var a=e.input.defaultOption;if(e.input.defaultOption){var r=Object(h.find)(t,{value:a});return r?r.value:void console.warn("invalid defaultOption ".concat(a," supplied to ").concat(e.labels.add))}return Object(h.get)(t,[0,"value"])}function T(e,t,a){var r=x(t,a).reduce(function(e,t){return e[R(t.key,t.rule)]=void 0,e},{}),o=e.reduce(function(e,t){return"between"!==t.rule||Array.isArray(t.value)&&!t.value.some(function(e){return!e})?(t.value&&(e[R(t.key,t.rule)]=t.value),e):e},{});return Object(n.a)({},r,o)}function R(e,t){return t&&t.length?"".concat(e,"_").concat(t):e}var D=function(){return S().location.pathname},P=function(e){return Object(h.isEmpty)(e)?"":"?"+Object(C.stringify)(e)},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M();return Object(h.pick)(e,["period","compare","before","after","interval","type"])};function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(h.uniq)(e.split(",").map(function(e){return parseInt(e,10)}).filter(Boolean))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D(),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M(),r=P(Object(n.a)({},a,e));return"".concat(t).concat(r)}function M(){var e=S().location.search;return e.length&&Object(C.parse)(e.substring(1))||{}}function B(e){var t=L(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:D(),arguments.length>2&&void 0!==arguments[2]?arguments[2]:M());S().push(t)}var A=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.label,a=e.renderContent;if(!a)return null;return Object(p.createElement)("div",{className:"woocommerce-ellipsis-menu"},Object(p.createElement)(b.Dropdown,{contentClassName:"woocommerce-ellipsis-menu__popover",position:"bottom left",renderToggle:function(e){var a=e.onToggle,r=e.isOpen,n=k()("woocommerce-ellipsis-menu__toggle",{"is-opened":r});return Object(p.createElement)(b.IconButton,{className:n,onClick:a,icon:"ellipsis",title:t,"aria-expanded":r})},renderContent:function(e){return Object(p.createElement)(b.NavigableMenu,{className:"woocommerce-ellipsis-menu__content"},a(e))}}))}}]),t}(p.Component);A.propTypes={label:v.a.string.isRequired,renderContent:v.a.func};var V=A,K=a(48),H=Object(p.createContext)(2);function Y(e){return Object(p.createElement)(H.Consumer,null,function(t){var a="h"+Math.min(t,6);return Object(p.createElement)(a,e)})}function U(e){var t=e.component,a=e.children,r=Object(K.a)(e,["component","children"]),n=t||"div";return Object(p.createElement)(H.Consumer,null,function(e){return Object(p.createElement)(H.Provider,{value:e+1},!1===t?a:Object(p.createElement)(n,r,a))})}function z(e){return function(t,a,r){if(t[a])return t[a].type&&t[a].type===e?void 0:new Error("Invalid ".concat(a," passed to ").concat(r,". Must be ")+"`"+e.name+"`")}}U.propTypes={component:v.a.oneOfType([v.a.func,v.a.string,v.a.bool]),children:v.a.node};var Q=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.action,a=e.children,r=e.description,n=e.isInactive,o=e.menu,c=e.title,i=k()("woocommerce-card",this.props.className,{"has-menu":!!o,"has-action":!!t,"is-inactive":!!n});return Object(p.createElement)("div",{className:i},c&&Object(p.createElement)("div",{className:"woocommerce-card__header"},Object(p.createElement)("div",{className:"woocommerce-card__title-wrapper"},Object(p.createElement)(Y,{className:"woocommerce-card__title woocommerce-card__header-item"},c),r&&Object(p.createElement)(Y,{className:"woocommerce-card__description woocommerce-card__header-item"},r)),t&&Object(p.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},t),o&&Object(p.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},o)),Object(p.createElement)(U,{className:"woocommerce-card__body"},a))}}]),t}(p.Component);Q.propTypes={action:v.a.node,className:v.a.string,description:v.a.oneOfType([v.a.string,v.a.node]),isInactive:v.a.bool,menu:z(V),title:v.a.oneOfType([v.a.string,v.a.node])};var W=Q,$=a(32),G=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"wcAdminLinkHandler",value:function(e){e.preventDefault(),S().push(e.target.closest("a").getAttribute("href"))}},{key:"render",value:function(){var e,t=this.props,a=t.children,r=t.href,o=t.type,c=Object(K.a)(t,["children","href","type"]);e="wp-admin"===o?function(e){return wcSettings.adminUrl+e}(r):r;var i=Object(n.a)({},c,{"data-link-type":o});return"wc-admin"===o&&(i.onClick=this.wcAdminLinkHandler),Object(p.createElement)("a",Object($.a)({href:e},i),a)}}]),t}(p.Component);G.propTypes={href:v.a.string.isRequired,type:v.a.oneOf(["wp-admin","wc-admin","external"]).isRequired},G.defaultProps={type:"wc-admin"},G.contextTypes={router:v.a.object};var J=G;function X(e){var t="";return function e(a){if(Object(h.isString)(a)||Object(h.isNumber)(a))t+=a;else if(Object(h.isArray)(a))a.forEach(e);else if(a&&a.props){var r=a.props.children;Object(h.isArray)(r)?r.forEach(e):e(r)}}(e),t}var Z=function(e){function t(e){var a,r=e.filter,n=e.config,o=e.onFilterChange;Object(i.a)(this,t),a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments));var c=n.input.options;return a.state={options:c},a.updateOptions=a.updateOptions.bind(Object(m.a)(a)),!c&&n.input.getOptions&&n.input.getOptions().then(a.updateOptions).then(function(e){if(!r.value){var t=F(n,e);o(r.key,"value",t)}}),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"updateOptions",value:function(e){return this.setState({options:e}),e}},{key:"getScreenReaderText",value:function(e,t){if(""===e.value)return"";var a=Object(h.find)(t.rules,{value:e.rule})||{},r=Object(h.find)(t.input.options,{value:e.value})||{};return X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,r.label),rule:Object(p.createElement)(p.Fragment,null,a.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,o=e.isEnglish,c=this.state.options,i=r.key,s=r.rule,l=r.value,u=a.labels,m=a.rules,d=w()({mixedString:u.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:m,value:s,onChange:Object(h.partial)(n,i,"rule"),"aria-label":u.rule}),filter:c?Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__input"),options:c,value:l,onChange:Object(h.partial)(n,r.key,"value"),"aria-label":u.filter}):Object(p.createElement)(b.Spinner,null)}}),f=this.getScreenReaderText(r,a);return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),f&&Object(p.createElement)("span",{className:"screen-reader-text"},f))}}]),t}(p.Component);Z.propTypes={config:v.a.shape({labels:v.a.shape({rule:v.a.string,title:v.a.string,filter:v.a.string}),rules:v.a.arrayOf(v.a.object),input:v.a.object}).isRequired,filter:v.a.shape({key:v.a.string,rule:v.a.string,value:v.a.string}).isRequired,onFilterChange:v.a.func.isRequired};var ee=Z,te=a(28),ae=a(39);function re(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,n=[],c=0;c<t.length;c++){var i=t[c];if(!a.includes(i.value.id)){var s=i.keywords,l=void 0===s?[]:s;if("string"==typeof i.label&&(l=[].concat(Object(o.a)(l),[i.label])),l.some(function(t){return e.test(t)})&&(n.push(i),n.length===r))break}}return n}var ne=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(m.a)(e)),e.select=e.select.bind(Object(m.a)(e)),e.reset=e.reset.bind(Object(m.a)(e)),e.search=e.search.bind(Object(m.a)(e)),e.handleKeyDown=e.handleKeyDown.bind(Object(m.a)(e)),e.debouncedLoadOptions=Object(h.debounce)(e.loadOptions,400),e.state=e.constructor.getInitialState(),e}return Object(d.a)(t,e),Object(s.a)(t,null,[{key:"getInitialState",value:function(){return{search:/./,selectedIndex:0,query:void 0,filteredOptions:[]}}}]),Object(s.a)(t,[{key:"bindNode",value:function(e){this.node=e}},{key:"select",value:function(e){var t=this.props,a=t.onSelect,r=t.completer.getOptionCompletion,n=this.state.query;if(!e.isDisabled){if(r)a(r(e.value,n));this.reset()}}},{key:"reset",value:function(){!!this.node&&this.setState(this.constructor.getInitialState())}},{key:"handleFocusOutside",value:function(){this.reset()}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(f.sprintf)(Object(f._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"woocommerce-admin"),e.length),"assertive"):t(Object(f.__)("No results.","woocommerce-admin"),"assertive"))}},{key:"loadOptions",value:function(e,t){var a=this,r=e.options;if(t)var n=this.activePromise=Promise.resolve("function"==typeof r?r(t):r).then(function(r){if(r&&a.state.query){var o=a.props.selected;if(n===a.activePromise){var c=r.map(function(a,r){return{key:r,value:a,label:e.getOptionLabel(a,t),keywords:e.getOptionKeywords?e.getOptionKeywords(a):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(a)}}),i=re(a.state.search,c,o),s=i.length===a.state.filteredOptions.length?a.state.selectedIndex:0;a.setState({options:c,filteredOptions:i,selectedIndex:s}),a.announce(i)}}});else this.setState({options:[],filteredOptions:[],selectedIndex:0})}},{key:"search",value:function(e){var t=this.state.query,a=this.props,r=a.completer,n=void 0===r?{}:r,o=a.selected,c=e.target.value.trim();n&&c!==t&&(n.isDebounced?this.debouncedLoadOptions(n,c):this.loadOptions(n,c));var i=void 0!==n.getSearchExpression?n.getSearchExpression(Object(h.escapeRegExp)(c)):Object(h.escapeRegExp)(c),s=i?new RegExp(i,"i"):/^$/,l=re(s,this.state.options,o);this.setState({selectedIndex:0,filteredOptions:l,search:s,query:c}),this.state.options&&this.announce(l)}},{key:"getOptions",value:function(){var e=this.props,t=e.allowFreeText,a=e.completer.getFreeTextOptions,r=this.state,n=r.filteredOptions,o=r.query;return(t&&a?a(o):[]).concat(n)}},{key:"handleKeyDown",value:function(e){var t=this.getOptions(),a=this.state.selectedIndex;if(0!==t.length){var r;switch(e.keyCode){case ae.UP:r=(0===a?t.length:a)-1,this.setState({selectedIndex:r});break;case ae.TAB:case ae.DOWN:r=(a+1)%t.length,this.setState({selectedIndex:r});break;case ae.ENTER:this.select(t[a]);break;case ae.LEFT:case ae.RIGHT:case ae.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()}}},{key:"toggleKeyEvents",value:function(e){var t=e?"addEventListener":"removeEventListener";this.node[t]("keydown",this.handleKeyDown,!0)}},{key:"isExpanded",value:function(e,t){var a=t.filteredOptions,r=t.query;return a.length>0||e.completer.getFreeTextOptions&&r}},{key:"componentDidUpdate",value:function(e,t){var a=this.isExpanded(this.props,this.state),r=this.isExpanded(e,t);a&&!r?this.toggleKeyEvents(!0):!a&&r&&this.toggleKeyEvents(!1)}},{key:"componentWillUnmount",value:function(){this.toggleKeyEvents(!1),this.debouncedLoadOptions.cancel()}},{key:"render",value:function(){var e=this,t=this.props,a=t.children,r=t.instanceId,n=t.completer.className,o=void 0===n?"":n,c=t.staticResults,i=this.state.selectedIndex,s=this.isExpanded(this.props,this.state),l=s?this.getOptions():[],u=(l[i]||{}).key,m=void 0===u?"":u,d=s?"woocommerce-search__autocomplete-".concat(r):null,f=s?"woocommerce-search__autocomplete-".concat(r,"-").concat(m):null,h=k()("woocommerce-search__autocomplete-results",{"is-static-results":c});return Object(p.createElement)("div",{ref:this.bindNode,className:"woocommerce-search__autocomplete"},a({isExpanded:s,listBoxId:d,activeId:f,onChange:this.search}),s&&Object(p.createElement)("div",{id:d,role:"listbox",className:h},l.map(function(t,a){return Object(p.createElement)(b.Button,{key:t.key,id:"woocommerce-search__autocomplete-".concat(r,"-").concat(t.key),role:"option","aria-selected":a===i,disabled:t.isDisabled,className:k()("woocommerce-search__autocomplete-result",o,{"is-selected":a===i}),onClick:function(){return e.select(t)}},t.label)})))}}]),t}(p.Component),oe=Object(te.compose)([b.withSpokenMessages,te.withInstanceId,b.withFocusOutside])(ne),ce=a(16),ie=a.n(ce);function se(e,t){if(!t)return null;var a=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());return{suggestionBeforeMatch:e.substring(0,a),suggestionMatch:e.substring(a,a+t.length),suggestionAfterMatch:e.substring(a+t.length)}}function le(e){return[e.country,e.state,e.name||Object(f.__)("TAX","woocommerce-admin"),e.priority].filter(Boolean).map(function(e){return e.toString().toUpperCase().trim()}).join("-")}var ue={name:"categories",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10,orderby:"count"}));return ie()({path:"/wc/v4/products/categories".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"title",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All categories with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(e.name,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},me=a(66),de=a(279),pe=a.n(de),fe=function(e){var t=e.code,a=e.order,r=e.className,n=e.size,o=e.hideFromScreenReader,c=k()("woocommerce-flag",r),i=t||"unknown";a&&a.shipping&&a.shipping.country?i=a.shipping.country:a&&a.billing&&a.billing.country&&(i=a.billing.country);var s={fontSize:n},l=Object(h.get)(pe.a.countryCode(i),"emoji");return Object(p.createElement)("div",{className:c,style:s,"aria-hidden":o},l&&Object(p.createElement)("span",null,l),!l&&Object(p.createElement)("span",{className:"woocommerce-flag__fallback"},"Invalid country flag"))};fe.propTypes={code:v.a.string,order:v.a.object,className:v.a.string,size:v.a.number};var be=fe,he={name:"countries",className:"woocommerce-search__country-result",isDebounced:!0,options:function(){return wcSettings.dataEndpoints.countries||[]},getSearchExpression:function(e){return"^"+e},getOptionKeywords:function(e){return[e.code,Object(me.decodeEntities)(e.name)]},getOptionLabel:function(e,t){var a=Object(me.decodeEntities)(e.name),r=se(a,t)||{};return[Object(p.createElement)(be,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",code:e.code,size:18,hideFromScreenReader:!0}),Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":a},r.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.code,label:Object(me.decodeEntities)(e.name)}}},ge={name:"coupons",className:"woocommerce-search__coupon-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10}));return ie()({path:"/wc/v4/coupons".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.code]},getFreeTextOptions:function(e){return[{key:"code",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All coupons with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,code:e}}]},getOptionLabel:function(e,t){var a=se(e.code,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.code}}},ve={name:"customers",className:"woocommerce-search__customers-result",options:function(e){var t="";e&&(t=P({search:e,searchby:"name",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"name",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All customers with names that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(e.name,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Oe={name:"download-ips",className:"woocommerce-search__download-ip-result",options:function(e){var t="";if(e)return t=P({match:e}),ie()({path:"/wc/v4/data/download-ips".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.user_ip_address]},getOptionLabel:function(e,t){var a=se(e.user_ip_address,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.user_ip_address},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.user_ip_address,label:e.user_ip_address}}},ye={name:"emails",className:"woocommerce-search__emails-result",options:function(e){var t="";e&&(t=P({search:e,searchby:"email",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.email]},getOptionLabel:function(e,t){var a=se(e.email,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.email},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.email}}},je={name:"orders",className:"woocommerce-search__order-result",options:function(e){var t="";if(e)return t=P({number:e,per_page:10}),ie()({path:"/wc/v4/orders".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return["#"+e.number]},getOptionLabel:function(e,t){var a=se("#"+e.number,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":"#"+e.number},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:"#"+e.number}}},we=function(e){var t=e.product,a=e.alt,r=e.width,n=e.height,o=e.className,c=Object(K.a)(e,["product","alt","width","height","className"]),i=Object(h.get)(t,["images",0])||Object(h.get)(t,["image"]),s=i&&i.src||!1,l=a||i&&i.alt||"",u=k()("woocommerce-product-image",o,{"is-placeholder":!s});return Object(p.createElement)("img",Object($.a)({className:u,src:s||wcSettings.wcAssetUrl+"images/placeholder.png",width:r,height:n,alt:l},c))};we.propTypes={width:v.a.number,height:v.a.number,className:v.a.string,product:v.a.object,alt:v.a.string},we.defaultProps={width:60,height:60,className:""};var _e=we,ke={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10,orderby:"popularity"}));return ie()({path:"/wc/v4/products".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name,e.sku]},getFreeTextOptions:function(e){return[{key:"title",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All products with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(e.name,t)||{};return[Object(p.createElement)(_e,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Ee={name:"taxes",className:"woocommerce-search__tax-result",options:function(e){var t="";e&&(t=P({code:e,per_page:10}));return ie()({path:"/wc/v4/taxes".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.id,le(e)]},getFreeTextOptions:function(e){return[{key:"code",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All taxes with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(le(e),t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:le(e)}}},Ce={name:"usernames",className:"woocommerce-search__usernames-result",options:function(e){var t="";e&&(t=P({search:e,searchby:"username",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.username]},getOptionLabel:function(e,t){var a=se(e.username,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.username},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.username}}};function Ne(e){return e.attributes.reduce(function(e,t,a,r){return e+"".concat(t.option).concat(r.length===a+1?"":", ")},"")}var Se={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10}));var a=M().products;return a&&!a.includes(",")||console.warn("Invalid product id supplied to Variations autocompleter"),ie()({path:"/wc/v4/products/".concat(a,"/variations").concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[Ne(e),e.sku]},getOptionLabel:function(e,t){var a=se(Ne(e),t)||{};return[Object(p.createElement)(_e,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.description},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:Ne(e)}}},xe=function(e){var t=e.id,a=e.instanceId,r=e.isVisible,n=e.label,o=e.popoverContents,c=e.remove,i=e.screenReaderLabel,s=e.setState,l=e.className;if(i=i||n,!n)return null;var u=k()("woocommerce-tag",l,{"has-remove":!!c}),m="woocommerce-tag__label-".concat(a),d=Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{className:"screen-reader-text"},i),Object(p.createElement)("span",{"aria-hidden":"true"},n));return Object(p.createElement)("span",{className:u},o?Object(p.createElement)(b.Button,{className:"woocommerce-tag__text",id:m,onClick:function(){return s(function(){return{isVisible:!0}})},isToggled:r},d):Object(p.createElement)("span",{className:"woocommerce-tag__text",id:m},d),o&&r&&Object(p.createElement)(b.Popover,{onClose:function(){return s(function(){return{isVisible:!1}})}},o),c&&Object(p.createElement)(b.IconButton,{className:"woocommerce-tag__remove",icon:Object(p.createElement)(b.Dashicon,{icon:"dismiss",size:20}),onClick:c(t),label:Object(f.sprintf)(Object(f.__)("Remove %s","woocommerce-admin"),n),"aria-describedby":m}))};xe.propTypes={id:v.a.oneOfType([v.a.number,v.a.string]),label:v.a.string.isRequired,popoverContents:v.a.node,remove:v.a.func,screenReaderLabel:v.a.string};var Fe=Object(te.withState)({isVisible:!1})(Object(te.withInstanceId)(xe)),Te=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state={value:"",isActive:!1},a.input=Object(p.createRef)(),a.selectResult=a.selectResult.bind(Object(m.a)(a)),a.removeAll=a.removeAll.bind(Object(m.a)(a)),a.removeResult=a.removeResult.bind(Object(m.a)(a)),a.updateSearch=a.updateSearch.bind(Object(m.a)(a)),a.onFocus=a.onFocus.bind(Object(m.a)(a)),a.onBlur=a.onBlur.bind(Object(m.a)(a)),a.onKeyDown=a.onKeyDown.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"selectResult",value:function(e){var t=this.props,a=t.selected,r=t.onChange;-1===Object(h.findIndex)(a,{id:e.id})&&(this.setState({value:""}),r([].concat(Object(o.a)(a),[e])))}},{key:"removeAll",value:function(){(0,this.props.onChange)([])}},{key:"removeResult",value:function(e){var t=this;return function(){var a=t.props,r=a.selected,n=a.onChange,c=Object(h.findIndex)(r,{id:e});n([].concat(Object(o.a)(r.slice(0,c)),Object(o.a)(r.slice(c+1))))}}},{key:"updateSearch",value:function(e){var t=this;return function(a){var r=a.target.value||"";t.setState({value:r}),e(a)}}},{key:"getAutocompleter",value:function(){switch(this.props.type){case"categories":return ue;case"countries":return he;case"coupons":return ge;case"customers":return ve;case"downloadIps":return Oe;case"emails":return ye;case"orders":return je;case"products":return ke;case"taxes":return Ee;case"usernames":return Ce;case"variations":return Se;default:return{}}}},{key:"shouldRenderTags",value:function(){return this.props.selected.some(function(e){return Boolean(e.label)})}},{key:"renderTags",value:function(){var e=this,t=this.props.selected;return this.shouldRenderTags()?Object(p.createElement)(p.Fragment,null,t.map(function(a,r){if(!a.label)return null;var n=Object(f.sprintf)(Object(f.__)("%1$s (%2$s of %3$s)","woocommerce-admin"),a.label,r+1,t.length);return Object(p.createElement)(Fe,{key:a.id,id:a.id,label:a.label,remove:e.removeResult,screenReaderLabel:n})})):null}},{key:"onFocus",value:function(e){var t=this;return function(a){t.setState({isActive:!0}),e(a)}}},{key:"onBlur",value:function(){this.setState({isActive:!1})}},{key:"onKeyDown",value:function(e){var t=this.state.value,a=this.props,r=a.selected,n=a.onChange;8===e.keyCode&&!t&&r.length&&n(Object(o.a)(r.slice(0,-1)))}},{key:"render",value:function(){var e=this,t=this.getAutocompleter(),a=this.props,r=a.allowFreeTextSearch,n=a.className,o=a.inlineTags,c=a.instanceId,i=a.placeholder,s=a.selected,l=a.showClearButton,u=a.staticResults,m=this.state,d=m.value,h=void 0===d?"":d,g=m.isActive,v={"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"]},O=this.shouldRenderTags(),j=t.inputType?t.inputType:"text",w=Object(p.createElement)(y.a,{className:"woocommerce-search__icon",icon:"search",size:18});return Object(p.createElement)("div",{className:k()("woocommerce-search",n,{"has-inline-tags":o})},Object(p.createElement)(oe,{allowFreeText:r,completer:t,onSelect:this.selectResult,selected:s.map(function(e){return e.id}),staticResults:u},function(t){var a=t.listBoxId,r=t.activeId,n=t.onChange;return o?Object(p.createElement)("div",{className:k()("woocommerce-search__inline-container",{"is-active":g,"has-tags":o&&O}),onClick:function(){e.input.current.focus()}},w,Object(p.createElement)("div",{className:"woocommerce-search__token-list"},e.renderTags(),Object(p.createElement)("input",Object($.a)({ref:e.input,type:j,size:(0===h.length&&i&&i.length||h.length)+1,value:h,placeholder:!O&&i||"",className:"woocommerce-search__inline-input",onChange:e.updateSearch(n),"aria-owns":a,"aria-activedescendant":r,onFocus:e.onFocus(n),onBlur:e.onBlur,onKeyDown:e.onKeyDown,"aria-describedby":O?"search-inline-input-".concat(c):null},v)),Object(p.createElement)("span",{id:"search-inline-input-".concat(c),className:"screen-reader-text"},Object(f.__)("Move backward for selected items","woocommerce-admin")))):Object(p.createElement)(p.Fragment,null,w,Object(p.createElement)("input",Object($.a)({type:"search",value:h,placeholder:i,className:"woocommerce-search__input",onChange:e.updateSearch(n),"aria-owns":a,"aria-activedescendant":r},v)))}),!o&&this.renderTags(),l&&O?Object(p.createElement)(b.Button,{className:"woocommerce-search__clear",isLink:!0,onClick:this.removeAll},Object(p.createElement)(b.Icon,{icon:"dismiss"}),Object(p.createElement)("span",{className:"screen-reader-text"},Object(f.__)("Clear all","woocommerce-admin"))):null)}}]),t}(p.Component);Te.propTypes={allowFreeTextSearch:v.a.bool,className:v.a.string,onChange:v.a.func,type:v.a.oneOf(["categories","countries","coupons","customers","downloadIps","emails","orders","products","taxes","usernames","variations"]).isRequired,placeholder:v.a.string,selected:v.a.arrayOf(v.a.shape({id:v.a.oneOfType([v.a.number,v.a.string]).isRequired,label:v.a.string})),inlineTags:v.a.bool,showClearButton:v.a.bool,staticResults:v.a.bool},Te.defaultProps={allowFreeTextSearch:!1,onChange:h.noop,selected:[],inlineTags:!1,showClearButton:!1,staticResults:!1};var Re=Object(te.withInstanceId)(Te),De=function(e){function t(e){var a,r=e.filter,n=e.config,o=e.query;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).onSearchChange=a.onSearchChange.bind(Object(m.a)(a)),a.state={selected:[]},a.updateLabels=a.updateLabels.bind(Object(m.a)(a)),r.value.length&&n.input.getLabels(r.value,o).then(a.updateLabels),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.config,r=t.filter,n=t.query,o=e.filter;if(r.value.length&&!Object(h.isEqual)(o,r)){var c=this.state.selected.map(function(e){return e.id});I(r.value).every(function(e){return!c.includes(e)})&&a.input.getLabels(r.value,n).then(this.updateLabels)}}},{key:"updateLabels",value:function(e){var t=this.state.selected.map(function(e){return e.id}),a=e.map(function(e){return e.id});Object(h.isEqual)(a.sort(),t.sort())||this.setState({selected:e})}},{key:"onSearchChange",value:function(e){this.setState({selected:e});var t=this.props,a=t.filter,r=t.onFilterChange,n=e.map(function(e){return e.id}).join(",");r(a.key,"value",n)}},{key:"getScreenReaderText",value:function(e,t){var a=this.state.selected;if(0===a.length)return"";var r=Object(h.find)(t.rules,{value:e.rule})||{},n=a.map(function(e){return e.label}).join(", ");return X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,n),rule:Object(p.createElement)(p.Fragment,null,r.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,o=e.isEnglish,c=this.state.selected,i=r.key,s=r.rule,l=a.input,u=a.labels,m=a.rules,d=w()({mixedString:u.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:m,value:s,onChange:Object(h.partial)(n,i,"rule"),"aria-label":u.rule}),filter:Object(p.createElement)(Re,{className:k()(t,"woocommerce-filters-advanced__input"),onChange:this.onSearchChange,type:l.type,placeholder:u.placeholder,selected:c,inlineTags:!0,"aria-label":u.filter})}}),f=this.getScreenReaderText(r,a);return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),f&&Object(p.createElement)("span",{className:"screen-reader-text"},f))}}]),t}(p.Component);De.propTypes={config:v.a.shape({labels:v.a.shape({placeholder:v.a.string,rule:v.a.string,title:v.a.string}),rules:v.a.arrayOf(v.a.object),input:v.a.object}).isRequired,filter:v.a.shape({key:v.a.string,rule:v.a.string,value:v.a.string}).isRequired,onFilterChange:v.a.func.isRequired,query:v.a.object};var Pe=De,qe=a(57),Ie=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.label,a=e.value,r=e.help,n=e.className,o=e.instanceId,c=e.onChange,i=e.prefix,s=e.suffix,l=e.type,u=Object(K.a)(e,["label","value","help","className","instanceId","onChange","prefix","suffix","type"]),m="inspector-text-control-with-affixes-".concat(o),d=[];return r&&d.push("".concat(m,"__help")),i&&d.push("".concat(m,"__prefix")),s&&d.push("".concat(m,"__suffix")),Object(p.createElement)(b.BaseControl,{label:t,id:m,help:r,className:n},Object(p.createElement)("div",{className:"text-control-with-affixes"},i&&Object(p.createElement)("span",{id:"".concat(m,"__prefix"),className:"text-control-with-affixes__prefix"},i),Object(p.createElement)("input",Object($.a)({className:"components-text-control__input",type:l,id:m,value:a,onChange:function(e){return c(e.target.value)},"aria-describedby":d.join(" ")},u)),s&&Object(p.createElement)("span",{id:"".concat(m,"__suffix"),className:"text-control-with-affixes__suffix"},s)))}}]),t}(p.Component);Ie.defaultProps={type:"text"},Ie.propTypes={label:v.a.string,help:v.a.string,type:v.a.string,value:v.a.string.isRequired,className:v.a.string,onChange:v.a.func.isRequired,prefix:v.a.node,suffix:v.a.node};var Le=Object(te.withInstanceId)(Ie),Me=a(346);function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("number"!=typeof e&&(e=parseFloat(e)),isNaN(e))return"";var a=Object(h.get)(wcSettings,["currency","decimal_separator"],"."),r=Object(h.get)(wcSettings,["currency","thousand_separator"],",");if(t=parseInt(t),isNaN(t)){var n=e.toString().split("."),o=Object(qe.a)(n,2)[1];t=o?o.length:0}return Me(e,t,a,r)}function Ae(e,t){t||(t=Object(h.get)(wcSettings,["currency","symbol"],"$"));var a=Be(e,Object(h.get)(wcSettings,["currency","precision"],2)),r=Object(h.get)(wcSettings,["currency","price_format"],"%1$s%2$s");return""===a?a:Object(f.sprintf)(r,t,a)}var Ve=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getBetweenString",value:function(){return Object(f._x)("{{rangeStart /}}{{span}} and {{/span}}{{rangeEnd /}}","Numerical range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var a=Object(h.get)(t,["input","type"],"number"),r=Object(h.find)(t.rules,{value:e.rule})||{},n=Object(h.isArray)(e.value)?e.value:[e.value],o=Object(qe.a)(n,2),c=o[0],i=o[1];if(!c||"between"===r.value&&!i)return"";"currency"===a&&(c=Ae(c),i=Ae(i));var s=c;return"between"===r.value&&(s=w()({mixedString:this.getBetweenString(),components:{rangeStart:Object(p.createElement)(p.Fragment,null,c),rangeEnd:Object(p.createElement)(p.Fragment,null,i),span:Object(p.createElement)(p.Fragment,null)}})),X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,s),rule:Object(p.createElement)(p.Fragment,null,r.label)}}))}},{key:"getFormControl",value:function(e){var t=e.type,a=e.value,r=e.label,n=e.onChange;if("currency"===t){var o=Object(h.get)(wcSettings,["currency","symbol"]);return 0===Object(h.get)(wcSettings,["currency","position"]).indexOf("right")?Object(p.createElement)(Le,{suffix:Object(p.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n}):Object(p.createElement)(Le,{prefix:Object(p.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n})}return Object(p.createElement)(b.TextControl,{className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n})}},{key:"getFilterInputs",value:function(){var e=this.props,t=e.config,a=e.filter,r=e.onFilterChange,n=Object(h.get)(t,["input","type"],"number");if("between"===a.rule)return this.getRangeInput();var o=Object(h.isArray)(a.value)?a.value:[a.value],c=Object(qe.a)(o,2),i=c[0],s=c[1];Boolean(s)&&r(a.key,"value",i||s);var l="";return l="lessthan"===a.rule?Object(f._x)("%(field)s maximum amount","maximum value input","woocommerce-admin"):Object(f._x)("%(field)s minimum amount","minimum value input","woocommerce-admin"),this.getFormControl({type:n,value:i||s,label:Object(f.sprintf)(l,{field:Object(h.get)(t,["labels","add"])}),onChange:Object(h.partial)(r,a.key,"value")})}},{key:"getRangeInput",value:function(){var e=this.props,t=e.config,a=e.filter,r=e.onFilterChange,n=Object(h.get)(t,["input","type"],"number"),o=Object(h.isArray)(a.value)?a.value:[a.value],c=Object(qe.a)(o,2),i=c[0],s=c[1];return w()({mixedString:this.getBetweenString(),components:{rangeStart:this.getFormControl({type:n,value:i||"",label:Object(f.sprintf)(Object(f.__)("%(field)s range start","woocommerce-admin"),{field:Object(h.get)(t,["labels","add"])}),onChange:function(e){r(a.key,"value",[e,s])}}),rangeEnd:this.getFormControl({type:n,value:s||"",label:Object(f.sprintf)(Object(f.__)("%(field)s range end","woocommerce-admin"),{field:Object(h.get)(t,["labels","add"])}),onChange:function(e){r(a.key,"value",[i,e])}}),span:Object(p.createElement)("span",{className:"separator"})}})}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,o=e.isEnglish,c=r.key,i=r.rule,s=a.labels,l=a.rules,u=w()({mixedString:s.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:l,value:i,onChange:Object(h.partial)(n,c,"rule"),"aria-label":s.rule}),filter:Object(p.createElement)("div",{className:k()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===i})},this.getFilterInputs())}}),m=this.getScreenReaderText(r,a);return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},s.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":o})},u),m&&Object(p.createElement)("span",{className:"screen-reader-text"},m))}}]),t}(p.Component),Ke=a(8),He=a.n(Ke),Ye="month",Ue="previous_year",ze="YYYY-MM-DD",Qe=[{value:"today",label:Object(f.__)("Today","woocommerce-admin")},{value:"yesterday",label:Object(f.__)("Yesterday","woocommerce-admin")},{value:"week",label:Object(f.__)("Week to Date","woocommerce-admin")},{value:"last_week",label:Object(f.__)("Last Week","woocommerce-admin")},{value:"month",label:Object(f.__)("Month to Date","woocommerce-admin")},{value:"last_month",label:Object(f.__)("Last Month","woocommerce-admin")},{value:"quarter",label:Object(f.__)("Quarter to Date","woocommerce-admin")},{value:"last_quarter",label:Object(f.__)("Last Quarter","woocommerce-admin")},{value:"year",label:Object(f.__)("Year to Date","woocommerce-admin")},{value:"last_year",label:Object(f.__)("Last Year","woocommerce-admin")},{value:"custom",label:Object(f.__)("Custom","woocommerce-admin")}],We=[{value:"previous_period",label:Object(f.__)("Previous Period","woocommerce-admin")},{value:"previous_year",label:Object(f.__)("Previous Year","woocommerce-admin")}];function $e(e,t){if(He.a.isMoment(t))return t.isValid()?t:null;if("string"==typeof t){var a=He()(t,[ze,e],!0);return a.isValid()?a:null}throw new Error("toMoment requires a string to be passed as an argument")}function Ge(e,t){var a=e.year()===t.year(),r=a&&e.month()===t.month(),n=a&&r&&e.isSame(t,"day"),o=Object(f.__)("MMM D, YYYY","woocommerce-admin"),c=Object(f.__)("MMM D","woocommerce-admin");if(n)return e.format(o);if(r){var i=e.date();return e.format(o).replace(i,"".concat(i," - ").concat(t.date()))}return a?"".concat(e.format(c)," - ").concat(t.format(o)):"".concat(e.format(o)," - ").concat(t.format(o))}function Je(e,t){var a,r,n=He()().startOf(e).subtract(1,e),o=n.clone().endOf(e);if("previous_period"===t)if("year"===e)r=(a=He()().startOf(e).subtract(2,e)).clone().endOf(e);else{var c=o.diff(n,"days");a=(r=n.clone().subtract(1,"days")).clone().subtract(c,"days")}else r=(a="week"===e?n.clone().subtract(1,"years").week(n.week()).startOf("week"):n.clone().subtract(1,"years")).clone().endOf(e);return{primaryStart:n,primaryEnd:o,secondaryStart:a,secondaryEnd:r}}function Xe(e,t){var a,r,n=He()().startOf(e),o=He()(),c=o.diff(n,"days");return"previous_period"===t?(a=n.clone().subtract(1,e),r=o.clone().subtract(1,e)):r=(a="week"===e?n.clone().subtract(1,"years").week(n.week()).startOf("week"):n.clone().subtract(1,"years")).clone().add(c,"days"),{primaryStart:n,primaryEnd:o,secondaryStart:a,secondaryEnd:r}}var Ze=function(e){var t=e.period,a=e.compare,r=e.after,n=e.before;return{period:t||Ye,compare:a||Ue,after:r?He()(r):null,before:n?He()(n):null}},et=function(e){var t=Ze(e),a=t.period,r=t.compare,n=t.after,o=t.before,c=function(e,t,a,r){switch(e){case"today":return Xe("day",t);case"yesterday":return Je("day",t);case"week":return Xe("week",t);case"last_week":return Je("week",t);case"month":return Xe("month",t);case"last_month":return Je("month",t);case"quarter":return Xe("quarter",t);case"last_quarter":return Je("quarter",t);case"year":return Xe("year",t);case"last_year":return Je("year",t);case"custom":var n=r.diff(a,"days");if("previous_period"===t){var o=a.clone().subtract(1,"days");return{primaryStart:a,primaryEnd:r,secondaryStart:o.clone().subtract(n,"days"),secondaryEnd:o}}return{primaryStart:a,primaryEnd:r,secondaryStart:a.clone().subtract(1,"years"),secondaryEnd:r.clone().subtract(1,"years")}}}(a,r,n,o),i=c.primaryStart,s=c.primaryEnd,l=c.secondaryStart,u=c.secondaryEnd;return{primary:{label:Object(h.find)(Qe,function(e){return e.value===a}).label,range:Ge(i,s),after:i,before:s},secondary:{label:Object(h.find)(We,function(e){return e.value===r}).label,range:Ge(l,u),after:l,before:u}}};var tt,at,rt;tt=wcSettings.l10n,at=tt.userLocale,rt=tt.weekdaysShort,"en"!==He.a.locale()&&He.a.updateLocale(at,{longDateFormat:{L:Object(f.__)("MM/DD/YYYY","woocommerce-admin"),LL:Object(f.__)("MMMM D, YYYY","woocommerce-admin"),LLL:Object(f.__)("D MMMM YYYY LT","woocommerce-admin"),LLLL:Object(f.__)("dddd, D MMMM YYYY LT","woocommerce-admin"),LT:Object(f.__)("HH:mm","woocommerce-admin")},weekdaysMin:rt});var nt={invalid:Object(f.__)("Invalid date","woocommerce-admin"),future:Object(f.__)("Select a date in the past","woocommerce-admin"),startAfterEnd:Object(f.__)("Start date must be before end date","woocommerce-admin"),endBeforeStart:Object(f.__)("Start date must be before end date","woocommerce-admin")};a(190),a(201);var ot=function(e){var t=e.disabled,a=e.value,r=e.onChange,n=e.dateFormat,o=e.label,c=e.describedBy,i=e.error,s=e.onFocus,l=e.onKeyDown,u=e.errorPosition,m=k()("woocommerce-calendar__input",{"is-empty":0===a.length,"is-error":i}),d=Object(h.uniqueId)("_woo-dates-input");return Object(p.createElement)("div",{className:m},Object(p.createElement)("input",{type:"text",className:"woocommerce-calendar__input-text",value:a,onChange:r,"aria-label":o,id:d,"aria-describedby":"".concat(d,"-message"),placeholder:n.toLowerCase(),onFocus:s,onKeyDown:l,disabled:t}),i&&Object(p.createElement)(b.Popover,{className:"woocommerce-calendar__input-error",focusOnMount:!1,position:u},i),Object(p.createElement)(b.Dashicon,{icon:"calendar"}),Object(p.createElement)("p",{className:"screen-reader-text",id:"".concat(d,"-message")},i||c))};ot.propTypes={disabled:v.a.bool,value:v.a.string,onChange:v.a.func.isRequired,dateFormat:v.a.string.isRequired,label:v.a.string.isRequired,describedBy:v.a.string.isRequired,error:v.a.string,errorPosition:v.a.string,onFocus:v.a.func,onKeyDown:v.a.func},ot.defaultProps={disabled:!1,onFocus:function(){},errorPosition:"bottom center",onKeyDown:h.noop};var ct=ot,it=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).onDateChange=a.onDateChange.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"handleKeyDown",value:function(e,t,a){var r=a.keyCode;ae.TAB===r&&e&&t()}},{key:"handleFocus",value:function(e,t){e||t()}},{key:"onDateChange",value:function(e,t){var a=this.props,r=a.onUpdate,n=a.dateFormat,o=He()(t);r({date:o,text:t?o.format(n):"",error:null}),e()}},{key:"onInputChange",value:function(e){var t=e.target.value,a=$e(this.props.dateFormat,t),r=a?null:nt.invalid;this.props.onUpdate({date:a,text:t,error:t.length>0?r:null})}},{key:"render",value:function(){var e=this,t=this.props,a=t.date,r=t.disabled,n=t.text,o=t.dateFormat,c=t.error,i=t.isInvalidDate;return Object(p.createElement)(b.Dropdown,{position:"bottom center",focusOnMount:!1,renderToggle:function(t){var a=t.isOpen,i=t.onToggle;return Object(p.createElement)(ct,{disabled:r,value:n,onChange:e.onInputChange,dateFormat:o,label:Object(f.__)("Choose a date","woocommerce-admin"),error:c,describedBy:Object(f.sprintf)(Object(f.__)("Date input describing a selected date in format %s","woocommerce-admin"),o),onFocus:Object(h.partial)(e.handleFocus,a,i),"aria-expanded":a,focusOnMount:!1,onKeyDown:Object(h.partial)(e.handleKeyDown,a,i),errorPosition:"top center"})},renderContent:function(t){var r=t.onToggle;return Object(p.createElement)(U,{component:!1},Object(p.createElement)(Y,{className:"woocommerce-calendar__date-picker-title"},Object(f.__)("select a date","woocommerce-admin")),Object(p.createElement)("div",{className:"woocommerce-calendar__react-dates is-core-datepicker"},Object(p.createElement)(b.DatePicker,{currentDate:a,onChange:Object(h.partial)(e.onDateChange,r),isInvalidDate:i})))}})}}]),t}(p.Component);it.propTypes={date:v.a.object,disabled:v.a.bool,text:v.a.string,error:v.a.string,onUpdate:v.a.func.isRequired,dateFormat:v.a.string.isRequired,isInvalidDate:v.a.func};var st=it,lt=Object(f.__)("MMM D, YYYY","woocommerce-admin"),ut=Object(f.__)("MM/DD/YYYY","woocommerce-admin"),mt=function(e){function t(e){var a,r=e.filter;Object(i.a)(this,t),a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments));var n=Array.isArray(r.value)?r.value:[null,r.value],o=Object(qe.a)(n,2),c=o[0],s=o[1],d=c?$e(ze,c):null,p=s?$e(ze,s):null;return a.state={before:p,beforeText:p?p.format(ut):"",beforeError:null,after:d,afterText:d?d.format(ut):"",afterError:null},a.onSingleDateChange=a.onSingleDateChange.bind(Object(m.a)(a)),a.onRangeDateChange=a.onRangeDateChange.bind(Object(m.a)(a)),a.onRuleChange=a.onRuleChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getBetweenString",value:function(){return Object(f._x)("{{after /}}{{span}} and {{/span}}{{before /}}","Date range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var a=Object(h.find)(t.rules,{value:e.rule})||{},r=this.state,n=r.before,o=r.after;if(!n||"between"===a.value&&!o)return"";var c=n.format(lt);return"between"===a.value&&(c=w()({mixedString:this.getBetweenString(),components:{after:Object(p.createElement)(p.Fragment,null,o.format(lt)),before:Object(p.createElement)(p.Fragment,null,n.format(lt)),span:Object(p.createElement)(p.Fragment,null)}})),X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,c),rule:Object(p.createElement)(p.Fragment,null,a.label)}}))}},{key:"onSingleDateChange",value:function(e){var t=e.date,a=e.text,r=e.error,n=this.props,o=n.filter,c=n.onFilterChange;this.setState({before:t,beforeText:a,beforeError:r}),t&&c(o.key,"value",t.format(ze))}},{key:"onRangeDateChange",value:function(e,t){var a,r=t.date,n=t.text,o=t.error,i=this.props,s=i.filter,l=i.onFilterChange;if(this.setState((a={},Object(c.a)(a,e,r),Object(c.a)(a,e+"Text",n),Object(c.a)(a,e+"Error",o),a)),r){var u=this.state,m=u.before,d=u.after,p=null,f=null;"after"===e&&(p=r.format(ze),f=m?m.format(ze):null),"before"===e&&(p=d?d.format(ze):null,f=r.format(ze)),p&&f&&l(s.key,"value",[p,f])}}},{key:"isFutureDate",value:function(e){return He()().isBefore(He()(e),"day")}},{key:"getFilterInputs",value:function(){var e=this.props.filter,t=this.state,a=t.before,r=t.beforeText,n=t.beforeError,o=t.after,c=t.afterText,i=t.afterError;return"between"===e.rule?w()({mixedString:this.getBetweenString(),components:{after:Object(p.createElement)(st,{date:o,text:c,error:i,onUpdate:Object(h.partial)(this.onRangeDateChange,"after"),dateFormat:ut,isInvalidDate:this.isFutureDate}),before:Object(p.createElement)(st,{date:a,text:r,error:n,onUpdate:Object(h.partial)(this.onRangeDateChange,"before"),dateFormat:ut,isInvalidDate:this.isFutureDate}),span:Object(p.createElement)("span",{className:"separator"})}}):Object(p.createElement)(st,{date:a,text:r,error:n,onUpdate:this.onSingleDateChange,dateFormat:ut,isInvalidDate:this.isFutureDate})}},{key:"onRuleChange",value:function(e){var t=this.props,a=t.onFilterChange,r=t.filter,n=t.updateFilter,o=this.state.before;"between"===r.rule&&"between"!==e?n({key:r.key,rule:e,value:o?o.format(ze):void 0}):a(r.key,"rule",e)}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.isEnglish,o=r.rule,c=a.labels,i=a.rules,s=this.getScreenReaderText(r,a),l=w()({mixedString:c.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:i,value:o,onChange:this.onRuleChange,"aria-label":c.rule}),filter:Object(p.createElement)("div",{className:k()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===o})},this.getFilterInputs())}});return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},c.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":n})},l),s&&Object(p.createElement)("span",{className:"screen-reader-text"},s))}}]),t}(p.Component),dt=[{value:"all",label:Object(f.__)("All","woocommerce-admin")},{value:"any",label:Object(f.__)("Any","woocommerce-admin")}],pt=function(e){function t(e){var a,r=e.query,n=e.config;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).state={match:r.match||"all",activeFilters:x(r,n.filters)},a.filterListRef=Object(p.createRef)(),a.onMatchChange=a.onMatchChange.bind(Object(m.a)(a)),a.onFilterChange=a.onFilterChange.bind(Object(m.a)(a)),a.getAvailableFilterKeys=a.getAvailableFilterKeys.bind(Object(m.a)(a)),a.addFilter=a.addFilter.bind(Object(m.a)(a)),a.removeFilter=a.removeFilter.bind(Object(m.a)(a)),a.clearFilters=a.clearFilters.bind(Object(m.a)(a)),a.getUpdateHref=a.getUpdateHref.bind(Object(m.a)(a)),a.updateFilter=a.updateFilter.bind(Object(m.a)(a)),a.onFilter=a.onFilter.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.config,r=t.query,n=e.query;Object(h.isEqual)(n,r)||this.setState({activeFilters:x(r,a.filters)})}},{key:"onMatchChange",value:function(e){this.setState({match:e})}},{key:"onFilterChange",value:function(e,t,a){var r=this.state.activeFilters.map(function(r){return e===r.key?Object.assign({},r,Object(c.a)({},t,a)):r});this.setState({activeFilters:r})}},{key:"updateFilter",value:function(e){var t=this.state.activeFilters.map(function(t){return e.key===t.key?e:t});this.setState({activeFilters:t})}},{key:"removeFilter",value:function(e){var t=this.props.onAdvancedFilterAction,a=Object(o.a)(this.state.activeFilters),r=Object(h.findIndex)(a,function(t){return t.key===e});(t("remove",a[r]),a.splice(r,1),this.setState({activeFilters:a}),0===a.length)&&S().push(this.getUpdateHref([]))}},{key:"getTitle",value:function(){var e=this.state.match,t=this.props.config;return w()({mixedString:t.title,components:{select:Object(p.createElement)(b.SelectControl,{className:"woocommerce-filters-advanced__title-select",options:dt,value:e,onChange:this.onMatchChange,"aria-label":Object(f.__)("Choose to apply any or all filters","woocommerce-admin")})}})}},{key:"getAvailableFilterKeys",value:function(){var e=this.props.config,t=this.state.activeFilters.map(function(e){return e.key});return Object(h.difference)(Object.keys(e.filters),t)}},{key:"addFilter",value:function(e,t){var a=this,r=this.props,n=r.onAdvancedFilterAction,c=r.config.filters[e],i={key:e};Array.isArray(c.rules)&&c.rules.length&&(i.rule=c.rules[0].value),c.input&&c.input.options&&(i.value=F(c,c.input.options)),c.input&&"Search"===c.input.component&&(i.value=""),this.setState(function(e){return{activeFilters:[].concat(Object(o.a)(e.activeFilters),[i])}}),n("add",i),t(),setTimeout(function(){a.filterListRef.current.querySelector("li:last-of-type fieldset").focus()})}},{key:"clearFilters",value:function(){(0,this.props.onAdvancedFilterAction)("clear_all"),this.setState({activeFilters:[],match:"all"})}},{key:"getUpdateHref",value:function(e,t){var a=this.props,r=a.path,o=a.query,c=T(e,o,a.config.filters),i="all"===t?void 0:t;return L(Object(n.a)({},c,{match:i}),r,o)}},{key:"isEnglish",value:function(){var e=wcSettings.siteLocale;return/en-/.test(e)}},{key:"onFilter",value:function(){var e=this.props,t=e.onAdvancedFilterAction,a=e.query,r=e.config,o=this.state,c=o.activeFilters,i=o.match,s=T(c,a,r.filters);t("filter",Object(n.a)({},s,{match:i}))}},{key:"render",value:function(){var e=this,t=this.props,a=t.config,r=t.query,o=this.state,c=o.activeFilters,i=o.match,s=this.getAvailableFilterKeys(),l=this.getUpdateHref(c,i),u=window.location.hash&&(window.location.hash.substr(1)===l||0===c.length),m=this.isEnglish();return Object(p.createElement)(W,{className:"woocommerce-filters-advanced woocommerce-analytics__card",title:this.getTitle()},Object(p.createElement)("ul",{className:"woocommerce-filters-advanced__list",ref:this.filterListRef},c.map(function(t){var o=t.key,c=a.filters[o],i=c.input,s=c.labels;return Object(p.createElement)("li",{className:"woocommerce-filters-advanced__list-item",key:o},"SelectControl"===i.component&&Object(p.createElement)(ee,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m}),"Search"===i.component&&Object(p.createElement)(Pe,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Number"===i.component&&Object(p.createElement)(Ve,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Currency"===i.component&&Object(p.createElement)(Ve,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:Object(n.a)({},a.filters[o],{input:{type:"currency",component:"Currency"}}),onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Date"===i.component&&Object(p.createElement)(mt,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m,query:r,updateFilter:e.updateFilter}),Object(p.createElement)(b.IconButton,{className:k()("woocommerce-filters-advanced__line-item","woocommerce-filters-advanced__remove"),label:s.remove,onClick:Object(h.partial)(e.removeFilter,o),icon:Object(p.createElement)(y.a,{icon:"cross-small"})}))})),s.length>0&&Object(p.createElement)("div",{className:"woocommerce-filters-advanced__add-filter"},Object(p.createElement)(b.Dropdown,{className:"woocommerce-filters-advanced__add-filter-dropdown",position:"bottom center",renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(p.createElement)(b.IconButton,{className:"woocommerce-filters-advanced__add-button",icon:Object(p.createElement)(y.a,{icon:"add-outline"}),onClick:a,"aria-expanded":t},Object(f.__)("Add a Filter","woocommerce-admin"))},renderContent:function(t){var r=t.onClose;return Object(p.createElement)("ul",{className:"woocommerce-filters-advanced__add-dropdown"},s.map(function(t){return Object(p.createElement)("li",{key:t},Object(p.createElement)(b.Button,{onClick:Object(h.partial)(e.addFilter,t,r)},a.filters[t].labels.add))}))}})),Object(p.createElement)("div",{className:"woocommerce-filters-advanced__controls"},u&&Object(p.createElement)(b.Button,{isPrimary:!0,disabled:!0},Object(f.__)("Filter","woocommerce-admin")),!u&&Object(p.createElement)(J,{className:"components-button is-primary is-button",type:"wc-admin",href:l,onClick:this.onFilter},Object(f.__)("Filter","woocommerce-admin")),c.length>0&&Object(p.createElement)(J,{type:"wc-admin",href:this.getUpdateHref([]),onClick:this.clearFilters},Object(f.__)("Clear all filters","woocommerce-admin"))))}}]),t}(p.Component);pt.propTypes={config:v.a.shape({title:v.a.string,filters:v.a.objectOf(v.a.shape({labels:v.a.shape({add:v.a.string,remove:v.a.string,rule:v.a.string,title:v.a.string,filter:v.a.string}),rules:v.a.arrayOf(v.a.object),input:v.a.object}))}).isRequired,path:v.a.string.isRequired,query:v.a.object,onAdvancedFilterAction:v.a.func},pt.defaultProps={query:{},onAdvancedFilterAction:function(){}};var ft=pt,bt=a(168),ht=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).call(this))).state={animate:null},e.container=Object(p.createRef)(),e.onExited=e.onExited.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onExited",value:function(){var e=this.props.onExited;e&&e(this.container.current)}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.animationKey,r=e.animate,n=k()("woocommerce-slide-animation",r&&"animate-".concat(r));return Object(p.createElement)("div",{className:n,ref:this.container},Object(p.createElement)(bt.TransitionGroup,null,Object(p.createElement)(bt.CSSTransition,Object($.a)({timeout:200,classNames:"slide",key:a},this.props,{onExited:this.onExited}),function(e){return t({status:e})})))}}]),t}(p.Component);ht.propTypes={children:v.a.func.isRequired,animationKey:v.a.any.isRequired,animate:v.a.oneOf([null,"left","right"]),onExited:v.a.func};var gt=ht,vt=a(68),Ot=a(172),yt=a(169),jt=a(52),wt=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.height;return Object(p.createElement)("div",{"aria-hidden":"true",className:"woocommerce-chart-placeholder",style:{height:e}},Object(p.createElement)(b.Spinner,null))}}]),t}(p.Component);wt.propTypes={height:v.a.number},wt.defaultProps={height:0};var _t=wt,kt=a(73),Et=a(58),Ct=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).chartRef=Object(p.createRef)(),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.drawUpdatedChart()}},{key:"shouldComponentUpdate",value:function(e){return this.props.className!==e.className||!Object(h.isEqual)(this.props.data,e.data)||!Object(h.isEqual)(this.props.orderedKeys,e.orderedKeys)||this.props.drawChart!==e.drawChart||this.props.height!==e.height||this.props.chartType!==e.chartType||this.props.width!==e.width}},{key:"componentDidUpdate",value:function(){this.drawUpdatedChart()}},{key:"componentWillUnmount",value:function(){this.deleteChart()}},{key:"delayedScroll",value:function(){var e=this.props.tooltip;return Object(h.throttle)(function(){e&&e.hide()},300)}},{key:"deleteChart",value:function(){Object(Et.b)(this.chartRef.current).selectAll("svg").remove()}},{key:"drawUpdatedChart",value:function(){(0,this.props.drawChart)(this.getContainer())}},{key:"getContainer",value:function(){var e=this.props,t=e.className,a=e.height,r=e.width;this.deleteChart();var n=Object(Et.b)(this.chartRef.current).append("svg").attr("viewBox","0 0 ".concat(r," ").concat(a)).attr("height",a).attr("width",r).attr("preserveAspectRatio","xMidYMid meet");return t&&n.attr("class","".concat(t,"__viewbox")),n.append("g")}},{key:"render",value:function(){var e=this.props.className;return Object(p.createElement)("div",{className:k()("d3-base",e),ref:this.chartRef,onScroll:this.delayedScroll()})}}]),t}(p.Component);Ct.propTypes={className:v.a.string,data:v.a.array,orderedKeys:v.a.array,tooltip:v.a.object,chartType:v.a.string};var Nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vt.a;return"function"==typeof e?e:t(e)},St=function(e){var t=new Set(e.reduce(function(e,t){return e.concat(Object.keys(t))},[]));return Object(o.a)(t).filter(function(e){return"date"!==e})},xt=a(113),Ft=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(xt.a)().domain(e.filter(function(e){return e.visible}).map(function(e){return e.key})).rangeRound([0,t.bandwidth()]).padding(a?0:.07)},Tt=function(e,t){return Object(xt.c)().domain([He()(e[0],"YYYY-MM-DD HH:mm").toDate(),He()(e[e.length-1],"YYYY-MM-DD HH:mm").toDate()]).rangeRound([0,t])},Rt=function(e){var t=function(e){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return e.map(function(e){for(var r=0,n=Object.entries(e);r<n.length;r++){var o=Object(qe.a)(n[r],2),c=o[0],i=o[1];"date"!==c&&Number.isFinite(i.value)&&i.value>t&&(t=i.value),"date"!==c&&Number.isFinite(i.value)&&i.value<a&&(a=i.value)}}),{upper:t,lower:a}}(e),a=t.lower,r=t.upper,n=function(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return 1;if(0===t&&0===e)return 1/3;var a=4/3*Math.max(-e,t),r=3*Math.pow(10,(Math.log(a)*Math.LOG10E+1|0)-2),n=Math.ceil(a/r)*r/3;return t<1&&e>-1?Math.round(4*n)/4:Math.ceil(n)}(a,r),o={lower:0,upper:0,step:n};return(Number.isFinite(a)||a<0)&&(o.lower=Math.floor(a/n)*n,o.lower===a&&0!==a&&(o.lower-=n)),(Number.isFinite(r)||r>0)&&(o.upper=Math.ceil(r/n)*n,o.upper===r&&0!==r&&(o.upper+=n)),o},Dt=a(86),Pt=function(e){for(var t=[],a=1;a<=Math.floor(Math.sqrt(e));a++)e%a==0&&(t.push(a),e/a!==a&&t.push(e/a));return t.sort(function(e,t){return e-t}),t},qt=function(e,t,a,r){var n,o=function(e,t){if(e<783)return 7;if(e>=783&&e<=1130)return 12;if(e>1130&&e<=1365){if("time-comparison"===t)return 16;if("item-comparison"===t)return 12}else if(e>1365){if("time-comparison"===t)return 31;if("item-comparison"===t)return 16}return 16}(t,a);return(e.length>=63&&"day"===r||e.length>=9&&"week"===r)&&(e=(n=e).filter(function(e,t){return 0===t||He()(e).toDate().getMonth()!==He()(n[t-1]).toDate().getMonth()})),e.length<=o||"hour"===r&&function(e){var t=He()(e[0]).toDate(),a=He()(e[e.length-1]).toDate();return t.getDate()===a.getDate()&&t.getMonth()===a.getMonth()&&t.getFullYear()===a.getFullYear()}(e)&&t>783?e:function(e,t){for(var a=[],r=0;r<e.length;r+=t)a.push(e[r]);return a[0]!==e[0]&&a.unshift(e[0]),a}(e,function(e,t){for(var a=[],r=1;a.length<=3;)a=Pt(e.length-r),r+=1;return a.find(function(a){return e.length/a<t})}(e,o))},It=function(e,t,a,r){var n=He()(e).toDate(),o=0!==t?a[t-1]:a[t];return o=o instanceof Date?o:He()(o).toDate(),0===t?r(n):function(e,t){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new RegExp([" |,"],"g"),r=e.split(a),n=t.split(a),o=new Array,c=e.length>t.length?r:n,i=0;i<c.length;i++)r[i]!==n[i]&&o.push(n[i]);return o}(r(o),r(n)).join(" ")},Lt=function(e,t,a){for(var r=[],n=0;n<e;n++){var o=(n+1)/e*t,c=a?Math.round(o):o;r[r.length-1]!==c&&r.push(c)}return r},Mt=function(e,t,a){return[0].concat(Object(o.a)(function(e,t){if(e>=0)return[];var a=Math.ceil(-e/t);return Lt(a,e,e<-1)}(e,a)),Object(o.a)(function(e,t){if(e<=0)return[];var a=Math.ceil(e/t);return Lt(a,e,e>1)}(t,a)))},Bt=function(e,t,a,r,n,o){!function(e,t,a,r){var n=a.yScale.range()[0],o=qt(t.uniqueDates,a.xScale.range()[1],t.mode,t.interval);"line"===t.chartType&&(o=o.map(function(e){return He()(e).toDate()})),e.append("g").attr("class","axis").attr("aria-hidden","true").attr("transform","translate(0, ".concat(n,")")).call(Object(Dt.a)(a.xScale).tickValues(o).tickFormat(function(e,a){return"hour"===t.interval?r.xFormat(e instanceof Date?e:He()(e).toDate()):It(e,a,o,r.xFormat)})),e.append("g").attr("class","axis axis-month").attr("aria-hidden","true").attr("transform","translate(0, ".concat(n+14,")")).call(Object(Dt.a)(a.xScale).tickValues(o).tickFormat(function(e,t){return It(e,t,o,r.x2Format)})),e.append("g").attr("class","pipes").attr("transform","translate(0, ".concat(n,")")).call(Object(Dt.a)(a.xScale).tickValues(o).tickSize(5).tickFormat(""))}(e,t,a,r),function(e,t,a,r,n){var o=Mt(t.yScale.domain()[0],t.yScale.domain()[1],t.step),c=t.xScale.range()[1],i=n?c+r.left+r.right/2-15:-r.left/2-15,s=t.yMin>=0||t.yMax>0?" with-positive-ticks":"";e.append("g").attr("class","grid"+s).attr("transform","translate(-".concat(r.left,", 0)")).call(Object(Dt.b)(t.yScale).tickValues(o).tickSize(-c-r.left-r.right).tickFormat("")),e.append("g").attr("class","axis y-axis").attr("aria-hidden","true").attr("transform","translate("+i+", 12)").attr("text-anchor","start").call(Object(Dt.b)(t.yScale).tickValues(0===t.yMax&&0===t.yMin?[o[0]]:o).tickFormat(function(e){return e>-1&&e<1&&a.yBelow1Format?a.yBelow1Format(e):a.yFormat(e)}))}(e,a,r,n,o),e.selectAll(".domain").remove(),e.selectAll(".axis .tick line").remove()},At=a(283),Vt=function(e,t,a,r,o,c){var i,s,l=r.yScale.range()[0],u=r.xScale.range()[1],m=(i=r.xScale,s=r.yScale,Object(At.a)().x(function(e){return i(He()(e.date).toDate())}).y(function(e){return s(e.value)})),d=function(e,t){return t.map(function(t){return{key:t.key,focus:t.focus,visible:t.visible,label:t.label,values:e.map(function(e){return{date:e.date,focus:t.focus,value:Object(h.get)(e,[t.key,"value"],0),visible:t.visible}})}})}(t,a.visibleKeys),p=e.append("g").attr("class","lines").selectAll(".line-g").data(d.filter(function(e){return e.visible}).reverse()).enter().append("g").attr("class","line-g").attr("role","region").attr("aria-label",function(e){return e.label||e.key}),f=function(e,t,a,r,n){var o=a.slice().reverse();return t.map(function(a,c){var i=Object(h.first)(e.filter(function(e){return e.date===a})),s=n(He()(a).toDate()),l=n(c>=1?He()(t[c-1]).toDate():He()(t[0]).toDate()),u=c<t.length-1?n(He()(t[c+1]).toDate()):n(He()(t[t.length-1]).toDate()),m=0===c?u-s:s-l,d=0===c?0:s-m/2;return m=0===c||c===t.length-1?m/2:m,{date:a,start:t.length>1?d:0,width:t.length>1?m:r,values:o.map(function(e){var t=e.key,r=i[t];return r?{key:t,value:r.value,date:a}:null}).filter(Boolean)}})}(t,a.uniqueDates,a.visibleKeys,u,r.xScale),b=u<=1365||a.uniqueDates.length>50?2:3;b=u<=783?1.25:b;var g=u<=1365?4:6;a.uniqueDates.length>1&&p.append("path").attr("fill","none").attr("stroke-width",b).attr("stroke-linejoin","round").attr("stroke-linecap","round").attr("stroke",function(e){return a.getColor(e.key)}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("d",function(e){return m(e.values)});u/a.uniqueDates.length>36&&p.selectAll("circle").data(function(e,t){return e.values.map(function(a){return Object(n.a)({},a,{i:t,visible:e.visible,key:e.key})})}).enter().append("circle").attr("r",g).attr("fill",function(e){return a.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",b+1).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("cx",function(e){return r.xScale(He()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}).attr("tabindex","0").attr("aria-label",function(e){var t=o.screenReaderFormat(e.date instanceof Date?e.date:He()(e.date).toDate());return"".concat(t," ").concat(c.valueFormat(e.value))}).on("focus",function(e,a,r){c.show(t.find(function(t){return t.date===e.date}),r[a].parentNode,Et.a.target)}).on("blur",function(){return c.hide()});var v=e.append("g").attr("class","focusspaces").selectAll(".focus").data(f).enter().append("g").attr("class","focus"),O=v.append("g").attr("class","focus-grid").attr("opacity","0");O.append("line").attr("x1",function(e){return r.xScale(He()(e.date).toDate())}).attr("y1",0).attr("x2",function(e){return r.xScale(He()(e.date).toDate())}).attr("y2",l),O.selectAll("circle").data(function(e){return e.values}).enter().append("circle").attr("r",g+2).attr("fill",function(e){return a.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",b+2).attr("cx",function(e){return r.xScale(He()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}),v.append("rect").attr("class","focus-g").attr("x",function(e){return e.start}).attr("y",0).attr("width",function(e){return e.width}).attr("height",l).attr("opacity",0).on("mouseover",function(e,r,n){var o=(0===r||r===f.length-1)&&a.uniqueDates.length>1?0:.5;c.show(t.find(function(t){return t.date===e.date}),Et.a.target,n[r].parentNode,o)}).on("mouseout",function(){return c.hide()})},Kt=5,Ht=[[],[.5],[.333,.667],[.2,.5,.8],[.12,.375,.625,.88],[0,.25,.5,.75,1]],Yt=function(e,t){return function(a){var r=e.length>Kt?Kt:e.length,n=Object(h.findIndex)(e,function(e){return e.key===a}),o=n<=Kt-1?Ht[r][n]:0;return t(o)}},Ut=function(){function e(){Object(i.a)(this,e),this.ref=null,this.chart=null,this.position="",this.title="",this.labelFormat="",this.valueFormat="",this.visibleKeys="",this.getColor=null,this.margin=24}return Object(s.a)(e,[{key:"calculateXPosition",value:function(e,t,a){var r=this.ref.getBoundingClientRect(),n=this.ref.parentNode.querySelector(".d3-base").getBoundingClientRect(),o=Math.max(n.left,t.left);if("below"===this.position)return Math.max(this.margin,Math.min(e.left+.5*e.width-r.width/2-o,n.width-r.width-this.margin));var c=e.left+e.width*a+this.margin-o;return c+r.width+this.margin>n.width?Math.max(this.margin,e.left+e.width*(1-a)-r.width-this.margin-o):c}},{key:"calculateYPosition",value:function(e,t){if("below"===this.position)return t.height;var a=this.ref.getBoundingClientRect(),r=e.top+this.margin-t.top;return r+a.height+this.margin>t.height?Math.max(0,e.top-a.height-this.margin-t.top):r}},{key:"calculatePosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=e.getBoundingClientRect(),r=this.chart.getBoundingClientRect();return"below"===this.position&&(t=0),{x:this.calculateXPosition(a,r,t),y:this.calculateYPosition(a,r)}}},{key:"hide",value:function(){Object(Et.b)(this.chart).selectAll(".barfocus, .focus-grid").attr("opacity","0"),Object(Et.b)(this.ref).style("visibility","hidden")}},{key:"getTooltipRowLabel",value:function(e,t){return e[t.key].labelDate?this.labelFormat(He()(e[t.key].labelDate).toDate()):t.label||t.key}},{key:"show",value:function(e,t,a){var r=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.visibleKeys.length){Object(Et.b)(a).select(".focus-grid, .barfocus").attr("opacity","1");var o=this.calculatePosition(t,n),c=this.visibleKeys.map(function(t){return'\n\t\t\t\t\t<li class="key-row">\n\t\t\t\t\t\t<div class="key-container">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass="key-color"\n\t\t\t\t\t\t\t\tstyle="background-color: '.concat(r.getColor(t.key),'">\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class="key-key">').concat(r.getTooltipRowLabel(e,t),'</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class="key-value">').concat(r.valueFormat(e[t.key].value),"</span>\n\t\t\t\t\t</li>\n\t\t\t\t")}),i=this.title?this.title:this.labelFormat(He()(e.date).toDate());Object(Et.b)(this.ref).style("left",o.x+"px").style("top",o.y+"px").style("visibility","visible").html("\n\t\t\t\t<div>\n\t\t\t\t\t<h4>".concat(i,"</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t").concat(c.join(""),"\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t"))}}}]),e}(),zt=function(){return"rtl"===document.documentElement.dir},Qt=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).drawChart=a.drawChart.bind(Object(m.a)(a)),a.getParams=a.getParams.bind(Object(m.a)(a)),a.tooltipRef=Object(p.createRef)(),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getFormatParams",value:function(){var e=this.props,t=e.screenReaderFormat,a=e.xFormat,r=e.x2Format,n=e.yFormat,o=e.yBelow1Format;return{screenReaderFormat:Nt(t,kt.a),xFormat:Nt(a,kt.a),x2Format:Nt(r,kt.a),yBelow1Format:Nt(o),yFormat:Nt(n)}}},{key:"getScaleParams",value:function(e){var t=this.props,a=t.data,r=t.height,n=t.orderedKeys,o=t.chartType,c=this.getMargin(),i=r-c.top-c.bottom,s=this.getWidth()-c.left-c.right,l=Rt(a),u=l.upper,m=l.lower,d=l.step,p=function(e,t,a){return Object(xt.b)().domain([Math.min(t,0),0===a&&0===t?1:Math.max(a,0)]).rangeRound([e,0])}(i,m,u);if("line"===o)return{step:d,xScale:Tt(e,s),yMax:u,yMin:m,yScale:p};var f=this.shouldBeCompact(),b=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(xt.a)().domain(e).range([0,t]).paddingInner(a?0:.1)}(e,s,f);return{step:d,xGroupScale:Ft(n,b,f),xScale:b,yMax:u,yMin:m,yScale:p}}},{key:"getParams",value:function(e){var t=this.props,a=t.chartType,r=t.colorScheme,n=t.data,o=t.interval,c=t.mode,i=t.orderedKeys||function(e){return St(e).map(function(t){return{key:t,focus:!0,total:e.reduce(function(e,a){return e+a[t].value},0),visible:!0}}).sort(function(e,t){return t.total-e.total})}(n),s=i.filter(function(e){return e.visible}),l=i.length>Kt?s:i;return{getColor:Yt(l,r),interval:o,mode:c,chartType:a,uniqueDates:e,visibleKeys:s}}},{key:"createTooltip",value:function(e,t,a){var r=this.props,n=r.tooltipLabelFormat,o=r.tooltipPosition,c=r.tooltipTitle,i=r.tooltipValueFormat,s=new Ut;s.ref=this.tooltipRef.current,s.chart=e,s.position=o,s.title=c,s.labelFormat=Nt(n,kt.a),s.valueFormat=Nt(i),s.visibleKeys=a,s.getColor=t,this.tooltip=s}},{key:"drawChart",value:function(e){var t=this.props,a=t.data,r=t.dateParser,n=t.chartType,c=this.getMargin(),i=function(e,t){var a=Object(kt.c)(t),r=new Set(e.map(function(e){return e.date}));return Object(o.a)(r).sort(function(e,t){return a(e)-a(t)})}(a,r),s=this.getFormatParams(),l=this.getParams(i),u=this.getScaleParams(i),m=e.attr("id","chart").append("g").attr("transform","translate(".concat(c.left,", ").concat(c.top,")"));this.createTooltip(m.node(),l.getColor,l.visibleKeys),Bt(m,l,u,s,c,zt()),"line"===n&&Vt(m,a,l,u,s,this.tooltip),"bar"===n&&function(e,t,a,r,n,o){var c=r.yScale.range()[0],i=e.append("g").attr("class","bars").selectAll("g").data(t).enter().append("g").attr("transform",function(e){return"translate(".concat(r.xScale(e.date),", 0)")}).attr("class","bargroup").attr("role","region").attr("aria-label",function(e){return"item-comparison"===a.mode?n.screenReaderFormat(e.date instanceof Date?e.date:He()(e.date).toDate()):null});i.append("rect").attr("class","barfocus").attr("x",0).attr("y",0).attr("width",r.xGroupScale.range()[1]).attr("height",c).attr("opacity","0").on("mouseover",function(e,a,r){o.show(t.find(function(t){return t.date===e.date}),Et.a.target,r[a].parentNode)}).on("mouseout",function(){return o.hide()});var s=r.yScale(0);i.selectAll(".bar").data(function(e){return a.visibleKeys.map(function(t){return{key:t.key,focus:t.focus,value:Object(h.get)(e,[t.key,"value"],0),label:t.label,visible:t.visible,date:e.date}})}).enter().append("rect").attr("class","bar").attr("x",function(e){return r.xGroupScale(e.key)}).attr("y",function(e){return Math.min(s,r.yScale(e.value))}).attr("width",r.xGroupScale.bandwidth()).attr("height",function(e){return Math.abs(s-r.yScale(e.value))}).attr("fill",function(e){return a.getColor(e.key)}).attr("pointer-events","none").attr("tabindex","0").attr("aria-label",function(e){var r=e.label||e.key;if("time-comparison"===a.mode){var c=t.find(function(t){return t.date===e.date});r=n.screenReaderFormat(He()(c[e.key].labelDate).toDate())}return"".concat(r," ").concat(o.valueFormat(e.value))}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).on("focus",function(e,a,r){var n=e.value>0?Et.a.target:Et.a.target.parentNode;o.show(t.find(function(t){return t.date===e.date}),n,r[a].parentNode)}).on("blur",function(){return o.hide()})}(m,a,l,u,s,this.tooltip)}},{key:"shouldBeCompact",value:function(){var e=this.props,t=e.data,a=e.chartType,r=e.width,n=this.getMargin();if("bar"!==a)return!1;var o=r-n.left-n.right,c=t&&t.length?Object.keys(t[0]).length-1:0;return o<t.length*(c+1)}},{key:"getMargin",value:function(){var e=this.props.margin;return zt()?{bottom:e.bottom,left:e.right,right:e.left,top:e.top}:e}},{key:"getWidth",value:function(){var e=this.props,t=e.data,a=e.chartType,r=e.width,n=this.getMargin();if("bar"!==a)return r;var o=t&&t.length?Object.keys(t[0]).length-1:0,c=this.shouldBeCompact()?t.length*o:t.length*(o+1);return Math.max(r,c+n.left+n.right)}},{key:"getEmptyMessage",value:function(){var e=this.props,t=e.baseValue,a=e.data,r=e.emptyMessage;if(r&&function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=0;a<e.length;a++)for(var r=0,n=Object.entries(e[a]);r<n.length;r++){var o=Object(qe.a)(n[r],2),c=o[0],i=o[1];if("date"!==c&&!Object(h.isNil)(i.value)&&i.value!==t)return!1}return!0}(a,t))return Object(p.createElement)("div",{className:"d3-chart__empty-message"},r)}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.data,r=e.height,n=e.orderedKeys,o=e.chartType,c=this.getWidth();return Object(p.createElement)("div",{className:k()("d3-chart__container",t),style:{height:r}},this.getEmptyMessage(),Object(p.createElement)("div",{className:"d3-chart__tooltip",ref:this.tooltipRef}),Object(p.createElement)(Ct,{className:k()(t),data:a,drawChart:this.drawChart,height:r,orderedKeys:n,tooltip:this.tooltip,chartType:o,width:c}))}}]),t}(p.Component);Qt.propTypes={baseValue:v.a.number,className:v.a.string,colorScheme:v.a.func,data:v.a.array.isRequired,dateParser:v.a.string.isRequired,emptyMessage:v.a.string,height:v.a.number,interval:v.a.oneOf(["hour","day","week","month","quarter","year"]),margin:v.a.shape({bottom:v.a.number,left:v.a.number,right:v.a.number,top:v.a.number}),mode:v.a.oneOf(["item-comparison","time-comparison"]),screenReaderFormat:v.a.oneOfType([v.a.string,v.a.func]),orderedKeys:v.a.array,tooltipLabelFormat:v.a.oneOfType([v.a.string,v.a.func]),tooltipValueFormat:v.a.oneOfType([v.a.string,v.a.func]),tooltipPosition:v.a.oneOf(["below","over"]),tooltipTitle:v.a.string,chartType:v.a.oneOf(["bar","line"]),width:v.a.number,xFormat:v.a.oneOfType([v.a.string,v.a.func]),x2Format:v.a.oneOfType([v.a.string,v.a.func]),yBelow1Format:v.a.oneOfType([v.a.string,v.a.func]),yFormat:v.a.oneOfType([v.a.string,v.a.func])},Qt.defaultProps={baseValue:0,data:[],dateParser:"%Y-%m-%dT%H:%M:%S",height:200,margin:{bottom:30,left:40,right:0,top:20},mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",tooltipPosition:"over",tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",chartType:"line",width:600,xFormat:"%Y-%m-%d",x2Format:"",yBelow1Format:".3~f",yFormat:".3~s"};var Wt=Qt,$t=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).call(this))).listRef=Object(p.createRef)(),e.state={isScrollable:!1},e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.updateListScroll(),window.addEventListener("resize",this.updateListScroll)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateListScroll)}},{key:"updateListScroll",value:function(){if(this&&this.listRef){var e=this.listRef.current,t=e.scrollHeight-e.scrollTop<=e.offsetHeight;this.setState({isScrollable:!t})}}},{key:"render",value:function(){var e=this.props,t=e.colorScheme,a=e.data,r=e.handleLegendHover,n=e.handleLegendToggle,o=e.interactive,c=e.legendDirection,i=e.legendValueFormat,s=e.instanceId,l=e.totalLabel,u=this.state.isScrollable,m=a.filter(function(e){return e.visible}),d=m.length,b="column"===c&&a.length>Kt&&l,h=a.length>Kt?m:a;return Object(p.createElement)("div",{className:k()("woocommerce-legend","woocommerce-legend__direction-".concat(c),{"has-total":b,"is-scrollable":u},this.props.className)},Object(p.createElement)("ul",{className:"woocommerce-legend__list",ref:this.listRef,onScroll:b?this.updateListScroll:null},a.map(function(e){return Object(p.createElement)("li",{className:k()("woocommerce-legend__item",{"woocommerce-legend__item-checked":e.visible}),key:e.key,id:"woocommerce-legend-".concat(s,"__item__").concat(e.key),onMouseEnter:r,onMouseLeave:r,onBlur:r,onFocus:r},Object(p.createElement)("button",{onClick:n,id:"woocommerce-legend-".concat(s,"__item-button__").concat(e.key),disabled:e.visible&&d<=1||!e.visible&&d>=Kt||!o,title:d>=Kt?Object(f.sprintf)(Object(f.__)("You may select up to %d items.","woocommerce-admin"),Kt):""},Object(p.createElement)("div",{className:"woocommerce-legend__item-container"},Object(p.createElement)("span",{className:k()("woocommerce-legend__item-checkmark",{"woocommerce-legend__item-checkmark-checked":e.visible}),style:e.visible?{color:Yt(h,t)(e.key)}:null}),Object(p.createElement)("span",{className:"woocommerce-legend__item-title"},e.label),Object(p.createElement)("span",{className:"woocommerce-legend__item-total"},Nt(i)(e.total)))))})),b&&Object(p.createElement)("div",{className:"woocommerce-legend__total"},l))}}]),t}(p.Component);$t.propTypes={className:v.a.string,colorScheme:v.a.func,data:v.a.array.isRequired,handleLegendToggle:v.a.func,handleLegendHover:v.a.func,interactive:v.a.bool,legendDirection:v.a.oneOf(["row","column"]),legendValueFormat:v.a.oneOfType([v.a.string,v.a.func]),totalLabel:v.a.string,instanceId:v.a.number},$t.defaultProps={interactive:!0,legendDirection:"row",legendValueFormat:","};var Gt=Object(te.withInstanceId)($t);var Jt=Object(h.get)(wcSettings,["currency","symbol"],""),Xt=Object(h.get)(wcSettings,["currency","position"],"left");Object(vt.b)({decimal:Object(h.get)(wcSettings,["currency","decimal_separator"],"."),thousands:Object(h.get)(wcSettings,["currency","thousand_separator"],","),grouping:[3],currency:function(e,t){switch(t){case"left_space":return[e+" ",""];case"right":return["",e];case"right_space":return[""," "+e];case"left":default:return[e,""]}}(Jt,Xt)});var Zt=function(e){function t(e){var a;Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).chartBodyRef=Object(p.createRef)();var r=a.getDataKeys();return a.state={focusedKeys:[],visibleKeys:r.slice(0,Kt),width:0},a.prevDataKeys=r.sort(),a.handleTypeToggle=a.handleTypeToggle.bind(Object(m.a)(a)),a.handleLegendToggle=a.handleLegendToggle.bind(Object(m.a)(a)),a.handleLegendHover=a.handleLegendHover.bind(Object(m.a)(a)),a.updateDimensions=a.updateDimensions.bind(Object(m.a)(a)),a.getVisibleData=Object(yt.a)(a.getVisibleData),a.getOrderedKeys=Object(yt.a)(a.getOrderedKeys),a.setInterval=a.setInterval.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getDataKeys",value:function(){var e=this.props,t=e.data,a=e.filterParam,r=e.mode,n=e.query;if("item-comparison"===r){var o=a?I(n[a]):[];return this.getOrderedKeys([],[],o).map(function(e){return e.key})}return St(t)}},{key:"componentDidUpdate",value:function(){var e=this.props.data;if(e&&e.length){var t=St(e).sort();if(!Object(h.isEqual)(t,this.prevDataKeys)){var a=this.getDataKeys();this.prevDataKeys=t,this.setState({visibleKeys:a.slice(0,Kt)})}}}},{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"getOrderedKeys",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.props,n=r.data,o=r.legendTotals,c=r.mode;if(!n||0===n.length)return[];var i=n.reduce(function(e,t){return Object.entries(t).forEach(function(t){var a=Object(qe.a)(t,2),r=a[0],n=a[1];"date"===r||e[r]||(e[r]=n.label)}),e},{}),s=Object.entries(i).map(function(a){var r=Object(qe.a)(a,2),c=r[0],i=r[1];return{focus:0===e.length||e.includes(c),key:c,label:i,total:o&&void 0!==o[c]?o[c]:n.reduce(function(e,t){return e+t[c].value},0),visible:t.includes(c)}});return"item-comparison"===c?s.sort(function(e,t){return t.total-e.total}).filter(function(e){return e.total>0||a.includes(parseInt(e.key,10))}):s}},{key:"handleTypeToggle",value:function(e){if(this.props.chartType!==e){var t=this.props;B({chartType:e},t.path,t.query)}}},{key:"handleLegendToggle",value:function(e){if(this.props.interactiveLegend){var t=e.currentTarget.id.split("_").pop(),a=this.state,r=a.focusedKeys,n=a.visibleKeys;n.includes(t)?this.setState({focusedKeys:Object(h.without)(r,t),visibleKeys:Object(h.without)(n,t)}):this.setState({focusedKeys:r.concat([t]),visibleKeys:n.concat([t])})}}},{key:"handleLegendHover",value:function(e){if("mouseleave"===e.type||"blur"===e.type)this.setState({focusedKeys:[]});else if("mouseenter"===e.type||"focus"===e.type){var t=e.currentTarget.id.split("__").pop();this.setState({focusedKeys:[t]})}}},{key:"updateDimensions",value:function(){this.setState({width:this.chartBodyRef.current.offsetWidth})}},{key:"getVisibleData",value:function(e,t){var a=t.filter(function(e){return e.visible});return e.map(function(e){var t={date:e.date};return a.forEach(function(a){t[a.key]=e[a.key]}),t})}},{key:"setInterval",value:function(e){var t=this.props;B({interval:e},t.path,t.query)}},{key:"renderIntervalSelector",value:function(){var e=this.props,t=e.interval,a=e.allowedIntervals;if(!a||a.length<1)return null;var r={hour:Object(f.__)("By hour","woocommerce-admin"),day:Object(f.__)("By day","woocommerce-admin"),week:Object(f.__)("By week","woocommerce-admin"),month:Object(f.__)("By month","woocommerce-admin"),quarter:Object(f.__)("By quarter","woocommerce-admin"),year:Object(f.__)("By year","woocommerce-admin")};return Object(p.createElement)(b.SelectControl,{className:"woocommerce-chart__interval-select",value:t,options:a.map(function(e){return{value:e,label:r[e]}}),onChange:this.setInterval})}},{key:"getChartHeight",value:function(){var e=this.props,t=e.isViewportLarge;return e.isViewportMobile?180:t?300:220}},{key:"getLegendPosition",value:function(){var e=this.props,t=e.legendPosition,a=e.mode,r=e.isViewportWide;return t||(r&&"time-comparison"===a?"top":r&&"item-comparison"===a?"side":"bottom")}},{key:"render",value:function(){var e=this.state,t=e.focusedKeys,a=e.visibleKeys,r=e.width,n=this.props,o=n.baseValue,c=n.chartType,i=n.data,s=n.dateParser,l=n.emptyMessage,u=n.filterParam,m=n.interactiveLegend,d=n.interval,g=n.isRequesting,v=n.isViewportLarge,O=n.itemsLabel,j=n.mode,w=n.query,_=n.screenReaderFormat,E=n.showHeaderControls,C=n.title,N=n.tooltipLabelFormat,S=n.tooltipValueFormat,x=n.tooltipTitle,F=n.valueType,T=n.xFormat,R=n.x2Format,D=n.yBelow1Format,P=n.yFormat,q=u?I(w[u]):[],L=this.getOrderedKeys(t,a,q),M=g?null:this.getVisibleData(i,L),B=this.getLegendPosition(),A="top"===B?"row":"column",V="side"===B?"row":"column",K=this.getChartHeight(),H=g?null:Object(p.createElement)(Gt,{colorScheme:Ot.a,data:L,handleLegendHover:this.handleLegendHover,handleLegendToggle:this.handleLegendToggle,interactive:m,legendDirection:A,legendValueFormat:S,totalLabel:Object(f.sprintf)(O,L.length)}),z=P,Q=D;if(!P)switch(F){case"average":z=",.0f";break;case"currency":z="$.3~s",Q="$.3~f";break;case"number":z=",.0f"}return Object(p.createElement)("div",{className:"woocommerce-chart"},E&&Object(p.createElement)("div",{className:"woocommerce-chart__header"},Object(p.createElement)(Y,{className:"woocommerce-chart__title"},C),"top"===B&&H,this.renderIntervalSelector(),Object(p.createElement)(b.NavigableMenu,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(p.createElement)(b.IconButton,{className:k()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"line"===c}),icon:Object(p.createElement)(y.a,{icon:"line-graph"}),title:Object(f.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===c,role:"menuitemradio",tabIndex:"line"===c?0:-1,onClick:Object(h.partial)(this.handleTypeToggle,"line")}),Object(p.createElement)(b.IconButton,{className:k()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===c}),icon:Object(p.createElement)(y.a,{icon:"stats-alt"}),title:Object(f.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===c,role:"menuitemradio",tabIndex:"bar"===c?0:-1,onClick:Object(h.partial)(this.handleTypeToggle,"bar")}))),Object(p.createElement)(U,{component:!1},Object(p.createElement)("div",{className:k()("woocommerce-chart__body","woocommerce-chart__body-".concat(V)),ref:this.chartBodyRef},"side"===B&&H,g&&Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{className:"screen-reader-text"},Object(f.__)("Your requested data is loading","woocommerce-admin")),Object(p.createElement)(_t,{height:K})),!g&&r>0&&Object(p.createElement)(Wt,{baseValue:o,chartType:c,colorScheme:Ot.a,data:M,dateParser:s,height:K,emptyMessage:l,interval:d,margin:{bottom:50,left:80,right:30,top:0},mode:j,orderedKeys:L,screenReaderFormat:_,tooltipLabelFormat:N,tooltipValueFormat:S,tooltipPosition:v?"over":"below",tooltipTitle:x,valueType:F,width:"row"===V?r-320:r,xFormat:T,x2Format:R,yBelow1Format:Q,yFormat:z})),"bottom"===B&&Object(p.createElement)("div",{className:"woocommerce-chart__footer"},H)))}}]),t}(p.Component);Zt.propTypes={allowedIntervals:v.a.array,baseValue:v.a.number,chartType:v.a.oneOf(["bar","line"]),data:v.a.array.isRequired,dateParser:v.a.string.isRequired,emptyMessage:v.a.string,filterParam:v.a.string,itemsLabel:v.a.string,mode:v.a.oneOf(["item-comparison","time-comparison"]),path:v.a.string,query:v.a.object,interactiveLegend:v.a.bool,interval:v.a.oneOf(["hour","day","week","month","quarter","year"]),intervalData:v.a.object,isRequesting:v.a.bool,legendPosition:v.a.oneOf(["bottom","side","top"]),legendTotals:v.a.object,screenReaderFormat:v.a.oneOfType([v.a.string,v.a.func]),showHeaderControls:v.a.bool,title:v.a.string,tooltipLabelFormat:v.a.oneOfType([v.a.string,v.a.func]),tooltipValueFormat:v.a.oneOfType([v.a.string,v.a.func]),tooltipTitle:v.a.string,valueType:v.a.string,xFormat:v.a.string,x2Format:v.a.string,yBelow1Format:v.a.string,yFormat:v.a.string},Zt.defaultProps={baseValue:0,chartType:"line",data:[],dateParser:"%Y-%m-%dT%H:%M:%S",interactiveLegend:!0,interval:"day",isRequesting:!1,mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",showHeaderControls:!0,tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",xFormat:"%d",x2Format:"%b %Y"};Object(jt.withViewportMatch)({isViewportMobile:"< medium",isViewportLarge:">= large",isViewportWide:">= wide"})(Zt);var ea=function(e){var t=e.count,a=e.label;return a||(a=Object(f.sprintf)(Object(f.__)("Total %d","woocommerce-admin"),t)),Object(p.createElement)("span",{className:"woocommerce-count","aria-label":a},t)};ea.propTypes={count:v.a.number.isRequired,label:v.a.string},ea.defaultProps={label:""};var ta=function(e){var t=e.className,a=e.count,r=e.children,n=e.helpText,o=e.onClick;return a<2?Object(p.createElement)(b.Tooltip,{text:n},Object(p.createElement)("span",{className:t},Object(p.createElement)(b.Button,{className:"woocommerce-compare-button",isDefault:!0,disabled:!0},r))):Object(p.createElement)(b.Button,{className:k()("woocommerce-compare-button",t),isDefault:!0,onClick:o},r)};ta.propTypes={className:v.a.string,count:v.a.number.isRequired,children:v.a.node.isRequired,helpText:v.a.string.isRequired,onClick:v.a.func.isRequired};var aa=ta,ra=function(e){function t(e){var a,r=e.getLabels,n=e.param,o=e.query;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).state={selected:[]},a.clearQuery=a.clearQuery.bind(Object(m.a)(a)),a.updateQuery=a.updateQuery.bind(Object(m.a)(a)),a.updateLabels=a.updateLabels.bind(Object(m.a)(a)),o[n]&&r(o[n],o).then(a.updateLabels),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e,t){var a=e.param,r=e.query,n=t.selected,o=this.props,c=o.getLabels,i=o.param,s=o.query,l=this.state.selected;if(a!==i||n.length>0&&0===l.length)this.clearQuery();else{var u=I(r[i]),m=I(s[i]);Object(h.isEqual)(u.sort(),m.sort())||c(s[i],s).then(this.updateLabels)}}},{key:"clearQuery",value:function(){var e=this.props,t=e.param,a=e.path,r=e.query;this.setState({selected:[]}),B(Object(c.a)({},t,void 0),a,r)}},{key:"updateLabels",value:function(e){this.setState({selected:e})}},{key:"updateQuery",value:function(){var e=this.props,t=e.param,a=e.path,r=e.query,n=this.state.selected.map(function(e){return e.id});B(Object(c.a)({},t,n.join(",")),a,r)}},{key:"render",value:function(){var e=this,t=this.props,a=t.labels,r=t.type,n=this.state.selected;return Object(p.createElement)(W,{title:a.title,className:"woocommerce-filters__compare woocommerce-analytics__card"},Object(p.createElement)("div",{className:"woocommerce-filters__compare-body"},Object(p.createElement)(Re,{type:r,selected:n,placeholder:a.placeholder,onChange:function(t){e.setState({selected:t})}})),Object(p.createElement)("div",{className:"woocommerce-filters__compare-footer"},Object(p.createElement)(aa,{count:n.length,helpText:a.helpText,onClick:this.updateQuery},a.update),n.length>0&&Object(p.createElement)(b.Button,{isLink:!0,onClick:this.clearQuery},Object(f.__)("Clear all","woocommerce-admin"))))}}]),t}(p.Component);ra.propTypes={getLabels:v.a.func.isRequired,labels:v.a.shape({placeholder:v.a.string,title:v.a.string,update:v.a.string}),param:v.a.string.isRequired,path:v.a.string.isRequired,query:v.a.object,type:v.a.string.isRequired},ra.defaultProps={labels:{},query:{}};var na=ra,oa=a(67),ca=function(e){var t=e.date,a=e.machineFormat,r=e.screenReaderFormat,n=e.visibleFormat;return Object(p.createElement)("time",{dateTime:Object(oa.format)(a,t)},Object(p.createElement)("span",{"aria-hidden":"true"},Object(oa.format)(n,t)),Object(p.createElement)("span",{className:"screen-reader-text"},Object(oa.format)(r,t)))};ca.propTypes={date:v.a.oneOfType([v.a.string,v.a.object]).isRequired,machineFormat:v.a.string,screenReaderFormat:v.a.string,visibleFormat:v.a.string},ca.defaultProps={machineFormat:"Y-m-d H:i:s",screenReaderFormat:"F j, Y",visibleFormat:"Y-m-d"};var ia=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.options,r=e.selected,n=e.onSelect,o=e.name,i=e.legend;return Object(p.createElement)("fieldset",{className:"woocommerce-segmented-selection"},Object(p.createElement)("legend",{className:"screen-reader-text"},i),Object(p.createElement)("div",{className:k()(t,"woocommerce-segmented-selection__container")},a.map(function(e){var t=e.value,a=e.label;if(!t||!a)return null;var i=Object(h.uniqueId)("".concat(t,"_"));return Object(p.createElement)("div",{className:"woocommerce-segmented-selection__item",key:t},Object(p.createElement)("input",{className:"woocommerce-segmented-selection__input",type:"radio",name:o,id:i,checked:r===t,onChange:Object(h.partial)(n,Object(c.a)({},o,t))}),Object(p.createElement)("label",{htmlFor:i},Object(p.createElement)("span",{className:"woocommerce-segmented-selection__label"},a)))})))}}]),t}(p.Component);ia.propTypes={className:v.a.string,options:v.a.arrayOf(v.a.shape({value:v.a.string.isRequired,label:v.a.string.isRequired})).isRequired,selected:v.a.string,onSelect:v.a.func.isRequired,name:v.a.string.isRequired,legend:v.a.string.isRequired};var sa=ia,la=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,a=e.compare;return Object(p.createElement)(sa,{options:We,selected:a,onSelect:t,name:"compare",legend:Object(f.__)("compare to","woocommerce-admin")})}}]),t}(p.Component);la.propTypes={onSelect:v.a.func.isRequired,compare:v.a.string};var ua=la,ma=a(280),da={calendarLabel:Object(f.__)("Calendar","woocommerce-admin"),closeDatePicker:Object(f.__)("Close","woocommerce-admin"),focusStartDate:Object(f.__)("Interact with the calendar and select start and end dates.","woocommerce-admin"),clearDate:Object(f.__)("Clear Date","woocommerce-admin"),clearDates:Object(f.__)("Clear Dates","woocommerce-admin"),jumpToPrevMonth:Object(f.__)("Move backward to switch to the previous month.","woocommerce-admin"),jumpToNextMonth:Object(f.__)("Move forward to switch to the next month.","woocommerce-admin"),enterKey:Object(f.__)("Enter key","woocommerce-admin"),leftArrowRightArrow:Object(f.__)("Right and left arrow keys","woocommerce-admin"),upArrowDownArrow:Object(f.__)("up and down arrow keys","woocommerce-admin"),pageUpPageDown:Object(f.__)("page up and page down keys","woocommerce-admin"),homeEnd:Object(f.__)("Home and end keys","woocommerce-admin"),escape:Object(f.__)("Escape key","woocommerce-admin"),questionMark:Object(f.__)("Question mark","woocommerce-admin"),selectFocusedDate:Object(f.__)("Select the date in focus.","woocommerce-admin"),moveFocusByOneDay:Object(f.__)("Move backward (left) and forward (right) by one day.","woocommerce-admin"),moveFocusByOneWeek:Object(f.__)("Move backward (up) and forward (down) by one week.","woocommerce-admin"),moveFocusByOneMonth:Object(f.__)("Switch months.","woocommerce-admin"),moveFocustoStartAndEndOfWeek:Object(f.__)("Go to the first or last day of a week.","woocommerce-admin"),returnFocusToInput:Object(f.__)("Return to the date input field.","woocommerce-admin"),keyboardNavigationInstructions:Object(f.__)("Press the down arrow key to interact with the calendar and\n select a date.","woocommerce-admin"),chooseAvailableStartDate:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("Select %s as a start date.","woocommerce-admin"),t)},chooseAvailableEndDate:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("Select %s as an end date.","woocommerce-admin"),t)},chooseAvailableDate:function(e){return e.date},dateIsUnavailable:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("%s is not selectable.","woocommerce-admin"),t)},dateIsSelected:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("Selected. %s","woocommerce-admin"),t)}},pa=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).onDatesChange=a.onDatesChange.bind(Object(m.a)(a)),a.onFocusChange=a.onFocusChange.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onDatesChange",value:function(e){var t=e.startDate,a=e.endDate,r=this.props,n=r.onUpdate,o=r.shortDateFormat;n({after:t,before:a,afterText:t?t.format(o):"",beforeText:a?a.format(o):"",afterError:null,beforeError:null})}},{key:"onFocusChange",value:function(e){this.props.onUpdate({focusedInput:e||"startDate"})}},{key:"onInputChange",value:function(e,t){var a,r=t.target.value,n=this.props,o=n.after,i=function(e,t,a,r,n){var o=$e(n,t);return o?He()().isBefore(o,"day")?{date:null,error:nt.future}:"after"===e&&a&&o.isAfter(a,"day")?{date:null,error:nt.startAfterEnd}:"before"===e&&r&&o.isBefore(r,"day")?{date:null,error:nt.endBeforeStart}:{date:o}:{date:null,error:nt.invalid}}(e,r,n.before,o,n.shortDateFormat),s=i.date,l=i.error;this.props.onUpdate((a={},Object(c.a)(a,e,s),Object(c.a)(a,e+"Text",r),Object(c.a)(a,e+"Error",r.length>0?l:null),a))}},{key:"setTnitialVisibleMonth",value:function(e,t){return function(){var a=t||He()();return e?a.clone().subtract(1,"month"):a}}},{key:"render",value:function(){var e=this,t=this.props,a=t.after,r=t.before,n=t.focusedInput,o=t.afterText,c=t.beforeText,i=t.afterError,s=t.beforeError,l=t.shortDateFormat,u=t.isViewportMobile,m=t.isViewportSmall,d=t.isInvalidDate,b=u&&!m;return Object(p.createElement)("div",{className:k()("woocommerce-calendar",{"is-mobile":u})},Object(p.createElement)("div",{className:"woocommerce-calendar__inputs"},Object(p.createElement)(ct,{value:o,onChange:Object(h.partial)(this.onInputChange,"after"),dateFormat:l,label:Object(f.__)("Start Date","woocommerce-admin"),error:i,describedBy:Object(f.sprintf)(Object(f.__)("Date input describing a selected date range's start date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("startDate")}}),Object(p.createElement)("div",{className:"woocommerce-calendar__inputs-to"},Object(f.__)("to","woocommerce-admin")),Object(p.createElement)(ct,{value:c,onChange:Object(h.partial)(this.onInputChange,"before"),dateFormat:l,label:Object(f.__)("End Date","woocommerce-admin"),error:s,describedBy:Object(f.sprintf)(Object(f.__)("Date input describing a selected date range's end date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("endDate")}})),Object(p.createElement)("div",{className:"woocommerce-calendar__react-dates"},Object(p.createElement)(ma.DayPickerRangeController,{onDatesChange:this.onDatesChange,onFocusChange:this.onFocusChange,focusedInput:n,startDate:a,endDate:r,orientation:"horizontal",numberOfMonths:b?2:1,isOutsideRange:function(e){return d&&d(e.toDate())},minimumNights:0,hideKeyboardShortcutsPanel:!0,noBorder:!0,isRTL:"rtl"===document.documentElement.dir,initialVisibleMonth:this.setTnitialVisibleMonth(b,r),phrases:da})))}}]),t}(p.Component);pa.propTypes={after:v.a.object,afterError:v.a.string,afterText:v.a.string,before:v.a.object,beforeError:v.a.string,beforeText:v.a.string,focusedInput:v.a.string,isInvalidDate:v.a.func,onUpdate:v.a.func.isRequired,shortDateFormat:v.a.string.isRequired};var fa=Object(jt.withViewportMatch)({isViewportMobile:"< medium",isViewportSmall:"< small"})(pa),ba=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,a=e.period;return Object(p.createElement)(sa,{options:Object(h.filter)(Qe,function(e){return"custom"!==e.value}),selected:a,onSelect:t,name:"period",legend:Object(f.__)("select a preset period","woocommerce-admin")})}}]),t}(p.Component);ba.propTypes={onSelect:v.a.func.isRequired,period:v.a.string};var ha=ba,ga=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).call(this))).onTabSelect=e.onTabSelect.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onTabSelect",value:function(e){var t=this.props,a=t.onUpdate,r=t.period;"period"===e&&"custom"===r&&a({period:"today"})}},{key:"isFutureDate",value:function(e){return He()().isBefore(He()(e),"day")}},{key:"render",value:function(){var e=this,t=this.props,a=t.period,r=t.compare,n=t.after,o=t.before,c=t.onUpdate,i=t.onClose,s=t.onSelect,l=t.isValidSelection,u=t.resetCustomValues,m=t.focusedInput,d=t.afterText,h=t.beforeText,g=t.afterError,v=t.beforeError,O=t.shortDateFormat;return Object(p.createElement)("div",null,Object(p.createElement)(Y,{className:"screen-reader-text",tabIndex:"0"},Object(f.__)("Select date range and comparison","woocommerce-admin")),Object(p.createElement)(U,{component:!1},Object(p.createElement)(Y,{className:"woocommerce-filters-date__text"},Object(f.__)("select a date range","woocommerce-admin")),Object(p.createElement)(b.TabPanel,{tabs:[{name:"period",title:Object(f.__)("Presets","woocommerce-admin"),className:"woocommerce-filters-date__tab"},{name:"custom",title:Object(f.__)("Custom","woocommerce-admin"),className:"woocommerce-filters-date__tab"}],className:"woocommerce-filters-date__tabs",activeClass:"is-active",initialTabName:"custom"===a?"custom":"period",onSelect:this.onTabSelect},function(t){return Object(p.createElement)(p.Fragment,null,"period"===t.name&&Object(p.createElement)(ha,{onSelect:c,period:a}),"custom"===t.name&&Object(p.createElement)(fa,{after:n,before:o,onUpdate:c,isInvalidDate:e.isFutureDate,focusedInput:m,afterText:d,beforeText:h,afterError:g,beforeError:v,shortDateFormat:O}),Object(p.createElement)("div",{className:k()("woocommerce-filters-date__content-controls",{"is-custom":"custom"===t.name})},Object(p.createElement)(Y,{className:"woocommerce-filters-date__text"},Object(f.__)("compare to","woocommerce-admin")),Object(p.createElement)(ua,{onSelect:c,compare:r}),Object(p.createElement)("div",{className:"woocommerce-filters-date__button-group"},"custom"===t.name&&Object(p.createElement)(b.Button,{className:"woocommerce-filters-date__button",isDefault:!0,onClick:u,disabled:!(n||o)},Object(f.__)("Reset","woocommerce-admin")),l(t.name)?Object(p.createElement)(b.Button,{className:"woocommerce-filters-date__button",onClick:s(t.name,i),isPrimary:!0},Object(f.__)("Update","woocommerce-admin")):Object(p.createElement)(b.Button,{className:"woocommerce-filters-date__button",isPrimary:!0,disabled:!0},Object(f.__)("Update","woocommerce-admin")))))})))}}]),t}(p.Component);ga.propTypes={period:v.a.string.isRequired,compare:v.a.string.isRequired,onUpdate:v.a.func.isRequired,onClose:v.a.func.isRequired,onSelect:v.a.func.isRequired,resetCustomValues:v.a.func.isRequired,focusedInput:v.a.string,afterText:v.a.string,beforeText:v.a.string,afterError:v.a.string,beforeError:v.a.string,shortDateFormat:v.a.string.isRequired};var va=ga,Oa=function(e){var t=e.labels,a=e.isOpen,r=Object(K.a)(e,["labels","isOpen"]),n=k()("woocommerce-dropdown-button",{"is-open":a,"is-multi-line":t.length>1});return Object(p.createElement)(b.Button,Object($.a)({className:n,"aria-expanded":a},r),Object(p.createElement)("div",{className:"woocommerce-dropdown-button__labels"},t.map(function(e,t){return Object(p.createElement)("span",{key:t},e)})))};Oa.propTypes={labels:v.a.array.isRequired,isOpen:v.a.bool};var ya=Oa,ja=Object(f.__)("MM/DD/YYYY","woocommerce-admin"),wa=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state=a.getResetState(),a.dropdownRef=Object(p.createRef)(),a.update=a.update.bind(Object(m.a)(a)),a.onSelect=a.onSelect.bind(Object(m.a)(a)),a.isValidSelection=a.isValidSelection.bind(Object(m.a)(a)),a.resetCustomValues=a.resetCustomValues.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getResetState",value:function(){var e=Ze(this.props.query),t=e.period,a=e.compare,r=e.before,n=e.after;return{period:t,compare:a,before:r,after:n,focusedInput:"startDate",afterText:n?n.format(ja):"",beforeText:r?r.format(ja):"",afterError:null,beforeError:null}}},{key:"update",value:function(e){this.setState(e)}},{key:"onSelect",value:function(e,t){var a=this,r=this.props.onRangeSelect;return function(n){var o=a.state,c=o.period,i=o.compare,s=o.after,l=o.before,u={period:"custom"===e?"custom":c,compare:i};"custom"===e?(u.after=s?s.format(ze):"",u.before=l?l.format(ze):""):(u.after=void 0,u.before=void 0),r(u),t(n)}}},{key:"getButtonLabel",value:function(){var e=et(this.props.query),t=e.primary,a=e.secondary;return["".concat(t.label," (").concat(t.range,")"),"".concat(Object(f.__)("vs.","woocommerce-admin")," ").concat(a.label," (").concat(a.range,")")]}},{key:"isValidSelection",value:function(e){var t=this.state,a=t.compare,r=t.after,n=t.before;return"custom"!==e||a&&r&&n}},{key:"resetCustomValues",value:function(){this.setState({after:null,before:null,focusedInput:"startDate",afterText:"",beforeText:"",afterError:null,beforeError:null})}},{key:"render",value:function(){var e=this,t=this.state,a=t.period,r=t.compare,n=t.after,o=t.before,c=t.focusedInput,i=t.afterText,s=t.beforeText,l=t.afterError,u=t.beforeError;return Object(p.createElement)("div",{className:"woocommerce-filters-filter"},Object(p.createElement)("span",{className:"woocommerce-filters-label"},Object(f.__)("Date Range","woocommerce-admin"),":"),Object(p.createElement)(b.Dropdown,{ref:this.dropdownRef,contentClassName:"woocommerce-filters-date__content",position:"bottom",expandOnMobile:!0,renderToggle:function(t){var a=t.isOpen,r=t.onToggle;return Object(p.createElement)(ya,{onClick:r,isOpen:a,labels:e.getButtonLabel()})},renderContent:function(t){var m=t.onClose;return Object(p.createElement)(va,{period:a,compare:r,after:n,before:o,onUpdate:e.update,onClose:m,onSelect:e.onSelect,isValidSelection:e.isValidSelection,resetCustomValues:e.resetCustomValues,focusedInput:c,afterText:i,beforeText:s,afterError:l,beforeError:u,shortDateFormat:ja})}}))}}]),t}(p.Component);wa.propTypes={onRangeSelect:v.a.func.isRequired,query:v.a.object},wa.defaultProps={query:{}};var _a=wa,ka=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.src,a=e.alt,r=Object(K.a)(e,["src","alt"]),n=t;return 0===n.indexOf("/")&&(n=n.substring(1),n=wcSettings.wcAdminAssetUrl+n),Object(p.createElement)("img",Object($.a)({src:n,alt:a||""},r))}}]),t}(p.Component);ka.propTypes={src:v.a.string.isRequired,alt:v.a.string.isRequired};var Ea=ka,Ca=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"renderIllustration",value:function(){var e=this.props,t=e.illustrationWidth,a=e.illustrationHeight,r=e.illustration;return Object(p.createElement)(Ea,{alt:"",src:r,width:t,height:a,className:"woocommerce-empty-content__illustration"})}},{key:"renderActionButtons",value:function(e){var t="secondary"===e?this.props.secondaryActionLabel:this.props.actionLabel,a="secondary"===e?this.props.secondaryActionURL:this.props.actionURL,r="secondary"===e?this.props.secondaryActionCallback:this.props.actionCallback,n="secondary"!==e;return a&&r?Object(p.createElement)(b.Button,{className:"woocommerce-empty-content__action",isPrimary:n,onClick:r,href:a},t):a?Object(p.createElement)(b.Button,{className:"woocommerce-empty-content__action",isPrimary:n,href:a},t):r?Object(p.createElement)(b.Button,{className:"woocommerce-empty-content__action",isPrimary:n,onClick:r},t):null}},{key:"renderActions",value:function(){var e=this.props,t=e.actionLabel,a=e.secondaryActionLabel;return Object(p.createElement)("div",{className:"woocommerce-empty-content__actions"},t&&this.renderActionButtons("primary"),a&&this.renderActionButtons("secondary"))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.title,r=e.message,n=e.illustration;return Object(p.createElement)("div",{className:k()("woocommerce-empty-content",t)},n&&this.renderIllustration(),a?Object(p.createElement)(Y,{className:"woocommerce-empty-content__title"},a):null,r?Object(p.createElement)("p",{className:"woocommerce-empty-content__message"},r):null,this.renderActions())}}]),t}(p.Component);Ca.propTypes={title:v.a.string.isRequired,message:v.a.string,illustration:v.a.string,illustrationHeight:v.a.number,illustrationWidth:v.a.number,actionLabel:v.a.string.isRequired,actionURL:v.a.string,actionCallback:v.a.func,secondaryActionLabel:v.a.string,secondaryActionURL:v.a.string,secondaryActionCallback:v.a.func,className:v.a.string},Ca.defaultProps={illustration:"/empty-content.svg",illustrationWidth:400};var Na=a(71),Sa=function(e){function t(e){var a;Object(i.a)(this,t);var r=(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).getFilter();if(a.state={nav:r.path||[],animate:null,selectedTag:null},a.selectSubFilter=a.selectSubFilter.bind(Object(m.a)(a)),a.getVisibleFilters=a.getVisibleFilters.bind(Object(m.a)(a)),a.updateSelectedTag=a.updateSelectedTag.bind(Object(m.a)(a)),a.onTagChange=a.onTagChange.bind(Object(m.a)(a)),a.onContentMount=a.onContentMount.bind(Object(m.a)(a)),a.goBack=a.goBack.bind(Object(m.a)(a)),r.settings&&r.settings.getLabels){var n=a.props.query,o=r.settings,c=o.param;(0,o.getLabels)(n[c],n).then(a.updateSelectedTag)}return a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=e.query,a=this.props,r=a.query,n=a.config;if(t[n.param]!==r[[n.param]]){var o=this.getFilter();if(o&&"Search"===o.component){this.setState({nav:o.path||[]});var c=o.settings,i=c.param;(0,c.getLabels)(r[i],r).then(this.updateSelectedTag)}}}},{key:"updateSelectedTag",value:function(e){this.setState({selectedTag:e[0]})}},{key:"getFilter",value:function(e){var t=this.props,a=t.config,r=t.query,n=function e(t){var a=[];return t.forEach(function(t){if(t.subFilters){a.push(Object(h.omit)(t,"subFilters"));var r=e(t.subFilters);a.push.apply(a,Object(o.a)(r))}else a.push(t)}),a}(a.filters);return e=e||r[a.param]||a.defaultValue||"all",Object(h.find)(n,{value:e})||{}}},{key:"getButtonLabel",value:function(e){if("Search"===e.component){var t=this.state.selectedTag;return[t&&t.label,Object(h.get)(e,"settings.labels.button")]}return e?[e.label]:[]}},{key:"getVisibleFilters",value:function(e,t){if(0===t.length)return e;var a=t[0],r=Object(h.find)(e,{value:a});return this.getVisibleFilters(r&&r.subFilters,t.slice(1))}},{key:"selectSubFilter",value:function(e){this.setState(function(t){return{nav:[].concat(Object(o.a)(t.nav),[e]),animate:"left"}})}},{key:"goBack",value:function(){this.setState(function(e){return{nav:e.nav.slice(0,-1),animate:"right"}})}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=this.props,r=a.path,o=a.query,i=a.config,s=a.onFilterSelect,l=q(o),u=Object(n.a)(Object(c.a)({},i.param,(i.defaultValue||"all")===e?void 0:e),t);i.staticParams.forEach(function(e){u[e]=o[e]}),B(u,r,l),s(u)}},{key:"onTagChange",value:function(e,t,a,r){var n=Object(h.last)(r),o=e.value,i=e.settings.param;n?(this.update(o,Object(c.a)({},i,n.id)),t()):this.update(a.defaultValue||"all"),this.updateSelectedTag([n])}},{key:"renderButton",value:function(e,t,a){var r=this;if(e.component){var n=e.settings,o=n.type,c=n.labels,i=this.getFilter().value===e.value?this.state.selectedTag:null;return Object(p.createElement)(Re,{className:"woocommerce-filters-filter__search",type:o,placeholder:c.placeholder,selected:i?[i]:[],onChange:Object(h.partial)(this.onTagChange,e,t,a),inlineTags:!0,staticResults:!0})}var s=Object(h.partial)(this.selectSubFilter,e.value);return Object(p.createElement)(b.Button,{className:"woocommerce-filters-filter__button",onClick:e.subFilters?s:function(a){t(a),r.update(e.value,e.query||{}),r.setState({selectedTag:null})}},e.label)}},{key:"onContentMount",value:function(e){var t=this.state.nav,a=!!t.length&&this.getFilter(t[t.length-1])?1:0,r=Na.focus.tabbable.find(e)[a];setTimeout(function(){r.focus()},0)}},{key:"render",value:function(){var e=this,t=this.props.config,a=this.state,r=a.nav,n=a.animate,o=this.getVisibleFilters(t.filters,r),c=!!r.length&&this.getFilter(r[r.length-1]),i=this.getFilter();return Object(p.createElement)("div",{className:"woocommerce-filters-filter"},t.label&&Object(p.createElement)("span",{className:"woocommerce-filters-label"},t.label,":"),Object(p.createElement)(b.Dropdown,{contentClassName:"woocommerce-filters-filter__content",position:"bottom",expandOnMobile:!0,headerTitle:Object(f.__)("filter report to show:","woocommerce-admin"),renderToggle:function(t){var a=t.isOpen,r=t.onToggle;return Object(p.createElement)(ya,{onClick:r,isOpen:a,labels:e.getButtonLabel(i)})},renderContent:function(a){var s=a.onClose;return Object(p.createElement)(gt,{animationKey:r,animate:n,onExited:e.onContentMount},function(){return Object(p.createElement)("ul",{className:"woocommerce-filters-filter__content-list"},c&&Object(p.createElement)("li",{className:"woocommerce-filters-filter__content-list-item"},Object(p.createElement)(b.IconButton,{className:"woocommerce-filters-filter__button",onClick:e.goBack,icon:"arrow-left-alt2"},c.label)),o.map(function(a){return Object(p.createElement)("li",{key:a.value,className:k()("woocommerce-filters-filter__content-list-item",{"is-selected":i.value===a.value||i.path&&Object(h.includes)(i.path,a.value)})},e.renderButton(a,s,t))}))})}}))}}]),t}(p.Component);Sa.propTypes={config:v.a.shape({label:v.a.string,staticParams:v.a.array.isRequired,param:v.a.string.isRequired,defaultValue:v.a.string,showFilters:v.a.func.isRequired,filters:v.a.arrayOf(v.a.shape({chartMode:v.a.oneOf(["item-comparison","time-comparison"]),component:v.a.string,label:v.a.string,path:v.a.string,subFilters:v.a.array,value:v.a.string.isRequired}))}).isRequired,path:v.a.string.isRequired,query:v.a.object,onFilterSelect:v.a.func},Sa.defaultProps={query:{},onFilterSelect:function(){}};var xa=Sa,Fa=a(170),Ta=a(171),Ra=a.n(Ta),Da=a(281),Pa=a.n(Da),qa=function(e){var t,a,r,n,o=e.alt,c=e.title,i=e.size,s=e.user,l=e.className,u=k()("woocommerce-gravatar",l,{"is-placeholder":!s}),m=o||s&&(s.display_name||s.name)||"",d="https://www.gravatar.com/avatar/0?s="+i+"&d=mp";return s&&(t=Object(h.isString)(s)?(n=s,"https://www.gravatar.com/avatar/"+Pa.a.createHash("md5").update(n).digest("hex")):s.avatar_URLs[96],a=Ra.a.parse(t),(r=Object(Fa.parse)(a.query)).s=i,r.d="mp",a.search=Object(Fa.stringify)(r),d=Ra.a.format(a)),Object(p.createElement)("img",{alt:m,title:c,className:u,src:d,width:i,height:i})};qa.propTypes={user:v.a.oneOfType([v.a.object,v.a.string]),alt:v.a.string,title:v.a.string,size:v.a.number,className:v.a.string},qa.defaultProps={size:60};var Ia=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).onClick=e.onClick.bind(Object(m.a)(e)),e.onFocusFormToggle=e.onFocusFormToggle.bind(Object(m.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(m.a)(e)),e.container=Object(p.createRef)(),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onClick",value:function(e){var t=this.props,a=t.isClickable,r=t.onInvoke;a&&(e.preventDefault(),r())}},{key:"onKeyDown",value:function(e){e.target.isSameNode(e.currentTarget)&&(e.keyCode!==ae.ENTER&&e.keyCode!==ae.SPACE||(e.preventDefault(),this.props.onInvoke()),e.keyCode===ae.UP&&e.preventDefault(),e.keyCode===ae.DOWN&&(e.preventDefault(),(e.target.nextSibling||e.target.parentNode.querySelector(".woocommerce-ellipsis-menu__item")).focus()))}},{key:"onFocusFormToggle",value:function(){this.container.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.checked,a=e.children;return e.isCheckbox?Object(p.createElement)("div",{"aria-checked":t,ref:this.container,role:"menuitemcheckbox",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},Object(p.createElement)(b.BaseControl,{className:"components-toggle-control"},Object(p.createElement)(b.FormToggle,{"aria-hidden":"true",checked:t,onChange:this.props.onInvoke,onFocus:this.onFocusFormToggle,onClick:function(e){return e.stopPropagation()},tabIndex:"-1"}),a)):Object(p.createElement)("div",{role:"menuitem",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},a)}}]),t}(p.Component);Ia.propTypes={checked:v.a.bool,children:v.a.node,isCheckbox:v.a.bool,isClickable:v.a.bool,onInvoke:v.a.func.isRequired},Ia.defaultProps={isClickable:!1,isCheckbox:!1};var La=Ia,Ma=function(e){var t=e.children;return Object(p.createElement)("div",{className:"woocommerce-ellipsis-menu__title"},t)};Ma.propTypes={children:v.a.node};var Ba=Ma,Aa=function(e){var t=e.order,a=e.className,r=t.status,n=wcSettings.orderStatuses,o=k()("woocommerce-order-status",a),i=k()("woocommerce-order-status__indicator",Object(c.a)({},"is-"+r,!0)),s=n[r]||r;return Object(p.createElement)("div",{className:o},Object(p.createElement)("span",{className:i}),s)};Aa.propTypes={order:v.a.object.isRequired,className:v.a.string};var Va=[25,50,75,100],Ka=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state={inputValue:a.props.page},a.previousPage=a.previousPage.bind(Object(m.a)(a)),a.nextPage=a.nextPage.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a.onInputBlur=a.onInputBlur.bind(Object(m.a)(a)),a.perPageChange=a.perPageChange.bind(Object(m.a)(a)),a.selectInputValue=a.selectInputValue.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"previousPage",value:function(e){e.stopPropagation();var t=this.props,a=t.page,r=t.onPageChange;a-1<1||r(a-1)}},{key:"nextPage",value:function(e){e.stopPropagation();var t=this.props,a=t.page,r=t.onPageChange;a+1>this.pageCount||r(a+1)}},{key:"perPageChange",value:function(e){var t=this.props,a=t.onPerPageChange,r=t.onPageChange,n=t.total,o=t.page;a(parseInt(e));var c=Math.ceil(n/parseInt(e));o>c&&r(c)}},{key:"onInputChange",value:function(e){this.setState({inputValue:e.target.value})}},{key:"onInputBlur",value:function(e){var t=this.props,a=t.onPageChange,r=t.page,n=parseInt(e.target.value,10);n!==r&&Object(h.isFinite)(n)&&n>0&&this.pageCount&&this.pageCount>=n&&a(n)}},{key:"selectInputValue",value:function(e){e.target.select()}},{key:"renderPageArrows",value:function(){var e=this.props.page;if(this.pageCount<=1)return null;var t=k()("woocommerce-pagination__link",{"is-active":e>1}),a=k()("woocommerce-pagination__link",{"is-active":e<this.pageCount});return Object(p.createElement)("div",{className:"woocommerce-pagination__page-arrows"},Object(p.createElement)("span",{className:"woocommerce-pagination__page-arrows-label",role:"status","aria-live":"polite"},Object(f.sprintf)(Object(f.__)("Page %d of %d","woocommerce-admin"),e,this.pageCount)),Object(p.createElement)("div",{className:"woocommerce-pagination__page-arrows-buttons"},Object(p.createElement)(b.IconButton,{className:t,disabled:!(e>1),onClick:this.previousPage,icon:"arrow-left-alt2",label:Object(f.__)("Previous Page","woocommerce-admin"),size:18}),Object(p.createElement)(b.IconButton,{className:a,disabled:!(e<this.pageCount),onClick:this.nextPage,icon:"arrow-right-alt2",label:Object(f.__)("Next Page","woocommerce-admin"),size:18})))}},{key:"renderPagePicker",value:function(){var e=this.props.page,t=this.state.inputValue,a=e<1||e>this.pageCount,r=k()("woocommerce-pagination__page-picker-input",{"has-error":a}),n=Object(h.uniqueId)("woocommerce-pagination-page-picker-");return Object(p.createElement)("div",{className:"woocommerce-pagination__page-picker"},Object(p.createElement)("label",{htmlFor:n,className:"woocommerce-pagination__page-picker-label"},Object(f.__)("Go to page","woocommerce-admin"),Object(p.createElement)("input",{id:n,className:r,"aria-invalid":a,type:"number",onClick:this.selectInputValue,onChange:this.onInputChange,onBlur:this.onInputBlur,value:t,min:1,max:this.pageCount})))}},{key:"renderPerPagePicker",value:function(){var e=Va.map(function(e){return{value:e,label:e}});return Object(p.createElement)("div",{className:"woocommerce-pagination__per-page-picker"},Object(p.createElement)(b.SelectControl,{label:Object(f.__)("Rows per page","woocommerce-admin"),value:this.props.perPage,onChange:this.perPageChange,options:e}))}},{key:"render",value:function(){var e=this.props,t=e.total,a=e.perPage,r=e.className;this.pageCount=Math.ceil(t/a);var n=k()("woocommerce-pagination",r);return this.pageCount<=1?t>Va[0]&&Object(p.createElement)("div",{className:n},this.renderPerPagePicker())||null:Object(p.createElement)("div",{className:n},this.renderPageArrows(),this.renderPagePicker(),this.renderPerPagePicker())}}]),t}(p.Component);Ka.propTypes={page:v.a.number.isRequired,onPageChange:v.a.func,perPage:v.a.number.isRequired,onPerPageChange:v.a.func,total:v.a.number.isRequired,className:v.a.string},Ka.defaultProps={onPageChange:h.noop,onPerPageChange:h.noop};var Ha=Ka,Ya=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"stars",value:function(){for(var e=this.props,t=e.size,a=e.totalStars,r={width:t+"px",height:t+"px"},n=[],o=0;o<a;o++)n.push(Object(p.createElement)(y.a,{key:"star-"+o,icon:"star",style:r}));return n}},{key:"render",value:function(){var e=this.props,t=e.rating,a=e.totalStars,r=e.className,n=k()("woocommerce-rating",r),o=100/a,c={width:Math.round(o*t)+"%"},i=Object(f.sprintf)(Object(f.__)("%1$s out of %2$s stars.","woocommerce-admin"),t,a);return Object(p.createElement)("div",{className:n,"aria-label":i},this.stars(),Object(p.createElement)("div",{className:"woocommerce-rating__star-outline",style:c},this.stars()))}}]),t}(p.Component);Ya.propTypes={rating:v.a.number,totalStars:v.a.number,size:v.a.number,className:v.a.string},Ya.defaultProps={rating:0,totalStars:5,size:18};var Ua=Ya,za=function(e){var t=e.product,a=Object(K.a)(e,["product"]),r=t&&t.average_rating||0;return Object(p.createElement)(Ua,Object($.a)({rating:r},a))};za.propTypes={product:v.a.object.isRequired};var Qa=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).call(this))).renderCard=e.renderCard.bind(Object(m.a)(e)),e.onRangeSelect=e.onRangeSelect.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"renderCard",value:function(e){var t=this.props,a=t.advancedFilters,r=t.query,n=t.path,o=t.onAdvancedFilterAction,c=e.filters,i=e.param;if(!r[i])return null;if(0===r[i].indexOf("compare")){var s=Object(h.find)(c,{value:r[i]});if(!s)return null;var l=s.settings,u=void 0===l?{}:l;return Object(p.createElement)("div",{key:i,className:"woocommerce-filters__advanced-filters"},Object(p.createElement)(na,Object($.a)({path:n,query:r},u)))}return"advanced"===r[i]?Object(p.createElement)("div",{key:i,className:"woocommerce-filters__advanced-filters"},Object(p.createElement)(ft,{config:a,path:n,query:r,onAdvancedFilterAction:o})):void 0}},{key:"onRangeSelect",value:function(e){var t=this.props,a=t.query,r=t.path,n=t.onDateSelect;B(e,r,a),n(e)}},{key:"render",value:function(){var e=this.props,t=e.filters,a=e.query,r=e.path,n=e.showDatePicker,o=e.onFilterSelect;return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(Y,{className:"screen-reader-text"},Object(f.__)("Filters","woocommerce-admin")),Object(p.createElement)(U,{component:"div",className:"woocommerce-filters"},Object(p.createElement)("div",{className:"woocommerce-filters__basic-filters"},n&&Object(p.createElement)(_a,{key:JSON.stringify(a),query:a,onRangeSelect:this.onRangeSelect}),t.map(function(e){if(e.showFilters(a))return Object(p.createElement)(xa,{key:e.param,config:e,query:a,path:r,onFilterSelect:o})})),t.map(this.renderCard)))}}]),t}(p.Component);Qa.propTypes={advancedFilters:v.a.object,filters:v.a.array,path:v.a.string.isRequired,query:v.a.object,showDatePicker:v.a.bool,onDateSelect:v.a.func,onFilterSelect:v.a.func,onAdvancedFilterAction:v.a.func},Qa.defaultProps={advancedFilters:{},filters:[],query:{},showDatePicker:!0,onDateSelect:function(){}};var Wa=function(e){var t=e.review,a=Object(K.a)(e,["review"]),r=t&&t.rating||0;return Object(p.createElement)(Ua,Object($.a)({rating:r},a))};Wa.propTypes={review:v.a.object.isRequired};function $a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,a=Object(h.groupBy)(e,"parent"),r=Object(h.keyBy)(t,"id"),c=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.parent)return t.name?[t.name]:[];var a=e(r[t.parent]);return[].concat(Object(o.a)(a),[t.name])},i=function e(t){return t.map(function(t){var o=a[t.id];return delete a[t.id],Object(n.a)({},t,{breadcrumbs:c(r[t.parent]),children:o&&o.length?e(o):[]})})},s=i(a[0]||[]);return delete a[0],Object(h.forEach)(a,function(e){s.push.apply(s,Object(o.a)(i(e||[])))}),s}var Ga=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#1E8CBE",d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))})},Ja=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#6C7781",d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}))})},Xa=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},Za=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})};function er(e,t){if(!t)return e;var a=new RegExp(Object(h.escapeRegExp)(t),"ig");return e.replace(a,"<strong>$&</strong>")}var tr=function(e){var t=e.countLabel,a=e.className,r=e.depth,n=void 0===r?0:r,o=e.item,c=e.isSelected,i=e.isSingle,s=e.onSelect,l=e.search,u=void 0===l?"":l,m=e.showCount,d=void 0!==m&&m,f=Object(K.a)(e,["countLabel","className","depth","item","isSelected","isSingle","onSelect","search","showCount"]),g=[a,"woocommerce-search-list__item"];g.push("depth-".concat(n)),i&&g.push("is-radio-button");var v,O=o.breadcrumbs&&o.breadcrumbs.length;return Object(p.createElement)(b.MenuItem,Object($.a)({role:i?"menuitemradio":"menuitemcheckbox",className:g.join(" "),onClick:s(o),isSelected:c},f),Object(p.createElement)("span",{className:"woocommerce-search-list__item-state"},function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?t?Object(p.createElement)(Xa,null):Object(p.createElement)(Za,null):t?Object(p.createElement)(Ga,null):Object(p.createElement)(Ja,null)}(i,c)),Object(p.createElement)("span",{className:"woocommerce-search-list__item-label"},O?Object(p.createElement)("span",{className:"woocommerce-search-list__item-prefix"},1===(v=o.breadcrumbs).length?Object(h.first)(v):2===v.length?Object(h.first)(v)+" › "+Object(h.last)(v):Object(h.first)(v)+" … "+Object(h.last)(v)):null,Object(p.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:er(o.name,u)}})),!!d&&Object(p.createElement)("span",{className:"woocommerce-search-list__item-count"},t||o.count))};tr.propTypes={className:v.a.string,countLabel:v.a.node,depth:v.a.number,item:v.a.object,isSelected:v.a.bool,isSingle:v.a.bool,onSelect:v.a.func,search:v.a.string,showCount:v.a.bool};var ar=tr,rr={clear:Object(f.__)("Clear all selected items","woocommerce-admin"),list:Object(f.__)("Results","woocommerce-admin"),noItems:Object(f.__)("No items found.","woocommerce-admin"),noResults:Object(f.__)("No results for %s","woocommerce-admin"),search:Object(f.__)("Search for items","woocommerce-admin"),selected:function(e){return Object(f.sprintf)(Object(f._n)("%d item selected","%d items selected",e,"woocommerce-admin"),e)},updated:Object(f.__)("Search results updated.","woocommerce-admin")},nr=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).onSelect=e.onSelect.bind(Object(m.a)(e)),e.onRemove=e.onRemove.bind(Object(m.a)(e)),e.onClear=e.onClear.bind(Object(m.a)(e)),e.isSelected=e.isSelected.bind(Object(m.a)(e)),e.defaultRenderItem=e.defaultRenderItem.bind(Object(m.a)(e)),e.renderList=e.renderList.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.onSearch,r=t.search;r!==e.search&&"function"==typeof a&&a(r)}},{key:"onRemove",value:function(e){var t=this.props,a=t.isSingle,r=t.onChange,n=t.selected;return function(){a&&r([]);var t=Object(h.findIndex)(n,{id:e});r([].concat(Object(o.a)(n.slice(0,t)),Object(o.a)(n.slice(t+1))))}}},{key:"onSelect",value:function(e){var t=this,a=this.props,r=a.isSingle,n=a.onChange,c=a.selected;return function(){t.isSelected(e)?t.onRemove(e.id)():n(r?[e]:[].concat(Object(o.a)(c),[e]))}}},{key:"onClear",value:function(){this.props.onChange([])}},{key:"isSelected",value:function(e){return-1!==Object(h.findIndex)(this.props.selected,{id:e.id})}},{key:"getFilteredList",value:function(e,t){var a=this.props.isHierarchical;if(!t)return a?$a(e):e;var r=Object(n.a)({},rr,this.props.messages),o=new RegExp(Object(h.escapeRegExp)(t),"i");this.props.debouncedSpeak(r.updated);var c=e.map(function(e){return!!o.test(e.name)&&e}).filter(Boolean);return a?$a(c,e):c}},{key:"defaultRenderItem",value:function(e){return Object(p.createElement)(ar,e)}},{key:"renderList",value:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props,n=r.isSingle,o=r.search,c=this.props.renderItem||this.defaultRenderItem;return e?e.map(function(e){return Object(p.createElement)(p.Fragment,{key:e.id},c({item:e,isSelected:t.isSelected(e),onSelect:t.onSelect,isSingle:n,search:o,depth:a}),t.renderList(e.children,a+1))}):null}},{key:"renderListSection",value:function(){var e=this.props,t=e.isLoading,a=e.search,r=this.getFilteredList(this.props.list,a),o=Object(n.a)({},rr,this.props.messages);return t?Object(p.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(p.createElement)(b.Spinner,null)):r.length?Object(p.createElement)(b.MenuGroup,{label:o.list,className:"woocommerce-search-list__list"},this.renderList(r)):Object(p.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(p.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(p.createElement)(y.a,{icon:"notice-outline",role:"img","aria-hidden":"true",focusable:"false"})),Object(p.createElement)("span",{className:"woocommerce-search-list__not-found-text"},a?Object(f.sprintf)(o.noResults,a):o.noItems))}},{key:"renderSelectedSection",value:function(){var e=this,t=this.props,a=t.isLoading,r=t.isSingle,o=t.selected,c=Object(n.a)({},rr,this.props.messages);if(a||r||!o)return null;var i=o.length;return Object(p.createElement)("div",{className:"woocommerce-search-list__selected"},Object(p.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(p.createElement)("strong",null,c.selected(i)),i>0?Object(p.createElement)(b.Button,{isLink:!0,isDestructive:!0,onClick:this.onClear,"aria-label":c.clear},Object(f.__)("Clear all","woocommerce-admin")):null),o.map(function(t,a){return Object(p.createElement)(Fe,{key:a,label:t.name,id:t.id,remove:e.onRemove})}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=void 0===t?"":t,r=e.search,o=e.setState,c=Object(n.a)({},rr,this.props.messages);return Object(p.createElement)("div",{className:"woocommerce-search-list ".concat(a)},this.renderSelectedSection(),Object(p.createElement)("div",{className:"woocommerce-search-list__search"},Object(p.createElement)(b.TextControl,{label:c.search,type:"search",value:r,onChange:function(e){return o({search:e})}})),this.renderListSection())}}]),t}(p.Component);nr.propTypes={className:v.a.string,isHierarchical:v.a.bool,isLoading:v.a.bool,isSingle:v.a.bool,list:v.a.arrayOf(v.a.shape({id:v.a.number,name:v.a.string})),messages:v.a.shape({clear:v.a.string,list:v.a.string,noItems:v.a.string,noResults:v.a.string,search:v.a.string,selected:v.a.func,updated:v.a.string}),onChange:v.a.func.isRequired,onSearch:v.a.func,renderItem:v.a.func,selected:v.a.array.isRequired,search:v.a.string,setState:v.a.func,debouncedSpeak:v.a.func,instanceId:v.a.number};var or=Object(te.compose)([Object(te.withState)({search:""}),b.withSpokenMessages,te.withInstanceId])(nr),cr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.children,a=e.menu,r=e.title,n=k()("woocommerce-section-header",this.props.className);return Object(p.createElement)("div",{className:n},Object(p.createElement)(Y,{className:"woocommerce-section-header__title woocommerce-section-header__header-item"},r),Object(p.createElement)("hr",{role:"presentation"}),t&&Object(p.createElement)("div",{className:"woocommerce-section-header__actions woocommerce-section-header__header-item"},t),a&&Object(p.createElement)("div",{className:"woocommerce-section-header__menu woocommerce-section-header__header-item"},a))}}]),t}(p.Component);cr.propTypes={className:v.a.string,menu:z(V),title:v.a.oneOfType([v.a.string,v.a.node]).isRequired};var ir=function(e){var t=e.isPrimary,a=e.mainIcon,r=e.mainLabel,n=e.onClick,o=e.menuLabel,c=e.controls,i=e.className;if(!c||!c.length)return null;var s=a&&b.IconButton||b.Button,l=k()("woocommerce-split-button",i,{"is-primary":t,"has-label":r});return Object(p.createElement)("div",{className:l},Object(p.createElement)(s,{icon:a,className:"woocommerce-split-button__main-action",onClick:n},r),Object(p.createElement)(b.Dropdown,{className:"woocommerce-split-button__menu",position:"bottom left",contentClassName:"woocommerce-split-button__menu-popover",expandOnMobile:!0,headerTitle:o,renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(p.createElement)(b.IconButton,{icon:t?"arrow-up":"arrow-down",className:k()("woocommerce-split-button__menu-toggle",{"is-active":t}),onClick:a,"aria-haspopup":"true","aria-expanded":t,label:o,tooltip:o})},renderContent:function(e){var t=e.onClose;return Object(p.createElement)(b.NavigableMenu,{className:"woocommerce-split-button__menu-wrapper",role:"menu","aria-label":o},c.map(function(e,a){var r=e.icon&&b.IconButton||b.Button;return Object(p.createElement)(r,{key:a,onClick:function(a){a.stopPropagation(),t(),e.onClick&&e.onClick()},className:"woocommerce-split-button__menu-item",icon:e.icon||"",role:"menuitem"},e.label)}))}}))};ir.propTypes={isPrimary:v.a.bool,mainIcon:v.a.node,mainLabel:v.a.string,onClick:v.a.func,menuLabel:v.a.string,controls:v.a.arrayOf(v.a.shape({icon:v.a.oneOfType([v.a.string,v.a.element]),label:v.a.string.isRequired,onClick:v.a.func})).isRequired,className:v.a.string},ir.defaultProps={isPrimary:!1,onClick:h.noop};var sr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.className,t=k()("woocommerce-spinner",e);return Object(p.createElement)("svg",{className:t,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)("circle",{className:"woocommerce-spinner__circle",fill:"none",strokeWidth:"5",strokeLinecap:"round",cx:"50",cy:"50",r:"30"}))}}]),t}(p.Component);sr.propTypes={className:v.a.string};var lr=sr,ur=function(){return Object(p.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"14",height:"12"},Object(p.createElement)("path",{d:"M6.59631 11.9062L3.46881 8.77875L2.40381 9.83625L6.59631 14.0287L15.5963 5.02875L14.5388 3.97125L6.59631 11.9062Z",fill:"white"})),Object(p.createElement)("g",{mask:"url(#mask0)"},Object(p.createElement)("rect",{width:"18",height:"18",fill:"white"})))},mr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.currentStep,r=e.steps,n=e.direction,o=e.isPending,c=r.findIndex(function(e){return a===e.key}),i=k()("woocommerce-stepper",t,{"is-vertical":"vertical"===n});return Object(p.createElement)("div",{className:i},r.map(function(e,t){var r=e.key,n=e.label,i=e.isComplete,s=k()("woocommerce-stepper__step",{"is-active":r===a,"is-complete":void 0!==i?i:c>t}),l=a===r&&o?Object(p.createElement)(lr,null):Object(p.createElement)("div",{className:"woocommerce-stepper__step-icon"},Object(p.createElement)("span",{className:"woocommerce-stepper__step-number"},t+1),Object(p.createElement)(ur,null));return Object(p.createElement)(p.Fragment,{key:r},Object(p.createElement)("div",{className:s},l,Object(p.createElement)("span",{className:"woocommerce-stepper__step-label"},n)),Object(p.createElement)("div",{className:"woocommerce-stepper__step-divider"}))}))}}]),t}(p.Component);mr.propTypes={className:v.a.string,currentStep:v.a.string.isRequired,steps:v.a.arrayOf(v.a.shape({key:v.a.string.isRequired,label:v.a.string.isRequired,isComplete:v.a.bool})).isRequired,direction:v.a.oneOf(["horizontal","vertical"]),isPending:v.a.bool},mr.defaultProps={direction:"horizontal",isPending:!1};function dr(e){return e<10?"has-".concat(e,"-items"):"has-10-items"}var pr=function(e){var t=e.label,a=e.orientation,r=e.itemCount,n=e.items,o=Object(h.uniqueId)("woocommerce-summary-helptext-"),i=dr(r),s=k()("woocommerce-summary",Object(c.a)({},i,"horizontal"===a));return Object(p.createElement)(b.NavigableMenu,{"aria-label":t,"aria-describedby":o,orientation:a,stopNavigationEvents:!0},Object(p.createElement)("p",{id:o,className:"screen-reader-text"},Object(f.__)("List of data points available for filtering. Use arrow keys to cycle through the list. Click a data point for a detailed report.","woocommerce-admin")),Object(p.createElement)("ul",{className:s},n))};pr.propTypes={label:v.a.string,orientation:v.a.oneOf(["vertical","horizontal"]).isRequired,items:v.a.node.isRequired,itemCount:v.a.number.isRequired};var fr=pr,br=function(e){var t=e.children,a=e.isDropdownBreakpoint,r=e.label,n=t({}),o=p.Children.count(n)||1,c=a?"vertical":"horizontal",i=Object(p.createElement)(fr,{label:r,orientation:c,itemCount:o,items:n});if(!a||o<2)return i;var s=n.find(function(e){return!!e.props.selected});return s?Object(p.createElement)(b.Dropdown,{className:"woocommerce-summary",position:"bottom",headerTitle:r,renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(p.cloneElement)(s,{onToggle:a,isOpen:t})},renderContent:function(e){return Object(p.createElement)(fr,{label:r,orientation:c,itemCount:o,items:t(e)})}}):i};br.propTypes={children:v.a.func.isRequired,label:v.a.string},br.defaultProps={label:Object(f.__)("Performance Indicators","woocommerce-admin")};Object(jt.withViewportMatch)({isDropdownBreakpoint:"< large"})(br);var hr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e,t=this.props.isDropdownBreakpoint,a=t?1:this.props.numberOfItems,r=dr(a),n=k()("woocommerce-summary",(e={},Object(c.a)(e,r,!t),Object(c.a)(e,"is-placeholder",!0),e)),o=Object(h.range)(a).map(function(e){return Object(p.createElement)("li",{className:"woocommerce-summary__item-container is-placeholder",key:e},Object(p.createElement)("span",{className:"woocommerce-summary__item"},Object(p.createElement)("span",{className:"woocommerce-summary__item-label"}),Object(p.createElement)("span",{className:"woocommerce-summary__item-data"},Object(p.createElement)("span",{className:"woocommerce-summary__item-value"}),Object(p.createElement)("div",{className:"woocommerce-summary__item-delta"},Object(p.createElement)("span",{className:"woocommerce-summary__item-delta-value"}))),Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-label"}),Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-value"})))});return Object(p.createElement)("ul",{className:n,"aria-hidden":"true"},o)}}]),t}(p.Component);hr.propTypes={numberOfItems:v.a.number.isRequired},hr.defaultProps={numberOfRows:5};Object(jt.withViewportMatch)({isDropdownBreakpoint:"< large"})(hr);var gr=function(e){var t,a=e.delta,r=e.href,n=e.isOpen,o=e.label,c=e.onToggle,i=e.prevLabel,s=e.prevValue,l=e.reverseTrend,u=e.selected,m=e.value,d=e.onLinkClickCallback,g=k()("woocommerce-summary__item-container",{"is-dropdown-button":c,"is-dropdown-expanded":n}),v=k()("woocommerce-summary__item",{"is-selected":u,"is-good-trend":l?a<0:a>0,"is-bad-trend":l?a>0:a<0}),O=a>0?"arrow-up":"arrow-down",j=a>0?Object(f.sprintf)(Object(f.__)("Up %d%% from %s","woocommerce-admin"),a,i):Object(f.sprintf)(Object(f.__)("Down %d%% from %s","woocommerce-admin"),Math.abs(a),i);a||(O="arrow-right",j=Object(f.sprintf)(Object(f.__)("No change from %s","woocommerce-admin"),i));var w={className:v,"aria-current":u?"page":null};if(c||r){var _=!!c;t=_?b.Button:J,_?(w.onClick=c,w["aria-expanded"]=n):(w.href=r,w.role="menuitem",w.onClick=d)}else t="div";return Object(p.createElement)("li",{className:g},Object(p.createElement)(t,w,Object(p.createElement)("span",{className:"woocommerce-summary__item-label"},o),Object(p.createElement)("span",{className:"woocommerce-summary__item-data"},Object(p.createElement)("span",{className:"woocommerce-summary__item-value"},Object(h.isNil)(m)?Object(f.__)("N/A","woocommerce-admin"):m),Object(p.createElement)("div",{className:"woocommerce-summary__item-delta",role:"presentation","aria-label":j},Object(p.createElement)(y.a,{className:"woocommerce-summary__item-delta-icon",icon:O,size:18}),Object(p.createElement)("span",{className:"woocommerce-summary__item-delta-value"},Object(h.isNil)(a)?Object(f.__)("N/A","woocommerce-admin"):Object(f.sprintf)(Object(f.__)("%d%%","woocommerce-admin"),a)))),Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-label"},i)," ",Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-value"},Object(h.isNil)(s)?Object(f.__)("N/A","woocommerce-admin"):s),c?Object(p.createElement)(y.a,{className:"woocommerce-summary__toggle",icon:"chevron-down",size:24}):null))};gr.propTypes={delta:v.a.number,href:v.a.string,isOpen:v.a.bool,label:v.a.string.isRequired,onToggle:v.a.func,prevLabel:v.a.string,prevValue:v.a.oneOfType([v.a.number,v.a.string]),reverseTrend:v.a.bool,selected:v.a.bool,value:v.a.oneOfType([v.a.number,v.a.string]),onLinkClickCallback:v.a.func},gr.defaultProps={href:"",isOpen:!1,prevLabel:Object(f.__)("Previous Period:","woocommerce-admin"),reverseTrend:!1,selected:!1,onLinkClickCallback:h.noop};var vr=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state={tabIndex:null,isScrollable:!1},a.container=Object(p.createRef)(),a.sortBy=a.sortBy.bind(Object(m.a)(a)),a.updateTableShadow=a.updateTableShadow.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this.container.current,t=e.scrollWidth>e.clientWidth;this.setState({tabIndex:t?"0":null}),this.updateTableShadow(),window.addEventListener("resize",this.updateTableShadow)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateTableShadow)}},{key:"sortBy",value:function(e){var t=this,a=this.props,r=a.headers,n=a.query;return function(){var a=n.orderby||Object(h.get)(Object(h.find)(r,{defaultSort:!0}),"key",!1),o=n.order||Object(h.get)(Object(h.find)(r,{key:a}),"defaultOrder","desc"),c="desc";e===a&&(c="desc"===o?"asc":"desc"),t.props.onSort(e,c)}}},{key:"updateTableShadow",value:function(){var e=this.container.current,t=e.scrollWidth-e.scrollLeft<=e.offsetWidth;this.setState({isScrollable:!t})}},{key:"render",value:function(){var e=this,t=this.props,a=t.ariaHidden,r=t.caption,n=t.classNames,o=t.headers,c=t.instanceId,i=t.query,s=t.rowHeader,l=t.rows,u=this.state,m=u.isScrollable,d=u.tabIndex,g=k()("woocommerce-table__table",n,{"is-scrollable":m}),v=i.orderby||Object(h.get)(Object(h.find)(o,{defaultSort:!0}),"key",!1),O=i.order||Object(h.get)(Object(h.find)(o,{key:v}),"defaultOrder","desc");return Object(p.createElement)("div",{className:g,ref:this.container,tabIndex:d,"aria-hidden":a,"aria-labelledby":"caption-".concat(c),role:"group",onScroll:this.updateTableShadow},Object(p.createElement)("table",null,Object(p.createElement)("caption",{id:"caption-".concat(c),className:"woocommerce-table__caption screen-reader-text"},r,"0"===d&&Object(p.createElement)("small",null,Object(f.__)("(scroll to see more)","woocommerce-admin"))),Object(p.createElement)("tbody",null,Object(p.createElement)("tr",null,o.map(function(t,a){var r=t.cellClassName,n=t.isLeftAligned,o=t.isSortable,i=t.isNumeric,s=t.key,l=t.label,u=t.screenReaderLabel,m="header-".concat(c,"-").concat(a),d={className:k()("woocommerce-table__header",r,{"is-left-aligned":n,"is-sortable":o,"is-sorted":v===s,"is-numeric":i})};o&&(d["aria-sort"]="none",v===s&&(d["aria-sort"]="asc"===O?"ascending":"descending"));var h=v===s&&"asc"!==O?Object(f.sprintf)(Object(f.__)("Sort by %s in ascending order","woocommerce-admin"),u):Object(f.sprintf)(Object(f.__)("Sort by %s in descending order","woocommerce-admin"),u),g=Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{"aria-hidden":Boolean(u)},l),u&&Object(p.createElement)("span",{className:"screen-reader-text"},u));return Object(p.createElement)("th",Object($.a)({role:"columnheader",scope:"col",key:a},d),o?Object(p.createElement)(p.Fragment,null,Object(p.createElement)(b.IconButton,{icon:v===s&&"asc"===O?Object(p.createElement)(y.a,{size:18,icon:"chevron-up"}):Object(p.createElement)(y.a,{size:18,icon:"chevron-down"}),"aria-describedby":m,onClick:e.sortBy(s),isDefault:!0},g),Object(p.createElement)("span",{className:"screen-reader-text",id:m},h)):g)})),l.map(function(e,t){return Object(p.createElement)("tr",{key:t},e.map(function(e,t){var a=o[t],r=a.cellClassName,n=a.isLeftAligned,c=a.isNumeric,i=s===t,l=i?"th":"td",u=k()("woocommerce-table__item",r,{"is-left-aligned":n,"is-numeric":c,"is-sorted":v===o[t].key});return Object(p.createElement)(l,{scope:i?"row":null,key:t,className:u},function(e){return e.display||null}(e))}))}))))}}]),t}(p.Component);vr.propTypes={ariaHidden:v.a.bool,caption:v.a.string.isRequired,className:v.a.string,headers:v.a.arrayOf(v.a.shape({defaultSort:v.a.bool,defaultOrder:v.a.string,isLeftAligned:v.a.bool,isNumeric:v.a.bool,isSortable:v.a.bool,key:v.a.string,label:v.a.node,required:v.a.bool,screenReaderLabel:v.a.string})),onSort:v.a.func,query:v.a.object,rows:v.a.arrayOf(v.a.arrayOf(v.a.shape({display:v.a.node,value:v.a.oneOfType([v.a.string,v.a.number,v.a.bool])}))).isRequired,rowHeader:v.a.oneOfType([v.a.number,v.a.bool])},vr.defaultProps={ariaHidden:!1,headers:[],onSort:h.noop,query:{},rowHeader:0};var Or=Object(te.withInstanceId)(vr),yr=a(282);function jr(e){return Array.isArray(e)?e.map(function(e){return e.label}).join(","):[]}function wr(e){return Array.isArray(e)?e.map(function(e){return e.map(function(e){return void 0!==e.value&&null!==e.value?e.value.toString().replace(/,/g,""):""}).join(",")}).join("\n"):[]}var _r=function(){return Object(p.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Object(p.createElement)("path",{d:"M18,9c-0.009,0-0.017,0.002-0.025,0.003C17.72,5.646,14.922,3,11.5,3C7.91,3,5,5.91,5,9.5c0,0.524,0.069,1.031,0.186,1.519 C5.123,11.016,5.064,11,5,11c-2.209,0-4,1.791-4,4c0,1.202,0.541,2.267,1.38,3h18.593C22.196,17.089,23,15.643,23,14 C23,11.239,20.761,9,18,9z M12,16l-4-5h3V8h2v3h3L12,16z"}))},kr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this,t=this.props,a=t.numberOfRows,r=Object(K.a)(t,["numberOfRows"]),n=Object(h.range)(a).map(function(){return e.props.headers.map(function(){return{display:Object(p.createElement)("span",{className:"is-placeholder"})}})});return Object(p.createElement)(Or,Object($.a)({ariaHidden:!0,classNames:"is-loading",rows:n},r))}}]),t}(p.Component);kr.propTypes={query:v.a.object,caption:v.a.string.isRequired,headers:v.a.arrayOf(v.a.shape({hiddenByDefault:v.a.bool,defaultSort:v.a.bool,isSortable:v.a.bool,key:v.a.string,label:v.a.node,required:v.a.bool})),numberOfRows:v.a.number},kr.defaultProps={numberOfRows:5};var Er=kr,Cr=function(e){var t=e.data;return Object(p.createElement)("ul",{className:"woocommerce-table__summary"},t.map(function(e,t){var a=e.label,r=e.value;return Object(p.createElement)("li",{className:"woocommerce-table__summary-item",key:t},Object(p.createElement)("span",{className:"woocommerce-table__summary-value"},r),Object(p.createElement)("span",{className:"woocommerce-table__summary-label"},a))}))};Cr.propTypes={data:v.a.array};var Nr=Cr,Sr=function(e){function t(e){var a;Object(i.a)(this,t);var r=(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).props,n=r.query,o=r.compareBy,c=a.getShowCols(e.headers),s=n.filter?I(n[o]):[];return a.state={showCols:c,selectedRows:s},a.onColumnToggle=a.onColumnToggle.bind(Object(m.a)(a)),a.onClickDownload=a.onClickDownload.bind(Object(m.a)(a)),a.onCompare=a.onCompare.bind(Object(m.a)(a)),a.onPageChange=a.onPageChange.bind(Object(m.a)(a)),a.onSearch=a.onSearch.bind(Object(m.a)(a)),a.selectRow=a.selectRow.bind(Object(m.a)(a)),a.selectAllRows=a.selectAllRows.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=e.headers,a=e.query,r=this.props,n=r.compareBy,o=r.headers,c=r.onColumnsChange,i=r.query,s=this.state.showCols;if(i.filter||a.filter){var l=a.filter?I(a[n]):[],u=i.filter?I(i[n]):[];Object(h.isEqual)(l.sort(),u.sort())||this.setState({selectedRows:u})}if(Object(h.isEqual)(o,t)||this.setState({showCols:this.getShowCols(o)}),i.orderby!==a.orderby&&!s.includes(i.orderby)){var m=s.concat(i.orderby);this.setState({showCols:m}),c(m)}}},{key:"getShowCols",value:function(e){return e.map(function(e){var t=e.key;return!e.hiddenByDefault&&t}).filter(Boolean)}},{key:"getVisibleHeaders",value:function(){var e=this.props.headers,t=this.state.showCols;return e.filter(function(e){var a=e.key;return t.includes(a)})}},{key:"getVisibleRows",value:function(){var e=this.props,t=e.headers,a=e.rows,r=this.state.showCols;return a.map(function(e){return t.map(function(t,a){var n=t.key;return r.includes(n)&&e[a]}).filter(Boolean)})}},{key:"onColumnToggle",value:function(e){var t=this,a=this.props,r=a.headers,n=a.query,c=a.onQueryChange,i=a.onColumnsChange;return function(){t.setState(function(t){if(t.showCols.includes(e)){if(n.orderby===e){var a=Object(h.find)(r,{defaultSort:!0})||Object(h.first)(r)||{};c("sort")(a.key,"desc")}var s=Object(h.without)(t.showCols,e);return i(s),{showCols:s}}var l=[].concat(Object(o.a)(t.showCols),[e]);return i(l),{showCols:l}})}}},{key:"onClickDownload",value:function(){var e,t,a,r,n,o=this.props,c=o.query,i=o.onClickDownload,s=o.searchBy,l=o.title,u=Object.assign({},c);delete u.extended_info,u.search&&delete u[s],e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[e.toLowerCase().replace(/[^a-z0-9]/g,"-"),He()().format("YYYY-MM-DD"),Object.keys(t).map(function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"-")+"-"+decodeURIComponent(t[e]).toLowerCase().replace(/[^a-z0-9]/g,"-")}).join("_")].filter(function(e){return e.length}).join("_")+".csv"}(l,u),r=this.getVisibleHeaders(),n=this.getVisibleRows(),t=[jr(r),wr(n)].filter(function(e){return e.length}).join("\n"),a=new Blob([t],{type:"text/csv;charset=utf-8"}),Object(yr.saveAs)(a,e),i&&i()}},{key:"onCompare",value:function(){var e=this.props,t=e.compareBy,a=e.compareParam,r=e.onQueryChange,n=this.state.selectedRows;t&&r("compare")(t,a,n.join(","))}},{key:"onPageChange",value:function(){var e=this.props,t=e.onPageChange,a=e.onQueryChange;t&&t.apply(void 0,arguments),a&&a("page").apply(void 0,arguments)}},{key:"onSearch",value:function(e){var t,a=this.props,r=a.compareParam,o=a.searchBy,i=a.baseSearchQuery,s=e.map(function(e){return e.label.replace(",","%2C")});s.length?B(Object(n.a)((t={filter:void 0},Object(c.a)(t,r,void 0),Object(c.a)(t,o,void 0),t),i,{search:Object(h.uniq)(s).join(",")})):B({search:void 0})}},{key:"selectAllRows",value:function(e){var t=this.props.ids;e.target.checked?this.setState({selectedRows:t}):this.setState({selectedRows:[]})}},{key:"selectRow",value:function(e,t){var a=this.props.ids;t.target.checked?this.setState(function(t){var r=t.selectedRows;return{selectedRows:Object(h.uniq)([a[e]].concat(Object(o.a)(r)))}}):this.setState(function(t){var r=t.selectedRows,n=r.indexOf(a[e]);return{selectedRows:[].concat(Object(o.a)(r.slice(0,n)),Object(o.a)(r.slice(n+1)))}})}},{key:"getCheckbox",value:function(e){var t=this.props.ids,a=void 0===t?[]:t,r=-1!==this.state.selectedRows.indexOf(a[e]);return{display:Object(p.createElement)("input",{type:"checkbox",onChange:Object(h.partial)(this.selectRow,e),checked:r}),value:!1}}},{key:"getAllCheckbox",value:function(){var e=this.props.ids,t=void 0===e?[]:e,a=this.state.selectedRows,r=t.length>0&&t.length===a.length;return{cellClassName:"is-checkbox-column",label:Object(p.createElement)("input",{type:"checkbox",onChange:this.selectAllRows,"aria-label":Object(f.__)("Select All"),checked:r}),required:!0}}},{key:"render",value:function(){var e=this,t=this.props,a=t.compareBy,r=t.downloadable,n=t.labels,c=void 0===n?{}:n,i=t.isLoading,s=t.onClickDownload,l=t.onQueryChange,u=t.query,m=t.rowHeader,d=t.rowsPerPage,h=t.searchBy,g=t.showMenu,v=t.summary,O=t.title,y=t.totalRows,j=this.state,w=j.selectedRows,_=j.showCols,C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M();if("object"!==Object(E.a)(e))throw new Error("Invalid parameter passed to getSearchWords, it expects an object or no parameters.");var t=e.search;if(!t)return[];if("string"!=typeof t)throw new Error("Invalid 'search' type. getSearchWords expects query's 'search' property to be a string.");return t.split(",").map(function(e){return e.replace("%2C",",")})}(u).map(function(e){return{id:e,label:e}}),N=this.props.headers,S=this.getVisibleHeaders(),x=this.getVisibleRows();a&&(x=x.map(function(t,a){return[e.getCheckbox(a)].concat(Object(o.a)(t))}),S=[this.getAllCheckbox()].concat(Object(o.a)(S)));var F=k()("woocommerce-analytics__card",{"woocommerce-table":!0,"has-compare":!!a,"has-search":!!h});return Object(p.createElement)(W,{className:F,title:O,action:[a&&Object(p.createElement)(aa,{key:"compare",className:"woocommerce-table__compare",count:w.length,helpText:c.helpText||Object(f.__)("Check at least two items below to compare","woocommerce-admin"),onClick:this.onCompare},c.compareButton||Object(f.__)("Compare","woocommerce-admin")),h&&Object(p.createElement)(Re,{allowFreeTextSearch:!0,inlineTags:!0,key:"search",onChange:this.onSearch,placeholder:c.placeholder||Object(f.__)("Search by item name","woocommerce-admin"),selected:C,showClearButton:!0,type:h}),(r||s)&&Object(p.createElement)(b.IconButton,{key:"download",className:"woocommerce-table__download-button",disabled:i,onClick:this.onClickDownload,isLink:!0},Object(p.createElement)(_r,null),Object(p.createElement)("span",{className:"woocommerce-table__download-button__label"},c.downloadButton||Object(f.__)("Download","woocommerce-admin")))],menu:g&&Object(p.createElement)(V,{label:Object(f.__)("Choose which values to display","woocommerce-admin"),renderContent:function(){return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(Ba,null,Object(f.__)("Columns:","woocommerce-admin")),N.map(function(t){var a=t.key,r=t.label;return t.required?null:Object(p.createElement)(La,{checked:_.includes(a),isCheckbox:!0,isClickable:!0,key:a,onInvoke:e.onColumnToggle(a)},r)}))}})},i?Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{className:"screen-reader-text"},Object(f.__)("Your requested data is loading","woocommerce-admin")),Object(p.createElement)(Er,{numberOfRows:d,headers:S,rowHeader:m,caption:O,query:u,onSort:l("sort")})):Object(p.createElement)(Or,{rows:x,headers:S,rowHeader:m,caption:O,query:u,onSort:l("sort")}),Object(p.createElement)(Ha,{key:parseInt(u.page)||1,page:parseInt(u.page)||1,perPage:d,total:y,onPageChange:this.onPageChange,onPerPageChange:l("per_page")}),v&&Object(p.createElement)(Nr,{data:v}))}}]),t}(p.Component);Sr.propTypes={compareBy:v.a.string,compareParam:v.a.string,headers:v.a.arrayOf(v.a.shape({hiddenByDefault:v.a.bool,defaultSort:v.a.bool,isSortable:v.a.bool,key:v.a.string,label:v.a.string,required:v.a.bool})),labels:v.a.shape({compareButton:v.a.string,downloadButton:v.a.string,helpText:v.a.string,placeholder:v.a.string}),ids:v.a.arrayOf(v.a.number),isLoading:v.a.bool,onQueryChange:v.a.func,onColumnsChange:v.a.func,downloadable:v.a.bool,onClickDownload:v.a.func,query:v.a.object,rowHeader:v.a.oneOfType([v.a.number,v.a.bool]),rows:v.a.arrayOf(v.a.arrayOf(v.a.shape({display:v.a.node,value:v.a.oneOfType([v.a.string,v.a.number,v.a.bool])}))).isRequired,rowsPerPage:v.a.number.isRequired,searchBy:v.a.string,showMenu:v.a.bool,summary:v.a.arrayOf(v.a.shape({label:v.a.node,value:v.a.oneOfType([v.a.string,v.a.number])})),title:v.a.string.isRequired,totalRows:v.a.number.isRequired,baseSearchQuery:v.a.object},Sr.defaultProps={compareParam:"filter",downloadable:!1,isLoading:!1,onQueryChange:h.noop,onColumnsChange:h.noop,query:{},rowHeader:0,rows:[],showMenu:!0,baseSearchQuery:{}};var xr=function(e){var t=e.children,a=e.numberOfRows;return Object(p.createElement)("div",{className:"woocommerce-table is-empty",style:{"--number-of-rows":a}},t)};xr.propTypes={numberOfRows:v.a.number},xr.defaultProps={numberOfRows:5};a(61);var Fr=function(e){var t=e.items;return Object(p.createElement)(Fe,{className:"woocommerce-view-more-list",label:Object(f.sprintf)(Object(f.__)("+%d more","woocommerce-admin"),t.length-1),popoverContents:Object(p.createElement)("ul",{className:"woocommerce-view-more-list__popover"},t.map(function(e,t){return Object(p.createElement)("li",{key:t,className:"woocommerce-view-more-list__popover__item"},e)}))})};Fr.propTypes={items:v.a.arrayOf(v.a.node)},Fr.defaultProps={items:[]};a.d(t,"a",function(){return or}),a.d(t,"b",function(){return ar})},347:function(e,t,a){var r=a(135);r(r.S+r.F,"Object",{assign:a(352)})},348:function(e,t,a){e.exports=!a(99)&&!a(137)(function(){return 7!=Object.defineProperty(a(191)("div"),"a",{get:function(){return 7}}).a})},349:function(e,t,a){var r=a(136);e.exports=function(e,t){if(!r(e))return e;var a,n;if(t&&"function"==typeof(a=e.toString)&&!r(n=a.call(e)))return n;if("function"==typeof(a=e.valueOf)&&!r(n=a.call(e)))return n;if(!t&&"function"==typeof(a=e.toString)&&!r(n=a.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},350:function(e,t,a){e.exports=a(140)("native-function-to-string",Function.toString)},351:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},352:function(e,t,a){"use strict";var r=a(99),n=a(195),o=a(356),c=a(357),i=a(144),s=a(197),l=Object.assign;e.exports=!l||a(137)(function(){var e={},t={},a=Symbol(),r="abcdefghijklmnopqrst";return e[a]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[a]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var a=i(e),l=arguments.length,u=1,m=o.f,d=c.f;l>u;)for(var p,f=s(arguments[u++]),b=m?n(f).concat(m(f)):n(f),h=b.length,g=0;h>g;)p=b[g++],r&&!d.call(f,p)||(a[p]=f[p]);return a}:l},353:function(e,t,a){var r=a(119),n=a(196),o=a(354)(!1),c=a(143)("IE_PROTO");e.exports=function(e,t){var a,i=n(e),s=0,l=[];for(a in i)a!=c&&r(i,a)&&l.push(a);for(;t.length>s;)r(i,a=t[s++])&&(~o(l,a)||l.push(a));return l}},354:function(e,t,a){var r=a(196),n=a(199),o=a(355);e.exports=function(e){return function(t,a,c){var i,s=r(t),l=n(s.length),u=o(c,l);if(e&&a!=a){for(;l>u;)if((i=s[u++])!=i)return!0}else for(;l>u;u++)if((e||u in s)&&s[u]===a)return e||u||0;return!e&&-1}}},355:function(e,t,a){var r=a(142),n=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?n(e+t,0):o(e,t)}},356:function(e,t){t.f=Object.getOwnPropertySymbols},357:function(e,t){t.f={}.propertyIsEnumerable},358:function(e,t,a){"use strict";var r=a(359)(!0);a(360)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,a=this._i;return a>=t.length?{value:void 0,done:!0}:(e=r(t,a),this._i+=e.length,{value:e,done:!1})})},359:function(e,t,a){var r=a(142),n=a(141);e.exports=function(e){return function(t,a){var o,c,i=String(n(t)),s=r(a),l=i.length;return s<0||s>=l?e?"":void 0:(o=i.charCodeAt(s))<55296||o>56319||s+1===l||(c=i.charCodeAt(s+1))<56320||c>57343?e?i.charAt(s):o:e?i.slice(s,s+2):c-56320+(o-55296<<10)+65536}}},360:function(e,t,a){"use strict";var r=a(193),n=a(135),o=a(192),c=a(116),i=a(145),s=a(361),l=a(202),u=a(365),m=a(83)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,a,f,b,h,g){s(a,t,f);var v,O,y,j=function(e){if(!d&&e in E)return E[e];switch(e){case"keys":case"values":return function(){return new a(this,e)}}return function(){return new a(this,e)}},w=t+" Iterator",_="values"==b,k=!1,E=e.prototype,C=E[m]||E["@@iterator"]||b&&E[b],N=C||j(b),S=b?_?j("entries"):N:void 0,x="Array"==t&&E.entries||C;if(x&&(y=u(x.call(new e)))!==Object.prototype&&y.next&&(l(y,w,!0),r||"function"==typeof y[m]||c(y,m,p)),_&&C&&"values"!==C.name&&(k=!0,N=function(){return C.call(this)}),r&&!g||!d&&!k&&E[m]||c(E,m,N),i[t]=N,i[w]=p,b)if(v={values:_?N:j("values"),keys:h?N:j("keys"),entries:S},g)for(O in v)O in E||o(E,O,v[O]);else n(n.P+n.F*(d||k),t,v);return v}},361:function(e,t,a){"use strict";var r=a(362),n=a(138),o=a(202),c={};a(116)(c,a(83)("iterator"),function(){return this}),e.exports=function(e,t,a){e.prototype=r(c,{next:n(1,a)}),o(e,t+" Iterator")}},362:function(e,t,a){var r=a(118),n=a(363),o=a(200),c=a(143)("IE_PROTO"),i=function(){},s=function(){var e,t=a(191)("iframe"),r=o.length;for(t.style.display="none",a(364).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[o[r]];return s()};e.exports=Object.create||function(e,t){var a;return null!==e?(i.prototype=r(e),a=new i,i.prototype=null,a[c]=e):a=s(),void 0===t?a:n(a,t)}},363:function(e,t,a){var r=a(117),n=a(118),o=a(195);e.exports=a(99)?Object.defineProperties:function(e,t){n(e);for(var a,c=o(t),i=c.length,s=0;i>s;)r.f(e,a=c[s++],t[a]);return e}},364:function(e,t,a){var r=a(88).document;e.exports=r&&r.documentElement},365:function(e,t,a){var r=a(119),n=a(144),o=a(143)("IE_PROTO"),c=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=n(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},366:function(e,t,a){"use strict";var r=a(194),n=a(135),o=a(144),c=a(367),i=a(368),s=a(199),l=a(369),u=a(370);n(n.S+n.F*!a(372)(function(e){Array.from(e)}),"Array",{from:function(e){var t,a,n,m,d=o(e),p="function"==typeof this?this:Array,f=arguments.length,b=f>1?arguments[1]:void 0,h=void 0!==b,g=0,v=u(d);if(h&&(b=r(b,f>2?arguments[2]:void 0,2)),null==v||p==Array&&i(v))for(a=new p(t=s(d.length));t>g;g++)l(a,g,h?b(d[g],g):d[g]);else for(m=v.call(d),a=new p;!(n=m.next()).done;g++)l(a,g,h?c(m,b,[n.value,g],!0):n.value);return a.length=g,a}})},367:function(e,t,a){var r=a(118);e.exports=function(e,t,a,n){try{return n?t(r(a)[0],a[1]):t(a)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},368:function(e,t,a){var r=a(145),n=a(83)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[n]===e)}},369:function(e,t,a){"use strict";var r=a(117),n=a(138);e.exports=function(e,t,a){t in e?r.f(e,t,n(0,a)):e[t]=a}},370:function(e,t,a){var r=a(371),n=a(83)("iterator"),o=a(145);e.exports=a(89).getIteratorMethod=function(e){if(null!=e)return e[n]||e["@@iterator"]||o[r(e)]}},371:function(e,t,a){var r=a(198),n=a(83)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,a,c;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),n))?a:o?r(t):"Object"==(c=r(t))&&"function"==typeof t.callee?"Arguments":c}},372:function(e,t,a){var r=a(83)("iterator"),n=!1;try{var o=[7][r]();o.return=function(){n=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!n)return!1;var a=!1;try{var o=[7],c=o[r]();c.next=function(){return{done:a=!0}},o[r]=function(){return c},e(o)}catch(e){}return a}},421:function(e,t,a){"use strict";var r=a(239),n=a(240),o=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Array.isArray,s=Array.prototype.push,l=function(e,t){s.apply(e,i(t)?t:[t])},u=Date.prototype.toISOString,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:n.formatters[n.default],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,a,n,o,c,s,u,d,p,f,b,h,g){var v=t;if("function"==typeof u?v=u(a,v):v instanceof Date?v=f(v):"comma"===n&&i(v)&&(v=v.join(",")),null===v){if(o)return s&&!h?s(a,m.encoder,g):a;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||r.isBuffer(v))return s?[b(h?a:s(a,m.encoder,g))+"="+b(s(v,m.encoder,g))]:[b(a)+"="+b(String(v))];var O,y=[];if(void 0===v)return y;if(i(u))O=u;else{var j=Object.keys(v);O=d?j.sort(d):j}for(var w=0;w<O.length;++w){var _=O[w];c&&null===v[_]||(i(v)?l(y,e(v[_],"function"==typeof n?n(a,_):a,n,o,c,s,u,d,p,f,b,h,g)):l(y,e(v[_],a+(p?"."+_:"["+_+"]"),n,o,c,s,u,d,p,f,b,h,g)))}return y};e.exports=function(e,t){var a,r=e,s=function(e){if(!e)return m;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=n.default;if(void 0!==e.format){if(!o.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");a=e.format}var r=n.formatters[a],c=m.filter;return("function"==typeof e.filter||i(e.filter))&&(c=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:c,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof s.filter?r=(0,s.filter)("",r):i(s.filter)&&(a=s.filter);var u,p=[];if("object"!=typeof r||null===r)return"";u=t&&t.arrayFormat in c?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=c[u];a||(a=Object.keys(r)),s.sort&&a.sort(s.sort);for(var b=0;b<a.length;++b){var h=a[b];s.skipNulls&&null===r[h]||l(p,d(r[h],h,f,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.formatter,s.encodeValuesOnly,s.charset))}var g=p.join(s.delimiter),v=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),g.length>0?v+g:""}},422:function(e,t,a){"use strict";var r=a(239),n=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},i=function(e,t,a){if(e){var r=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,c=/(\[[^[\]]*])/.exec(r),i=c?r.slice(0,c.index):r,s=[];if(i){if(!a.plainObjects&&n.call(Object.prototype,i)&&!a.allowPrototypes)return;s.push(i)}for(var l=0;null!==(c=o.exec(r))&&l<a.depth;){if(l+=1,!a.plainObjects&&n.call(Object.prototype,c[1].slice(1,-1))&&!a.allowPrototypes)return;s.push(c[1])}return c&&s.push("["+r.slice(c.index)+"]"),function(e,t,a){for(var r=t,n=e.length-1;n>=0;--n){var o,c=e[n];if("[]"===c&&a.parseArrays)o=[].concat(r);else{o=a.plainObjects?Object.create(null):{};var i="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,s=parseInt(i,10);a.parseArrays||""!==i?!isNaN(s)&&c!==i&&String(s)===i&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(o=[])[s]=r:o[i]=r:o={0:r}}r=o}return r}(s,t,a)}};e.exports=function(e,t){var a=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth?e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return a.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var a,i={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,u=s.split(t.delimiter,l),m=-1,d=t.charset;if(t.charsetSentinel)for(a=0;a<u.length;++a)0===u[a].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[a]?d="utf-8":"utf8=%26%2310003%3B"===u[a]&&(d="iso-8859-1"),m=a,a=u.length);for(a=0;a<u.length;++a)if(a!==m){var p,f,b=u[a],h=b.indexOf("]="),g=-1===h?b.indexOf("="):h+1;-1===g?(p=t.decoder(b,o.decoder,d),f=t.strictNullHandling?null:""):(p=t.decoder(b.slice(0,g),o.decoder,d),f=t.decoder(b.slice(g+1),o.decoder,d)),f&&t.interpretNumericEntities&&"iso-8859-1"===d&&(f=c(f)),f&&t.comma&&f.indexOf(",")>-1&&(f=f.split(",")),n.call(i,p)?i[p]=r.combine(i[p],f):i[p]=f}return i}(e,a):e,l=a.plainObjects?Object.create(null):{},u=Object.keys(s),m=0;m<u.length;++m){var d=u[m],p=i(d,s[d],a);l=r.merge(l,p,a)}return r.compact(l)}},83:function(e,t,a){var r=a(140)("wks"),n=a(139),o=a(88).Symbol,c="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=c&&o[e]||(c?o:n)("Symbol."+e))}).store=r},88:function(e,t){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},89:function(e,t){var a=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=a)},99:function(e,t,a){e.exports=!a(137)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})}}]);
|
Â
|
packages/woocommerce-blocks/build/product-best-sellers.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var r,s,i=t[0],a=t[1],u=t[2],b=0,d=[];b<i.length;b++)s=i[b],n[s]&&d.push(n[s][0]),n[s]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var a=o[i];0!==n[a]&&(r=!1)}r&&(c.splice(t--,1),e=s(s.s=o[0]))}return e}var r={},n={9:0},c=[];function s(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,s),o.l=!0,o.exports}s.m=e,s.c=r,s.d=function(e,t,o){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(s.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)s.d(o,r,function(t){return e[t]}.bind(null,r));return o},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.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 l=a;return c.push([545,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},41:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},42:function(e,t,o){"use strict";var r=o(14),n=o.n(r),c=o(0),s=o(1),i=o(4),a=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,a=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product title","woo-gutenberg-products-block"),help:l?Object(s.__)("Product title is visible.","woo-gutenberg-products-block"):Object(s.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product price","woo-gutenberg-products-block"),help:i?Object(s.__)("Product price is visible.","woo-gutenberg-products-block"):Object(s.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(s.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(s.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(n()({},o,{rating:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(s.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(s.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:a.a.shape({button:a.a.bool.isRequired,price:a.a.bool.isRequired,rating:a.a.bool.isRequired,title:a.a.bool.isRequired}).isRequired,onChange:a.a.func.isRequired},t.a=l},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),s=o(4),i=o.n(s),a=o(3),u=function(e){var t=e.columns,o=e.rows,s=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);s({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(a.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);s({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(a.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return s({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},47:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),s=o(63),i=o.n(s);o.d(t,"a",function(){return a});var a=function(e){return function(t){var o=t.attributes,n=o.align,s=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!s.title,"is-hidden-price":!s.price,"is-hidden-rating":!s.rating,"is-hidden-button":!s.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,s=o.catOperator,a=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),s&&"all"===s&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){m=!0,f=e}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(t,e))}}},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},50:function(e,t,o){"use strict";var r=o(40),n=o.n(r),c=o(20),s=o.n(c),i=o(21),a=o.n(i),u=o(22),l=o.n(u),b=o(23),d=o.n(b),p=o(17),g=o.n(p),m=o(24),f=o.n(m),_=o(0),h=o(1),w=o(26),O=o(16),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(34),x=o(3),E=(o(98),function(e){function t(){var e;return s()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return f()(t,e),a()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,s=["woocommerce-product-categories__item"];o.length&&s.push("is-searching"),0===c&&0!==t.parent&&s.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:s.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,s=r.operator,i=r.selected,a=r.isSingle,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:a}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:s,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},E.defaultProps={operator:"any",isSingle:!1},t.a=E},52:function(e,t){!function(){e.exports=this.wp.viewport}()},545:function(e,t,o){"use strict";o.r(t);var r=o(14),n=o.n(r),c=o(0),s=o(1),i=o(25),a=o(5),u=o(37),l=o.n(u),b=o(20),d=o.n(b),p=o(21),g=o.n(p),m=o(22),f=o.n(m),_=o(23),h=o.n(_),w=o(24),O=o.n(w),j=o(3),k=o(15),y=o(4),v=o.n(y),C=o(42),x=o(46),E=o(50),P=function(e){function t(){return d()(this,t),f()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,a=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:a,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(47),B=o(41);Object(i.registerBlockType)("woocommerce/product-best-sellers",{title:Object(s.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"stats-up-alt"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},B.a),transforms:{from:[{type:"block",blocks:Object(a.without)(B.b,"woocommerce/product-best-sellers"),transform:function(e){return Object(i.createBlock)("woocommerce/product-best-sellers",e)}}]},deprecated:[{attributes:B.a,save:Object(S.a)("woocommerce/product-best-sellers")}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var r,s,i=t[0],a=t[1],u=t[2],b=0,d=[];b<i.length;b++)s=i[b],n[s]&&d.push(n[s][0]),n[s]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var a=o[i];0!==n[a]&&(r=!1)}r&&(c.splice(t--,1),e=s(s.s=o[0]))}return e}var r={},n={7:0},c=[];function s(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,s),o.l=!0,o.exports}s.m=e,s.c=r,s.d=function(e,t,o){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(s.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)s.d(o,r,function(t){return e[t]}.bind(null,r));return o},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.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 l=a;return c.push([519,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),s=o(1),i=o(4),a=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,a=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product title","woo-gutenberg-products-block"),help:l?Object(s.__)("Product title is visible.","woo-gutenberg-products-block"):Object(s.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product price","woo-gutenberg-products-block"),help:i?Object(s.__)("Product price is visible.","woo-gutenberg-products-block"):Object(s.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(s.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(s.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(n()({},o,{rating:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(s.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(s.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:a.a.shape({button:a.a.bool.isRequired,price:a.a.bool.isRequired,rating:a.a.bool.isRequired,title:a.a.bool.isRequired}).isRequired,onChange:a.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),s=o(4),i=o.n(s),a=o(3),u=function(e){var t=e.columns,o=e.rows,s=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);s({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(a.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);s({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(a.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return s({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),s=o(48),i=o.n(s);o.d(t,"a",function(){return a});var a=function(e){return function(t){var o=t.attributes,n=o.align,s=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!s.title,"is-hidden-price":!s.price,"is-hidden-rating":!s.rating,"is-hidden-button":!s.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,s=o.catOperator,a=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),s&&"all"===s&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){m=!0,f=e}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(29),n=o.n(r),c=o(13),s=o.n(c),i=o(14),a=o.n(i),u=o(15),l=o.n(u),b=o(16),d=o.n(b),p=o(12),g=o.n(p),m=o(17),f=o.n(m),_=o(0),h=o(1),w=o(19),O=o(10),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(24),x=o(3),E=(o(79),function(e){function t(){var e;return s()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return f()(t,e),a()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,s=["woocommerce-product-categories__item"];o.length&&s.push("is-searching"),0===c&&0!==t.parent&&s.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:s.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,s=r.operator,i=r.selected,a=r.isSingle,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:a}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:s,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},E.defaultProps={operator:"any",isSingle:!1},t.a=E},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},519:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),s=o(1),i=o(18),a=o(5),u=o(25),l=o.n(u),b=o(13),d=o.n(b),p=o(14),g=o.n(p),m=o(15),f=o.n(m),_=o(16),h=o.n(_),w=o(17),O=o.n(w),j=o(3),k=o(9),y=o(4),v=o.n(y),C=o(31),x=o(34),E=o(37),P=function(e){function t(){return d()(this,t),f()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,a=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:a,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(35),B=o(30);Object(i.registerBlockType)("woocommerce/product-best-sellers",{title:Object(s.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"stats-up-alt"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},B.a),transforms:{from:[{type:"block",blocks:Object(a.without)(B.b,"woocommerce/product-best-sellers"),transform:function(e){return Object(i.createBlock)("woocommerce/product-best-sellers",e)}}]},deprecated:[{attributes:B.a,save:Object(S.a)("woocommerce/product-best-sellers")}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/product-categories.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var c,a,l=t[0],i=t[1],s=t[2],b=0,d=[];b<l.length;b++)a=l[b],r[a]&&d.push(r[a][0]),r[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);for(u&&u(t);d.length;)d.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var i=n[l];0!==r[i]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},r={10:0},o=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return o.push([541,1,2,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},112:function(e,t,n){"use strict";var c=n(20),r=n.n(c),o=n(21),a=n.n(o),l=n(22),i=n.n(l),s=n(23),u=n.n(s),b=n(17),d=n.n(b),p=n(24),h=n.n(p),m=n(0),g=n(1),f=n(6),v=n.n(f),w=n(3),O=n(5),j=n(4),_=n.n(j),E=n(28),y=n(70),k=n.n(y),C=n(14),z=n.n(C);var x=n(36);function N(e){var t=e.hasEmpty,n=e.isHierarchical,c=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return n?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(O.groupBy)(e,"parent"),n=function e(n){return n.map(function(n){var c=t[n.term_id];return delete t[n.term_id],z()({},n,{children:c&&c.length?e(c):[]})})},c=n(t[0]||[]);return delete t[0],Object(O.forEach)(t,function(e){c.push.apply(c,k()(n(e||[])))}),c}(c):c}var M=function(e){function t(){var e;return r()(this,t),(e=i()(this,u()(t).apply(this,arguments))).select=Object(m.createRef)(),e.onNavigate=e.onNavigate.bind(d()(e)),e.renderList=e.renderList.bind(d()(e)),e.renderOptions=e.renderOptions.bind(d()(e)),e}return h()(t,e),a()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var c=wc_product_block_data.homeUrl;t||0!==n.indexOf(c)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.isPreview,r=void 0!==c&&c,o=this.props.attributes.hasCount,a="parent-"+e[0].term_id;return Object(m.createElement)("ul",{key:a},e.map(function(e){var c=o?Object(m.createElement)("span",null,"(",e.count,")"):null;return[Object(m.createElement)("li",{key:e.term_id},Object(m.createElement)("a",{href:r?null:e.link},e.name)," ",c," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.attributes.hasCount;return e.map(function(e){var r=c?"(".concat(e.count,")"):null;return[Object(m.createElement)("option",{key:e.term_id,value:e.link},Object(O.repeat)("–",n)," ",e.name," ",r),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.instanceId,c=t.className,r=t.isDropdown,o=N(t),a=v()("wc-block-product-categories",c,{"is-dropdown":r,"is-list":!r}),l="prod-categories-".concat(n);return Object(m.createElement)(m.Fragment,null,o.length>0?Object(m.createElement)("div",{className:a},r?Object(m.createElement)(m.Fragment,null,Object(m.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(m.createElement)("label",{className:"screen-reader-text",htmlFor:l},Object(g.__)("Select a category","woo-gutenberg-products-block")),Object(m.createElement)("select",{id:l,ref:this.select},Object(m.createElement)("option",{value:"false",hidden:!0},Object(g.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(o))),Object(m.createElement)(w.IconButton,{icon:"arrow-right-alt2",label:Object(g.__)("Go to category","woo-gutenberg-products-block"),onClick:this.onNavigate})):this.renderList(o)):Object(m.createElement)(w.Placeholder,{className:"wc-block-product-categories",icon:Object(m.createElement)(x.a,null),label:Object(g.__)("Product Categories List","woo-gutenberg-products-block")},Object(g.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))}}]),t}(m.Component);M.propTypes={attributes:_.a.object.isRequired,instanceId:_.a.number,isPreview:_.a.bool};t.a=Object(E.withInstanceId)(M)},15:function(e,t){!function(){e.exports=this.wp.editor}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},277:function(e,t,n){var c=n(517);"string"==typeof c&&(c=[[e.i,c,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(51)(c,r);c.locals&&(e.exports=c.locals)},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},i=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},b=n(6),d=n.n(b),p=n(4),h=n.n(p),m=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:d()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:h.a.number,className:h.a.string};var g=m;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return g})},5:function(e,t){!function(){e.exports=this.lodash}()},517:function(e,t,n){},541:function(e,t,n){"use strict";n.r(t);var c=n(40),r=n.n(c),o=n(0),a=n(1),l=n(25),i=(n(277),n(518),n(15)),s=n(3),u=n(112),b=n(20),d=n.n(b),p=n(21),h=n.n(p),m=n(22),g=n.n(m),f=n(23),v=n.n(f),w=n(17),O=n.n(w),j=n(24),_=n.n(j),E=n(5),y=n(6),k=n.n(y),C=n(28),z=(n(520),function(e){function t(){var e;return d()(this,t),(e=g()(this,v()(t).apply(this,arguments))).onClick=e.onClick.bind(O()(e)),e}return _()(t,e),h()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,c=n.label,a=n.checked,l=n.instanceId,i=n.className,u=n.help,b=n.options,d=n.value,p="inspector-toggle-button-control-".concat(l);return u&&(e=Object(E.isFunction)(u)?u(a):u),Object(o.createElement)(s.BaseControl,{id:p,help:e,className:k()("components-toggle-button-control",i)},Object(o.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},c),Object(o.createElement)(s.ButtonGroup,{"aria-labelledby":p+"__label"},b.map(function(e,n){var a={};return d===e.value?(a.isPrimary=!0,a["aria-pressed"]=!0):(a.isDefault=!0,a["aria-pressed"]=!1),Object(o.createElement)(s.Button,r()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":c+": "+e.label},a),e.label)})))}}]),t}(o.Component)),x=Object(C.withInstanceId)(z),N=n(36);Object(l.registerBlockType)("woocommerce/product-categories",{title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(N.a,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show your product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},edit:function(e){var t=e.attributes,n=e.setAttributes,c=t.hasCount,r=t.hasEmpty,l=t.isDropdown,b=t.isHierarchical;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.InspectorControls,{key:"inspector"},Object(o.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:c?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:c,onChange:function(){return n({hasCount:!c})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:b?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:b,onChange:function(){return n({isHierarchical:!b})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:r?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return n({hasEmpty:!r})}})),Object(o.createElement)(s.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(x,{label:Object(a.__)("Display style","woo-gutenberg-products-block"),value:l?"dropdown":"list",options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({isDropdown:"dropdown"===e})}}))),Object(o.createElement)(u.a,{attributes:t,isPreview:!0}))},save:function(e){var t=e.attributes,n=t.hasCount,c=t.hasEmpty,a=t.isDropdown,l=t.isHierarchical,i={};return n&&(i["data-has-count"]=!0),c&&(i["data-has-empty"]=!0),a&&(i["data-is-dropdown"]=!0),l&&(i["data-is-hierarchical"]=!0),Object(o.createElement)("div",r()({className:"is-loading"},i),a?Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(o.createElement)("ul",{"aria-hidden":!0},Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}})}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var c,a,l=t[0],i=t[1],s=t[2],b=0,d=[];b<l.length;b++)a=l[b],r[a]&&d.push(r[a][0]),r[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);for(u&&u(t);d.length;)d.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var i=n[l];0!==r[i]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},r={8:0},o=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return o.push([512,0,2,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},253:function(e,t,n){var c=n(489);"string"==typeof c&&(c=[[e.i,c,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(38)(c,r);c.locals&&(e.exports=c.locals)},27:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},i=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},b=n(6),d=n.n(b),p=n(4),h=n.n(p),m=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:d()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:h.a.number,className:h.a.string};var g=m;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return g})},3:function(e,t){!function(){e.exports=this.wp.components}()},489:function(e,t,n){},5:function(e,t){!function(){e.exports=this.lodash}()},512:function(e,t,n){"use strict";n.r(t);var c=n(29),r=n.n(c),o=n(0),a=n(1),l=n(18),i=(n(253),n(490),n(9)),s=n(3),u=n(13),b=n.n(u),d=n(14),p=n.n(d),h=n(15),m=n.n(h),g=n(16),f=n.n(g),v=n(12),w=n.n(v),O=n(17),j=n.n(O),_=n(6),E=n.n(_),y=n(5),k=n(4),C=n.n(k),z=n(22),x=n(60),N=n.n(x),M=n(8),B=n.n(M);var I=n(27);function P(e){var t=e.hasEmpty,n=e.isHierarchical,c=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return n?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(y.groupBy)(e,"parent"),n=function e(n){return n.map(function(n){var c=t[n.term_id];return delete t[n.term_id],B()({},n,{children:c&&c.length?e(c):[]})})},c=n(t[0]||[]);return delete t[0],Object(y.forEach)(t,function(e){c.push.apply(c,N()(n(e||[])))}),c}(c):c}var H=function(e){function t(){var e;return b()(this,t),(e=m()(this,f()(t).apply(this,arguments))).select=Object(o.createRef)(),e.onNavigate=e.onNavigate.bind(w()(e)),e.renderList=e.renderList.bind(w()(e)),e.renderOptions=e.renderOptions.bind(w()(e)),e}return j()(t,e),p()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var c=wc_product_block_data.homeUrl;t||0!==n.indexOf(c)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.isPreview,r=void 0!==c&&c,a=this.props.attributes.hasCount,l="parent-"+e[0].term_id;return Object(o.createElement)("ul",{key:l},e.map(function(e){var c=a?Object(o.createElement)("span",null,"(",e.count,")"):null;return[Object(o.createElement)("li",{key:e.term_id},Object(o.createElement)("a",{href:r?null:e.link},e.name)," ",c," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.attributes.hasCount;return e.map(function(e){var r=c?"(".concat(e.count,")"):null;return[Object(o.createElement)("option",{key:e.term_id,value:e.link},Object(y.repeat)("–",n)," ",e.name," ",r),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.instanceId,c=t.className,r=t.isDropdown,l=P(t),i=E()("wc-block-product-categories",c,{"is-dropdown":r,"is-list":!r}),u="prod-categories-".concat(n);return Object(o.createElement)(o.Fragment,null,l.length>0?Object(o.createElement)("div",{className:i},r?Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(o.createElement)("label",{className:"screen-reader-text",htmlFor:u},Object(a.__)("Select a category","woo-gutenberg-products-block")),Object(o.createElement)("select",{id:u,ref:this.select},Object(o.createElement)("option",{value:"false",hidden:!0},Object(a.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(l))),Object(o.createElement)(s.IconButton,{icon:"arrow-right-alt2",label:Object(a.__)("Go to category","woo-gutenberg-products-block"),onClick:this.onNavigate})):this.renderList(l)):Object(o.createElement)(s.Placeholder,{className:"wc-block-product-categories",icon:Object(o.createElement)(I.a,null),label:Object(a.__)("Product Categories List","woo-gutenberg-products-block")},Object(a.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))}}]),t}(o.Component);H.propTypes={attributes:C.a.object.isRequired,instanceId:C.a.number,isPreview:C.a.bool};var L=Object(z.withInstanceId)(H),S=(n(492),function(e){function t(){var e;return b()(this,t),(e=m()(this,f()(t).apply(this,arguments))).onClick=e.onClick.bind(w()(e)),e}return j()(t,e),p()(t,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,c=n.label,a=n.checked,l=n.instanceId,i=n.className,u=n.help,b=n.options,d=n.value,p="inspector-toggle-button-control-".concat(l);return u&&(e=Object(y.isFunction)(u)?u(a):u),Object(o.createElement)(s.BaseControl,{id:p,help:e,className:E()("components-toggle-button-control",i)},Object(o.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},c),Object(o.createElement)(s.ButtonGroup,{"aria-labelledby":p+"__label"},b.map(function(e,n){var a={};return d===e.value?(a.isPrimary=!0,a["aria-pressed"]=!0):(a.isDefault=!0,a["aria-pressed"]=!1),Object(o.createElement)(s.Button,r()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":c+": "+e.label},a),e.label)})))}}]),t}(o.Component)),F=Object(z.withInstanceId)(S);Object(l.registerBlockType)("woocommerce/product-categories",{title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(I.a,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show your product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},edit:function(e){var t=e.attributes,n=e.setAttributes,c=t.hasCount,r=t.hasEmpty,l=t.isDropdown,u=t.isHierarchical;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.InspectorControls,{key:"inspector"},Object(o.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:c?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:c,onChange:function(){return n({hasCount:!c})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:u?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return n({isHierarchical:!u})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:r?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return n({hasEmpty:!r})}})),Object(o.createElement)(s.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(F,{label:Object(a.__)("Display style","woo-gutenberg-products-block"),value:l?"dropdown":"list",options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({isDropdown:"dropdown"===e})}}))),Object(o.createElement)(L,{attributes:t,isPreview:!0}))},save:function(e){var t=e.attributes,n=t.hasCount,c=t.hasEmpty,a=t.isDropdown,l=t.isHierarchical,i={};return n&&(i["data-has-count"]=!0),c&&(i["data-has-empty"]=!0),a&&(i["data-is-dropdown"]=!0),l&&(i["data-is-hierarchical"]=!0),Object(o.createElement)("div",r()({className:"is-loading"},i),a?Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(o.createElement)("ul",{"aria-hidden":!0},Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}})},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/product-category.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var r,i,a=t[0],s=t[1],u=t[2],d=0,b=[];d<a.length;d++)i=a[d],n[i]&&b.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,a=1;a<o.length;a++){var s=o[a];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={11:0},c=[];function i(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,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var l=s;return c.push([546,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},41:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},42:function(e,t,o){"use strict";var r=o(14),n=o.n(r),c=o(0),i=o(1),a=o(4),s=o.n(a),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,a=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:a?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(n()({},o,{price:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),i=o(4),a=o.n(i),s=o(3),u=function(e){var t=e.columns,o=e.rows,i=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);i({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);i({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(s.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i({alignButtons:!a})}}))};u.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,alignButtons:a.a.bool.isRequired,setAttributes:a.a.func.isRequired},t.a=u},47:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(63),a=o.n(i);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),i&&"all"===i&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,h=void 0;try{for(var m,_=b[Symbol.iterator]();!(g=(m=_.next()).done);g=!0){var w=a()(m.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,h=e}finally{try{g||null==_.return||_.return()}finally{if(f)throw h}}return p+="]"}(t,e))}}},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},50:function(e,t,o){"use strict";var r=o(40),n=o.n(r),c=o(20),i=o.n(c),a=o(21),s=o.n(a),u=o(22),l=o.n(u),d=o(23),b=o.n(d),p=o(17),g=o.n(p),f=o(24),h=o.n(f),m=o(0),_=o(1),w=o(26),O=o(16),y=o.n(O),k=o(5),j=o(4),v=o.n(j),C=o(34),E=o(3),A=(o(98),function(e){function t(){var e;return i()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var a=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(C.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(_.sprintf)(Object(_._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),a,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,a=r.selected,s=r.isSingle,u={clear:Object(_.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(_.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(_.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(_.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(_.sprintf)(Object(_._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(_.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:a.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(m.createElement)("div",{className:a.length<2?"screen-reader-text":""},Object(m.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(_.__)("Display products matching","woo-gutenberg-products-block"),help:Object(_.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(_.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(_.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));A.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},A.defaultProps={operator:"any",isSingle:!1},t.a=A},515:function(e,t,o){var r=o(516);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o(51)(r,n);r.locals&&(e.exports=r.locals)},516:function(e,t,o){},52:function(e,t){!function(){e.exports=this.wp.viewport}()},546:function(e,t,o){"use strict";o.r(t);var r=o(14),n=o.n(r),c=o(0),i=o(1),a=o(25),s=o(5),u=(o(515),o(20)),l=o.n(u),d=o(21),b=o.n(d),p=o(22),g=o.n(p),f=o(23),h=o.n(f),m=o(17),_=o.n(m),w=o(24),O=o.n(w),y=o(15),k=o(3),j=o(4),v=o.n(j),C=o(42),E=o(46),A=o(50),x=o(62),S=function(e){function t(){var e;return l()(this,t),(e=g()(this,h()(t).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},e.startEditing=e.startEditing.bind(_()(e)),e.stopEditing=e.stopEditing.bind(_()(e)),e.setChangedAttributes=e.setChangedAttributes.bind(_()(e)),e.save=e.save.bind(_()(e)),e}return O()(t,e),b()(t,[{key:"componentDidMount",value:function(){this.props.attributes.categories.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(e){this.setState(function(t){return{changedAttributes:n()({},t.changedAttributes,e)}})}},{key:"save",value:function(){var e=this.state.changedAttributes;(0,this.props.setAttributes)(e),this.stopEditing()}},{key:"getInspectorControls",value:function(){var e=this,t=this.props,o=t.attributes,r=t.setAttributes,n=this.state.isEditing,a=o.columns,s=o.catOperator,u=o.contentVisibility,l=o.orderby,d=o.rows,b=o.alignButtons;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!o.categories.length&&!n},Object(c.createElement)(A.a,{selected:o.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id}),n={categories:o};r(n),e.setChangedAttributes(n)},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any",o={catOperator:t};r(o),e.setChangedAttributes(o)}})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(E.a,{columns:a,rows:d,alignButtons:b,setAttributes:r})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:u,onChange:function(e){return r({contentVisibility:e})}})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(x.a,{setAttributes:r,value:l})))}},{key:"renderEditMode",value:function(){var e=this,t=this.props,o=t.attributes,r=t.debouncedSpeak,a=this.state.changedAttributes,s=n()({},o,a);return Object(c.createElement)(k.Placeholder,{icon:"category",label:Object(i.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(i.__)("Display a grid of products from your selected categories","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-products-category__selection"},Object(c.createElement)(A.a,{selected:s.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id});e.setChangedAttributes({categories:o})},operator:s.catOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(c.createElement)(k.Button,{isDefault:!0,onClick:function(){e.save(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Done","woo-gutenberg-products-block")),Object(c.createElement)(k.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:function(){e.stopEditing(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var e=this.props,t=e.attributes,o=e.name,r=t.categories.length;return Object(c.createElement)(k.Disabled,null,r?Object(c.createElement)(y.ServerSideRender,{block:o,attributes:t}):Object(i.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this,t=this.state.isEditing;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(y.BlockControls,null,Object(c.createElement)(k.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit"),onClick:function(){return t?e.stopEditing():e.startEditing()},isActive:t}]})),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())}}]),t}(c.Component);S.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired,debouncedSpeak:v.a.func.isRequired};var P=Object(k.withSpokenMessages)(S),R=o(47),B=o(41);Object(a.registerBlockType)("woocommerce/product-category",{title:Object(i.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:"category",foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},B.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(s.without)(B.b,"woocommerce/product-category"),transform:function(e){return Object(a.createBlock)("woocommerce/product-category",n()({},e,{editMode:!1}))}}]},deprecated:[{attributes:n()({},B.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),save:Object(R.a)("woocommerce/product-category")}],edit:function(e){return Object(c.createElement)(P,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.hooks}()},62:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3),i=o(4),a=o.n(i),s=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};s.propTypes={setAttributes:a.a.func.isRequired,value:a.a.string.isRequired},t.a=s},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var r,i,a=t[0],s=t[1],u=t[2],d=0,b=[];d<a.length;d++)i=a[d],n[i]&&b.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,a=1;a<o.length;a++){var s=o[a];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={9:0},c=[];function i(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,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var l=s;return c.push([518,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),i=o(1),a=o(4),s=o.n(a),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,a=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:a?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(n()({},o,{price:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),i=o(4),a=o.n(i),s=o(3),u=function(e){var t=e.columns,o=e.rows,i=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);i({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);i({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(s.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i({alignButtons:!a})}}))};u.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,alignButtons:a.a.bool.isRequired,setAttributes:a.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(48),a=o.n(i);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),i&&"all"===i&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,h=void 0;try{for(var m,_=b[Symbol.iterator]();!(g=(m=_.next()).done);g=!0){var w=a()(m.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,h=e}finally{try{g||null==_.return||_.return()}finally{if(f)throw h}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(29),n=o.n(r),c=o(13),i=o.n(c),a=o(14),s=o.n(a),u=o(15),l=o.n(u),d=o(16),b=o.n(d),p=o(12),g=o.n(p),f=o(17),h=o.n(f),m=o(0),_=o(1),w=o(19),O=o(10),y=o.n(O),k=o(5),j=o(4),v=o.n(j),C=o(24),E=o(3),A=(o(79),function(e){function t(){var e;return i()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var a=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(C.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(_.sprintf)(Object(_._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),a,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,a=r.selected,s=r.isSingle,u={clear:Object(_.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(_.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(_.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(_.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(_.sprintf)(Object(_._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(_.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:a.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(m.createElement)("div",{className:a.length<2?"screen-reader-text":""},Object(m.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(_.__)("Display products matching","woo-gutenberg-products-block"),help:Object(_.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(_.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(_.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));A.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},A.defaultProps={operator:"any",isSingle:!1},t.a=A},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},47:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3),i=o(4),a=o.n(i),s=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};s.propTypes={setAttributes:a.a.func.isRequired,value:a.a.string.isRequired},t.a=s},487:function(e,t,o){var r=o(488);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o(38)(r,n);r.locals&&(e.exports=r.locals)},488:function(e,t,o){},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},518:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),i=o(1),a=o(18),s=o(5),u=(o(487),o(13)),l=o.n(u),d=o(14),b=o.n(d),p=o(15),g=o.n(p),f=o(16),h=o.n(f),m=o(12),_=o.n(m),w=o(17),O=o.n(w),y=o(9),k=o(3),j=o(4),v=o.n(j),C=o(31),E=o(34),A=o(37),x=o(47),S=function(e){function t(){var e;return l()(this,t),(e=g()(this,h()(t).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},e.startEditing=e.startEditing.bind(_()(e)),e.stopEditing=e.stopEditing.bind(_()(e)),e.setChangedAttributes=e.setChangedAttributes.bind(_()(e)),e.save=e.save.bind(_()(e)),e}return O()(t,e),b()(t,[{key:"componentDidMount",value:function(){this.props.attributes.categories.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(e){this.setState(function(t){return{changedAttributes:n()({},t.changedAttributes,e)}})}},{key:"save",value:function(){var e=this.state.changedAttributes;(0,this.props.setAttributes)(e),this.stopEditing()}},{key:"getInspectorControls",value:function(){var e=this,t=this.props,o=t.attributes,r=t.setAttributes,n=this.state.isEditing,a=o.columns,s=o.catOperator,u=o.contentVisibility,l=o.orderby,d=o.rows,b=o.alignButtons;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!o.categories.length&&!n},Object(c.createElement)(A.a,{selected:o.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id}),n={categories:o};r(n),e.setChangedAttributes(n)},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any",o={catOperator:t};r(o),e.setChangedAttributes(o)}})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(E.a,{columns:a,rows:d,alignButtons:b,setAttributes:r})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:u,onChange:function(e){return r({contentVisibility:e})}})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(x.a,{setAttributes:r,value:l})))}},{key:"renderEditMode",value:function(){var e=this,t=this.props,o=t.attributes,r=t.debouncedSpeak,a=this.state.changedAttributes,s=n()({},o,a);return Object(c.createElement)(k.Placeholder,{icon:"category",label:Object(i.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(i.__)("Display a grid of products from your selected categories","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-products-category__selection"},Object(c.createElement)(A.a,{selected:s.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id});e.setChangedAttributes({categories:o})},operator:s.catOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(c.createElement)(k.Button,{isDefault:!0,onClick:function(){e.save(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Done","woo-gutenberg-products-block")),Object(c.createElement)(k.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:function(){e.stopEditing(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var e=this.props,t=e.attributes,o=e.name,r=t.categories.length;return Object(c.createElement)(k.Disabled,null,r?Object(c.createElement)(y.ServerSideRender,{block:o,attributes:t}):Object(i.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this,t=this.state.isEditing;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(y.BlockControls,null,Object(c.createElement)(k.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit"),onClick:function(){return t?e.stopEditing():e.startEditing()},isActive:t}]})),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())}}]),t}(c.Component);S.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired,debouncedSpeak:v.a.func.isRequired};var P=Object(k.withSpokenMessages)(S),R=o(35),B=o(30);Object(a.registerBlockType)("woocommerce/product-category",{title:Object(i.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:"category",foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},B.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(s.without)(B.b,"woocommerce/product-category"),transform:function(e){return Object(a.createBlock)("woocommerce/product-category",n()({},e,{editMode:!1}))}}]},deprecated:[{attributes:n()({},B.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),save:Object(R.a)("woocommerce/product-category")}],edit:function(e){return Object(c.createElement)(P,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/product-new.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,d=[];b<i.length;b++)a=i[b],r[a]&&d.push(r[a][0]),r[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],n=!0,i=1;i<o.length;i++){var s=o[i];0!==r[s]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var n={},r={12:0},c=[];function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=n,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},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 u=0;u<i.length;u++)t(i[u]);var l=s;return c.push([547,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t,o){"use strict";var n=o(0),r=o(3),c=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},l=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},b=o(6),d=o.n(b),p=o(4),g=o.n(p),m=function(e){var t=e.size,o=void 0===t?20:t,c=e.className;return Object(n.createElement)(r.Icon,{className:d()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:g.a.number,className:g.a.string};var h=m;o.d(t,"a",function(){return c}),o.d(t,"b",function(){return a}),o.d(t,"c",function(){return i}),o.d(t,"d",function(){return s}),o.d(t,"e",function(){return u}),o.d(t,"f",function(){return l}),o.d(t,"g",function(){return h})},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},41:function(e,t,o){"use strict";o.d(t,"b",function(){return n});var n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},42:function(e,t,o){"use strict";var n=o(14),r=o.n(n),c=o(0),a=o(1),i=o(4),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,n=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(r()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(r()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(r()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(r()({},o,{button:!n}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},46:function(e,t,o){"use strict";var n=o(0),r=o(1),c=o(5),a=o(4),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(n.createElement)(s.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(n.createElement)(s.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},47:function(e,t,o){"use strict";var n=o(0),r=o(6),c=o.n(r),a=o(63),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,r=o.align,a=o.contentVisibility,s=c()(r?"align".concat(r):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(n.createElement)(n.RawHTML,{className:s},function(e,t){var o=e.attributes,n=o.attributes,r=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),a&&"all"===a&&d.set("cat_operator","AND")),n&&n.length&&(d.set("terms",n.map(function(e){return e.id}).join(",")),d.set("attribute",n[0].attr_slug),r&&"all"===r&&d.set("terms_operator","AND")),s&&("price_desc"===s?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===s?(d.set("orderby","price"),d.set("order","ASC")):"date"===s?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",s)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!n||!n.length)return""}var p="[products",g=!0,m=!1,h=void 0;try{for(var f,w=d[Symbol.iterator]();!(g=(f=w.next()).done);g=!0){var _=i()(f.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){m=!0,h=e}finally{try{g||null==w.return||w.return()}finally{if(m)throw h}}return p+="]"}(t,e))}}},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},50:function(e,t,o){"use strict";var n=o(40),r=o.n(n),c=o(20),a=o.n(c),i=o(21),s=o.n(i),u=o(22),l=o.n(u),b=o(23),d=o.n(b),p=o(17),g=o.n(p),m=o(24),h=o.n(m),f=o(0),w=o(1),_=o(26),O=o(16),j=o.n(O),v=o(5),k=o(4),y=o.n(k),E=o(34),C=o(3),x=(o(98),function(e){function t(){var e;return a()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(_.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,n=e.depth,c=void 0===n?0:n,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(f.createElement)(E.b,r()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,n=this.props,r=n.onChange,c=n.onOperatorChange,a=n.operator,i=n.selected,s=n.isSingle,u={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(f.createElement)(f.Fragment,null,Object(f.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(v.find)(t,{id:e})}).filter(Boolean),onChange:r,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(f.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(f.createElement)(C.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(f.Component));x.propTypes={onChange:y.a.func.isRequired,onOperatorChange:y.a.func,operator:y.a.oneOf(["all","any"]),selected:y.a.array.isRequired,isSingle:y.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},52:function(e,t){!function(){e.exports=this.wp.viewport}()},547:function(e,t,o){"use strict";o.r(t);var n=o(14),r=o.n(n),c=o(0),a=o(1),i=o(25),s=o(5),u=o(20),l=o.n(u),b=o(21),d=o.n(b),p=o(22),g=o.n(p),m=o(23),h=o.n(m),f=o(24),w=o.n(f),_=o(3),O=o(15),j=o(4),v=o.n(j),k=o(42),y=o(46),E=o(50),C=function(e){function t(){return l()(this,t),g()(this,h()(t).apply(this,arguments))}return w()(t,e),d()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,n=t.categories,r=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(O.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(y.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:n,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:r,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(_.Disabled,null,Object(c.createElement)(O.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);C.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var x=C,z=o(47),M=o(36),B=o(41);Object(i.registerBlockType)("woocommerce/product-new",{title:Object(a.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(M.c,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:r()({},B.a),transforms:{from:[{type:"block",blocks:Object(s.without)(B.b,"woocommerce/product-new"),transform:function(e){return Object(i.createBlock)("woocommerce/product-new",e)}}]},deprecated:[{attributes:B.a,save:Object(z.a)("woocommerce/product-new")}],edit:function(e){return Object(c.createElement)(x,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,d=[];b<i.length;b++)a=i[b],r[a]&&d.push(r[a][0]),r[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],n=!0,i=1;i<o.length;i++){var s=o[i];0!==r[s]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var n={},r={10:0},c=[];function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=n,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},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 u=0;u<i.length;u++)t(i[u]);var l=s;return c.push([522,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},27:function(e,t,o){"use strict";var n=o(0),r=o(3),c=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},l=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},b=o(6),d=o.n(b),p=o(4),g=o.n(p),m=function(e){var t=e.size,o=void 0===t?20:t,c=e.className;return Object(n.createElement)(r.Icon,{className:d()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:g.a.number,className:g.a.string};var h=m;o.d(t,"a",function(){return c}),o.d(t,"b",function(){return a}),o.d(t,"c",function(){return i}),o.d(t,"d",function(){return s}),o.d(t,"e",function(){return u}),o.d(t,"f",function(){return l}),o.d(t,"g",function(){return h})},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return n});var n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var n=o(8),r=o.n(n),c=o(0),a=o(1),i=o(4),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,n=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(r()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(r()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(r()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(r()({},o,{button:!n}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var n=o(0),r=o(1),c=o(5),a=o(4),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(n.createElement)(s.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(n.createElement)(s.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var n=o(0),r=o(6),c=o.n(r),a=o(48),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,r=o.align,a=o.contentVisibility,s=c()(r?"align".concat(r):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(n.createElement)(n.RawHTML,{className:s},function(e,t){var o=e.attributes,n=o.attributes,r=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),a&&"all"===a&&d.set("cat_operator","AND")),n&&n.length&&(d.set("terms",n.map(function(e){return e.id}).join(",")),d.set("attribute",n[0].attr_slug),r&&"all"===r&&d.set("terms_operator","AND")),s&&("price_desc"===s?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===s?(d.set("orderby","price"),d.set("order","ASC")):"date"===s?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",s)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!n||!n.length)return""}var p="[products",g=!0,m=!1,h=void 0;try{for(var f,w=d[Symbol.iterator]();!(g=(f=w.next()).done);g=!0){var _=i()(f.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){m=!0,h=e}finally{try{g||null==w.return||w.return()}finally{if(m)throw h}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var n=o(29),r=o.n(n),c=o(13),a=o.n(c),i=o(14),s=o.n(i),u=o(15),l=o.n(u),b=o(16),d=o.n(b),p=o(12),g=o.n(p),m=o(17),h=o.n(m),f=o(0),w=o(1),_=o(19),O=o(10),j=o.n(O),v=o(5),k=o(4),y=o.n(k),E=o(24),C=o(3),x=(o(79),function(e){function t(){var e;return a()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(_.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,n=e.depth,c=void 0===n?0:n,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(f.createElement)(E.b,r()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,n=this.props,r=n.onChange,c=n.onOperatorChange,a=n.operator,i=n.selected,s=n.isSingle,u={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(f.createElement)(f.Fragment,null,Object(f.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(v.find)(t,{id:e})}).filter(Boolean),onChange:r,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(f.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(f.createElement)(C.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(f.Component));x.propTypes={onChange:y.a.func.isRequired,onOperatorChange:y.a.func,operator:y.a.oneOf(["all","any"]),selected:y.a.array.isRequired,isSingle:y.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},52:function(e,t){!function(){e.exports=this.wp.date}()},522:function(e,t,o){"use strict";o.r(t);var n=o(8),r=o.n(n),c=o(0),a=o(1),i=o(18),s=o(5),u=o(13),l=o.n(u),b=o(14),d=o.n(b),p=o(15),g=o.n(p),m=o(16),h=o.n(m),f=o(17),w=o.n(f),_=o(3),O=o(9),j=o(4),v=o.n(j),k=o(31),y=o(34),E=o(37),C=function(e){function t(){return l()(this,t),g()(this,h()(t).apply(this,arguments))}return w()(t,e),d()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,n=t.categories,r=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(O.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(y.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:n,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:r,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(_.Disabled,null,Object(c.createElement)(O.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);C.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var x=C,z=o(35),M=o(27),B=o(30);Object(i.registerBlockType)("woocommerce/product-new",{title:Object(a.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(M.c,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:r()({},B.a),transforms:{from:[{type:"block",blocks:Object(s.without)(B.b,"woocommerce/product-new"),transform:function(e){return Object(i.createBlock)("woocommerce/product-new",e)}}]},deprecated:[{attributes:B.a,save:Object(z.a)("woocommerce/product-new")}],edit:function(e){return Object(c.createElement)(x,e)},save:function(){return null}})},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/product-on-sale.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var r,a,i=t[0],u=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],n[a]&&d.push(n[a][0]),n[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var u=o[i];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={13:0},c=[];function a(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,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},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||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var l=u;return c.push([550,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},41:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},42:function(e,t,o){"use strict";var r=o(14),n=o.n(r),c=o(0),a=o(1),i=o(4),u=o.n(i),s=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(n()({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,rating:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},t.a=l},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),a=o(4),i=o.n(a),u=o(3),s=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(u.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};s.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=s},47:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(63),i=o.n(a);o.d(t,"a",function(){return u});var u=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),a&&"all"===a&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},50:function(e,t,o){"use strict";var r=o(40),n=o.n(r),c=o(20),a=o.n(c),i=o(21),u=o.n(i),s=o(22),l=o.n(s),b=o(23),d=o.n(b),p=o(17),g=o.n(p),f=o(24),m=o.n(f),_=o(0),h=o(1),w=o(26),O=o(16),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(34),E=o(3),x=(o(98),function(e){function t(){var e;return a()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,u=r.isSingle,s={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:u}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));x.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},52:function(e,t){!function(){e.exports=this.wp.viewport}()},550:function(e,t,o){"use strict";o.r(t);var r=o(14),n=o.n(r),c=o(0),a=o(1),i=o(25),u=o(5),s=o(37),l=o.n(s),b=o(20),d=o.n(b),p=o(21),g=o.n(p),f=o(22),m=o.n(f),_=o(23),h=o.n(_),w=o(24),O=o.n(w),j=o(3),k=o(15),y=o(4),v=o.n(y),C=o(42),E=o(46),x=o(50),P=o(62),R=function(e){function t(){return d()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,u=t.contentVisibility,s=t.rows,l=t.orderby,b=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(E.a,{columns:i,rows:s,alignButtons:b,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(P.a,{setAttributes:o,value:l})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(x.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);R.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var S=R,A=o(47),B=o(41);Object(i.registerBlockType)("woocommerce/product-on-sale",{title:Object(a.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"tag"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of on sale products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},B.a,{orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(u.without)(B.b,"woocommerce/product-on-sale"),transform:function(e){return Object(i.createBlock)("woocommerce/product-on-sale",e)}}]},deprecated:[{attributes:n()({},B.a,{orderby:{type:"string",default:"date"}}),save:Object(A.a)("woocommerce/product-on-sale")}],edit:function(e){return Object(c.createElement)(S,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.hooks}()},62:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3),a=o(4),i=o.n(a),u=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};u.propTypes={setAttributes:i.a.func.isRequired,value:i.a.string.isRequired},t.a=u},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var r,a,i=t[0],u=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],n[a]&&d.push(n[a][0]),n[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var u=o[i];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={11:0},c=[];function a(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,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},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||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var l=u;return c.push([517,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(4),u=o.n(i),s=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(n()({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,rating:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),a=o(4),i=o.n(a),u=o(3),s=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(u.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};s.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=s},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(48),i=o.n(a);o.d(t,"a",function(){return u});var u=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),a&&"all"===a&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(29),n=o.n(r),c=o(13),a=o.n(c),i=o(14),u=o.n(i),s=o(15),l=o.n(s),b=o(16),d=o.n(b),p=o(12),g=o.n(p),f=o(17),m=o.n(f),_=o(0),h=o(1),w=o(19),O=o(10),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(24),E=o(3),x=(o(79),function(e){function t(){var e;return a()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,u=r.isSingle,s={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:u}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));x.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},47:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3),a=o(4),i=o.n(a),u=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};u.propTypes={setAttributes:i.a.func.isRequired,value:i.a.string.isRequired},t.a=u},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},517:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(18),u=o(5),s=o(25),l=o.n(s),b=o(13),d=o.n(b),p=o(14),g=o.n(p),f=o(15),m=o.n(f),_=o(16),h=o.n(_),w=o(17),O=o.n(w),j=o(3),k=o(9),y=o(4),v=o.n(y),C=o(31),E=o(34),x=o(37),P=o(47),R=function(e){function t(){return d()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,u=t.contentVisibility,s=t.rows,l=t.orderby,b=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(E.a,{columns:i,rows:s,alignButtons:b,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(P.a,{setAttributes:o,value:l})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(x.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);R.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var S=R,A=o(35),B=o(30);Object(i.registerBlockType)("woocommerce/product-on-sale",{title:Object(a.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"tag"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of on sale products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},B.a,{orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(u.without)(B.b,"woocommerce/product-on-sale"),transform:function(e){return Object(i.createBlock)("woocommerce/product-on-sale",e)}}]},deprecated:[{attributes:n()({},B.a,{orderby:{type:"string",default:"date"}}),save:Object(A.a)("woocommerce/product-on-sale")}],edit:function(e){return Object(c.createElement)(S,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/product-tag.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-tag"]=function(t){function e(e){for(var n,a,s=e[0],i=e[1],u=e[2],d=0,b=[];d<s.length;d++)a=s[d],r[a]&&b.push(r[a][0]),r[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);for(l&&l(e);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],n=!0,s=1;s<o.length;s++){var i=o[s];0!==r[i]&&(n=!1)}n&&(c.splice(e--,1),t=a(a.s=o[0]))}return t}var n={},r={14:0},c=[];function a(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=t,a.c=n,a.d=function(t,e,o){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(o,n,function(e){return t[e]}.bind(null,n));return o},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=s.push.bind(s);s.push=e,s=s.slice();for(var u=0;u<s.length;u++)e(s[u]);var l=i;return c.push([542,1,3,2,0]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},15:function(t,e){!function(){t.exports=this.wp.editor}()},16:function(t,e){!function(){t.exports=this.wp.apiFetch}()},18:function(t,e){!function(){t.exports=this.React}()},25:function(t,e){!function(){t.exports=this.wp.blocks}()},26:function(t,e){!function(){t.exports=this.wp.url}()},28:function(t,e){!function(){t.exports=this.wp.compose}()},3:function(t,e){!function(){t.exports=this.wp.components}()},39:function(t,e){!function(){t.exports=this.wp.keycodes}()},42:function(t,e,o){"use strict";var n=o(14),r=o.n(n),c=o(0),a=o(1),s=o(4),i=o.n(s),u=o(3),l=function(t){var e=t.onChange,o=t.settings,n=o.button,s=o.price,i=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(r()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:s?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return e(r()({},o,{price:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:i?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return e(r()({},o,{rating:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return e(r()({},o,{button:!n}))}}))};l.propTypes={settings:i.a.shape({button:i.a.bool.isRequired,price:i.a.bool.isRequired,rating:i.a.bool.isRequired,title:i.a.bool.isRequired}).isRequired,onChange:i.a.func.isRequired},e.a=l},46:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(5),a=o(4),s=o.n(a),i=o(3),u=function(t){var e=t.columns,o=t.rows,a=t.setAttributes,s=t.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(n.createElement)(i.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:s?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:function(){return a({alignButtons:!s})}}))};u.propTypes={columns:s.a.oneOfType([s.a.number,s.a.string]).isRequired,rows:s.a.oneOfType([s.a.number,s.a.string]).isRequired,alignButtons:s.a.bool.isRequired,setAttributes:s.a.func.isRequired},e.a=u},49:function(t,e){!function(){t.exports=this.ReactDOM}()},5:function(t,e){!function(){t.exports=this.lodash}()},52:function(t,e){!function(){t.exports=this.wp.viewport}()},532:function(t,e,o){var n=o(533);"string"==typeof n&&(n=[[t.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(51)(n,r);n.locals&&(t.exports=n.locals)},533:function(t,e,o){},542:function(t,e,o){"use strict";o.r(e);var n=o(0),r=o(1),c=o(25),a=(o(532),o(14)),s=o.n(a),i=o(20),u=o.n(i),l=o(21),d=o.n(l),b=o(22),g=o.n(b),p=o(23),h=o.n(p),f=o(17),_=o.n(f),m=o(24),O=o.n(m),w=o(15),j=o(3),k=o(4),v=o.n(k),y=o(42),E=o(46),C=o(40),P=o.n(C),A=o(5),x=o(34),S=(o(534),o(56)),T=function(t){function e(){var t;return u()(this,e),(t=g()(this,h()(e).apply(this,arguments))).state={list:[],loading:!0},t.renderItem=t.renderItem.bind(_()(t)),t.debouncedOnSearch=Object(A.debounce)(t.onSearch.bind(_()(t)),400),t}return O()(e,t),d()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;Object(S.a)({selected:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(t){var e=this,o=this.props.selected;this.setState({loading:!0}),Object(S.a)({selected:o,search:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,a=void 0===c?0:c,s=["woocommerce-product-tags__item"];o.length&&s.push("is-searching"),0===a&&0!==e.parent&&s.push("is-skip-level");var i=e.breadcrumbs.length?"".concat(e.breadcrumbs.join(", "),", ").concat(e.name):e.name;return Object(n.createElement)(x.b,P()({className:s.join(" ")},t,{showCount:!0,"aria-label":Object(r.sprintf)(Object(r._n)("%d product tagged as %s","%d products tagged as %s",e.count,"woo-gutenberg-products-block"),e.count,i)}))}},{key:"render",value:function(){var t=this.state,e=t.list,o=t.loading,c=this.props,a=c.onChange,s=c.onOperatorChange,i=c.operator,u=c.selected,l={clear:Object(r.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(r.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(r.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(r.__)("Search for product tags","woo-gutenberg-products-block"),selected:function(t){return Object(r.sprintf)(Object(r._n)("%d tag selected","%d tags selected",t,"woo-gutenberg-products-block"),t)},updated:Object(r.__)("Tag search results updated.","woo-gutenberg-products-block")};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(x.a,{className:"woocommerce-product-tags",list:e,isLoading:o,selected:u.map(function(t){return Object(A.find)(e,{id:t})}).filter(Boolean),onChange:a,onSearch:S.e?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:l,isHierarchical:!0}),!!s&&Object(n.createElement)("div",{className:u.length<2?"screen-reader-text":""},Object(n.createElement)(j.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(r.__)("Display products matching","woo-gutenberg-products-block"),help:Object(r.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:i,onChange:s,options:[{label:Object(r.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(r.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(n.Component);T.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired},T.defaultProps={operator:"any"};var R=T,B=o(62),q=function(t){function e(){var t;return u()(this,e),(t=g()(this,h()(e).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},t.startEditing=t.startEditing.bind(_()(t)),t.stopEditing=t.stopEditing.bind(_()(t)),t.setChangedAttributes=t.setChangedAttributes.bind(_()(t)),t.save=t.save.bind(_()(t)),t}return O()(e,t),d()(e,[{key:"componentDidMount",value:function(){this.props.attributes.tags.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(t){this.setState(function(e){return{changedAttributes:s()({},e.changedAttributes,t)}})}},{key:"save",value:function(){var t=this.state.changedAttributes;(0,this.props.setAttributes)(t),this.stopEditing()}},{key:"getInspectorControls",value:function(){var t=this.props,e=t.attributes,o=t.setAttributes,c=this.state.isEditing,a=e.columns,s=e.tagOperator,i=e.contentVisibility,u=e.orderby,l=e.rows,d=e.alignButtons;return Object(n.createElement)(w.InspectorControls,{key:"inspector"},Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Product Tag","woo-gutenberg-products-block"),initialOpen:!e.tags.length&&!c},Object(n.createElement)(R,{selected:e.tags,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return t.id});o({tags:e})},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({tagOperator:t})}})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(E.a,{columns:a,rows:l,alignButtons:d,setAttributes:o})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(y.a,{settings:i,onChange:function(t){return o({contentVisibility:t})}})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(B.a,{setAttributes:o,value:u})))}},{key:"renderEditMode",value:function(){var t=this,e=this.props,o=e.attributes,c=e.debouncedSpeak,a=this.state.changedAttributes,i=s()({},o,a);return Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("Display a grid of products from your selected tags","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-product-tag__selection"},Object(n.createElement)(R,{selected:i.tags,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map(function(t){return t.id});t.setChangedAttributes({tags:o})},operator:i.tagOperator,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t.setChangedAttributes({tagOperator:e})}}),Object(n.createElement)(j.Button,{isDefault:!0,onClick:function(){t.save(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(j.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:function(){t.stopEditing(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var t=this.props,e=t.attributes,o=t.name,c=e.tags.length;return Object(n.createElement)(j.Disabled,null,c?Object(n.createElement)(w.ServerSideRender,{block:o,attributes:e}):Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}},{key:"render",value:function(){var t=this,e=this.state.isEditing;return Object(n.createElement)(n.Fragment,null,S.c?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(w.BlockControls,null,Object(n.createElement)(j.Toolbar,{controls:[{icon:"edit",title:Object(r.__)("Edit"),onClick:function(){return e?t.stopEditing():t.startEditing()},isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode()):Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.","woo-gutenberg-products-block")))}}]),e}(n.Component);q.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired,debouncedSpeak:v.a.func.isRequired};var N=Object(j.withSpokenMessages)(q);Object(c.registerBlockType)("woocommerce/product-tag",{title:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:"tag",foreground:"#96588a"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Display a grid of products from selected tags.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},tags:{type:"array",default:[]},tagOperator:{type:"string",default:"any"},orderby:{type:"string",default:"date"}},edit:function(t){return Object(n.createElement)(N,t)},save:function(){return null}})},56:function(t,e,o){"use strict";o.d(e,"d",function(){return s}),o.d(e,"e",function(){return i}),o.d(e,"c",function(){return u}),o.d(e,"b",function(){return l}),o.d(e,"a",function(){return d});var n=o(26),r=o(16),c=o.n(r),a=o(5),s=wc_product_block_data.isLargeCatalog||!1,i=wc_product_block_data.limitTags||!1,u=wc_product_block_data.hasTags||!1,l=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,r=t.search,c=[Object(n.addQueryArgs)("/wc/blocks/products",{per_page:s?100:-1,catalog_visibility:"visible",status:"publish",search:r})];return s&&o.length&&c.push(Object(n.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:o})),c}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map(function(t){return c()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})},d=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,r=t.search,c=[Object(n.addQueryArgs)("/wc/blocks/products/tags",{per_page:i?100:-1,orderby:i?"count":"name",order:i?"desc":"asc",search:r})];return i&&o.length&&c.push(Object(n.addQueryArgs)("/wc/blocks/products/tags",{include:o})),c}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map(function(t){return c()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})}},61:function(t,e){!function(){t.exports=this.wp.hooks}()},62:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(3),a=o(4),s=o.n(a),i=function(t){var e=t.value,o=t.setAttributes;return Object(n.createElement)(c.SelectControl,{label:Object(r.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(r.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(r.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(r.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(r.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(r.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(r.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(r.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})};i.propTypes={setAttributes:s.a.func.isRequired,value:s.a.string.isRequired},e.a=i},66:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},67:function(t,e){!function(){t.exports=this.wp.date}()},71:function(t,e){!function(){t.exports=this.wp.dom}()},74:function(t,e){},75:function(t,e){},76:function(t,e){},77:function(t,e){},8:function(t,e){!function(){t.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-tag"]=function(t){function e(e){for(var n,a,s=e[0],i=e[1],u=e[2],d=0,b=[];d<s.length;d++)a=s[d],r[a]&&b.push(r[a][0]),r[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);for(l&&l(e);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],n=!0,s=1;s<o.length;s++){var i=o[s];0!==r[i]&&(n=!1)}n&&(c.splice(e--,1),t=a(a.s=o[0]))}return t}var n={},r={12:0},c=[];function a(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=t,a.c=n,a.d=function(t,e,o){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(o,n,function(e){return t[e]}.bind(null,n));return o},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=s.push.bind(s);s.push=e,s=s.slice();for(var u=0;u<s.length;u++)e(s[u]);var l=i;return c.push([516,0,2,1]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e){!function(){t.exports=this.wp.apiFetch}()},11:function(t,e){!function(){t.exports=this.React}()},18:function(t,e){!function(){t.exports=this.wp.blocks}()},19:function(t,e){!function(){t.exports=this.wp.url}()},22:function(t,e){!function(){t.exports=this.wp.compose}()},28:function(t,e){!function(){t.exports=this.wp.keycodes}()},3:function(t,e){!function(){t.exports=this.wp.components}()},31:function(t,e,o){"use strict";var n=o(8),r=o.n(n),c=o(0),a=o(1),s=o(4),i=o.n(s),u=o(3),l=function(t){var e=t.onChange,o=t.settings,n=o.button,s=o.price,i=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(r()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:s?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return e(r()({},o,{price:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:i?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return e(r()({},o,{rating:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return e(r()({},o,{button:!n}))}}))};l.propTypes={settings:i.a.shape({button:i.a.bool.isRequired,price:i.a.bool.isRequired,rating:i.a.bool.isRequired,title:i.a.bool.isRequired}).isRequired,onChange:i.a.func.isRequired},e.a=l},34:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(5),a=o(4),s=o.n(a),i=o(3),u=function(t){var e=t.columns,o=t.rows,a=t.setAttributes,s=t.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(n.createElement)(i.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:s?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:function(){return a({alignButtons:!s})}}))};u.propTypes={columns:s.a.oneOfType([s.a.number,s.a.string]).isRequired,rows:s.a.oneOfType([s.a.number,s.a.string]).isRequired,alignButtons:s.a.bool.isRequired,setAttributes:s.a.func.isRequired},e.a=u},36:function(t,e){!function(){t.exports=this.ReactDOM}()},39:function(t,e){!function(){t.exports=this.wp.viewport}()},43:function(t,e,o){"use strict";o.d(e,"d",function(){return s}),o.d(e,"e",function(){return i}),o.d(e,"c",function(){return u}),o.d(e,"b",function(){return l}),o.d(e,"a",function(){return d});var n=o(19),r=o(10),c=o.n(r),a=o(5),s=wc_product_block_data.isLargeCatalog||!1,i=wc_product_block_data.limitTags||!1,u=wc_product_block_data.hasTags||!1,l=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,r=t.search,c=[Object(n.addQueryArgs)("/wc/blocks/products",{per_page:s?100:-1,catalog_visibility:"visible",status:"publish",search:r})];return s&&o.length&&c.push(Object(n.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:o})),c}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map(function(t){return c()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})},d=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,r=t.search,c=[Object(n.addQueryArgs)("/wc/blocks/products/tags",{per_page:i?100:-1,orderby:i?"count":"name",order:i?"desc":"asc",search:r})];return i&&o.length&&c.push(Object(n.addQueryArgs)("/wc/blocks/products/tags",{include:o})),c}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map(function(t){return c()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})}},46:function(t,e){!function(){t.exports=this.wp.hooks}()},47:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(3),a=o(4),s=o.n(a),i=function(t){var e=t.value,o=t.setAttributes;return Object(n.createElement)(c.SelectControl,{label:Object(r.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(r.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(r.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(r.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(r.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(r.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(r.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(r.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})};i.propTypes={setAttributes:s.a.func.isRequired,value:s.a.string.isRequired},e.a=i},5:function(t,e){!function(){t.exports=this.lodash}()},504:function(t,e,o){var n=o(505);"string"==typeof n&&(n=[[t.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(38)(n,r);n.locals&&(t.exports=n.locals)},505:function(t,e,o){},51:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},516:function(t,e,o){"use strict";o.r(e);var n=o(0),r=o(1),c=o(18),a=(o(504),o(8)),s=o.n(a),i=o(13),u=o.n(i),l=o(14),d=o.n(l),b=o(15),g=o.n(b),p=o(16),h=o.n(p),f=o(12),_=o.n(f),m=o(17),O=o.n(m),w=o(9),j=o(3),k=o(4),v=o.n(k),y=o(31),E=o(34),C=o(29),P=o.n(C),A=o(5),x=o(24),S=(o(506),o(43)),T=function(t){function e(){var t;return u()(this,e),(t=g()(this,h()(e).apply(this,arguments))).state={list:[],loading:!0},t.renderItem=t.renderItem.bind(_()(t)),t.debouncedOnSearch=Object(A.debounce)(t.onSearch.bind(_()(t)),400),t}return O()(e,t),d()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;Object(S.a)({selected:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(t){var e=this,o=this.props.selected;this.setState({loading:!0}),Object(S.a)({selected:o,search:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,a=void 0===c?0:c,s=["woocommerce-product-tags__item"];o.length&&s.push("is-searching"),0===a&&0!==e.parent&&s.push("is-skip-level");var i=e.breadcrumbs.length?"".concat(e.breadcrumbs.join(", "),", ").concat(e.name):e.name;return Object(n.createElement)(x.b,P()({className:s.join(" ")},t,{showCount:!0,"aria-label":Object(r.sprintf)(Object(r._n)("%d product tagged as %s","%d products tagged as %s",e.count,"woo-gutenberg-products-block"),e.count,i)}))}},{key:"render",value:function(){var t=this.state,e=t.list,o=t.loading,c=this.props,a=c.onChange,s=c.onOperatorChange,i=c.operator,u=c.selected,l={clear:Object(r.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(r.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(r.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(r.__)("Search for product tags","woo-gutenberg-products-block"),selected:function(t){return Object(r.sprintf)(Object(r._n)("%d tag selected","%d tags selected",t,"woo-gutenberg-products-block"),t)},updated:Object(r.__)("Tag search results updated.","woo-gutenberg-products-block")};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(x.a,{className:"woocommerce-product-tags",list:e,isLoading:o,selected:u.map(function(t){return Object(A.find)(e,{id:t})}).filter(Boolean),onChange:a,onSearch:S.e?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:l,isHierarchical:!0}),!!s&&Object(n.createElement)("div",{className:u.length<2?"screen-reader-text":""},Object(n.createElement)(j.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(r.__)("Display products matching","woo-gutenberg-products-block"),help:Object(r.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:i,onChange:s,options:[{label:Object(r.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(r.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(n.Component);T.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired},T.defaultProps={operator:"any"};var R=T,B=o(47),q=function(t){function e(){var t;return u()(this,e),(t=g()(this,h()(e).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},t.startEditing=t.startEditing.bind(_()(t)),t.stopEditing=t.stopEditing.bind(_()(t)),t.setChangedAttributes=t.setChangedAttributes.bind(_()(t)),t.save=t.save.bind(_()(t)),t}return O()(e,t),d()(e,[{key:"componentDidMount",value:function(){this.props.attributes.tags.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(t){this.setState(function(e){return{changedAttributes:s()({},e.changedAttributes,t)}})}},{key:"save",value:function(){var t=this.state.changedAttributes;(0,this.props.setAttributes)(t),this.stopEditing()}},{key:"getInspectorControls",value:function(){var t=this.props,e=t.attributes,o=t.setAttributes,c=this.state.isEditing,a=e.columns,s=e.tagOperator,i=e.contentVisibility,u=e.orderby,l=e.rows,d=e.alignButtons;return Object(n.createElement)(w.InspectorControls,{key:"inspector"},Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Product Tag","woo-gutenberg-products-block"),initialOpen:!e.tags.length&&!c},Object(n.createElement)(R,{selected:e.tags,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return t.id});o({tags:e})},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({tagOperator:t})}})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(E.a,{columns:a,rows:l,alignButtons:d,setAttributes:o})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(y.a,{settings:i,onChange:function(t){return o({contentVisibility:t})}})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(B.a,{setAttributes:o,value:u})))}},{key:"renderEditMode",value:function(){var t=this,e=this.props,o=e.attributes,c=e.debouncedSpeak,a=this.state.changedAttributes,i=s()({},o,a);return Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("Display a grid of products from your selected tags","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-product-tag__selection"},Object(n.createElement)(R,{selected:i.tags,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map(function(t){return t.id});t.setChangedAttributes({tags:o})},operator:i.tagOperator,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t.setChangedAttributes({tagOperator:e})}}),Object(n.createElement)(j.Button,{isDefault:!0,onClick:function(){t.save(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(j.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:function(){t.stopEditing(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var t=this.props,e=t.attributes,o=t.name,c=e.tags.length;return Object(n.createElement)(j.Disabled,null,c?Object(n.createElement)(w.ServerSideRender,{block:o,attributes:e}):Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}},{key:"render",value:function(){var t=this,e=this.state.isEditing;return Object(n.createElement)(n.Fragment,null,S.c?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(w.BlockControls,null,Object(n.createElement)(j.Toolbar,{controls:[{icon:"edit",title:Object(r.__)("Edit"),onClick:function(){return e?t.stopEditing():t.startEditing()},isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode()):Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.","woo-gutenberg-products-block")))}}]),e}(n.Component);q.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired,debouncedSpeak:v.a.func.isRequired};var N=Object(j.withSpokenMessages)(q);Object(c.registerBlockType)("woocommerce/product-tag",{title:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:"tag",foreground:"#96588a"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Display a grid of products from selected tags.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},tags:{type:"array",default:[]},tagOperator:{type:"string",default:"any"},orderby:{type:"string",default:"date"}},edit:function(t){return Object(n.createElement)(N,t)},save:function(){return null}})},52:function(t,e){!function(){t.exports=this.wp.date}()},54:function(t,e){!function(){t.exports=this.wp.dom}()},55:function(t,e){},56:function(t,e){},57:function(t,e){},58:function(t,e){},7:function(t,e){!function(){t.exports=this.moment}()},9:function(t,e){!function(){t.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/product-top-rated.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var r,a,i=t[0],s=t[1],u=t[2],d=0,b=[];d<i.length;d++)a=i[d],n[a]&&b.push(n[a][0]),n[a]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var s=o[i];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={15:0},c=[];function a(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,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},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 u=0;u<i.length;u++)t(i[u]);var l=s;return c.push([549,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},15:function(e,t){!function(){e.exports=this.wp.editor}()},16:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.React}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},26:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t){!function(){e.exports=this.wp.compose}()},3:function(e,t){!function(){e.exports=this.wp.components}()},39:function(e,t){!function(){e.exports=this.wp.keycodes}()},41:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},42:function(e,t,o){"use strict";var r=o(14),n=o.n(r),c=o(0),a=o(1),i=o(4),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),a=o(4),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(s.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},47:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(63),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),a&&"all"===a&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=b[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},49:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t){!function(){e.exports=this.lodash}()},50:function(e,t,o){"use strict";var r=o(40),n=o.n(r),c=o(20),a=o.n(c),i=o(21),s=o.n(i),u=o(22),l=o.n(u),d=o(23),b=o.n(d),p=o(17),g=o.n(p),f=o(24),m=o.n(f),_=o(0),h=o(1),w=o(26),O=o(16),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(34),x=o(3),E=(o(98),function(e){function t(){var e;return a()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,s=r.isSingle,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},E.defaultProps={operator:"any",isSingle:!1},t.a=E},52:function(e,t){!function(){e.exports=this.wp.viewport}()},549:function(e,t,o){"use strict";o.r(t);var r=o(14),n=o.n(r),c=o(0),a=o(1),i=o(25),s=o(37),u=o.n(s),l=o(5),d=o(20),b=o.n(d),p=o(21),g=o.n(p),f=o(22),m=o.n(f),_=o(23),h=o.n(_),w=o(24),O=o.n(w),j=o(3),k=o(15),y=o(4),v=o.n(y),C=o(42),x=o(46),E=o(50),P=function(e){function t(){return b()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.name,o=e.attributes;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:t,attributes:o})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(47),A=o(41),B="woocommerce/product-top-rated";Object(i.registerBlockType)(B,{title:Object(a.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(u.a,{icon:"trophy"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},A.a),transforms:{from:[{type:"block",blocks:Object(l.without)(A.b,B),transform:function(e){return Object(i.createBlock)("woocommerce/product-top-rated",e)}}]},deprecated:[{attributes:A.a,save:Object(S.a)(B)}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},61:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var r,a,i=t[0],s=t[1],u=t[2],d=0,b=[];d<i.length;d++)a=i[d],n[a]&&b.push(n[a][0]),n[a]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var s=o[i];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={13:0},c=[];function a(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,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},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 u=0;u<i.length;u++)t(i[u]);var l=s;return c.push([521,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},28:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(4),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),a=o(4),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(s.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(48),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),a&&"all"===a&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=b[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(29),n=o.n(r),c=o(13),a=o.n(c),i=o(14),s=o.n(i),u=o(15),l=o.n(u),d=o(16),b=o.n(d),p=o(12),g=o.n(p),f=o(17),m=o.n(f),_=o(0),h=o(1),w=o(19),O=o(10),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(24),x=o(3),E=(o(79),function(e){function t(){var e;return a()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,s=r.isSingle,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},E.defaultProps={operator:"any",isSingle:!1},t.a=E},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},52:function(e,t){!function(){e.exports=this.wp.date}()},521:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(18),s=o(25),u=o.n(s),l=o(5),d=o(13),b=o.n(d),p=o(14),g=o.n(p),f=o(15),m=o.n(f),_=o(16),h=o.n(_),w=o(17),O=o.n(w),j=o(3),k=o(9),y=o(4),v=o.n(y),C=o(31),x=o(34),E=o(37),P=function(e){function t(){return b()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.name,o=e.attributes;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:t,attributes:o})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(35),A=o(30),B="woocommerce/product-top-rated";Object(i.registerBlockType)(B,{title:Object(a.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(u.a,{icon:"trophy"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},A.a),transforms:{from:[{type:"block",blocks:Object(l.without)(A.b,B),transform:function(e){return Object(i.createBlock)("woocommerce/product-top-rated",e)}}]},deprecated:[{attributes:A.a,save:Object(S.a)(B)}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/products-by-attribute.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(t){function e(e){for(var r,i,a=e[0],u=e[1],s=e[2],b=0,d=[];b<a.length;b++)i=a[b],n[i]&&d.push(n[i][0]),n[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],r=!0,a=1;a<o.length;a++){var u=o[a];0!==n[u]&&(r=!1)}r&&(c.splice(e--,1),t=i(i.s=o[0]))}return t}var r={},n={16:0},c=[];function i(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=e,a=a.slice();for(var s=0;s<a.length;s++)e(a[s]);var l=u;return c.push([543,1,3,2,0]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},15:function(t,e){!function(){t.exports=this.wp.editor}()},16:function(t,e){!function(){t.exports=this.wp.apiFetch}()},18:function(t,e){!function(){t.exports=this.React}()},25:function(t,e){!function(){t.exports=this.wp.blocks}()},26:function(t,e){!function(){t.exports=this.wp.url}()},28:function(t,e){!function(){t.exports=this.wp.compose}()},3:function(t,e){!function(){t.exports=this.wp.components}()},39:function(t,e){!function(){t.exports=this.wp.keycodes}()},42:function(t,e,o){"use strict";var r=o(14),n=o.n(r),c=o(0),i=o(1),a=o(4),u=o.n(a),s=o(3),l=function(t){var e=t.onChange,o=t.settings,r=o.button,a=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(n()({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:a?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return e(n()({},o,{price:!a}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return e(n()({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return e(n()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,rating:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},e.a=l},46:function(t,e,o){"use strict";var r=o(0),n=o(1),c=o(5),i=o(4),a=o.n(i),u=o(3),s=function(t){var e=t.columns,o=t.rows,i=t.setAttributes,a=t.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_columns,wc_product_block_data.max_columns);i({columns:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_rows,wc_product_block_data.max_rows);i({rows:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(u.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i({alignButtons:!a})}}))};s.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,alignButtons:a.a.bool.isRequired,setAttributes:a.a.func.isRequired},e.a=s},47:function(t,e,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(63),a=o.n(i);o.d(e,"a",function(){return u});var u=function(t){return function(e){var o=e.attributes,n=o.align,i=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:u},function(t,e){var o=t.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(t){return t.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),e){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=a()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(t){m=!0,f=t}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(e,t))}}},49:function(t,e){!function(){t.exports=this.ReactDOM}()},5:function(t,e){!function(){t.exports=this.lodash}()},52:function(t,e){!function(){t.exports=this.wp.viewport}()},522:function(t,e,o){var r=o(523);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o(51)(r,n);r.locals&&(t.exports=r.locals)},523:function(t,e,o){},543:function(t,e,o){"use strict";o.r(e);var r=o(0),n=o(1),c=o(37),i=o.n(c),a=o(25),u=(o(522),o(20)),s=o.n(u),l=o(21),b=o.n(l),d=o(22),p=o.n(d),g=o(23),m=o.n(g),f=o(24),_=o.n(f),h=o(15),w=o(3),O=o(4),y=o.n(O),j=o(42),k=o(46),v=o(70),C=o.n(v),E=o(40),S=o.n(E),x=o(111),A=o.n(x),P=o(14),R=o.n(P),T=o(17),B=o.n(T),q=o(26),M=o(16),N=o.n(M),D=o(5),L=o(34),I=(o(524),function(t){function e(){var t;return s()(this,e),(t=p()(this,m()(e).apply(this,arguments))).state={list:[],loading:!0,attribute:0,termsList:{},termsLoading:!0},t.debouncedGetTerms=Object(D.debounce)(t.getTerms.bind(B()(t)),200),t.renderItem=t.renderItem.bind(B()(t)),t.onSelectAttribute=t.onSelectAttribute.bind(B()(t)),t}return _()(e,t),b()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;N()({path:Object(q.addQueryArgs)("/wc/blocks/products/attributes",{per_page:-1})}).then(function(o){o=o.map(function(t){return R()({},t,{parent:0})}),t.setState(function(t){var r=t.attribute;if(!r&&e.length>0){var n=Object(D.find)(o,{slug:e[0].attr_slug});r=n?n.id:0}return{list:o,attribute:r,loading:!1}})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"componentDidUpdate",value:function(t,e){e.attribute!==this.state.attribute&&this.debouncedGetTerms()}},{key:"getTerms",value:function(){var t=this,e=this.state,o=e.attribute,r=e.termsList;o&&(r[o]||this.setState({termsLoading:!0}),N()({path:Object(q.addQueryArgs)("/wc/blocks/products/attributes/".concat(o,"/terms"),{per_page:-1})}).then(function(e){e=e.map(function(t){return R()({},t,{parent:o,attr_slug:t.attribute.slug})}),t.setState(function(t){return{termsList:R()({},t.termsList,A()({},o,e)),termsLoading:!1}})}).catch(function(){t.setState({termsLoading:!1})}))}},{key:"onSelectAttribute",value:function(t){var e=this;return function(){e.props.onChange([]),e.setState({attribute:t.id===e.state.attribute?0:t.id})}}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,i=void 0===c?0:c,a=this.state,u=a.attribute,s=a.termsLoading,l=["woocommerce-product-attributes__item","woocommerce-search-list__item"];return o.length&&l.push("is-searching"),0===i&&0!==e.parent&&l.push("is-skip-level"),e.breadcrumbs.length?Object(r.createElement)(L.b,S()({className:l.join(" ")},t,{showCount:!0,"aria-label":"".concat(e.breadcrumbs[0],": ").concat(e.name)})):[Object(r.createElement)(L.b,S()({key:"attr-".concat(e.id)},t,{className:l.join(" "),isSelected:u===e.id,onSelect:this.onSelectAttribute,isSingle:!0,disabled:"0"===e.count,"aria-expanded":u===e.id,"aria-label":Object(n.sprintf)(Object(n._n)("%s, has %d term","%s, has %d terms",e.count,"woo-gutenberg-products-block"),e.name,e.count)})),u===e.id&&s&&Object(r.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-product-attributes__itemdepth-1 is-loading is-not-active"},Object(r.createElement)(w.Spinner,null))]}},{key:"render",value:function(){var t=this.state,e=t.attribute,o=t.list,c=t.loading,i=t.termsList,a=this.props,u=a.onChange,s=a.onOperatorChange,l=a.operator,b=a.selected,d=i[e]||[],p=[].concat(C()(o),C()(d)),g={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:function(t){return Object(n.sprintf)(Object(n._n)("%d attribute selected","%d attributes selected",t,"woo-gutenberg-products-block"),t)},updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(L.a,{className:"woocommerce-product-attributes",list:p,isLoading:c,selected:b.map(function(t){var e=t.id;return Object(D.find)(p,{id:e})}).filter(Boolean),onChange:u,renderItem:this.renderItem,messages:g,isHierarchical:!0}),!!s&&Object(r.createElement)("div",{className:b.length<2?"screen-reader-text":""},Object(r.createElement)(w.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:l,onChange:s,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(r.Component));I.propTypes={onChange:y.a.func.isRequired,onOperatorChange:y.a.func,operator:y.a.oneOf(["all","any"]),selected:y.a.array.isRequired},I.defaultProps={operator:"any"};var F=I,V=o(62),W=function(t){function e(){return s()(this,e),p()(this,m()(e).apply(this,arguments))}return _()(e,t),b()(e,[{key:"getInspectorControls",value:function(){var t=this.props.setAttributes,e=this.props.attributes,o=e.attributes,c=e.attrOperator,i=e.columns,a=e.contentVisibility,u=e.orderby,s=e.rows,l=e.alignButtons;return Object(r.createElement)(h.InspectorControls,{key:"inspector"},Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(k.a,{columns:i,rows:s,alignButtons:l,setAttributes:t})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(j.a,{settings:a,onChange:function(e){return t({contentVisibility:e})}})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(F,{selected:o,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});t({attributes:o})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(V.a,{setAttributes:t,value:u})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.debouncedSpeak,o=t.setAttributes,c=this.props.attributes;return Object(r.createElement)(w.Placeholder,{icon:Object(r.createElement)(i.a,{icon:"custom-post-type"}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(r.createElement)(F,{selected:c.attributes,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});o({attributes:e})},operator:c.attrOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({attrOperator:t})}}),Object(r.createElement)(w.Button,{isDefault:!0,onClick:function(){o({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,o=t.name,c=t.setAttributes,i=e.editMode;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(h.BlockControls,null,Object(r.createElement)(w.Toolbar,{controls:[{icon:"edit",title:Object(n.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(r.createElement)(w.Disabled,null,Object(r.createElement)(h.ServerSideRender,{block:o,attributes:e})))}}]),e}(r.Component);W.propTypes={attributes:y.a.object.isRequired,name:y.a.string.isRequired,setAttributes:y.a.func.isRequired,debouncedSpeak:y.a.func.isRequired};var G=Object(w.withSpokenMessages)(W),H=o(47);Object(a.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{icon:"custom-post-type"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows}},save:Object(H.a)("woocommerce/products-by-attribute")}],edit:function(t){return Object(r.createElement)(G,t)},save:function(){return null}})},61:function(t,e){!function(){t.exports=this.wp.hooks}()},62:function(t,e,o){"use strict";var r=o(0),n=o(1),c=o(3),i=o(4),a=o.n(i),u=function(t){var e=t.value,o=t.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})};u.propTypes={setAttributes:a.a.func.isRequired,value:a.a.string.isRequired},e.a=u},66:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},67:function(t,e){!function(){t.exports=this.wp.date}()},71:function(t,e){!function(){t.exports=this.wp.dom}()},74:function(t,e){},75:function(t,e){},76:function(t,e){},77:function(t,e){},8:function(t,e){!function(){t.exports=this.moment}()}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(t){function e(e){for(var r,i,a=e[0],u=e[1],s=e[2],b=0,d=[];b<a.length;b++)i=a[b],n[i]&&d.push(n[i][0]),n[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],r=!0,a=1;a<o.length;a++){var u=o[a];0!==n[u]&&(r=!1)}r&&(c.splice(e--,1),t=i(i.s=o[0]))}return t}var r={},n={14:0},c=[];function i(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=e,a=a.slice();for(var s=0;s<a.length;s++)e(a[s]);var l=u;return c.push([514,0,2,1]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e){!function(){t.exports=this.wp.apiFetch}()},11:function(t,e){!function(){t.exports=this.React}()},18:function(t,e){!function(){t.exports=this.wp.blocks}()},19:function(t,e){!function(){t.exports=this.wp.url}()},22:function(t,e){!function(){t.exports=this.wp.compose}()},28:function(t,e){!function(){t.exports=this.wp.keycodes}()},3:function(t,e){!function(){t.exports=this.wp.components}()},31:function(t,e,o){"use strict";var r=o(8),n=o.n(r),c=o(0),i=o(1),a=o(4),u=o.n(a),s=o(3),l=function(t){var e=t.onChange,o=t.settings,r=o.button,a=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(n()({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:a?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return e(n()({},o,{price:!a}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return e(n()({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return e(n()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,rating:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},e.a=l},34:function(t,e,o){"use strict";var r=o(0),n=o(1),c=o(5),i=o(4),a=o.n(i),u=o(3),s=function(t){var e=t.columns,o=t.rows,i=t.setAttributes,a=t.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_columns,wc_product_block_data.max_columns);i({columns:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_rows,wc_product_block_data.max_rows);i({rows:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(u.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i({alignButtons:!a})}}))};s.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,alignButtons:a.a.bool.isRequired,setAttributes:a.a.func.isRequired},e.a=s},35:function(t,e,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(48),a=o.n(i);o.d(e,"a",function(){return u});var u=function(t){return function(e){var o=e.attributes,n=o.align,i=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:u},function(t,e){var o=t.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(t){return t.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),e){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=a()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(t){m=!0,f=t}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(e,t))}}},36:function(t,e){!function(){t.exports=this.ReactDOM}()},39:function(t,e){!function(){t.exports=this.wp.viewport}()},46:function(t,e){!function(){t.exports=this.wp.hooks}()},47:function(t,e,o){"use strict";var r=o(0),n=o(1),c=o(3),i=o(4),a=o.n(i),u=function(t){var e=t.value,o=t.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})};u.propTypes={setAttributes:a.a.func.isRequired,value:a.a.string.isRequired},e.a=u},494:function(t,e,o){var r=o(495);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o(38)(r,n);r.locals&&(t.exports=r.locals)},495:function(t,e,o){},5:function(t,e){!function(){t.exports=this.lodash}()},51:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},514:function(t,e,o){"use strict";o.r(e);var r=o(0),n=o(1),c=o(25),i=o.n(c),a=o(18),u=(o(494),o(13)),s=o.n(u),l=o(14),b=o.n(l),d=o(15),p=o.n(d),g=o(16),m=o.n(g),f=o(17),_=o.n(f),h=o(9),w=o(3),O=o(4),y=o.n(O),j=o(31),k=o(34),v=o(60),C=o.n(v),E=o(29),S=o.n(E),x=o(92),A=o.n(x),P=o(8),R=o.n(P),T=o(12),B=o.n(T),q=o(19),M=o(10),N=o.n(M),D=o(5),L=o(24),I=(o(496),function(t){function e(){var t;return s()(this,e),(t=p()(this,m()(e).apply(this,arguments))).state={list:[],loading:!0,attribute:0,termsList:{},termsLoading:!0},t.debouncedGetTerms=Object(D.debounce)(t.getTerms.bind(B()(t)),200),t.renderItem=t.renderItem.bind(B()(t)),t.onSelectAttribute=t.onSelectAttribute.bind(B()(t)),t}return _()(e,t),b()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;N()({path:Object(q.addQueryArgs)("/wc/blocks/products/attributes",{per_page:-1})}).then(function(o){o=o.map(function(t){return R()({},t,{parent:0})}),t.setState(function(t){var r=t.attribute;if(!r&&e.length>0){var n=Object(D.find)(o,{slug:e[0].attr_slug});r=n?n.id:0}return{list:o,attribute:r,loading:!1}})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"componentDidUpdate",value:function(t,e){e.attribute!==this.state.attribute&&this.debouncedGetTerms()}},{key:"getTerms",value:function(){var t=this,e=this.state,o=e.attribute,r=e.termsList;o&&(r[o]||this.setState({termsLoading:!0}),N()({path:Object(q.addQueryArgs)("/wc/blocks/products/attributes/".concat(o,"/terms"),{per_page:-1})}).then(function(e){e=e.map(function(t){return R()({},t,{parent:o,attr_slug:t.attribute.slug})}),t.setState(function(t){return{termsList:R()({},t.termsList,A()({},o,e)),termsLoading:!1}})}).catch(function(){t.setState({termsLoading:!1})}))}},{key:"onSelectAttribute",value:function(t){var e=this;return function(){e.props.onChange([]),e.setState({attribute:t.id===e.state.attribute?0:t.id})}}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,i=void 0===c?0:c,a=this.state,u=a.attribute,s=a.termsLoading,l=["woocommerce-product-attributes__item","woocommerce-search-list__item"];return o.length&&l.push("is-searching"),0===i&&0!==e.parent&&l.push("is-skip-level"),e.breadcrumbs.length?Object(r.createElement)(L.b,S()({className:l.join(" ")},t,{showCount:!0,"aria-label":"".concat(e.breadcrumbs[0],": ").concat(e.name)})):[Object(r.createElement)(L.b,S()({key:"attr-".concat(e.id)},t,{className:l.join(" "),isSelected:u===e.id,onSelect:this.onSelectAttribute,isSingle:!0,disabled:"0"===e.count,"aria-expanded":u===e.id,"aria-label":Object(n.sprintf)(Object(n._n)("%s, has %d term","%s, has %d terms",e.count,"woo-gutenberg-products-block"),e.name,e.count)})),u===e.id&&s&&Object(r.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-product-attributes__itemdepth-1 is-loading is-not-active"},Object(r.createElement)(w.Spinner,null))]}},{key:"render",value:function(){var t=this.state,e=t.attribute,o=t.list,c=t.loading,i=t.termsList,a=this.props,u=a.onChange,s=a.onOperatorChange,l=a.operator,b=a.selected,d=i[e]||[],p=[].concat(C()(o),C()(d)),g={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:function(t){return Object(n.sprintf)(Object(n._n)("%d attribute selected","%d attributes selected",t,"woo-gutenberg-products-block"),t)},updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(L.a,{className:"woocommerce-product-attributes",list:p,isLoading:c,selected:b.map(function(t){var e=t.id;return Object(D.find)(p,{id:e})}).filter(Boolean),onChange:u,renderItem:this.renderItem,messages:g,isHierarchical:!0}),!!s&&Object(r.createElement)("div",{className:b.length<2?"screen-reader-text":""},Object(r.createElement)(w.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:l,onChange:s,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(r.Component));I.propTypes={onChange:y.a.func.isRequired,onOperatorChange:y.a.func,operator:y.a.oneOf(["all","any"]),selected:y.a.array.isRequired},I.defaultProps={operator:"any"};var F=I,V=o(47),W=function(t){function e(){return s()(this,e),p()(this,m()(e).apply(this,arguments))}return _()(e,t),b()(e,[{key:"getInspectorControls",value:function(){var t=this.props.setAttributes,e=this.props.attributes,o=e.attributes,c=e.attrOperator,i=e.columns,a=e.contentVisibility,u=e.orderby,s=e.rows,l=e.alignButtons;return Object(r.createElement)(h.InspectorControls,{key:"inspector"},Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(k.a,{columns:i,rows:s,alignButtons:l,setAttributes:t})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(j.a,{settings:a,onChange:function(e){return t({contentVisibility:e})}})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(F,{selected:o,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});t({attributes:o})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(V.a,{setAttributes:t,value:u})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.debouncedSpeak,o=t.setAttributes,c=this.props.attributes;return Object(r.createElement)(w.Placeholder,{icon:Object(r.createElement)(i.a,{icon:"custom-post-type"}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(r.createElement)(F,{selected:c.attributes,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});o({attributes:e})},operator:c.attrOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({attrOperator:t})}}),Object(r.createElement)(w.Button,{isDefault:!0,onClick:function(){o({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,o=t.name,c=t.setAttributes,i=e.editMode;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(h.BlockControls,null,Object(r.createElement)(w.Toolbar,{controls:[{icon:"edit",title:Object(n.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(r.createElement)(w.Disabled,null,Object(r.createElement)(h.ServerSideRender,{block:o,attributes:e})))}}]),e}(r.Component);W.propTypes={attributes:y.a.object.isRequired,name:y.a.string.isRequired,setAttributes:y.a.func.isRequired,debouncedSpeak:y.a.func.isRequired};var G=Object(w.withSpokenMessages)(W),H=o(35);Object(a.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{icon:"custom-post-type"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows}},save:Object(H.a)("woocommerce/products-by-attribute")}],edit:function(t){return Object(r.createElement)(G,t)},save:function(){return null}})},52:function(t,e){!function(){t.exports=this.wp.date}()},54:function(t,e){!function(){t.exports=this.wp.dom}()},55:function(t,e){},56:function(t,e){},57:function(t,e){},58:function(t,e){},7:function(t,e){!function(){t.exports=this.moment}()},9:function(t,e){!function(){t.exports=this.wp.editor}()}});
|
packages/woocommerce-blocks/build/vendors.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[
|
2 |
Â
/*!
|
3 |
Â
Copyright (c) 2017 Jed Watson.
|
4 |
Â
Licensed under the MIT License (MIT), see
|
@@ -9,16 +9,16 @@
|
|
9 |
Â
Licensed under the MIT License (MIT), see
|
10 |
Â
http://jedwatson.github.io/classnames
|
11 |
Â
*/
|
12 |
-
!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"===a)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},,function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return i})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(131),i=n(7);function a(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(i.a)(e):t}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",function(){return i})},function(e,t,n){var r=n(111);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}},,,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},,function(e,t,n){"use strict";var r=new Date,i=new Date;function a(e,t,n,o){function c(t){return e(t=new Date(+t)),t}return c.floor=c,c.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},c.round=function(e){var t=c(e),n=c.ceil(e);return e-t<n-e?t:n},c.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},c.range=function(n,r,i){var a,o=[];if(n=c.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return o;do{o.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return o},c.filter=function(n){return a(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(c.count=function(t,a){return r.setTime(+t),i.setTime(+a),e(r),e(i),Math.floor(n(r,i))},c.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?c.filter(o?function(t){return o(t)%e==0}:function(t){return c.count(0,t)%e==0}):c:null}),c}var o=a(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):o:null};var c=o,s=(o.range,6e4),u=6048e5,l=a(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),f=l,d=(l.range,a(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getMinutes()})),h=d,p=(d.range,a(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*s)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()})),b=p,g=(p.range,a(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/864e5},function(e){return e.getDate()-1})),v=g;g.range;function y(e){return a(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/u})}var m=y(0),w=y(1),_=y(2),k=y(3),E=y(4),S=y(5),M=y(6),D=(m.range,w.range,_.range,k.range,E.range,S.range,M.range,a(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()})),x=D,C=(D.range,a(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()}));C.every=function(e){return isFinite(e=Math.floor(e))&&e>0?a(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var P=C,O=(C.range,a(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getUTCMinutes()})),F=O,I=(O.range,a(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()})),T=I,A=(I.range,a(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1})),j=A;A.range;function N(e){return a(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/u})}var R=N(0),B=N(1),U=N(2),z=N(3),L=N(4),H=N(5),V=N(6),K=(R.range,B.range,U.range,z.range,L.range,H.range,V.range,a(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()})),q=K,W=(K.range,a(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()}));W.every=function(e){return isFinite(e=Math.floor(e))&&e>0?a(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var G=W;W.range;n.d(t,"c",function(){return c}),n.d(t,"n",function(){return c}),n.d(t,"g",function(){return f}),n.d(t,"r",function(){return f}),n.d(t,"d",function(){return h}),n.d(t,"b",function(){return b}),n.d(t,"a",function(){return v}),n.d(t,"j",function(){return m}),n.d(t,"h",function(){return m}),n.d(t,"e",function(){return w}),n.d(t,"i",function(){return E}),n.d(t,"f",function(){return x}),n.d(t,"k",function(){return P}),n.d(t,"o",function(){return F}),n.d(t,"m",function(){return T}),n.d(t,"l",function(){return j}),n.d(t,"u",function(){return R}),n.d(t,"s",function(){return R}),n.d(t,"p",function(){return B}),n.d(t,"t",function(){return L}),n.d(t,"q",function(){return q}),n.d(t,"v",function(){return G})},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(298),i=n(17);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(299);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},,function(e,t,n){var r=n(55),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DISPLAY_FORMAT="L",t.ISO_FORMAT="YYYY-MM-DD",t.ISO_MONTH_FORMAT="YYYY-MM",t.START_DATE="startDate",t.END_DATE="endDate",t.HORIZONTAL_ORIENTATION="horizontal",t.VERTICAL_ORIENTATION="vertical",t.VERTICAL_SCROLLABLE="verticalScrollable",t.ICON_BEFORE_POSITION="before",t.ICON_AFTER_POSITION="after",t.INFO_POSITION_TOP="top",t.INFO_POSITION_BOTTOM="bottom",t.INFO_POSITION_BEFORE="before",t.INFO_POSITION_AFTER="after",t.ANCHOR_LEFT="left",t.ANCHOR_RIGHT="right",t.OPEN_DOWN="down",t.OPEN_UP="up",t.DAY_SIZE=39,t.BLOCKED_MODIFIER="blocked",t.WEEKDAYS=[0,1,2,3,4,5,6],t.FANG_WIDTH_PX=20,t.FANG_HEIGHT_PX=10,t.DEFAULT_VERTICAL_SPACING=22,t.MODIFIER_KEY_NAMES=new Set(["Shift","Control","Alt","Meta"])},,function(e,t,n){"use strict";var r=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function a(){}var o="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,f=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),d=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),h=new RegExp("^rgba\\("+[o,o,o,c]+"\\)$"),p=new RegExp("^rgba\\("+[s,s,s,c]+"\\)$"),b=new RegExp("^hsl\\("+[c,s,s]+"\\)$"),g=new RegExp("^hsla\\("+[c,s,s,c]+"\\)$"),v={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function y(e){var t;return e=(e+"").trim().toLowerCase(),(t=u.exec(e))?new E((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=l.exec(e))?m(parseInt(t[1],16)):(t=f.exec(e))?new E(t[1],t[2],t[3],1):(t=d.exec(e))?new E(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=h.exec(e))?w(t[1],t[2],t[3],t[4]):(t=p.exec(e))?w(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=b.exec(e))?M(t[1],t[2]/100,t[3]/100,1):(t=g.exec(e))?M(t[1],t[2]/100,t[3]/100,t[4]):v.hasOwnProperty(e)?m(v[e]):"transparent"===e?new E(NaN,NaN,NaN,0):null}function m(e){return new E(e>>16&255,e>>8&255,255&e,1)}function w(e,t,n,r){return r<=0&&(e=t=n=NaN),new E(e,t,n,r)}function _(e){return e instanceof a||(e=y(e)),e?new E((e=e.rgb()).r,e.g,e.b,e.opacity):new E}function k(e,t,n,r){return 1===arguments.length?_(e):new E(e,t,n,null==r?1:r)}function E(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function S(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function M(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new x(e,t,n,r)}function D(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof x)return new x(e.h,e.s,e.l,e.opacity);if(e instanceof a||(e=y(e)),!e)return new x;if(e instanceof x)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),c=NaN,s=o-i,u=(o+i)/2;return s?(c=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,c*=60):s=u>0&&u<1?0:c,new x(c,s,u,e.opacity)}(e):new x(e,t,n,null==r?1:r)}function x(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function C(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}r(a,y,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),r(E,k,i(a,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new E(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new E(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+S(this.r)+S(this.g)+S(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),r(x,D,i(a,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new x(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new x(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new E(C(e>=240?e-240:e+120,i,r),C(e,i,r),C(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var P=Math.PI/180,O=180/Math.PI,F=.96422,I=1,T=.82521,A=4/29,j=6/29,N=3*j*j,R=j*j*j;function B(e){if(e instanceof z)return new z(e.l,e.a,e.b,e.opacity);if(e instanceof G)return Y(e);e instanceof E||(e=_(e));var t,n,r=K(e.r),i=K(e.g),a=K(e.b),o=L((.2225045*r+.7168786*i+.0606169*a)/I);return r===i&&i===a?t=n=o:(t=L((.4360747*r+.3850649*i+.1430804*a)/F),n=L((.0139322*r+.0971045*i+.7141733*a)/T)),new z(116*o-16,500*(t-o),200*(o-n),e.opacity)}function U(e,t,n,r){return 1===arguments.length?B(e):new z(e,t,n,null==r?1:r)}function z(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function L(e){return e>R?Math.pow(e,1/3):e/N+A}function H(e){return e>j?e*e*e:N*(e-A)}function V(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function K(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function q(e){if(e instanceof G)return new G(e.h,e.c,e.l,e.opacity);if(e instanceof z||(e=B(e)),0===e.a&&0===e.b)return new G(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*O;return new G(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function W(e,t,n,r){return 1===arguments.length?q(e):new G(e,t,n,null==r?1:r)}function G(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Y(e){if(isNaN(e.h))return new z(e.l,0,0,e.opacity);var t=e.h*P;return new z(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}r(z,U,i(a,{brighter:function(e){return new z(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new z(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new E(V(3.1338561*(t=F*H(t))-1.6168667*(e=I*H(e))-.4906146*(n=T*H(n))),V(-.9787684*t+1.9161415*e+.033454*n),V(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),r(G,W,i(a,{brighter:function(e){return new G(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new G(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Y(this).rgb()}}));var $=-.14861,X=1.78277,Z=-.29227,J=-.90649,Q=1.97294,ee=Q*J,te=Q*X,ne=X*Z-J*$;function re(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof ie)return new ie(e.h,e.s,e.l,e.opacity);e instanceof E||(e=_(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(ne*r+ee*t-te*n)/(ne+ee-te),a=r-i,o=(Q*(n-i)-Z*a)/J,c=Math.sqrt(o*o+a*a)/(Q*i*(1-i)),s=c?Math.atan2(o,a)*O-120:NaN;return new ie(s<0?s+360:s,c,i,e.opacity)}(e):new ie(e,t,n,null==r?1:r)}function ie(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}r(ie,re,i(a,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new ie(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ie(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*P,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new E(255*(t+n*($*r+X*i)),255*(t+n*(Z*r+J*i)),255*(t+n*(Q*r)),this.opacity)}})),n.d(t,"a",function(){return y}),n.d(t,"f",function(){return k}),n.d(t,"d",function(){return D}),n.d(t,"e",function(){return U}),n.d(t,"c",function(){return W}),n.d(t,"b",function(){return re})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=function(){function e(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(18),o=s(a),c=s(n(4));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e,t){return 0<=t.indexOf(e)},l=function(e){return 0==e%18},f=["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle","gridicons-reader-follow","gridicons-reader-following"],d=["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"],h=["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"],p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.PureComponent),i(t,[{key:"render",value:function(){var e=this.props,t=e.size,n=e.onClick,i=e.icon,a=e.className,c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s="gridicons-"+i,p=void 0,b=["gridicon",s,a,!!(u(s,f)&&l(t))&&"needs-offset",!!(u(s,d)&&l(t))&&"needs-offset-x",!!(u(s,h)&&l(t))&&"needs-offset-y"].filter(Boolean).join(" ");switch(s){default:p=o.default.createElement("svg",r({height:t,width:t},c));break;case"gridicons-add-image":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-bell":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 15h-4v-2H2v6c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2v-6h-8v2zm6-9h-2V4c0-1.105-.895-2-2-2H8c-1.105 0-2 .895-2 2v2H4c-1.105 0-2 .895-2 2v4h20V8c0-1.105-.895-2-2-2zm-4 0H8V4h8v2z"})));break;case"gridicons-bug":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14h4v-2h-4v-2h1a2 2 0 0 0 2-2V6h-2v2H5V6H3v2a2 2 0 0 0 2 2h1v2H2v2h4v1a6 6 0 0 0 .09 1H5a2 2 0 0 0-2 2v2h2v-2h1.81A6 6 0 0 0 11 20.91V10h2v10.91A6 6 0 0 0 17.19 18H19v2h2v-2a2 2 0 0 0-2-2h-1.09a6 6 0 0 0 .09-1zM12 2a4 4 0 0 0-4 4h8a4 4 0 0 0-4-4z"})));break;case"gridicons-calendar":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-caption":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 15l2-2v5c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h13l-2 2H4v12h16v-3zm2.44-8.56l-.88-.88c-.586-.585-1.534-.585-2.12 0L12 13v2H6v2h9v-1l7.44-7.44c.585-.586.585-1.534 0-2.12z"})));break;case"gridicons-cart":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-chat":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 12c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H9v3l-3-3H3zM21 18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-6v1c0 2.2-1.8 4-4 4v2c0 1.1.9 2 2 2h2v3l3-3h3z"})));break;case"gridicons-checkmark-circle":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})));break;case"gridicons-cloud":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 12l-5.45 6.5L16 17.21 20.39 12 16 6.79l1.55-1.29zM8 6.79L6.45 5.5 1 12l5.45 6.5L8 17.21 3.61 12zm.45 14.61l1.93.52L15.55 2.6l-1.93-.52z"})));break;case"gridicons-cog":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 16l-5 5v-5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v9c0 1.1-.9 2-2 2h-7z"})));break;case"gridicons-computer":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-coupon":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 16v2h-2v-2h2zm3-3h2v-2h-2v2zm2 8h-2v2h2v-2zm3-5v2h2v-2h-2zm-1-3c.552 0 1 .448 1 1h2c0-1.657-1.343-3-3-3v2zm1 7c0 .552-.448 1-1 1v2c1.657 0 3-1.343 3-3h-2zm-7 1c-.552 0-1-.448-1-1h-2c0 1.657 1.343 3 3 3v-2zm3.21-5.21c-.78.78-2.047.782-2.828.002l-.002-.002L10 11.41l-1.43 1.44c.28.506.427 1.073.43 1.65C9 16.433 7.433 18 5.5 18S2 16.433 2 14.5 3.567 11 5.5 11c.577.003 1.144.15 1.65.43L8.59 10 7.15 8.57c-.506.28-1.073.427-1.65.43C3.567 9 2 7.433 2 5.5S3.567 2 5.5 2 9 3.567 9 5.5c-.003.577-.15 1.144-.43 1.65L10 8.59l3.88-3.88c.78-.78 2.047-.782 2.828-.002l.002.002-5.3 5.29 5.8 5.79zM5.5 7C6.328 7 7 6.328 7 5.5S6.328 4 5.5 4 4 4.672 4 5.5 4.672 7 5.5 7zM7 14.5c0-.828-.672-1.5-1.5-1.5S4 13.672 4 14.5 4.672 16 5.5 16 7 15.328 7 14.5z"})));break;case"gridicons-create":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"}),o.default.createElement("path",{d:"M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"})));break;case"gridicons-credit-card":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-circle":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})));break;case"gridicons-cross-small":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"})));break;case"gridicons-custom-post-type":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-domains":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm6.918 6h-3.215c-.188-1.424-.42-2.65-.565-3.357 1.593.682 2.916 1.87 3.78 3.357zm-5.904-3.928c.068.352.387 2.038.645 3.928h-3.32c.26-1.89.578-3.576.646-3.928C11.32 4.03 11.656 4 12 4s.68.03 1.014.072zM14 12c0 .598-.043 1.286-.11 2h-3.78c-.067-.714-.11-1.402-.11-2s.043-1.286.11-2h3.78c.067.714.11 1.402.11 2zM8.862 4.643C8.717 5.35 8.485 6.576 8.297 8H5.082c.864-1.487 2.187-2.675 3.78-3.357zM4.262 10h3.822c-.05.668-.084 1.344-.084 2s.033 1.332.085 2H4.263C4.097 13.36 4 12.692 4 12s.098-1.36.263-2zm.82 6h3.215c.188 1.424.42 2.65.565 3.357-1.593-.682-2.916-1.87-3.78-3.357zm5.904 3.928c-.068-.353-.388-2.038-.645-3.928h3.32c-.26 1.89-.578 3.576-.646 3.928-.333.043-.67.072-1.014.072s-.68-.03-1.014-.072zm4.152-.57c.145-.708.377-1.934.565-3.358h3.215c-.864 1.487-2.187 2.675-3.78 3.357zm4.6-5.358h-3.822c.05-.668.084-1.344.084-2s-.033-1.332-.085-2h3.82c.167.64.265 1.308.265 2s-.097 1.36-.263 2z"})));break;case"gridicons-dropdown":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis-circle":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM7.5 13.5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5S9 11.2 9 12s-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z"})));break;case"gridicons-ellipsis":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-filter":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"})));break;case"gridicons-flag":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-fullscreen-exit":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 10V4h2v2.59l3.29-3.29 1.41 1.41L17.41 8H20v2zM4 10V8h2.59l-3.3-3.29 1.42-1.42L8 6.59V4h2v6zm16 4v2h-2.59l3.29 3.29-1.41 1.41L16 17.41V20h-2v-6zm-10 0v6H8v-2.59l-3.29 3.3-1.42-1.42L6.59 16H4v-2z"})));break;case"gridicons-fullscreen":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})));break;case"gridicons-gift":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 6h-4.8c.5-.5.8-1.2.8-2 0-1.7-1.3-3-3-3s-3 1.3-3 3c0-1.7-1.3-3-3-3S6 2.3 6 4c0 .8.3 1.5.8 2H2v6h1v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h1V6zm-2 4h-7V8h7v2zm-5-7c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM9 3c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM4 8h7v2H4V8zm1 4h6v8H5v-8zm14 8h-6v-8h6v8z"})));break;case"gridicons-globe":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading-h1":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 7h2v10h-2v-4H7v4H5V7h2v4h4V7zm6.57 0c-.594.95-1.504 1.658-2.57 2v1h2v7h2V7h-1.43z"})));break;case"gridicons-heading-h2":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 7h2v10H9v-4H5v4H3V7h2v4h4V7zm8 8c.51-.41.6-.62 1.06-1.05.437-.4.848-.828 1.23-1.28.334-.39.62-.82.85-1.28.2-.39.305-.822.31-1.26.005-.44-.087-.878-.27-1.28-.177-.385-.437-.726-.76-1-.346-.283-.743-.497-1.17-.63-.485-.153-.99-.227-1.5-.22-.36 0-.717.033-1.07.1-.343.06-.678.158-1 .29-.304.13-.593.295-.86.49-.287.21-.56.437-.82.68l1.24 1.22c.308-.268.643-.502 1-.7.35-.2.747-.304 1.15-.3.455-.03.906.106 1.27.38.31.278.477.684.45 1.1-.014.396-.14.78-.36 1.11-.285.453-.62.872-1 1.25-.44.43-.98.92-1.59 1.43-.61.51-1.41 1.06-2.16 1.65V17h8v-2h-4z"})));break;case"gridicons-heading-h3":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.11 14.218c.355.287.75.523 1.17.7.434.18.9.273 1.37.27.484.017.965-.086 1.4-.3.333-.146.55-.476.55-.84.003-.203-.05-.403-.15-.58-.123-.19-.3-.34-.51-.43-.32-.137-.655-.228-1-.27-.503-.073-1.012-.106-1.52-.1v-1.57c.742.052 1.485-.07 2.17-.36.37-.164.615-.525.63-.93.026-.318-.12-.627-.38-.81-.34-.203-.734-.3-1.13-.28-.395.013-.784.108-1.14.28-.375.167-.73.375-1.06.62l-1.22-1.39c.5-.377 1.053-.68 1.64-.9.608-.224 1.252-.336 1.9-.33.525-.007 1.05.05 1.56.17.43.1.84.277 1.21.52.325.21.595.495.79.83.19.342.287.73.28 1.12.01.48-.177.943-.52 1.28-.417.39-.916.685-1.46.86v.06c.61.14 1.175.425 1.65.83.437.382.68.94.66 1.52.005.42-.113.835-.34 1.19-.23.357-.538.657-.9.88-.408.253-.853.44-1.32.55-.514.128-1.04.192-1.57.19-.786.02-1.57-.106-2.31-.37-.59-.214-1.126-.556-1.57-1l1.12-1.41zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})));break;case"gridicons-heading-h4":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm10-2h-1v2h-2v-2h-5v-2l4.05-6H20v6h1v2zm-3-2V9l-2.79 4H18z"})));break;case"gridicons-heading-h5":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.09 14.19c.352.27.73.5 1.13.69.42.196.877.296 1.34.29.51.014 1.01-.125 1.44-.4.378-.253.594-.686.57-1.14.02-.45-.197-.877-.57-1.13-.406-.274-.89-.41-1.38-.39h-.47c-.135.014-.27.04-.4.08l-.41.15-.48.23-1.02-.57.28-5h6.4v1.92h-4.31L16 10.76c.222-.077.45-.138.68-.18.235-.037.472-.054.71-.05.463-.004.924.057 1.37.18.41.115.798.305 1.14.56.33.248.597.57.78.94.212.422.322.888.32 1.36.007.497-.11.99-.34 1.43-.224.417-.534.782-.91 1.07-.393.3-.837.527-1.31.67-.497.164-1.016.252-1.54.26-.788.023-1.573-.11-2.31-.39-.584-.238-1.122-.577-1.59-1l1.09-1.42zM11 17H9v-4H5v4H3V7h2v4h4V7h2v10z"})));break;case"gridicons-heading-h6":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm8.58-7.508c-.248-.204-.524-.37-.82-.49-.625-.242-1.317-.242-1.94 0-.3.11-.566.287-.78.52-.245.27-.432.586-.55.93-.16.46-.243.943-.25 1.43.367-.33.79-.59 1.25-.77.405-.17.84-.262 1.28-.27.415-.006.83.048 1.23.16.364.118.704.304 1 .55.295.253.528.57.68.93.193.403.302.843.32 1.29.01.468-.094.93-.3 1.35-.206.387-.49.727-.83 1-.357.287-.764.504-1.2.64-.98.31-2.033.293-3-.05-.507-.182-.968-.472-1.35-.85-.437-.416-.778-.92-1-1.48-.243-.693-.352-1.426-.32-2.16-.02-.797.11-1.59.38-2.34.215-.604.556-1.156 1-1.62.406-.416.897-.74 1.44-.95.54-.21 1.118-.314 1.7-.31.682-.02 1.36.096 2 .34.5.19.962.464 1.37.81l-1.31 1.34zm-2.39 5.84c.202 0 .405-.03.6-.09.183-.046.356-.128.51-.24.15-.136.27-.303.35-.49.092-.225.136-.467.13-.71.037-.405-.123-.804-.43-1.07-.328-.23-.72-.347-1.12-.33-.346-.002-.687.07-1 .21-.383.17-.724.418-1 .73.046.346.143.683.29 1 .108.23.257.44.44.62.152.15.337.26.54.33.225.055.46.068.69.04z"})));break;case"gridicons-heading":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 8c0-2.21-1.79-4-4-4s-4 1.79-4 4h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2c-.552 0-1 .448-1 1v2h2v-1.14c1.722-.447 3-1.998 3-3.86zm-3 6h-2v2h2v-2z"})));break;case"gridicons-help":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 16h-2v-2h2v2zm0-4.14V15h-2v-2c0-.552.448-1 1-1 1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.862-1.278 3.413-3 3.86z"})));break;case"gridicons-history":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),o.default.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image-remove":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20.587 3.423L22 4.837 20 6.84V18c0 1.105-.895 2-2 2H6.84l-2.007 2.006-1.414-1.414 17.167-17.17zM12.42 14.42l1 1 1-1c.63-.504 1.536-.456 2.11.11L18 16V8.84l-5.58 5.58zM15.16 6H6v6.38l2.19-2.19 1.39 1.39L4 17.163V6c0-1.105.895-2 2-2h11.162l-2 2z"})));break;case"gridicons-image":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 6v12c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H6v6.38l2.19-2.19 5.23 5.23 1-1c.63-.504 1.536-.456 2.11.11L18 16V6zm-5 3.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5z"})));break;case"gridicons-indent-left":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h2V4h-2v16zM2 11h10.172l-2.086-2.086L11.5 7.5 16 12l-4.5 4.5-1.414-1.414L12.172 13H2v-2z"})));break;case"gridicons-indent-right":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 4H4v16h2V4zm16 9H11.828l2.086 2.086L12.5 16.5 8 12l4.5-4.5 1.414 1.414L11.828 11H22v2z"})));break;case"gridicons-info-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})));break;case"gridicons-info":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})));break;case"gridicons-ink":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M5 15c0 3.866 3.134 7 7 7s7-3.134 7-7c0-1.387-.41-2.677-1.105-3.765h.007L12 2l-5.903 9.235h.007C5.41 12.323 5 13.613 5 15z"})));break;case"gridicons-institution":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 19h20v3H2zM12 2L2 6v2h20V6M17 10h3v7h-3zM10.5 10h3v7h-3zM4 10h3v7H4z"})));break;case"gridicons-italic":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.536 5l-.427 2h1.5L9.262 18h-1.5l-.427 2h6.128l.426-2h-1.5l2.347-11h1.5l.427-2"})));break;case"gridicons-layout-blocks":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7h-2V3c0-1.105-.895-2-2-2H7c-1.105 0-2 .895-2 2v2H3c-1.105 0-2 .895-2 2v4c0 1.105.895 2 2 2h2v8c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-2h2c1.105 0 2-.895 2-2V9c0-1.105-.895-2-2-2zm-4 14H7v-8h2c1.105 0 2-.895 2-2V7c0-1.105-.895-2-2-2H7V3h10v4h-2c-1.105 0-2 .895-2 2v8c0 1.105.895 2 2 2h2v2zm4-4h-6V9h6v8z"})));break;case"gridicons-layout":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 20H5c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2v12c0 1.105-.895 2-2 2zm8-10h4c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2h-4c-1.105 0-2 .895-2 2v3c0 1.105.895 2 2 2zm5 10v-6c0-1.105-.895-2-2-2h-5c-1.105 0-2 .895-2 2v6c0 1.105.895 2 2 2h5c1.105 0 2-.895 2-2z"})));break;case"gridicons-line-graph":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v2H3zm3-3c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3L8.8 10H9c.5 0 1-.2 1.3-.5l2.7 1.4v.1c0 1.1.9 2 2 2s2-.9 2-2c0-.5-.2-.9-.5-1.3L17.8 7h.2c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2c0 .5.2 1 .5 1.3L15.2 9H15c-.5 0-1 .2-1.3.5L11 8.2V8c0-1.1-.9-2-2-2s-2 .9-2 2c0 .5.2 1 .5 1.3L6.2 12H6c-1.1 0-2 .9-2 2s.9 2 2 2z"})));break;case"gridicons-link-break":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 11l-2 2H7v-2h3zm9.64-3.64L22 5l-1.5-1.5-17 17L5 22l9-9h3v-2h-1l2-2c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-1.623-.97-3.013-2.36-3.64zM4.36 16.64L6 15c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4v2c0 1.623.97 3.013 2.36 3.64z"})));break;case"gridicons-link":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 13H7v-2h10v2zm1-6h-1c-1.63 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-2.21-1.79-4-4-4zM2 11v2c0 2.21 1.79 4 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4z"})));break;case"gridicons-list-checkmark":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9.5 15.5L5 20l-2.5-2.5 1.06-1.06L5 17.88l3.44-3.44L9.5 15.5zM10 5v2h11V5H10zm0 14h11v-2H10v2zm0-6h11v-2H10v2zM8.44 8.44L5 11.88l-1.44-1.44L2.5 11.5 5 14l4.5-4.5-1.06-1.06zm0-6L5 5.88 3.56 4.44 2.5 5.5 5 8l4.5-4.5-1.06-1.06z"})));break;case"gridicons-list-ordered-rtl":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h13v-2H3v2zm0-6h13v-2H3v2zm0-8v2h13V5H3zm16.587.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H19.97L18.5 4.915l.6.738.487-.4zm.448 7.826c.475-.426.785-.715.93-.867.146-.15.262-.296.35-.434.088-.138.153-.278.195-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608-.12-.18-.29-.32-.507-.417-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067-.177.045-.34.11-.49.195-.15.084-.337.225-.558.422l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.03.304.096.072.064.108.152.108.264 0 .09-.018.176-.054.258-.035.082-.1.18-.19.294-.093.114-.288.328-.587.64L18.547 13.3v.762h3.108v-.955h-1.62v-.03zm.46 4.747v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.175-.6-.263-1.043-.263-.308 0-.58.033-.817.1s-.47.178-.696.334l.48.774c.293-.184.576-.275.85-.275.147 0 .263.026.35.08.087.056.13.14.13.253 0 .3-.294.45-.882.45h-.27v.87h.264c.216 0 .392.017.526.05.135.03.232.08.293.143.06.064.09.154.09.27 0 .153-.058.265-.174.337-.116.07-.3.106-.555.106-.163 0-.342-.023-.537-.07-.194-.045-.385-.116-.573-.212v.96c.228.09.44.15.637.183.196.034.41.05.64.05.56 0 .998-.113 1.314-.342.316-.228.474-.542.474-.94.003-.585-.355-.923-1.07-1.013z"})));break;case"gridicons-list-ordered":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 19h13v-2H8v2zm0-6h13v-2H8v2zm0-8v2h13V5H8zm-4.425.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H3.96L2.487 4.915l.6.738.487-.4zm.334 7.764c.474-.426.784-.715.93-.867.145-.153.26-.298.35-.436.087-.138.152-.278.194-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608s-.29-.32-.507-.417c-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067s-.34.11-.49.195c-.15.085-.337.226-.558.423l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.032.304.097.073.064.11.152.11.264 0 .09-.02.176-.055.258-.036.082-.1.18-.192.294-.092.114-.287.328-.586.64L2.42 13.238V14h3.11v-.955H3.91v-.03zm.53 4.746v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.176-.6-.264-1.043-.264-.307 0-.58.033-.816.1s-.47.178-.696.334l.48.773c.293-.183.576-.274.85-.274.147 0 .263.027.35.082s.13.14.13.252c0 .3-.294.45-.882.45h-.27v.87h.264c.217 0 .393.017.527.05.136.03.233.08.294.143.06.064.09.154.09.27 0 .153-.057.265-.173.337-.115.07-.3.106-.554.106-.164 0-.343-.022-.538-.07-.194-.044-.385-.115-.573-.21v.96c.228.088.44.148.637.182.196.033.41.05.64.05.56 0 .998-.114 1.314-.343.315-.228.473-.542.473-.94.002-.585-.356-.923-1.07-1.013z"})));break;case"gridicons-list-unordered":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-location":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9c0-3.866-3.134-7-7-7S5 5.134 5 9c0 1.387.41 2.677 1.105 3.765h-.008C8.457 16.46 12 22 12 22l5.903-9.235h-.007C18.59 11.677 19 10.387 19 9zm-7 3c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"})));break;case"gridicons-lock":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-1V7c0-2.757-2.243-5-5-5S7 4.243 7 7v1H6c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V10c0-1.105-.895-2-2-2zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v1H9V7zm4 8.723V18h-2v-2.277c-.595-.346-1-.984-1-1.723 0-1.105.895-2 2-2s2 .895 2 2c0 .738-.405 1.376-1 1.723z"})));break;case"gridicons-mail":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"gridicons-mention":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 0 0 0 20v-2a8 8 0 1 1 8-8v.5a1.5 1.5 0 0 1-3 0V7h-2v1a5 5 0 1 0 1 7 3.5 3.5 0 0 0 6-2.46V12A10 10 0 0 0 12 2zm0 13a3 3 0 1 1 3-3 3 3 0 0 1-3 3z"})));break;case"gridicons-menu":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 6v2H3V6h18zM3 18h18v-2H3v2zm0-5h18v-2H3v2z"})));break;case"gridicons-menus":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h10v-2H9v2zm0-6h6v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-microphone":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9v1a7 7 0 0 1-6 6.92V20h3v2H8v-2h3v-3.08A7 7 0 0 1 5 10V9h2v1a5 5 0 0 0 10 0V9zm-7 4a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3z"})));break;case"gridicons-minus-small":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 11h12v2H6z"})));break;case"gridicons-minus":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 11h18v2H3z"})));break;case"gridicons-money":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 5v14h20V5H2zm5 12c0-1.657-1.343-3-3-3v-4c1.657 0 3-1.343 3-3h10c0 1.657 1.343 3 3 3v4c-1.657 0-3 1.343-3 3H7zm5-8c1.1 0 2 1.3 2 3s-.9 3-2 3-2-1.3-2-3 .9-3 2-3z"})));break;case"gridicons-multiple-users":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M24 14.6c0 .6-1.2 1-2.6 1.2-.9-1.7-2.7-3-4.8-3.9.2-.3.4-.5.6-.8h.8c3.1-.1 6 1.8 6 3.5zM6.8 11H6c-3.1 0-6 1.9-6 3.6 0 .6 1.2 1 2.6 1.2.9-1.7 2.7-3 4.8-3.9l-.6-.9zm5.2 1c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0 1c-4.1 0-8 2.6-8 5 0 2 8 2 8 2s8 0 8-2c0-2.4-3.9-5-8-5zm5.7-3h.3c1.7 0 3-1.3 3-3s-1.3-3-3-3c-.5 0-.9.1-1.3.3.8 1 1.3 2.3 1.3 3.7 0 .7-.1 1.4-.3 2zM6 10h.3C6.1 9.4 6 8.7 6 8c0-1.4.5-2.7 1.3-3.7C6.9 4.1 6.5 4 6 4 4.3 4 3 5.3 3 7s1.3 3 3 3z"})));break;case"gridicons-my-sites-horizon":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.986 13.928l.762-2.284-1.324-3.63c-.458-.026-.892-.08-.892-.08-.458-.027-.405-.727.054-.7 0 0 1.403.107 2.24.107.888 0 2.265-.107 2.265-.107.46-.027.513.646.055.7 0 0-.46.055-.973.082l2.006 5.966c-.875-.034-1.74-.053-2.6-.06l-.428-1.177-.403 1.17c-.252.002-.508.01-.76.015zm-7.156.393c-.21-.737-.33-1.514-.33-2.32 0-1.232.264-2.402.736-3.46l2.036 5.58c.85-.06 1.69-.104 2.526-.138L6.792 8.015c.512-.027.973-.08.973-.08.458-.055.404-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.036-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .674-.244 1.463-.572 2.51.3.02.604.043.907.066l.798-2.307c.486-1.212.647-2.18.647-3.043 0-.313-.02-.603-.057-.874.662 1.21 1.04 2.6 1.04 4.077 0 .807-.128 1.58-.34 2.32.5.05 1.006.112 1.51.17.205-.798.33-1.628.33-2.49 0-5.523-4.477-10-10-10S2 6.477 2 12c0 .862.125 1.692.33 2.49.5-.057 1.003-.12 1.5-.17zm14.638 3.168C16.676 19.672 14.118 20.5 12 20.5c-1.876 0-4.55-.697-6.463-3.012-.585.048-1.174.1-1.77.16C5.572 20.272 8.578 22 12 22c3.422 0 6.43-1.73 8.232-4.35-.593-.063-1.18-.114-1.764-.162zM12 15.01c-3.715 0-7.368.266-10.958.733.18.41.35.825.506 1.247 3.427-.43 6.91-.68 10.452-.68s7.025.25 10.452.68c.156-.422.327-.836.506-1.246-3.59-.467-7.243-.734-10.958-.734z"})));break;case"gridicons-my-sites":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM3.5 12c0-1.232.264-2.402.736-3.46L8.29 19.65C5.456 18.272 3.5 15.365 3.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.485c.512-.027.973-.08.973-.08.458-.055.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.107-2.24-.107-.458-.026-.51.674-.053.7 0 0 .434.055.892.082l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.055.403-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.646 2.748l-.848 2.833-3.072-9.138zm3.1 11.332l2.597-7.506c.484-1.212.645-2.18.645-3.044 0-.313-.02-.603-.057-.874.664 1.21 1.042 2.6 1.042 4.078 0 3.136-1.7 5.874-4.227 7.347z"})));break;case"gridicons-nametag":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6a1 1 0 1 1-1 1 1 1 0 0 1 1-1zm-6 8h12v3H6zm14-8h-4V3H8v3H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM10 5h4v5h-4zm10 14H4v-9h4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2h4z"})));break;case"gridicons-next-page":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-8V6h8v2zm4-4v8l-6 6H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H8v12h6v-4c0-1.105.895-2 2-2h4V4zM4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6z"})));break;case"gridicons-not-visible":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M1 12s4.188-6 11-6c.947 0 1.84.12 2.678.322L8.36 12.64C8.133 12.14 8 11.586 8 11c0-.937.335-1.787.875-2.47C6.483 9.344 4.66 10.917 3.62 12c.68.707 1.696 1.62 2.98 2.398L5.15 15.85C2.498 14.13 1 12 1 12zm22 0s-4.188 6-11 6c-.946 0-1.836-.124-2.676-.323L5 22l-1.5-1.5 17-17L22 5l-3.147 3.147C21.5 9.87 23 12 23 12zm-2.615.006c-.678-.708-1.697-1.624-2.987-2.403L16 11c0 2.21-1.79 4-4 4l-.947.947c.31.03.624.053.947.053 3.978 0 6.943-2.478 8.385-3.994z"})));break;case"gridicons-notice-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})));break;case"gridicons-notice":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-offline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 3h8l-4 6h4L6 21l4-9H6l4-9"})));break;case"gridicons-pages":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"})));break;case"gridicons-pause":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"})));break;case"gridicons-pencil":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 6l5 5-9.507 9.507c-.686-.686-.69-1.794-.012-2.485l-.002-.003c-.69.676-1.8.673-2.485-.013-.677-.677-.686-1.762-.036-2.455l-.008-.008c-.694.65-1.78.64-2.456-.036L13 6zm7.586-.414l-2.172-2.172c-.78-.78-2.047-.78-2.828 0L14 5l5 5 1.586-1.586c.78-.78.78-2.047 0-2.828zM3 18v3h3c0-1.657-1.343-3-3-3z"})));break;case"gridicons-phone":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})));break;case"gridicons-pin":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 17c0-2.038-1.188-3.836-3-4.92V5h.5c.828 0 1.5-.672 1.5-1.5S17.328 2 16.5 2h-9C6.672 2 6 2.672 6 3.5S6.672 5 7.5 5H8v7.08C6.188 13.164 5 14.962 5 17h6v4c0 .55.45 1 1 1s1-.45 1-1v-4h6z"})));break;case"gridicons-plans":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm-1 12H6l5-10v10zm2 6V10h5l-5 10z"})));break;case"gridicons-play":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-2 14.5v-9l6 4.5z"})));break;case"gridicons-plugins":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8V3c0-.552-.448-1-1-1s-1 .448-1 1v5h-4V3c0-.552-.448-1-1-1s-1 .448-1 1v5H5v4c0 2.79 1.637 5.193 4 6.317V22h6v-3.683c2.363-1.124 4-3.527 4-6.317V8h-3z"})));break;case"gridicons-plus-small":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})));break;case"gridicons-plus":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 13h-8v8h-2v-8H3v-2h8V3h2v8h8v2z"})));break;case"gridicons-popout":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 7V5c0-1.105.895-2 2-2h11c1.105 0 2 .895 2 2v14c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2v-2h2v2h11V5H8v2H6zm5.5-.5l-1.414 1.414L13.172 11H3v2h10.172l-3.086 3.086L11.5 17.5 17 12l-5.5-5.5z"})));break;case"gridicons-posts":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"})));break;case"gridicons-print":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3c0 1.105-.895 2-2 2H7c-1.105 0-2-.895-2-2v-3H2V9c0-1.105.895-2 2-2h1V5c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2v2h1c1.105 0 2 .895 2 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5z"})));break;case"gridicons-product-downloadable":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-6-10v5.17l2.59-2.58L17 14l-5 5-5-5 1.41-1.42L11 15.17V10h2z"})));break;case"gridicons-product-external":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-2-9v6h-2v-2.59l-3.29 3.29-1.41-1.41L13.59 13H11v-2h6z"})));break;case"gridicons-product-virtual":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM7 16.45c0-1.005.815-1.82 1.82-1.82h.09c-.335-1.59.68-3.148 2.27-3.483s3.148.68 3.483 2.27c.02.097.036.195.046.293 1.252-.025 2.29.97 2.314 2.224.017.868-.462 1.67-1.235 2.066H7.87c-.54-.33-.87-.917-.87-1.55z"})));break;case"gridicons-product":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM9 11h6c0 1.105-.895 2-2 2h-2c-1.105 0-2-.895-2-2z"})));break;case"gridicons-quote":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.192 15.757c0-.88-.23-1.618-.69-2.217-.326-.412-.768-.683-1.327-.812-.55-.128-1.07-.137-1.54-.028-.16-.95.1-1.956.76-3.022.66-1.065 1.515-1.867 2.558-2.403L9.373 5c-.8.396-1.56.898-2.26 1.505-.71.607-1.34 1.305-1.9 2.094s-.98 1.68-1.25 2.69-.346 2.04-.217 3.1c.168 1.4.62 2.52 1.356 3.35.735.84 1.652 1.26 2.748 1.26.965 0 1.766-.29 2.4-.878.628-.576.94-1.365.94-2.368l.002.003zm9.124 0c0-.88-.23-1.618-.69-2.217-.326-.42-.77-.692-1.327-.817-.56-.124-1.074-.13-1.54-.022-.16-.94.09-1.95.75-3.02.66-1.06 1.514-1.86 2.557-2.4L18.49 5c-.8.396-1.555.898-2.26 1.505-.708.607-1.34 1.305-1.894 2.094-.556.79-.97 1.68-1.24 2.69-.273 1-.345 2.04-.217 3.1.165 1.4.615 2.52 1.35 3.35.732.833 1.646 1.25 2.742 1.25.967 0 1.768-.29 2.402-.876.627-.576.942-1.365.942-2.368v.01z"})));break;case"gridicons-read-more":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"})));break;case"gridicons-reader-follow-conversation":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 14v-3h-2v3h-3v2h3v3h2v-3h3v-2"}),o.default.createElement("path",{d:"M13 16h-2l-5 5v-5H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v4h-4v3h-3v4z"})));break;case"gridicons-reader-follow":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 16v2h-3v3h-2v-3h-3v-2h3v-3h2v3h3zM20 2v9h-4v3h-3v4H4c-1.1 0-2-.9-2-2V2h18zM8 13v-1H4v1h4zm3-3H4v1h7v-1zm0-2H4v1h7V8zm7-4H4v2h14V4z"})));break;case"gridicons-reader-following-conversation":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.8 14.5l3.2-3.2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h2v5l8.7-8.7 2.1 2.2z"}),o.default.createElement("path",{d:"M22.6 11.1l-6.1 6.1-2.1-2.2-1.4 1.4 3.5 3.6 7.5-7.6"})));break;case"gridicons-reader-following":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 13.482L15.508 21 12 17.4l1.412-1.388 2.106 2.188 6.094-6.094L23 13.482zm-7.455 1.862L20 10.89V2H2v14c0 1.1.9 2 2 2h4.538l4.913-4.832 2.095 2.176zM8 13H4v-1h4v1zm3-2H4v-1h7v1zm0-2H4V8h7v1zm7-3H4V4h14v2z"})));break;case"gridicons-reader":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 4v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4H3zm7 11H5v-1h5v1zm2-2H5v-1h7v1zm0-2H5v-1h7v1zm7 4h-5v-5h5v5zm0-7H5V6h14v2z"})));break;case"gridicons-reblog":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"})));break;case"gridicons-redo":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 6v3.586L14.343 5.93C13.17 4.756 11.636 4.17 10.1 4.17s-3.07.585-4.242 1.757c-2.343 2.342-2.343 6.14 0 8.484l5.364 5.364 1.414-1.414L7.272 13c-1.56-1.56-1.56-4.097 0-5.657.755-.755 1.76-1.172 2.828-1.172 1.068 0 2.073.417 2.828 1.173L16.586 11H13v2h7V6h-2z"})));break;case"gridicons-refresh":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.91 14c-.478 2.833-2.943 5-5.91 5-3.308 0-6-2.692-6-6s2.692-6 6-6h2.172l-2.086 2.086L13.5 10.5 18 6l-4.5-4.5-1.414 1.414L14.172 5H12c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.08 0 7.438-3.055 7.93-7h-2.02z"})));break;case"gridicons-refund":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13.91 2.91L11.83 5H14c4.418 0 8 3.582 8 8h-2c0-3.314-2.686-6-6-6h-2.17l2.09 2.09-1.42 1.41L8 6l1.41-1.41L12.5 1.5l1.41 1.41zM2 12v10h16V12H2zm2 6.56v-3.11c.6-.35 1.1-.85 1.45-1.45h9.1c.35.6.85 1.1 1.45 1.45v3.11c-.593.35-1.085.845-1.43 1.44H5.45c-.35-.597-.85-1.094-1.45-1.44zm6 .44c.828 0 1.5-.895 1.5-2s-.672-2-1.5-2-1.5.895-1.5 2 .672 2 1.5 2z"})));break;case"gridicons-reply":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h7.2l-2.6 2.6L15 20l5-5-5-5-1.4 1.4 2.6 2.6H9c-2.2 0-4-1.8-4-4s1.8-4 4-4h2V4H9c-3.3 0-6 2.7-6 6s2.7 6 6 6z"})));break;case"gridicons-resize":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));break;case"gridicons-rotate":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14v6c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2v-6c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2zM13.914 2.914L11.828 5H14c4.418 0 8 3.582 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5 8 6l1.414-1.414L12.5 1.5l1.414 1.414z"})));break;case"gridicons-scheduled":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.498 18l-3.705-3.704 1.415-1.415 2.294 2.295 5.293-5.293 1.415 1.415L10.498 18zM21 6v13c0 1.104-.896 2-2 2H5c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2h1V2h2v2h8V2h2v2h1c1.104 0 2 .896 2 2zm-2 2H5v11h14V8z"})));break;case"gridicons-search":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"})));break;case"gridicons-share-computer":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6v2H7v2h10v-2h-3v-2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 14H4V4h16zm-3.25-3a1.75 1.75 0 0 1-3.5 0L10 11.36a1.71 1.71 0 1 1 0-2.71L13.25 7a1.77 1.77 0 1 1 .68 1.37L10.71 10l3.22 1.61A1.74 1.74 0 0 1 16.75 13z"})));break;case"gridicons-share-ios":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 8h2c1.105 0 2 .895 2 2v9c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2v-9c0-1.105.895-2 2-2h2v2H5v9h14v-9h-2V8zM6.5 5.5l1.414 1.414L11 3.828V14h2V3.828l3.086 3.086L17.5 5.5 12 0 6.5 5.5z"})));break;case"gridicons-share":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 16c-.788 0-1.5.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118c-.053.223-.088.453-.088.692 0 1.657 1.343 3 3 3s3-1.343 3-3-1.343-3-3-3z"})));break;case"gridicons-shipping":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-2V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10h2c0 1.657 1.343 3 3 3s3-1.343 3-3h4c0 1.657 1.343 3 3 3s3-1.343 3-3h2v-5l-4-4zM7 18.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5zM4 14V7h10v7H4zm13 4.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5z"})));break;case"gridicons-shutter":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.9 4.8s-.7 5.6-3.5 10.2c1.7-.3 3.9-.9 6.6-2 0 0 .7-4.6-3.1-8.2zm-6 2.8c-1.1-1.3-2.7-3-5-4.7C5.1 4.2 3 6.6 2.3 9.6 7 7.7 11 7.5 12.9 7.6zm3.4 2.9c.6-1.6 1.2-3.9 1.6-6.7-4.1-3-8.6-1.5-8.6-1.5s4.4 3.4 7 8.2zm-5.2 6c1.1 1.3 2.7 3 5 4.7 0 0 4.3-1.6 5.6-6.7 0-.1-5.3 2.1-10.6 2zm-3.4-3.1c-.6 1.6-1.2 3.8-1.5 6.7 0 0 3.6 2.9 8.6 1.5 0 0-4.6-3.4-7.1-8.2zM2 11.1s-.7 4.5 3.1 8.2c0 0 .7-5.7 3.5-10.3-1.7.3-4 .9-6.6 2.1z"})));break;case"gridicons-sign-out":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 17v2c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h9c1.105 0 2 .895 2 2v2h-2V5H5v14h9v-2h2zm2.5-10.5l-1.414 1.414L20.172 11H10v2h10.172l-3.086 3.086L18.5 17.5 24 12l-5.5-5.5z"})));break;case"gridicons-site":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm-5 14H6v-7h7zm5 0h-3v-7h3zm0-9H6V6h12z"})));break;case"gridicons-spam":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 2H7L2 7v10l5 5h10l5-5V7l-5-5zm-4 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-speaker":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 8v6c1.7 0 3-1.3 3-3s-1.3-3-3-3zM11 7H4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h1v3c0 1.1.9 2 2 2h2v-5h2l4 4h2V3h-2l-4 4z"})));break;case"gridicons-special-character":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12.005 7.418c-1.237 0-2.19.376-2.86 1.128s-1.005 1.812-1.005 3.18c0 1.387.226 2.513.677 3.377.45.865 1.135 1.543 2.05 2.036V20H5v-2.666h3.12c-1.04-.636-1.842-1.502-2.405-2.6-.564-1.097-.846-2.322-.846-3.676 0-1.258.29-2.363.875-3.317.585-.952 1.417-1.685 2.497-2.198s2.334-.77 3.763-.77c2.18 0 3.915.572 5.204 1.713s1.932 2.673 1.932 4.594c0 1.353-.283 2.57-.852 3.65-.567 1.08-1.38 1.947-2.44 2.603H19V20h-5.908v-2.86c.95-.493 1.65-1.18 2.102-2.062s.677-2.006.677-3.374c0-1.36-.336-2.415-1.01-3.164-.672-.747-1.624-1.122-2.855-1.122z"})));break;case"gridicons-star-outline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})));break;case"gridicons-star":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})));break;case"gridicons-stats-alt":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-7h-4v14h4V3zm6 3h-4v11h4V6z"})));break;case"gridicons-stats-down-alt":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 3H4v14h4V3zm6 3h-4v11h4V6zm6 4h-4v7h4v-7z"})));break;case"gridicons-stats-down":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7V7h2v10zm4 0h-2v-7h2v7zm4 0h-2v-5h2v5z"})));break;case"gridicons-stats-up-alt":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-4h-4v11h4V6zm6-3h-4v14h4V3z"})));break;case"gridicons-stats-up":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2v-7h2v7zm4 0h-2V7h2v10z"})));break;case"gridicons-stats":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2V7h2v10zm4 0h-2v-7h2v7z"})));break;case"gridicons-status":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM7.55 13c-.02.166-.05.33-.05.5 0 2.485 2.015 4.5 4.5 4.5s4.5-2.015 4.5-4.5c0-.17-.032-.334-.05-.5h-8.9zM10 10V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1zm6 0V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1z"})));break;case"gridicons-strikethrough":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"})));break;case"gridicons-sync":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"})));break;case"gridicons-tablet":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})));break;case"gridicons-tag":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"})));break;case"gridicons-text-color":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v3H3v-3zM15.82 17h3.424L14 3h-4L4.756 17H8.18l1.067-3.5h5.506L15.82 17zm-1.952-6h-3.73l1.868-5.725L13.868 11z"})));break;case"gridicons-themes":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"})));break;case"gridicons-thumbs-up":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.7 22H2v-9h2l2.7 9zM20 9h-6V5c0-1.657-1.343-3-3-3h-1v4L7.1 9.625c-.712.89-1.1 1.996-1.1 3.135V14l2.1 7h8.337c1.836 0 3.435-1.25 3.88-3.03l1.622-6.485C22.254 10.223 21.3 9 20 9z"})));break;case"gridicons-time":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.8 13.4L13 11.667V7h-2v5.333l3.2 4.266 1.6-1.2z"})));break;case"gridicons-trash":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.187 8h11.625l-.695 11.125C17.05 20.18 16.177 21 15.12 21H8.88c-1.057 0-1.93-.82-1.997-1.875L6.187 8zM19 5v2H5V5h3V4c0-1.105.895-2 2-2h4c1.105 0 2 .895 2 2v1h3zm-9 0h4V4h-4v1z"})));break;case"gridicons-trophy":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 5.062V3H6v2.062H2V8c0 2.525 1.89 4.598 4.324 4.932.7 2.058 2.485 3.61 4.676 3.978V18c0 1.105-.895 2-2 2H8v2h8v-2h-1c-1.105 0-2-.895-2-2v-1.09c2.19-.368 3.976-1.92 4.676-3.978C20.11 12.598 22 10.525 22 8V5.062h-4zM4 8v-.938h2v3.766C4.836 10.416 4 9.304 4 8zm16 0c0 1.304-.836 2.416-2 2.83V7.06h2V8z"})));break;case"gridicons-types":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 17c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5zM6.5 6.5h3.8L7 1 1 11h5.5V6.5zm9.5 4.085V8H8v8h2.585c.433-2.783 2.632-4.982 5.415-5.415z"})));break;case"gridicons-underline":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19v2h16v-2H4zM18 3v8c0 3.314-2.686 6-6 6s-6-2.686-6-6V3h3v8c0 1.654 1.346 3 3 3s3-1.346 3-3V3h3z"})));break;case"gridicons-undo":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.142 5.93C16.97 4.756 15.435 4.17 13.9 4.17s-3.072.586-4.244 1.757L6 9.585V6H4v7h7v-2H7.414l3.657-3.657c.756-.755 1.76-1.172 2.83-1.172 1.067 0 2.072.417 2.827 1.173 1.56 1.56 1.56 4.097 0 5.657l-5.364 5.364 1.414 1.414 5.364-5.364c2.345-2.343 2.345-6.142.002-8.485z"})));break;case"gridicons-user-add":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("circle",{cx:"15",cy:"8",r:"4"}),o.default.createElement("path",{d:"M15 20s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2zM6 10V7H4v3H1v2h3v3h2v-3h3v-2z"})));break;case"gridicons-user-circle":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18.5c-4.694 0-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5zm0-8c-3.038 0-5.5 1.728-5.5 3.5s2.462 3.5 5.5 3.5 5.5-1.728 5.5-3.5-2.462-3.5-5.5-3.5zm0-.5c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z"})));break;case"gridicons-user":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z"})));break;case"gridicons-video-camera":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 9V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h11c1.105 0 2-.895 2-2v-2l5 4V5l-5 4z"})));break;case"gridicons-video-remove":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.42 4.59l1.167-1.167L22 4.837 20 6.84V18c0 1.105-.895 2-2 2v-2h-2v2H6.84l-2.007 2.006-1.414-1.414 1.17-1.172-.01-.01L8 16 18 6l1.41-1.42.01.01zM15.84 11H18V8.84L15.84 11zM16 8.01l.01-.01H16v.01zM6 15.17l-2 2V6c0-1.105.895-2 2-2v2h2V4h9.17l-9 9H6v2.17zM6 8v3h2V8H6zm12 8v-3h-2v3h2z"})));break;case"gridicons-video":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4h8v1.997h2V4c1.105 0 2 .896 2 2v12c0 1.104-.895 2-2 2v-2.003h-2V20H8v-2.003H6V20c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2v1.997h2V4zm2 11l4.5-3L10 9v6zm8 .997v-3h-2v3h2zm0-5v-3h-2v3h2zm-10 5v-3H6v3h2zm0-5v-3H6v3h2z"})));break;case"gridicons-visible":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6C5.188 6 1 12 1 12s4.188 6 11 6 11-6 11-6-4.188-6-11-6zm0 10c-3.943 0-6.926-2.484-8.38-4 1.04-1.085 2.863-2.657 5.255-3.47C8.335 9.214 8 10.064 8 11c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.937-.335-1.787-.875-2.47 2.393.813 4.216 2.386 5.254 3.47-1.456 1.518-4.438 4-8.38 4z"})));break;case"gridicons-zoom-in":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15.8 13.8c.7-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7 3.1 7 7 7c1.4 0 2.7-.4 3.8-1.2L19 21l2-2-5.2-5.2zM10 15c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z"}),o.default.createElement("path",{d:"M11 7H9v2H7v2h2v2h2v-2h2V9h-2"})));break;case"gridicons-zoom-out":p=o.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 10c0 3.9 3.1 7 7 7 1.4 0 2.7-.5 3.8-1.2L19 21l2-2-5.2-5.2c.8-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7zm2 0c0-2.8 2.2-5 5-5s5 2.2 5 5-2.2 5-5 5-5-2.2-5-5z"}),o.default.createElement("path",{d:"M7 9h6v2H7z"})))}return p}}]),t}();p.defaultProps={size:24},p.propTypes={icon:c.default.string.isRequired,size:c.default.number,onClick:c.default.func,className:c.default.string},t.default=p,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=c(n(18)),a=c(n(328)),o=c(n(331));function c(e){return e&&e.__esModule?e:{default:e}}var s=void 0;function u(e,t){var n,o,c,l,f,d,h,p,b=[],g={};for(d=0;d<e.length;d++)if("string"!==(f=e[d]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==r(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+s);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],c=d;break}b.push(t[f.value])}else b.push(f.value);return n&&(l=function(e,t){var n,r,i=t[e],a=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===i.value){if("componentOpen"===n.type){a++;continue}if("componentClose"===n.type){if(0===a)return r;a--}}throw new Error("Missing closing component token `"+i.value+"`")}(c,e),h=u(e.slice(c+1,l),t),o=i.default.cloneElement(n,{},h),b.push(o),l<e.length-1&&(p=u(e.slice(l+1),t),b=b.concat(p))),1===b.length?b[0]:(b.forEach(function(e,t){e&&(g["interpolation-child-"+t]=e)}),(0,a.default)(g))}t.default=function(e){var t=e.mixedString,n=e.components,i=e.throwErrors;if(s=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var a=(0,o.default)(t);try{return u(a,n)}catch(e){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},,,function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(30);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){Object(r.a)(e,t,n[t])})}return e}},function(e,t,n){e.exports=n(385)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function a(e,t,n){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=n(76).Buffer}catch(e){}function c(e,t,n){for(var r=0,i=Math.min(e.length,n),a=t;a<i;a++){var o=e.charCodeAt(a)-48;r<<=4,r|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return r}function s(e,t,n,r){for(var i=0,a=Math.min(e.length,n),o=t;o<a;o++){var c=e.charCodeAt(o)-48;i*=r,i+=c>=49?c-49+10:c>=17?c-17+10:c}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,c=0;if("be"===n)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<c&67108863,this.words[a+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,a++);else if("le"===n)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<c&67108863,this.words[a+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,a=0;for(n=e.length-6,r=0;n>=t;n-=6)i=c(e,n,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);n+6!==t&&(i=c(e,t,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,o=a%r,c=Math.min(a,a-o)+n,u=0,l=n;l<c;l+=r)u=s(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var f=1;for(u=s(e,l,e.length,t),l=0;l<o;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,c=67108863&o,s=o/67108864|0;n.words[0]=c;for(var u=1;u<r;u++){for(var l=s>>>26,f=67108863&s,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;l+=(o=(i=0|e.words[p])*(a=0|t.words[h])+f)/67108864|0,f=67108863&o}n.words[u]=0|f,s=0|l}return 0!==s?n.words[u]=0|s:n.length--,n.strip()}a.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,a=0,o=0;o<this.length;o++){var c=this.words[o],s=(16777215&(c<<i|a)).toString(16);n=0!==(a=c>>>24-i&16777215)||o!==this.length-1?u[6-s.length]+s+n:s+n,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],h=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?b+n:u[d-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var o,c,s="le"===t,u=new e(a),l=this.clone();if(s){for(c=0;!l.isZero();c++)o=l.andln(255),l.iushrn(8),u[c]=o;for(;c<a;c++)u[c]=0}else{for(c=0;c<a-i;c++)u[c]=0;for(c=0;!l.isZero();c++)o=l.andln(255),l.iushrn(8),u[a-c-1]=o}return u},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,o=0;o<r.length;o++)a=(t=(0|n.words[o])-(0|r.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<n.length;o++)a=(t=(0|n.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,n){var r,i,a,o=e.words,c=t.words,s=n.words,u=0,l=0|o[0],f=8191&l,d=l>>>13,h=0|o[1],p=8191&h,b=h>>>13,g=0|o[2],v=8191&g,y=g>>>13,m=0|o[3],w=8191&m,_=m>>>13,k=0|o[4],E=8191&k,S=k>>>13,M=0|o[5],D=8191&M,x=M>>>13,C=0|o[6],P=8191&C,O=C>>>13,F=0|o[7],I=8191&F,T=F>>>13,A=0|o[8],j=8191&A,N=A>>>13,R=0|o[9],B=8191&R,U=R>>>13,z=0|c[0],L=8191&z,H=z>>>13,V=0|c[1],K=8191&V,q=V>>>13,W=0|c[2],G=8191&W,Y=W>>>13,$=0|c[3],X=8191&$,Z=$>>>13,J=0|c[4],Q=8191&J,ee=J>>>13,te=0|c[5],ne=8191&te,re=te>>>13,ie=0|c[6],ae=8191&ie,oe=ie>>>13,ce=0|c[7],se=8191&ce,ue=ce>>>13,le=0|c[8],fe=8191&le,de=le>>>13,he=0|c[9],pe=8191&he,be=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(f,L))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,L)|0))<<13)|0;u=((a=Math.imul(d,H))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,L),i=(i=Math.imul(p,H))+Math.imul(b,L)|0,a=Math.imul(b,H);var ve=(u+(r=r+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(d,K)|0))<<13)|0;u=((a=a+Math.imul(d,q)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,L),i=(i=Math.imul(v,H))+Math.imul(y,L)|0,a=Math.imul(y,H),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,q)|0;var ye=(u+(r=r+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,G)|0))<<13)|0;u=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,L),i=(i=Math.imul(w,H))+Math.imul(_,L)|0,a=Math.imul(_,H),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,q)|0)+Math.imul(y,K)|0,a=a+Math.imul(y,q)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,Y)|0;var me=(u+(r=r+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,X)|0))<<13)|0;u=((a=a+Math.imul(d,Z)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(E,L),i=(i=Math.imul(E,H))+Math.imul(S,L)|0,a=Math.imul(S,H),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,q)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,G)|0,a=a+Math.imul(y,Y)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,X)|0,a=a+Math.imul(b,Z)|0;var we=(u+(r=r+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(D,L),i=(i=Math.imul(D,H))+Math.imul(x,L)|0,a=Math.imul(x,H),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,Y)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,X)|0,a=a+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0;var _e=(u+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((a=a+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,L),i=(i=Math.imul(P,H))+Math.imul(O,L)|0,a=Math.imul(O,H),r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,q)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,Y)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,X)|0,a=a+Math.imul(_,Z)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(b,ne)|0,a=a+Math.imul(b,re)|0;var ke=(u+(r=r+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,oe)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,oe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(I,L),i=(i=Math.imul(I,H))+Math.imul(T,L)|0,a=Math.imul(T,H),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,q)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,q)|0,r=r+Math.imul(D,G)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,Y)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,a=a+Math.imul(y,re)|0,r=r+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var Ee=(u+(r=r+Math.imul(f,se)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,se)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,L),i=(i=Math.imul(j,H))+Math.imul(N,L)|0,a=Math.imul(N,H),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(T,K)|0,a=a+Math.imul(T,q)|0,r=r+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(O,G)|0,a=a+Math.imul(O,Y)|0,r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,a=a+Math.imul(_,re)|0,r=r+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,se)|0,a=a+Math.imul(b,ue)|0;var Se=(u+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,L),i=(i=Math.imul(B,H))+Math.imul(U,L)|0,a=Math.imul(U,H),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,q)|0)+Math.imul(N,K)|0,a=a+Math.imul(N,q)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,Y)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(S,ne)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,r=r+Math.imul(v,se)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,se)|0,a=a+Math.imul(y,ue)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,de)|0;var Me=(u+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,q))+Math.imul(U,K)|0,a=Math.imul(U,q),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,Y)|0,r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,X)|0,a=a+Math.imul(T,Z)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(x,ne)|0,a=a+Math.imul(x,re)|0,r=r+Math.imul(E,ae)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,se)|0,a=a+Math.imul(_,ue)|0,r=r+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0;var De=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((a=a+Math.imul(b,be)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(B,G),i=(i=Math.imul(B,Y))+Math.imul(U,G)|0,a=Math.imul(U,Y),r=r+Math.imul(j,X)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(N,X)|0,a=a+Math.imul(N,Z)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,se)|0,a=a+Math.imul(S,ue)|0,r=r+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,be)|0)+Math.imul(y,pe)|0))<<13)|0;u=((a=a+Math.imul(y,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,Z))+Math.imul(U,X)|0,a=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(N,Q)|0,a=a+Math.imul(N,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(T,ne)|0,a=a+Math.imul(T,re)|0,r=r+Math.imul(P,ae)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,r=r+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(x,se)|0,a=a+Math.imul(x,ue)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((a=a+Math.imul(_,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(U,Q)|0,a=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(N,ne)|0,a=a+Math.imul(N,re)|0,r=r+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,oe)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(O,se)|0,a=a+Math.imul(O,ue)|0,r=r+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,de)|0;var Pe=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(S,pe)|0))<<13)|0;u=((a=a+Math.imul(S,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(U,ne)|0,a=Math.imul(U,re),r=r+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(N,ae)|0,a=a+Math.imul(N,oe)|0,r=r+Math.imul(I,se)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(T,se)|0,a=a+Math.imul(T,ue)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(O,fe)|0,a=a+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,be)|0)+Math.imul(x,pe)|0))<<13)|0;u=((a=a+Math.imul(x,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,ae),i=(i=Math.imul(B,oe))+Math.imul(U,ae)|0,a=Math.imul(U,oe),r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(N,se)|0,a=a+Math.imul(N,ue)|0,r=r+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(T,fe)|0,a=a+Math.imul(T,de)|0;var Fe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((a=a+Math.imul(O,be)|0)+(i>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,ue))+Math.imul(U,se)|0,a=Math.imul(U,ue),r=r+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(N,fe)|0,a=a+Math.imul(N,de)|0;var Ie=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((a=a+Math.imul(T,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(U,fe)|0,a=Math.imul(U,de);var Te=(u+(r=r+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(N,pe)|0))<<13)|0;u=((a=a+Math.imul(N,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863;var Ae=(u+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,be))+Math.imul(U,pe)|0))<<13)|0;return u=((a=Math.imul(U,be))+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s[0]=ge,s[1]=ve,s[2]=ye,s[3]=me,s[4]=we,s[5]=_e,s[6]=ke,s[7]=Ee,s[8]=Se,s[9]=Me,s[10]=De,s[11]=xe,s[12]=Ce,s[13]=Pe,s[14]=Oe,s[15]=Fe,s[16]=Ie,s[17]=Te,s[18]=Ae,0!==u&&(s[19]=u,n.length++),n};function p(e,t,n){return(new b).mulp(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=d),a.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var o=i;i=0;for(var c=67108863&r,s=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=s;u++){var l=a-u,f=(0|e.words[l])*(0|t.words[u]),d=67108863&f;c=67108863&(d=d+c|0),i+=(o=(o=o+(f/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[a]=c,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,a){for(var o=0;o<a;o++)r[o]=t[e[o]],i[o]=n[e[o]]},b.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var c=o<<1,s=Math.cos(2*Math.PI/c),u=Math.sin(2*Math.PI/c),l=0;l<i;l+=c)for(var f=s,d=u,h=0;h<o;h++){var p=n[l+h],b=r[l+h],g=n[l+h+o],v=r[l+h+o],y=f*g-d*v;v=f*v+d*g,g=y,n[l+h]=p+g,r[l+h]=b+v,n[l+h+o]=p-g,r[l+h+o]=b-v,h!==c&&(y=s*f-u*d,d=s*d+u*f,f=y)}},b.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,n,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],n[2*o]=8191&a,a>>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===a),r(0==(-8192&a))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),o=new Array(r),c=new Array(r),s=new Array(r),u=new Array(r),l=new Array(r),f=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,u,r),this.transform(o,a,c,s,r,i),this.transform(u,a,l,f,r,i);for(var h=0;h<r;h++){var p=c[h]*l[h]-s[h]*f[h];s[h]=c[h]*f[h]+s[h]*l[h],c[h]=p}return this.conjugate(c,s,r),this.transform(c,s,d,a,r,i),this.conjugate(d,a,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),p(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},a.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var c=this.words[t]&a,s=(0|this.words[t])-c<<n;this.words[t]=s|o,o=c>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),c=67108863^67108863>>>a<<a,s=n;if(i-=o,i=Math.max(0,i),s){for(var u=0;u<o;u++)s.words[u]=this.words[u];s.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var f=0|this.words[u];this.words[u]=l<<26-a|f>>>a,l=f&c}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},a.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var i,a,o=e.length+n;this._expand(o);var c=0;for(i=0;i<e.length;i++){a=(0|this.words[i+n])+c;var s=(0|e.words[i])*t;c=((a-=67108863&s)>>26)-(s/67108864|0),this.words[i+n]=67108863&a}for(;i<this.length-n;i++)c=(a=(0|this.words[i+n])+c)>>26,this.words[i+n]=67108863&a;if(0===c)return this.strip();for(r(-1===c),c=0,i=0;i<this.length;i++)c=(a=-(0|this.words[i])+c)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var c,s=r.length-i.length;if("mod"!==t){(c=new a(null)).length=s+1,c.words=new Array(c.length);for(var u=0;u<c.length;u++)c.words[u]=0}var l=r.clone()._ishlnsubmul(i,1,s);0===l.negative&&(r=l,c&&(c.words[s]=1));for(var f=s-1;f>=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);c&&(c.words[f]=d)}return c&&c.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:c||null,mod:r}},a.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(i=c.div.neg()),"div"!==t&&(o=c.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(i=c.div.neg()),{div:i,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(o=c.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:c.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,c},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),c=new a(0),s=new a(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(l),s.isub(f)),c.iushrn(1),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(c),o.isub(s)):(n.isub(t),c.isub(i),s.isub(o))}return{a:c,b:s,gcd:n.iushln(u)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),c=new a(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,d=1;0==(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(c)):(n.isub(t),c.isub(o))}return(i=0===t.cmpn(1)?o:c).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var a=i,o=n;0!==a&&o<this.length;o++){var c=0|this.words[o];a=(c+=a)>>>26,c&=67108863,this.words[o]=c}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new k(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(y,v),y.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var a=0|e.words[r];e.words[r-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(m,v),i(w,v),i(_,v),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new m;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},k.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var c=new a(1).toRed(this),s=c.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,u).cmp(s);)l.redIAdd(s);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(c);){for(var b=h,g=0;0!==b.cmp(c);g++)b=b.redSqr();r(g<p);var v=this.pow(f,new a(1).iushln(p-g-1));d=d.redMul(v),f=v.redSqr(),h=h.redMul(f),p=g}return d},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,c=0,s=t.bitLength()%26;for(0===s&&(s=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=s-1;l>=0;l--){var f=u>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++c||0===r&&0===l)&&(i=this.mul(i,n[o]),c=0,o=0)):c=0}s=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new E(e)},i(E,k),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(241)(e))},,,function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",function(){return r})},,,function(e,t,n){var r,i,a={},o=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),c=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),s=null,u=0,l=[],f=n(291);function d(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=a[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(y(r.parts[o],t))}else{var c=[];for(o=0;o<r.parts.length;o++)c.push(y(r.parts[o],t));a[r.id]={id:r.id,refs:1,parts:c}}}}function h(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],c={css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(c):n.push(r[o]={id:o,parts:[c]})}return n}function p(e,t){var n=c(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),l.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=c(e.insertAt.before,n);n.insertBefore(t,i)}}function b(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=l.indexOf(e);t>=0&&l.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return v(t,e.attrs),p(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=a}if(t.singleton){var o=u++;n=s||(s=g(t)),r=_.bind(null,n,o,!1),i=_.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=f(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,n,t),i=function(){b(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){b(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return d(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var o=n[i];(c=a[o.id]).refs--,r.push(c)}e&&d(h(e,t),t);for(i=0;i<r.length;i++){var c;if(0===(c=r[i]).refs){for(var s=0;s<c.parts.length;s++)c.parts[s]();delete a[c.id]}}}};var m,w=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function _(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}},,function(e,t,n){"use strict";var r=n(82),i=n(207),a=n(208),o=n(381),c=a();r(c,{getPolyfill:a,implementation:i,shim:o}),e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="Interact with the calendar and add the check-in date for your trip.",i="Move backward to switch to the previous month.",a="Move forward to switch to the next month.",o="page up and page down keys",c="Home and end keys",s="Escape key",u="Select the date in focus.",l="Move backward (left) and forward (right) by one day.",f="Move backward (up) and forward (down) by one week.",d="Return to the date input field.",h="Press the down arrow key to interact with the calendar and\n select a date. Press the question mark key to get the keyboard shortcuts for changing dates.",p=function(e){var t=e.date;return"Choose "+String(t)+" as your check-in date. It’s available."},b=function(e){var t=e.date;return"Choose "+String(t)+" as your check-out date. It’s available."},g=function(e){return e.date},v=function(e){var t=e.date;return"Not available. "+String(t)},y=function(e){var t=e.date;return"Selected. "+String(t)};t.default={calendarLabel:"Calendar",closeDatePicker:"Close",focusStartDate:r,clearDate:"Clear Date",clearDates:"Clear Dates",jumpToPrevMonth:i,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:o,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:l,moveFocusByOneWeek:f,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,keyboardNavigationInstructions:h,chooseAvailableStartDate:p,chooseAvailableEndDate:b,dateIsUnavailable:v,dateIsSelected:y};t.DateRangePickerPhrases={calendarLabel:"Calendar",closeDatePicker:"Close",clearDates:"Clear Dates",focusStartDate:r,jumpToPrevMonth:i,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:o,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:l,moveFocusByOneWeek:f,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,keyboardNavigationInstructions:h,chooseAvailableStartDate:p,chooseAvailableEndDate:b,dateIsUnavailable:v,dateIsSelected:y},t.DateRangePickerInputPhrases={focusStartDate:r,clearDates:"Clear Dates",keyboardNavigationInstructions:h},t.SingleDatePickerPhrases={calendarLabel:"Calendar",closeDatePicker:"Close",clearDate:"Clear Date",jumpToPrevMonth:i,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:o,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:l,moveFocusByOneWeek:f,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,keyboardNavigationInstructions:h,chooseAvailableDate:g,dateIsUnavailable:v,dateIsSelected:y},t.SingleDatePickerInputPhrases={clearDate:"Clear Date",keyboardNavigationInstructions:h},t.DayPickerPhrases={calendarLabel:"Calendar",jumpToPrevMonth:i,jumpToNextMonth:a,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:o,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:l,moveFocusByOneWeek:f,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,chooseAvailableStartDate:p,chooseAvailableEndDate:b,chooseAvailableDate:g,dateIsUnavailable:v,dateIsSelected:y},t.DayPickerKeyboardShortcutsPhrases={keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:o,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:l,moveFocusByOneWeek:f,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d},t.DayPickerNavigationPhrases={jumpToPrevMonth:i,jumpToNextMonth:a},t.CalendarDayPhrases={chooseAvailableDate:g,dateIsUnavailable:v,dateIsSelected:y}},function(e,t,n){"use strict";(function(e){
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],[,,function(e,t,n){e.exports=n(298)()},,function(e,t,n){e.exports=n(268)()},,function(e,t,n){var r;
|
2 |
Â
/*!
|
3 |
Â
Copyright (c) 2017 Jed Watson.
|
4 |
Â
Licensed under the MIT License (MIT), see
|
9 |
Â
Licensed under the MIT License (MIT), see
|
10 |
Â
http://jedwatson.github.io/classnames
|
11 |
Â
*/
|
12 |
+
!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var i=a.apply(null,r);i&&e.push(i)}else if("object"===o)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},,function(e,t,n){var r=n(92);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),a.forEach(function(t){r(e,t,n[t])})}return e}},,,,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(272),a=n(12);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(273);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(42),a=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i),o(a,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DISPLAY_FORMAT="L",t.ISO_FORMAT="YYYY-MM-DD",t.ISO_MONTH_FORMAT="YYYY-MM",t.START_DATE="startDate",t.END_DATE="endDate",t.HORIZONTAL_ORIENTATION="horizontal",t.VERTICAL_ORIENTATION="vertical",t.VERTICAL_SCROLLABLE="verticalScrollable",t.ICON_BEFORE_POSITION="before",t.ICON_AFTER_POSITION="after",t.INFO_POSITION_TOP="top",t.INFO_POSITION_BOTTOM="bottom",t.INFO_POSITION_BEFORE="before",t.INFO_POSITION_AFTER="after",t.ANCHOR_LEFT="left",t.ANCHOR_RIGHT="right",t.OPEN_DOWN="down",t.OPEN_UP="up",t.DAY_SIZE=39,t.BLOCKED_MODIFIER="blocked",t.WEEKDAYS=[0,1,2,3,4,5,6],t.FANG_WIDTH_PX=20,t.FANG_HEIGHT_PX=10,t.DEFAULT_VERTICAL_SPACING=22,t.MODIFIER_KEY_NAMES=new Set(["Shift","Control","Alt","Meta"])},function(e,t,n){"use strict";n(274);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),a.forEach(function(t){r(e,t,n[t])})}return e}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e){return(u="function"==typeof Symbol&&"symbol"===l(Symbol.iterator)?function(e){return l(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":l(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?f(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}var m=n(0),g=n(1),v=n(3),y=n(5),w=n(2),_=n.n(w),k=n(25),E=n.n(k),S=n(26),O=n.n(S),M=n(6),x=n.n(M),C=n(145);function D(){return(D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function j(e){return"/"===e.charAt(0)}function P(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}var F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],r=t&&t.split("/")||[],a=e&&j(e),o=t&&j(t),i=a||o;if(e&&j(e)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var c=void 0;if(r.length){var s=r[r.length-1];c="."===s||".."===s||""===s}else c=!1;for(var l=0,u=r.length;u>=0;u--){var f=r[u];"."===f?P(r,u):".."===f?(P(r,u),l++):l&&(P(r,u),l--)}if(!i)for(;l--;l)r.unshift("..");!i||""===r[0]||r[0]&&j(r[0])||r.unshift("");var d=r.join("/");return c&&"/"!==d.substr(-1)&&(d+="/"),d},T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var I=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(function(t,r){return e(t,n[r])});var r=void 0===t?"undefined":T(t);if(r!==(void 0===n?"undefined":T(n)))return!1;if("object"===r){var a=t.valueOf(),o=n.valueOf();if(a!==t||o!==n)return e(a,o);var i=Object.keys(t),c=Object.keys(n);return i.length===c.length&&i.every(function(r){return e(t[r],n[r])})}return!1},N=!0,A="Invariant failed";var R=function(e,t){if(!e)throw N?new Error(A):new Error(A+": "+(t||""))};function B(e){return"/"===e.charAt(0)?e:"/"+e}function L(e){return"/"===e.charAt(0)?e.substr(1):e}function U(e,t){return function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)}(e,t)?e.substr(t.length):e}function z(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function H(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function V(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=D({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=F(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function q(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}var K=!("undefined"==typeof window||!window.document||!window.document.createElement);function W(e,t){t(window.confirm(e))}var Y,G="hashchange",$={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+L(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:L,decodePath:B},slash:{encodePath:B,decodePath:B}};function X(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function Z(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)}function Q(e){void 0===e&&(e={}),K||R(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,a=void 0===r?W:r,o=n.hashType,i=void 0===o?"slash":o,c=e.basename?z(B(e.basename)):"",s=$[i],l=s.encodePath,u=s.decodePath;function f(){var e=u(X());return c&&(e=U(e,c)),V(e)}var d=q();function h(e){D(O,e),O.length=t.length,d.notifyListeners(O.location,O.action)}var p=!1,b=null;function m(){var e,t,n=X(),r=l(n);if(n!==r)Z(r);else{var o=f(),i=O.location;if(!p&&(t=o,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&I(e.state,t.state)))return;if(b===H(o))return;b=null,function(e){if(p)p=!1,h();else{d.confirmTransitionTo(e,"POP",a,function(t){t?h({action:"POP",location:e}):function(e){var t=O.location,n=w.lastIndexOf(H(t));-1===n&&(n=0);var r=w.lastIndexOf(H(e));-1===r&&(r=0);var a=n-r;a&&(p=!0,_(a))}(e)})}}(o)}}var g=X(),v=l(g);g!==v&&Z(v);var y=f(),w=[H(y)];function _(e){t.go(e)}var k=0;function E(e){1===(k+=e)&&1===e?window.addEventListener(G,m):0===k&&window.removeEventListener(G,m)}var S=!1;var O={length:t.length,action:"POP",location:y,createHref:function(e){return"#"+l(c+H(e))},push:function(e,t){var n=V(e,void 0,void 0,O.location);d.confirmTransitionTo(n,"PUSH",a,function(e){if(e){var t=H(n),r=l(c+t);if(X()!==r){b=t,function(e){window.location.hash=e}(r);var a=w.lastIndexOf(H(O.location)),o=w.slice(0,-1===a?0:a+1);o.push(t),w=o,h({action:"PUSH",location:n})}else h()}})},replace:function(e,t){var n=V(e,void 0,void 0,O.location);d.confirmTransitionTo(n,"REPLACE",a,function(e){if(e){var t=H(n),r=l(c+t);X()!==r&&(b=t,Z(r));var a=w.indexOf(H(O.location));-1!==a&&(w[a]=t),h({action:"REPLACE",location:n})}})},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},block:function(e){void 0===e&&(e=!1);var t=d.setPrompt(e);return S||(E(1),S=!0),function(){return S&&(S=!1,E(-1)),t()}},listen:function(e){var t=d.appendListener(e);return E(1),function(){E(-1),t()}}};return O}function J(){return Y||(Y=Q()),Y}function ee(e,t){return Object(y.compact)(Object.keys(t).map(function(n){var r=t[n];if(r.rules){var a=Object(y.find)(r.rules,function(t){return e.hasOwnProperty(re(n,t.value))});if(a){var o=e[re(n,a.value)];return{key:n,rule:a.value,value:o}}return null}return e[n]?{key:n,value:e[n]}:null}))}function te(e,t){var n=e.input.defaultOption;if(e.input.defaultOption){var r=Object(y.find)(t,{value:n});return r?r.value:void console.warn("invalid defaultOption ".concat(n," supplied to ").concat(e.labels.add))}return Object(y.get)(t,[0,"value"])}function ne(e,t,n){return a({},ee(t,n).reduce(function(e,t){return e[re(t.key,t.rule)]=void 0,e},{}),e.reduce(function(e,t){return"between"!==t.rule||Array.isArray(t.value)&&!t.value.some(function(e){return!e})?(t.value&&(e[re(t.key,t.rule)]=t.value),e):e},{}))}function re(e,t){return t&&t.length?"".concat(e,"_").concat(t):e}var ae=function(){return J().location.pathname},oe=function(e){return Object(y.isEmpty)(e)?"":"?"+Object(C.stringify)(e)},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le();return Object(y.pick)(e,["period","compare","before","after","interval","type"])};function ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(y.uniq)(e.split(",").map(function(e){return parseInt(e,10)}).filter(Boolean))}function se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:le(),r=oe(a({},n,e));return"".concat(t).concat(r)}function le(){var e=J().location.search;return e.length&&Object(C.parse)(e.substring(1))||{}}function ue(e){var t=se(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae(),arguments.length>2&&void 0!==arguments[2]?arguments[2]:le());J().push(t)}var fe=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.renderContent;if(!n)return null;return Object(m.createElement)("div",{className:"woocommerce-ellipsis-menu"},Object(m.createElement)(v.Dropdown,{contentClassName:"woocommerce-ellipsis-menu__popover",position:"bottom left",renderToggle:function(e){var n=e.onToggle,r=e.isOpen,a=x()("woocommerce-ellipsis-menu__toggle",{"is-opened":r});return Object(m.createElement)(v.IconButton,{className:a,onClick:n,icon:"ellipsis",title:t,"aria-expanded":r})},renderContent:function(e){return Object(m.createElement)(v.NavigableMenu,{className:"woocommerce-ellipsis-menu__content"},n(e))}}))}}]),t}();fe.propTypes={label:_.a.string.isRequired,renderContent:_.a.func};var de=fe;function he(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var pe=Object(m.createContext)(2);function be(e){return Object(m.createElement)(pe.Consumer,null,function(t){var n="h"+Math.min(t,6);return Object(m.createElement)(n,e)})}function me(e){var t=e.component,n=e.children,r=he(e,["component","children"]),a=t||"div";return Object(m.createElement)(pe.Consumer,null,function(e){return Object(m.createElement)(pe.Provider,{value:e+1},!1===t?n:Object(m.createElement)(a,r,n))})}function ge(e){return function(t,n,r){if(t[n])return t[n].type&&t[n].type===e?void 0:new Error("Invalid ".concat(n," passed to ").concat(r,". Must be ")+"`"+e.name+"`")}}me.propTypes={component:_.a.oneOfType([_.a.func,_.a.string,_.a.bool]),children:_.a.node};var ve=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.action,n=e.children,r=e.description,a=e.isInactive,o=e.menu,i=e.title,c=x()("woocommerce-card",this.props.className,{"has-menu":!!o,"has-action":!!t,"is-inactive":!!a});return Object(m.createElement)("div",{className:c},i&&Object(m.createElement)("div",{className:"woocommerce-card__header"},Object(m.createElement)("div",{className:"woocommerce-card__title-wrapper"},Object(m.createElement)(be,{className:"woocommerce-card__title woocommerce-card__header-item"},i),r&&Object(m.createElement)(be,{className:"woocommerce-card__description woocommerce-card__header-item"},r)),t&&Object(m.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},t),o&&Object(m.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},o)),Object(m.createElement)(me,{className:"woocommerce-card__body"},n))}}]),t}();ve.propTypes={action:_.a.node,className:_.a.string,description:_.a.oneOfType([_.a.string,_.a.node]),isInactive:_.a.bool,menu:ge(de),title:_.a.oneOfType([_.a.string,_.a.node])};var ye=ve,we=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"wcAdminLinkHandler",value:function(e){e.preventDefault(),J().push(e.target.closest("a").getAttribute("href"))}},{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.href,o=t.type,i=he(t,["children","href","type"]);e="wp-admin"===o?function(e){return wcSettings.adminUrl+e}(r):r;var c=a({},i,{"data-link-type":o});return"wc-admin"===o&&(c.onClick=this.wcAdminLinkHandler),Object(m.createElement)("a",D({href:e},c),n)}}]),t}();we.propTypes={href:_.a.string.isRequired,type:_.a.oneOf(["wp-admin","wc-admin","external"]).isRequired},we.defaultProps={type:"wc-admin"},we.contextTypes={router:_.a.object};var _e=we;function ke(e){var t="";return function e(n){if(Object(y.isString)(n)||Object(y.isNumber)(n))t+=n;else if(Object(y.isArray)(n))n.forEach(e);else if(n&&n.props){var r=n.props.children;Object(y.isArray)(r)?r.forEach(e):e(r)}}(e),t}var Ee=function(e){function t(e){var n,r=e.filter,a=e.config,o=e.onFilterChange;i(this,t),n=d(this,h(t).apply(this,arguments));var c=a.input.options;return n.state={options:c},n.updateOptions=n.updateOptions.bind(f(n)),!c&&a.input.getOptions&&a.input.getOptions().then(n.updateOptions).then(function(e){if(!r.value){var t=te(a,e);o(r.key,"value",t)}}),n}return b(t,m["Component"]),s(t,[{key:"updateOptions",value:function(e){return this.setState({options:e}),e}},{key:"getScreenReaderText",value:function(e,t){if(""===e.value)return"";var n=Object(y.find)(t.rules,{value:e.rule})||{},r=Object(y.find)(t.input.options,{value:e.value})||{};return ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,r.label),rule:Object(m.createElement)(m.Fragment,null,n.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,a=e.onFilterChange,o=e.isEnglish,i=this.state.options,c=r.key,s=r.rule,l=r.value,u=n.labels,f=n.rules,d=O()({mixedString:u.title,components:{title:Object(m.createElement)("span",{className:t}),rule:Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__rule"),options:f,value:s,onChange:Object(y.partial)(a,c,"rule"),"aria-label":u.rule}),filter:i?Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__input"),options:i,value:l,onChange:Object(y.partial)(a,r.key,"value"),"aria-label":u.filter}):Object(m.createElement)(v.Spinner,null)}}),h=this.getScreenReaderText(r,n);return Object(m.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(m.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(m.createElement)("div",{className:x()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),h&&Object(m.createElement)("span",{className:"screen-reader-text"},h))}}]),t}();Ee.propTypes={config:_.a.shape({labels:_.a.shape({rule:_.a.string,title:_.a.string,filter:_.a.string}),rules:_.a.arrayOf(_.a.object),input:_.a.object}).isRequired,filter:_.a.shape({key:_.a.string,rule:_.a.string,value:_.a.string}).isRequired,onFilterChange:_.a.func.isRequired};var Se=Ee,Oe=n(22),Me=n(28);function xe(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=[],i=0;i<t.length;i++){var c=t[i];if(!n.includes(c.value.id)){var s=c.keywords,l=void 0===s?[]:s;if("string"==typeof c.label&&(l=[].concat(o(l),[c.label])),l.some(function(t){return e.test(t)})&&(a.push(c),a.length===r))break}}return a}var Ce=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).apply(this,arguments))).bindNode=e.bindNode.bind(f(e)),e.select=e.select.bind(f(e)),e.reset=e.reset.bind(f(e)),e.search=e.search.bind(f(e)),e.handleKeyDown=e.handleKeyDown.bind(f(e)),e.debouncedLoadOptions=Object(y.debounce)(e.loadOptions,400),e.state=e.constructor.getInitialState(),e}return b(t,m["Component"]),s(t,null,[{key:"getInitialState",value:function(){return{search:/./,selectedIndex:0,query:void 0,filteredOptions:[]}}}]),s(t,[{key:"bindNode",value:function(e){this.node=e}},{key:"select",value:function(e){var t=this.props,n=t.onSelect,r=t.completer.getOptionCompletion,a=this.state.query;if(!e.isDisabled){if(r)n(r(e.value,a));this.reset()}}},{key:"reset",value:function(){!!this.node&&this.setState(this.constructor.getInitialState())}},{key:"handleFocusOutside",value:function(){this.reset()}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(g.sprintf)(Object(g._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"woocommerce-admin"),e.length),"assertive"):t(Object(g.__)("No results.","woocommerce-admin"),"assertive"))}},{key:"loadOptions",value:function(e,t){var n=this,r=e.options;if(t)var a=this.activePromise=Promise.resolve("function"==typeof r?r(t):r).then(function(r){if(r&&n.state.query){var o=n.props.selected;if(a===n.activePromise){var i=r.map(function(n,r){return{key:r,value:n,label:e.getOptionLabel(n,t),keywords:e.getOptionKeywords?e.getOptionKeywords(n):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(n)}}),c=xe(n.state.search,i,o),s=c.length===n.state.filteredOptions.length?n.state.selectedIndex:0;n.setState({options:i,filteredOptions:c,selectedIndex:s}),n.announce(c)}}});else this.setState({options:[],filteredOptions:[],selectedIndex:0})}},{key:"search",value:function(e){var t=this.state.query,n=this.props,r=n.completer,a=void 0===r?{}:r,o=n.selected,i=e.target.value.trim();a&&i!==t&&(a.isDebounced?this.debouncedLoadOptions(a,i):this.loadOptions(a,i));var c=void 0!==a.getSearchExpression?a.getSearchExpression(Object(y.escapeRegExp)(i)):Object(y.escapeRegExp)(i),s=c?new RegExp(c,"i"):/^$/,l=xe(s,this.state.options,o);this.setState({selectedIndex:0,filteredOptions:l,search:s,query:i}),this.state.options&&this.announce(l)}},{key:"getOptions",value:function(){var e=this.props,t=e.allowFreeText,n=e.completer.getFreeTextOptions,r=this.state,a=r.filteredOptions,o=r.query;return(t&&n?n(o):[]).concat(a)}},{key:"handleKeyDown",value:function(e){var t=this.getOptions(),n=this.state.selectedIndex;if(0!==t.length){var r;switch(e.keyCode){case Me.UP:r=(0===n?t.length:n)-1,this.setState({selectedIndex:r});break;case Me.TAB:case Me.DOWN:r=(n+1)%t.length,this.setState({selectedIndex:r});break;case Me.ENTER:this.select(t[n]);break;case Me.LEFT:case Me.RIGHT:case Me.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()}}},{key:"toggleKeyEvents",value:function(e){var t=e?"addEventListener":"removeEventListener";this.node[t]("keydown",this.handleKeyDown,!0)}},{key:"isExpanded",value:function(e,t){var n=t.filteredOptions,r=t.query;return n.length>0||e.completer.getFreeTextOptions&&r}},{key:"componentDidUpdate",value:function(e,t){var n=this.isExpanded(this.props,this.state),r=this.isExpanded(e,t);n&&!r?this.toggleKeyEvents(!0):!n&&r&&this.toggleKeyEvents(!1)}},{key:"componentWillUnmount",value:function(){this.toggleKeyEvents(!1),this.debouncedLoadOptions.cancel()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.instanceId,a=t.completer.className,o=void 0===a?"":a,i=t.staticResults,c=this.state.selectedIndex,s=this.isExpanded(this.props,this.state),l=s?this.getOptions():[],u=(l[c]||{}).key,f=void 0===u?"":u,d=s?"woocommerce-search__autocomplete-".concat(r):null,h=s?"woocommerce-search__autocomplete-".concat(r,"-").concat(f):null,p=x()("woocommerce-search__autocomplete-results",{"is-static-results":i});return Object(m.createElement)("div",{ref:this.bindNode,className:"woocommerce-search__autocomplete"},n({isExpanded:s,listBoxId:d,activeId:h,onChange:this.search}),s&&Object(m.createElement)("div",{id:d,role:"listbox",className:p},l.map(function(t,n){return Object(m.createElement)(v.Button,{key:t.key,id:"woocommerce-search__autocomplete-".concat(r,"-").concat(t.key),role:"option","aria-selected":n===c,disabled:t.isDisabled,className:x()("woocommerce-search__autocomplete-result",o,{"is-selected":n===c}),onClick:function(){return e.select(t)}},t.label)})))}}]),t}(),De=Object(Oe.compose)([v.withSpokenMessages,Oe.withInstanceId,v.withFocusOutside])(Ce),je=n(10),Pe=n.n(je);function Fe(e,t){if(!t)return null;var n=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}}function Te(e){return[e.country,e.state,e.name||Object(g.__)("TAX","woocommerce-admin"),e.priority].filter(Boolean).map(function(e){return e.toString().toUpperCase().trim()}).join("-")}var Ie={name:"categories",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10,orderby:"count"}));return Pe()({path:"/wc/v4/products/categories".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"title",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All categories with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(e.name,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Ne=n(51),Ae=n(255),Re=n.n(Ae),Be=function(e){var t=e.code,n=e.order,r=e.className,a=e.size,o=e.hideFromScreenReader,i=x()("woocommerce-flag",r),c=t||"unknown";n&&n.shipping&&n.shipping.country?c=n.shipping.country:n&&n.billing&&n.billing.country&&(c=n.billing.country);var s={fontSize:a},l=Object(y.get)(Re.a.countryCode(c),"emoji");return Object(m.createElement)("div",{className:i,style:s,"aria-hidden":o},l&&Object(m.createElement)("span",null,l),!l&&Object(m.createElement)("span",{className:"woocommerce-flag__fallback"},"Invalid country flag"))};Be.propTypes={code:_.a.string,order:_.a.object,className:_.a.string,size:_.a.number};var Le=Be,Ue={name:"countries",className:"woocommerce-search__country-result",isDebounced:!0,options:function(){return wcSettings.dataEndpoints.countries||[]},getSearchExpression:function(e){return"^"+e},getOptionKeywords:function(e){return[e.code,Object(Ne.decodeEntities)(e.name)]},getOptionLabel:function(e,t){var n=Object(Ne.decodeEntities)(e.name),r=Fe(n,t)||{};return[Object(m.createElement)(Le,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",code:e.code,size:18,hideFromScreenReader:!0}),Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":n},r.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.code,label:Object(Ne.decodeEntities)(e.name)}}},ze={name:"coupons",className:"woocommerce-search__coupon-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10}));return Pe()({path:"/wc/v4/coupons".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.code]},getFreeTextOptions:function(e){return[{key:"code",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All coupons with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,code:e}}]},getOptionLabel:function(e,t){var n=Fe(e.code,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.code}}},He={name:"customers",className:"woocommerce-search__customers-result",options:function(e){var t="";e&&(t=oe({search:e,searchby:"name",per_page:10}));return Pe()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"name",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All customers with names that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(e.name,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Ve={name:"download-ips",className:"woocommerce-search__download-ip-result",options:function(e){var t="";if(e)return t=oe({match:e}),Pe()({path:"/wc/v4/data/download-ips".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.user_ip_address]},getOptionLabel:function(e,t){var n=Fe(e.user_ip_address,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.user_ip_address},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.user_ip_address,label:e.user_ip_address}}},qe={name:"emails",className:"woocommerce-search__emails-result",options:function(e){var t="";e&&(t=oe({search:e,searchby:"email",per_page:10}));return Pe()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.email]},getOptionLabel:function(e,t){var n=Fe(e.email,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.email},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.email}}},Ke={name:"orders",className:"woocommerce-search__order-result",options:function(e){var t="";if(e)return t=oe({number:e,per_page:10}),Pe()({path:"/wc/v4/orders".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return["#"+e.number]},getOptionLabel:function(e,t){var n=Fe("#"+e.number,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":"#"+e.number},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:"#"+e.number}}},We=function(e){var t=e.product,n=e.alt,r=e.width,a=e.height,o=e.className,i=he(e,["product","alt","width","height","className"]),c=Object(y.get)(t,["images",0])||Object(y.get)(t,["image"]),s=c&&c.src||!1,l=n||c&&c.alt||"",u=x()("woocommerce-product-image",o,{"is-placeholder":!s});return Object(m.createElement)("img",D({className:u,src:s||wcSettings.wcAssetUrl+"images/placeholder.png",width:r,height:a,alt:l},i))};We.propTypes={width:_.a.number,height:_.a.number,className:_.a.string,product:_.a.object,alt:_.a.string},We.defaultProps={width:60,height:60,className:""};var Ye=We,Ge={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10,orderby:"popularity"}));return Pe()({path:"/wc/v4/products".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name,e.sku]},getFreeTextOptions:function(e){return[{key:"title",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All products with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(e.name,t)||{};return[Object(m.createElement)(Ye,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},$e={name:"taxes",className:"woocommerce-search__tax-result",options:function(e){var t="";e&&(t=oe({code:e,per_page:10}));return Pe()({path:"/wc/v4/taxes".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.id,Te(e)]},getFreeTextOptions:function(e){return[{key:"code",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All taxes with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(Te(e),t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:Te(e)}}},Xe={name:"usernames",className:"woocommerce-search__usernames-result",options:function(e){var t="";e&&(t=oe({search:e,searchby:"username",per_page:10}));return Pe()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.username]},getOptionLabel:function(e,t){var n=Fe(e.username,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.username},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.username}}};function Ze(e){return e.attributes.reduce(function(e,t,n,r){return e+"".concat(t.option).concat(r.length===n+1?"":", ")},"")}var Qe={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10}));var n=le().products;return n&&!n.includes(",")||console.warn("Invalid product id supplied to Variations autocompleter"),Pe()({path:"/wc/v4/products/".concat(n,"/variations").concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[Ze(e),e.sku]},getOptionLabel:function(e,t){var n=Fe(Ze(e),t)||{};return[Object(m.createElement)(Ye,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.description},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:Ze(e)}}},Je=function(e){var t=e.id,n=e.instanceId,r=e.isVisible,a=e.label,o=e.popoverContents,i=e.remove,c=e.screenReaderLabel,s=e.setState,l=e.className;if(c=c||a,!a)return null;var u=x()("woocommerce-tag",l,{"has-remove":!!i}),f="woocommerce-tag__label-".concat(n),d=Object(m.createElement)(m.Fragment,null,Object(m.createElement)("span",{className:"screen-reader-text"},c),Object(m.createElement)("span",{"aria-hidden":"true"},a));return Object(m.createElement)("span",{className:u},o?Object(m.createElement)(v.Button,{className:"woocommerce-tag__text",id:f,onClick:function(){return s(function(){return{isVisible:!0}})},isToggled:r},d):Object(m.createElement)("span",{className:"woocommerce-tag__text",id:f},d),o&&r&&Object(m.createElement)(v.Popover,{onClose:function(){return s(function(){return{isVisible:!1}})}},o),i&&Object(m.createElement)(v.IconButton,{className:"woocommerce-tag__remove",icon:Object(m.createElement)(v.Dashicon,{icon:"dismiss",size:20}),onClick:i(t),label:Object(g.sprintf)(Object(g.__)("Remove %s","woocommerce-admin"),a),"aria-describedby":f}))};Je.propTypes={id:_.a.oneOfType([_.a.number,_.a.string]),label:_.a.string.isRequired,popoverContents:_.a.node,remove:_.a.func,screenReaderLabel:_.a.string};var et=Object(Oe.withState)({isVisible:!1})(Object(Oe.withInstanceId)(Je)),tt=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).state={value:"",isActive:!1},n.input=Object(m.createRef)(),n.selectResult=n.selectResult.bind(f(n)),n.removeAll=n.removeAll.bind(f(n)),n.removeResult=n.removeResult.bind(f(n)),n.updateSearch=n.updateSearch.bind(f(n)),n.onFocus=n.onFocus.bind(f(n)),n.onBlur=n.onBlur.bind(f(n)),n.onKeyDown=n.onKeyDown.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"selectResult",value:function(e){var t=this.props,n=t.selected,r=t.onChange;-1===Object(y.findIndex)(n,{id:e.id})&&(this.setState({value:""}),r([].concat(o(n),[e])))}},{key:"removeAll",value:function(){(0,this.props.onChange)([])}},{key:"removeResult",value:function(e){var t=this;return function(){var n=t.props,r=n.selected,a=n.onChange,i=Object(y.findIndex)(r,{id:e});a([].concat(o(r.slice(0,i)),o(r.slice(i+1))))}}},{key:"updateSearch",value:function(e){var t=this;return function(n){var r=n.target.value||"";t.setState({value:r}),e(n)}}},{key:"getAutocompleter",value:function(){switch(this.props.type){case"categories":return Ie;case"countries":return Ue;case"coupons":return ze;case"customers":return He;case"downloadIps":return Ve;case"emails":return qe;case"orders":return Ke;case"products":return Ge;case"taxes":return $e;case"usernames":return Xe;case"variations":return Qe;default:return{}}}},{key:"shouldRenderTags",value:function(){return this.props.selected.some(function(e){return Boolean(e.label)})}},{key:"renderTags",value:function(){var e=this,t=this.props.selected;return this.shouldRenderTags()?Object(m.createElement)(m.Fragment,null,t.map(function(n,r){if(!n.label)return null;var a=Object(g.sprintf)(Object(g.__)("%1$s (%2$s of %3$s)","woocommerce-admin"),n.label,r+1,t.length);return Object(m.createElement)(et,{key:n.id,id:n.id,label:n.label,remove:e.removeResult,screenReaderLabel:a})})):null}},{key:"onFocus",value:function(e){var t=this;return function(n){t.setState({isActive:!0}),e(n)}}},{key:"onBlur",value:function(){this.setState({isActive:!1})}},{key:"onKeyDown",value:function(e){var t=this.state.value,n=this.props,r=n.selected,a=n.onChange;8===e.keyCode&&!t&&r.length&&a(o(r.slice(0,-1)))}},{key:"render",value:function(){var e=this,t=this.getAutocompleter(),n=this.props,r=n.allowFreeTextSearch,a=n.className,o=n.inlineTags,i=n.instanceId,c=n.placeholder,s=n.selected,l=n.showClearButton,u=n.staticResults,f=this.state,d=f.value,h=void 0===d?"":d,p=f.isActive,b={"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"]},y=this.shouldRenderTags(),w=t.inputType?t.inputType:"text",_=Object(m.createElement)(E.a,{className:"woocommerce-search__icon",icon:"search",size:18});return Object(m.createElement)("div",{className:x()("woocommerce-search",a,{"has-inline-tags":o})},Object(m.createElement)(De,{allowFreeText:r,completer:t,onSelect:this.selectResult,selected:s.map(function(e){return e.id}),staticResults:u},function(t){var n=t.listBoxId,r=t.activeId,a=t.onChange;return o?Object(m.createElement)("div",{className:x()("woocommerce-search__inline-container",{"is-active":p,"has-tags":o&&y}),onClick:function(){e.input.current.focus()}},_,Object(m.createElement)("div",{className:"woocommerce-search__token-list"},e.renderTags(),Object(m.createElement)("input",D({ref:e.input,type:w,size:(0===h.length&&c&&c.length||h.length)+1,value:h,placeholder:!y&&c||"",className:"woocommerce-search__inline-input",onChange:e.updateSearch(a),"aria-owns":n,"aria-activedescendant":r,onFocus:e.onFocus(a),onBlur:e.onBlur,onKeyDown:e.onKeyDown,"aria-describedby":y?"search-inline-input-".concat(i):null},b)),Object(m.createElement)("span",{id:"search-inline-input-".concat(i),className:"screen-reader-text"},Object(g.__)("Move backward for selected items","woocommerce-admin")))):Object(m.createElement)(m.Fragment,null,_,Object(m.createElement)("input",D({type:"search",value:h,placeholder:c,className:"woocommerce-search__input",onChange:e.updateSearch(a),"aria-owns":n,"aria-activedescendant":r},b)))}),!o&&this.renderTags(),l&&y?Object(m.createElement)(v.Button,{className:"woocommerce-search__clear",isLink:!0,onClick:this.removeAll},Object(m.createElement)(v.Icon,{icon:"dismiss"}),Object(m.createElement)("span",{className:"screen-reader-text"},Object(g.__)("Clear all","woocommerce-admin"))):null)}}]),t}();tt.propTypes={allowFreeTextSearch:_.a.bool,className:_.a.string,onChange:_.a.func,type:_.a.oneOf(["categories","countries","coupons","customers","downloadIps","emails","orders","products","taxes","usernames","variations"]).isRequired,placeholder:_.a.string,selected:_.a.arrayOf(_.a.shape({id:_.a.oneOfType([_.a.number,_.a.string]).isRequired,label:_.a.string})),inlineTags:_.a.bool,showClearButton:_.a.bool,staticResults:_.a.bool},tt.defaultProps={allowFreeTextSearch:!1,onChange:y.noop,selected:[],inlineTags:!1,showClearButton:!1,staticResults:!1};var nt=Object(Oe.withInstanceId)(tt),rt=function(e){function t(e){var n,r=e.filter,a=e.config,o=e.query;return i(this,t),(n=d(this,h(t).apply(this,arguments))).onSearchChange=n.onSearchChange.bind(f(n)),n.state={selected:[]},n.updateLabels=n.updateLabels.bind(f(n)),r.value.length&&a.input.getLabels(r.value,o).then(n.updateLabels),n}return b(t,m["Component"]),s(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.config,r=t.filter,a=t.query,o=e.filter;if(r.value.length&&!Object(y.isEqual)(o,r)){var i=this.state.selected.map(function(e){return e.id});ce(r.value).every(function(e){return!i.includes(e)})&&n.input.getLabels(r.value,a).then(this.updateLabels)}}},{key:"updateLabels",value:function(e){var t=this.state.selected.map(function(e){return e.id}),n=e.map(function(e){return e.id});Object(y.isEqual)(n.sort(),t.sort())||this.setState({selected:e})}},{key:"onSearchChange",value:function(e){this.setState({selected:e});var t=this.props,n=t.filter,r=t.onFilterChange,a=e.map(function(e){return e.id}).join(",");r(n.key,"value",a)}},{key:"getScreenReaderText",value:function(e,t){var n=this.state.selected;if(0===n.length)return"";var r=Object(y.find)(t.rules,{value:e.rule})||{},a=n.map(function(e){return e.label}).join(", ");return ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,a),rule:Object(m.createElement)(m.Fragment,null,r.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,a=e.onFilterChange,o=e.isEnglish,i=this.state.selected,c=r.key,s=r.rule,l=n.input,u=n.labels,f=n.rules,d=O()({mixedString:u.title,components:{title:Object(m.createElement)("span",{className:t}),rule:Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__rule"),options:f,value:s,onChange:Object(y.partial)(a,c,"rule"),"aria-label":u.rule}),filter:Object(m.createElement)(nt,{className:x()(t,"woocommerce-filters-advanced__input"),onChange:this.onSearchChange,type:l.type,placeholder:u.placeholder,selected:i,inlineTags:!0,"aria-label":u.filter})}}),h=this.getScreenReaderText(r,n);return Object(m.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(m.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(m.createElement)("div",{className:x()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),h&&Object(m.createElement)("span",{className:"screen-reader-text"},h))}}]),t}();rt.propTypes={config:_.a.shape({labels:_.a.shape({placeholder:_.a.string,rule:_.a.string,title:_.a.string}),rules:_.a.arrayOf(_.a.object),input:_.a.object}).isRequired,filter:_.a.shape({key:_.a.string,rule:_.a.string,value:_.a.string}).isRequired,onFilterChange:_.a.func.isRequired,query:_.a.object};var at=rt;function ot(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var it=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.value,r=e.help,a=e.className,o=e.instanceId,i=e.onChange,c=e.prefix,s=e.suffix,l=e.type,u=he(e,["label","value","help","className","instanceId","onChange","prefix","suffix","type"]),f="inspector-text-control-with-affixes-".concat(o),d=[];return r&&d.push("".concat(f,"__help")),c&&d.push("".concat(f,"__prefix")),s&&d.push("".concat(f,"__suffix")),Object(m.createElement)(v.BaseControl,{label:t,id:f,help:r,className:a},Object(m.createElement)("div",{className:"text-control-with-affixes"},c&&Object(m.createElement)("span",{id:"".concat(f,"__prefix"),className:"text-control-with-affixes__prefix"},c),Object(m.createElement)("input",D({className:"components-text-control__input",type:l,id:f,value:n,onChange:function(e){return i(e.target.value)},"aria-describedby":d.join(" ")},u)),s&&Object(m.createElement)("span",{id:"".concat(f,"__suffix"),className:"text-control-with-affixes__suffix"},s)))}}]),t}();it.defaultProps={type:"text"},it.propTypes={label:_.a.string,help:_.a.string,type:_.a.string,value:_.a.string.isRequired,className:_.a.string,onChange:_.a.func.isRequired,prefix:_.a.node,suffix:_.a.node};var ct=Object(Oe.withInstanceId)(it),st=n(318);function lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("number"!=typeof e&&(e=parseFloat(e)),isNaN(e))return"";var n=Object(y.get)(wcSettings,["currency","decimal_separator"],"."),r=Object(y.get)(wcSettings,["currency","thousand_separator"],",");if(t=parseInt(t),isNaN(t)){var a=ot(e.toString().split("."),2)[1];t=a?a.length:0}return st(e,t,n,r)}function ut(e,t){t||(t=Object(y.get)(wcSettings,["currency","symbol"],"$"));var n=lt(e,Object(y.get)(wcSettings,["currency","precision"],2)),r=Object(y.get)(wcSettings,["currency","price_format"],"%1$s%2$s");return""===n?n:Object(g.sprintf)(r,t,n)}var ft=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"getBetweenString",value:function(){return Object(g._x)("{{rangeStart /}}{{span}} and {{/span}}{{rangeEnd /}}","Numerical range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var n=Object(y.get)(t,["input","type"],"number"),r=Object(y.find)(t.rules,{value:e.rule})||{},a=ot(Object(y.isArray)(e.value)?e.value:[e.value],2),o=a[0],i=a[1];if(!o||"between"===r.value&&!i)return"";"currency"===n&&(o=ut(o),i=ut(i));var c=o;return"between"===r.value&&(c=O()({mixedString:this.getBetweenString(),components:{rangeStart:Object(m.createElement)(m.Fragment,null,o),rangeEnd:Object(m.createElement)(m.Fragment,null,i),span:Object(m.createElement)(m.Fragment,null)}})),ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,c),rule:Object(m.createElement)(m.Fragment,null,r.label)}}))}},{key:"getFormControl",value:function(e){var t=e.type,n=e.value,r=e.label,a=e.onChange;if("currency"===t){var o=Object(y.get)(wcSettings,["currency","symbol"]);return 0===Object(y.get)(wcSettings,["currency","position"]).indexOf("right")?Object(m.createElement)(ct,{suffix:Object(m.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:n||"","aria-label":r,onChange:a}):Object(m.createElement)(ct,{prefix:Object(m.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:n||"","aria-label":r,onChange:a})}return Object(m.createElement)(v.TextControl,{className:"woocommerce-filters-advanced__input",type:"number",value:n||"","aria-label":r,onChange:a})}},{key:"getFilterInputs",value:function(){var e=this.props,t=e.config,n=e.filter,r=e.onFilterChange,a=Object(y.get)(t,["input","type"],"number");if("between"===n.rule)return this.getRangeInput();var o=ot(Object(y.isArray)(n.value)?n.value:[n.value],2),i=o[0],c=o[1];Boolean(c)&&r(n.key,"value",i||c);var s="";return s="lessthan"===n.rule?Object(g._x)("%(field)s maximum amount","maximum value input","woocommerce-admin"):Object(g._x)("%(field)s minimum amount","minimum value input","woocommerce-admin"),this.getFormControl({type:a,value:i||c,label:Object(g.sprintf)(s,{field:Object(y.get)(t,["labels","add"])}),onChange:Object(y.partial)(r,n.key,"value")})}},{key:"getRangeInput",value:function(){var e=this.props,t=e.config,n=e.filter,r=e.onFilterChange,a=Object(y.get)(t,["input","type"],"number"),o=ot(Object(y.isArray)(n.value)?n.value:[n.value],2),i=o[0],c=o[1];return O()({mixedString:this.getBetweenString(),components:{rangeStart:this.getFormControl({type:a,value:i||"",label:Object(g.sprintf)(Object(g.__)("%(field)s range start","woocommerce-admin"),{field:Object(y.get)(t,["labels","add"])}),onChange:function(e){r(n.key,"value",[e,c])}}),rangeEnd:this.getFormControl({type:a,value:c||"",label:Object(g.sprintf)(Object(g.__)("%(field)s range end","woocommerce-admin"),{field:Object(y.get)(t,["labels","add"])}),onChange:function(e){r(n.key,"value",[i,e])}}),span:Object(m.createElement)("span",{className:"separator"})}})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,a=e.onFilterChange,o=e.isEnglish,i=r.key,c=r.rule,s=n.labels,l=n.rules,u=O()({mixedString:s.title,components:{title:Object(m.createElement)("span",{className:t}),rule:Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__rule"),options:l,value:c,onChange:Object(y.partial)(a,i,"rule"),"aria-label":s.rule}),filter:Object(m.createElement)("div",{className:x()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===c})},this.getFilterInputs())}}),f=this.getScreenReaderText(r,n);return Object(m.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(m.createElement)("legend",{className:"screen-reader-text"},s.add||""),Object(m.createElement)("div",{className:x()("woocommerce-filters-advanced__fieldset",{"is-english":o})},u),f&&Object(m.createElement)("span",{className:"screen-reader-text"},f))}}]),t}(),dt=n(7),ht=n.n(dt),pt="month",bt="previous_year",mt="YYYY-MM-DD",gt=[{value:"today",label:Object(g.__)("Today","woocommerce-admin")},{value:"yesterday",label:Object(g.__)("Yesterday","woocommerce-admin")},{value:"week",label:Object(g.__)("Week to Date","woocommerce-admin")},{value:"last_week",label:Object(g.__)("Last Week","woocommerce-admin")},{value:"month",label:Object(g.__)("Month to Date","woocommerce-admin")},{value:"last_month",label:Object(g.__)("Last Month","woocommerce-admin")},{value:"quarter",label:Object(g.__)("Quarter to Date","woocommerce-admin")},{value:"last_quarter",label:Object(g.__)("Last Quarter","woocommerce-admin")},{value:"year",label:Object(g.__)("Year to Date","woocommerce-admin")},{value:"last_year",label:Object(g.__)("Last Year","woocommerce-admin")},{value:"custom",label:Object(g.__)("Custom","woocommerce-admin")}],vt=[{value:"previous_period",label:Object(g.__)("Previous Period","woocommerce-admin")},{value:"previous_year",label:Object(g.__)("Previous Year","woocommerce-admin")}];function yt(e,t){if(ht.a.isMoment(t))return t.isValid()?t:null;if("string"==typeof t){var n=ht()(t,[mt,e],!0);return n.isValid()?n:null}throw new Error("toMoment requires a string to be passed as an argument")}function wt(e,t){var n=e.year()===t.year(),r=n&&e.month()===t.month(),a=n&&r&&e.isSame(t,"day"),o=Object(g.__)("MMM D, YYYY","woocommerce-admin"),i=Object(g.__)("MMM D","woocommerce-admin");if(a)return e.format(o);if(r){var c=e.date();return e.format(o).replace(c,"".concat(c," - ").concat(t.date()))}return n?"".concat(e.format(i)," - ").concat(t.format(o)):"".concat(e.format(o)," - ").concat(t.format(o))}function _t(e,t){var n,r,a=ht()().startOf(e).subtract(1,e),o=a.clone().endOf(e);if("previous_period"===t)if("year"===e)r=(n=ht()().startOf(e).subtract(2,e)).clone().endOf(e);else{var i=o.diff(a,"days");n=(r=a.clone().subtract(1,"days")).clone().subtract(i,"days")}else r=(n="week"===e?a.clone().subtract(1,"years").week(a.week()).startOf("week"):a.clone().subtract(1,"years")).clone().endOf(e);return{primaryStart:a,primaryEnd:o,secondaryStart:n,secondaryEnd:r}}function kt(e,t){var n,r,a=ht()().startOf(e),o=ht()(),i=o.diff(a,"days");return"previous_period"===t?(n=a.clone().subtract(1,e),r=o.clone().subtract(1,e)):r=(n="week"===e?a.clone().subtract(1,"years").week(a.week()).startOf("week"):a.clone().subtract(1,"years")).clone().add(i,"days"),{primaryStart:a,primaryEnd:o,secondaryStart:n,secondaryEnd:r}}var Et=function(e){var t=e.period,n=e.compare,r=e.after,a=e.before;return{period:t||pt,compare:n||bt,after:r?ht()(r):null,before:a?ht()(a):null}},St=function(e){var t=Et(e),n=t.period,r=t.compare,a=t.after,o=t.before,i=function(e,t,n,r){switch(e){case"today":return kt("day",t);case"yesterday":return _t("day",t);case"week":return kt("week",t);case"last_week":return _t("week",t);case"month":return kt("month",t);case"last_month":return _t("month",t);case"quarter":return kt("quarter",t);case"last_quarter":return _t("quarter",t);case"year":return kt("year",t);case"last_year":return _t("year",t);case"custom":var a=r.diff(n,"days");if("previous_period"===t){var o=n.clone().subtract(1,"days");return{primaryStart:n,primaryEnd:r,secondaryStart:o.clone().subtract(a,"days"),secondaryEnd:o}}return{primaryStart:n,primaryEnd:r,secondaryStart:n.clone().subtract(1,"years"),secondaryEnd:r.clone().subtract(1,"years")}}}(n,r,a,o),c=i.primaryStart,s=i.primaryEnd,l=i.secondaryStart,u=i.secondaryEnd;return{primary:{label:Object(y.find)(gt,function(e){return e.value===n}).label,range:wt(c,s),after:c,before:s},secondary:{label:Object(y.find)(vt,function(e){return e.value===r}).label,range:wt(l,u),after:l,before:u}}};var Ot,Mt,xt;Ot=wcSettings.l10n,Mt=Ot.userLocale,xt=Ot.weekdaysShort,"en"!==ht.a.locale()&&ht.a.updateLocale(Mt,{longDateFormat:{L:Object(g.__)("MM/DD/YYYY","woocommerce-admin"),LL:Object(g.__)("MMMM D, YYYY","woocommerce-admin"),LLL:Object(g.__)("D MMMM YYYY LT","woocommerce-admin"),LLLL:Object(g.__)("dddd, D MMMM YYYY LT","woocommerce-admin"),LT:Object(g.__)("HH:mm","woocommerce-admin")},weekdaysMin:xt});var Ct={invalid:Object(g.__)("Invalid date","woocommerce-admin"),future:Object(g.__)("Select a date in the past","woocommerce-admin"),startAfterEnd:Object(g.__)("Start date must be before end date","woocommerce-admin"),endBeforeStart:Object(g.__)("Start date must be before end date","woocommerce-admin")};n(166),n(177);var Dt=function(e){var t=e.disabled,n=e.value,r=e.onChange,a=e.dateFormat,o=e.label,i=e.describedBy,c=e.error,s=e.onFocus,l=e.onKeyDown,u=e.errorPosition,f=x()("woocommerce-calendar__input",{"is-empty":0===n.length,"is-error":c}),d=Object(y.uniqueId)("_woo-dates-input");return Object(m.createElement)("div",{className:f},Object(m.createElement)("input",{type:"text",className:"woocommerce-calendar__input-text",value:n,onChange:r,"aria-label":o,id:d,"aria-describedby":"".concat(d,"-message"),placeholder:a.toLowerCase(),onFocus:s,onKeyDown:l,disabled:t}),c&&Object(m.createElement)(v.Popover,{className:"woocommerce-calendar__input-error",focusOnMount:!1,position:u},c),Object(m.createElement)(v.Dashicon,{icon:"calendar"}),Object(m.createElement)("p",{className:"screen-reader-text",id:"".concat(d,"-message")},c||i))};Dt.propTypes={disabled:_.a.bool,value:_.a.string,onChange:_.a.func.isRequired,dateFormat:_.a.string.isRequired,label:_.a.string.isRequired,describedBy:_.a.string.isRequired,error:_.a.string,errorPosition:_.a.string,onFocus:_.a.func,onKeyDown:_.a.func},Dt.defaultProps={disabled:!1,onFocus:function(){},errorPosition:"bottom center",onKeyDown:y.noop};var jt=Dt,Pt=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).onDateChange=n.onDateChange.bind(f(n)),n.onInputChange=n.onInputChange.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"handleKeyDown",value:function(e,t,n){var r=n.keyCode;Me.TAB===r&&e&&t()}},{key:"handleFocus",value:function(e,t){e||t()}},{key:"onDateChange",value:function(e,t){var n=this.props,r=n.onUpdate,a=n.dateFormat,o=ht()(t);r({date:o,text:t?o.format(a):"",error:null}),e()}},{key:"onInputChange",value:function(e){var t=e.target.value,n=yt(this.props.dateFormat,t),r=n?null:Ct.invalid;this.props.onUpdate({date:n,text:t,error:t.length>0?r:null})}},{key:"render",value:function(){var e=this,t=this.props,n=t.date,r=t.disabled,a=t.text,o=t.dateFormat,i=t.error,c=t.isInvalidDate;return Object(m.createElement)(v.Dropdown,{position:"bottom center",focusOnMount:!1,renderToggle:function(t){var n=t.isOpen,c=t.onToggle;return Object(m.createElement)(jt,{disabled:r,value:a,onChange:e.onInputChange,dateFormat:o,label:Object(g.__)("Choose a date","woocommerce-admin"),error:i,describedBy:Object(g.sprintf)(Object(g.__)("Date input describing a selected date in format %s","woocommerce-admin"),o),onFocus:Object(y.partial)(e.handleFocus,n,c),"aria-expanded":n,focusOnMount:!1,onKeyDown:Object(y.partial)(e.handleKeyDown,n,c),errorPosition:"top center"})},renderContent:function(t){var r=t.onToggle;return Object(m.createElement)(me,{component:!1},Object(m.createElement)(be,{className:"woocommerce-calendar__date-picker-title"},Object(g.__)("select a date","woocommerce-admin")),Object(m.createElement)("div",{className:"woocommerce-calendar__react-dates is-core-datepicker"},Object(m.createElement)(v.DatePicker,{currentDate:n,onChange:Object(y.partial)(e.onDateChange,r),isInvalidDate:c})))}})}}]),t}();Pt.propTypes={date:_.a.object,disabled:_.a.bool,text:_.a.string,error:_.a.string,onUpdate:_.a.func.isRequired,dateFormat:_.a.string.isRequired,isInvalidDate:_.a.func};var Ft=Pt,Tt=Object(g.__)("MMM D, YYYY","woocommerce-admin"),It=Object(g.__)("MM/DD/YYYY","woocommerce-admin"),Nt=function(e){function t(e){var n,r=e.filter;i(this,t),n=d(this,h(t).apply(this,arguments));var a=ot(Array.isArray(r.value)?r.value:[null,r.value],2),o=a[0],c=a[1],s=o?yt(mt,o):null,l=c?yt(mt,c):null;return n.state={before:l,beforeText:l?l.format(It):"",beforeError:null,after:s,afterText:s?s.format(It):"",afterError:null},n.onSingleDateChange=n.onSingleDateChange.bind(f(n)),n.onRangeDateChange=n.onRangeDateChange.bind(f(n)),n.onRuleChange=n.onRuleChange.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"getBetweenString",value:function(){return Object(g._x)("{{after /}}{{span}} and {{/span}}{{before /}}","Date range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var n=Object(y.find)(t.rules,{value:e.rule})||{},r=this.state,a=r.before,o=r.after;if(!a||"between"===n.value&&!o)return"";var i=a.format(Tt);return"between"===n.value&&(i=O()({mixedString:this.getBetweenString(),components:{after:Object(m.createElement)(m.Fragment,null,o.format(Tt)),before:Object(m.createElement)(m.Fragment,null,a.format(Tt)),span:Object(m.createElement)(m.Fragment,null)}})),ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,i),rule:Object(m.createElement)(m.Fragment,null,n.label)}}))}},{key:"onSingleDateChange",value:function(e){var t=e.date,n=e.text,r=e.error,a=this.props,o=a.filter,i=a.onFilterChange;this.setState({before:t,beforeText:n,beforeError:r}),t&&i(o.key,"value",t.format(mt))}},{key:"onRangeDateChange",value:function(e,t){var n,a=t.date,o=t.text,i=t.error,c=this.props,s=c.filter,l=c.onFilterChange;if(this.setState((r(n={},e,a),r(n,e+"Text",o),r(n,e+"Error",i),n)),a){var u=this.state,f=u.before,d=u.after,h=null,p=null;"after"===e&&(h=a.format(mt),p=f?f.format(mt):null),"before"===e&&(h=d?d.format(mt):null,p=a.format(mt)),h&&p&&l(s.key,"value",[h,p])}}},{key:"isFutureDate",value:function(e){return ht()().isBefore(ht()(e),"day")}},{key:"getFilterInputs",value:function(){var e=this.props.filter,t=this.state,n=t.before,r=t.beforeText,a=t.beforeError,o=t.after,i=t.afterText,c=t.afterError;return"between"===e.rule?O()({mixedString:this.getBetweenString(),components:{after:Object(m.createElement)(Ft,{date:o,text:i,error:c,onUpdate:Object(y.partial)(this.onRangeDateChange,"after"),dateFormat:It,isInvalidDate:this.isFutureDate}),before:Object(m.createElement)(Ft,{date:n,text:r,error:a,onUpdate:Object(y.partial)(this.onRangeDateChange,"before"),dateFormat:It,isInvalidDate:this.isFutureDate}),span:Object(m.createElement)("span",{className:"separator"})}}):Object(m.createElement)(Ft,{date:n,text:r,error:a,onUpdate:this.onSingleDateChange,dateFormat:It,isInvalidDate:this.isFutureDate})}},{key:"onRuleChange",value:function(e){var t=this.props,n=t.onFilterChange,r=t.filter,a=t.updateFilter,o=this.state.before;"between"===r.rule&&"between"!==e?a({key:r.key,rule:e,value:o?o.format(mt):void 0}):n(r.key,"rule",e)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,a=e.isEnglish,o=r.rule,i=n.labels,c=n.rules,s=this.getScreenReaderText(r,n),l=O()({mixedString:i.title,components:{title:Object(m.createElement)("span",{className:t}),rule:Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__rule"),options:c,value:o,onChange:this.onRuleChange,"aria-label":i.rule}),filter:Object(m.createElement)("div",{className:x()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===o})},this.getFilterInputs())}});return Object(m.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(m.createElement)("legend",{className:"screen-reader-text"},i.add||""),Object(m.createElement)("div",{className:x()("woocommerce-filters-advanced__fieldset",{"is-english":a})},l),s&&Object(m.createElement)("span",{className:"screen-reader-text"},s))}}]),t}(),At=[{value:"all",label:Object(g.__)("All","woocommerce-admin")},{value:"any",label:Object(g.__)("Any","woocommerce-admin")}],Rt=function(e){function t(e){var n,r=e.query,a=e.config;return i(this,t),(n=d(this,h(t).apply(this,arguments))).state={match:r.match||"all",activeFilters:ee(r,a.filters)},n.filterListRef=Object(m.createRef)(),n.onMatchChange=n.onMatchChange.bind(f(n)),n.onFilterChange=n.onFilterChange.bind(f(n)),n.getAvailableFilterKeys=n.getAvailableFilterKeys.bind(f(n)),n.addFilter=n.addFilter.bind(f(n)),n.removeFilter=n.removeFilter.bind(f(n)),n.clearFilters=n.clearFilters.bind(f(n)),n.getUpdateHref=n.getUpdateHref.bind(f(n)),n.updateFilter=n.updateFilter.bind(f(n)),n.onFilter=n.onFilter.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.config,r=t.query,a=e.query;Object(y.isEqual)(a,r)||this.setState({activeFilters:ee(r,n.filters)})}},{key:"onMatchChange",value:function(e){this.setState({match:e})}},{key:"onFilterChange",value:function(e,t,n){var a=this.state.activeFilters.map(function(a){return e===a.key?Object.assign({},a,r({},t,n)):a});this.setState({activeFilters:a})}},{key:"updateFilter",value:function(e){var t=this.state.activeFilters.map(function(t){return e.key===t.key?e:t});this.setState({activeFilters:t})}},{key:"removeFilter",value:function(e){var t=this.props.onAdvancedFilterAction,n=o(this.state.activeFilters),r=Object(y.findIndex)(n,function(t){return t.key===e});(t("remove",n[r]),n.splice(r,1),this.setState({activeFilters:n}),0===n.length)&&J().push(this.getUpdateHref([]))}},{key:"getTitle",value:function(){var e=this.state.match,t=this.props.config;return O()({mixedString:t.title,components:{select:Object(m.createElement)(v.SelectControl,{className:"woocommerce-filters-advanced__title-select",options:At,value:e,onChange:this.onMatchChange,"aria-label":Object(g.__)("Choose to apply any or all filters","woocommerce-admin")})}})}},{key:"getAvailableFilterKeys",value:function(){var e=this.props.config,t=this.state.activeFilters.map(function(e){return e.key});return Object(y.difference)(Object.keys(e.filters),t)}},{key:"addFilter",value:function(e,t){var n=this,r=this.props,a=r.onAdvancedFilterAction,i=r.config.filters[e],c={key:e};Array.isArray(i.rules)&&i.rules.length&&(c.rule=i.rules[0].value),i.input&&i.input.options&&(c.value=te(i,i.input.options)),i.input&&"Search"===i.input.component&&(c.value=""),this.setState(function(e){return{activeFilters:[].concat(o(e.activeFilters),[c])}}),a("add",c),t(),setTimeout(function(){n.filterListRef.current.querySelector("li:last-of-type fieldset").focus()})}},{key:"clearFilters",value:function(){(0,this.props.onAdvancedFilterAction)("clear_all"),this.setState({activeFilters:[],match:"all"})}},{key:"getUpdateHref",value:function(e,t){var n=this.props,r=n.path,o=n.query;return se(a({},ne(e,o,n.config.filters),{match:"all"===t?void 0:t}),r,o)}},{key:"isEnglish",value:function(){var e=wcSettings.siteLocale;return/en-/.test(e)}},{key:"onFilter",value:function(){var e=this.props,t=e.onAdvancedFilterAction,n=e.query,r=e.config,o=this.state,i=o.activeFilters,c=o.match;t("filter",a({},ne(i,n,r.filters),{match:c}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.config,r=t.query,o=this.state,i=o.activeFilters,c=o.match,s=this.getAvailableFilterKeys(),l=this.getUpdateHref(i,c),u=window.location.hash&&(window.location.hash.substr(1)===l||0===i.length),f=this.isEnglish();return Object(m.createElement)(ye,{className:"woocommerce-filters-advanced woocommerce-analytics__card",title:this.getTitle()},Object(m.createElement)("ul",{className:"woocommerce-filters-advanced__list",ref:this.filterListRef},i.map(function(t){var o=t.key,i=n.filters[o],c=i.input,s=i.labels;return Object(m.createElement)("li",{className:"woocommerce-filters-advanced__list-item",key:o},"SelectControl"===c.component&&Object(m.createElement)(Se,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:n.filters[o],onFilterChange:e.onFilterChange,isEnglish:f}),"Search"===c.component&&Object(m.createElement)(at,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:n.filters[o],onFilterChange:e.onFilterChange,isEnglish:f,query:r}),"Number"===c.component&&Object(m.createElement)(ft,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:n.filters[o],onFilterChange:e.onFilterChange,isEnglish:f,query:r}),"Currency"===c.component&&Object(m.createElement)(ft,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a({},n.filters[o],{input:{type:"currency",component:"Currency"}}),onFilterChange:e.onFilterChange,isEnglish:f,query:r}),"Date"===c.component&&Object(m.createElement)(Nt,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:n.filters[o],onFilterChange:e.onFilterChange,isEnglish:f,query:r,updateFilter:e.updateFilter}),Object(m.createElement)(v.IconButton,{className:x()("woocommerce-filters-advanced__line-item","woocommerce-filters-advanced__remove"),label:s.remove,onClick:Object(y.partial)(e.removeFilter,o),icon:Object(m.createElement)(E.a,{icon:"cross-small"})}))})),s.length>0&&Object(m.createElement)("div",{className:"woocommerce-filters-advanced__add-filter"},Object(m.createElement)(v.Dropdown,{className:"woocommerce-filters-advanced__add-filter-dropdown",position:"bottom center",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(m.createElement)(v.IconButton,{className:"woocommerce-filters-advanced__add-button",icon:Object(m.createElement)(E.a,{icon:"add-outline"}),onClick:n,"aria-expanded":t},Object(g.__)("Add a Filter","woocommerce-admin"))},renderContent:function(t){var r=t.onClose;return Object(m.createElement)("ul",{className:"woocommerce-filters-advanced__add-dropdown"},s.map(function(t){return Object(m.createElement)("li",{key:t},Object(m.createElement)(v.Button,{onClick:Object(y.partial)(e.addFilter,t,r)},n.filters[t].labels.add))}))}})),Object(m.createElement)("div",{className:"woocommerce-filters-advanced__controls"},u&&Object(m.createElement)(v.Button,{isPrimary:!0,disabled:!0},Object(g.__)("Filter","woocommerce-admin")),!u&&Object(m.createElement)(_e,{className:"components-button is-primary is-button",type:"wc-admin",href:l,onClick:this.onFilter},Object(g.__)("Filter","woocommerce-admin")),i.length>0&&Object(m.createElement)(_e,{type:"wc-admin",href:this.getUpdateHref([]),onClick:this.clearFilters},Object(g.__)("Clear all filters","woocommerce-admin"))))}}]),t}();Rt.propTypes={config:_.a.shape({title:_.a.string,filters:_.a.objectOf(_.a.shape({labels:_.a.shape({add:_.a.string,remove:_.a.string,rule:_.a.string,title:_.a.string,filter:_.a.string}),rules:_.a.arrayOf(_.a.object),input:_.a.object}))}).isRequired,path:_.a.string.isRequired,query:_.a.object,onAdvancedFilterAction:_.a.func},Rt.defaultProps={query:{},onAdvancedFilterAction:function(){}};var Bt=Rt,Lt=n(146),Ut=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).call(this))).state={animate:null},e.container=Object(m.createRef)(),e.onExited=e.onExited.bind(f(e)),e}return b(t,m["Component"]),s(t,[{key:"onExited",value:function(){var e=this.props.onExited;e&&e(this.container.current)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.animationKey,r=e.animate,a=x()("woocommerce-slide-animation",r&&"animate-".concat(r));return Object(m.createElement)("div",{className:a,ref:this.container},Object(m.createElement)(Lt.TransitionGroup,null,Object(m.createElement)(Lt.CSSTransition,D({timeout:200,classNames:"slide",key:n},this.props,{onExited:this.onExited}),function(e){return t({status:e})})))}}]),t}();Ut.propTypes={children:_.a.func.isRequired,animationKey:_.a.any.isRequired,animate:_.a.oneOf([null,"left","right"]),onExited:_.a.func};var zt=Ut,Ht=function(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]},Vt=function(e){return(e=Ht(Math.abs(e)))?e[1]:NaN},qt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kt(e){return new Wt(e)}function Wt(e){if(!(t=qt.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}Kt.prototype=Wt.prototype,Wt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Yt,Gt,$t,Xt,Zt=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(a>0){if(!+e[r])break e;a=0}}return a>0?e.slice(0,a)+e.slice(t+1):e},Qt=function(e,t){var n=Ht(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")},Jt={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Qt(100*e,t)},r:Qt,s:function(e,t){var n=Ht(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(Yt=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ht(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},en=function(e){return e},tn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],nn=function(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var a=e.length,o=[],i=0,c=t[0],s=0;a>0&&c>0&&(s+c+1>r&&(c=Math.max(1,r-s)),o.push(e.substring(a-=c,a+c)),!((s+=c+1)>r));)c=t[i=(i+1)%t.length];return o.reverse().join(n)}):en,a=e.currency,o=e.decimal,i=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(e.numerals):en,c=e.percent||"%";function s(e){var t=(e=Kt(e)).fill,n=e.align,s=e.sign,l=e.symbol,u=e.zero,f=e.width,d=e.comma,h=e.precision,p=e.trim,b=e.type;"n"===b?(d=!0,b="g"):Jt[b]||(null==h&&(h=12),p=!0,b="g"),(u||"0"===t&&"="===n)&&(u=!0,t="0",n="=");var m="$"===l?a[0]:"#"===l&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",g="$"===l?a[1]:/[%p]/.test(b)?c:"",v=Jt[b],y=/[defgprs%]/.test(b);function w(e){var a,c,l,w=m,_=g;if("c"===b)_=v(e)+_,e="";else{var k=(e=+e)<0;if(e=v(Math.abs(e),h),p&&(e=Zt(e)),k&&0==+e&&(k=!1),w=(k?"("===s?s:"-":"-"===s||"("===s?"":s)+w,_=("s"===b?tn[8+Yt/3]:"")+_+(k&&"("===s?")":""),y)for(a=-1,c=e.length;++a<c;)if(48>(l=e.charCodeAt(a))||l>57){_=(46===l?o+e.slice(a+1):e.slice(a))+_,e=e.slice(0,a);break}}d&&!u&&(e=r(e,1/0));var E=w.length+e.length+_.length,S=E<f?new Array(f-E+1).join(t):"";switch(d&&u&&(e=r(S+e,S.length?f-_.length:1/0),S=""),n){case"<":e=w+e+_+S;break;case"=":e=w+S+e+_;break;case"^":e=S.slice(0,E=S.length>>1)+w+e+_+S.slice(E);break;default:e=S+w+e+_}return i(e)}return h=null==h?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),w.toString=function(){return e+""},w}return{format:s,formatPrefix:function(e,t){var n=s(((e=Kt(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Vt(t)/3))),a=Math.pow(10,-r),o=tn[8+r/3];return function(e){return n(a*e)+o}}}};function rn(e){return Gt=nn(e),$t=Gt.format,Xt=Gt.formatPrefix,Gt}rn({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var an=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n},on=(an("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),an("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),an("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),an("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),an("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),an("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),an("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),an("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),an("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),function(e,t,n){e.prototype=t.prototype=n,n.constructor=e});function cn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function sn(){}var ln="\\s*([+-]?\\d+)\\s*",un="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dn=/^#([0-9a-f]{3})$/,hn=/^#([0-9a-f]{6})$/,pn=new RegExp("^rgb\\("+[ln,ln,ln]+"\\)$"),bn=new RegExp("^rgb\\("+[fn,fn,fn]+"\\)$"),mn=new RegExp("^rgba\\("+[ln,ln,ln,un]+"\\)$"),gn=new RegExp("^rgba\\("+[fn,fn,fn,un]+"\\)$"),vn=new RegExp("^hsl\\("+[un,fn,fn]+"\\)$"),yn=new RegExp("^hsla\\("+[un,fn,fn,un]+"\\)$"),wn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function _n(e){var t;return e=(e+"").trim().toLowerCase(),(t=dn.exec(e))?new Mn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=hn.exec(e))?kn(parseInt(t[1],16)):(t=pn.exec(e))?new Mn(t[1],t[2],t[3],1):(t=bn.exec(e))?new Mn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=mn.exec(e))?En(t[1],t[2],t[3],t[4]):(t=gn.exec(e))?En(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=vn.exec(e))?Cn(t[1],t[2]/100,t[3]/100,1):(t=yn.exec(e))?Cn(t[1],t[2]/100,t[3]/100,t[4]):wn.hasOwnProperty(e)?kn(wn[e]):"transparent"===e?new Mn(NaN,NaN,NaN,0):null}function kn(e){return new Mn(e>>16&255,e>>8&255,255&e,1)}function En(e,t,n,r){return r<=0&&(e=t=n=NaN),new Mn(e,t,n,r)}function Sn(e){return e instanceof sn||(e=_n(e)),e?new Mn((e=e.rgb()).r,e.g,e.b,e.opacity):new Mn}function On(e,t,n,r){return 1===arguments.length?Sn(e):new Mn(e,t,n,null==r?1:r)}function Mn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function xn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Cn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jn(e,t,n,r)}function Dn(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof jn)return new jn(e.h,e.s,e.l,e.opacity);if(e instanceof sn||(e=_n(e)),!e)return new jn;if(e instanceof jn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,c=o-a,s=(o+a)/2;return c?(i=t===o?(n-r)/c+6*(n<r):n===o?(r-t)/c+2:(t-n)/c+4,c/=s<.5?o+a:2-o-a,i*=60):c=s>0&&s<1?0:i,new jn(i,c,s,e.opacity)}(e):new jn(e,t,n,null==r?1:r)}function jn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Pn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}on(sn,_n,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),on(Mn,On,cn(sn,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+xn(this.r)+xn(this.g)+xn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),on(jn,Dn,cn(sn,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new jn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new jn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Mn(Pn(e>=240?e-240:e+120,a,r),Pn(e,a,r),Pn(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Fn=Math.PI/180,Tn=180/Math.PI,In=.96422,Nn=1,An=.82521,Rn=4/29,Bn=6/29,Ln=3*Bn*Bn,Un=Bn*Bn*Bn;function zn(e){if(e instanceof Vn)return new Vn(e.l,e.a,e.b,e.opacity);if(e instanceof Xn)return Zn(e);e instanceof Mn||(e=Sn(e));var t,n,r=Yn(e.r),a=Yn(e.g),o=Yn(e.b),i=qn((.2225045*r+.7168786*a+.0606169*o)/Nn);return r===a&&a===o?t=n=i:(t=qn((.4360747*r+.3850649*a+.1430804*o)/In),n=qn((.0139322*r+.0971045*a+.7141733*o)/An)),new Vn(116*i-16,500*(t-i),200*(i-n),e.opacity)}function Hn(e,t,n,r){return 1===arguments.length?zn(e):new Vn(e,t,n,null==r?1:r)}function Vn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function qn(e){return e>Un?Math.pow(e,1/3):e/Ln+Rn}function Kn(e){return e>Bn?e*e*e:Ln*(e-Rn)}function Wn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Yn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Gn(e){if(e instanceof Xn)return new Xn(e.h,e.c,e.l,e.opacity);if(e instanceof Vn||(e=zn(e)),0===e.a&&0===e.b)return new Xn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Tn;return new Xn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function $n(e,t,n,r){return 1===arguments.length?Gn(e):new Xn(e,t,n,null==r?1:r)}function Xn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Zn(e){if(isNaN(e.h))return new Vn(e.l,0,0,e.opacity);var t=e.h*Fn;return new Vn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}on(Vn,Hn,cn(sn,{brighter:function(e){return new Vn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Vn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Mn(Wn(3.1338561*(t=In*Kn(t))-1.6168667*(e=Nn*Kn(e))-.4906146*(n=An*Kn(n))),Wn(-.9787684*t+1.9161415*e+.033454*n),Wn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),on(Xn,$n,cn(sn,{brighter:function(e){return new Xn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Xn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Zn(this).rgb()}}));var Qn=-.14861,Jn=1.78277,er=-.29227,tr=-.90649,nr=1.97294,rr=nr*tr,ar=nr*Jn,or=Jn*er-tr*Qn;function ir(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof cr)return new cr(e.h,e.s,e.l,e.opacity);e instanceof Mn||(e=Sn(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(or*r+rr*t-ar*n)/(or+rr-ar),o=r-a,i=(nr*(n-a)-er*o)/tr,c=Math.sqrt(i*i+o*o)/(nr*a*(1-a)),s=c?Math.atan2(i,o)*Tn-120:NaN;return new cr(s<0?s+360:s,c,a,e.opacity)}(e):new cr(e,t,n,null==r?1:r)}function cr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function sr(e,t,n,r,a){var o=e*e,i=o*e;return((1-3*e+3*o-i)*t+(4-6*o+3*i)*n+(1+3*e+3*o-3*i)*r+i*a)/6}on(cr,ir,cn(sn,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new cr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new cr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Fn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new Mn(255*(t+n*(Qn*r+Jn*a)),255*(t+n*(er*r+tr*a)),255*(t+n*(nr*r)),this.opacity)}}));var lr=function(e){return function(){return e}};function ur(e,t){return function(n){return e+n*t}}function fr(e,t){var n=t-e;return n?ur(e,n>180||n<-180?n-360*Math.round(n/360):n):lr(isNaN(e)?t:e)}function dr(e){return 1==(e=+e)?hr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):lr(isNaN(t)?n:t)}}function hr(e,t){var n=t-e;return n?ur(e,n):lr(isNaN(e)?t:e)}var pr=function e(t){var n=dr(t);function r(e,t){var r=n((e=On(e)).r,(t=On(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=hr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function br(e){return function(t){var n,r,a=t.length,o=new Array(a),i=new Array(a),c=new Array(a);for(n=0;n<a;++n)r=On(t[n]),o[n]=r.r||0,i[n]=r.g||0,c[n]=r.b||0;return o=e(o),i=e(i),c=e(c),r.opacity=1,function(e){return r.r=o(e),r.g=i(e),r.b=c(e),r+""}}}var mr=br(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],o=e[r+1],i=r>0?e[r-1]:2*a-o,c=r<t-1?e[r+2]:2*o-a;return sr((n-r/t)*t,i,a,o,c)}}),gr=(br(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),a=e[(r+t-1)%t],o=e[r%t],i=e[(r+1)%t],c=e[(r+2)%t];return sr((n-r/t)*t,a,o,i,c)}}),function(e,t){return t-=e=+e,function(n){return e+t*n}}),vr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yr=new RegExp(vr.source,"g");var wr,_r,kr,Er,Sr=function(e,t){var n,r=typeof t;return null==t||"boolean"===r?lr(t):("number"===r?gr:"string"===r?(n=_n(t))?(t=n,pr):function(e,t){var n,r,a,o=vr.lastIndex=yr.lastIndex=0,i=-1,c=[],s=[];for(e+="",t+="";(n=vr.exec(e))&&(r=yr.exec(t));)(a=r.index)>o&&(a=t.slice(o,a),c[i]?c[i]+=a:c[++i]=a),(n=n[0])===(r=r[0])?c[i]?c[i]+=r:c[++i]=r:(c[++i]=null,s.push({i:i,x:gr(n,r)})),o=yr.lastIndex;return o<t.length&&(a=t.slice(o),c[i]?c[i]+=a:c[++i]=a),c.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)c[(n=s[r]).i]=n.x(e);return c.join("")})}:t instanceof _n?pr:t instanceof Date?function(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}:Array.isArray(t)?function(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;n<a;++n)o[n]=Sr(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<a;++n)i[n]=o[n](e);return i}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var n,r={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Sr(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}}:gr)(e,t)},Or=function(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}},Mr=180/Math.PI,xr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Cr=function(e,t,n,r,a,o){var i,c,s;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(s=e*n+t*r)&&(n-=e*s,r-=t*s),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,s/=c),e*r<t*n&&(e=-e,t=-t,s=-s,i=-i),{translateX:a,translateY:o,rotate:Math.atan2(t,e)*Mr,skewX:Math.atan(s)*Mr,scaleX:i,scaleY:c}};function Dr(e,t,n,r){function a(e){return e.length?e.pop()+" ":""}return function(o,i){var c=[],s=[];return o=e(o),i=e(i),function(e,r,a,o,i,c){if(e!==a||r!==o){var s=i.push("translate(",null,t,null,n);c.push({i:s-4,x:gr(e,a)},{i:s-2,x:gr(r,o)})}else(a||o)&&i.push("translate("+a+t+o+n)}(o.translateX,o.translateY,i.translateX,i.translateY,c,s),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(a(n)+"rotate(",null,r)-2,x:gr(e,t)})):t&&n.push(a(n)+"rotate("+t+r)}(o.rotate,i.rotate,c,s),function(e,t,n,o){e!==t?o.push({i:n.push(a(n)+"skewX(",null,r)-2,x:gr(e,t)}):t&&n.push(a(n)+"skewX("+t+r)}(o.skewX,i.skewX,c,s),function(e,t,n,r,o,i){if(e!==n||t!==r){var c=o.push(a(o)+"scale(",null,",",null,")");i.push({i:c-4,x:gr(e,n)},{i:c-2,x:gr(t,r)})}else 1===n&&1===r||o.push(a(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,i.scaleX,i.scaleY,c,s),o=i=null,function(e){for(var t,n=-1,r=s.length;++n<r;)c[(t=s[n]).i]=t.x(e);return c.join("")}}}Dr(function(e){return"none"===e?xr:(wr||(wr=document.createElement("DIV"),_r=document.documentElement,kr=document.defaultView),wr.style.transform=e,e=kr.getComputedStyle(_r.appendChild(wr),null).getPropertyValue("transform"),_r.removeChild(wr),e=e.slice(7,-1).split(","),Cr(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))},"px, ","px)","deg)"),Dr(function(e){return null==e?xr:(Er||(Er=document.createElementNS("http://www.w3.org/2000/svg","g")),Er.setAttribute("transform",e),(e=Er.transform.baseVal.consolidate())?(e=e.matrix,Cr(e.a,e.b,e.c,e.d,e.e,e.f)):xr)},", ",")",")"),Math.SQRT2;function jr(e){return function(t,n){var r=e((t=Dn(t)).h,(n=Dn(n)).h),a=hr(t.s,n.s),o=hr(t.l,n.l),i=hr(t.opacity,n.opacity);return function(e){return t.h=r(e),t.s=a(e),t.l=o(e),t.opacity=i(e),t+""}}}jr(fr),jr(hr);function Pr(e){return function(t,n){var r=e((t=$n(t)).h,(n=$n(n)).h),a=hr(t.c,n.c),o=hr(t.l,n.l),i=hr(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=a(e),t.l=o(e),t.opacity=i(e),t+""}}}Pr(fr),Pr(hr);function Fr(e){return function t(n){function r(t,r){var a=e((t=ir(t)).h,(r=ir(r)).h),o=hr(t.s,r.s),i=hr(t.l,r.l),c=hr(t.opacity,r.opacity);return function(e){return t.h=a(e),t.s=o(e),t.l=i(Math.pow(e,n)),t.opacity=c(e),t+""}}return n=+n,r.gamma=t,r}(1)}Fr(fr);var Tr=Fr(hr);var Ir=function(e){return mr(e[e.length-1])};Ir(new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(an)),Ir(new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(an)),Ir(new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(an)),Ir(new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(an)),Ir(new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(an)),Ir(new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(an)),Ir(new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(an)),Ir(new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(an)),Ir(new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(an)),Ir(new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(an)),Ir(new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(an)),Ir(new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(an)),Ir(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(an)),Ir(new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(an)),Ir(new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(an)),Ir(new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(an)),Ir(new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(an)),Ir(new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(an)),Ir(new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(an)),Ir(new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(an)),Ir(new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(an)),Ir(new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(an)),Ir(new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(an)),Ir(new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(an)),Ir(new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(an)),Ir(new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(an)),Ir(new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(an)),Tr(ir(300,.5,0),ir(-240,.5,1)),Tr(ir(-100,.75,.35),ir(80,1.5,.8)),Tr(ir(260,.75,.35),ir(80,1.5,.8)),ir(),On(),Math.PI,Math.PI;function Nr(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var Ar=Nr(an("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));Nr(an("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Nr(an("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Nr(an("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Rr(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Br=function(e,t){var n;void 0===t&&(t=Rr);var r,a=[],o=!1;return function(){for(var i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return o&&n===this&&t(c,a)?r:(r=e.apply(this,c),o=!0,n=this,a=c,r)}},Lr=n(39),Ur=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props.height;return Object(m.createElement)("div",{"aria-hidden":"true",className:"woocommerce-chart-placeholder",style:{height:e}},Object(m.createElement)(v.Spinner,null))}}]),t}();Ur.propTypes={height:_.a.number},Ur.defaultProps={height:0};var zr=Ur,Hr=new Date,Vr=new Date;function qr(e,t,n,r){function a(t){return e(t=new Date(+t)),t}return a.floor=a,a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t<n-e?t:n},a.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},a.range=function(n,r,o){var i,c=[];if(n=a.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return c;do{c.push(i=new Date(+n)),t(n,o),e(n)}while(i<n&&n<r);return c},a.filter=function(n){return qr(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(a.count=function(t,r){return Hr.setTime(+t),Vr.setTime(+r),e(Hr),e(Vr),Math.floor(n(Hr,Vr))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(r?function(t){return r(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var Kr=qr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});Kr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?qr(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Kr:null};var Wr=Kr,Yr=(Kr.range,6e4),Gr=6048e5,$r=qr(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),Xr=$r,Zr=($r.range,qr(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+t*Yr)},function(e,t){return(t-e)/Yr},function(e){return e.getMinutes()})),Qr=Zr,Jr=(Zr.range,qr(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*Yr)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()})),ea=Jr,ta=(Jr.range,qr(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yr)/864e5},function(e){return e.getDate()-1})),na=ta;ta.range;function ra(e){return qr(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yr)/Gr})}var aa=ra(0),oa=ra(1),ia=ra(2),ca=ra(3),sa=ra(4),la=ra(5),ua=ra(6),fa=(aa.range,oa.range,ia.range,ca.range,sa.range,la.range,ua.range,qr(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()})),da=fa,ha=(fa.range,qr(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()}));ha.every=function(e){return isFinite(e=Math.floor(e))&&e>0?qr(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var pa=ha,ba=(ha.range,qr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Yr)},function(e,t){return(t-e)/Yr},function(e){return e.getUTCMinutes()})),ma=(ba.range,qr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()})),ga=(ma.range,qr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1})),va=ga;ga.range;function ya(e){return qr(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/Gr})}var wa=ya(0),_a=ya(1),ka=ya(2),Ea=ya(3),Sa=ya(4),Oa=ya(5),Ma=ya(6),xa=(wa.range,_a.range,ka.range,Ea.range,Sa.range,Oa.range,Ma.range,qr(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()})),Ca=(xa.range,qr(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()}));Ca.every=function(e){return isFinite(e=Math.floor(e))&&e>0?qr(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var Da=Ca;Ca.range;function ja(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Pa(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Fa(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}var Ta,Ia,Na,Aa,Ra={"-":"",_:" ",0:"0"},Ba=/^\s*\d+/,La=/^%/,Ua=/[\\^$*+?|[\]().{}]/g;function za(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",o=a.length;return r+(o<n?new Array(n-o+1).join(t)+a:a)}function Ha(e){return e.replace(Ua,"\\$&")}function Va(e){return new RegExp("^(?:"+e.map(Ha).join("|")+")","i")}function qa(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ka(e,t,n){var r=Ba.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Wa(e,t,n){var r=Ba.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ya(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ga(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $a(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Xa(e,t,n){var r=Ba.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Za(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qa(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ja(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function eo(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function to(e,t,n){var r=Ba.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function no(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ro(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ao(e,t,n){var r=Ba.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function oo(e,t,n){var r=Ba.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function io(e,t,n){var r=Ba.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function co(e,t,n){var r=La.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function so(e,t,n){var r=Ba.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function lo(e,t,n){var r=Ba.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function uo(e,t){return za(e.getDate(),t,2)}function fo(e,t){return za(e.getHours(),t,2)}function ho(e,t){return za(e.getHours()%12||12,t,2)}function po(e,t){return za(1+na.count(pa(e),e),t,3)}function bo(e,t){return za(e.getMilliseconds(),t,3)}function mo(e,t){return bo(e,t)+"000"}function go(e,t){return za(e.getMonth()+1,t,2)}function vo(e,t){return za(e.getMinutes(),t,2)}function yo(e,t){return za(e.getSeconds(),t,2)}function wo(e){var t=e.getDay();return 0===t?7:t}function _o(e,t){return za(aa.count(pa(e),e),t,2)}function ko(e,t){var n=e.getDay();return e=n>=4||0===n?sa(e):sa.ceil(e),za(sa.count(pa(e),e)+(4===pa(e).getDay()),t,2)}function Eo(e){return e.getDay()}function So(e,t){return za(oa.count(pa(e),e),t,2)}function Oo(e,t){return za(e.getFullYear()%100,t,2)}function Mo(e,t){return za(e.getFullYear()%1e4,t,4)}function xo(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+za(t/60|0,"0",2)+za(t%60,"0",2)}function Co(e,t){return za(e.getUTCDate(),t,2)}function Do(e,t){return za(e.getUTCHours(),t,2)}function jo(e,t){return za(e.getUTCHours()%12||12,t,2)}function Po(e,t){return za(1+va.count(Da(e),e),t,3)}function Fo(e,t){return za(e.getUTCMilliseconds(),t,3)}function To(e,t){return Fo(e,t)+"000"}function Io(e,t){return za(e.getUTCMonth()+1,t,2)}function No(e,t){return za(e.getUTCMinutes(),t,2)}function Ao(e,t){return za(e.getUTCSeconds(),t,2)}function Ro(e){var t=e.getUTCDay();return 0===t?7:t}function Bo(e,t){return za(wa.count(Da(e),e),t,2)}function Lo(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Sa(e):Sa.ceil(e),za(Sa.count(Da(e),e)+(4===Da(e).getUTCDay()),t,2)}function Uo(e){return e.getUTCDay()}function zo(e,t){return za(_a.count(Da(e),e),t,2)}function Ho(e,t){return za(e.getUTCFullYear()%100,t,2)}function Vo(e,t){return za(e.getUTCFullYear()%1e4,t,4)}function qo(){return"+0000"}function Ko(){return"%"}function Wo(e){return+e}function Yo(e){return Math.floor(+e/1e3)}Ta=function(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,o=e.days,i=e.shortDays,c=e.months,s=e.shortMonths,l=Va(a),u=qa(a),f=Va(o),d=qa(o),h=Va(i),p=qa(i),b=Va(c),m=qa(c),g=Va(s),v=qa(s),y={a:function(e){return i[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return c[e.getMonth()]},c:null,d:uo,e:uo,f:mo,H:fo,I:ho,j:po,L:bo,m:go,M:vo,p:function(e){return a[+(e.getHours()>=12)]},Q:Wo,s:Yo,S:yo,u:wo,U:_o,V:ko,w:Eo,W:So,x:null,X:null,y:Oo,Y:Mo,Z:xo,"%":Ko},w={a:function(e){return i[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return c[e.getUTCMonth()]},c:null,d:Co,e:Co,f:To,H:Do,I:jo,j:Po,L:Fo,m:Io,M:No,p:function(e){return a[+(e.getUTCHours()>=12)]},Q:Wo,s:Yo,S:Ao,u:Ro,U:Bo,V:Lo,w:Uo,W:zo,x:null,X:null,y:Ho,Y:Vo,Z:qo,"%":Ko},_={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=b.exec(t.slice(n));return r?(e.m=m[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:eo,e:eo,f:io,H:no,I:no,j:to,L:oo,m:Ja,M:ro,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},Q:so,s:lo,S:ao,u:Wa,U:Ya,V:Ga,w:Ka,W:$a,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Za,Y:Xa,Z:Qa,"%":co};function k(e,t){return function(n){var r,a,o,i=[],c=-1,s=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++c<l;)37===e.charCodeAt(c)&&(i.push(e.slice(s,c)),null!=(a=Ra[r=e.charAt(++c)])?r=e.charAt(++c):a="e"===r?" ":"0",(o=t[r])&&(r=o(n,a)),i.push(r),s=c+1);return i.push(e.slice(s,c)),i.join("")}}function E(e,t){return function(n){var r,a,o=Fa(1900);if(S(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(a=(r=Pa(Fa(o.y))).getUTCDay(),r=a>4||0===a?_a.ceil(r):_a(r),r=va.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(a=(r=t(Fa(o.y))).getDay(),r=a>4||0===a?oa.ceil(r):oa(r),r=na.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),a="Z"in o?Pa(Fa(o.y)).getUTCDay():t(Fa(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Pa(o)):t(o)}}function S(e,t,n,r){for(var a,o,i=0,c=t.length,s=n.length;i<c;){if(r>=s)return-1;if(37===(a=t.charCodeAt(i++))){if(a=t.charAt(i++),!(o=_[a in Ra?t.charAt(i++):a])||(r=o(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return y.x=k(n,y),y.X=k(r,y),y.c=k(t,y),w.x=k(n,w),w.X=k(r,w),w.c=k(t,w),{format:function(e){var t=k(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",ja);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e,Pa);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Ia=Ta.format,Ta.parse,Na=Ta.utcFormat,Aa=Ta.utcParse;Date.prototype.toISOString||Na("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||Aa("%Y-%m-%dT%H:%M:%S.%LZ");var Go="http://www.w3.org/1999/xhtml",$o={svg:"http://www.w3.org/2000/svg",xhtml:Go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Xo=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),$o.hasOwnProperty(t)?{space:$o[t],local:e}:e};var Zo=function(e){var t=Xo(e);return(t.local?function(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}:function(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Go&&t.documentElement.namespaceURI===Go?t.createElement(e):t.createElementNS(n,e)}})(t)};function Qo(){}var Jo=function(e){return null==e?Qo:function(){return this.querySelector(e)}};function ei(){return[]}var ti=function(e){return new Array(e.length)};function ni(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ni.prototype={constructor:ni,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var ri="$";function ai(e,t,n,r,a,o){for(var i,c=0,s=t.length,l=o.length;c<l;++c)(i=t[c])?(i.__data__=o[c],r[c]=i):n[c]=new ni(e,o[c]);for(;c<s;++c)(i=t[c])&&(a[c]=i)}function oi(e,t,n,r,a,o,i){var c,s,l,u={},f=t.length,d=o.length,h=new Array(f);for(c=0;c<f;++c)(s=t[c])&&(h[c]=l=ri+i.call(s,s.__data__,c,t),l in u?a[c]=s:u[l]=s);for(c=0;c<d;++c)(s=u[l=ri+i.call(e,o[c],c,o)])?(r[c]=s,s.__data__=o[c],u[l]=null):n[c]=new ni(e,o[c]);for(c=0;c<f;++c)(s=t[c])&&u[h[c]]===s&&(a[c]=s)}function ii(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ci(e){return function(){this.removeAttribute(e)}}function si(e){return function(){this.removeAttributeNS(e.space,e.local)}}function li(e,t){return function(){this.setAttribute(e,t)}}function ui(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function fi(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function di(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var hi=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function pi(e){return function(){this.style.removeProperty(e)}}function bi(e,t,n){return function(){this.style.setProperty(e,t,n)}}function mi(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function gi(e,t){return e.style.getPropertyValue(t)||hi(e).getComputedStyle(e,null).getPropertyValue(t)}function vi(e){return function(){delete this[e]}}function yi(e,t){return function(){this[e]=t}}function wi(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function _i(e){return e.trim().split(/^|\s+/)}function ki(e){return e.classList||new Ei(e)}function Ei(e){this._node=e,this._names=_i(e.getAttribute("class")||"")}function Si(e,t){for(var n=ki(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function Oi(e,t){for(var n=ki(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function Mi(e){return function(){Si(this,e)}}function xi(e){return function(){Oi(this,e)}}function Ci(e,t){return function(){(t.apply(this,arguments)?Si:Oi)(this,e)}}Ei.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Di(){this.textContent=""}function ji(e){return function(){this.textContent=e}}function Pi(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Fi(){this.innerHTML=""}function Ti(e){return function(){this.innerHTML=e}}function Ii(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Ni(){this.nextSibling&&this.parentNode.appendChild(this)}function Ai(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ri(){return null}function Bi(){var e=this.parentNode;e&&e.removeChild(this)}function Li(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Ui(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var zi={},Hi=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(zi={mouseenter:"mouseover",mouseleave:"mouseout"}));function Vi(e,t,n){return e=qi(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function qi(e,t,n){return function(r){var a=Hi;Hi=r;try{e.call(this,this.__data__,t,n)}finally{Hi=a}}}function Ki(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Wi(e){return function(){var t=this.__on;if(t){for(var n,r=0,a=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++a]=n:this.removeEventListener(n.type,n.listener,n.capture);++a?t.length=a:delete this.__on}}}function Yi(e,t,n){var r=zi.hasOwnProperty(e.type)?Vi:qi;return function(a,o,i){var c,s=this.__on,l=r(t,o,i);if(s)for(var u=0,f=s.length;u<f;++u)if((c=s[u]).type===e.type&&c.name===e.name)return this.removeEventListener(c.type,c.listener,c.capture),this.addEventListener(c.type,c.listener=l,c.capture=n),void(c.value=t);this.addEventListener(e.type,l,n),c={type:e.type,name:e.name,value:t,listener:l,capture:n},s?s.push(c):this.__on=[c]}}function Gi(e,t,n){var r=hi(e),a=r.CustomEvent;"function"==typeof a?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}var $i=[null];function Xi(e,t){this._groups=e,this._parents=t}function Zi(){return new Xi([[document.documentElement]],$i)}Xi.prototype=Zi.prototype={constructor:Xi,select:function(e){"function"!=typeof e&&(e=Jo(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var o,i,c=t[a],s=c.length,l=r[a]=new Array(s),u=0;u<s;++u)(o=c[u])&&(i=e.call(o,o.__data__,u,c))&&("__data__"in o&&(i.__data__=o.__data__),l[u]=i);return new Xi(r,this._parents)},selectAll:function(e){var t;"function"!=typeof e&&(e=null==(t=e)?ei:function(){return this.querySelectorAll(t)});for(var n=this._groups,r=n.length,a=[],o=[],i=0;i<r;++i)for(var c,s=n[i],l=s.length,u=0;u<l;++u)(c=s[u])&&(a.push(e.call(c,c.__data__,u,s)),o.push(c));return new Xi(a,o)},filter:function(e){var t;"function"!=typeof e&&(t=e,e=function(){return this.matches(t)});for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o)for(var i,c=n[o],s=c.length,l=a[o]=[],u=0;u<s;++u)(i=c[u])&&e.call(i,i.__data__,u,c)&&l.push(i);return new Xi(a,this._parents)},data:function(e,t){if(!e)return p=new Array(this.size()),u=-1,this.each(function(e){p[++u]=e}),p;var n,r=t?oi:ai,a=this._parents,o=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var i=o.length,c=new Array(i),s=new Array(i),l=new Array(i),u=0;u<i;++u){var f=a[u],d=o[u],h=d.length,p=e.call(f,f&&f.__data__,u,a),b=p.length,m=s[u]=new Array(b),g=c[u]=new Array(b);r(f,d,m,g,l[u]=new Array(h),p,t);for(var v,y,w=0,_=0;w<b;++w)if(v=m[w]){for(w>=_&&(_=w+1);!(y=g[_])&&++_<b;);v._next=y||null}}return(c=new Xi(c,a))._enter=s,c._exit=l,c},enter:function(){return new Xi(this._enter||this._groups.map(ti),this._parents)},exit:function(){return new Xi(this._exit||this._groups.map(ti),this._parents)},join:function(e,t,n){var r=this.enter(),a=this,o=this.exit();return r="function"==typeof e?e(r):r.append(e+""),null!=t&&(a=t(a)),null==n?o.remove():n(o),r&&a?r.merge(a).order():a},merge:function(e){for(var t=this._groups,n=e._groups,r=t.length,a=n.length,o=Math.min(r,a),i=new Array(r),c=0;c<o;++c)for(var s,l=t[c],u=n[c],f=l.length,d=i[c]=new Array(f),h=0;h<f;++h)(s=l[h]||u[h])&&(d[h]=s);for(;c<r;++c)i[c]=t[c];return new Xi(i,this._parents)},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,a=e[t],o=a.length-1,i=a[o];--o>=0;)(r=a[o])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=ii);for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o){for(var i,c=n[o],s=c.length,l=a[o]=new Array(s),u=0;u<s;++u)(i=c[u])&&(l[u]=i);l.sort(t)}return new Xi(a,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,o=r.length;a<o;++a){var i=r[a];if(i)return i}return null},size:function(){var e=0;return this.each(function(){++e}),e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a,o=t[n],i=0,c=o.length;i<c;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this},attr:function(e,t){var n=Xo(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?si:ci:"function"==typeof t?n.local?di:fi:n.local?ui:li)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?pi:"function"==typeof t?mi:bi)(e,t,null==n?"":n)):gi(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?vi:"function"==typeof t?wi:yi)(e,t)):this.node()[e]},classed:function(e,t){var n=_i(e+"");if(arguments.length<2){for(var r=ki(this.node()),a=-1,o=n.length;++a<o;)if(!r.contains(n[a]))return!1;return!0}return this.each(("function"==typeof t?Ci:t?Mi:xi)(n,t))},text:function(e){return arguments.length?this.each(null==e?Di:("function"==typeof e?Pi:ji)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Fi:("function"==typeof e?Ii:Ti)(e)):this.node().innerHTML},raise:function(){return this.each(Ni)},lower:function(){return this.each(Ai)},append:function(e){var t="function"==typeof e?e:Zo(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:Zo(e),r=null==t?Ri:"function"==typeof t?t:Jo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Bi)},clone:function(e){return this.select(e?Ui:Li)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,a,o=Ki(e+""),i=o.length;if(!(arguments.length<2)){for(c=t?Yi:Wi,null==n&&(n=!1),r=0;r<i;++r)this.each(c(o[r],t,n));return this}var c=this.node().__on;if(c)for(var s,l=0,u=c.length;l<u;++l)for(r=0,s=c[l];r<i;++r)if((a=o[r]).type===s.type&&a.name===s.name)return s.value},dispatch:function(e,t){return this.each(("function"==typeof t?function(e,t){return function(){return Gi(this,e,t.apply(this,arguments))}}:function(e,t){return function(){return Gi(this,e,t)}})(e,t))}};var Qi=function(e){return"string"==typeof e?new Xi([[document.querySelector(e)]],[document.documentElement]):new Xi([[e]],$i)},Ji=0;function ec(){this._="@"+(++Ji).toString(36)}ec.prototype=function(){return new ec}.prototype={constructor:ec,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var tc=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).chartRef=Object(m.createRef)(),n}return b(t,m["Component"]),s(t,[{key:"componentDidMount",value:function(){this.drawUpdatedChart()}},{key:"shouldComponentUpdate",value:function(e){return this.props.className!==e.className||!Object(y.isEqual)(this.props.data,e.data)||!Object(y.isEqual)(this.props.orderedKeys,e.orderedKeys)||this.props.drawChart!==e.drawChart||this.props.height!==e.height||this.props.chartType!==e.chartType||this.props.width!==e.width}},{key:"componentDidUpdate",value:function(){this.drawUpdatedChart()}},{key:"componentWillUnmount",value:function(){this.deleteChart()}},{key:"delayedScroll",value:function(){var e=this.props.tooltip;return Object(y.throttle)(function(){e&&e.hide()},300)}},{key:"deleteChart",value:function(){Qi(this.chartRef.current).selectAll("svg").remove()}},{key:"drawUpdatedChart",value:function(){(0,this.props.drawChart)(this.getContainer())}},{key:"getContainer",value:function(){var e=this.props,t=e.className,n=e.height,r=e.width;this.deleteChart();var a=Qi(this.chartRef.current).append("svg").attr("viewBox","0 0 ".concat(r," ").concat(n)).attr("height",n).attr("width",r).attr("preserveAspectRatio","xMidYMid meet");return t&&a.attr("class","".concat(t,"__viewbox")),a.append("g")}},{key:"render",value:function(){var e=this.props.className;return Object(m.createElement)("div",{className:x()("d3-base",e),ref:this.chartRef,onScroll:this.delayedScroll()})}}]),t}();tc.propTypes={className:_.a.string,data:_.a.array,orderedKeys:_.a.array,tooltip:_.a.object,chartType:_.a.string};var nc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$t;return"function"==typeof e?e:t(e)},rc=function(e){return o(new Set(e.reduce(function(e,t){return e.concat(Object.keys(t))},[]))).filter(function(e){return"date"!==e})},ac=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},oc=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return ac(t(e),n)}),{left:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r<a;){var o=r+a>>>1;e(t[o],n)<0?r=o+1:a=o}return r},right:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r<a;){var o=r+a>>>1;e(t[o],n)>0?a=o:r=o+1}return r}}};var ic=oc(ac),cc=ic.right,sc=(ic.left,cc);var lc=Array.prototype,uc=(lc.slice,lc.map,function(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(a);++r<a;)o[r]=e+r*n;return o}),fc=Math.sqrt(50),dc=Math.sqrt(10),hc=Math.sqrt(2),pc=function(e,t,n){var r,a,o,i,c=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(a=e,e=t,t=a),0===(i=bc(e,t,n))||!isFinite(i))return[];if(i>0)for(e=Math.ceil(e/i),t=Math.floor(t/i),o=new Array(a=Math.ceil(t-e+1));++c<a;)o[c]=(e+c)*i;else for(e=Math.floor(e*i),t=Math.ceil(t*i),o=new Array(a=Math.ceil(e-t+1));++c<a;)o[c]=(e-c)/i;return r&&o.reverse(),o};function bc(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,a);return a>=0?(o>=fc?10:o>=dc?5:o>=hc?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(o>=fc?10:o>=dc?5:o>=hc?2:1)}function mc(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=fc?a*=10:o>=dc?a*=5:o>=hc&&(a*=2),t<e?-a:a}function gc(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function vc(){}function yc(e,t){var n=new vc;if(e instanceof vc)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var r,a=-1,o=e.length;if(null==t)for(;++a<o;)n.set(a,e[a]);else for(;++a<o;)n.set(t(r=e[a],a,e),r)}else if(e)for(var i in e)n.set(i,e[i]);return n}vc.prototype=yc.prototype={constructor:vc,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var wc=yc;function _c(){}var kc=wc.prototype;function Ec(e,t){var n=new _c;if(e instanceof _c)e.each(function(e){n.add(e)});else if(e){var r=-1,a=e.length;if(null==t)for(;++r<a;)n.add(e[r]);else for(;++r<a;)n.add(t(e[r],r,e))}return n}_c.prototype=Ec.prototype={constructor:_c,has:kc.has,add:function(e){return this["$"+(e+="")]=e,this},remove:kc.remove,clear:kc.clear,values:kc.keys,size:kc.size,empty:kc.empty,each:kc.each};var Sc=Array.prototype,Oc=Sc.map,Mc=Sc.slice,xc={name:"implicit"};function Cc(){var e,t,n=function e(){var t=wc(),n=[],r=[],a=xc;function o(e){var o=e+"",i=t.get(o);if(!i){if(a!==xc)return a;t.set(o,i=n.push(e))}return r[(i-1)%r.length]}return o.domain=function(e){if(!arguments.length)return n.slice();n=[],t=wc();for(var r,a,i=-1,c=e.length;++i<c;)t.has(a=(r=e[i])+"")||t.set(a,n.push(r));return o},o.range=function(e){return arguments.length?(r=Mc.call(e),o):r.slice()},o.unknown=function(e){return arguments.length?(a=e,o):a},o.copy=function(){return e(n,r).unknown(a)},gc.apply(o,arguments),o}().unknown(void 0),r=n.domain,a=n.range,o=[0,1],i=!1,c=0,s=0,l=.5;function u(){var n=r().length,u=o[1]<o[0],f=o[u-0],d=o[1-u];e=(d-f)/Math.max(1,n-c+2*s),i&&(e=Math.floor(e)),f+=(d-f-e*(n-c))*l,t=e*(1-c),i&&(f=Math.round(f),t=Math.round(t));var h=uc(n).map(function(t){return f+e*t});return a(u?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),u()):r()},n.range=function(e){return arguments.length?(o=[+e[0],+e[1]],u()):o.slice()},n.rangeRound=function(e){return o=[+e[0],+e[1]],i=!0,u()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(i=!!e,u()):i},n.padding=function(e){return arguments.length?(c=Math.min(1,s=+e),u()):c},n.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),u()):c},n.paddingOuter=function(e){return arguments.length?(s=+e,u()):s},n.align=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),u()):l},n.copy=function(){return Cc(r(),o).round(i).paddingInner(c).paddingOuter(s).align(l)},gc.apply(u(),arguments)}var Dc=function(e){return function(){return e}},jc=function(e){return+e},Pc=[0,1];function Fc(e){return e}function Tc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Dc(isNaN(t)?NaN:.5)}function Ic(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Nc(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return a<r?(r=Tc(a,r),o=n(i,o)):(r=Tc(r,a),o=n(o,i)),function(e){return o(r(e))}}function Ac(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)a[i]=Tc(e[i],e[i+1]),o[i]=n(t[i],t[i+1]);return function(t){var n=sc(e,t,1,r)-1;return o[n](a[n](t))}}function Rc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bc(){var e,t,n,r,a,o,i=Pc,c=Pc,s=Sr,l=Fc;function u(){return r=Math.min(i.length,c.length)>2?Ac:Nc,a=o=null,f}function f(t){return isNaN(t=+t)?n:(a||(a=r(i.map(e),c,s)))(e(l(t)))}return f.invert=function(n){return l(t((o||(o=r(c,i.map(e),gr)))(n)))},f.domain=function(e){return arguments.length?(i=Oc.call(e,jc),l===Fc||(l=Ic(i)),u()):i.slice()},f.range=function(e){return arguments.length?(c=Mc.call(e),u()):c.slice()},f.rangeRound=function(e){return c=Mc.call(e),s=Or,u()},f.clamp=function(e){return arguments.length?(l=e?Ic(i):Fc,f):l!==Fc},f.interpolate=function(e){return arguments.length?(s=e,u()):s},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,u()}}function Lc(e,t){return Bc()(e,t)}var Uc=function(e,t,n,r){var a,o=mc(e,t,n);switch((r=Kt(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Vt(t)/3)))-Vt(Math.abs(e)))}(o,i))||(r.precision=a),Xt(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vt(t)-Vt(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-Vt(Math.abs(e)))}(o))||(r.precision=a-2*("%"===r.type))}return $t(r)};function zc(e){var t=e.domain;return e.ticks=function(e){var n=t();return pc(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Uc(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a=t(),o=0,i=a.length-1,c=a[o],s=a[i];return s<c&&(r=c,c=s,s=r,r=o,o=i,i=r),(r=bc(c,s,n))>0?r=bc(c=Math.floor(c/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=bc(c=Math.ceil(c*r)/r,s=Math.floor(s*r)/r,n)),r>0?(a[o]=Math.floor(c/r)*r,a[i]=Math.ceil(s/r)*r,t(a)):r<0&&(a[o]=Math.ceil(c*r)/r,a[i]=Math.floor(s*r)/r,t(a)),e},e}var Hc=function(e,t){var n,r=0,a=(e=e.slice()).length-1,o=e[r],i=e[a];return i<o&&(n=r,r=a,a=n,n=o,o=i,i=n),e[r]=t.floor(o),e[a]=t.ceil(i),e};var Vc=1e3,qc=60*Vc,Kc=60*qc,Wc=24*Kc,Yc=7*Wc,Gc=30*Wc,$c=365*Wc;function Xc(e){return new Date(e)}function Zc(e){return e instanceof Date?+e:+new Date(+e)}function Qc(e,t,n,r,a,o,i,c,s){var l=Lc(Fc,Fc),u=l.invert,f=l.domain,d=s(".%L"),h=s(":%S"),p=s("%I:%M"),b=s("%I %p"),m=s("%a %d"),g=s("%b %d"),v=s("%B"),y=s("%Y"),w=[[i,1,Vc],[i,5,5*Vc],[i,15,15*Vc],[i,30,30*Vc],[o,1,qc],[o,5,5*qc],[o,15,15*qc],[o,30,30*qc],[a,1,Kc],[a,3,3*Kc],[a,6,6*Kc],[a,12,12*Kc],[r,1,Wc],[r,2,2*Wc],[n,1,Yc],[t,1,Gc],[t,3,3*Gc],[e,1,$c]];function _(c){return(i(c)<c?d:o(c)<c?h:a(c)<c?p:r(c)<c?b:t(c)<c?n(c)<c?m:g:e(c)<c?v:y)(c)}function k(t,n,r,a){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,i=oc(function(e){return e[2]}).right(w,o);i===w.length?(a=mc(n/$c,r/$c,t),t=e):i?(a=(i=w[o/w[i-1][2]<w[i][2]/o?i-1:i])[1],t=i[0]):(a=Math.max(mc(n,r,t),1),t=c)}return null==a?t:t.every(a)}return l.invert=function(e){return new Date(u(e))},l.domain=function(e){return arguments.length?f(Oc.call(e,Zc)):f().map(Xc)},l.ticks=function(e,t){var n,r=f(),a=r[0],o=r[r.length-1],i=o<a;return i&&(n=a,a=o,o=n),n=(n=k(e,a,o,t))?n.range(a,o+1):[],i?n.reverse():n},l.tickFormat=function(e,t){return null==t?_:s(t)},l.nice=function(e,t){var n=f();return(e=k(e,n[0],n[n.length-1],t))?f(Hc(n,e)):l},l.copy=function(){return Rc(l,Qc(e,t,n,r,a,o,i,c,s))},l}var Jc=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Cc().domain(e.filter(function(e){return e.visible}).map(function(e){return e.key})).rangeRound([0,t.bandwidth()]).padding(n?0:.07)},es=function(e,t){return function(){return gc.apply(Qc(pa,da,aa,na,ea,Qr,Xr,Wr,Ia).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([ht()(e[0],"YYYY-MM-DD HH:mm").toDate(),ht()(e[e.length-1],"YYYY-MM-DD HH:mm").toDate()]).rangeRound([0,t])},ts=function(e){var t=function(e){var t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return e.map(function(e){for(var r=0,a=Object.entries(e);r<a.length;r++){var o=ot(a[r],2),i=o[0],c=o[1];"date"!==i&&Number.isFinite(c.value)&&c.value>t&&(t=c.value),"date"!==i&&Number.isFinite(c.value)&&c.value<n&&(n=c.value)}}),{upper:t,lower:n}}(e),n=t.lower,r=t.upper,a=function(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return 1;if(0===t&&0===e)return 1/3;var n=4/3*Math.max(-e,t),r=3*Math.pow(10,(Math.log(n)*Math.LOG10E+1|0)-2),a=Math.ceil(n/r)*r/3;return t<1&&e>-1?Math.round(4*a)/4:Math.ceil(a)}(n,r),o={lower:0,upper:0,step:a};return(Number.isFinite(n)||n<0)&&(o.lower=Math.floor(n/a)*a,o.lower===n&&0!==n&&(o.lower-=a)),(Number.isFinite(r)||r>0)&&(o.upper=Math.ceil(r/a)*a,o.upper===r&&0!==r&&(o.upper+=a)),o},ns=function(e,t,n){return function e(){var t=Lc(Fc,Fc);return t.copy=function(){return Rc(t,e())},gc.apply(t,arguments),zc(t)}().domain([Math.min(t,0),0===n&&0===t?1:Math.max(n,0)]).rangeRound([e,0])},rs=Array.prototype.slice,as=function(e){return e},os=1,is=2,cs=3,ss=4,ls=1e-6;function us(e){return"translate("+(e+.5)+",0)"}function fs(e){return"translate(0,"+(e+.5)+")"}function ds(){return!this.__axis}function hs(e,t){var n=[],r=null,a=null,o=6,i=6,c=3,s=e===os||e===ss?-1:1,l=e===ss||e===is?"x":"y",u=e===os||e===cs?us:fs;function f(f){var d=null==r?t.ticks?t.ticks.apply(t,n):t.domain():r,h=null==a?t.tickFormat?t.tickFormat.apply(t,n):as:a,p=Math.max(o,0)+c,b=t.range(),m=+b[0]+.5,g=+b[b.length-1]+.5,v=(t.bandwidth?function(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}:function(e){return function(t){return+e(t)}})(t.copy()),y=f.selection?f.selection():f,w=y.selectAll(".domain").data([null]),_=y.selectAll(".tick").data(d,t).order(),k=_.exit(),E=_.enter().append("g").attr("class","tick"),S=_.select("line"),O=_.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(E),S=S.merge(E.append("line").attr("stroke","currentColor").attr(l+"2",s*o)),O=O.merge(E.append("text").attr("fill","currentColor").attr(l,s*p).attr("dy",e===os?"0em":e===cs?"0.71em":"0.32em")),f!==y&&(w=w.transition(f),_=_.transition(f),S=S.transition(f),O=O.transition(f),k=k.transition(f).attr("opacity",ls).attr("transform",function(e){return isFinite(e=v(e))?u(e):this.getAttribute("transform")}),E.attr("opacity",ls).attr("transform",function(e){var t=this.parentNode.__axis;return u(t&&isFinite(t=t(e))?t:v(e))})),k.remove(),w.attr("d",e===ss||e==is?i?"M"+s*i+","+m+"H0.5V"+g+"H"+s*i:"M0.5,"+m+"V"+g:i?"M"+m+","+s*i+"V0.5H"+g+"V"+s*i:"M"+m+",0.5H"+g),_.attr("opacity",1).attr("transform",function(e){return u(v(e))}),S.attr(l+"2",s*o),O.attr(l,s*p).text(h),y.filter(ds).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===is?"start":e===ss?"end":"middle"),y.each(function(){this.__axis=v})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=rs.call(arguments),f},f.tickArguments=function(e){return arguments.length?(n=null==e?[]:rs.call(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=null==e?null:rs.call(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(a=e,f):a},f.tickSize=function(e){return arguments.length?(o=i=+e,f):o},f.tickSizeInner=function(e){return arguments.length?(o=+e,f):o},f.tickSizeOuter=function(e){return arguments.length?(i=+e,f):i},f.tickPadding=function(e){return arguments.length?(c=+e,f):c},f}function ps(e){return hs(cs,e)}function bs(e){return hs(ss,e)}var ms=function(e){for(var t=[],n=1;n<=Math.floor(Math.sqrt(e));n++)e%n==0&&(t.push(n),e/n!==n&&t.push(e/n));return t.sort(function(e,t){return e-t}),t},gs=function(e,t,n,r){var a,o=function(e,t){if(e<783)return 7;if(e>=783&&e<=1130)return 12;if(e>1130&&e<=1365){if("time-comparison"===t)return 16;if("item-comparison"===t)return 12}else if(e>1365){if("time-comparison"===t)return 31;if("item-comparison"===t)return 16}return 16}(t,n);return(e.length>=63&&"day"===r||e.length>=9&&"week"===r)&&(e=(a=e).filter(function(e,t){return 0===t||ht()(e).toDate().getMonth()!==ht()(a[t-1]).toDate().getMonth()})),e.length<=o||"hour"===r&&function(e){var t=ht()(e[0]).toDate(),n=ht()(e[e.length-1]).toDate();return t.getDate()===n.getDate()&&t.getMonth()===n.getMonth()&&t.getFullYear()===n.getFullYear()}(e)&&t>783?e:function(e,t){for(var n=[],r=0;r<e.length;r+=t)n.push(e[r]);return n[0]!==e[0]&&n.unshift(e[0]),n}(e,function(e,t){for(var n=[],r=1;n.length<=3;)n=ms(e.length-r),r+=1;return n.find(function(n){return e.length/n<t})}(e,o))},vs=function(e,t,n,r){var a=ht()(e).toDate(),o=0!==t?n[t-1]:n[t];return o=o instanceof Date?o:ht()(o).toDate(),0===t?r(a):function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new RegExp([" |,"],"g"),r=e.split(n),a=t.split(n),o=new Array,i=e.length>t.length?r:a,c=0;c<i.length;c++)r[c]!==a[c]&&o.push(a[c]);return o}(r(o),r(a)).join(" ")},ys=function(e,t,n){for(var r=[],a=0;a<e;a++){var o=(a+1)/e*t,i=n?Math.round(o):o;r[r.length-1]!==i&&r.push(i)}return r},ws=function(e,t,n){return[0].concat(o(function(e,t){if(e>=0)return[];var n=Math.ceil(-e/t);return ys(n,e,e<-1)}(e,n)),o(function(e,t){if(e<=0)return[];var n=Math.ceil(e/t);return ys(n,e,e>1)}(t,n)))},_s=function(e,t,n,r,a,o){!function(e,t,n,r){var a=n.yScale.range()[0],o=gs(t.uniqueDates,n.xScale.range()[1],t.mode,t.interval);"line"===t.chartType&&(o=o.map(function(e){return ht()(e).toDate()})),e.append("g").attr("class","axis").attr("aria-hidden","true").attr("transform","translate(0, ".concat(a,")")).call(ps(n.xScale).tickValues(o).tickFormat(function(e,n){return"hour"===t.interval?r.xFormat(e instanceof Date?e:ht()(e).toDate()):vs(e,n,o,r.xFormat)})),e.append("g").attr("class","axis axis-month").attr("aria-hidden","true").attr("transform","translate(0, ".concat(a+14,")")).call(ps(n.xScale).tickValues(o).tickFormat(function(e,t){return vs(e,t,o,r.x2Format)})),e.append("g").attr("class","pipes").attr("transform","translate(0, ".concat(a,")")).call(ps(n.xScale).tickValues(o).tickSize(5).tickFormat(""))}(e,t,n,r),function(e,t,n,r,a){var o=ws(t.yScale.domain()[0],t.yScale.domain()[1],t.step),i=t.xScale.range()[1],c=a?i+r.left+r.right/2-15:-r.left/2-15,s=t.yMin>=0||t.yMax>0?" with-positive-ticks":"";e.append("g").attr("class","grid"+s).attr("transform","translate(-".concat(r.left,", 0)")).call(bs(t.yScale).tickValues(o).tickSize(-i-r.left-r.right).tickFormat("")),e.append("g").attr("class","axis y-axis").attr("aria-hidden","true").attr("transform","translate("+c+", 12)").attr("text-anchor","start").call(bs(t.yScale).tickValues(0===t.yMax&&0===t.yMin?[o[0]]:o).tickFormat(function(e){return e>-1&&e<1&&n.yBelow1Format?n.yBelow1Format(e):n.yFormat(e)}))}(e,n,r,a,o),e.selectAll(".domain").remove(),e.selectAll(".axis .tick line").remove()},ks=Math.PI,Es=2*ks,Ss=Es-1e-6;function Os(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ms(){return new Os}Os.prototype=Ms.prototype={constructor:Os,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,a,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},arcTo:function(e,t,n,r,a){e=+e,t=+t,n=+n,r=+r,a=+a;var o=this._x1,i=this._y1,c=n-e,s=r-t,l=o-e,u=i-t,f=l*l+u*u;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>1e-6)if(Math.abs(u*c-s*l)>1e-6&&a){var d=n-o,h=r-i,p=c*c+s*s,b=d*d+h*h,m=Math.sqrt(p),g=Math.sqrt(f),v=a*Math.tan((ks-Math.acos((p+f-b)/(2*m*g)))/2),y=v/g,w=v/m;Math.abs(y-1)>1e-6&&(this._+="L"+(e+y*l)+","+(t+y*u)),this._+="A"+a+","+a+",0,0,"+ +(u*d>l*h)+","+(this._x1=e+w*c)+","+(this._y1=t+w*s)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,a,o){e=+e,t=+t;var i=(n=+n)*Math.cos(r),c=n*Math.sin(r),s=e+i,l=t+c,u=1^o,f=o?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+l:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+s+","+l),n&&(f<0&&(f=f%Es+Es),f>Ss?this._+="A"+n+","+n+",0,1,"+u+","+(e-i)+","+(t-c)+"A"+n+","+n+",0,1,"+u+","+(this._x1=s)+","+(this._y1=l):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=ks)+","+u+","+(this._x1=e+n*Math.cos(a))+","+(this._y1=t+n*Math.sin(a))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var xs=Ms,Cs=function(e){return function(){return e}},Ds=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,1e-12),js=Math.PI,Ps=2*js;function Fs(e){this._context=e}Fs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Ts=function(e){return new Fs(e)};function Is(e){return e[0]}function Ns(e){return e[1]}var As=function(){var e=Is,t=Ns,n=Cs(!0),r=null,a=Ts,o=null;function i(i){var c,s,l,u=i.length,f=!1;for(null==r&&(o=a(l=xs())),c=0;c<=u;++c)!(c<u&&n(s=i[c],c,i))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(s,c,i),+t(s,c,i));if(l)return o=null,l+""||null}return i.x=function(t){return arguments.length?(e="function"==typeof t?t:Cs(+t),i):e},i.y=function(e){return arguments.length?(t="function"==typeof e?e:Cs(+e),i):t},i.defined=function(e){return arguments.length?(n="function"==typeof e?e:Cs(!!e),i):n},i.curve=function(e){return arguments.length?(a=e,null!=r&&(o=a(r)),i):a},i.context=function(e){return arguments.length?(null==e?r=o=null:o=a(r=e),i):r},i};Bs(Ts);function Rs(e){this._curve=e}function Bs(e){function t(t){return new Rs(e(t))}return t._curve=e,t}Rs.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};Array.prototype.slice;Math.sqrt(1/3);var Ls=Math.sin(js/10)/Math.sin(7*js/10),Us=(Math.sin(Ps/10),Math.cos(Ps/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function zs(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Hs(e){this._context=e}Hs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:zs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:zs(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Vs(e){this._context=e}Vs.prototype={areaStart:Us,areaEnd:Us,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:zs(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qs(e){this._context=e}qs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:zs(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ks(e,t){this._basis=new Hs(e),this._beta=t}Ks.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,a=e[0],o=t[0],i=e[n]-a,c=t[n]-o,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(a+r*i),this._beta*t[s]+(1-this._beta)*(o+r*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};(function e(t){function n(e){return 1===t?new Hs(e):new Ks(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function Ws(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Ys(e,t){this._context=e,this._k=(1-t)/6}Ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ws(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ws(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function n(e){return new Ys(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Gs(e,t){this._context=e,this._k=(1-t)/6}Gs.prototype={areaStart:Us,areaEnd:Us,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ws(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function n(e){return new Gs(e,t)}return n.tension=function(t){return e(+t)},n})(0);function $s(e,t){this._context=e,this._k=(1-t)/6}$s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ws(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function n(e){return new $s(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Xs(e,t,n){var r=e._x1,a=e._y1,o=e._x2,i=e._y2;if(e._l01_a>Ds){var c=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,s=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*c-e._x0*e._l12_2a+e._x2*e._l01_2a)/s,a=(a*c-e._y0*e._l12_2a+e._y2*e._l01_2a)/s}if(e._l23_a>Ds){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*l+e._x1*e._l23_2a-t*e._l12_2a)/u,i=(i*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,a,o,i,e._x2,e._y2)}function Zs(e,t){this._context=e,this._alpha=t}Zs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Xs(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function n(e){return t?new Zs(e,t):new Ys(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Qs(e,t){this._context=e,this._alpha=t}Qs.prototype={areaStart:Us,areaEnd:Us,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Xs(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function n(e){return t?new Qs(e,t):new Gs(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Js(e,t){this._context=e,this._alpha=t}Js.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Xs(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};(function e(t){function n(e){return t?new Js(e,t):new $s(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function el(e){this._context=e}el.prototype={areaStart:Us,areaEnd:Us,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function tl(e){return e<0?-1:1}function nl(e,t,n){var r=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(r||a<0&&-0),i=(n-e._y1)/(a||r<0&&-0),c=(o*a+i*r)/(r+a);return(tl(o)+tl(i))*Math.min(Math.abs(o),Math.abs(i),.5*Math.abs(c))||0}function rl(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function al(e,t,n){var r=e._x0,a=e._y0,o=e._x1,i=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,a+c*t,o-c,i-c*n,o,i)}function ol(e){this._context=e}function il(e){this._context=new cl(e)}function cl(e){this._context=e}function sl(e){this._context=e}function ll(e){var t,n,r=e.length-1,a=new Array(r),o=new Array(r),i=new Array(r);for(a[0]=0,o[0]=2,i[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,i[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,i[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/o[t-1],o[t]-=n,i[t]-=n*i[t-1];for(a[r-1]=i[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(i[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:al(this,this._t0,rl(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,al(this,rl(this,n=nl(this,e,t)),n);break;default:al(this,this._t0,n=nl(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(il.prototype=Object.create(ol.prototype)).point=function(e,t){ol.prototype.point.call(this,t,e)},cl.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,o){this._context.bezierCurveTo(t,e,r,n,o,a)}},sl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=ll(e),a=ll(t),o=0,i=1;i<n;++o,++i)this._context.bezierCurveTo(r[0][o],a[0][o],r[1][o],a[1][o],e[i],t[i]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ul(e,t){this._context=e,this._t=t}ul.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var fl=function(e,t,n,r,o,i){var c,s,l=r.yScale.range()[0],u=r.xScale.range()[1],f=(c=r.xScale,s=r.yScale,As().x(function(e){return c(ht()(e.date).toDate())}).y(function(e){return s(e.value)})),d=function(e,t){return t.map(function(t){return{key:t.key,focus:t.focus,visible:t.visible,label:t.label,values:e.map(function(e){return{date:e.date,focus:t.focus,value:Object(y.get)(e,[t.key,"value"],0),visible:t.visible}})}})}(t,n.visibleKeys),h=e.append("g").attr("class","lines").selectAll(".line-g").data(d.filter(function(e){return e.visible}).reverse()).enter().append("g").attr("class","line-g").attr("role","region").attr("aria-label",function(e){return e.label||e.key}),p=function(e,t,n,r,a){var o=n.slice().reverse();return t.map(function(n,i){var c=Object(y.first)(e.filter(function(e){return e.date===n})),s=a(ht()(n).toDate()),l=a(i>=1?ht()(t[i-1]).toDate():ht()(t[0]).toDate()),u=i<t.length-1?a(ht()(t[i+1]).toDate()):a(ht()(t[t.length-1]).toDate()),f=0===i?u-s:s-l,d=0===i?0:s-f/2;return f=0===i||i===t.length-1?f/2:f,{date:n,start:t.length>1?d:0,width:t.length>1?f:r,values:o.map(function(e){var t=e.key,r=c[t];return r?{key:t,value:r.value,date:n}:null}).filter(Boolean)}})}(t,n.uniqueDates,n.visibleKeys,u,r.xScale),b=u<=1365||n.uniqueDates.length>50?2:3;b=u<=783?1.25:b;var m=u<=1365?4:6;n.uniqueDates.length>1&&h.append("path").attr("fill","none").attr("stroke-width",b).attr("stroke-linejoin","round").attr("stroke-linecap","round").attr("stroke",function(e){return n.getColor(e.key)}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("d",function(e){return f(e.values)});u/n.uniqueDates.length>36&&h.selectAll("circle").data(function(e,t){return e.values.map(function(n){return a({},n,{i:t,visible:e.visible,key:e.key})})}).enter().append("circle").attr("r",m).attr("fill",function(e){return n.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",b+1).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("cx",function(e){return r.xScale(ht()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}).attr("tabindex","0").attr("aria-label",function(e){var t=o.screenReaderFormat(e.date instanceof Date?e.date:ht()(e.date).toDate());return"".concat(t," ").concat(i.valueFormat(e.value))}).on("focus",function(e,n,r){i.show(t.find(function(t){return t.date===e.date}),r[n].parentNode,Hi.target)}).on("blur",function(){return i.hide()});var g=e.append("g").attr("class","focusspaces").selectAll(".focus").data(p).enter().append("g").attr("class","focus"),v=g.append("g").attr("class","focus-grid").attr("opacity","0");v.append("line").attr("x1",function(e){return r.xScale(ht()(e.date).toDate())}).attr("y1",0).attr("x2",function(e){return r.xScale(ht()(e.date).toDate())}).attr("y2",l),v.selectAll("circle").data(function(e){return e.values}).enter().append("circle").attr("r",m+2).attr("fill",function(e){return n.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",b+2).attr("cx",function(e){return r.xScale(ht()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}),g.append("rect").attr("class","focus-g").attr("x",function(e){return e.start}).attr("y",0).attr("width",function(e){return e.width}).attr("height",l).attr("opacity",0).on("mouseover",function(e,r,a){var o=(0===r||r===p.length-1)&&n.uniqueDates.length>1?0:.5;i.show(t.find(function(t){return t.date===e.date}),Hi.target,a[r].parentNode,o)}).on("mouseout",function(){return i.hide()})},dl=5,hl=[[],[.5],[.333,.667],[.2,.5,.8],[.12,.375,.625,.88],[0,.25,.5,.75,1]],pl=function(e,t){return function(n){var r=e.length>dl?dl:e.length,a=Object(y.findIndex)(e,function(e){return e.key===n}),o=a<=dl-1?hl[r][a]:0;return t(o)}},bl=function(){function e(){i(this,e),this.ref=null,this.chart=null,this.position="",this.title="",this.labelFormat="",this.valueFormat="",this.visibleKeys="",this.getColor=null,this.margin=24}return s(e,[{key:"calculateXPosition",value:function(e,t,n){var r=this.ref.getBoundingClientRect(),a=this.ref.parentNode.querySelector(".d3-base").getBoundingClientRect(),o=Math.max(a.left,t.left);if("below"===this.position)return Math.max(this.margin,Math.min(e.left+.5*e.width-r.width/2-o,a.width-r.width-this.margin));var i=e.left+e.width*n+this.margin-o;return i+r.width+this.margin>a.width?Math.max(this.margin,e.left+e.width*(1-n)-r.width-this.margin-o):i}},{key:"calculateYPosition",value:function(e,t){if("below"===this.position)return t.height;var n=this.ref.getBoundingClientRect(),r=e.top+this.margin-t.top;return r+n.height+this.margin>t.height?Math.max(0,e.top-n.height-this.margin-t.top):r}},{key:"calculatePosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getBoundingClientRect(),r=this.chart.getBoundingClientRect();return"below"===this.position&&(t=0),{x:this.calculateXPosition(n,r,t),y:this.calculateYPosition(n,r)}}},{key:"hide",value:function(){Qi(this.chart).selectAll(".barfocus, .focus-grid").attr("opacity","0"),Qi(this.ref).style("visibility","hidden")}},{key:"getTooltipRowLabel",value:function(e,t){return e[t.key].labelDate?this.labelFormat(ht()(e[t.key].labelDate).toDate()):t.label||t.key}},{key:"show",value:function(e,t,n){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.visibleKeys.length){Qi(n).select(".focus-grid, .barfocus").attr("opacity","1");var o=this.calculatePosition(t,a),i=this.visibleKeys.map(function(t){return'\n\t\t\t\t\t<li class="key-row">\n\t\t\t\t\t\t<div class="key-container">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass="key-color"\n\t\t\t\t\t\t\t\tstyle="background-color: '.concat(r.getColor(t.key),'">\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class="key-key">').concat(r.getTooltipRowLabel(e,t),'</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class="key-value">').concat(r.valueFormat(e[t.key].value),"</span>\n\t\t\t\t\t</li>\n\t\t\t\t")}),c=this.title?this.title:this.labelFormat(ht()(e.date).toDate());Qi(this.ref).style("left",o.x+"px").style("top",o.y+"px").style("visibility","visible").html("\n\t\t\t\t<div>\n\t\t\t\t\t<h4>".concat(c,"</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t").concat(i.join(""),"\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t"))}}}]),e}(),ml=function(){return"rtl"===document.documentElement.dir},gl=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).drawChart=n.drawChart.bind(f(n)),n.getParams=n.getParams.bind(f(n)),n.tooltipRef=Object(m.createRef)(),n}return b(t,m["Component"]),s(t,[{key:"getFormatParams",value:function(){var e=this.props,t=e.screenReaderFormat,n=e.xFormat,r=e.x2Format,a=e.yFormat,o=e.yBelow1Format;return{screenReaderFormat:nc(t,Ia),xFormat:nc(n,Ia),x2Format:nc(r,Ia),yBelow1Format:nc(o),yFormat:nc(a)}}},{key:"getScaleParams",value:function(e){var t=this.props,n=t.data,r=t.height,a=t.orderedKeys,o=t.chartType,i=this.getMargin(),c=r-i.top-i.bottom,s=this.getWidth()-i.left-i.right,l=ts(n),u=l.upper,f=l.lower,d=l.step,h=ns(c,f,u);if("line"===o)return{step:d,xScale:es(e,s),yMax:u,yMin:f,yScale:h};var p=this.shouldBeCompact(),b=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Cc().domain(e).range([0,t]).paddingInner(n?0:.1)}(e,s,p);return{step:d,xGroupScale:Jc(a,b,p),xScale:b,yMax:u,yMin:f,yScale:h}}},{key:"getParams",value:function(e){var t=this.props,n=t.chartType,r=t.colorScheme,a=t.data,o=t.interval,i=t.mode,c=t.orderedKeys||function(e){return rc(e).map(function(t){return{key:t,focus:!0,total:e.reduce(function(e,n){return e+n[t].value},0),visible:!0}}).sort(function(e,t){return t.total-e.total})}(a),s=c.filter(function(e){return e.visible}),l=c.length>dl?s:c;return{getColor:pl(l,r),interval:o,mode:i,chartType:n,uniqueDates:e,visibleKeys:s}}},{key:"createTooltip",value:function(e,t,n){var r=this.props,a=r.tooltipLabelFormat,o=r.tooltipPosition,i=r.tooltipTitle,c=r.tooltipValueFormat,s=new bl;s.ref=this.tooltipRef.current,s.chart=e,s.position=o,s.title=i,s.labelFormat=nc(a,Ia),s.valueFormat=nc(c),s.visibleKeys=n,s.getColor=t,this.tooltip=s}},{key:"drawChart",value:function(e){var t=this.props,n=t.data,r=t.dateParser,a=t.chartType,i=this.getMargin(),c=function(e,t){var n=Aa(t);return o(new Set(e.map(function(e){return e.date}))).sort(function(e,t){return n(e)-n(t)})}(n,r),s=this.getFormatParams(),l=this.getParams(c),u=this.getScaleParams(c),f=e.attr("id","chart").append("g").attr("transform","translate(".concat(i.left,", ").concat(i.top,")"));this.createTooltip(f.node(),l.getColor,l.visibleKeys),_s(f,l,u,s,i,ml()),"line"===a&&fl(f,n,l,u,s,this.tooltip),"bar"===a&&function(e,t,n,r,a,o){var i=r.yScale.range()[0],c=e.append("g").attr("class","bars").selectAll("g").data(t).enter().append("g").attr("transform",function(e){return"translate(".concat(r.xScale(e.date),", 0)")}).attr("class","bargroup").attr("role","region").attr("aria-label",function(e){return"item-comparison"===n.mode?a.screenReaderFormat(e.date instanceof Date?e.date:ht()(e.date).toDate()):null});c.append("rect").attr("class","barfocus").attr("x",0).attr("y",0).attr("width",r.xGroupScale.range()[1]).attr("height",i).attr("opacity","0").on("mouseover",function(e,n,r){o.show(t.find(function(t){return t.date===e.date}),Hi.target,r[n].parentNode)}).on("mouseout",function(){return o.hide()});var s=r.yScale(0);c.selectAll(".bar").data(function(e){return n.visibleKeys.map(function(t){return{key:t.key,focus:t.focus,value:Object(y.get)(e,[t.key,"value"],0),label:t.label,visible:t.visible,date:e.date}})}).enter().append("rect").attr("class","bar").attr("x",function(e){return r.xGroupScale(e.key)}).attr("y",function(e){return Math.min(s,r.yScale(e.value))}).attr("width",r.xGroupScale.bandwidth()).attr("height",function(e){return Math.abs(s-r.yScale(e.value))}).attr("fill",function(e){return n.getColor(e.key)}).attr("pointer-events","none").attr("tabindex","0").attr("aria-label",function(e){var r=e.label||e.key;if("time-comparison"===n.mode){var i=t.find(function(t){return t.date===e.date});r=a.screenReaderFormat(ht()(i[e.key].labelDate).toDate())}return"".concat(r," ").concat(o.valueFormat(e.value))}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).on("focus",function(e,n,r){var a=e.value>0?Hi.target:Hi.target.parentNode;o.show(t.find(function(t){return t.date===e.date}),a,r[n].parentNode)}).on("blur",function(){return o.hide()})}(f,n,l,u,s,this.tooltip)}},{key:"shouldBeCompact",value:function(){var e=this.props,t=e.data,n=e.chartType,r=e.width,a=this.getMargin();if("bar"!==n)return!1;var o=r-a.left-a.right,i=t&&t.length?Object.keys(t[0]).length-1:0;return o<t.length*(i+1)}},{key:"getMargin",value:function(){var e=this.props.margin;return ml()?{bottom:e.bottom,left:e.right,right:e.left,top:e.top}:e}},{key:"getWidth",value:function(){var e=this.props,t=e.data,n=e.chartType,r=e.width,a=this.getMargin();if("bar"!==n)return r;var o=t&&t.length?Object.keys(t[0]).length-1:0,i=this.shouldBeCompact()?t.length*o:t.length*(o+1);return Math.max(r,i+a.left+a.right)}},{key:"getEmptyMessage",value:function(){var e=this.props,t=e.baseValue,n=e.data,r=e.emptyMessage;if(r&&function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<e.length;n++)for(var r=0,a=Object.entries(e[n]);r<a.length;r++){var o=ot(a[r],2),i=o[0],c=o[1];if("date"!==i&&!Object(y.isNil)(c.value)&&c.value!==t)return!1}return!0}(n,t))return Object(m.createElement)("div",{className:"d3-chart__empty-message"},r)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.data,r=e.height,a=e.orderedKeys,o=e.chartType,i=this.getWidth();return Object(m.createElement)("div",{className:x()("d3-chart__container",t),style:{height:r}},this.getEmptyMessage(),Object(m.createElement)("div",{className:"d3-chart__tooltip",ref:this.tooltipRef}),Object(m.createElement)(tc,{className:x()(t),data:n,drawChart:this.drawChart,height:r,orderedKeys:a,tooltip:this.tooltip,chartType:o,width:i}))}}]),t}();gl.propTypes={baseValue:_.a.number,className:_.a.string,colorScheme:_.a.func,data:_.a.array.isRequired,dateParser:_.a.string.isRequired,emptyMessage:_.a.string,height:_.a.number,interval:_.a.oneOf(["hour","day","week","month","quarter","year"]),margin:_.a.shape({bottom:_.a.number,left:_.a.number,right:_.a.number,top:_.a.number}),mode:_.a.oneOf(["item-comparison","time-comparison"]),screenReaderFormat:_.a.oneOfType([_.a.string,_.a.func]),orderedKeys:_.a.array,tooltipLabelFormat:_.a.oneOfType([_.a.string,_.a.func]),tooltipValueFormat:_.a.oneOfType([_.a.string,_.a.func]),tooltipPosition:_.a.oneOf(["below","over"]),tooltipTitle:_.a.string,chartType:_.a.oneOf(["bar","line"]),width:_.a.number,xFormat:_.a.oneOfType([_.a.string,_.a.func]),x2Format:_.a.oneOfType([_.a.string,_.a.func]),yBelow1Format:_.a.oneOfType([_.a.string,_.a.func]),yFormat:_.a.oneOfType([_.a.string,_.a.func])},gl.defaultProps={baseValue:0,data:[],dateParser:"%Y-%m-%dT%H:%M:%S",height:200,margin:{bottom:30,left:40,right:0,top:20},mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",tooltipPosition:"over",tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",chartType:"line",width:600,xFormat:"%Y-%m-%d",x2Format:"",yBelow1Format:".3~f",yFormat:".3~s"};var vl=gl,yl=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).call(this))).listRef=Object(m.createRef)(),e.state={isScrollable:!1},e}return b(t,m["Component"]),s(t,[{key:"componentDidMount",value:function(){this.updateListScroll(),window.addEventListener("resize",this.updateListScroll)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateListScroll)}},{key:"updateListScroll",value:function(){if(this&&this.listRef){var e=this.listRef.current,t=e.scrollHeight-e.scrollTop<=e.offsetHeight;this.setState({isScrollable:!t})}}},{key:"render",value:function(){var e=this.props,t=e.colorScheme,n=e.data,r=e.handleLegendHover,a=e.handleLegendToggle,o=e.interactive,i=e.legendDirection,c=e.legendValueFormat,s=e.instanceId,l=e.totalLabel,u=this.state.isScrollable,f=n.filter(function(e){return e.visible}),d=f.length,h="column"===i&&n.length>dl&&l,p=n.length>dl?f:n;return Object(m.createElement)("div",{className:x()("woocommerce-legend","woocommerce-legend__direction-".concat(i),{"has-total":h,"is-scrollable":u},this.props.className)},Object(m.createElement)("ul",{className:"woocommerce-legend__list",ref:this.listRef,onScroll:h?this.updateListScroll:null},n.map(function(e){return Object(m.createElement)("li",{className:x()("woocommerce-legend__item",{"woocommerce-legend__item-checked":e.visible}),key:e.key,id:"woocommerce-legend-".concat(s,"__item__").concat(e.key),onMouseEnter:r,onMouseLeave:r,onBlur:r,onFocus:r},Object(m.createElement)("button",{onClick:a,id:"woocommerce-legend-".concat(s,"__item-button__").concat(e.key),disabled:e.visible&&d<=1||!e.visible&&d>=dl||!o,title:d>=dl?Object(g.sprintf)(Object(g.__)("You may select up to %d items.","woocommerce-admin"),dl):""},Object(m.createElement)("div",{className:"woocommerce-legend__item-container"},Object(m.createElement)("span",{className:x()("woocommerce-legend__item-checkmark",{"woocommerce-legend__item-checkmark-checked":e.visible}),style:e.visible?{color:pl(p,t)(e.key)}:null}),Object(m.createElement)("span",{className:"woocommerce-legend__item-title"},e.label),Object(m.createElement)("span",{className:"woocommerce-legend__item-total"},nc(c)(e.total)))))})),h&&Object(m.createElement)("div",{className:"woocommerce-legend__total"},l))}}]),t}();yl.propTypes={className:_.a.string,colorScheme:_.a.func,data:_.a.array.isRequired,handleLegendToggle:_.a.func,handleLegendHover:_.a.func,interactive:_.a.bool,legendDirection:_.a.oneOf(["row","column"]),legendValueFormat:_.a.oneOfType([_.a.string,_.a.func]),totalLabel:_.a.string,instanceId:_.a.number},yl.defaultProps={interactive:!0,legendDirection:"row",legendValueFormat:","};var wl=Object(Oe.withInstanceId)(yl);var _l=Object(y.get)(wcSettings,["currency","symbol"],""),kl=Object(y.get)(wcSettings,["currency","position"],"left");rn({decimal:Object(y.get)(wcSettings,["currency","decimal_separator"],"."),thousands:Object(y.get)(wcSettings,["currency","thousand_separator"],","),grouping:[3],currency:function(e,t){switch(t){case"left_space":return[e+" ",""];case"right":return["",e];case"right_space":return[""," "+e];case"left":default:return[e,""]}}(_l,kl)});var El=function(e){function t(e){var n;i(this,t),(n=d(this,h(t).call(this,e))).chartBodyRef=Object(m.createRef)();var r=n.getDataKeys();return n.state={focusedKeys:[],visibleKeys:r.slice(0,dl),width:0},n.prevDataKeys=r.sort(),n.handleTypeToggle=n.handleTypeToggle.bind(f(n)),n.handleLegendToggle=n.handleLegendToggle.bind(f(n)),n.handleLegendHover=n.handleLegendHover.bind(f(n)),n.updateDimensions=n.updateDimensions.bind(f(n)),n.getVisibleData=Br(n.getVisibleData),n.getOrderedKeys=Br(n.getOrderedKeys),n.setInterval=n.setInterval.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"getDataKeys",value:function(){var e=this.props,t=e.data,n=e.filterParam,r=e.mode,a=e.query;if("item-comparison"===r){var o=n?ce(a[n]):[];return this.getOrderedKeys([],[],o).map(function(e){return e.key})}return rc(t)}},{key:"componentDidUpdate",value:function(){var e=this.props.data;if(e&&e.length){var t=rc(e).sort();if(!Object(y.isEqual)(t,this.prevDataKeys)){var n=this.getDataKeys();this.prevDataKeys=t,this.setState({visibleKeys:n.slice(0,dl)})}}}},{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"getOrderedKeys",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.props,a=r.data,o=r.legendTotals,i=r.mode;if(!a||0===a.length)return[];var c=a.reduce(function(e,t){return Object.entries(t).forEach(function(t){var n=ot(t,2),r=n[0],a=n[1];"date"===r||e[r]||(e[r]=a.label)}),e},{}),s=Object.entries(c).map(function(n){var r=ot(n,2),i=r[0],c=r[1];return{focus:0===e.length||e.includes(i),key:i,label:c,total:o&&void 0!==o[i]?o[i]:a.reduce(function(e,t){return e+t[i].value},0),visible:t.includes(i)}});return"item-comparison"===i?s.sort(function(e,t){return t.total-e.total}).filter(function(e){return e.total>0||n.includes(parseInt(e.key,10))}):s}},{key:"handleTypeToggle",value:function(e){if(this.props.chartType!==e){var t=this.props;ue({chartType:e},t.path,t.query)}}},{key:"handleLegendToggle",value:function(e){if(this.props.interactiveLegend){var t=e.currentTarget.id.split("_").pop(),n=this.state,r=n.focusedKeys,a=n.visibleKeys;a.includes(t)?this.setState({focusedKeys:Object(y.without)(r,t),visibleKeys:Object(y.without)(a,t)}):this.setState({focusedKeys:r.concat([t]),visibleKeys:a.concat([t])})}}},{key:"handleLegendHover",value:function(e){if("mouseleave"===e.type||"blur"===e.type)this.setState({focusedKeys:[]});else if("mouseenter"===e.type||"focus"===e.type){var t=e.currentTarget.id.split("__").pop();this.setState({focusedKeys:[t]})}}},{key:"updateDimensions",value:function(){this.setState({width:this.chartBodyRef.current.offsetWidth})}},{key:"getVisibleData",value:function(e,t){var n=t.filter(function(e){return e.visible});return e.map(function(e){var t={date:e.date};return n.forEach(function(n){t[n.key]=e[n.key]}),t})}},{key:"setInterval",value:function(e){var t=this.props;ue({interval:e},t.path,t.query)}},{key:"renderIntervalSelector",value:function(){var e=this.props,t=e.interval,n=e.allowedIntervals;if(!n||n.length<1)return null;var r={hour:Object(g.__)("By hour","woocommerce-admin"),day:Object(g.__)("By day","woocommerce-admin"),week:Object(g.__)("By week","woocommerce-admin"),month:Object(g.__)("By month","woocommerce-admin"),quarter:Object(g.__)("By quarter","woocommerce-admin"),year:Object(g.__)("By year","woocommerce-admin")};return Object(m.createElement)(v.SelectControl,{className:"woocommerce-chart__interval-select",value:t,options:n.map(function(e){return{value:e,label:r[e]}}),onChange:this.setInterval})}},{key:"getChartHeight",value:function(){var e=this.props,t=e.isViewportLarge;return e.isViewportMobile?180:t?300:220}},{key:"getLegendPosition",value:function(){var e=this.props,t=e.legendPosition,n=e.mode,r=e.isViewportWide;return t||(r&&"time-comparison"===n?"top":r&&"item-comparison"===n?"side":"bottom")}},{key:"render",value:function(){var e=this.state,t=e.focusedKeys,n=e.visibleKeys,r=e.width,a=this.props,o=a.baseValue,i=a.chartType,c=a.data,s=a.dateParser,l=a.emptyMessage,u=a.filterParam,f=a.interactiveLegend,d=a.interval,h=a.isRequesting,p=a.isViewportLarge,b=a.itemsLabel,w=a.mode,_=a.query,k=a.screenReaderFormat,S=a.showHeaderControls,O=a.title,M=a.tooltipLabelFormat,C=a.tooltipValueFormat,D=a.tooltipTitle,j=a.valueType,P=a.xFormat,F=a.x2Format,T=a.yBelow1Format,I=a.yFormat,N=u?ce(_[u]):[],A=this.getOrderedKeys(t,n,N),R=h?null:this.getVisibleData(c,A),B=this.getLegendPosition(),L="top"===B?"row":"column",U="side"===B?"row":"column",z=this.getChartHeight(),H=h?null:Object(m.createElement)(wl,{colorScheme:Ar,data:A,handleLegendHover:this.handleLegendHover,handleLegendToggle:this.handleLegendToggle,interactive:f,legendDirection:L,legendValueFormat:C,totalLabel:Object(g.sprintf)(b,A.length)}),V=I,q=T;if(!I)switch(j){case"average":V=",.0f";break;case"currency":V="$.3~s",q="$.3~f";break;case"number":V=",.0f"}return Object(m.createElement)("div",{className:"woocommerce-chart"},S&&Object(m.createElement)("div",{className:"woocommerce-chart__header"},Object(m.createElement)(be,{className:"woocommerce-chart__title"},O),"top"===B&&H,this.renderIntervalSelector(),Object(m.createElement)(v.NavigableMenu,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(m.createElement)(v.IconButton,{className:x()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"line"===i}),icon:Object(m.createElement)(E.a,{icon:"line-graph"}),title:Object(g.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===i,role:"menuitemradio",tabIndex:"line"===i?0:-1,onClick:Object(y.partial)(this.handleTypeToggle,"line")}),Object(m.createElement)(v.IconButton,{className:x()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===i}),icon:Object(m.createElement)(E.a,{icon:"stats-alt"}),title:Object(g.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===i,role:"menuitemradio",tabIndex:"bar"===i?0:-1,onClick:Object(y.partial)(this.handleTypeToggle,"bar")}))),Object(m.createElement)(me,{component:!1},Object(m.createElement)("div",{className:x()("woocommerce-chart__body","woocommerce-chart__body-".concat(U)),ref:this.chartBodyRef},"side"===B&&H,h&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)("span",{className:"screen-reader-text"},Object(g.__)("Your requested data is loading","woocommerce-admin")),Object(m.createElement)(zr,{height:z})),!h&&r>0&&Object(m.createElement)(vl,{baseValue:o,chartType:i,colorScheme:Ar,data:R,dateParser:s,height:z,emptyMessage:l,interval:d,margin:{bottom:50,left:80,right:30,top:0},mode:w,orderedKeys:A,screenReaderFormat:k,tooltipLabelFormat:M,tooltipValueFormat:C,tooltipPosition:p?"over":"below",tooltipTitle:D,valueType:j,width:"row"===U?r-320:r,xFormat:P,x2Format:F,yBelow1Format:q,yFormat:V})),"bottom"===B&&Object(m.createElement)("div",{className:"woocommerce-chart__footer"},H)))}}]),t}();El.propTypes={allowedIntervals:_.a.array,baseValue:_.a.number,chartType:_.a.oneOf(["bar","line"]),data:_.a.array.isRequired,dateParser:_.a.string.isRequired,emptyMessage:_.a.string,filterParam:_.a.string,itemsLabel:_.a.string,mode:_.a.oneOf(["item-comparison","time-comparison"]),path:_.a.string,query:_.a.object,interactiveLegend:_.a.bool,interval:_.a.oneOf(["hour","day","week","month","quarter","year"]),intervalData:_.a.object,isRequesting:_.a.bool,legendPosition:_.a.oneOf(["bottom","side","top"]),legendTotals:_.a.object,screenReaderFormat:_.a.oneOfType([_.a.string,_.a.func]),showHeaderControls:_.a.bool,title:_.a.string,tooltipLabelFormat:_.a.oneOfType([_.a.string,_.a.func]),tooltipValueFormat:_.a.oneOfType([_.a.string,_.a.func]),tooltipTitle:_.a.string,valueType:_.a.string,xFormat:_.a.string,x2Format:_.a.string,yBelow1Format:_.a.string,yFormat:_.a.string},El.defaultProps={baseValue:0,chartType:"line",data:[],dateParser:"%Y-%m-%dT%H:%M:%S",interactiveLegend:!0,interval:"day",isRequesting:!1,mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",showHeaderControls:!0,tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",xFormat:"%d",x2Format:"%b %Y"};Object(Lr.withViewportMatch)({isViewportMobile:"< medium",isViewportLarge:">= large",isViewportWide:">= wide"})(El);var Sl=function(e){var t=e.count,n=e.label;return n||(n=Object(g.sprintf)(Object(g.__)("Total %d","woocommerce-admin"),t)),Object(m.createElement)("span",{className:"woocommerce-count","aria-label":n},t)};Sl.propTypes={count:_.a.number.isRequired,label:_.a.string},Sl.defaultProps={label:""};var Ol=function(e){var t=e.className,n=e.count,r=e.children,a=e.helpText,o=e.onClick;return n<2?Object(m.createElement)(v.Tooltip,{text:a},Object(m.createElement)("span",{className:t},Object(m.createElement)(v.Button,{className:"woocommerce-compare-button",isDefault:!0,disabled:!0},r))):Object(m.createElement)(v.Button,{className:x()("woocommerce-compare-button",t),isDefault:!0,onClick:o},r)};Ol.propTypes={className:_.a.string,count:_.a.number.isRequired,children:_.a.node.isRequired,helpText:_.a.string.isRequired,onClick:_.a.func.isRequired};var Ml=Ol,xl=function(e){function t(e){var n,r=e.getLabels,a=e.param,o=e.query;return i(this,t),(n=d(this,h(t).apply(this,arguments))).state={selected:[]},n.clearQuery=n.clearQuery.bind(f(n)),n.updateQuery=n.updateQuery.bind(f(n)),n.updateLabels=n.updateLabels.bind(f(n)),o[a]&&r(o[a],o).then(n.updateLabels),n}return b(t,m["Component"]),s(t,[{key:"componentDidUpdate",value:function(e,t){var n=e.param,r=e.query,a=t.selected,o=this.props,i=o.getLabels,c=o.param,s=o.query,l=this.state.selected;if(n!==c||a.length>0&&0===l.length)this.clearQuery();else{var u=ce(r[c]),f=ce(s[c]);Object(y.isEqual)(u.sort(),f.sort())||i(s[c],s).then(this.updateLabels)}}},{key:"clearQuery",value:function(){var e=this.props,t=e.param,n=e.path,a=e.query;this.setState({selected:[]}),ue(r({},t,void 0),n,a)}},{key:"updateLabels",value:function(e){this.setState({selected:e})}},{key:"updateQuery",value:function(){var e=this.props,t=e.param,n=e.path,a=e.query;ue(r({},t,this.state.selected.map(function(e){return e.id}).join(",")),n,a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.labels,r=t.type,a=this.state.selected;return Object(m.createElement)(ye,{title:n.title,className:"woocommerce-filters__compare woocommerce-analytics__card"},Object(m.createElement)("div",{className:"woocommerce-filters__compare-body"},Object(m.createElement)(nt,{type:r,selected:a,placeholder:n.placeholder,onChange:function(t){e.setState({selected:t})}})),Object(m.createElement)("div",{className:"woocommerce-filters__compare-footer"},Object(m.createElement)(Ml,{count:a.length,helpText:n.helpText,onClick:this.updateQuery},n.update),a.length>0&&Object(m.createElement)(v.Button,{isLink:!0,onClick:this.clearQuery},Object(g.__)("Clear all","woocommerce-admin"))))}}]),t}();xl.propTypes={getLabels:_.a.func.isRequired,labels:_.a.shape({placeholder:_.a.string,title:_.a.string,update:_.a.string}),param:_.a.string.isRequired,path:_.a.string.isRequired,query:_.a.object,type:_.a.string.isRequired},xl.defaultProps={labels:{},query:{}};var Cl=xl,Dl=n(52),jl=function(e){var t=e.date,n=e.machineFormat,r=e.screenReaderFormat,a=e.visibleFormat;return Object(m.createElement)("time",{dateTime:Object(Dl.format)(n,t)},Object(m.createElement)("span",{"aria-hidden":"true"},Object(Dl.format)(a,t)),Object(m.createElement)("span",{className:"screen-reader-text"},Object(Dl.format)(r,t)))};jl.propTypes={date:_.a.oneOfType([_.a.string,_.a.object]).isRequired,machineFormat:_.a.string,screenReaderFormat:_.a.string,visibleFormat:_.a.string},jl.defaultProps={machineFormat:"Y-m-d H:i:s",screenReaderFormat:"F j, Y",visibleFormat:"Y-m-d"};var Pl=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.options,a=e.selected,o=e.onSelect,i=e.name,c=e.legend;return Object(m.createElement)("fieldset",{className:"woocommerce-segmented-selection"},Object(m.createElement)("legend",{className:"screen-reader-text"},c),Object(m.createElement)("div",{className:x()(t,"woocommerce-segmented-selection__container")},n.map(function(e){var t=e.value,n=e.label;if(!t||!n)return null;var c=Object(y.uniqueId)("".concat(t,"_"));return Object(m.createElement)("div",{className:"woocommerce-segmented-selection__item",key:t},Object(m.createElement)("input",{className:"woocommerce-segmented-selection__input",type:"radio",name:i,id:c,checked:a===t,onChange:Object(y.partial)(o,r({},i,t))}),Object(m.createElement)("label",{htmlFor:c},Object(m.createElement)("span",{className:"woocommerce-segmented-selection__label"},n)))})))}}]),t}();Pl.propTypes={className:_.a.string,options:_.a.arrayOf(_.a.shape({value:_.a.string.isRequired,label:_.a.string.isRequired})).isRequired,selected:_.a.string,onSelect:_.a.func.isRequired,name:_.a.string.isRequired,legend:_.a.string.isRequired};var Fl=Pl,Tl=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,n=e.compare;return Object(m.createElement)(Fl,{options:vt,selected:n,onSelect:t,name:"compare",legend:Object(g.__)("compare to","woocommerce-admin")})}}]),t}();Tl.propTypes={onSelect:_.a.func.isRequired,compare:_.a.string};var Il=Tl,Nl=n(256),Al={calendarLabel:Object(g.__)("Calendar","woocommerce-admin"),closeDatePicker:Object(g.__)("Close","woocommerce-admin"),focusStartDate:Object(g.__)("Interact with the calendar and select start and end dates.","woocommerce-admin"),clearDate:Object(g.__)("Clear Date","woocommerce-admin"),clearDates:Object(g.__)("Clear Dates","woocommerce-admin"),jumpToPrevMonth:Object(g.__)("Move backward to switch to the previous month.","woocommerce-admin"),jumpToNextMonth:Object(g.__)("Move forward to switch to the next month.","woocommerce-admin"),enterKey:Object(g.__)("Enter key","woocommerce-admin"),leftArrowRightArrow:Object(g.__)("Right and left arrow keys","woocommerce-admin"),upArrowDownArrow:Object(g.__)("up and down arrow keys","woocommerce-admin"),pageUpPageDown:Object(g.__)("page up and page down keys","woocommerce-admin"),homeEnd:Object(g.__)("Home and end keys","woocommerce-admin"),escape:Object(g.__)("Escape key","woocommerce-admin"),questionMark:Object(g.__)("Question mark","woocommerce-admin"),selectFocusedDate:Object(g.__)("Select the date in focus.","woocommerce-admin"),moveFocusByOneDay:Object(g.__)("Move backward (left) and forward (right) by one day.","woocommerce-admin"),moveFocusByOneWeek:Object(g.__)("Move backward (up) and forward (down) by one week.","woocommerce-admin"),moveFocusByOneMonth:Object(g.__)("Switch months.","woocommerce-admin"),moveFocustoStartAndEndOfWeek:Object(g.__)("Go to the first or last day of a week.","woocommerce-admin"),returnFocusToInput:Object(g.__)("Return to the date input field.","woocommerce-admin"),keyboardNavigationInstructions:Object(g.__)("Press the down arrow key to interact with the calendar and\n select a date.","woocommerce-admin"),chooseAvailableStartDate:function(e){var t=e.date;return Object(g.sprintf)(Object(g.__)("Select %s as a start date.","woocommerce-admin"),t)},chooseAvailableEndDate:function(e){var t=e.date;return Object(g.sprintf)(Object(g.__)("Select %s as an end date.","woocommerce-admin"),t)},chooseAvailableDate:function(e){return e.date},dateIsUnavailable:function(e){var t=e.date;return Object(g.sprintf)(Object(g.__)("%s is not selectable.","woocommerce-admin"),t)},dateIsSelected:function(e){var t=e.date;return Object(g.sprintf)(Object(g.__)("Selected. %s","woocommerce-admin"),t)}},Rl=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).onDatesChange=n.onDatesChange.bind(f(n)),n.onFocusChange=n.onFocusChange.bind(f(n)),n.onInputChange=n.onInputChange.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"onDatesChange",value:function(e){var t=e.startDate,n=e.endDate,r=this.props,a=r.onUpdate,o=r.shortDateFormat;a({after:t,before:n,afterText:t?t.format(o):"",beforeText:n?n.format(o):"",afterError:null,beforeError:null})}},{key:"onFocusChange",value:function(e){this.props.onUpdate({focusedInput:e||"startDate"})}},{key:"onInputChange",value:function(e,t){var n,a=t.target.value,o=this.props,i=o.after,c=function(e,t,n,r,a){var o=yt(a,t);return o?ht()().isBefore(o,"day")?{date:null,error:Ct.future}:"after"===e&&n&&o.isAfter(n,"day")?{date:null,error:Ct.startAfterEnd}:"before"===e&&r&&o.isBefore(r,"day")?{date:null,error:Ct.endBeforeStart}:{date:o}:{date:null,error:Ct.invalid}}(e,a,o.before,i,o.shortDateFormat),s=c.date,l=c.error;this.props.onUpdate((r(n={},e,s),r(n,e+"Text",a),r(n,e+"Error",a.length>0?l:null),n))}},{key:"setTnitialVisibleMonth",value:function(e,t){return function(){var n=t||ht()();return e?n.clone().subtract(1,"month"):n}}},{key:"render",value:function(){var e=this,t=this.props,n=t.after,r=t.before,a=t.focusedInput,o=t.afterText,i=t.beforeText,c=t.afterError,s=t.beforeError,l=t.shortDateFormat,u=t.isViewportMobile,f=t.isViewportSmall,d=t.isInvalidDate,h=u&&!f;return Object(m.createElement)("div",{className:x()("woocommerce-calendar",{"is-mobile":u})},Object(m.createElement)("div",{className:"woocommerce-calendar__inputs"},Object(m.createElement)(jt,{value:o,onChange:Object(y.partial)(this.onInputChange,"after"),dateFormat:l,label:Object(g.__)("Start Date","woocommerce-admin"),error:c,describedBy:Object(g.sprintf)(Object(g.__)("Date input describing a selected date range's start date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("startDate")}}),Object(m.createElement)("div",{className:"woocommerce-calendar__inputs-to"},Object(g.__)("to","woocommerce-admin")),Object(m.createElement)(jt,{value:i,onChange:Object(y.partial)(this.onInputChange,"before"),dateFormat:l,label:Object(g.__)("End Date","woocommerce-admin"),error:s,describedBy:Object(g.sprintf)(Object(g.__)("Date input describing a selected date range's end date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("endDate")}})),Object(m.createElement)("div",{className:"woocommerce-calendar__react-dates"},Object(m.createElement)(Nl.DayPickerRangeController,{onDatesChange:this.onDatesChange,onFocusChange:this.onFocusChange,focusedInput:a,startDate:n,endDate:r,orientation:"horizontal",numberOfMonths:h?2:1,isOutsideRange:function(e){return d&&d(e.toDate())},minimumNights:0,hideKeyboardShortcutsPanel:!0,noBorder:!0,isRTL:"rtl"===document.documentElement.dir,initialVisibleMonth:this.setTnitialVisibleMonth(h,r),phrases:Al})))}}]),t}();Rl.propTypes={after:_.a.object,afterError:_.a.string,afterText:_.a.string,before:_.a.object,beforeError:_.a.string,beforeText:_.a.string,focusedInput:_.a.string,isInvalidDate:_.a.func,onUpdate:_.a.func.isRequired,shortDateFormat:_.a.string.isRequired};var Bl=Object(Lr.withViewportMatch)({isViewportMobile:"< medium",isViewportSmall:"< small"})(Rl),Ll=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,n=e.period;return Object(m.createElement)(Fl,{options:Object(y.filter)(gt,function(e){return"custom"!==e.value}),selected:n,onSelect:t,name:"period",legend:Object(g.__)("select a preset period","woocommerce-admin")})}}]),t}();Ll.propTypes={onSelect:_.a.func.isRequired,period:_.a.string};var Ul=Ll,zl=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).call(this))).onTabSelect=e.onTabSelect.bind(f(e)),e}return b(t,m["Component"]),s(t,[{key:"onTabSelect",value:function(e){var t=this.props,n=t.onUpdate,r=t.period;"period"===e&&"custom"===r&&n({period:"today"})}},{key:"isFutureDate",value:function(e){return ht()().isBefore(ht()(e),"day")}},{key:"render",value:function(){var e=this,t=this.props,n=t.period,r=t.compare,a=t.after,o=t.before,i=t.onUpdate,c=t.onClose,s=t.onSelect,l=t.isValidSelection,u=t.resetCustomValues,f=t.focusedInput,d=t.afterText,h=t.beforeText,p=t.afterError,b=t.beforeError,y=t.shortDateFormat;return Object(m.createElement)("div",null,Object(m.createElement)(be,{className:"screen-reader-text",tabIndex:"0"},Object(g.__)("Select date range and comparison","woocommerce-admin")),Object(m.createElement)(me,{component:!1},Object(m.createElement)(be,{className:"woocommerce-filters-date__text"},Object(g.__)("select a date range","woocommerce-admin")),Object(m.createElement)(v.TabPanel,{tabs:[{name:"period",title:Object(g.__)("Presets","woocommerce-admin"),className:"woocommerce-filters-date__tab"},{name:"custom",title:Object(g.__)("Custom","woocommerce-admin"),className:"woocommerce-filters-date__tab"}],className:"woocommerce-filters-date__tabs",activeClass:"is-active",initialTabName:"custom"===n?"custom":"period",onSelect:this.onTabSelect},function(t){return Object(m.createElement)(m.Fragment,null,"period"===t.name&&Object(m.createElement)(Ul,{onSelect:i,period:n}),"custom"===t.name&&Object(m.createElement)(Bl,{after:a,before:o,onUpdate:i,isInvalidDate:e.isFutureDate,focusedInput:f,afterText:d,beforeText:h,afterError:p,beforeError:b,shortDateFormat:y}),Object(m.createElement)("div",{className:x()("woocommerce-filters-date__content-controls",{"is-custom":"custom"===t.name})},Object(m.createElement)(be,{className:"woocommerce-filters-date__text"},Object(g.__)("compare to","woocommerce-admin")),Object(m.createElement)(Il,{onSelect:i,compare:r}),Object(m.createElement)("div",{className:"woocommerce-filters-date__button-group"},"custom"===t.name&&Object(m.createElement)(v.Button,{className:"woocommerce-filters-date__button",isDefault:!0,onClick:u,disabled:!(a||o)},Object(g.__)("Reset","woocommerce-admin")),l(t.name)?Object(m.createElement)(v.Button,{className:"woocommerce-filters-date__button",onClick:s(t.name,c),isPrimary:!0},Object(g.__)("Update","woocommerce-admin")):Object(m.createElement)(v.Button,{className:"woocommerce-filters-date__button",isPrimary:!0,disabled:!0},Object(g.__)("Update","woocommerce-admin")))))})))}}]),t}();zl.propTypes={period:_.a.string.isRequired,compare:_.a.string.isRequired,onUpdate:_.a.func.isRequired,onClose:_.a.func.isRequired,onSelect:_.a.func.isRequired,resetCustomValues:_.a.func.isRequired,focusedInput:_.a.string,afterText:_.a.string,beforeText:_.a.string,afterError:_.a.string,beforeError:_.a.string,shortDateFormat:_.a.string.isRequired};var Hl=zl,Vl=function(e){var t=e.labels,n=e.isOpen,r=he(e,["labels","isOpen"]),a=x()("woocommerce-dropdown-button",{"is-open":n,"is-multi-line":t.length>1});return Object(m.createElement)(v.Button,D({className:a,"aria-expanded":n},r),Object(m.createElement)("div",{className:"woocommerce-dropdown-button__labels"},t.map(function(e,t){return Object(m.createElement)("span",{key:t},e)})))};Vl.propTypes={labels:_.a.array.isRequired,isOpen:_.a.bool};var ql=Vl,Kl=Object(g.__)("MM/DD/YYYY","woocommerce-admin"),Wl=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).state=n.getResetState(),n.dropdownRef=Object(m.createRef)(),n.update=n.update.bind(f(n)),n.onSelect=n.onSelect.bind(f(n)),n.isValidSelection=n.isValidSelection.bind(f(n)),n.resetCustomValues=n.resetCustomValues.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"getResetState",value:function(){var e=Et(this.props.query),t=e.period,n=e.compare,r=e.before,a=e.after;return{period:t,compare:n,before:r,after:a,focusedInput:"startDate",afterText:a?a.format(Kl):"",beforeText:r?r.format(Kl):"",afterError:null,beforeError:null}}},{key:"update",value:function(e){this.setState(e)}},{key:"onSelect",value:function(e,t){var n=this,r=this.props.onRangeSelect;return function(a){var o=n.state,i=o.period,c=o.compare,s=o.after,l=o.before,u={period:"custom"===e?"custom":i,compare:c};"custom"===e?(u.after=s?s.format(mt):"",u.before=l?l.format(mt):""):(u.after=void 0,u.before=void 0),r(u),t(a)}}},{key:"getButtonLabel",value:function(){var e=St(this.props.query),t=e.primary,n=e.secondary;return["".concat(t.label," (").concat(t.range,")"),"".concat(Object(g.__)("vs.","woocommerce-admin")," ").concat(n.label," (").concat(n.range,")")]}},{key:"isValidSelection",value:function(e){var t=this.state,n=t.compare,r=t.after,a=t.before;return"custom"!==e||n&&r&&a}},{key:"resetCustomValues",value:function(){this.setState({after:null,before:null,focusedInput:"startDate",afterText:"",beforeText:"",afterError:null,beforeError:null})}},{key:"render",value:function(){var e=this,t=this.state,n=t.period,r=t.compare,a=t.after,o=t.before,i=t.focusedInput,c=t.afterText,s=t.beforeText,l=t.afterError,u=t.beforeError;return Object(m.createElement)("div",{className:"woocommerce-filters-filter"},Object(m.createElement)("span",{className:"woocommerce-filters-label"},Object(g.__)("Date Range","woocommerce-admin"),":"),Object(m.createElement)(v.Dropdown,{ref:this.dropdownRef,contentClassName:"woocommerce-filters-date__content",position:"bottom",expandOnMobile:!0,renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(m.createElement)(ql,{onClick:r,isOpen:n,labels:e.getButtonLabel()})},renderContent:function(t){var f=t.onClose;return Object(m.createElement)(Hl,{period:n,compare:r,after:a,before:o,onUpdate:e.update,onClose:f,onSelect:e.onSelect,isValidSelection:e.isValidSelection,resetCustomValues:e.resetCustomValues,focusedInput:i,afterText:c,beforeText:s,afterError:l,beforeError:u,shortDateFormat:Kl})}}))}}]),t}();Wl.propTypes={onRangeSelect:_.a.func.isRequired,query:_.a.object},Wl.defaultProps={query:{}};var Yl=Wl,Gl=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.src,n=e.alt,r=he(e,["src","alt"]),a=t;return 0===a.indexOf("/")&&(a=a.substring(1),a=wcSettings.wcAdminAssetUrl+a),Object(m.createElement)("img",D({src:a,alt:n||""},r))}}]),t}();Gl.propTypes={src:_.a.string.isRequired,alt:_.a.string.isRequired};var $l=Gl,Xl=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"renderIllustration",value:function(){var e=this.props,t=e.illustrationWidth,n=e.illustrationHeight,r=e.illustration;return Object(m.createElement)($l,{alt:"",src:r,width:t,height:n,className:"woocommerce-empty-content__illustration"})}},{key:"renderActionButtons",value:function(e){var t="secondary"===e?this.props.secondaryActionLabel:this.props.actionLabel,n="secondary"===e?this.props.secondaryActionURL:this.props.actionURL,r="secondary"===e?this.props.secondaryActionCallback:this.props.actionCallback,a="secondary"!==e;return n&&r?Object(m.createElement)(v.Button,{className:"woocommerce-empty-content__action",isPrimary:a,onClick:r,href:n},t):n?Object(m.createElement)(v.Button,{className:"woocommerce-empty-content__action",isPrimary:a,href:n},t):r?Object(m.createElement)(v.Button,{className:"woocommerce-empty-content__action",isPrimary:a,onClick:r},t):null}},{key:"renderActions",value:function(){var e=this.props,t=e.actionLabel,n=e.secondaryActionLabel;return Object(m.createElement)("div",{className:"woocommerce-empty-content__actions"},t&&this.renderActionButtons("primary"),n&&this.renderActionButtons("secondary"))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.title,r=e.message,a=e.illustration;return Object(m.createElement)("div",{className:x()("woocommerce-empty-content",t)},a&&this.renderIllustration(),n?Object(m.createElement)(be,{className:"woocommerce-empty-content__title"},n):null,r?Object(m.createElement)("p",{className:"woocommerce-empty-content__message"},r):null,this.renderActions())}}]),t}();Xl.propTypes={title:_.a.string.isRequired,message:_.a.string,illustration:_.a.string,illustrationHeight:_.a.number,illustrationWidth:_.a.number,actionLabel:_.a.string.isRequired,actionURL:_.a.string,actionCallback:_.a.func,secondaryActionLabel:_.a.string,secondaryActionURL:_.a.string,secondaryActionCallback:_.a.func,className:_.a.string},Xl.defaultProps={illustration:"/empty-content.svg",illustrationWidth:400};var Zl=n(54),Ql=function(e){function t(e){var n;i(this,t);var r=(n=d(this,h(t).call(this,e))).getFilter();if(n.state={nav:r.path||[],animate:null,selectedTag:null},n.selectSubFilter=n.selectSubFilter.bind(f(n)),n.getVisibleFilters=n.getVisibleFilters.bind(f(n)),n.updateSelectedTag=n.updateSelectedTag.bind(f(n)),n.onTagChange=n.onTagChange.bind(f(n)),n.onContentMount=n.onContentMount.bind(f(n)),n.goBack=n.goBack.bind(f(n)),r.settings&&r.settings.getLabels){var a=n.props.query,o=r.settings,c=o.param;(0,o.getLabels)(a[c],a).then(n.updateSelectedTag)}return n}return b(t,m["Component"]),s(t,[{key:"componentDidUpdate",value:function(e){var t=e.query,n=this.props,r=n.query,a=n.config;if(t[a.param]!==r[[a.param]]){var o=this.getFilter();if(o&&"Search"===o.component){this.setState({nav:o.path||[]});var i=o.settings,c=i.param;(0,i.getLabels)(r[c],r).then(this.updateSelectedTag)}}}},{key:"updateSelectedTag",value:function(e){this.setState({selectedTag:e[0]})}},{key:"getFilter",value:function(e){var t=this.props,n=t.config,r=t.query,a=function e(t){var n=[];return t.forEach(function(t){if(t.subFilters){n.push(Object(y.omit)(t,"subFilters"));var r=e(t.subFilters);n.push.apply(n,o(r))}else n.push(t)}),n}(n.filters);return e=e||r[n.param]||n.defaultValue||"all",Object(y.find)(a,{value:e})||{}}},{key:"getButtonLabel",value:function(e){if("Search"===e.component){var t=this.state.selectedTag;return[t&&t.label,Object(y.get)(e,"settings.labels.button")]}return e?[e.label]:[]}},{key:"getVisibleFilters",value:function(e,t){if(0===t.length)return e;var n=t[0],r=Object(y.find)(e,{value:n});return this.getVisibleFilters(r&&r.subFilters,t.slice(1))}},{key:"selectSubFilter",value:function(e){this.setState(function(t){return{nav:[].concat(o(t.nav),[e]),animate:"left"}})}},{key:"goBack",value:function(){this.setState(function(e){return{nav:e.nav.slice(0,-1),animate:"right"}})}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.props,o=n.path,i=n.query,c=n.config,s=n.onFilterSelect,l=ie(i),u=a(r({},c.param,(c.defaultValue||"all")===e?void 0:e),t);c.staticParams.forEach(function(e){u[e]=i[e]}),ue(u,o,l),s(u)}},{key:"onTagChange",value:function(e,t,n,a){var o=Object(y.last)(a),i=e.value,c=e.settings.param;o?(this.update(i,r({},c,o.id)),t()):this.update(n.defaultValue||"all"),this.updateSelectedTag([o])}},{key:"renderButton",value:function(e,t,n){var r=this;if(e.component){var a=e.settings,o=a.type,i=a.labels,c=this.getFilter().value===e.value?this.state.selectedTag:null;return Object(m.createElement)(nt,{className:"woocommerce-filters-filter__search",type:o,placeholder:i.placeholder,selected:c?[c]:[],onChange:Object(y.partial)(this.onTagChange,e,t,n),inlineTags:!0,staticResults:!0})}var s=Object(y.partial)(this.selectSubFilter,e.value);return Object(m.createElement)(v.Button,{className:"woocommerce-filters-filter__button",onClick:e.subFilters?s:function(n){t(n),r.update(e.value,e.query||{}),r.setState({selectedTag:null})}},e.label)}},{key:"onContentMount",value:function(e){var t=this.state.nav,n=!!t.length&&this.getFilter(t[t.length-1])?1:0,r=Zl.focus.tabbable.find(e)[n];setTimeout(function(){r.focus()},0)}},{key:"render",value:function(){var e=this,t=this.props.config,n=this.state,r=n.nav,a=n.animate,o=this.getVisibleFilters(t.filters,r),i=!!r.length&&this.getFilter(r[r.length-1]),c=this.getFilter();return Object(m.createElement)("div",{className:"woocommerce-filters-filter"},t.label&&Object(m.createElement)("span",{className:"woocommerce-filters-label"},t.label,":"),Object(m.createElement)(v.Dropdown,{contentClassName:"woocommerce-filters-filter__content",position:"bottom",expandOnMobile:!0,headerTitle:Object(g.__)("filter report to show:","woocommerce-admin"),renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(m.createElement)(ql,{onClick:r,isOpen:n,labels:e.getButtonLabel(c)})},renderContent:function(n){var s=n.onClose;return Object(m.createElement)(zt,{animationKey:r,animate:a,onExited:e.onContentMount},function(){return Object(m.createElement)("ul",{className:"woocommerce-filters-filter__content-list"},i&&Object(m.createElement)("li",{className:"woocommerce-filters-filter__content-list-item"},Object(m.createElement)(v.IconButton,{className:"woocommerce-filters-filter__button",onClick:e.goBack,icon:"arrow-left-alt2"},i.label)),o.map(function(n){return Object(m.createElement)("li",{key:n.value,className:x()("woocommerce-filters-filter__content-list-item",{"is-selected":c.value===n.value||c.path&&Object(y.includes)(c.path,n.value)})},e.renderButton(n,s,t))}))})}}))}}]),t}();Ql.propTypes={config:_.a.shape({label:_.a.string,staticParams:_.a.array.isRequired,param:_.a.string.isRequired,defaultValue:_.a.string,showFilters:_.a.func.isRequired,filters:_.a.arrayOf(_.a.shape({chartMode:_.a.oneOf(["item-comparison","time-comparison"]),component:_.a.string,label:_.a.string,path:_.a.string,subFilters:_.a.array,value:_.a.string.isRequired}))}).isRequired,path:_.a.string.isRequired,query:_.a.object,onFilterSelect:_.a.func},Ql.defaultProps={query:{},onFilterSelect:function(){}};var Jl=Ql,eu=n(147),tu=n(148),nu=n.n(tu),ru=n(257),au=n.n(ru),ou=function(e){var t,n,r,a,o=e.alt,i=e.title,c=e.size,s=e.user,l=e.className,u=x()("woocommerce-gravatar",l,{"is-placeholder":!s}),f=o||s&&(s.display_name||s.name)||"",d="https://www.gravatar.com/avatar/0?s="+c+"&d=mp";return s&&(t=Object(y.isString)(s)?(a=s,"https://www.gravatar.com/avatar/"+au.a.createHash("md5").update(a).digest("hex")):s.avatar_URLs[96],n=nu.a.parse(t),(r=Object(eu.parse)(n.query)).s=c,r.d="mp",n.search=Object(eu.stringify)(r),d=nu.a.format(n)),Object(m.createElement)("img",{alt:f,title:i,className:u,src:d,width:c,height:c})};ou.propTypes={user:_.a.oneOfType([_.a.object,_.a.string]),alt:_.a.string,title:_.a.string,size:_.a.number,className:_.a.string},ou.defaultProps={size:60};var iu=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).apply(this,arguments))).onClick=e.onClick.bind(f(e)),e.onFocusFormToggle=e.onFocusFormToggle.bind(f(e)),e.onKeyDown=e.onKeyDown.bind(f(e)),e.container=Object(m.createRef)(),e}return b(t,m["Component"]),s(t,[{key:"onClick",value:function(e){var t=this.props,n=t.isClickable,r=t.onInvoke;n&&(e.preventDefault(),r())}},{key:"onKeyDown",value:function(e){e.target.isSameNode(e.currentTarget)&&(e.keyCode!==Me.ENTER&&e.keyCode!==Me.SPACE||(e.preventDefault(),this.props.onInvoke()),e.keyCode===Me.UP&&e.preventDefault(),e.keyCode===Me.DOWN&&(e.preventDefault(),(e.target.nextSibling||e.target.parentNode.querySelector(".woocommerce-ellipsis-menu__item")).focus()))}},{key:"onFocusFormToggle",value:function(){this.container.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.checked,n=e.children;return e.isCheckbox?Object(m.createElement)("div",{"aria-checked":t,ref:this.container,role:"menuitemcheckbox",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},Object(m.createElement)(v.BaseControl,{className:"components-toggle-control"},Object(m.createElement)(v.FormToggle,{"aria-hidden":"true",checked:t,onChange:this.props.onInvoke,onFocus:this.onFocusFormToggle,onClick:function(e){return e.stopPropagation()},tabIndex:"-1"}),n)):Object(m.createElement)("div",{role:"menuitem",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},n)}}]),t}();iu.propTypes={checked:_.a.bool,children:_.a.node,isCheckbox:_.a.bool,isClickable:_.a.bool,onInvoke:_.a.func.isRequired},iu.defaultProps={isClickable:!1,isCheckbox:!1};var cu=iu,su=function(e){var t=e.children;return Object(m.createElement)("div",{className:"woocommerce-ellipsis-menu__title"},t)};su.propTypes={children:_.a.node};var lu=su,uu=function(e){var t=e.order,n=e.className,a=t.status,o=wcSettings.orderStatuses,i=x()("woocommerce-order-status",n),c=x()("woocommerce-order-status__indicator",r({},"is-"+a,!0)),s=o[a]||a;return Object(m.createElement)("div",{className:i},Object(m.createElement)("span",{className:c}),s)};uu.propTypes={order:_.a.object.isRequired,className:_.a.string};var fu=[25,50,75,100],du=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).state={inputValue:n.props.page},n.previousPage=n.previousPage.bind(f(n)),n.nextPage=n.nextPage.bind(f(n)),n.onInputChange=n.onInputChange.bind(f(n)),n.onInputBlur=n.onInputBlur.bind(f(n)),n.perPageChange=n.perPageChange.bind(f(n)),n.selectInputValue=n.selectInputValue.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"previousPage",value:function(e){e.stopPropagation();var t=this.props,n=t.page,r=t.onPageChange;n-1<1||r(n-1)}},{key:"nextPage",value:function(e){e.stopPropagation();var t=this.props,n=t.page,r=t.onPageChange;n+1>this.pageCount||r(n+1)}},{key:"perPageChange",value:function(e){var t=this.props,n=t.onPerPageChange,r=t.onPageChange,a=t.total,o=t.page;n(parseInt(e));var i=Math.ceil(a/parseInt(e));o>i&&r(i)}},{key:"onInputChange",value:function(e){this.setState({inputValue:e.target.value})}},{key:"onInputBlur",value:function(e){var t=this.props,n=t.onPageChange,r=t.page,a=parseInt(e.target.value,10);a!==r&&Object(y.isFinite)(a)&&a>0&&this.pageCount&&this.pageCount>=a&&n(a)}},{key:"selectInputValue",value:function(e){e.target.select()}},{key:"renderPageArrows",value:function(){var e=this.props.page;if(this.pageCount<=1)return null;var t=x()("woocommerce-pagination__link",{"is-active":e>1}),n=x()("woocommerce-pagination__link",{"is-active":e<this.pageCount});return Object(m.createElement)("div",{className:"woocommerce-pagination__page-arrows"},Object(m.createElement)("span",{className:"woocommerce-pagination__page-arrows-label",role:"status","aria-live":"polite"},Object(g.sprintf)(Object(g.__)("Page %d of %d","woocommerce-admin"),e,this.pageCount)),Object(m.createElement)("div",{className:"woocommerce-pagination__page-arrows-buttons"},Object(m.createElement)(v.IconButton,{className:t,disabled:!(e>1),onClick:this.previousPage,icon:"arrow-left-alt2",label:Object(g.__)("Previous Page","woocommerce-admin"),size:18}),Object(m.createElement)(v.IconButton,{className:n,disabled:!(e<this.pageCount),onClick:this.nextPage,icon:"arrow-right-alt2",label:Object(g.__)("Next Page","woocommerce-admin"),size:18})))}},{key:"renderPagePicker",value:function(){var e=this.props.page,t=this.state.inputValue,n=e<1||e>this.pageCount,r=x()("woocommerce-pagination__page-picker-input",{"has-error":n}),a=Object(y.uniqueId)("woocommerce-pagination-page-picker-");return Object(m.createElement)("div",{className:"woocommerce-pagination__page-picker"},Object(m.createElement)("label",{htmlFor:a,className:"woocommerce-pagination__page-picker-label"},Object(g.__)("Go to page","woocommerce-admin"),Object(m.createElement)("input",{id:a,className:r,"aria-invalid":n,type:"number",onClick:this.selectInputValue,onChange:this.onInputChange,onBlur:this.onInputBlur,value:t,min:1,max:this.pageCount})))}},{key:"renderPerPagePicker",value:function(){var e=fu.map(function(e){return{value:e,label:e}});return Object(m.createElement)("div",{className:"woocommerce-pagination__per-page-picker"},Object(m.createElement)(v.SelectControl,{label:Object(g.__)("Rows per page","woocommerce-admin"),value:this.props.perPage,onChange:this.perPageChange,options:e}))}},{key:"render",value:function(){var e=this.props,t=e.total,n=e.perPage,r=e.className;this.pageCount=Math.ceil(t/n);var a=x()("woocommerce-pagination",r);return this.pageCount<=1?t>fu[0]&&Object(m.createElement)("div",{className:a},this.renderPerPagePicker())||null:Object(m.createElement)("div",{className:a},this.renderPageArrows(),this.renderPagePicker(),this.renderPerPagePicker())}}]),t}();du.propTypes={page:_.a.number.isRequired,onPageChange:_.a.func,perPage:_.a.number.isRequired,onPerPageChange:_.a.func,total:_.a.number.isRequired,className:_.a.string},du.defaultProps={onPageChange:y.noop,onPerPageChange:y.noop};var hu=du,pu=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"stars",value:function(){for(var e=this.props,t=e.size,n=e.totalStars,r={width:t+"px",height:t+"px"},a=[],o=0;o<n;o++)a.push(Object(m.createElement)(E.a,{key:"star-"+o,icon:"star",style:r}));return a}},{key:"render",value:function(){var e=this.props,t=e.rating,n=e.totalStars,r=e.className,a=x()("woocommerce-rating",r),o=100/n,i={width:Math.round(o*t)+"%"},c=Object(g.sprintf)(Object(g.__)("%1$s out of %2$s stars.","woocommerce-admin"),t,n);return Object(m.createElement)("div",{className:a,"aria-label":c},this.stars(),Object(m.createElement)("div",{className:"woocommerce-rating__star-outline",style:i},this.stars()))}}]),t}();pu.propTypes={rating:_.a.number,totalStars:_.a.number,size:_.a.number,className:_.a.string},pu.defaultProps={rating:0,totalStars:5,size:18};var bu=pu,mu=function(e){var t=e.product,n=he(e,["product"]),r=t&&t.average_rating||0;return Object(m.createElement)(bu,D({rating:r},n))};mu.propTypes={product:_.a.object.isRequired};var gu=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).call(this))).renderCard=e.renderCard.bind(f(e)),e.onRangeSelect=e.onRangeSelect.bind(f(e)),e}return b(t,m["Component"]),s(t,[{key:"renderCard",value:function(e){var t=this.props,n=t.advancedFilters,r=t.query,a=t.path,o=t.onAdvancedFilterAction,i=e.filters,c=e.param;if(!r[c])return null;if(0===r[c].indexOf("compare")){var s=Object(y.find)(i,{value:r[c]});if(!s)return null;var l=s.settings,u=void 0===l?{}:l;return Object(m.createElement)("div",{key:c,className:"woocommerce-filters__advanced-filters"},Object(m.createElement)(Cl,D({path:a,query:r},u)))}return"advanced"===r[c]?Object(m.createElement)("div",{key:c,className:"woocommerce-filters__advanced-filters"},Object(m.createElement)(Bt,{config:n,path:a,query:r,onAdvancedFilterAction:o})):void 0}},{key:"onRangeSelect",value:function(e){var t=this.props,n=t.query,r=t.path,a=t.onDateSelect;ue(e,r,n),a(e)}},{key:"render",value:function(){var e=this.props,t=e.filters,n=e.query,r=e.path,a=e.showDatePicker,o=e.onFilterSelect;return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(be,{className:"screen-reader-text"},Object(g.__)("Filters","woocommerce-admin")),Object(m.createElement)(me,{component:"div",className:"woocommerce-filters"},Object(m.createElement)("div",{className:"woocommerce-filters__basic-filters"},a&&Object(m.createElement)(Yl,{key:JSON.stringify(n),query:n,onRangeSelect:this.onRangeSelect}),t.map(function(e){if(e.showFilters(n))return Object(m.createElement)(Jl,{key:e.param,config:e,query:n,path:r,onFilterSelect:o})})),t.map(this.renderCard)))}}]),t}();gu.propTypes={advancedFilters:_.a.object,filters:_.a.array,path:_.a.string.isRequired,query:_.a.object,showDatePicker:_.a.bool,onDateSelect:_.a.func,onFilterSelect:_.a.func,onAdvancedFilterAction:_.a.func},gu.defaultProps={advancedFilters:{},filters:[],query:{},showDatePicker:!0,onDateSelect:function(){}};var vu=function(e){var t=e.review,n=he(e,["review"]),r=t&&t.rating||0;return Object(m.createElement)(bu,D({rating:r},n))};vu.propTypes={review:_.a.object.isRequired};function yu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=Object(y.groupBy)(e,"parent"),r=Object(y.keyBy)(t,"id"),i=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.parent)return t.name?[t.name]:[];var n=e(r[t.parent]);return[].concat(o(n),[t.name])},c=function e(t){return t.map(function(t){var o=n[t.id];return delete n[t.id],a({},t,{breadcrumbs:i(r[t.parent]),children:o&&o.length?e(o):[]})})},s=c(n[0]||[]);return delete n[0],Object(y.forEach)(n,function(e){s.push.apply(s,o(c(e||[])))}),s}var wu=function(){return Object(m.createElement)(v.Icon,{icon:Object(m.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(m.createElement)("path",{fill:"#1E8CBE",d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))})},_u=function(){return Object(m.createElement)(v.Icon,{icon:Object(m.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(m.createElement)("path",{fill:"#6C7781",d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}))})},ku=function(){return Object(m.createElement)(v.Icon,{icon:Object(m.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(m.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},Eu=function(){return Object(m.createElement)(v.Icon,{icon:Object(m.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(m.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})};function Su(e,t){if(!t)return e;var n=new RegExp(Object(y.escapeRegExp)(t),"ig");return e.replace(n,"<strong>$&</strong>")}var Ou=function(e){var t=e.countLabel,n=e.className,r=e.depth,a=void 0===r?0:r,o=e.item,i=e.isSelected,c=e.isSingle,s=e.onSelect,l=e.search,u=void 0===l?"":l,f=e.showCount,d=void 0!==f&&f,h=he(e,["countLabel","className","depth","item","isSelected","isSingle","onSelect","search","showCount"]),p=[n,"woocommerce-search-list__item"];p.push("depth-".concat(a)),c&&p.push("is-radio-button");var b,g=o.breadcrumbs&&o.breadcrumbs.length;return Object(m.createElement)(v.MenuItem,D({role:c?"menuitemradio":"menuitemcheckbox",className:p.join(" "),onClick:s(o),isSelected:i},h),Object(m.createElement)("span",{className:"woocommerce-search-list__item-state"},function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?t?Object(m.createElement)(ku,null):Object(m.createElement)(Eu,null):t?Object(m.createElement)(wu,null):Object(m.createElement)(_u,null)}(c,i)),Object(m.createElement)("span",{className:"woocommerce-search-list__item-label"},g?Object(m.createElement)("span",{className:"woocommerce-search-list__item-prefix"},1===(b=o.breadcrumbs).length?Object(y.first)(b):2===b.length?Object(y.first)(b)+" › "+Object(y.last)(b):Object(y.first)(b)+" … "+Object(y.last)(b)):null,Object(m.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:Su(o.name,u)}})),!!d&&Object(m.createElement)("span",{className:"woocommerce-search-list__item-count"},t||o.count))};Ou.propTypes={className:_.a.string,countLabel:_.a.node,depth:_.a.number,item:_.a.object,isSelected:_.a.bool,isSingle:_.a.bool,onSelect:_.a.func,search:_.a.string,showCount:_.a.bool};var Mu=Ou,xu={clear:Object(g.__)("Clear all selected items","woocommerce-admin"),list:Object(g.__)("Results","woocommerce-admin"),noItems:Object(g.__)("No items found.","woocommerce-admin"),noResults:Object(g.__)("No results for %s","woocommerce-admin"),search:Object(g.__)("Search for items","woocommerce-admin"),selected:function(e){return Object(g.sprintf)(Object(g._n)("%d item selected","%d items selected",e,"woocommerce-admin"),e)},updated:Object(g.__)("Search results updated.","woocommerce-admin")},Cu=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).apply(this,arguments))).onSelect=e.onSelect.bind(f(e)),e.onRemove=e.onRemove.bind(f(e)),e.onClear=e.onClear.bind(f(e)),e.isSelected=e.isSelected.bind(f(e)),e.defaultRenderItem=e.defaultRenderItem.bind(f(e)),e.renderList=e.renderList.bind(f(e)),e}return b(t,m["Component"]),s(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.onSearch,r=t.search;r!==e.search&&"function"==typeof n&&n(r)}},{key:"onRemove",value:function(e){var t=this.props,n=t.isSingle,r=t.onChange,a=t.selected;return function(){n&&r([]);var t=Object(y.findIndex)(a,{id:e});r([].concat(o(a.slice(0,t)),o(a.slice(t+1))))}}},{key:"onSelect",value:function(e){var t=this,n=this.props,r=n.isSingle,a=n.onChange,i=n.selected;return function(){t.isSelected(e)?t.onRemove(e.id)():a(r?[e]:[].concat(o(i),[e]))}}},{key:"onClear",value:function(){this.props.onChange([])}},{key:"isSelected",value:function(e){return-1!==Object(y.findIndex)(this.props.selected,{id:e.id})}},{key:"getFilteredList",value:function(e,t){var n=this.props.isHierarchical;if(!t)return n?yu(e):e;var r=a({},xu,this.props.messages),o=new RegExp(Object(y.escapeRegExp)(t),"i");this.props.debouncedSpeak(r.updated);var i=e.map(function(e){return!!o.test(e.name)&&e}).filter(Boolean);return n?yu(i,e):i}},{key:"defaultRenderItem",value:function(e){return Object(m.createElement)(Mu,e)}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props,a=r.isSingle,o=r.search,i=this.props.renderItem||this.defaultRenderItem;return e?e.map(function(e){return Object(m.createElement)(m.Fragment,{key:e.id},i({item:e,isSelected:t.isSelected(e),onSelect:t.onSelect,isSingle:a,search:o,depth:n}),t.renderList(e.children,n+1))}):null}},{key:"renderListSection",value:function(){var e=this.props,t=e.isLoading,n=e.search,r=this.getFilteredList(this.props.list,n),o=a({},xu,this.props.messages);return t?Object(m.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(m.createElement)(v.Spinner,null)):r.length?Object(m.createElement)(v.MenuGroup,{label:o.list,className:"woocommerce-search-list__list"},this.renderList(r)):Object(m.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(m.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(m.createElement)(E.a,{icon:"notice-outline",role:"img","aria-hidden":"true",focusable:"false"})),Object(m.createElement)("span",{className:"woocommerce-search-list__not-found-text"},n?Object(g.sprintf)(o.noResults,n):o.noItems))}},{key:"renderSelectedSection",value:function(){var e=this,t=this.props,n=t.isLoading,r=t.isSingle,o=t.selected,i=a({},xu,this.props.messages);if(n||r||!o)return null;var c=o.length;return Object(m.createElement)("div",{className:"woocommerce-search-list__selected"},Object(m.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(m.createElement)("strong",null,i.selected(c)),c>0?Object(m.createElement)(v.Button,{isLink:!0,isDestructive:!0,onClick:this.onClear,"aria-label":i.clear},Object(g.__)("Clear all","woocommerce-admin")):null),o.map(function(t,n){return Object(m.createElement)(et,{key:n,label:t.name,id:t.id,remove:e.onRemove})}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=void 0===t?"":t,r=e.search,o=e.setState,i=a({},xu,this.props.messages);return Object(m.createElement)("div",{className:"woocommerce-search-list ".concat(n)},this.renderSelectedSection(),Object(m.createElement)("div",{className:"woocommerce-search-list__search"},Object(m.createElement)(v.TextControl,{label:i.search,type:"search",value:r,onChange:function(e){return o({search:e})}})),this.renderListSection())}}]),t}();Cu.propTypes={className:_.a.string,isHierarchical:_.a.bool,isLoading:_.a.bool,isSingle:_.a.bool,list:_.a.arrayOf(_.a.shape({id:_.a.number,name:_.a.string})),messages:_.a.shape({clear:_.a.string,list:_.a.string,noItems:_.a.string,noResults:_.a.string,search:_.a.string,selected:_.a.func,updated:_.a.string}),onChange:_.a.func.isRequired,onSearch:_.a.func,renderItem:_.a.func,selected:_.a.array.isRequired,search:_.a.string,setState:_.a.func,debouncedSpeak:_.a.func,instanceId:_.a.number};var Du=Object(Oe.compose)([Object(Oe.withState)({search:""}),v.withSpokenMessages,Oe.withInstanceId])(Cu),ju=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.menu,r=e.title,a=x()("woocommerce-section-header",this.props.className);return Object(m.createElement)("div",{className:a},Object(m.createElement)(be,{className:"woocommerce-section-header__title woocommerce-section-header__header-item"},r),Object(m.createElement)("hr",{role:"presentation"}),t&&Object(m.createElement)("div",{className:"woocommerce-section-header__actions woocommerce-section-header__header-item"},t),n&&Object(m.createElement)("div",{className:"woocommerce-section-header__menu woocommerce-section-header__header-item"},n))}}]),t}();ju.propTypes={className:_.a.string,menu:ge(de),title:_.a.oneOfType([_.a.string,_.a.node]).isRequired};var Pu=function(e){var t=e.isPrimary,n=e.mainIcon,r=e.mainLabel,a=e.onClick,o=e.menuLabel,i=e.controls,c=e.className;if(!i||!i.length)return null;var s=n&&v.IconButton||v.Button,l=x()("woocommerce-split-button",c,{"is-primary":t,"has-label":r});return Object(m.createElement)("div",{className:l},Object(m.createElement)(s,{icon:n,className:"woocommerce-split-button__main-action",onClick:a},r),Object(m.createElement)(v.Dropdown,{className:"woocommerce-split-button__menu",position:"bottom left",contentClassName:"woocommerce-split-button__menu-popover",expandOnMobile:!0,headerTitle:o,renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(m.createElement)(v.IconButton,{icon:t?"arrow-up":"arrow-down",className:x()("woocommerce-split-button__menu-toggle",{"is-active":t}),onClick:n,"aria-haspopup":"true","aria-expanded":t,label:o,tooltip:o})},renderContent:function(e){var t=e.onClose;return Object(m.createElement)(v.NavigableMenu,{className:"woocommerce-split-button__menu-wrapper",role:"menu","aria-label":o},i.map(function(e,n){var r=e.icon&&v.IconButton||v.Button;return Object(m.createElement)(r,{key:n,onClick:function(n){n.stopPropagation(),t(),e.onClick&&e.onClick()},className:"woocommerce-split-button__menu-item",icon:e.icon||"",role:"menuitem"},e.label)}))}}))};Pu.propTypes={isPrimary:_.a.bool,mainIcon:_.a.node,mainLabel:_.a.string,onClick:_.a.func,menuLabel:_.a.string,controls:_.a.arrayOf(_.a.shape({icon:_.a.oneOfType([_.a.string,_.a.element]),label:_.a.string.isRequired,onClick:_.a.func})).isRequired,className:_.a.string},Pu.defaultProps={isPrimary:!1,onClick:y.noop};var Fu=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props.className,t=x()("woocommerce-spinner",e);return Object(m.createElement)("svg",{className:t,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},Object(m.createElement)("circle",{className:"woocommerce-spinner__circle",fill:"none",strokeWidth:"5",strokeLinecap:"round",cx:"50",cy:"50",r:"30"}))}}]),t}();Fu.propTypes={className:_.a.string};var Tu=Fu,Iu=function(){return Object(m.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(m.createElement)("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"14",height:"12"},Object(m.createElement)("path",{d:"M6.59631 11.9062L3.46881 8.77875L2.40381 9.83625L6.59631 14.0287L15.5963 5.02875L14.5388 3.97125L6.59631 11.9062Z",fill:"white"})),Object(m.createElement)("g",{mask:"url(#mask0)"},Object(m.createElement)("rect",{width:"18",height:"18",fill:"white"})))},Nu=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.currentStep,r=e.steps,a=e.direction,o=e.isPending,i=r.findIndex(function(e){return n===e.key}),c=x()("woocommerce-stepper",t,{"is-vertical":"vertical"===a});return Object(m.createElement)("div",{className:c},r.map(function(e,t){var r=e.key,a=e.label,c=e.isComplete,s=x()("woocommerce-stepper__step",{"is-active":r===n,"is-complete":void 0!==c?c:i>t}),l=n===r&&o?Object(m.createElement)(Tu,null):Object(m.createElement)("div",{className:"woocommerce-stepper__step-icon"},Object(m.createElement)("span",{className:"woocommerce-stepper__step-number"},t+1),Object(m.createElement)(Iu,null));return Object(m.createElement)(m.Fragment,{key:r},Object(m.createElement)("div",{className:s},l,Object(m.createElement)("span",{className:"woocommerce-stepper__step-label"},a)),Object(m.createElement)("div",{className:"woocommerce-stepper__step-divider"}))}))}}]),t}();Nu.propTypes={className:_.a.string,currentStep:_.a.string.isRequired,steps:_.a.arrayOf(_.a.shape({key:_.a.string.isRequired,label:_.a.string.isRequired,isComplete:_.a.bool})).isRequired,direction:_.a.oneOf(["horizontal","vertical"]),isPending:_.a.bool},Nu.defaultProps={direction:"horizontal",isPending:!1};function Au(e){return e<10?"has-".concat(e,"-items"):"has-10-items"}var Ru=function(e){var t=e.label,n=e.orientation,a=e.itemCount,o=e.items,i=Object(y.uniqueId)("woocommerce-summary-helptext-"),c=Au(a),s=x()("woocommerce-summary",r({},c,"horizontal"===n));return Object(m.createElement)(v.NavigableMenu,{"aria-label":t,"aria-describedby":i,orientation:n,stopNavigationEvents:!0},Object(m.createElement)("p",{id:i,className:"screen-reader-text"},Object(g.__)("List of data points available for filtering. Use arrow keys to cycle through the list. Click a data point for a detailed report.","woocommerce-admin")),Object(m.createElement)("ul",{className:s},o))};Ru.propTypes={label:_.a.string,orientation:_.a.oneOf(["vertical","horizontal"]).isRequired,items:_.a.node.isRequired,itemCount:_.a.number.isRequired};var Bu=Ru,Lu=function(e){var t=e.children,n=e.isDropdownBreakpoint,r=e.label,a=t({}),o=m.Children.count(a)||1,i=n?"vertical":"horizontal",c=Object(m.createElement)(Bu,{label:r,orientation:i,itemCount:o,items:a});if(!n||o<2)return c;var s=a.find(function(e){return!!e.props.selected});return s?Object(m.createElement)(v.Dropdown,{className:"woocommerce-summary",position:"bottom",headerTitle:r,renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(m.cloneElement)(s,{onToggle:n,isOpen:t})},renderContent:function(e){return Object(m.createElement)(Bu,{label:r,orientation:i,itemCount:o,items:t(e)})}}):c};Lu.propTypes={children:_.a.func.isRequired,label:_.a.string},Lu.defaultProps={label:Object(g.__)("Performance Indicators","woocommerce-admin")};Object(Lr.withViewportMatch)({isDropdownBreakpoint:"< large"})(Lu);var Uu=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e,t=this.props.isDropdownBreakpoint,n=t?1:this.props.numberOfItems,a=Au(n),o=x()("woocommerce-summary",(r(e={},a,!t),r(e,"is-placeholder",!0),e)),i=Object(y.range)(n).map(function(e){return Object(m.createElement)("li",{className:"woocommerce-summary__item-container is-placeholder",key:e},Object(m.createElement)("span",{className:"woocommerce-summary__item"},Object(m.createElement)("span",{className:"woocommerce-summary__item-label"}),Object(m.createElement)("span",{className:"woocommerce-summary__item-data"},Object(m.createElement)("span",{className:"woocommerce-summary__item-value"}),Object(m.createElement)("div",{className:"woocommerce-summary__item-delta"},Object(m.createElement)("span",{className:"woocommerce-summary__item-delta-value"}))),Object(m.createElement)("span",{className:"woocommerce-summary__item-prev-label"}),Object(m.createElement)("span",{className:"woocommerce-summary__item-prev-value"})))});return Object(m.createElement)("ul",{className:o,"aria-hidden":"true"},i)}}]),t}();Uu.propTypes={numberOfItems:_.a.number.isRequired},Uu.defaultProps={numberOfRows:5};Object(Lr.withViewportMatch)({isDropdownBreakpoint:"< large"})(Uu);var zu=function(e){var t,n=e.delta,r=e.href,a=e.isOpen,o=e.label,i=e.onToggle,c=e.prevLabel,s=e.prevValue,l=e.reverseTrend,u=e.selected,f=e.value,d=e.onLinkClickCallback,h=x()("woocommerce-summary__item-container",{"is-dropdown-button":i,"is-dropdown-expanded":a}),p=x()("woocommerce-summary__item",{"is-selected":u,"is-good-trend":l?n<0:n>0,"is-bad-trend":l?n>0:n<0}),b=n>0?"arrow-up":"arrow-down",w=n>0?Object(g.sprintf)(Object(g.__)("Up %d%% from %s","woocommerce-admin"),n,c):Object(g.sprintf)(Object(g.__)("Down %d%% from %s","woocommerce-admin"),Math.abs(n),c);n||(b="arrow-right",w=Object(g.sprintf)(Object(g.__)("No change from %s","woocommerce-admin"),c));var _={className:p,"aria-current":u?"page":null};if(i||r){var k=!!i;t=k?v.Button:_e,k?(_.onClick=i,_["aria-expanded"]=a):(_.href=r,_.role="menuitem",_.onClick=d)}else t="div";return Object(m.createElement)("li",{className:h},Object(m.createElement)(t,_,Object(m.createElement)("span",{className:"woocommerce-summary__item-label"},o),Object(m.createElement)("span",{className:"woocommerce-summary__item-data"},Object(m.createElement)("span",{className:"woocommerce-summary__item-value"},Object(y.isNil)(f)?Object(g.__)("N/A","woocommerce-admin"):f),Object(m.createElement)("div",{className:"woocommerce-summary__item-delta",role:"presentation","aria-label":w},Object(m.createElement)(E.a,{className:"woocommerce-summary__item-delta-icon",icon:b,size:18}),Object(m.createElement)("span",{className:"woocommerce-summary__item-delta-value"},Object(y.isNil)(n)?Object(g.__)("N/A","woocommerce-admin"):Object(g.sprintf)(Object(g.__)("%d%%","woocommerce-admin"),n)))),Object(m.createElement)("span",{className:"woocommerce-summary__item-prev-label"},c)," ",Object(m.createElement)("span",{className:"woocommerce-summary__item-prev-value"},Object(y.isNil)(s)?Object(g.__)("N/A","woocommerce-admin"):s),i?Object(m.createElement)(E.a,{className:"woocommerce-summary__toggle",icon:"chevron-down",size:24}):null))};zu.propTypes={delta:_.a.number,href:_.a.string,isOpen:_.a.bool,label:_.a.string.isRequired,onToggle:_.a.func,prevLabel:_.a.string,prevValue:_.a.oneOfType([_.a.number,_.a.string]),reverseTrend:_.a.bool,selected:_.a.bool,value:_.a.oneOfType([_.a.number,_.a.string]),onLinkClickCallback:_.a.func},zu.defaultProps={href:"",isOpen:!1,prevLabel:Object(g.__)("Previous Period:","woocommerce-admin"),reverseTrend:!1,selected:!1,onLinkClickCallback:y.noop};var Hu=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).state={tabIndex:null,isScrollable:!1},n.container=Object(m.createRef)(),n.sortBy=n.sortBy.bind(f(n)),n.updateTableShadow=n.updateTableShadow.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"componentDidMount",value:function(){var e=this.container.current,t=e.scrollWidth>e.clientWidth;this.setState({tabIndex:t?"0":null}),this.updateTableShadow(),window.addEventListener("resize",this.updateTableShadow)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateTableShadow)}},{key:"sortBy",value:function(e){var t=this,n=this.props,r=n.headers,a=n.query;return function(){var n=a.orderby||Object(y.get)(Object(y.find)(r,{defaultSort:!0}),"key",!1),o=a.order||Object(y.get)(Object(y.find)(r,{key:n}),"defaultOrder","desc"),i="desc";e===n&&(i="desc"===o?"asc":"desc"),t.props.onSort(e,i)}}},{key:"updateTableShadow",value:function(){var e=this.container.current,t=e.scrollWidth-e.scrollLeft<=e.offsetWidth;this.setState({isScrollable:!t})}},{key:"render",value:function(){var e=this,t=this.props,n=t.ariaHidden,r=t.caption,a=t.classNames,o=t.headers,i=t.instanceId,c=t.query,s=t.rowHeader,l=t.rows,u=this.state,f=u.isScrollable,d=u.tabIndex,h=x()("woocommerce-table__table",a,{"is-scrollable":f}),p=c.orderby||Object(y.get)(Object(y.find)(o,{defaultSort:!0}),"key",!1),b=c.order||Object(y.get)(Object(y.find)(o,{key:p}),"defaultOrder","desc");return Object(m.createElement)("div",{className:h,ref:this.container,tabIndex:d,"aria-hidden":n,"aria-labelledby":"caption-".concat(i),role:"group",onScroll:this.updateTableShadow},Object(m.createElement)("table",null,Object(m.createElement)("caption",{id:"caption-".concat(i),className:"woocommerce-table__caption screen-reader-text"},r,"0"===d&&Object(m.createElement)("small",null,Object(g.__)("(scroll to see more)","woocommerce-admin"))),Object(m.createElement)("tbody",null,Object(m.createElement)("tr",null,o.map(function(t,n){var r=t.cellClassName,a=t.isLeftAligned,o=t.isSortable,c=t.isNumeric,s=t.key,l=t.label,u=t.screenReaderLabel,f="header-".concat(i,"-").concat(n),d={className:x()("woocommerce-table__header",r,{"is-left-aligned":a,"is-sortable":o,"is-sorted":p===s,"is-numeric":c})};o&&(d["aria-sort"]="none",p===s&&(d["aria-sort"]="asc"===b?"ascending":"descending"));var h=p===s&&"asc"!==b?Object(g.sprintf)(Object(g.__)("Sort by %s in ascending order","woocommerce-admin"),u):Object(g.sprintf)(Object(g.__)("Sort by %s in descending order","woocommerce-admin"),u),y=Object(m.createElement)(m.Fragment,null,Object(m.createElement)("span",{"aria-hidden":Boolean(u)},l),u&&Object(m.createElement)("span",{className:"screen-reader-text"},u));return Object(m.createElement)("th",D({role:"columnheader",scope:"col",key:n},d),o?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.IconButton,{icon:p===s&&"asc"===b?Object(m.createElement)(E.a,{size:18,icon:"chevron-up"}):Object(m.createElement)(E.a,{size:18,icon:"chevron-down"}),"aria-describedby":f,onClick:e.sortBy(s),isDefault:!0},y),Object(m.createElement)("span",{className:"screen-reader-text",id:f},h)):y)})),l.map(function(e,t){return Object(m.createElement)("tr",{key:t},e.map(function(e,t){var n=o[t],r=n.cellClassName,a=n.isLeftAligned,i=n.isNumeric,c=s===t,l=c?"th":"td",u=x()("woocommerce-table__item",r,{"is-left-aligned":a,"is-numeric":i,"is-sorted":p===o[t].key});return Object(m.createElement)(l,{scope:c?"row":null,key:t,className:u},function(e){return e.display||null}(e))}))}))))}}]),t}();Hu.propTypes={ariaHidden:_.a.bool,caption:_.a.string.isRequired,className:_.a.string,headers:_.a.arrayOf(_.a.shape({defaultSort:_.a.bool,defaultOrder:_.a.string,isLeftAligned:_.a.bool,isNumeric:_.a.bool,isSortable:_.a.bool,key:_.a.string,label:_.a.node,required:_.a.bool,screenReaderLabel:_.a.string})),onSort:_.a.func,query:_.a.object,rows:_.a.arrayOf(_.a.arrayOf(_.a.shape({display:_.a.node,value:_.a.oneOfType([_.a.string,_.a.number,_.a.bool])}))).isRequired,rowHeader:_.a.oneOfType([_.a.number,_.a.bool])},Hu.defaultProps={ariaHidden:!1,headers:[],onSort:y.noop,query:{},rowHeader:0};var Vu=Object(Oe.withInstanceId)(Hu),qu=n(258);function Ku(e){return Array.isArray(e)?e.map(function(e){return e.label}).join(","):[]}function Wu(e){return Array.isArray(e)?e.map(function(e){return e.map(function(e){return void 0!==e.value&&null!==e.value?e.value.toString().replace(/,/g,""):""}).join(",")}).join("\n"):[]}var Yu=function(){return Object(m.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Object(m.createElement)("path",{d:"M18,9c-0.009,0-0.017,0.002-0.025,0.003C17.72,5.646,14.922,3,11.5,3C7.91,3,5,5.91,5,9.5c0,0.524,0.069,1.031,0.186,1.519 C5.123,11.016,5.064,11,5,11c-2.209,0-4,1.791-4,4c0,1.202,0.541,2.267,1.38,3h18.593C22.196,17.089,23,15.643,23,14 C23,11.239,20.761,9,18,9z M12,16l-4-5h3V8h2v3h3L12,16z"}))},Gu=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.numberOfRows,r=he(t,["numberOfRows"]),a=Object(y.range)(n).map(function(){return e.props.headers.map(function(){return{display:Object(m.createElement)("span",{className:"is-placeholder"})}})});return Object(m.createElement)(Vu,D({ariaHidden:!0,classNames:"is-loading",rows:a},r))}}]),t}();Gu.propTypes={query:_.a.object,caption:_.a.string.isRequired,headers:_.a.arrayOf(_.a.shape({hiddenByDefault:_.a.bool,defaultSort:_.a.bool,isSortable:_.a.bool,key:_.a.string,label:_.a.node,required:_.a.bool})),numberOfRows:_.a.number},Gu.defaultProps={numberOfRows:5};var $u=Gu,Xu=function(e){var t=e.data;return Object(m.createElement)("ul",{className:"woocommerce-table__summary"},t.map(function(e,t){var n=e.label,r=e.value;return Object(m.createElement)("li",{className:"woocommerce-table__summary-item",key:t},Object(m.createElement)("span",{className:"woocommerce-table__summary-value"},r),Object(m.createElement)("span",{className:"woocommerce-table__summary-label"},n))}))};Xu.propTypes={data:_.a.array};var Zu=Xu,Qu=function(e){function t(e){var n;i(this,t);var r=(n=d(this,h(t).call(this,e))).props,a=r.query,o=r.compareBy,c=n.getShowCols(e.headers),s=a.filter?ce(a[o]):[];return n.state={showCols:c,selectedRows:s},n.onColumnToggle=n.onColumnToggle.bind(f(n)),n.onClickDownload=n.onClickDownload.bind(f(n)),n.onCompare=n.onCompare.bind(f(n)),n.onPageChange=n.onPageChange.bind(f(n)),n.onSearch=n.onSearch.bind(f(n)),n.selectRow=n.selectRow.bind(f(n)),n.selectAllRows=n.selectAllRows.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"componentDidUpdate",value:function(e){var t=e.headers,n=e.query,r=this.props,a=r.compareBy,o=r.headers,i=r.onColumnsChange,c=r.query,s=this.state.showCols;if(c.filter||n.filter){var l=n.filter?ce(n[a]):[],u=c.filter?ce(c[a]):[];Object(y.isEqual)(l.sort(),u.sort())||this.setState({selectedRows:u})}if(Object(y.isEqual)(o,t)||this.setState({showCols:this.getShowCols(o)}),c.orderby!==n.orderby&&!s.includes(c.orderby)){var f=s.concat(c.orderby);this.setState({showCols:f}),i(f)}}},{key:"getShowCols",value:function(e){return e.map(function(e){var t=e.key;return!e.hiddenByDefault&&t}).filter(Boolean)}},{key:"getVisibleHeaders",value:function(){var e=this.props.headers,t=this.state.showCols;return e.filter(function(e){var n=e.key;return t.includes(n)})}},{key:"getVisibleRows",value:function(){var e=this.props,t=e.headers,n=e.rows,r=this.state.showCols;return n.map(function(e){return t.map(function(t,n){var a=t.key;return r.includes(a)&&e[n]}).filter(Boolean)})}},{key:"onColumnToggle",value:function(e){var t=this,n=this.props,r=n.headers,a=n.query,i=n.onQueryChange,c=n.onColumnsChange;return function(){t.setState(function(t){if(t.showCols.includes(e)){if(a.orderby===e){var n=Object(y.find)(r,{defaultSort:!0})||Object(y.first)(r)||{};i("sort")(n.key,"desc")}var s=Object(y.without)(t.showCols,e);return c(s),{showCols:s}}var l=[].concat(o(t.showCols),[e]);return c(l),{showCols:l}})}}},{key:"onClickDownload",value:function(){var e,t,n,r,a,o=this.props,i=o.query,c=o.onClickDownload,s=o.searchBy,l=o.title,u=Object.assign({},i);delete u.extended_info,u.search&&delete u[s],e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[e.toLowerCase().replace(/[^a-z0-9]/g,"-"),ht()().format("YYYY-MM-DD"),Object.keys(t).map(function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"-")+"-"+decodeURIComponent(t[e]).toLowerCase().replace(/[^a-z0-9]/g,"-")}).join("_")].filter(function(e){return e.length}).join("_")+".csv"}(l,u),r=this.getVisibleHeaders(),a=this.getVisibleRows(),t=[Ku(r),Wu(a)].filter(function(e){return e.length}).join("\n"),n=new Blob([t],{type:"text/csv;charset=utf-8"}),Object(qu.saveAs)(n,e),c&&c()}},{key:"onCompare",value:function(){var e=this.props,t=e.compareBy,n=e.compareParam,r=e.onQueryChange,a=this.state.selectedRows;t&&r("compare")(t,n,a.join(","))}},{key:"onPageChange",value:function(){var e=this.props,t=e.onPageChange,n=e.onQueryChange;t&&t.apply(void 0,arguments),n&&n("page").apply(void 0,arguments)}},{key:"onSearch",value:function(e){var t,n=this.props,o=n.compareParam,i=n.searchBy,c=n.baseSearchQuery,s=e.map(function(e){return e.label.replace(",","%2C")});s.length?ue(a((r(t={filter:void 0},o,void 0),r(t,i,void 0),t),c,{search:Object(y.uniq)(s).join(",")})):ue({search:void 0})}},{key:"selectAllRows",value:function(e){var t=this.props.ids;e.target.checked?this.setState({selectedRows:t}):this.setState({selectedRows:[]})}},{key:"selectRow",value:function(e,t){var n=this.props.ids;t.target.checked?this.setState(function(t){var r=t.selectedRows;return{selectedRows:Object(y.uniq)([n[e]].concat(o(r)))}}):this.setState(function(t){var r=t.selectedRows,a=r.indexOf(n[e]);return{selectedRows:[].concat(o(r.slice(0,a)),o(r.slice(a+1)))}})}},{key:"getCheckbox",value:function(e){var t=this.props.ids,n=void 0===t?[]:t,r=-1!==this.state.selectedRows.indexOf(n[e]);return{display:Object(m.createElement)("input",{type:"checkbox",onChange:Object(y.partial)(this.selectRow,e),checked:r}),value:!1}}},{key:"getAllCheckbox",value:function(){var e=this.props.ids,t=void 0===e?[]:e,n=this.state.selectedRows,r=t.length>0&&t.length===n.length;return{cellClassName:"is-checkbox-column",label:Object(m.createElement)("input",{type:"checkbox",onChange:this.selectAllRows,"aria-label":Object(g.__)("Select All"),checked:r}),required:!0}}},{key:"render",value:function(){var e=this,t=this.props,n=t.compareBy,r=t.downloadable,a=t.labels,i=void 0===a?{}:a,c=t.isLoading,s=t.onClickDownload,l=t.onQueryChange,f=t.query,d=t.rowHeader,h=t.rowsPerPage,p=t.searchBy,b=t.showMenu,y=t.summary,w=t.title,_=t.totalRows,k=this.state,E=k.selectedRows,S=k.showCols,O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le();if("object"!==u(e))throw new Error("Invalid parameter passed to getSearchWords, it expects an object or no parameters.");var t=e.search;if(!t)return[];if("string"!=typeof t)throw new Error("Invalid 'search' type. getSearchWords expects query's 'search' property to be a string.");return t.split(",").map(function(e){return e.replace("%2C",",")})}(f).map(function(e){return{id:e,label:e}}),M=this.props.headers,C=this.getVisibleHeaders(),D=this.getVisibleRows();n&&(D=D.map(function(t,n){return[e.getCheckbox(n)].concat(o(t))}),C=[this.getAllCheckbox()].concat(o(C)));var j=x()("woocommerce-analytics__card",{"woocommerce-table":!0,"has-compare":!!n,"has-search":!!p});return Object(m.createElement)(ye,{className:j,title:w,action:[n&&Object(m.createElement)(Ml,{key:"compare",className:"woocommerce-table__compare",count:E.length,helpText:i.helpText||Object(g.__)("Check at least two items below to compare","woocommerce-admin"),onClick:this.onCompare},i.compareButton||Object(g.__)("Compare","woocommerce-admin")),p&&Object(m.createElement)(nt,{allowFreeTextSearch:!0,inlineTags:!0,key:"search",onChange:this.onSearch,placeholder:i.placeholder||Object(g.__)("Search by item name","woocommerce-admin"),selected:O,showClearButton:!0,type:p}),(r||s)&&Object(m.createElement)(v.IconButton,{key:"download",className:"woocommerce-table__download-button",disabled:c,onClick:this.onClickDownload,isLink:!0},Object(m.createElement)(Yu,null),Object(m.createElement)("span",{className:"woocommerce-table__download-button__label"},i.downloadButton||Object(g.__)("Download","woocommerce-admin")))],menu:b&&Object(m.createElement)(de,{label:Object(g.__)("Choose which values to display","woocommerce-admin"),renderContent:function(){return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(lu,null,Object(g.__)("Columns:","woocommerce-admin")),M.map(function(t){var n=t.key,r=t.label;return t.required?null:Object(m.createElement)(cu,{checked:S.includes(n),isCheckbox:!0,isClickable:!0,key:n,onInvoke:e.onColumnToggle(n)},r)}))}})},c?Object(m.createElement)(m.Fragment,null,Object(m.createElement)("span",{className:"screen-reader-text"},Object(g.__)("Your requested data is loading","woocommerce-admin")),Object(m.createElement)($u,{numberOfRows:h,headers:C,rowHeader:d,caption:w,query:f,onSort:l("sort")})):Object(m.createElement)(Vu,{rows:D,headers:C,rowHeader:d,caption:w,query:f,onSort:l("sort")}),Object(m.createElement)(hu,{key:parseInt(f.page)||1,page:parseInt(f.page)||1,perPage:h,total:_,onPageChange:this.onPageChange,onPerPageChange:l("per_page")}),y&&Object(m.createElement)(Zu,{data:y}))}}]),t}();Qu.propTypes={compareBy:_.a.string,compareParam:_.a.string,headers:_.a.arrayOf(_.a.shape({hiddenByDefault:_.a.bool,defaultSort:_.a.bool,isSortable:_.a.bool,key:_.a.string,label:_.a.string,required:_.a.bool})),labels:_.a.shape({compareButton:_.a.string,downloadButton:_.a.string,helpText:_.a.string,placeholder:_.a.string}),ids:_.a.arrayOf(_.a.number),isLoading:_.a.bool,onQueryChange:_.a.func,onColumnsChange:_.a.func,downloadable:_.a.bool,onClickDownload:_.a.func,query:_.a.object,rowHeader:_.a.oneOfType([_.a.number,_.a.bool]),rows:_.a.arrayOf(_.a.arrayOf(_.a.shape({display:_.a.node,value:_.a.oneOfType([_.a.string,_.a.number,_.a.bool])}))).isRequired,rowsPerPage:_.a.number.isRequired,searchBy:_.a.string,showMenu:_.a.bool,summary:_.a.arrayOf(_.a.shape({label:_.a.node,value:_.a.oneOfType([_.a.string,_.a.number])})),title:_.a.string.isRequired,totalRows:_.a.number.isRequired,baseSearchQuery:_.a.object},Qu.defaultProps={compareParam:"filter",downloadable:!1,isLoading:!1,onQueryChange:y.noop,onColumnsChange:y.noop,query:{},rowHeader:0,rows:[],showMenu:!0,baseSearchQuery:{}};var Ju=function(e){var t=e.children,n=e.numberOfRows;return Object(m.createElement)("div",{className:"woocommerce-table is-empty",style:{"--number-of-rows":n}},t)};Ju.propTypes={numberOfRows:_.a.number},Ju.defaultProps={numberOfRows:5};n(46);var ef=function(e){var t=e.items;return Object(m.createElement)(et,{className:"woocommerce-view-more-list",label:Object(g.sprintf)(Object(g.__)("+%d more","woocommerce-admin"),t.length-1),popoverContents:Object(m.createElement)("ul",{className:"woocommerce-view-more-list__popover"},t.map(function(e,t){return Object(m.createElement)("li",{key:t,className:"woocommerce-view-more-list__popover__item"},e)}))})};ef.propTypes={items:_.a.arrayOf(_.a.node)},ef.defaultProps={items:[]};n.d(t,"a",function(){return Du}),n.d(t,"b",function(){return Mu})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a=function(){function e(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(11),i=s(o),c=s(n(4));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e,t){return 0<=t.indexOf(e)},u=function(e){return 0==e%18},f=["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle","gridicons-reader-follow","gridicons-reader-following"],d=["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"],h=["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"],p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent),a(t,[{key:"render",value:function(){var e=this.props,t=e.size,n=e.onClick,a=e.icon,o=e.className,c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s="gridicons-"+a,p=void 0,b=["gridicon",s,o,!!(l(s,f)&&u(t))&&"needs-offset",!!(l(s,d)&&u(t))&&"needs-offset-x",!!(l(s,h)&&u(t))&&"needs-offset-y"].filter(Boolean).join(" ");switch(s){default:p=i.default.createElement("svg",r({height:t,width:t},c));break;case"gridicons-add-image":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-bell":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M14 15h-4v-2H2v6c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2v-6h-8v2zm6-9h-2V4c0-1.105-.895-2-2-2H8c-1.105 0-2 .895-2 2v2H4c-1.105 0-2 .895-2 2v4h20V8c0-1.105-.895-2-2-2zm-4 0H8V4h8v2z"})));break;case"gridicons-bug":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18 14h4v-2h-4v-2h1a2 2 0 0 0 2-2V6h-2v2H5V6H3v2a2 2 0 0 0 2 2h1v2H2v2h4v1a6 6 0 0 0 .09 1H5a2 2 0 0 0-2 2v2h2v-2h1.81A6 6 0 0 0 11 20.91V10h2v10.91A6 6 0 0 0 17.19 18H19v2h2v-2a2 2 0 0 0-2-2h-1.09a6 6 0 0 0 .09-1zM12 2a4 4 0 0 0-4 4h8a4 4 0 0 0-4-4z"})));break;case"gridicons-calendar":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-caption":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 15l2-2v5c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h13l-2 2H4v12h16v-3zm2.44-8.56l-.88-.88c-.586-.585-1.534-.585-2.12 0L12 13v2H6v2h9v-1l7.44-7.44c.585-.586.585-1.534 0-2.12z"})));break;case"gridicons-cart":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-chat":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M3 12c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H9v3l-3-3H3zM21 18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-6v1c0 2.2-1.8 4-4 4v2c0 1.1.9 2 2 2h2v3l3-3h3z"})));break;case"gridicons-checkmark-circle":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})));break;case"gridicons-cloud":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M23 12l-5.45 6.5L16 17.21 20.39 12 16 6.79l1.55-1.29zM8 6.79L6.45 5.5 1 12l5.45 6.5L8 17.21 3.61 12zm.45 14.61l1.93.52L15.55 2.6l-1.93-.52z"})));break;case"gridicons-cog":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 16l-5 5v-5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v9c0 1.1-.9 2-2 2h-7z"})));break;case"gridicons-computer":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-coupon":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M13 16v2h-2v-2h2zm3-3h2v-2h-2v2zm2 8h-2v2h2v-2zm3-5v2h2v-2h-2zm-1-3c.552 0 1 .448 1 1h2c0-1.657-1.343-3-3-3v2zm1 7c0 .552-.448 1-1 1v2c1.657 0 3-1.343 3-3h-2zm-7 1c-.552 0-1-.448-1-1h-2c0 1.657 1.343 3 3 3v-2zm3.21-5.21c-.78.78-2.047.782-2.828.002l-.002-.002L10 11.41l-1.43 1.44c.28.506.427 1.073.43 1.65C9 16.433 7.433 18 5.5 18S2 16.433 2 14.5 3.567 11 5.5 11c.577.003 1.144.15 1.65.43L8.59 10 7.15 8.57c-.506.28-1.073.427-1.65.43C3.567 9 2 7.433 2 5.5S3.567 2 5.5 2 9 3.567 9 5.5c-.003.577-.15 1.144-.43 1.65L10 8.59l3.88-3.88c.78-.78 2.047-.782 2.828-.002l.002.002-5.3 5.29 5.8 5.79zM5.5 7C6.328 7 7 6.328 7 5.5S6.328 4 5.5 4 4 4.672 4 5.5 4.672 7 5.5 7zM7 14.5c0-.828-.672-1.5-1.5-1.5S4 13.672 4 14.5 4.672 16 5.5 16 7 15.328 7 14.5z"})));break;case"gridicons-create":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"}),i.default.createElement("path",{d:"M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"})));break;case"gridicons-credit-card":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-circle":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})));break;case"gridicons-cross-small":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"})));break;case"gridicons-custom-post-type":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-domains":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm6.918 6h-3.215c-.188-1.424-.42-2.65-.565-3.357 1.593.682 2.916 1.87 3.78 3.357zm-5.904-3.928c.068.352.387 2.038.645 3.928h-3.32c.26-1.89.578-3.576.646-3.928C11.32 4.03 11.656 4 12 4s.68.03 1.014.072zM14 12c0 .598-.043 1.286-.11 2h-3.78c-.067-.714-.11-1.402-.11-2s.043-1.286.11-2h3.78c.067.714.11 1.402.11 2zM8.862 4.643C8.717 5.35 8.485 6.576 8.297 8H5.082c.864-1.487 2.187-2.675 3.78-3.357zM4.262 10h3.822c-.05.668-.084 1.344-.084 2s.033 1.332.085 2H4.263C4.097 13.36 4 12.692 4 12s.098-1.36.263-2zm.82 6h3.215c.188 1.424.42 2.65.565 3.357-1.593-.682-2.916-1.87-3.78-3.357zm5.904 3.928c-.068-.353-.388-2.038-.645-3.928h3.32c-.26 1.89-.578 3.576-.646 3.928-.333.043-.67.072-1.014.072s-.68-.03-1.014-.072zm4.152-.57c.145-.708.377-1.934.565-3.358h3.215c-.864 1.487-2.187 2.675-3.78 3.357zm4.6-5.358h-3.822c.05-.668.084-1.344.084-2s-.033-1.332-.085-2h3.82c.167.64.265 1.308.265 2s-.097 1.36-.263 2z"})));break;case"gridicons-dropdown":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis-circle":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM7.5 13.5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5S9 11.2 9 12s-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z"})));break;case"gridicons-ellipsis":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-filter":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"})));break;case"gridicons-flag":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-fullscreen-exit":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M14 10V4h2v2.59l3.29-3.29 1.41 1.41L17.41 8H20v2zM4 10V8h2.59l-3.3-3.29 1.42-1.42L8 6.59V4h2v6zm16 4v2h-2.59l3.29 3.29-1.41 1.41L16 17.41V20h-2v-6zm-10 0v6H8v-2.59l-3.29 3.3-1.42-1.42L6.59 16H4v-2z"})));break;case"gridicons-fullscreen":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})));break;case"gridicons-gift":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M22 6h-4.8c.5-.5.8-1.2.8-2 0-1.7-1.3-3-3-3s-3 1.3-3 3c0-1.7-1.3-3-3-3S6 2.3 6 4c0 .8.3 1.5.8 2H2v6h1v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h1V6zm-2 4h-7V8h7v2zm-5-7c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM9 3c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM4 8h7v2H4V8zm1 4h6v8H5v-8zm14 8h-6v-8h6v8z"})));break;case"gridicons-globe":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading-h1":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M11 7h2v10h-2v-4H7v4H5V7h2v4h4V7zm6.57 0c-.594.95-1.504 1.658-2.57 2v1h2v7h2V7h-1.43z"})));break;case"gridicons-heading-h2":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M9 7h2v10H9v-4H5v4H3V7h2v4h4V7zm8 8c.51-.41.6-.62 1.06-1.05.437-.4.848-.828 1.23-1.28.334-.39.62-.82.85-1.28.2-.39.305-.822.31-1.26.005-.44-.087-.878-.27-1.28-.177-.385-.437-.726-.76-1-.346-.283-.743-.497-1.17-.63-.485-.153-.99-.227-1.5-.22-.36 0-.717.033-1.07.1-.343.06-.678.158-1 .29-.304.13-.593.295-.86.49-.287.21-.56.437-.82.68l1.24 1.22c.308-.268.643-.502 1-.7.35-.2.747-.304 1.15-.3.455-.03.906.106 1.27.38.31.278.477.684.45 1.1-.014.396-.14.78-.36 1.11-.285.453-.62.872-1 1.25-.44.43-.98.92-1.59 1.43-.61.51-1.41 1.06-2.16 1.65V17h8v-2h-4z"})));break;case"gridicons-heading-h3":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M14.11 14.218c.355.287.75.523 1.17.7.434.18.9.273 1.37.27.484.017.965-.086 1.4-.3.333-.146.55-.476.55-.84.003-.203-.05-.403-.15-.58-.123-.19-.3-.34-.51-.43-.32-.137-.655-.228-1-.27-.503-.073-1.012-.106-1.52-.1v-1.57c.742.052 1.485-.07 2.17-.36.37-.164.615-.525.63-.93.026-.318-.12-.627-.38-.81-.34-.203-.734-.3-1.13-.28-.395.013-.784.108-1.14.28-.375.167-.73.375-1.06.62l-1.22-1.39c.5-.377 1.053-.68 1.64-.9.608-.224 1.252-.336 1.9-.33.525-.007 1.05.05 1.56.17.43.1.84.277 1.21.52.325.21.595.495.79.83.19.342.287.73.28 1.12.01.48-.177.943-.52 1.28-.417.39-.916.685-1.46.86v.06c.61.14 1.175.425 1.65.83.437.382.68.94.66 1.52.005.42-.113.835-.34 1.19-.23.357-.538.657-.9.88-.408.253-.853.44-1.32.55-.514.128-1.04.192-1.57.19-.786.02-1.57-.106-2.31-.37-.59-.214-1.126-.556-1.57-1l1.12-1.41zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})));break;case"gridicons-heading-h4":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm10-2h-1v2h-2v-2h-5v-2l4.05-6H20v6h1v2zm-3-2V9l-2.79 4H18z"})));break;case"gridicons-heading-h5":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M14.09 14.19c.352.27.73.5 1.13.69.42.196.877.296 1.34.29.51.014 1.01-.125 1.44-.4.378-.253.594-.686.57-1.14.02-.45-.197-.877-.57-1.13-.406-.274-.89-.41-1.38-.39h-.47c-.135.014-.27.04-.4.08l-.41.15-.48.23-1.02-.57.28-5h6.4v1.92h-4.31L16 10.76c.222-.077.45-.138.68-.18.235-.037.472-.054.71-.05.463-.004.924.057 1.37.18.41.115.798.305 1.14.56.33.248.597.57.78.94.212.422.322.888.32 1.36.007.497-.11.99-.34 1.43-.224.417-.534.782-.91 1.07-.393.3-.837.527-1.31.67-.497.164-1.016.252-1.54.26-.788.023-1.573-.11-2.31-.39-.584-.238-1.122-.577-1.59-1l1.09-1.42zM11 17H9v-4H5v4H3V7h2v4h4V7h2v10z"})));break;case"gridicons-heading-h6":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm8.58-7.508c-.248-.204-.524-.37-.82-.49-.625-.242-1.317-.242-1.94 0-.3.11-.566.287-.78.52-.245.27-.432.586-.55.93-.16.46-.243.943-.25 1.43.367-.33.79-.59 1.25-.77.405-.17.84-.262 1.28-.27.415-.006.83.048 1.23.16.364.118.704.304 1 .55.295.253.528.57.68.93.193.403.302.843.32 1.29.01.468-.094.93-.3 1.35-.206.387-.49.727-.83 1-.357.287-.764.504-1.2.64-.98.31-2.033.293-3-.05-.507-.182-.968-.472-1.35-.85-.437-.416-.778-.92-1-1.48-.243-.693-.352-1.426-.32-2.16-.02-.797.11-1.59.38-2.34.215-.604.556-1.156 1-1.62.406-.416.897-.74 1.44-.95.54-.21 1.118-.314 1.7-.31.682-.02 1.36.096 2 .34.5.19.962.464 1.37.81l-1.31 1.34zm-2.39 5.84c.202 0 .405-.03.6-.09.183-.046.356-.128.51-.24.15-.136.27-.303.35-.49.092-.225.136-.467.13-.71.037-.405-.123-.804-.43-1.07-.328-.23-.72-.347-1.12-.33-.346-.002-.687.07-1 .21-.383.17-.724.418-1 .73.046.346.143.683.29 1 .108.23.257.44.44.62.152.15.337.26.54.33.225.055.46.068.69.04z"})));break;case"gridicons-heading":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 8c0-2.21-1.79-4-4-4s-4 1.79-4 4h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2c-.552 0-1 .448-1 1v2h2v-1.14c1.722-.447 3-1.998 3-3.86zm-3 6h-2v2h2v-2z"})));break;case"gridicons-help":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 16h-2v-2h2v2zm0-4.14V15h-2v-2c0-.552.448-1 1-1 1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.862-1.278 3.413-3 3.86z"})));break;case"gridicons-history":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),i.default.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image-remove":p=i.default.createElement("svg",r({className:b,height:t,width:t,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),i.default.createElement("g",null,i.default.createElement("path",{d:"M20.587 3.423L22 4.837 20 6.84V18c0 1.105-.895 2-2 2H6.84l-2.007 2.006-1.414-1.414 17.167-17.17zM12.42 14.42l1 1 1-1c.63-.504 1.536-.456 2.11.11L18 16V8.84l-5.58 5.58zM15.16 6H6v6.38l2.
|