Full Site Editing - Version 1.4

Version Description

  • Update Premium Block Style and Behaviour
  • Support for Premium Content in email subscription and reader.
  • Add plugin to notify users of Block Patterns new location.
  • Add default link colors to the editor.
Download this release

Release Info

Developer jonsurrell
Plugin Icon wp plugin Full Site Editing
Version 1.4
Comparing to
See all releases

Code changes from version 1.3 to 1.4

Files changed (30) hide show
  1. common/dist/common.asset.php +1 -1
  2. common/dist/common.js +1 -1
  3. common/gutenberg-8.0.0-editor-styles.css +1 -0
  4. common/index.js +60 -0
  5. common/index.php +63 -1
  6. full-site-editing-plugin.php +2 -2
  7. global-styles/dist/global-styles.asset.php +1 -1
  8. global-styles/dist/global-styles.js +1 -1
  9. global-styles/src/dom-updater.js +1 -1
  10. premium-content/blocks/container/controls.js +7 -8
  11. premium-content/blocks/container/edit.js +36 -10
  12. premium-content/blocks/container/index.js +69 -0
  13. premium-content/blocks/container/inspector.js +6 -109
  14. premium-content/blocks/container/plan.js +15 -2
  15. premium-content/blocks/subscriber-view/edit.js +3 -0
  16. premium-content/dist/premium-content.asset.php +1 -1
  17. premium-content/dist/premium-content.js +22 -2
  18. premium-content/editor.css +6 -7
  19. premium-content/premium-content.php +6 -0
  20. premium-content/subscription-service/class-token-subscription-service.php +1 -1
  21. premium-content/subscription-service/class-wpcom-offline-subscription-service.php +67 -0
  22. premium-content/subscription-service/include.php +1 -0
  23. readme.txt +7 -1
  24. wpcom-block-editor-nux/dist/images/block-8609c325d8398aa551a1886601e194a8.svg +0 -14
  25. wpcom-block-editor-nux/dist/images/preview-e6daa84607b30e4c63a60423a8989e1a.svg +16 -0
  26. wpcom-block-editor-nux/dist/images/private-598e2a26fcb0c685d165d750fdf02364.svg +26 -0
  27. wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php +1 -1
  28. wpcom-block-editor-nux/dist/wpcom-block-editor-nux.js +1 -1
  29. wpcom-block-editor-nux/src/images/preview.svg +16 -0
  30. wpcom-block-editor-nux/src/wpcom-nux.js +57 -54
common/dist/common.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'f4a7961ae4443a3a457a3914c25c2c35');
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '041749c26ec6c1da6650dc57aa2b4845');
common/dist/common.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);n(1)},function(e,t,n){}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(3),i=n(1),c=Object(r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(i.Path,{d:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"})),l=Object(r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(i.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),u=n(2),a=n(5),s=n(4),f=n(6);n(7);void 0!==f.__experimentalLibrary&&Object(a.registerPlugin)("block-patterns-moved",{render:function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.PluginSidebarMoreMenuItem,{icon:c,target:"block-patterns-moved"},Object(u.__)("Block Patterns","full-site-editing")),Object(r.createElement)(o.PluginSidebar,{icon:c,name:"block-patterns-moved",title:Object(u.__)("Block Patterns","full-site-editing"),className:"common__block-patterns-moved"},Object(r.createElement)(s.PanelBody,null,Object(r.createElement)("h2",null,Object(u.__)("Block Patterns","full-site-editing")),Object(r.createElement)("p",null,Object(u.__)('Block Patterns have moved. You can now find them in the block inserter under the "patterns" tab.',"full-site-editing")),Object(r.createElement)("p",null,Object(u.__)("The block inserter can be found in the top-left corner of your screen by selecting the following icon:","full-site-editing")),Object(r.createElement)(s.Button,{isPrimary:!0,icon:l,onClick:function(){var e=document.querySelector(".edit-post-header-toolbar__inserter-toggle");e&&e.click(),setTimeout((function(){var e=document.querySelector('.block-editor-inserter__tabs [id$="patterns"]');e&&e.click()}),300)}}))))}})}]));
common/gutenberg-8.0.0-editor-styles.css ADDED
@@ -0,0 +1 @@
 
1
+ body{font-family:"Noto Serif",serif;font-size:16px;line-height:1.8;color:#1e1e1e}h1{font-size:2.44em}h2{font-size:1.95em}h3{font-size:1.56em}h4{font-size:1.25em}h5{font-size:1em}h6{font-size:.8em}h1,h2,h3{line-height:1.4}h4{line-height:1.5}h1{margin-top:.67em;margin-bottom:.67em}h2{margin-top:.83em;margin-bottom:.83em}h3{margin-top:1em;margin-bottom:1em}h4{margin-top:1.33em;margin-bottom:1.33em}h5{margin-top:1.67em;margin-bottom:1.67em}h6{margin-top:2.33em;margin-bottom:2.33em}h1,h2,h3,h4,h5,h6{color:inherit}p{font-size:inherit;line-height:inherit;margin-top:28px}ol,p,ul{margin-bottom:28px}ol,ul{padding:inherit;padding-left:1.3em;margin-left:1.3em}ol li,ol ol,ol ul,ul li,ul ol,ul ul{margin-bottom:0}ul{list-style-type:disc}ol{list-style-type:decimal}ol ul,ul ul{list-style-type:circle}.wp-align-wrapper{max-width:580px}.wp-align-wrapper.wp-align-full,.wp-align-wrapper>.wp-block{max-width:none}.wp-align-wrapper.wp-align-wide{max-width:1100px}a{transition:none}code,kbd{padding:0;margin:0;background:inherit;font-size:inherit;font-family:monospace}
common/index.js CHANGED
@@ -1,4 +1,64 @@
 
 
 
 
 
 
 
 
 
 
1
  /**
2
  * Internal dependencies
3
  */
4
  import './index.scss';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
5
+ import { layout, plus } from '@wordpress/icons';
6
+ import { __ } from '@wordpress/i18n';
7
+ import { registerPlugin } from '@wordpress/plugins';
8
+ import { PanelBody, Button } from '@wordpress/components';
9
+ import { __experimentalLibrary } from '@wordpress/block-editor';
10
+
11
  /**
12
  * Internal dependencies
13
  */
14
  import './index.scss';
15
+
16
+ const BlockPatternsMoved = () => {
17
+ const openInserter = () => {
18
+ const inserterButton = document.querySelector( '.edit-post-header-toolbar__inserter-toggle' );
19
+ inserterButton && inserterButton.click();
20
+ setTimeout( () => {
21
+ const patternsButton = document.querySelector(
22
+ '.block-editor-inserter__tabs [id$="patterns"]'
23
+ );
24
+ patternsButton && patternsButton.click();
25
+ }, 300 );
26
+ };
27
+
28
+ return (
29
+ <>
30
+ <PluginSidebarMoreMenuItem icon={ layout } target="block-patterns-moved">
31
+ { __( 'Block Patterns', 'full-site-editing' ) }
32
+ </PluginSidebarMoreMenuItem>
33
+ <PluginSidebar
34
+ icon={ layout }
35
+ name={ 'block-patterns-moved' }
36
+ title={ __( 'Block Patterns', 'full-site-editing' ) }
37
+ className="common__block-patterns-moved"
38
+ >
39
+ <PanelBody>
40
+ <h2>{ __( 'Block Patterns', 'full-site-editing' ) }</h2>
41
+ <p>
42
+ { __(
43
+ 'Block Patterns have moved. You can now find them in the block inserter under the "patterns" tab.',
44
+ 'full-site-editing'
45
+ ) }
46
+ </p>
47
+ <p>
48
+ { __(
49
+ 'The block inserter can be found in the top-left corner of your screen by selecting the following icon:',
50
+ 'full-site-editing'
51
+ ) }
52
+ </p>
53
+ <Button isPrimary icon={ plus } onClick={ openInserter } />
54
+ </PanelBody>
55
+ </PluginSidebar>
56
+ </>
57
+ );
58
+ };
59
+
60
+ // Gutenberg 8 includes `Library` as `@wordpres/block-editor` experimental export.
61
+ // The experimental Library component contains the patterns in their new location.
62
+ if ( typeof __experimentalLibrary !== 'undefined' ) {
63
+ registerPlugin( 'block-patterns-moved', { render: BlockPatternsMoved } );
64
+ }
common/index.php CHANGED
@@ -10,6 +10,7 @@
10
  */
11
 
12
  namespace A8C\FSE\Common;
 
13
 
14
  /**
15
  * Can be used to determine if the current screen is the block editor.
@@ -52,7 +53,8 @@ function is_homepage_title_hidden() {
52
  * @return bool True if the common module assets should be loaded.
53
  */
54
  function should_load_assets() {
55
- return (bool) is_homepage_title_hidden();
 
56
  }
57
 
58
  /**
@@ -100,3 +102,63 @@ function enqueue_script_and_style() {
100
  );
101
  }
102
  add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_script_and_style' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  */
11
 
12
  namespace A8C\FSE\Common;
13
+ use function A8C\FSE\is_full_site_editing_active;
14
 
15
  /**
16
  * Can be used to determine if the current screen is the block editor.
53
  * @return bool True if the common module assets should be loaded.
54
  */
55
  function should_load_assets() {
56
+ // TODO - remove is_F_S_E check when we remove the "block patterns moved" notice plugin.
57
+ return (bool) is_homepage_title_hidden() || ! is_full_site_editing_active();
58
  }
59
 
60
  /**
102
  );
103
  }
104
  add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_script_and_style' );
105
+
106
+ /**
107
+ * Inject editor styles
108
+ *
109
+ * @param array $settings Editor settings.
110
+ * @return array $settings Editor settings.
111
+ */
112
+ function append_gutenberg_editor_styles( $settings ) {
113
+ if ( ! function_exists( 'gutenberg_dir_path' ) ) {
114
+ return $settings;
115
+ }
116
+
117
+ // If Gutenberg hasn't enqueued styles, we don't need to add any.
118
+ if ( empty( $settings['styles'] ) ) {
119
+ return $settings;
120
+ }
121
+
122
+ // Check Gutenberg version.
123
+ $gutenberg_version = null;
124
+ $gutenberg_plugin_data = get_plugin_data( gutenberg_dir_path() . 'gutenberg.php' );
125
+ if ( isset( $gutenberg_plugin_data['Version'] ) ) {
126
+ $gutenberg_version = $gutenberg_plugin_data['Version'];
127
+ }
128
+
129
+ /**
130
+ * Replace Gutenberg 8.0.0 editor styles.
131
+ *
132
+ * Find and replace the Gutenberg 8.0.0 editor styles with our patched version.
133
+ *
134
+ * @see
135
+ * - https://github.com/Automattic/wp-calypso/issues/41844
136
+ * - https://github.com/WordPress/gutenberg/issues/22139
137
+ * - https://github.com/WordPress/gutenberg/pull/22160
138
+ * - https://github.com/WordPress/gutenberg/blob/c9ce32fb147b864d7f1d15df8ede97699ded4e91/lib/client-assets.php#L563-L622
139
+ */
140
+ if ( '8.0.0' === $gutenberg_version ) {
141
+ if ( empty( $settings['styles'] ) ) {
142
+ return $settings;
143
+ }
144
+
145
+ $editor_styles_file = gutenberg_dir_path() . 'build/editor/editor-styles.css';
146
+ $replacement_styles_file = plugin_dir_path( __FILE__ ) . 'gutenberg-8.0.0-editor-styles.css';
147
+ if ( ! file_exists( $editor_styles_file ) || ! file_exists( $replacement_styles_file ) ) {
148
+ return $settings;
149
+ }
150
+
151
+ $gutenberg_editor_styles = file_get_contents( $editor_styles_file );
152
+ $replacement_styles = file_get_contents( $replacement_styles_file );
153
+
154
+ foreach ( $settings['styles'] as $k => $_ ) {
155
+ if ( isset( $settings['styles'][ $k ]['css'] ) && $settings['styles'][ $k ]['css'] === $gutenberg_editor_styles ) {
156
+ $settings['styles'][ $k ]['css'] = $replacement_styles;
157
+ break;
158
+ }
159
+ }
160
+ }
161
+
162
+ return $settings;
163
+ }
164
+ add_action( 'block_editor_settings', __NAMESPACE__ . '\append_gutenberg_editor_styles', 11 );
full-site-editing-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
- * Version: 1.3
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
@@ -35,7 +35,7 @@ namespace A8C\FSE;
35
  *
36
  * @var string
37
  */
38
- define( 'PLUGIN_VERSION', '1.3' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 1.4
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
35
  *
36
  * @var string
37
  */
38
+ define( 'PLUGIN_VERSION', '1.4' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
global-styles/dist/global-styles.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill'), 'version' => '64a772dd5562ecd0d834719b8a397275');
1
+ <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill'), 'version' => '86050dc9a9e76df0ba317563d9759a41');
global-styles/dist/global-styles.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var c={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)&&n.length){var o=a.apply(null,n);o&&e.push(o)}else if("object"===r)for(var l in n)c.call(n,l)&&n[l]&&e.push(l)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},function(e,t,c){},function(e,t,c){"use strict";c.r(t);var n,a,r,o,l=c(9),s=c(3),i=c(10),u=c(5),h=c.n(u),f=c(7),p=c.n(f),v={},b=!1,O={publishOptions:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"IO_PUBLISH_OPTIONS",options:t};case 2:return e.abrupt("return",{type:"PUBLISH_OPTIONS",options:t});case 3:case"end":return e.stop()}}),e)})),updateOptions:function(e){return{type:"UPDATE_OPTIONS",options:e}},fetchOptions:function(){return{type:"IO_FETCH_OPTIONS"}},resetLocalChanges:function(){return{type:"RESET_OPTIONS",options:v}}},m=c(11),d=c.n(m),g=c(8),j=c(4),_=c.n(j),E=c(0),z=c(6),y=c(1),P=c(2),w=c(12),V=c(13),S=c.n(V),H=function(e){var t=e.unsupportedFeature;return Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("Your active theme doesn't support %s."),t))},x=function(e,t,c){switch(e){case"SPACE_LORA":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#fa4d4b",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M24.1 62c-3.6-2.9-8.9-5-15.8-6.3-2.8-.5-5-1-6.9-1.6-.5-.2-1-.3-1.5-.5v12.5c1.4.3 2.9.6 4.4.9 2.5.4 4.6 1 6.2 1.6s2.9 1.3 3.9 2.2c.9.8 1.6 1.6 2 2.6.4.9.6 1.9.6 3 0 2.3-.9 4.2-2.7 5.8-1.8 1.6-4.6 2.4-8.4 2.4-2.2 0-4.2-.3-5.9-.8v12c1.8.3 3.7.4 5.7.4 3.7 0 7-.5 10-1.4 2.9-.9 5.5-2.3 7.5-4s3.6-3.9 4.7-6.3c1.1-2.5 1.7-5.3 1.7-8.4V75c0-5.7-1.8-10-5.5-13zM12.9 42.5c2.1 1.9 3.1 4.2 3.1 6.9v2.3h12.4v-3.4c0-2.7-.5-5.3-1.6-7.7-1-2.4-2.5-4.6-4.6-6.5-2-1.9-4.5-3.4-7.5-4.4-3-1.1-6.5-1.7-10.3-1.7-1.5 0-3 .1-4.4.3v11.9c1.3-.4 2.7-.5 4.4-.5 3.7-.2 6.5.8 8.5 2.8zm67.9 10.9c-1.8-2.1-4-3.6-6.5-4.7-2.4-1.1-5-1.6-7.8-1.6-3.7 0-6.7.7-9.1 2.2-2.4 1.4-4.2 3.4-5.5 5.9h-1.7v-6.8H38.4v65.4h11.8V88.2H52c.6 1.1 1.2 2.1 2 3.1.8.9 1.8 1.8 2.9 2.5 1.2.8 2.6 1.3 4.1 1.8 1.6.4 3.4.7 5.5.7 2.9 0 5.5-.5 8-1.5 2.5-1.1 4.7-2.6 6.5-4.6 1.8-2.1 3.3-4.6 4.3-7.5 1.1-2.9 1.6-6.3 1.6-10.2v-1.7c0-3.8-.6-7.1-1.7-10.1-1-2.9-2.5-5.3-4.4-7.3zm-5.7 18.9c0 3.9-1.2 7.1-3.5 9.4-2.3 2.3-5.2 3.4-8.9 3.4s-6.7-1.2-9-3.5c-2.3-2.4-3.4-5.5-3.4-9.3v-1.1c0-3.8 1.1-6.9 3.4-9.2 2.3-2.4 5.3-3.6 9-3.6s6.7 1.2 8.9 3.5c2.3 2.3 3.5 5.4 3.5 9.3v1.1zm66.2 8.6V48.4h-11.8V54h-1.7c-1.2-2.4-2.8-4.1-4.9-5.3-2-1.1-4.7-1.7-8-1.7-2.8 0-5.4.6-7.8 1.7-2.4 1.1-4.5 2.6-6.3 4.7-1.8 2.1-3.3 4.6-4.3 7.6-1.1 2.9-1.6 6.3-1.6 10v1.5c0 3.8.5 7.1 1.6 10.1 1.1 2.9 2.6 5.5 4.5 7.5 1.9 2.1 4 3.6 6.5 4.7s5.2 1.6 8 1.6c3 0 5.6-.6 7.9-1.8 2.3-1.3 4-3.4 5.3-6.3h1.7c0 2 .7 3.6 2 4.9 1.4 1.3 3.1 1.9 5.3 1.9h8.1V83.7H144c-1.8 0-2.7-.9-2.7-2.8zm-11.8-8.6c0 3.9-1 7.1-3.1 9.4-2.1 2.3-4.8 3.4-8.3 3.4-3.4 0-6.2-1.1-8.3-3.4-2.1-2.3-3.1-5.5-3.1-9.4v-1.1c0-3.9 1-7.1 3.1-9.3 2.1-2.3 4.8-3.5 8.3-3.5 3.4 0 6.2 1.2 8.3 3.5 2.1 2.3 3.1 5.4 3.1 9.3v1.1zm98.3-12.2c1.2-1 2.6-1.6 4.2-2V47.3c-2.1.3-4 .8-5.9 1.6-2.8 1.1-5.3 2.7-7.4 4.8-2.1 2.1-3.8 4.6-5.1 7.5-1.2 2.9-1.8 6.2-1.8 9.8v.6c0 3.9.6 7.4 1.7 10.4 1.2 3.1 2.8 5.7 4.9 7.8 2.1 2.1 4.6 3.8 7.5 4.9 1.9.7 4 1.2 6.1 1.5V84.7c-.4-.1-.7-.2-1.1-.3-1.3-.5-2.5-1.2-3.6-2-1-.9-1.8-1.9-2.4-3-.6-1.2-.9-2.5-.9-3.9h8V65.4h-7.8c.5-2 1.8-3.8 3.6-5.3zm-61.5 6.1c.7-1.7 1.6-3.1 2.7-4.2 1.1-1.2 2.4-2.1 3.9-2.7 1.5-.6 3.1-.9 4.8-.9 3.6 0 6.5 1 8.5 3s3.2 4.4 3.6 7.1l11.7-3c-1.1-5.5-3.6-10-7.7-13.3-4-3.4-9.3-5.1-15.8-5.1-3.4 0-6.6.6-9.6 1.7-2.9 1.1-5.5 2.8-7.8 4.9-2.2 2.1-3.9 4.7-5.2 7.7s-1.9 6.4-1.9 10.2v1.1c0 3.8.6 7.1 1.9 10.1 1.3 2.9 3 5.4 5.2 7.4s4.8 3.5 7.7 4.6c3 1.1 6.2 1.6 9.7 1.6 6.6 0 11.9-1.7 15.9-5.1 4-3.4 6.5-7.8 7.6-13.3l-11.7-3c-.6 3.1-1.8 5.5-3.8 7.3-1.9 1.8-4.6 2.7-8.3 2.7-1.7 0-3.3-.3-4.8-.8-1.5-.6-2.8-1.4-3.9-2.4-1.1-1.1-2-2.4-2.7-3.9-.6-1.6-.9-3.5-.9-5.5v-.6c0-2.1.3-3.9.9-5.6z",fill:"#270920"}),Object(E.createElement)(y.Path,{d:"M49.7 89.3c-1.1 1.3-2.6 2-4.5 2h-6.5c.1-1.1.2-2.5.2-4.3V68.5c0-1.3.1-2.2.4-2.8s.6-1 1.1-1.1c.5-.2 1.1-.3 2-.3v-3.2h-14v3.7l3.6-.1c-.1 1.1-.2 2.5-.2 4.4v18.5c0 1.3-.1 2.2-.4 2.8-.3.6-.6 1-1.1 1.2-.5.2-1.1.3-2 .3V95h25.8l.3-11.6h-3.2c.1 2.6-.5 4.5-1.5 5.9zM101.3 70c-2.5 0-4.8 1.5-7 4.5h-.1v-2.3c0-.8-.1-1.4-.1-1.9h-2.4c-.4.4-1.3.7-2.5 1-1.3.3-2.9.4-4.9.4v3.7l3.4-.1c-.1 1.3-.2 2.7-.2 4.1v8.1c0 1.5-.2 2.6-.5 3.3-.3.7-1.1 1-2.3 1V95h12.7v-3.7c-1.1 0-2.1 0-3.1.1.1-1.3.2-2.7.2-4.3v-7.9c.3-1 1-2.1 1.9-3.1 1-1.1 1.9-1.6 2.8-1.6.1 1 .5 1.8 1.1 2.2.6.4 1.4.6 2.2.6 1.1 0 1.9-.4 2.5-1.1.5-.7.8-1.5.8-2.3 0-1.3-.4-2.3-1.2-3-1-.5-2-.9-3.3-.9zm25.8 21.5c.1-1.3.2-2.7.2-4.3v-7.9c0-6.2-3-9.2-9-9.2-1.9 0-3.6.3-5.2.8-1.5.5-2.8 1.3-3.7 2.2-.9 1-1.4 2.1-1.4 3.3 0 .9.3 1.7.8 2.4.5.6 1.3.9 2.3.9 1 0 1.8-.3 2.3-.9.5-.6.8-1.3.8-2.1s-.2-1.4-.6-1.8c.9-.9 2.1-1.4 3.5-1.4 2.2 0 3.3 1.5 3.3 4.4v2.5c-3.7.2-6.9 1-9.5 2.5-2.6 1.5-4 3.6-4 6.4 0 1.9.6 3.4 1.7 4.6 1.2 1.2 2.8 1.8 4.8 1.8 2.8 0 5.2-1 7.2-3 .1 1.1.1 1.8.2 2.2h9.1v-3.7c-.7.1-1.8.2-2.8.3zm-6.6-2.2c-1.1 1.2-2.4 1.7-3.8 1.7-.8 0-1.4-.2-2-.6-.5-.4-.8-1.1-.8-1.9 0-1.3.6-2.4 1.8-3.1 1.3-.8 2.8-1.3 4.7-1.5v5.4zM75.1 71.5c-1.8-1-3.9-1.5-6.2-1.5-2.2 0-4.3.6-6.1 1.7-1.8 1.1-3.3 2.7-4.4 4.7-1.1 2-1.6 4.4-1.6 7 0 2.5.5 4.7 1.6 6.5 1.1 1.9 2.5 3.3 4.4 4.3 1.9 1 4 1.5 6.3 1.5 2.4 0 4.4-.5 6.2-1.6 1.8-1.1 3.3-2.6 4.3-4.6 1-2 1.5-4.3 1.5-7 0-2.5-.5-4.7-1.6-6.6-1.1-1.9-2.5-3.4-4.4-4.4zm-2.2 18.4c-.7 1.6-2 2.5-3.7 2.5-1.8 0-3.1-1-4-3-.9-2-1.3-4.4-1.3-7.2 0-2.5.4-4.5 1.2-6.2.8-1.7 2.1-2.5 3.9-2.5 1.7 0 3 1 3.8 3s1.2 4.4 1.2 7.2c-.1 2.5-.4 4.5-1.1 6.2z",fill:"#fff"}));case"SYSTEM_BASKER":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#F18F1B",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M10.016 50.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.203 0-3.422-2.078-5.344-6.844-6.297l-2.39-.485c-2.657-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.203 3.078h4.454c-.078-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM53 37v-8.422l7.86-14.125h-5.063l-5.063 9.625h-.109l-5.047-9.625h-5.14l7.843 14.125V37H53zM73.016 60.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.204 0-3.421-2.078-5.343-6.844-6.296l-2.39-.485c-2.656-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.204 3.078h4.453c-.079-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM114.984 47V28.344h6.532v-3.89H103.75v3.89h6.516V47h4.718zM149.812 43.094h-10.218v-5.688h9.64v-3.625h-9.64v-5.437h10.218v-3.89h-14.937V47h14.937v-3.906zM187.75 37V14.453h-5.469l-6.406 16.188h-.125l-6.406-16.188h-5.469V37h4.203V21.781h.125L174.328 37h2.969l6.125-15.219h.125V37h4.203z",fill:"#492B06"}),Object(E.createElement)(y.Path,{d:"M22.032 92H9.63v-.72c.396-.012.72-.048.972-.108s.444-.162.576-.306c.132-.144.222-.348.27-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.024-.756-.072-1.008-.036-.264-.114-.468-.234-.612a.852.852 0 0 0-.522-.306 4.454 4.454 0 0 0-.864-.126v-.72h6.21v.72a5.062 5.062 0 0 0-.99.108c-.24.06-.426.168-.558.324-.132.156-.222.372-.27.648a8.868 8.868 0 0 0-.054 1.098v7.542c0 .504.048.918.144 1.242.108.312.288.558.54.738.252.168.588.288 1.008.36.42.06.942.09 1.566.09.696 0 1.278-.042 1.746-.126.468-.084.858-.24 1.17-.468.324-.24.582-.558.774-.954.192-.396.354-.912.486-1.548h.72L22.032 92zm5.182-2.952c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.574 9.594c0 .444.06.858.18 1.242.132.372.306.696.522.972.216.276.474.492.774.648.3.156.63.234.99.234.72 0 1.266-.33 1.638-.99.372-.66.558-1.632.558-2.916 0-1.248-.186-2.196-.558-2.844-.36-.66-.906-.99-1.638-.99-.432 0-.834.12-1.206.36-.36.228-.642.552-.846.972-.276.576-.414 1.302-.414 2.178v1.134zm-.036-4.356h.072a3.07 3.07 0 0 1 1.206-1.044c.492-.252 1.05-.378 1.674-.378.636 0 1.224.132 1.764.396.552.252 1.026.6 1.422 1.044.408.444.726.966.954 1.566.228.6.342 1.242.342 1.926 0 .72-.126 1.386-.378 1.998-.24.6-.576 1.122-1.008 1.566-.42.444-.918.792-1.494 1.044a4.362 4.362 0 0 1-1.8.378c-.66 0-1.284-.126-1.872-.378-.576-.264-1.038-.606-1.386-1.026L31.234 92h-.612V81.29c0-1.128-.078-1.902-.234-2.322a.93.93 0 0 0-.126-.216.488.488 0 0 0-.216-.144 1.07 1.07 0 0 0-.36-.108 7.62 7.62 0 0 0-.612-.108v-.612l4.032-.72v6.642zm12.759 5.508c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92H41.76v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zM59.8 90.326c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zM65.985 92v-.72a4.75 4.75 0 0 0 .972-.108c.252-.06.444-.162.576-.306.144-.144.24-.348.288-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.018-.756-.054-1.008-.036-.264-.114-.468-.234-.612a.755.755 0 0 0-.468-.306 3.572 3.572 0 0 0-.774-.126v-.72h5.778c1.812 0 3.204.294 4.176.882.984.576 1.476 1.404 1.476 2.484 0 1.428-1.026 2.436-3.078 3.024v.072c.66 0 1.254.096 1.782.288.54.18.996.438 1.368.774a3.523 3.523 0 0 1 1.17 2.682c0 .612-.15 1.146-.45 1.602-.288.456-.708.84-1.26 1.152-1.068.6-2.538.9-4.41.9h-6.93zm7.056-1.098c1.932 0 2.898-.87 2.898-2.61 0-1.068-.348-1.848-1.044-2.34-.36-.252-.828-.432-1.404-.54-.564-.108-1.26-.162-2.088-.162h-.864v3.6c0 .744.192 1.272.576 1.584.384.312 1.026.468 1.926.468zM71.6 84.17c.54 0 1.008-.048 1.404-.144a3.249 3.249 0 0 0 1.008-.45c.576-.396.864-1.014.864-1.854 0-.876-.216-1.506-.648-1.89-.432-.396-1.128-.594-2.088-.594h-1.278c-.216 0-.324.102-.324.306v4.626H71.6zm14.325 2.7c-1.008.456-1.77.882-2.286 1.278-.504.384-.756.786-.756 1.206 0 .348.096.624.288.828a.948.948 0 0 0 .72.306c.288 0 .558-.048.81-.144.252-.108.468-.246.648-.414.18-.168.318-.366.414-.594.108-.24.162-.492.162-.756v-1.71zm0-.954v-.756c0-.696-.126-1.2-.378-1.512-.24-.324-.618-.486-1.134-.486-.348 0-.612.096-.792.288-.18.18-.348.486-.504.918-.108.3-.264.534-.468.702-.192.168-.462.252-.81.252-.336 0-.594-.102-.774-.306-.18-.204-.27-.492-.27-.864 0-.576.312-1.032.936-1.368.636-.336 1.59-.504 2.862-.504 1.344 0 2.304.246 2.88.738.576.48.864 1.29.864 2.43v3.942c0 1.02.204 1.53.612 1.53a.978.978 0 0 0 .63-.234l.27.522c-.168.3-.432.54-.792.72a2.7 2.7 0 0 1-1.188.252c-.552 0-.972-.168-1.26-.504-.288-.336-.432-.81-.432-1.422h-.09c-.348.624-.798 1.098-1.35 1.422-.552.324-1.182.486-1.89.486-.756 0-1.362-.21-1.818-.63-.456-.432-.684-.99-.684-1.674 0-.528.234-1.02.702-1.476.468-.468 1.248-.924 2.34-1.368l2.538-1.098zM91.6 92h-.558v-3.276h.756c.204.864.498 1.494.882 1.89.384.396.882.594 1.494.594.444 0 .786-.09 1.026-.27a.923.923 0 0 0 .378-.774c0-.336-.15-.66-.45-.972-.3-.324-.786-.666-1.458-1.026-.912-.492-1.566-.978-1.962-1.458a2.574 2.574 0 0 1-.594-1.656c0-.396.072-.762.216-1.098.156-.348.36-.648.612-.9.264-.252.576-.444.936-.576.36-.144.75-.216 1.17-.216.372 0 .738.054 1.098.162.372.108.696.258.972.45l.324-.432h.468v2.718h-.702c-.276-.684-.564-1.176-.864-1.476-.288-.3-.642-.45-1.062-.45-.336 0-.606.09-.81.27-.192.18-.288.42-.288.72 0 .336.144.654.432.954.3.3.792.63 1.476.99.48.264.894.522 1.242.774s.63.51.846.774c.216.252.372.522.468.81.108.276.162.576.162.9 0 .42-.078.798-.234 1.134a2.462 2.462 0 0 1-.666.864c-.288.24-.636.426-1.044.558-.396.132-.84.198-1.332.198-.516 0-.996-.066-1.44-.198-.444-.144-.81-.348-1.098-.612L91.6 92zm13.299-.72c.384 0 .654-.012.81-.036.156-.036.234-.102.234-.198 0-.072-.084-.246-.252-.522-.156-.288-.36-.618-.612-.99l-1.368-2.052-.9.864v.702c0 .468.018.846.054 1.134.036.288.096.516.18.684a.759.759 0 0 0 .378.324c.168.06.378.09.63.09V92h-5.31v-.72c.336-.012.606-.048.81-.108a.969.969 0 0 0 .486-.306c.12-.156.198-.366.234-.63a6.4 6.4 0 0 0 .072-1.062v-7.632c0-.732-.012-1.308-.036-1.728-.024-.42-.09-.732-.198-.936a.647.647 0 0 0-.468-.396 3.877 3.877 0 0 0-.846-.072v-.666l4.014-.684v10.008l1.728-1.638a28.697 28.697 0 0 0 1.332-1.314c.264-.3.396-.516.396-.648 0-.108-.114-.18-.342-.216-.216-.048-.624-.072-1.224-.072v-.72h4.914v.72c-.456 0-.858.078-1.206.234-.348.156-.726.426-1.134.81l-1.746 1.638 3.114 4.41c.276.384.546.648.81.792.264.144.612.216 1.044.216V92h-5.598v-.72zm14.737-.954c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zm8.945 3.618c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92h-6.012v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zm6.139-4.428a5.587 5.587 0 0 0-.378-.828 1.667 1.667 0 0 0-.378-.486.847.847 0 0 0-.414-.234 2.18 2.18 0 0 0-.522-.054v-.72h5.382v.72c-.3 0-.54.012-.72.036-.168.024-.3.06-.396.108a.328.328 0 0 0-.162.198.798.798 0 0 0-.036.252c0 .156.03.336.09.54.06.204.132.408.216.612l1.71 4.716h.072l1.926-4.698a6.35 6.35 0 0 0 .198-.54 1.66 1.66 0 0 0 .072-.45c0-.264-.09-.456-.27-.576-.18-.12-.498-.186-.954-.198v-.72h3.978v.72c-.324 0-.606.084-.846.252-.228.168-.468.54-.72 1.116l-3.366 7.632h-1.638l-2.844-7.398zm14.041 4.266c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.969 10.584c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm6.399 0c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm11.672 1.278c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61z",fill:"#FFF1E1"}));case"RUBIK_WORK":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#000",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M14.936 62c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.696c0-.352.128-.656.384-.912s.56-.384.912-.384h14.208c4.608 0 8.208 1.04 10.8 3.12 2.592 2.048 3.888 4.896 3.888 8.544 0 2.08-.464 3.92-1.392 5.52-.928 1.568-2.192 2.864-3.792 3.888l5.904 10.944c.096.192.144.368.144.528 0 .288-.112.544-.336.768a.977.977 0 0 1-.72.288H33.8c-.576 0-1.04-.128-1.392-.384-.32-.288-.544-.592-.672-.912l-4.128-9.168H25.64v9.168c0 .352-.128.656-.384.912s-.56.384-.912.384h-9.408zm14.208-19.584c.704 0 1.248-.224 1.632-.672.384-.48.576-1.072.576-1.776s-.192-1.312-.576-1.824c-.352-.544-.896-.816-1.632-.816H25.64v5.088h3.504zM56.873 62.48c-1.696 0-3.248-.384-4.656-1.152-1.408-.8-2.544-2.016-3.408-3.648-.832-1.632-1.248-3.664-1.248-6.096V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.168c.352 0 .656.128.912.384s.384.56.384.912v12.912c0 .864.208 1.52.624 1.968.416.448 1.008.672 1.776.672s1.36-.224 1.776-.672c.416-.448.624-1.104.624-1.968V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.12c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V59.12c-.768 1.12-1.84 1.968-3.216 2.544-1.376.544-2.96.816-4.752.816zm41.127 0c-3.04 0-5.408-.96-7.104-2.88v1.104c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.16c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.88c.352 0 .656.128.912.384s.384.56.384.912v9.6C93.28 37.312 95.408 36.56 98 36.56c2.912 0 5.296.944 7.152 2.832 1.888 1.856 2.896 4.592 3.024 8.208.032.48.048 1.104.048 1.872 0 .8-.016 1.44-.048 1.92-.16 3.808-1.152 6.608-2.976 8.4-1.824 1.792-4.224 2.688-7.2 2.688zm-3.984-8.592c.832 0 1.408-.224 1.728-.672.352-.448.576-1.152.672-2.112.064-.64.096-1.168.096-1.584 0-.416-.032-.944-.096-1.584-.096-.96-.32-1.664-.672-2.112-.32-.448-.896-.672-1.728-.672-.8 0-1.392.208-1.776.624-.352.384-.56.976-.624 1.776-.032.48-.048 1.072-.048 1.776s.016 1.296.048 1.776c.064.928.272 1.632.624 2.112.352.448.944.672 1.776.672zM113.415 34.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912v-5.808c0-.352.128-.656.384-.912s.56-.384.912-.384h8.112c.352 0 .656.128.912.384s.384.56.384.912v5.808c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.112zm-.24 27.6c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h8.592c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.592zm15.515 0c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.4c.352 0 .656.128.912.384s.384.56.384.912v15.552l4.224-6.912c.32-.544.784-.816 1.392-.816h9.696c.32 0 .592.112.816.336.224.224.336.496.336.816 0 .224-.08.464-.24.72l-6.576 9.36 7.776 11.952c.128.192.192.4.192.624 0 .32-.112.592-.336.816a1.11 1.11 0 0 1-.816.336h-10.08c-.64 0-1.136-.272-1.488-.816l-4.896-8.16v7.68c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4zM25.4 105.48c-3.776 0-6.768-.88-8.976-2.64-2.208-1.76-3.312-4.16-3.312-7.2 0-1.952.56-3.664 1.68-5.136 1.12-1.472 2.72-2.8 4.8-3.984-1.216-1.312-2.096-2.528-2.64-3.648-.512-1.152-.768-2.32-.768-3.504 0-1.536.4-2.944 1.2-4.224.8-1.28 1.984-2.304 3.552-3.072 1.568-.768 3.456-1.152 5.664-1.152 2.048 0 3.824.384 5.328 1.152 1.536.736 2.688 1.744 3.456 3.024a7.494 7.494 0 0 1 1.2 4.128c0 1.856-.56 3.456-1.68 4.8-1.12 1.312-2.784 2.608-4.992 3.888l5.712 5.712c.512-.832.944-1.632 1.296-2.4.384-.8.768-1.84 1.152-3.12.128-.448.464-.672 1.008-.672h4.848c.256 0 .48.096.672.288.192.16.288.368.288.624-.032 1.12-.56 2.64-1.584 4.56-.992 1.92-2.096 3.616-3.312 5.088l5.376 5.424c.224.288.336.528.336.72a.774.774 0 0 1-.288.624.844.844 0 0 1-.624.24h-6.528c-.512 0-.928-.16-1.248-.48l-2.16-2.064c-2.464 2.016-5.616 3.024-9.456 3.024zm.432-21.984c1.28-.64 2.24-1.264 2.88-1.872.672-.608 1.008-1.328 1.008-2.16 0-.864-.304-1.552-.912-2.064-.576-.544-1.312-.816-2.208-.816a3.31 3.31 0 0 0-2.208.816c-.608.544-.912 1.248-.912 2.112 0 .576.176 1.184.528 1.824.384.608.992 1.328 1.824 2.16zM25.4 99.384c1.984 0 3.632-.592 4.944-1.776l-6.384-6.384c-2.112 1.12-3.168 2.48-3.168 4.08 0 1.216.464 2.208 1.392 2.976.928.736 2 1.104 3.216 1.104zM65.56 105h-3.168l-6.24-21.12h2.752l5.088 19.104 4.992-19.104h2.912l4.992 19.168 5.12-19.168H84.6L78.392 105h-3.168L71.48 91.304l-1.088-4.768h-.032l-1.088 4.768L65.56 105zm28.824-16.32c2.41 0 4.299.736 5.664 2.208 1.387 1.472 2.08 3.51 2.08 6.112 0 2.603-.693 4.64-2.08 6.112-1.365 1.472-3.253 2.208-5.664 2.208-2.41 0-4.31-.736-5.696-2.208-1.365-1.472-2.048-3.51-2.048-6.112 0-2.603.683-4.64 2.048-6.112 1.387-1.472 3.286-2.208 5.696-2.208zm0 2.208c-1.621 0-2.89.544-3.808 1.632C89.66 93.608 89.2 95.101 89.2 97c0 1.899.459 3.392 1.376 4.48.918 1.088 2.187 1.632 3.808 1.632 1.622 0 2.89-.544 3.808-1.632.918-1.088 1.376-2.581 1.376-4.48 0-1.899-.458-3.392-1.376-4.48-.917-1.088-2.186-1.632-3.808-1.632zm20.269-2.208c.768 0 1.355.107 1.76.32l-.512 2.496c-.512-.277-1.184-.416-2.016-.416-.683 0-1.355.203-2.016.608-.64.384-1.173.981-1.6 1.792-.405.79-.608 1.75-.608 2.88V105h-2.56V89h2.08l.352 2.624c.896-1.963 2.603-2.944 5.12-2.944zm11.463 8.416l-3.392 3.392V105h-2.56V81.64h2.56v15.648L131.012 89h3.2l-6.24 6.24 6.624 9.76h-3.104l-5.376-7.904zm29.655-13.536c3.776 0 6.496 1.493 8.16 4.48l-2.208 1.792c-.64-1.408-1.408-2.4-2.304-2.976-.874-.597-2.08-.896-3.616-.896-1.621 0-2.901.341-3.84 1.024-.917.661-1.376 1.515-1.376 2.56 0 .683.182 1.248.544 1.696.363.448.96.843 1.792 1.184.854.32 2.027.608 3.52.864 2.795.47 4.768 1.173 5.92 2.112 1.174.939 1.76 2.24 1.76 3.904 0 1.195-.341 2.251-1.024 3.168-.661.896-1.61 1.6-2.848 2.112-1.237.491-2.666.736-4.288.736-2.133 0-3.957-.416-5.472-1.248-1.493-.832-2.634-1.941-3.424-3.328l2.208-1.792c.576 1.259 1.419 2.24 2.528 2.944 1.131.683 2.539 1.024 4.224 1.024 1.664 0 2.987-.299 3.968-.896.982-.619 1.472-1.483 1.472-2.592 0-.939-.426-1.685-1.28-2.24-.853-.555-2.368-1.024-4.544-1.408-2.816-.49-4.81-1.195-5.984-2.112-1.173-.917-1.76-2.197-1.76-3.84 0-1.13.32-2.176.96-3.136.64-.96 1.558-1.717 2.752-2.272 1.195-.576 2.582-.864 4.16-.864zm26.044 19.584a5.25 5.25 0 0 0 1.28-.16l-.16 2.016a5.68 5.68 0 0 1-1.92.32c-.832 0-1.494-.181-1.984-.544-.47-.363-.768-.971-.896-1.824-.491.747-1.216 1.333-2.176 1.76a7.435 7.435 0 0 1-2.976.608c-1.579 0-2.88-.363-3.904-1.088-1.024-.747-1.536-1.813-1.536-3.2 0-1.216.533-2.261 1.6-3.136 1.066-.896 2.613-1.515 4.64-1.856l4.256-.704v-.896c0-1.067-.331-1.92-.992-2.56-.662-.64-1.579-.96-2.752-.96-1.067 0-1.995.256-2.784.768-.768.512-1.366 1.27-1.792 2.272l-1.888-1.376c.426-1.195 1.216-2.144 2.368-2.848 1.173-.704 2.538-1.056 4.096-1.056 1.898 0 3.424.459 4.576 1.376 1.152.917 1.728 2.272 1.728 4.064v7.872c0 .384.096.672.288.864.192.192.501.288.928.288zm-8.704-.064c1.344 0 2.496-.32 3.456-.96.981-.64 1.472-1.472 1.472-2.496v-2.208l-3.584.672c-1.43.256-2.496.63-3.2 1.12-.704.47-1.056 1.077-1.056 1.824 0 .661.256 1.173.768 1.536.512.341 1.226.512 2.144.512zm21.485-14.4c1.813 0 3.306.523 4.48 1.568 1.173 1.045 1.76 2.55 1.76 4.512V105h-2.56v-9.344c0-1.664-.363-2.87-1.088-3.616-.704-.747-1.654-1.12-2.848-1.12-.854 0-1.654.192-2.4.576-.747.363-1.366.97-1.856 1.824-.47.832-.704 1.888-.704 3.168V105h-2.56V89h2.24l.16 2.496c.533-.96 1.269-1.664 2.208-2.112.938-.47 1.994-.704 3.168-.704zm17.476 16.64c-1.536 0-2.922-.299-4.16-.896-1.237-.619-2.144-1.525-2.72-2.72l2.08-1.44a3.898 3.898 0 0 0 1.888 2.112c.896.469 1.952.704 3.168.704 1.259 0 2.219-.224 2.88-.672.662-.448.992-1.013.992-1.696 0-.619-.309-1.11-.928-1.472-.618-.384-1.706-.715-3.264-.992-1.536-.277-2.752-.608-3.648-.992-.896-.405-1.546-.907-1.952-1.504-.405-.619-.608-1.376-.608-2.272 0-.875.256-1.675.768-2.4.512-.725 1.248-1.301 2.208-1.728.96-.448 2.07-.672 3.328-.672 1.707 0 3.072.32 4.096.96 1.046.619 1.792 1.579 2.24 2.88l-2.176 1.28c-.341-1.024-.864-1.76-1.568-2.208-.682-.448-1.546-.672-2.592-.672-1.045 0-1.93.235-2.656.704-.725.47-1.088 1.013-1.088 1.632 0 .704.31 1.248.928 1.632.64.384 1.771.715 3.392.992 2.219.363 3.787.907 4.704 1.632.918.725 1.376 1.75 1.376 3.072a3.95 3.95 0 0 1-.832 2.464c-.533.704-1.312 1.259-2.336 1.664-1.002.405-2.176.608-3.52.608z",fill:"#fff"}));case"PLAY_ROBOTO":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#B9B5B8",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M149.438 101c-.75-2.125-1.23-5.27-1.438-9.438-2.625 3.417-5.979 6.063-10.062 7.938-4.042 1.833-8.334 2.75-12.876 2.75-6.5 0-11.77-1.812-15.812-5.438-4-3.624-6-8.208-6-13.75 0-6.583 2.729-11.791 8.188-15.624 5.5-3.834 13.145-5.75 22.937-5.75h13.563V54c0-4.833-1.5-8.625-4.5-11.375-2.959-2.792-7.292-4.188-13-4.188-5.209 0-9.521 1.334-12.938 4-3.417 2.667-5.125 5.876-5.125 9.626l-7.5-.063c0-5.375 2.5-10.02 7.5-13.938 5-3.958 11.146-5.937 18.437-5.937 7.542 0 13.48 1.896 17.813 5.688 4.375 3.75 6.625 9 6.75 15.75v32c0 6.541.687 11.437 2.063 14.687v.75h-8zm-23.5-5.375c5 0 9.458-1.208 13.374-3.625 3.959-2.417 6.834-5.646 8.626-9.688V67.439h-13.376c-7.458.083-13.291 1.458-17.5 4.124-4.208 2.626-6.312 6.25-6.312 10.876 0 3.791 1.396 6.937 4.188 9.437 2.833 2.5 6.5 3.75 11 3.75zM39.328 101.896c-5.461 0-9.6-1.451-12.416-4.352-2.73-2.987-4.096-6.699-4.096-11.136 0-3.84.981-6.997 2.944-9.472 2.048-2.56 4.437-4.523 7.168-5.888 2.73-1.365 6.272-2.773 10.624-4.224 4.608-1.536 7.979-2.944 10.112-4.224 2.133-1.28 3.2-3.072 3.2-5.376V45.832c0-2.73-.683-5.163-2.048-7.296s-3.712-3.2-7.04-3.2c-2.645 0-5.035.725-7.168 2.176 2.901 1.024 5.035 2.56 6.4 4.608 1.45 1.963 2.176 4.181 2.176 6.656 0 3.328-1.195 6.016-3.584 8.064-2.304 1.963-5.12 2.944-8.448 2.944-3.328 0-5.973-1.024-7.936-3.072-1.877-2.133-2.816-4.821-2.816-8.064 0-2.56.64-4.779 1.92-6.656 1.28-1.877 3.285-3.584 6.016-5.12 4.779-2.73 11.605-4.096 20.48-4.096 4.693 0 8.747.47 12.16 1.408 3.413.853 6.315 2.517 8.704 4.992 1.707 1.792 2.816 4.053 3.328 6.784.597 2.645.896 6.357.896 11.136V91.4c0 2.133.128 3.584.384 4.352.341.768.896 1.152 1.664 1.152.597 0 1.237-.17 1.92-.512a15.863 15.863 0 0 0 1.92-1.408l1.28 2.176c-3.67 3.157-8.917 4.736-15.744 4.736-5.12 0-8.704-.853-10.752-2.56-2.048-1.792-3.157-4.181-3.328-7.168-4.01 6.485-9.984 9.728-17.92 9.728zm12.8-10.24c1.792 0 3.37-.725 4.736-2.176V62.472c-.768 1.28-2.176 2.944-4.224 4.992-2.304 2.219-4.053 4.395-5.248 6.528-1.195 2.048-1.792 4.864-1.792 8.448 0 6.144 2.176 9.216 6.528 9.216z",fill:"#270920"}));default:return Object(E.createElement)("div",{className:"font-pairings-panel__preview"},Object(E.createElement)("h1",{style:{fontFamily:t}},"Lorem Ipsum"),Object(E.createElement)("p",{style:{fontFamily:c}},"Etiam tempor orci eu lobortis elementum nibh tellus molestie."))}},M=function(e){var t=e.fontPairings,c=e.fontBase,n=e.fontHeadings,a=e.update;return Object(E.createElement)(E.Fragment,null,Object(E.createElement)("h3",null,Object(P.__)("Font Pairings")),t&&n&&c?Object(E.createElement)("div",{role:"listbox"},t.map((function(e){var t=e.label,r=e.headings,o=e.base,l=e.preview,s=r===n&&o===c,i=S()("font-pairings-panel",{"is-selected":s});return Object(E.createElement)("div",{key:t,tabIndex:0,role:"option","aria-selected":s,className:i,onClick:function(){return a({headings:r,base:o})},onKeyDown:function(e){return e.keyCode===w.ENTER?a({headings:r,base:o}):null}},Object(E.createElement)("div",{className:"font-pairings-panel__preview"},x(l,r,o)),Object(E.createElement)("p",{className:"font-pairings-panel__label"},t))}))):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("font pairings")}))},B=function(e){var t=e.fontBase,c=e.fontBaseDefault,n=e.fontHeadings,a=e.fontHeadingsDefault,r=e.fontBaseOptions,o=e.fontHeadingsOptions,l=e.updateBaseFont,s=e.updateHeadingsFont;return r&&o?Object(E.createElement)(E.Fragment,null,Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Heading Font"),value:n,options:o,onChange:function(e){return s(e)},style:{fontFamily:"unset"!==n?n:a}}),Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Base Font"),value:t,options:r,onChange:function(e){return l(e)},style:{fontFamily:"unset"!==t?t:c}}),Object(E.createElement)("hr",null)):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("custom font selection")})},T=function(){return Object(E.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(E.createElement)(y.Path,{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"}))},L=function(e){if("object"==typeof e){var t=e.label,c=e.value,n=e.prop;return{label:t,value:c,prop:void 0===n?"ANY_PROPERTY":n}}return{label:e,value:e,prop:"ANY_PROPERTY"}},N=function(e){return null!==e.value&&null!==e.label},C=function(e,t){return e?e.map(L).filter(N).filter(function(e){return function(t){return"ANY_PROPERTY"===t.prop||t.prop===e}}(t)):[]},F=function(e){var t=e.hasLocalChanges,c=e.resetAction,n=e.publishAction,a=e.className,r=void 0===a?null:a;return Object(E.createElement)("div",{className:r},Object(E.createElement)(y.Button,{disabled:!t,isDefault:!0,onClick:c},Object(P.__)("Reset")),Object(E.createElement)(y.Button,{className:"global-styles-sidebar__publish-button",disabled:!t,isPrimary:!0,onClick:n},Object(P.__)("Publish")))},I=(c(14),JETPACK_GLOBAL_STYLES_EDITOR_CONSTANTS),A=I.PLUGIN_NAME,R=I.STORE_NAME,D=I.REST_PATH;n=R,a=D,Object(s.registerStore)(n,{reducer:function(e,t){switch(t.type){case"UPDATE_OPTIONS":case"RESET_OPTIONS":case"PUBLISH_OPTIONS":return h()({},e,{},t.options)}return e},actions:O,selectors:{getOption:function(e,t){return e?e[t]:void 0},hasLocalChanges:function(e){return!!e&&Object.keys(v).some((function(t){return v[t]!==e[t]}))}},resolvers:{getOption:regeneratorRuntime.mark((function e(t){var c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,b=!0,e.next=6,O.fetchOptions();case 6:c=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),c={};case 12:return v=c,e.abrupt("return",{type:"UPDATE_OPTIONS",options:c});case 14:case"end":return e.stop()}}),e,null,[[2,9]])}))},controls:{IO_FETCH_OPTIONS:function(){return p()({path:a})},IO_PUBLISH_OPTIONS:function(e){var t=e.options;return v=t,p()({path:a,method:"POST",data:h()({},t)})}}}),r=["font_base","font_headings"],o=Object(s.select)(R).getOption,d()((function(){var e={},t={},c={};r.forEach((function(e){c[e]="--".concat(e.replace("_","-"))}));var n=null;Object(s.subscribe)((function(){var a=Object(s.select)("core/editor").__unstableIsEditorReady;if(!(a&&!1===a()||(n||(n=document.createElement("style"),document.body.appendChild(n)),r.forEach((function(t){e[t]=o(t)})),Object(g.isEmpty)(e)||Object(g.isEqual)(e,t)))){t=h()({},e);var l="";Object.keys(e).forEach((function(t){l+="".concat(c[t],":").concat(e[t],";")})),n.textContent=".editor-styles-wrapper{".concat(l,"}")}}))})),Object(l.registerPlugin)(A,{render:Object(i.compose)(Object(s.withSelect)((function(e){return{siteName:e(R).getOption("blogname"),fontHeadings:e(R).getOption("font_headings"),fontHeadingsDefault:e(R).getOption("font_headings_default"),fontBase:e(R).getOption("font_base"),fontBaseDefault:e(R).getOption("font_base_default"),fontPairings:e(R).getOption("font_pairings"),fontOptions:e(R).getOption("font_options"),hasLocalChanges:e(R).hasLocalChanges()}})),Object(s.withDispatch)((function(e){return{updateOptions:e(R).updateOptions,publishOptions:e(R).publishOptions,resetLocalChanges:e(R).resetLocalChanges}})))((function(e){var t=e.fontHeadings,c=e.fontHeadingsDefault,n=e.fontBase,a=e.fontBaseDefault,r=e.fontPairings,o=e.fontOptions,l=e.siteName,s=e.publishOptions,i=e.updateOptions,u=e.hasLocalChanges,h=e.resetLocalChanges,f=function(){var e;return s((e={},_()(e,"font_base",n),_()(e,"font_headings",t),e))};return Object(E.createElement)(E.Fragment,null,Object(E.createElement)(z.PluginSidebarMoreMenuItem,{icon:Object(E.createElement)(T,null),target:"global-styles"},Object(P.__)("Global Styles")),Object(E.createElement)(z.PluginSidebar,{icon:Object(E.createElement)(T,null),name:"global-styles",title:Object(P.__)("Global Styles"),className:"global-styles-sidebar"},Object(E.createElement)(y.PanelBody,null,Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("You are customizing %s."),l)),Object(E.createElement)("p",null,Object(P.__)("Any change you make here will apply to the entire website.")),u?Object(E.createElement)("div",null,Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes."))),Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h})):null),Object(E.createElement)(y.PanelBody,{title:Object(P.__)("Font Selection")},Object(E.createElement)(B,{fontBase:n,fontBaseDefault:a,fontHeadings:t,fontHeadingsDefault:c,fontBaseOptions:C(o,"font_base"),fontHeadingsOptions:C(o,"font_headings"),updateBaseFont:function(e){return i(_()({},"font_base",e))},updateHeadingsFont:function(e){return i(_()({},"font_headings",e))}}),Object(E.createElement)(M,{fontHeadings:t,fontBase:n,fontPairings:r,update:function(e){var t,c=e.headings,n=e.base;return i((t={},_()(t,"font_headings",c),_()(t,"font_base",n),t))}})),Object(E.createElement)(y.PanelBody,null,u?Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes."))):null,Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h,className:"global-styles-sidebar__panel-action-buttons"}))))}))})}]));
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var c={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)&&n.length){var o=a.apply(null,n);o&&e.push(o)}else if("object"===r)for(var l in n)c.call(n,l)&&n[l]&&e.push(l)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},function(e,t,c){},function(e,t,c){"use strict";c.r(t);var n,a,r,o,l=c(9),s=c(3),i=c(10),u=c(5),h=c.n(u),f=c(7),p=c.n(f),v={},b=!1,O={publishOptions:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"IO_PUBLISH_OPTIONS",options:t};case 2:return e.abrupt("return",{type:"PUBLISH_OPTIONS",options:t});case 3:case"end":return e.stop()}}),e)})),updateOptions:function(e){return{type:"UPDATE_OPTIONS",options:e}},fetchOptions:function(){return{type:"IO_FETCH_OPTIONS"}},resetLocalChanges:function(){return{type:"RESET_OPTIONS",options:v}}},m=c(11),d=c.n(m),g=c(8),j=c(4),_=c.n(j),E=c(0),z=c(6),y=c(1),P=c(2),w=c(12),V=c(13),S=c.n(V),H=function(e){var t=e.unsupportedFeature;return Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("Your active theme doesn't support %s."),t))},x=function(e,t,c){switch(e){case"SPACE_LORA":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#fa4d4b",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M24.1 62c-3.6-2.9-8.9-5-15.8-6.3-2.8-.5-5-1-6.9-1.6-.5-.2-1-.3-1.5-.5v12.5c1.4.3 2.9.6 4.4.9 2.5.4 4.6 1 6.2 1.6s2.9 1.3 3.9 2.2c.9.8 1.6 1.6 2 2.6.4.9.6 1.9.6 3 0 2.3-.9 4.2-2.7 5.8-1.8 1.6-4.6 2.4-8.4 2.4-2.2 0-4.2-.3-5.9-.8v12c1.8.3 3.7.4 5.7.4 3.7 0 7-.5 10-1.4 2.9-.9 5.5-2.3 7.5-4s3.6-3.9 4.7-6.3c1.1-2.5 1.7-5.3 1.7-8.4V75c0-5.7-1.8-10-5.5-13zM12.9 42.5c2.1 1.9 3.1 4.2 3.1 6.9v2.3h12.4v-3.4c0-2.7-.5-5.3-1.6-7.7-1-2.4-2.5-4.6-4.6-6.5-2-1.9-4.5-3.4-7.5-4.4-3-1.1-6.5-1.7-10.3-1.7-1.5 0-3 .1-4.4.3v11.9c1.3-.4 2.7-.5 4.4-.5 3.7-.2 6.5.8 8.5 2.8zm67.9 10.9c-1.8-2.1-4-3.6-6.5-4.7-2.4-1.1-5-1.6-7.8-1.6-3.7 0-6.7.7-9.1 2.2-2.4 1.4-4.2 3.4-5.5 5.9h-1.7v-6.8H38.4v65.4h11.8V88.2H52c.6 1.1 1.2 2.1 2 3.1.8.9 1.8 1.8 2.9 2.5 1.2.8 2.6 1.3 4.1 1.8 1.6.4 3.4.7 5.5.7 2.9 0 5.5-.5 8-1.5 2.5-1.1 4.7-2.6 6.5-4.6 1.8-2.1 3.3-4.6 4.3-7.5 1.1-2.9 1.6-6.3 1.6-10.2v-1.7c0-3.8-.6-7.1-1.7-10.1-1-2.9-2.5-5.3-4.4-7.3zm-5.7 18.9c0 3.9-1.2 7.1-3.5 9.4-2.3 2.3-5.2 3.4-8.9 3.4s-6.7-1.2-9-3.5c-2.3-2.4-3.4-5.5-3.4-9.3v-1.1c0-3.8 1.1-6.9 3.4-9.2 2.3-2.4 5.3-3.6 9-3.6s6.7 1.2 8.9 3.5c2.3 2.3 3.5 5.4 3.5 9.3v1.1zm66.2 8.6V48.4h-11.8V54h-1.7c-1.2-2.4-2.8-4.1-4.9-5.3-2-1.1-4.7-1.7-8-1.7-2.8 0-5.4.6-7.8 1.7-2.4 1.1-4.5 2.6-6.3 4.7-1.8 2.1-3.3 4.6-4.3 7.6-1.1 2.9-1.6 6.3-1.6 10v1.5c0 3.8.5 7.1 1.6 10.1 1.1 2.9 2.6 5.5 4.5 7.5 1.9 2.1 4 3.6 6.5 4.7s5.2 1.6 8 1.6c3 0 5.6-.6 7.9-1.8 2.3-1.3 4-3.4 5.3-6.3h1.7c0 2 .7 3.6 2 4.9 1.4 1.3 3.1 1.9 5.3 1.9h8.1V83.7H144c-1.8 0-2.7-.9-2.7-2.8zm-11.8-8.6c0 3.9-1 7.1-3.1 9.4-2.1 2.3-4.8 3.4-8.3 3.4-3.4 0-6.2-1.1-8.3-3.4-2.1-2.3-3.1-5.5-3.1-9.4v-1.1c0-3.9 1-7.1 3.1-9.3 2.1-2.3 4.8-3.5 8.3-3.5 3.4 0 6.2 1.2 8.3 3.5 2.1 2.3 3.1 5.4 3.1 9.3v1.1zm98.3-12.2c1.2-1 2.6-1.6 4.2-2V47.3c-2.1.3-4 .8-5.9 1.6-2.8 1.1-5.3 2.7-7.4 4.8-2.1 2.1-3.8 4.6-5.1 7.5-1.2 2.9-1.8 6.2-1.8 9.8v.6c0 3.9.6 7.4 1.7 10.4 1.2 3.1 2.8 5.7 4.9 7.8 2.1 2.1 4.6 3.8 7.5 4.9 1.9.7 4 1.2 6.1 1.5V84.7c-.4-.1-.7-.2-1.1-.3-1.3-.5-2.5-1.2-3.6-2-1-.9-1.8-1.9-2.4-3-.6-1.2-.9-2.5-.9-3.9h8V65.4h-7.8c.5-2 1.8-3.8 3.6-5.3zm-61.5 6.1c.7-1.7 1.6-3.1 2.7-4.2 1.1-1.2 2.4-2.1 3.9-2.7 1.5-.6 3.1-.9 4.8-.9 3.6 0 6.5 1 8.5 3s3.2 4.4 3.6 7.1l11.7-3c-1.1-5.5-3.6-10-7.7-13.3-4-3.4-9.3-5.1-15.8-5.1-3.4 0-6.6.6-9.6 1.7-2.9 1.1-5.5 2.8-7.8 4.9-2.2 2.1-3.9 4.7-5.2 7.7s-1.9 6.4-1.9 10.2v1.1c0 3.8.6 7.1 1.9 10.1 1.3 2.9 3 5.4 5.2 7.4s4.8 3.5 7.7 4.6c3 1.1 6.2 1.6 9.7 1.6 6.6 0 11.9-1.7 15.9-5.1 4-3.4 6.5-7.8 7.6-13.3l-11.7-3c-.6 3.1-1.8 5.5-3.8 7.3-1.9 1.8-4.6 2.7-8.3 2.7-1.7 0-3.3-.3-4.8-.8-1.5-.6-2.8-1.4-3.9-2.4-1.1-1.1-2-2.4-2.7-3.9-.6-1.6-.9-3.5-.9-5.5v-.6c0-2.1.3-3.9.9-5.6z",fill:"#270920"}),Object(E.createElement)(y.Path,{d:"M49.7 89.3c-1.1 1.3-2.6 2-4.5 2h-6.5c.1-1.1.2-2.5.2-4.3V68.5c0-1.3.1-2.2.4-2.8s.6-1 1.1-1.1c.5-.2 1.1-.3 2-.3v-3.2h-14v3.7l3.6-.1c-.1 1.1-.2 2.5-.2 4.4v18.5c0 1.3-.1 2.2-.4 2.8-.3.6-.6 1-1.1 1.2-.5.2-1.1.3-2 .3V95h25.8l.3-11.6h-3.2c.1 2.6-.5 4.5-1.5 5.9zM101.3 70c-2.5 0-4.8 1.5-7 4.5h-.1v-2.3c0-.8-.1-1.4-.1-1.9h-2.4c-.4.4-1.3.7-2.5 1-1.3.3-2.9.4-4.9.4v3.7l3.4-.1c-.1 1.3-.2 2.7-.2 4.1v8.1c0 1.5-.2 2.6-.5 3.3-.3.7-1.1 1-2.3 1V95h12.7v-3.7c-1.1 0-2.1 0-3.1.1.1-1.3.2-2.7.2-4.3v-7.9c.3-1 1-2.1 1.9-3.1 1-1.1 1.9-1.6 2.8-1.6.1 1 .5 1.8 1.1 2.2.6.4 1.4.6 2.2.6 1.1 0 1.9-.4 2.5-1.1.5-.7.8-1.5.8-2.3 0-1.3-.4-2.3-1.2-3-1-.5-2-.9-3.3-.9zm25.8 21.5c.1-1.3.2-2.7.2-4.3v-7.9c0-6.2-3-9.2-9-9.2-1.9 0-3.6.3-5.2.8-1.5.5-2.8 1.3-3.7 2.2-.9 1-1.4 2.1-1.4 3.3 0 .9.3 1.7.8 2.4.5.6 1.3.9 2.3.9 1 0 1.8-.3 2.3-.9.5-.6.8-1.3.8-2.1s-.2-1.4-.6-1.8c.9-.9 2.1-1.4 3.5-1.4 2.2 0 3.3 1.5 3.3 4.4v2.5c-3.7.2-6.9 1-9.5 2.5-2.6 1.5-4 3.6-4 6.4 0 1.9.6 3.4 1.7 4.6 1.2 1.2 2.8 1.8 4.8 1.8 2.8 0 5.2-1 7.2-3 .1 1.1.1 1.8.2 2.2h9.1v-3.7c-.7.1-1.8.2-2.8.3zm-6.6-2.2c-1.1 1.2-2.4 1.7-3.8 1.7-.8 0-1.4-.2-2-.6-.5-.4-.8-1.1-.8-1.9 0-1.3.6-2.4 1.8-3.1 1.3-.8 2.8-1.3 4.7-1.5v5.4zM75.1 71.5c-1.8-1-3.9-1.5-6.2-1.5-2.2 0-4.3.6-6.1 1.7-1.8 1.1-3.3 2.7-4.4 4.7-1.1 2-1.6 4.4-1.6 7 0 2.5.5 4.7 1.6 6.5 1.1 1.9 2.5 3.3 4.4 4.3 1.9 1 4 1.5 6.3 1.5 2.4 0 4.4-.5 6.2-1.6 1.8-1.1 3.3-2.6 4.3-4.6 1-2 1.5-4.3 1.5-7 0-2.5-.5-4.7-1.6-6.6-1.1-1.9-2.5-3.4-4.4-4.4zm-2.2 18.4c-.7 1.6-2 2.5-3.7 2.5-1.8 0-3.1-1-4-3-.9-2-1.3-4.4-1.3-7.2 0-2.5.4-4.5 1.2-6.2.8-1.7 2.1-2.5 3.9-2.5 1.7 0 3 1 3.8 3s1.2 4.4 1.2 7.2c-.1 2.5-.4 4.5-1.1 6.2z",fill:"#fff"}));case"SYSTEM_BASKER":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#F18F1B",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M10.016 50.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.203 0-3.422-2.078-5.344-6.844-6.297l-2.39-.485c-2.657-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.203 3.078h4.454c-.078-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM53 37v-8.422l7.86-14.125h-5.063l-5.063 9.625h-.109l-5.047-9.625h-5.14l7.843 14.125V37H53zM73.016 60.563c.14 4.25 3.718 6.828 9.093 6.828 5.641 0 9.094-2.797 9.094-7.204 0-3.421-2.078-5.343-6.844-6.296l-2.39-.485c-2.656-.531-3.75-1.39-3.75-2.781 0-1.656 1.562-2.75 3.89-2.75 2.375 0 4.047 1.156 4.204 3.078h4.453c-.079-4.14-3.391-6.89-8.657-6.89-5.015 0-8.609 2.734-8.609 6.859 0 3.36 2.203 5.516 6.703 6.406l2.375.469c2.828.578 3.89 1.422 3.89 2.906 0 1.656-1.718 2.875-4.234 2.875-2.562 0-4.468-1.125-4.765-3.016h-4.453zM114.984 47V28.344h6.532v-3.89H103.75v3.89h6.516V47h4.718zM149.812 43.094h-10.218v-5.688h9.64v-3.625h-9.64v-5.437h10.218v-3.89h-14.937V47h14.937v-3.906zM187.75 37V14.453h-5.469l-6.406 16.188h-.125l-6.406-16.188h-5.469V37h4.203V21.781h.125L174.328 37h2.969l6.125-15.219h.125V37h4.203z",fill:"#492B06"}),Object(E.createElement)(y.Path,{d:"M22.032 92H9.63v-.72c.396-.012.72-.048.972-.108s.444-.162.576-.306c.132-.144.222-.348.27-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.024-.756-.072-1.008-.036-.264-.114-.468-.234-.612a.852.852 0 0 0-.522-.306 4.454 4.454 0 0 0-.864-.126v-.72h6.21v.72a5.062 5.062 0 0 0-.99.108c-.24.06-.426.168-.558.324-.132.156-.222.372-.27.648a8.868 8.868 0 0 0-.054 1.098v7.542c0 .504.048.918.144 1.242.108.312.288.558.54.738.252.168.588.288 1.008.36.42.06.942.09 1.566.09.696 0 1.278-.042 1.746-.126.468-.084.858-.24 1.17-.468.324-.24.582-.558.774-.954.192-.396.354-.912.486-1.548h.72L22.032 92zm5.182-2.952c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.574 9.594c0 .444.06.858.18 1.242.132.372.306.696.522.972.216.276.474.492.774.648.3.156.63.234.99.234.72 0 1.266-.33 1.638-.99.372-.66.558-1.632.558-2.916 0-1.248-.186-2.196-.558-2.844-.36-.66-.906-.99-1.638-.99-.432 0-.834.12-1.206.36-.36.228-.642.552-.846.972-.276.576-.414 1.302-.414 2.178v1.134zm-.036-4.356h.072a3.07 3.07 0 0 1 1.206-1.044c.492-.252 1.05-.378 1.674-.378.636 0 1.224.132 1.764.396.552.252 1.026.6 1.422 1.044.408.444.726.966.954 1.566.228.6.342 1.242.342 1.926 0 .72-.126 1.386-.378 1.998-.24.6-.576 1.122-1.008 1.566-.42.444-.918.792-1.494 1.044a4.362 4.362 0 0 1-1.8.378c-.66 0-1.284-.126-1.872-.378-.576-.264-1.038-.606-1.386-1.026L31.234 92h-.612V81.29c0-1.128-.078-1.902-.234-2.322a.93.93 0 0 0-.126-.216.488.488 0 0 0-.216-.144 1.07 1.07 0 0 0-.36-.108 7.62 7.62 0 0 0-.612-.108v-.612l4.032-.72v6.642zm12.759 5.508c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92H41.76v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zM59.8 90.326c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zM65.985 92v-.72a4.75 4.75 0 0 0 .972-.108c.252-.06.444-.162.576-.306.144-.144.24-.348.288-.612.048-.264.072-.606.072-1.026v-8.316c0-.42-.018-.756-.054-1.008-.036-.264-.114-.468-.234-.612a.755.755 0 0 0-.468-.306 3.572 3.572 0 0 0-.774-.126v-.72h5.778c1.812 0 3.204.294 4.176.882.984.576 1.476 1.404 1.476 2.484 0 1.428-1.026 2.436-3.078 3.024v.072c.66 0 1.254.096 1.782.288.54.18.996.438 1.368.774a3.523 3.523 0 0 1 1.17 2.682c0 .612-.15 1.146-.45 1.602-.288.456-.708.84-1.26 1.152-1.068.6-2.538.9-4.41.9h-6.93zm7.056-1.098c1.932 0 2.898-.87 2.898-2.61 0-1.068-.348-1.848-1.044-2.34-.36-.252-.828-.432-1.404-.54-.564-.108-1.26-.162-2.088-.162h-.864v3.6c0 .744.192 1.272.576 1.584.384.312 1.026.468 1.926.468zM71.6 84.17c.54 0 1.008-.048 1.404-.144a3.249 3.249 0 0 0 1.008-.45c.576-.396.864-1.014.864-1.854 0-.876-.216-1.506-.648-1.89-.432-.396-1.128-.594-2.088-.594h-1.278c-.216 0-.324.102-.324.306v4.626H71.6zm14.325 2.7c-1.008.456-1.77.882-2.286 1.278-.504.384-.756.786-.756 1.206 0 .348.096.624.288.828a.948.948 0 0 0 .72.306c.288 0 .558-.048.81-.144.252-.108.468-.246.648-.414.18-.168.318-.366.414-.594.108-.24.162-.492.162-.756v-1.71zm0-.954v-.756c0-.696-.126-1.2-.378-1.512-.24-.324-.618-.486-1.134-.486-.348 0-.612.096-.792.288-.18.18-.348.486-.504.918-.108.3-.264.534-.468.702-.192.168-.462.252-.81.252-.336 0-.594-.102-.774-.306-.18-.204-.27-.492-.27-.864 0-.576.312-1.032.936-1.368.636-.336 1.59-.504 2.862-.504 1.344 0 2.304.246 2.88.738.576.48.864 1.29.864 2.43v3.942c0 1.02.204 1.53.612 1.53a.978.978 0 0 0 .63-.234l.27.522c-.168.3-.432.54-.792.72a2.7 2.7 0 0 1-1.188.252c-.552 0-.972-.168-1.26-.504-.288-.336-.432-.81-.432-1.422h-.09c-.348.624-.798 1.098-1.35 1.422-.552.324-1.182.486-1.89.486-.756 0-1.362-.21-1.818-.63-.456-.432-.684-.99-.684-1.674 0-.528.234-1.02.702-1.476.468-.468 1.248-.924 2.34-1.368l2.538-1.098zM91.6 92h-.558v-3.276h.756c.204.864.498 1.494.882 1.89.384.396.882.594 1.494.594.444 0 .786-.09 1.026-.27a.923.923 0 0 0 .378-.774c0-.336-.15-.66-.45-.972-.3-.324-.786-.666-1.458-1.026-.912-.492-1.566-.978-1.962-1.458a2.574 2.574 0 0 1-.594-1.656c0-.396.072-.762.216-1.098.156-.348.36-.648.612-.9.264-.252.576-.444.936-.576.36-.144.75-.216 1.17-.216.372 0 .738.054 1.098.162.372.108.696.258.972.45l.324-.432h.468v2.718h-.702c-.276-.684-.564-1.176-.864-1.476-.288-.3-.642-.45-1.062-.45-.336 0-.606.09-.81.27-.192.18-.288.42-.288.72 0 .336.144.654.432.954.3.3.792.63 1.476.99.48.264.894.522 1.242.774s.63.51.846.774c.216.252.372.522.468.81.108.276.162.576.162.9 0 .42-.078.798-.234 1.134a2.462 2.462 0 0 1-.666.864c-.288.24-.636.426-1.044.558-.396.132-.84.198-1.332.198-.516 0-.996-.066-1.44-.198-.444-.144-.81-.348-1.098-.612L91.6 92zm13.299-.72c.384 0 .654-.012.81-.036.156-.036.234-.102.234-.198 0-.072-.084-.246-.252-.522-.156-.288-.36-.618-.612-.99l-1.368-2.052-.9.864v.702c0 .468.018.846.054 1.134.036.288.096.516.18.684a.759.759 0 0 0 .378.324c.168.06.378.09.63.09V92h-5.31v-.72c.336-.012.606-.048.81-.108a.969.969 0 0 0 .486-.306c.12-.156.198-.366.234-.63a6.4 6.4 0 0 0 .072-1.062v-7.632c0-.732-.012-1.308-.036-1.728-.024-.42-.09-.732-.198-.936a.647.647 0 0 0-.468-.396 3.877 3.877 0 0 0-.846-.072v-.666l4.014-.684v10.008l1.728-1.638a28.697 28.697 0 0 0 1.332-1.314c.264-.3.396-.516.396-.648 0-.108-.114-.18-.342-.216-.216-.048-.624-.072-1.224-.072v-.72h4.914v.72c-.456 0-.858.078-1.206.234-.348.156-.726.426-1.134.81l-1.746 1.638 3.114 4.41c.276.384.546.648.81.792.264.144.612.216 1.044.216V92h-5.598v-.72zm14.737-.954c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61zm8.945 3.618c0 .468.018.84.054 1.116.048.264.138.468.27.612.132.144.324.24.576.288.252.036.588.054 1.008.054V92h-6.012v-.72c.36-.024.648-.06.864-.108.216-.048.378-.144.486-.288.108-.144.174-.348.198-.612.036-.276.054-.642.054-1.098v-2.196c0-.744-.018-1.338-.054-1.782-.036-.444-.114-.786-.234-1.026a.867.867 0 0 0-.522-.468c-.216-.084-.504-.126-.864-.126v-.63l3.6-.666.288 2.07h.072c.324-.636.75-1.14 1.278-1.512.528-.372 1.086-.558 1.674-.558.456 0 .828.114 1.116.342.288.228.432.516.432.864 0 .384-.114.708-.342.972-.216.264-.516.396-.9.396-.18 0-.342-.036-.486-.108a3.131 3.131 0 0 1-.396-.234 2.28 2.28 0 0 0-.342-.252.549.549 0 0 0-.342-.126c-.228 0-.444.15-.648.45-.204.3-.372.702-.504 1.206a9.68 9.68 0 0 0-.234 1.224c-.06.444-.09.888-.09 1.332v.864zm6.139-4.428a5.587 5.587 0 0 0-.378-.828 1.667 1.667 0 0 0-.378-.486.847.847 0 0 0-.414-.234 2.18 2.18 0 0 0-.522-.054v-.72h5.382v.72c-.3 0-.54.012-.72.036-.168.024-.3.06-.396.108a.328.328 0 0 0-.162.198.798.798 0 0 0-.036.252c0 .156.03.336.09.54.06.204.132.408.216.612l1.71 4.716h.072l1.926-4.698a6.35 6.35 0 0 0 .198-.54 1.66 1.66 0 0 0 .072-.45c0-.264-.09-.456-.27-.576-.18-.12-.498-.186-.954-.198v-.72h3.978v.72c-.324 0-.606.084-.846.252-.228.168-.468.54-.72 1.116l-3.366 7.632h-1.638l-2.844-7.398zm14.041 4.266c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V86.96c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v6.768zm-2.646-10.584c0-.396.132-.726.396-.99a1.35 1.35 0 0 1 .99-.414c.396 0 .726.138.99.414.276.264.414.594.414.99 0 .384-.138.714-.414.99a1.343 1.343 0 0 1-.99.396c-.384 0-.714-.132-.99-.396a1.382 1.382 0 0 1-.396-.99zm8.969 10.584c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm6.399 0c0 .48.018.864.054 1.152.036.288.108.51.216.666a.833.833 0 0 0 .468.324c.204.048.48.078.828.09V92h-5.67v-.72c.336-.012.606-.048.81-.108a.968.968 0 0 0 .486-.324c.12-.156.198-.366.234-.63.048-.276.072-.624.072-1.044V81.74c0-.696-.012-1.266-.036-1.71-.024-.456-.054-.768-.09-.936-.06-.3-.198-.498-.414-.594-.204-.096-.582-.144-1.134-.144v-.612l4.176-.684v11.988zm11.672 1.278c-1.092 1.236-2.454 1.854-4.086 1.854a5.787 5.787 0 0 1-2.034-.342c-.6-.24-1.116-.57-1.548-.99a4.592 4.592 0 0 1-1.008-1.53c-.24-.588-.36-1.242-.36-1.962 0-.744.126-1.422.378-2.034a4.619 4.619 0 0 1 1.062-1.602 5.01 5.01 0 0 1 1.638-1.062 5.62 5.62 0 0 1 2.088-.378c1.272 0 2.262.342 2.97 1.026.708.684 1.062 1.644 1.062 2.88 0 .192-.03.312-.09.36-.06.036-.228.054-.504.054h-5.796c-.048.108-.072.306-.072.594 0 1.176.252 2.106.756 2.79.516.684 1.212 1.026 2.088 1.026.504 0 1.002-.114 1.494-.342.504-.228.99-.552 1.458-.972l.504.63zm-3.492-4.734c.48 0 .786-.024.918-.072.144-.06.216-.192.216-.396 0-.528-.15-.96-.45-1.296a1.455 1.455 0 0 0-1.134-.504c-.516 0-.978.216-1.386.648-.396.42-.654.96-.774 1.62h2.61z",fill:"#FFF1E1"}));case"RUBIK_WORK":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#000",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M14.936 62c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.696c0-.352.128-.656.384-.912s.56-.384.912-.384h14.208c4.608 0 8.208 1.04 10.8 3.12 2.592 2.048 3.888 4.896 3.888 8.544 0 2.08-.464 3.92-1.392 5.52-.928 1.568-2.192 2.864-3.792 3.888l5.904 10.944c.096.192.144.368.144.528 0 .288-.112.544-.336.768a.977.977 0 0 1-.72.288H33.8c-.576 0-1.04-.128-1.392-.384-.32-.288-.544-.592-.672-.912l-4.128-9.168H25.64v9.168c0 .352-.128.656-.384.912s-.56.384-.912.384h-9.408zm14.208-19.584c.704 0 1.248-.224 1.632-.672.384-.48.576-1.072.576-1.776s-.192-1.312-.576-1.824c-.352-.544-.896-.816-1.632-.816H25.64v5.088h3.504zM56.873 62.48c-1.696 0-3.248-.384-4.656-1.152-1.408-.8-2.544-2.016-3.408-3.648-.832-1.632-1.248-3.664-1.248-6.096V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.168c.352 0 .656.128.912.384s.384.56.384.912v12.912c0 .864.208 1.52.624 1.968.416.448 1.008.672 1.776.672s1.36-.224 1.776-.672c.416-.448.624-1.104.624-1.968V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h9.12c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V59.12c-.768 1.12-1.84 1.968-3.216 2.544-1.376.544-2.96.816-4.752.816zm41.127 0c-3.04 0-5.408-.96-7.104-2.88v1.104c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.16c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.88c.352 0 .656.128.912.384s.384.56.384.912v9.6C93.28 37.312 95.408 36.56 98 36.56c2.912 0 5.296.944 7.152 2.832 1.888 1.856 2.896 4.592 3.024 8.208.032.48.048 1.104.048 1.872 0 .8-.016 1.44-.048 1.92-.16 3.808-1.152 6.608-2.976 8.4-1.824 1.792-4.224 2.688-7.2 2.688zm-3.984-8.592c.832 0 1.408-.224 1.728-.672.352-.448.576-1.152.672-2.112.064-.64.096-1.168.096-1.584 0-.416-.032-.944-.096-1.584-.096-.96-.32-1.664-.672-2.112-.32-.448-.896-.672-1.728-.672-.8 0-1.392.208-1.776.624-.352.384-.56.976-.624 1.776-.032.48-.048 1.072-.048 1.776s.016 1.296.048 1.776c.064.928.272 1.632.624 2.112.352.448.944.672 1.776.672zM113.415 34.4c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912v-5.808c0-.352.128-.656.384-.912s.56-.384.912-.384h8.112c.352 0 .656.128.912.384s.384.56.384.912v5.808c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.112zm-.24 27.6c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V38.336c0-.352.128-.656.384-.912s.56-.384.912-.384h8.592c.352 0 .656.128.912.384s.384.56.384.912v22.368c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.592zm15.515 0c-.352 0-.656-.128-.912-.384a1.246 1.246 0 0 1-.384-.912V29.216c0-.352.128-.656.384-.912s.56-.384.912-.384h8.4c.352 0 .656.128.912.384s.384.56.384.912v15.552l4.224-6.912c.32-.544.784-.816 1.392-.816h9.696c.32 0 .592.112.816.336.224.224.336.496.336.816 0 .224-.08.464-.24.72l-6.576 9.36 7.776 11.952c.128.192.192.4.192.624 0 .32-.112.592-.336.816a1.11 1.11 0 0 1-.816.336h-10.08c-.64 0-1.136-.272-1.488-.816l-4.896-8.16v7.68c0 .352-.128.656-.384.912s-.56.384-.912.384h-8.4zM25.4 105.48c-3.776 0-6.768-.88-8.976-2.64-2.208-1.76-3.312-4.16-3.312-7.2 0-1.952.56-3.664 1.68-5.136 1.12-1.472 2.72-2.8 4.8-3.984-1.216-1.312-2.096-2.528-2.64-3.648-.512-1.152-.768-2.32-.768-3.504 0-1.536.4-2.944 1.2-4.224.8-1.28 1.984-2.304 3.552-3.072 1.568-.768 3.456-1.152 5.664-1.152 2.048 0 3.824.384 5.328 1.152 1.536.736 2.688 1.744 3.456 3.024a7.494 7.494 0 0 1 1.2 4.128c0 1.856-.56 3.456-1.68 4.8-1.12 1.312-2.784 2.608-4.992 3.888l5.712 5.712c.512-.832.944-1.632 1.296-2.4.384-.8.768-1.84 1.152-3.12.128-.448.464-.672 1.008-.672h4.848c.256 0 .48.096.672.288.192.16.288.368.288.624-.032 1.12-.56 2.64-1.584 4.56-.992 1.92-2.096 3.616-3.312 5.088l5.376 5.424c.224.288.336.528.336.72a.774.774 0 0 1-.288.624.844.844 0 0 1-.624.24h-6.528c-.512 0-.928-.16-1.248-.48l-2.16-2.064c-2.464 2.016-5.616 3.024-9.456 3.024zm.432-21.984c1.28-.64 2.24-1.264 2.88-1.872.672-.608 1.008-1.328 1.008-2.16 0-.864-.304-1.552-.912-2.064-.576-.544-1.312-.816-2.208-.816a3.31 3.31 0 0 0-2.208.816c-.608.544-.912 1.248-.912 2.112 0 .576.176 1.184.528 1.824.384.608.992 1.328 1.824 2.16zM25.4 99.384c1.984 0 3.632-.592 4.944-1.776l-6.384-6.384c-2.112 1.12-3.168 2.48-3.168 4.08 0 1.216.464 2.208 1.392 2.976.928.736 2 1.104 3.216 1.104zM65.56 105h-3.168l-6.24-21.12h2.752l5.088 19.104 4.992-19.104h2.912l4.992 19.168 5.12-19.168H84.6L78.392 105h-3.168L71.48 91.304l-1.088-4.768h-.032l-1.088 4.768L65.56 105zm28.824-16.32c2.41 0 4.299.736 5.664 2.208 1.387 1.472 2.08 3.51 2.08 6.112 0 2.603-.693 4.64-2.08 6.112-1.365 1.472-3.253 2.208-5.664 2.208-2.41 0-4.31-.736-5.696-2.208-1.365-1.472-2.048-3.51-2.048-6.112 0-2.603.683-4.64 2.048-6.112 1.387-1.472 3.286-2.208 5.696-2.208zm0 2.208c-1.621 0-2.89.544-3.808 1.632C89.66 93.608 89.2 95.101 89.2 97c0 1.899.459 3.392 1.376 4.48.918 1.088 2.187 1.632 3.808 1.632 1.622 0 2.89-.544 3.808-1.632.918-1.088 1.376-2.581 1.376-4.48 0-1.899-.458-3.392-1.376-4.48-.917-1.088-2.186-1.632-3.808-1.632zm20.269-2.208c.768 0 1.355.107 1.76.32l-.512 2.496c-.512-.277-1.184-.416-2.016-.416-.683 0-1.355.203-2.016.608-.64.384-1.173.981-1.6 1.792-.405.79-.608 1.75-.608 2.88V105h-2.56V89h2.08l.352 2.624c.896-1.963 2.603-2.944 5.12-2.944zm11.463 8.416l-3.392 3.392V105h-2.56V81.64h2.56v15.648L131.012 89h3.2l-6.24 6.24 6.624 9.76h-3.104l-5.376-7.904zm29.655-13.536c3.776 0 6.496 1.493 8.16 4.48l-2.208 1.792c-.64-1.408-1.408-2.4-2.304-2.976-.874-.597-2.08-.896-3.616-.896-1.621 0-2.901.341-3.84 1.024-.917.661-1.376 1.515-1.376 2.56 0 .683.182 1.248.544 1.696.363.448.96.843 1.792 1.184.854.32 2.027.608 3.52.864 2.795.47 4.768 1.173 5.92 2.112 1.174.939 1.76 2.24 1.76 3.904 0 1.195-.341 2.251-1.024 3.168-.661.896-1.61 1.6-2.848 2.112-1.237.491-2.666.736-4.288.736-2.133 0-3.957-.416-5.472-1.248-1.493-.832-2.634-1.941-3.424-3.328l2.208-1.792c.576 1.259 1.419 2.24 2.528 2.944 1.131.683 2.539 1.024 4.224 1.024 1.664 0 2.987-.299 3.968-.896.982-.619 1.472-1.483 1.472-2.592 0-.939-.426-1.685-1.28-2.24-.853-.555-2.368-1.024-4.544-1.408-2.816-.49-4.81-1.195-5.984-2.112-1.173-.917-1.76-2.197-1.76-3.84 0-1.13.32-2.176.96-3.136.64-.96 1.558-1.717 2.752-2.272 1.195-.576 2.582-.864 4.16-.864zm26.044 19.584a5.25 5.25 0 0 0 1.28-.16l-.16 2.016a5.68 5.68 0 0 1-1.92.32c-.832 0-1.494-.181-1.984-.544-.47-.363-.768-.971-.896-1.824-.491.747-1.216 1.333-2.176 1.76a7.435 7.435 0 0 1-2.976.608c-1.579 0-2.88-.363-3.904-1.088-1.024-.747-1.536-1.813-1.536-3.2 0-1.216.533-2.261 1.6-3.136 1.066-.896 2.613-1.515 4.64-1.856l4.256-.704v-.896c0-1.067-.331-1.92-.992-2.56-.662-.64-1.579-.96-2.752-.96-1.067 0-1.995.256-2.784.768-.768.512-1.366 1.27-1.792 2.272l-1.888-1.376c.426-1.195 1.216-2.144 2.368-2.848 1.173-.704 2.538-1.056 4.096-1.056 1.898 0 3.424.459 4.576 1.376 1.152.917 1.728 2.272 1.728 4.064v7.872c0 .384.096.672.288.864.192.192.501.288.928.288zm-8.704-.064c1.344 0 2.496-.32 3.456-.96.981-.64 1.472-1.472 1.472-2.496v-2.208l-3.584.672c-1.43.256-2.496.63-3.2 1.12-.704.47-1.056 1.077-1.056 1.824 0 .661.256 1.173.768 1.536.512.341 1.226.512 2.144.512zm21.485-14.4c1.813 0 3.306.523 4.48 1.568 1.173 1.045 1.76 2.55 1.76 4.512V105h-2.56v-9.344c0-1.664-.363-2.87-1.088-3.616-.704-.747-1.654-1.12-2.848-1.12-.854 0-1.654.192-2.4.576-.747.363-1.366.97-1.856 1.824-.47.832-.704 1.888-.704 3.168V105h-2.56V89h2.24l.16 2.496c.533-.96 1.269-1.664 2.208-2.112.938-.47 1.994-.704 3.168-.704zm17.476 16.64c-1.536 0-2.922-.299-4.16-.896-1.237-.619-2.144-1.525-2.72-2.72l2.08-1.44a3.898 3.898 0 0 0 1.888 2.112c.896.469 1.952.704 3.168.704 1.259 0 2.219-.224 2.88-.672.662-.448.992-1.013.992-1.696 0-.619-.309-1.11-.928-1.472-.618-.384-1.706-.715-3.264-.992-1.536-.277-2.752-.608-3.648-.992-.896-.405-1.546-.907-1.952-1.504-.405-.619-.608-1.376-.608-2.272 0-.875.256-1.675.768-2.4.512-.725 1.248-1.301 2.208-1.728.96-.448 2.07-.672 3.328-.672 1.707 0 3.072.32 4.096.96 1.046.619 1.792 1.579 2.24 2.88l-2.176 1.28c-.341-1.024-.864-1.76-1.568-2.208-.682-.448-1.546-.672-2.592-.672-1.045 0-1.93.235-2.656.704-.725.47-1.088 1.013-1.088 1.632 0 .704.31 1.248.928 1.632.64.384 1.771.715 3.392.992 2.219.363 3.787.907 4.704 1.632.918.725 1.376 1.75 1.376 3.072a3.95 3.95 0 0 1-.832 2.464c-.533.704-1.312 1.259-2.336 1.664-1.002.405-2.176.608-3.52.608z",fill:"#fff"}));case"PLAY_ROBOTO":return Object(E.createElement)(y.SVG,{width:"232",height:"132",viewBox:"0 0 232 132",xmlns:"http://www.w3.org/2000/svg"},Object(E.createElement)(y.Path,{fill:"#B9B5B8",d:"M0 0h232v132H0z"}),Object(E.createElement)(y.Path,{d:"M149.438 101c-.75-2.125-1.23-5.27-1.438-9.438-2.625 3.417-5.979 6.063-10.062 7.938-4.042 1.833-8.334 2.75-12.876 2.75-6.5 0-11.77-1.812-15.812-5.438-4-3.624-6-8.208-6-13.75 0-6.583 2.729-11.791 8.188-15.624 5.5-3.834 13.145-5.75 22.937-5.75h13.563V54c0-4.833-1.5-8.625-4.5-11.375-2.959-2.792-7.292-4.188-13-4.188-5.209 0-9.521 1.334-12.938 4-3.417 2.667-5.125 5.876-5.125 9.626l-7.5-.063c0-5.375 2.5-10.02 7.5-13.938 5-3.958 11.146-5.937 18.437-5.937 7.542 0 13.48 1.896 17.813 5.688 4.375 3.75 6.625 9 6.75 15.75v32c0 6.541.687 11.437 2.063 14.687v.75h-8zm-23.5-5.375c5 0 9.458-1.208 13.374-3.625 3.959-2.417 6.834-5.646 8.626-9.688V67.439h-13.376c-7.458.083-13.291 1.458-17.5 4.124-4.208 2.626-6.312 6.25-6.312 10.876 0 3.791 1.396 6.937 4.188 9.437 2.833 2.5 6.5 3.75 11 3.75zM39.328 101.896c-5.461 0-9.6-1.451-12.416-4.352-2.73-2.987-4.096-6.699-4.096-11.136 0-3.84.981-6.997 2.944-9.472 2.048-2.56 4.437-4.523 7.168-5.888 2.73-1.365 6.272-2.773 10.624-4.224 4.608-1.536 7.979-2.944 10.112-4.224 2.133-1.28 3.2-3.072 3.2-5.376V45.832c0-2.73-.683-5.163-2.048-7.296s-3.712-3.2-7.04-3.2c-2.645 0-5.035.725-7.168 2.176 2.901 1.024 5.035 2.56 6.4 4.608 1.45 1.963 2.176 4.181 2.176 6.656 0 3.328-1.195 6.016-3.584 8.064-2.304 1.963-5.12 2.944-8.448 2.944-3.328 0-5.973-1.024-7.936-3.072-1.877-2.133-2.816-4.821-2.816-8.064 0-2.56.64-4.779 1.92-6.656 1.28-1.877 3.285-3.584 6.016-5.12 4.779-2.73 11.605-4.096 20.48-4.096 4.693 0 8.747.47 12.16 1.408 3.413.853 6.315 2.517 8.704 4.992 1.707 1.792 2.816 4.053 3.328 6.784.597 2.645.896 6.357.896 11.136V91.4c0 2.133.128 3.584.384 4.352.341.768.896 1.152 1.664 1.152.597 0 1.237-.17 1.92-.512a15.863 15.863 0 0 0 1.92-1.408l1.28 2.176c-3.67 3.157-8.917 4.736-15.744 4.736-5.12 0-8.704-.853-10.752-2.56-2.048-1.792-3.157-4.181-3.328-7.168-4.01 6.485-9.984 9.728-17.92 9.728zm12.8-10.24c1.792 0 3.37-.725 4.736-2.176V62.472c-.768 1.28-2.176 2.944-4.224 4.992-2.304 2.219-4.053 4.395-5.248 6.528-1.195 2.048-1.792 4.864-1.792 8.448 0 6.144 2.176 9.216 6.528 9.216z",fill:"#270920"}));default:return Object(E.createElement)("div",{className:"font-pairings-panel__preview"},Object(E.createElement)("h1",{style:{fontFamily:t}},"Lorem Ipsum"),Object(E.createElement)("p",{style:{fontFamily:c}},"Etiam tempor orci eu lobortis elementum nibh tellus molestie."))}},M=function(e){var t=e.fontPairings,c=e.fontBase,n=e.fontHeadings,a=e.update;return Object(E.createElement)(E.Fragment,null,Object(E.createElement)("h3",null,Object(P.__)("Font Pairings")),t&&n&&c?Object(E.createElement)("div",{role:"listbox"},t.map((function(e){var t=e.label,r=e.headings,o=e.base,l=e.preview,s=r===n&&o===c,i=S()("font-pairings-panel",{"is-selected":s});return Object(E.createElement)("div",{key:t,tabIndex:0,role:"option","aria-selected":s,className:i,onClick:function(){return a({headings:r,base:o})},onKeyDown:function(e){return e.keyCode===w.ENTER?a({headings:r,base:o}):null}},Object(E.createElement)("div",{className:"font-pairings-panel__preview"},x(l,r,o)),Object(E.createElement)("p",{className:"font-pairings-panel__label"},t))}))):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("font pairings")}))},B=function(e){var t=e.fontBase,c=e.fontBaseDefault,n=e.fontHeadings,a=e.fontHeadingsDefault,r=e.fontBaseOptions,o=e.fontHeadingsOptions,l=e.updateBaseFont,s=e.updateHeadingsFont;return r&&o?Object(E.createElement)(E.Fragment,null,Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Heading Font"),value:n,options:o,onChange:function(e){return s(e)},style:{fontFamily:"unset"!==n?n:a}}),Object(E.createElement)(y.SelectControl,{label:Object(P.__)("Base Font"),value:t,options:r,onChange:function(e){return l(e)},style:{fontFamily:"unset"!==t?t:c}}),Object(E.createElement)("hr",null)):Object(E.createElement)(H,{unsupportedFeature:Object(P.__)("custom font selection")})},T=function(){return Object(E.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(E.createElement)(y.Path,{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"}))},L=function(e){if("object"==typeof e){var t=e.label,c=e.value,n=e.prop;return{label:t,value:c,prop:void 0===n?"ANY_PROPERTY":n}}return{label:e,value:e,prop:"ANY_PROPERTY"}},N=function(e){return null!==e.value&&null!==e.label},C=function(e,t){return e?e.map(L).filter(N).filter(function(e){return function(t){return"ANY_PROPERTY"===t.prop||t.prop===e}}(t)):[]},F=function(e){var t=e.hasLocalChanges,c=e.resetAction,n=e.publishAction,a=e.className,r=void 0===a?null:a;return Object(E.createElement)("div",{className:r},Object(E.createElement)(y.Button,{disabled:!t,isDefault:!0,onClick:c},Object(P.__)("Reset")),Object(E.createElement)(y.Button,{className:"global-styles-sidebar__publish-button",disabled:!t,isPrimary:!0,onClick:n},Object(P.__)("Publish")))},I=(c(14),JETPACK_GLOBAL_STYLES_EDITOR_CONSTANTS),A=I.PLUGIN_NAME,R=I.STORE_NAME,D=I.REST_PATH;n=R,a=D,Object(s.registerStore)(n,{reducer:function(e,t){switch(t.type){case"UPDATE_OPTIONS":case"RESET_OPTIONS":case"PUBLISH_OPTIONS":return h()({},e,{},t.options)}return e},actions:O,selectors:{getOption:function(e,t){return e?e[t]:void 0},hasLocalChanges:function(e){return!!e&&Object.keys(v).some((function(t){return v[t]!==e[t]}))}},resolvers:{getOption:regeneratorRuntime.mark((function e(t){var c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,b=!0,e.next=6,O.fetchOptions();case 6:c=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),c={};case 12:return v=c,e.abrupt("return",{type:"UPDATE_OPTIONS",options:c});case 14:case"end":return e.stop()}}),e,null,[[2,9]])}))},controls:{IO_FETCH_OPTIONS:function(){return p()({path:a})},IO_PUBLISH_OPTIONS:function(e){var t=e.options;return v=t,p()({path:a,method:"POST",data:h()({},t)})}}}),r=["font_base","font_headings"],o=Object(s.select)(R).getOption,d()((function(){var e={},t={},c={};r.forEach((function(e){c[e]="--".concat(e.replace("_","-"))}));var n=null;Object(s.subscribe)((function(){var a=Object(s.select)("core/editor").__unstableIsEditorReady;if(!(a&&!1===a()||(n||(n=document.createElement("style"),document.body.appendChild(n)),r.forEach((function(t){e[t]=o(t)})),Object(g.isEmpty)(e)||Object(g.isEqual)(e,t)))){t=h()({},e);var l="";Object.keys(e).forEach((function(t){l+="".concat(c[t],":").concat(e[t],";")})),n.textContent=".edit-post-visual-editor.editor-styles-wrapper{".concat(l,"}")}}))})),Object(l.registerPlugin)(A,{render:Object(i.compose)(Object(s.withSelect)((function(e){return{siteName:e(R).getOption("blogname"),fontHeadings:e(R).getOption("font_headings"),fontHeadingsDefault:e(R).getOption("font_headings_default"),fontBase:e(R).getOption("font_base"),fontBaseDefault:e(R).getOption("font_base_default"),fontPairings:e(R).getOption("font_pairings"),fontOptions:e(R).getOption("font_options"),hasLocalChanges:e(R).hasLocalChanges()}})),Object(s.withDispatch)((function(e){return{updateOptions:e(R).updateOptions,publishOptions:e(R).publishOptions,resetLocalChanges:e(R).resetLocalChanges}})))((function(e){var t=e.fontHeadings,c=e.fontHeadingsDefault,n=e.fontBase,a=e.fontBaseDefault,r=e.fontPairings,o=e.fontOptions,l=e.siteName,s=e.publishOptions,i=e.updateOptions,u=e.hasLocalChanges,h=e.resetLocalChanges,f=function(){var e;return s((e={},_()(e,"font_base",n),_()(e,"font_headings",t),e))};return Object(E.createElement)(E.Fragment,null,Object(E.createElement)(z.PluginSidebarMoreMenuItem,{icon:Object(E.createElement)(T,null),target:"global-styles"},Object(P.__)("Global Styles")),Object(E.createElement)(z.PluginSidebar,{icon:Object(E.createElement)(T,null),name:"global-styles",title:Object(P.__)("Global Styles"),className:"global-styles-sidebar"},Object(E.createElement)(y.PanelBody,null,Object(E.createElement)("p",null,Object(P.sprintf)(Object(P.__)("You are customizing %s."),l)),Object(E.createElement)("p",null,Object(P.__)("Any change you make here will apply to the entire website.")),u?Object(E.createElement)("div",null,Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes."))),Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h})):null),Object(E.createElement)(y.PanelBody,{title:Object(P.__)("Font Selection")},Object(E.createElement)(B,{fontBase:n,fontBaseDefault:a,fontHeadings:t,fontHeadingsDefault:c,fontBaseOptions:C(o,"font_base"),fontHeadingsOptions:C(o,"font_headings"),updateBaseFont:function(e){return i(_()({},"font_base",e))},updateHeadingsFont:function(e){return i(_()({},"font_headings",e))}}),Object(E.createElement)(M,{fontHeadings:t,fontBase:n,fontPairings:r,update:function(e){var t,c=e.headings,n=e.base;return i((t={},_()(t,"font_headings",c),_()(t,"font_base",n),t))}})),Object(E.createElement)(y.PanelBody,null,u?Object(E.createElement)("p",null,Object(E.createElement)("em",null,Object(P.__)("You have unsaved changes."))):null,Object(E.createElement)(F,{hasLocalChanges:u,publishAction:f,resetAction:h,className:"global-styles-sidebar__panel-action-buttons"}))))}))})}]));
global-styles/src/dom-updater.js CHANGED
@@ -58,7 +58,7 @@ export default ( options, getOptionValue ) => {
58
  Object.keys( currentOptions ).forEach( ( key ) => {
59
  declarationList += `${ cssVariables[ key ] }:${ currentOptions[ key ] };`;
60
  } );
61
- styleElement.textContent = `.editor-styles-wrapper{${ declarationList }}`;
62
  } );
63
  } );
64
  };
58
  Object.keys( currentOptions ).forEach( ( key ) => {
59
  declarationList += `${ cssVariables[ key ] }:${ currentOptions[ key ] };`;
60
  } );
61
+ styleElement.textContent = `.edit-post-visual-editor.editor-styles-wrapper{${ declarationList }}`;
62
  } );
63
  } );
64
  };
premium-content/blocks/container/controls.js CHANGED
@@ -18,14 +18,19 @@ import NewPlan from './new-plan';
18
  * @typedef { Object } Props
19
  * @property { number } selectedPlanId
20
  * @property { (plan: Plan) => void } onSelected
 
21
  * @property { string } className
22
  * @property { Plan[] } plans
23
  *
24
  * @param { Props } props
25
  */
26
  export default function Controls( props ) {
27
- const { selectedPlanId, onSelected, plans } = props;
28
  const currentPlan = plans.find( ( plan ) => plan.id === selectedPlanId );
 
 
 
 
29
  return (
30
  <BlockControls>
31
  <Toolbar>
@@ -34,13 +39,7 @@ export default function Controls( props ) {
34
  icon={
35
  <Fragment>
36
  <Dashicon icon="update" />{ ' ' }
37
- { currentPlan && (
38
- <Fragment>
39
- { ' ' }
40
- { currentPlan.title } : { currentPlan.price } { currentPlan.currency } /{ ' ' }
41
- { currentPlan.interval }{ ' ' }
42
- </Fragment>
43
- ) }
44
  </Fragment>
45
  }
46
  label={ __( 'Select a plan', 'premium-content' ) }
18
  * @typedef { Object } Props
19
  * @property { number } selectedPlanId
20
  * @property { (plan: Plan) => void } onSelected
21
+ * @property { (plan: Plan) => string } formatPrice
22
  * @property { string } className
23
  * @property { Plan[] } plans
24
  *
25
  * @param { Props } props
26
  */
27
  export default function Controls( props ) {
28
+ const { selectedPlanId, onSelected, plans, getPlanDescription } = props;
29
  const currentPlan = plans.find( ( plan ) => plan.id === selectedPlanId );
30
+ let planDescription = null;
31
+ if ( currentPlan ) {
32
+ planDescription = ' ' + getPlanDescription( currentPlan );
33
+ }
34
  return (
35
  <BlockControls>
36
  <Toolbar>
39
  icon={
40
  <Fragment>
41
  <Dashicon icon="update" />{ ' ' }
42
+ { planDescription && <Fragment>{ planDescription }</Fragment> }
 
 
 
 
 
 
43
  </Fragment>
44
  }
45
  label={ __( 'Select a plan', 'premium-content' ) }
premium-content/blocks/container/edit.js CHANGED
@@ -7,6 +7,7 @@ import { __, sprintf } from '@wordpress/i18n';
7
  import { compose } from '@wordpress/compose';
8
  import { withSelect, withDispatch } from '@wordpress/data';
9
  import { addQueryArgs, getQueryArg, isURL } from '@wordpress/url';
 
10
 
11
  /**
12
  * Internal dependencies
@@ -18,6 +19,10 @@ import Inspector from './inspector';
18
  import StripeNudge from './stripe-nudge';
19
  import Context from './context';
20
  import apiFetch from '@wordpress/api-fetch';
 
 
 
 
21
 
22
  /**
23
  * @typedef { import('./plan').Plan } Plan
@@ -107,18 +112,21 @@ function Edit( props ) {
107
  return;
108
  }
109
 
110
- // TODO: change that to minimumTransactionAmountForCurrency when formatcurrency works.
111
- if (
112
- attributes.newPlanPrice &&
113
- ( attributes.newPlanPrice < 5 || isNaN( attributes.newPlanPrice ) )
114
- ) {
115
- onError( props, sprintf( __( 'Minimum allowed price is %s.' ), 5 ) );
 
 
 
116
  callback( false );
117
  return;
118
  }
119
 
120
- if ( ! attributes.newPlanPrice ) {
121
- onError( props, __( 'Plan requires a valid price' ) );
122
  callback( false );
123
  return;
124
  }
@@ -166,6 +174,23 @@ function Edit( props ) {
166
  );
167
  }
168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  /**
170
  * @param {Plan} plan
171
  */
@@ -310,15 +335,16 @@ function Edit( props ) {
310
  return (
311
  <div className={ className } ref={ wrapperRef }>
312
  { props.noticeUI }
313
- { ( isSelected || selectedInnerBlock ) && (
314
  <Controls
315
  { ...props }
316
  plans={ products }
317
  selectedPlanId={ props.attributes.selectedPlanId }
318
  onSelected={ selectPlan }
 
319
  />
320
  ) }
321
- { ( isSelected || selectedInnerBlock ) && (
322
  <Inspector { ...props } savePlan={ savePlan } siteSlug={ siteSlug } />
323
  ) }
324
  { ( isSelected || selectedInnerBlock ) && (
7
  import { compose } from '@wordpress/compose';
8
  import { withSelect, withDispatch } from '@wordpress/data';
9
  import { addQueryArgs, getQueryArg, isURL } from '@wordpress/url';
10
+ import formatCurrency from '@automattic/format-currency';
11
 
12
  /**
13
  * Internal dependencies
19
  import StripeNudge from './stripe-nudge';
20
  import Context from './context';
21
  import apiFetch from '@wordpress/api-fetch';
22
+ import {
23
+ isPriceValid,
24
+ minimumTransactionAmountForCurrency,
25
+ } from '.';
26
 
27
  /**
28
  * @typedef { import('./plan').Plan } Plan
112
  return;
113
  }
114
 
115
+ const newPrice = parseFloat( attributes.newPlanPrice );
116
+ const minPrice = minimumTransactionAmountForCurrency( attributes.newPlanCurrency );
117
+ const minimumPriceNote = sprintf( __( 'Minimum allowed price is %s.', 'premium-content' ), formatCurrency(
118
+ minPrice,
119
+ attributes.newPlanCurrency
120
+ ) );
121
+
122
+ if ( newPrice < minPrice ) {
123
+ onError( props, minimumPriceNote );
124
  callback( false );
125
  return;
126
  }
127
 
128
+ if ( ! isPriceValid( attributes.newPlanCurrency, newPrice ) ) {
129
+ onError( props, __( 'Plan requires a valid price', 'premium-content' ) );
130
  callback( false );
131
  return;
132
  }
174
  );
175
  }
176
 
177
+ /**
178
+ * @param {Plan} plan
179
+ */
180
+ function getPlanDescription( plan ) {
181
+ const amount = formatCurrency( parseFloat( plan.price ), plan.currency );
182
+ if ( plan.interval === '1 month' ) {
183
+ return sprintf( __( '%s / month', 'premium-content' ), amount );
184
+ }
185
+ if ( plan.interval === '1 year' ) {
186
+ return sprintf( __( '%s / year', 'premium-content' ), amount );
187
+ }
188
+ if ( plan.interval === 'one-time' ) {
189
+ return amount;
190
+ }
191
+ return sprintf( __( '%s / %s', 'premium-content' ), amount, plan.interval );
192
+ }
193
+
194
  /**
195
  * @param {Plan} plan
196
  */
335
  return (
336
  <div className={ className } ref={ wrapperRef }>
337
  { props.noticeUI }
338
+ { ( isSelected || selectedInnerBlock ) && apiState === API_STATE_CONNECTED && (
339
  <Controls
340
  { ...props }
341
  plans={ products }
342
  selectedPlanId={ props.attributes.selectedPlanId }
343
  onSelected={ selectPlan }
344
+ getPlanDescription={ getPlanDescription }
345
  />
346
  ) }
347
+ { ( isSelected || selectedInnerBlock ) && apiState === API_STATE_CONNECTED && (
348
  <Inspector { ...props } savePlan={ savePlan } siteSlug={ siteSlug } />
349
  ) }
350
  { ( isSelected || selectedInnerBlock ) && (
premium-content/blocks/container/index.js CHANGED
@@ -2,6 +2,8 @@
2
  * WordPress dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
 
 
5
 
6
  /**
7
  * Internal dependencies
@@ -104,3 +106,70 @@ const settings = {
104
  };
105
 
106
  export { name, category, settings };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  * WordPress dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
5
+ import { getCurrencyDefaults } from '@automattic/format-currency';
6
+ import { trimEnd } from 'lodash';
7
 
8
  /**
9
  * Internal dependencies
106
  };
107
 
108
  export { name, category, settings };
109
+
110
+ /**
111
+ * Currencies we support and Stripe's minimum amount for a transaction in that currency.
112
+ *
113
+ * https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts
114
+ *
115
+ * @type { [currency: string]: number }
116
+ */
117
+ export const SUPPORTED_CURRENCIES = {
118
+ USD: 0.5,
119
+ AUD: 0.5,
120
+ BRL: 0.5,
121
+ CAD: 0.5,
122
+ CHF: 0.5,
123
+ DKK: 2.5,
124
+ EUR: 0.5,
125
+ GBP: 0.3,
126
+ HKD: 4.0,
127
+ INR: 0.5,
128
+ JPY: 50,
129
+ MXN: 10,
130
+ NOK: 3.0,
131
+ NZD: 0.5,
132
+ PLN: 2.0,
133
+ SEK: 3.0,
134
+ SGD: 0.5,
135
+ };
136
+
137
+ /**
138
+ * Compute a list of currency value and display labels.
139
+ *
140
+ * - `value` is the currency's three character code
141
+ * - `label` is the user facing representation.
142
+ *
143
+ * @typedef {{value: string, label: string}} CurrencyDetails
144
+ *
145
+ * @type Array<CurrencyDetails>
146
+ */
147
+ export const CURRENCY_OPTIONS = Object.keys( SUPPORTED_CURRENCIES ).map( value => {
148
+ const { symbol } = getCurrencyDefaults( value );
149
+ const label = symbol === value ? value : `${ value } ${ trimEnd( symbol, '.' ) }`;
150
+ return { value, label };
151
+ } );
152
+
153
+ /**
154
+ * Returns the minimum transaction amount for the given currency. If currency is not one of the
155
+ * known types it returns ...
156
+ *
157
+ * @param {string} currency_code three character currency code to get minimum charge for
158
+ * @return {number} Minimum charge amount for the given currency_code
159
+ */
160
+ export function minimumTransactionAmountForCurrency( currency_code ) {
161
+ const minimum = SUPPORTED_CURRENCIES[ currency_code ];
162
+ return minimum;
163
+ }
164
+
165
+ /**
166
+ * True if the price is a number and at least the minimum allowed amount.
167
+ *
168
+ * @param {string} currency Currency for the given price.
169
+ * @param {number} price Price to check.
170
+ * @return {boolean} true if valid price
171
+ */
172
+ export function isPriceValid( currency, price ) {
173
+ return ! isNaN( price ) && price >= minimumTransactionAmountForCurrency( currency );
174
+ }
175
+
premium-content/blocks/container/inspector.js CHANGED
@@ -15,6 +15,11 @@ import { InspectorControls } from '@wordpress/block-editor';
15
  import { __ } from '@wordpress/i18n';
16
  import { useState } from '@wordpress/element';
17
 
 
 
 
 
 
18
  const API_STATE_NOT_REQUESTING = 0;
19
  const API_STATE_REQUESTING = 1;
20
 
@@ -82,10 +87,7 @@ export default function Inspector( props ) {
82
  label="Currency"
83
  onChange={ ( set ) => setAttributes( { newPlanCurrency: set } ) }
84
  value={ attributes.newPlanCurrency }
85
- options={ currencies.map( ( currency ) => ( {
86
- label: currency.label,
87
- value: currency.label,
88
- } ) ) }
89
  ></SelectControl>
90
  <TextControl
91
  label="Price"
@@ -136,108 +138,3 @@ export default function Inspector( props ) {
136
  </InspectorControls>
137
  );
138
  }
139
-
140
- Inspector.defaultProps = {
141
- currencies: [
142
- {
143
- label: 'USD',
144
- symbol: '$',
145
- },
146
- {
147
- label: 'GBP',
148
- symbol: '&#163;',
149
- },
150
- {
151
- label: 'JPY',
152
- symbol: '&#165;',
153
- },
154
- {
155
- label: 'BRL',
156
- symbol: 'R$',
157
- },
158
- {
159
- label: 'EUR',
160
- symbol: '&#8364;',
161
- },
162
- {
163
- label: 'NZD',
164
- symbol: 'NZ$',
165
- },
166
- {
167
- label: 'AUD',
168
- symbol: 'A$',
169
- },
170
- {
171
- label: 'CAD',
172
- symbol: 'C$',
173
- },
174
- {
175
- label: 'INR',
176
- symbol: '\u20b9',
177
- },
178
- {
179
- label: 'ILS',
180
- symbol: '\u20aa',
181
- },
182
- {
183
- label: 'RUB',
184
- symbol: '\u20bd',
185
- },
186
- {
187
- label: 'MXN',
188
- symbol: 'MX$',
189
- },
190
- {
191
- label: 'SEK',
192
- symbol: 'SEK',
193
- },
194
- {
195
- label: 'HUF',
196
- symbol: 'Ft',
197
- },
198
- {
199
- label: 'CHF',
200
- symbol: 'CHF',
201
- },
202
- {
203
- label: 'CZK',
204
- symbol: 'K\u010d',
205
- },
206
- {
207
- label: 'DKK',
208
- symbol: 'Dkr',
209
- },
210
- {
211
- label: 'HKD',
212
- symbol: 'HK$',
213
- },
214
- {
215
- label: 'NOK',
216
- symbol: 'Kr',
217
- },
218
- {
219
- label: 'PHP',
220
- symbol: '\u20b1',
221
- },
222
- {
223
- label: 'PLN',
224
- symbol: 'PLN',
225
- },
226
- {
227
- label: 'SGD',
228
- symbol: 'S$',
229
- },
230
- {
231
- label: 'TWD',
232
- symbol: 'NT$',
233
- },
234
- {
235
- label: 'THB',
236
- symbol: '\u0e3f',
237
- },
238
- {
239
- label: 'TRY',
240
- symbol: 'TL',
241
- },
242
- ],
243
- };
15
  import { __ } from '@wordpress/i18n';
16
  import { useState } from '@wordpress/element';
17
 
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+ import { CURRENCY_OPTIONS } from '.';
22
+
23
  const API_STATE_NOT_REQUESTING = 0;
24
  const API_STATE_REQUESTING = 1;
25
 
87
  label="Currency"
88
  onChange={ ( set ) => setAttributes( { newPlanCurrency: set } ) }
89
  value={ attributes.newPlanCurrency }
90
+ options={ CURRENCY_OPTIONS }
 
 
 
91
  ></SelectControl>
92
  <TextControl
93
  label="Price"
138
  </InspectorControls>
139
  );
140
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
premium-content/blocks/container/plan.js CHANGED
@@ -17,16 +17,29 @@ import { MenuItem } from '@wordpress/components';
17
  * @property { undefined | Plan } selectedPlan
18
  * @property { () => void } onClose
19
  * @property { (plan: Plan) => void } onSelected
 
20
  *
21
  * @param { Props } props
22
  */
23
  export default function Plan( props ) {
24
- const { className, plan, selectedPlan, onSelected, onClose } = props;
 
 
 
 
 
 
 
25
 
26
  const isSelected = selectedPlan && plan.id === selectedPlan.id;
27
  const classNames = ( isSelected ? [ 'is-selected' ] : [] ).concat( [ className ] ).join( ' ' );
28
  const icon = isSelected ? 'yes' : undefined;
29
 
 
 
 
 
 
30
  return (
31
  <MenuItem
32
  onClick={ ( e ) => {
@@ -40,7 +53,7 @@ export default function Plan( props ) {
40
  selected={ isSelected }
41
  icon={ icon }
42
  >
43
- { plan.title } : { plan.price } { plan.currency } / { plan.interval }
44
  </MenuItem>
45
  );
46
  }
17
  * @property { undefined | Plan } selectedPlan
18
  * @property { () => void } onClose
19
  * @property { (plan: Plan) => void } onSelected
20
+ * @property { (plan: Plan) => string } formatPrice
21
  *
22
  * @param { Props } props
23
  */
24
  export default function Plan( props ) {
25
+ const {
26
+ className,
27
+ plan,
28
+ selectedPlan,
29
+ onSelected,
30
+ onClose,
31
+ getPlanDescription,
32
+ } = props;
33
 
34
  const isSelected = selectedPlan && plan.id === selectedPlan.id;
35
  const classNames = ( isSelected ? [ 'is-selected' ] : [] ).concat( [ className ] ).join( ' ' );
36
  const icon = isSelected ? 'yes' : undefined;
37
 
38
+ let planDescription = null;
39
+ if ( plan ) {
40
+ planDescription = ' ' + getPlanDescription( plan );
41
+ }
42
+
43
  return (
44
  <MenuItem
45
  onClick={ ( e ) => {
53
  selected={ isSelected }
54
  icon={ icon }
55
  >
56
+ { plan.title } : { planDescription }
57
  </MenuItem>
58
  );
59
  }
premium-content/blocks/subscriber-view/edit.js CHANGED
@@ -35,6 +35,7 @@ function Edit( props ) {
35
  <div hidden={ selectedTab.id === 'wall' } className={ selectedTab.className }>
36
  { stripeNudge }
37
  <InnerBlocks
 
38
  templateLock={ false }
39
  template={ [
40
  [
@@ -57,6 +58,8 @@ function Edit( props ) {
57
  export default compose( [
58
  withSelect( ( select, props ) => {
59
  return {
 
 
60
  // @ts-ignore difficult to type with JSDoc
61
  containerClientId: select( 'core/block-editor' ).getBlockHierarchyRootClientId(
62
  props.clientId
35
  <div hidden={ selectedTab.id === 'wall' } className={ selectedTab.className }>
36
  { stripeNudge }
37
  <InnerBlocks
38
+ renderAppender={ ! props.hasInnerBlocks && InnerBlocks.ButtonBlockAppender }
39
  templateLock={ false }
40
  template={ [
41
  [
58
  export default compose( [
59
  withSelect( ( select, props ) => {
60
  return {
61
+ // @ts-ignore difficult to type with JSDoc
62
+ hasInnerBlocks: !! ( select( 'core/block-editor' ).getBlocksByClientId( props.clientId )[ 0 ].innerBlocks.length ),
63
  // @ts-ignore difficult to type with JSDoc
64
  containerClientId: select( 'core/block-editor' ).getBlockHierarchyRootClientId(
65
  props.clientId
premium-content/dist/premium-content.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text', 'wp-url'), 'version' => '80053c5d0db02db0426291e7423fbe74');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-rich-text', 'wp-url'), 'version' => '5bc399beb4950fd27c0039a5f0ce3d9a');
premium-content/dist/premium-content.js CHANGED
@@ -1,6 +1,26 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},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){var r=n(17),o=n(18),c=n(19),l=n(21);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||l()}},function(e,t){!function(){e.exports=this.lodash}()},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){var r=n(9);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function n(e,t,n,r,o,c,l){try{var a=e[c](l),i=a.value}catch(u){return void n(u)}a.done?t(i):Promise.resolve(i).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var l=e.apply(t,r);function a(e){n(l,o,c,a,i,"next",e)}function i(e){n(l,o,c,a,i,"throw",e)}a(void 0)}))}}},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
- */!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 l=o.apply(null,r);l&&e.push(l)}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){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var l,a=e[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(i){o=!0,c=i}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t,n){var r=n(20);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return ae}));var r={};n.r(r),n.d(r,"name",(function(){return F})),n.d(r,"category",(function(){return U})),n.d(r,"settings",(function(){return H}));var o={};n.r(o),n.d(o,"name",(function(){return $})),n.d(o,"category",(function(){return G})),n.d(o,"settings",(function(){return V}));var c={};n.r(c),n.d(c,"name",(function(){return ne})),n.d(c,"category",(function(){return re})),n.d(c,"settings",(function(){return oe}));var l=n(10),a=n.n(l),i=n(14),u=n(0),s=n(1),b=n(6),m=n.n(b),p=n(7),d=n.n(p),f=n(2),O=n(5),j=n(4),v=n(11);function g(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,c=e.onSelected,l=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(u.createElement)("button",{type:"button",onClick:function(){return c(n)},className:l.join(" ")},r)}function y(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,c=e.selectBlock;return Object(u.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(u.createElement)(g,m()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(u.createElement)("button",{onClick:function(){Object(j.select)("core/edit-post").isEditorSidebarOpened()||Object(j.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),c()},className:"edit components-button is-button is-secondary"},Object(s.__)("Edit","premium-content")))}var h=n(3);function w(){return Object(u.createElement)("div",{className:"premium-content-wrapper"},Object(u.createElement)(h.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function k(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,c=e.onClose,l=r&&n.id===r.id,a=(l?["is-selected"]:[]).concat([t]).join(" "),i=l?"yes":void 0;return Object(u.createElement)(f.MenuItem,{onClick:function(e){e.preventDefault(),o(n),c()},className:a,key:n.id,value:n.id,selected:l,icon:i},n.title," : ",n.price," ",n.currency," / ",n.interval)}function _(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(u.createElement)(f.MenuGroup,null,t.map((function(t){return Object(u.createElement)(k,m()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function C(e){return Object(u.createElement)(f.MenuGroup,null,Object(u.createElement)(f.MenuItem,{onClick:function(t){t.preventDefault(),Object(j.select)("core/edit-post").isEditorSidebarOpened()||Object(j.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(s.__)("Add a new subscription","premium-content")))}function E(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans.find((function(e){return e.id===t}));return Object(u.createElement)(h.BlockControls,null,Object(u.createElement)(f.Toolbar,null,Object(u.createElement)(f.DropdownMenu,{icon:Object(u.createElement)(u.Fragment,null,Object(u.createElement)(f.Dashicon,{icon:"update"})," ",r&&Object(u.createElement)(u.Fragment,null," ",r.title," : ",r.price," ",r.currency," /"," ",r.interval," ")),label:Object(s.__)("Select a plan","premium-content"),className:"premium-content-toolbar-button"},(function(t){var o=t.onClose;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(_,m()({},e,{onSelected:n,onClose:o,selectedPlan:r})),Object(u.createElement)(C,m()({},e,{onClose:o})))}))))}function P(e){var t=Object(u.useState)(0),n=d()(t,2),r=n[0],o=n[1],c=e.attributes,l=e.setAttributes,a=e.className,i=e.savePlan,b=e.currencies,m=e.siteSlug;return Object(u.createElement)(h.InspectorControls,null,m&&Object(u.createElement)(f.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(m),className:"wp-block-premium-content-container---link-to-earn"},Object(s.__)("Manage your subscriptions.","premium-content")),Object(u.createElement)(f.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(a,"---settings-add_plan")},1===r&&Object(u.createElement)(f.Placeholder,{icon:"lock",label:Object(s.__)("Premium Content","premium-content"),instructions:Object(s.__)("Saving plan...","premium-content")},Object(u.createElement)(f.Spinner,null)),0===r&&Object(u.createElement)("div",null,Object(u.createElement)(f.PanelRow,{className:"plan-name"},Object(u.createElement)(f.TextControl,{id:"new-plan-name",label:"Name",value:c.newPlanName,onChange:function(e){return l({newPlanName:e})}})),Object(u.createElement)(f.PanelRow,{className:"plan-price"},Object(u.createElement)(f.SelectControl,{label:"Currency",onChange:function(e){return l({newPlanCurrency:e})},value:c.newPlanCurrency,options:b.map((function(e){return{label:e.label,value:e.label}}))}),Object(u.createElement)(f.TextControl,{label:"Price",value:c.newPlanPrice,onChange:function(e){return l({newPlanPrice:parseFloat(e)})},type:"number"})),Object(u.createElement)(f.PanelRow,{className:"plan-interval"},Object(u.createElement)(f.SelectControl,{label:"Interval",onChange:function(e){return l({newPlanInterval:e})},value:c.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(u.createElement)(f.PanelRow,null,Object(u.createElement)(f.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),i(e.attributes,(function(e){o(0),e&&(l({newPlanPrice:5}),l({newPlanName:""}))}))}},Object(s.__)("Add subscription","premium-content"))))))}P.defaultProps={currencies:[{label:"USD",symbol:"$"},{label:"GBP",symbol:"&#163;"},{label:"JPY",symbol:"&#165;"},{label:"BRL",symbol:"R$"},{label:"EUR",symbol:"&#8364;"},{label:"NZD",symbol:"NZ$"},{label:"AUD",symbol:"A$"},{label:"CAD",symbol:"C$"},{label:"INR",symbol:"₹"},{label:"ILS",symbol:"₪"},{label:"RUB",symbol:"₽"},{label:"MXN",symbol:"MX$"},{label:"SEK",symbol:"SEK"},{label:"HUF",symbol:"Ft"},{label:"CHF",symbol:"CHF"},{label:"CZK",symbol:"Kč"},{label:"DKK",symbol:"Dkr"},{label:"HKD",symbol:"HK$"},{label:"NOK",symbol:"Kr"},{label:"PHP",symbol:"₱"},{label:"PLN",symbol:"PLN"},{label:"SGD",symbol:"S$"},{label:"TWD",symbol:"NT$"},{label:"THB",symbol:"฿"},{label:"TRY",symbol:"TL"}]};var S=n(15),B=n.n(S),x=Object(O.compose)([Object(j.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=B()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(u.createElement)(h.Warning,{actions:n&&[Object(u.createElement)(f.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button"},Object(s.__)("Connect","premium-content"))],className:"premium-content-block-nudge"},Object(u.createElement)("span",{className:"premium-content-block-nudge__info"},Object(u.createElement)(f.Dashicon,{icon:"star-filled"}),Object(u.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(u.createElement)("span",{className:"premium-content-block-nudge__title"},Object(s.__)("Connect to Stripe to use this block on your site","premium-content")),Object(u.createElement)("span",{className:"premium-content-block-nudge__message"},Object(s.__)("This block will be hidden from your visitors until you connect to Stripe.","premium-content")))))})),N={selectedTab:{id:"",className:"",label:Object(u.createElement)(u.Fragment,null)},stripeNudge:null},I=Object(u.createContext)(N),T=n(12),L=n.n(T),A=[{id:"premium",label:Object(u.createElement)("span",null,Object(s.__)("Subscriber View","premium-content")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(u.createElement)("span",null,Object(s.__)("Logged Out View","premium-content")),className:"wp-premium-content-logged-out-view"}],D=[];function R(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var M=Object(O.compose)([Object(j.withSelect)((function(e,t){return{postId:(0,e("core/editor").getCurrentPostId)(),containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),f.withNotices,Object(j.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){var t=Object(u.useState)(A[1]),n=d()(t,2),r=n[0],o=n[1],c=Object(u.useState)(!1),l=d()(c,2),a=l[0],i=l[1],b=Object(u.useState)(D),p=d()(b,2),O=p[0],j=p[1],g=Object(u.useState)(null),h=d()(g,2),k=h[0],_=h[1],C=Object(u.useState)(0),S=d()(C,2),B=S[0],N=S[1],T=Object(u.useState)(!1),M=d()(T,2),F=M[0],U=M[1],H=Object(u.useState)(""),K=d()(H,2),$=K[0],G=K[1],V=Object(u.useState)(""),q=d()(V,2),Y=q[0],W=q[1];function Z(t,n){if(!t.newPlanName||0===t.newPlanName.length)return R(e,Object(s.__)("Plan requires a name","premium-content")),void n(!1);if(t.newPlanPrice&&(t.newPlanPrice<5||isNaN(t.newPlanPrice)))return R(e,Object(s.sprintf)(Object(s.__)("Minimum allowed price is %s."),5)),void n(!1);if(!t.newPlanPrice)return R(e,Object(s.__)("Plan requires a valid price")),void n(!1);var r={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};L()(r).then((function(e){var t={id:e.id,title:e.title,interval:e.interval,price:e.price,currency:e.currency};j(O.concat([t])),J(t),n&&n(!0)}),(function(){R(e,Object(s.__)("There was an error when adding the plan.")),n&&n(!1)}))}function J(t){e.setAttributes({selectedPlanId:t.id})}var Q=Object(u.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(u.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(Q,i);var X=e.isSelected,z=e.className;if(Object(u.useEffect)((function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};L()(t).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return N(2),void R(e,Object.values(t.errors)[0][0]);_(t.connect_url),U(t.should_upgrade_to_access_memberships),G(t.upgrade_url),W(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?Z({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(s.__)("Monthly Subscription"),newPlanInterval:"1 month"},(function(){N(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(j(t.products),e.attributes.selectedPlanId||J(t.products[0])),N(t.connected_account_id?1:2))}}),(function(t){_(null),N(2),R(e,t.message)})),e.selectBlock()}),[]),0===B)return Object(u.createElement)("div",{className:z,ref:Q},e.noticeUI,Object(u.createElement)(f.Placeholder,{icon:"lock",label:Object(s.__)("Premium Content","premium-content"),instructions:Object(s.__)("Loading data...","premium-content")},Object(u.createElement)(f.Spinner,null)));if(F)return Object(u.createElement)("div",{className:z,ref:Q},e.noticeUI,Object(u.createElement)(f.Placeholder,{icon:"lock",label:Object(s.__)("Premium Content","premium-content"),instructions:Object(s.__)("You'll need to upgrade your plan to use the Premium Content block.","premium-content")},Object(u.createElement)(f.Button,{isSecondary:!0,isLarge:!0,href:$,target:"_blank",className:"premium-content-block-nudge__button"},Object(s.__)("Upgrade Your Plan","premium-content")),Object(u.createElement)("div",{className:"membership-button__disclaimer"},Object(u.createElement)(f.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(s.__)("Read more about Premium Content and related fees.","premium-content")))));var ee=null;if(!F&&1!==B&&k){var te=function(e,t){var n,r=e.postId;if(!Object(v.isURL)(t))return null;if(!r)return t;try{var o=Object(v.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(atob(o)))}catch(c){return t}return n.from_editor_post_id=r,Object(v.addQueryArgs)(t,{state:btoa(JSON.stringify(n))})}(e,k);ee=Object(u.createElement)(x,m()({},e,{stripeConnectUrl:te}))}return Object(u.createElement)("div",{className:z,ref:Q},e.noticeUI,(X||a)&&Object(u.createElement)(E,m()({},e,{plans:O,selectedPlanId:e.attributes.selectedPlanId,onSelected:J})),(X||a)&&Object(u.createElement)(P,m()({},e,{savePlan:Z,siteSlug:Y})),(X||a)&&Object(u.createElement)(y,m()({},e,{tabs:A,selectedTab:r,onSelected:o})),Object(u.createElement)(I.Provider,{value:{selectedTab:r,stripeNudge:ee}},Object(u.createElement)(w,null)))}));var F="premium-content/container",U="common",H={name:F,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(s.__)("Premium Content","premium-content"),description:Object(s.__)("Restrict access to your content for paying subscribers.","premium-content"),category:U,icon:Object(u.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(u.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(u.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},keywords:["premium-content",Object(s.__)("premium","premium-content"),Object(s.__)("paywall","premium-content")],edit:M,save:function(){return Object(u.createElement)("div",{className:"wp-block-premium-content-container"},Object(u.createElement)(h.InnerBlocks.Content,null))}};var K=Object(O.compose)([Object(j.withSelect)((function(e,t){return{containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(j.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){return Object(u.useEffect)((function(){e.selectBlock()}),[]),Object(u.createElement)(I.Consumer,null,(function(e){var t=e.selectedTab,n=e.stripeNudge;return Object(u.createElement)("div",{hidden:"wall"===t.id,className:t.className},n,Object(u.createElement)(h.InnerBlocks,{templateLock:!1,template:[["core/paragraph",{placeholder:Object(s.__)("Insert the piece of content you want your visitors to see after they subscribe.","premium-content")}]]}))}))}));var $="premium-content/subscriber-view",G="common",V={name:$,category:G,attributes:{},title:Object(s.__)("Subscriber View","premium-content"),description:Object(s.__)("Subscriber View.","premium-content"),parent:["premium-content/container"],supports:{inserter:!1},edit:K,save:function(){return Object(u.createElement)("div",{className:"wp-block-premium-content-subscriber-view"},Object(u.createElement)(h.InnerBlocks.Content,null))}},q=n(8),Y=n(9),W=n.n(Y),Z=n(16),J=n.n(Z),Q=window.getComputedStyle,X=Object(f.withFallbackStyles)((function(e,t){var n,r,o,c,l=t.textButtonColor,a=t.backgroundButtonColor,i=a&&a.color,u=l&&l.color;return!u&&e&&(n=e.querySelector('[contenteditable="true"]')),r=e.querySelector(".wp-block-button__link")?e.querySelector(".wp-block-button__link"):e,e&&r&&(o=Q(r).backgroundColor),n&&(c=Q(n).color),{fallbackBackgroundColor:i||o,fallbackTextColor:u||c}}));var z=Object(O.compose)([Object(h.withColors)({backgroundButtonColor:"background-color"},{textButtonColor:"color"}),X])((function(e){function t(){var t,n=e.textButtonColor,r=e.backgroundButtonColor,o=Object(q.get)(n,"class"),c=Object(q.get)(r,"class");return J()("wp-block-button__link",(t={"has-text-color":n.color},W()(t,o,o),W()(t,"has-background",r.color),W()(t,c,c),t))}Object(u.useEffect)((function(){!function(){var n=t();e.setAttributes({buttonClasses:n})}(),function(){var t=Object(q.get)(e.textButtonColor,"color"),n=Object(q.get)(e.backgroundButtonColor,"color");void 0!==t&&e.setAttributes({customTextButtonColor:t});void 0!==n&&e.setAttributes({customBackgroundButtonColor:n})}()}),[e.backgroundButtonColor,e.textButtonColor]);var n=e.attributes,r=e.setAttributes,o=e.backgroundButtonColor,c=e.textButtonColor,l=e.setBackgroundButtonColor,a=e.setTextButtonColor,i=e.fallbackBackgroundColor,b=e.fallbackTextColor,m=o.color||i,p=c.color||b,d={border:"none",backgroundColor:m,color:p},f=t();return Object(u.createElement)("div",null,Object(u.createElement)("div",{className:"wp-block-button premium-content-logged-out-view-button"},Object(u.createElement)(h.RichText,{placeholder:Object(s.__)("Add text…","premium-content"),value:n.subscribeButtonText,onChange:function(e){return r({subscribeButtonText:e})},className:f,style:d,keepPlaceholderOnFocus:!0}),Object(u.createElement)(h.RichText,{placeholder:Object(s.__)("Add text…","premium-content"),value:n.loginButtonText,onChange:function(e){return r({loginButtonText:e})},className:f,style:d,keepPlaceholderOnFocus:!0})),Object(u.createElement)(h.InspectorControls,null,Object(u.createElement)(h.PanelColorSettings,{title:Object(s.__)("Button Color Settings","premium-content"),colorSettings:[{value:o||void 0,onChange:l,label:Object(s.__)("Background Color","premium-content")},{value:c||void 0,onChange:a,label:Object(s.__)("Text Color","premium-content")}]}),Object(u.createElement)(h.ContrastChecker,{textColor:p,backgroundColor:m,fallbackBackgroundColor:i,fallbackTextColor:b})))}));var ee=Object(O.compose)([Object(j.withSelect)((function(e,t){return{containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(j.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){Object(u.useEffect)((function(){e.selectBlock()}),[]);var t=Object(u.createElement)(z,{attributes:Object(q.pick)(e.attributes,["subscribeButtonText","loginButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"]),setAttributes:e.setAttributes});return Object(u.createElement)(I.Consumer,null,(function(e){var n=e.selectedTab,r=e.stripeNudge;return Object(u.createElement)("div",{hidden:"premium"===n.id,className:n.className},r,Object(u.createElement)(h.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(s.__)("Subscribe to get access","premium-content"),level:3}],["core/paragraph",{content:Object(s.__)("Read more of this content when you subscribe today.","premium-content")}]]}),t)}))}));var te=n(13),ne="premium-content/logged-out-view",re="common",oe={name:ne,category:re,attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},title:Object(s.__)("Logged Out View","premium-content"),description:Object(s.__)("Logged Out View.","premium-content"),parent:["premium-content/container"],supports:{inserter:!1},edit:ee,save:function(){return Object(u.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(u.createElement)(h.InnerBlocks.Content,null))}},ce=Object(j.subscribe)((function(){var e=Object(j.select)("core/rich-text").getFormatType("core/link");if(e){ce(),Object(te.unregisterFormatType)("core/link");var t=Object(O.compose)(Object(j.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(O.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==ne})))(e.edit);Object(te.registerFormatType)("core/link",a()({},e,{edit:t}))}})),le=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(i.registerBlockType)(t,a()({category:n},r))}},ae=function(){[r,c,o].forEach(le)};ae()}]));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=57)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},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){var r=n(36),o=n(37),i=n(19),c=n(38);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){!function(){e.exports=this.React}()},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){var r=n(9);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.lodash}()},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){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r=n(23),o=n(22);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var c=e.charCodeAt(o);c<128?n[r++]=c:c<2048?(n[r++]=c>>6|192,n[r++]=63&c|128):i(e,o)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++o)),n[r++]=c>>18|240,n[r++]=c>>12&63|128,n[r++]=c>>6&63|128,n[r++]=63&c|128):(n[r++]=c>>12|224,n[r++]=c>>6&63|128,n[r++]=63&c|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=c,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=c(o)),n+=a(o.toString(16))}return n},t.zero2=s,t.zero8=a,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var c=new Array(i/4),s=0,a=t;s<c.length;s++,a+=4){var l;l="big"===o?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],c[s]=l>>>0}return c},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,c=(i<r?1:0)+n+o;e[t]=c>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,c,s){var a=0,l=t;return a+=(l=l+r>>>0)<t?1:0,a+=(l=l+i>>>0)<i?1:0,e+n+o+c+(a+=(l=l+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,c,s){return t+r+i+s>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,c,s,a,l){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+i>>>0)<i?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+o+c+a+(u+=(p=p+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,c,s,a,l){return t+r+i+s+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=n(39),o=n(40),i=n(19),c=n(41);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,c,s;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),c=i[t]),void 0===c)c=i[t]=n,++e._eventsCount;else if("function"==typeof c?c=i[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(o=u(e))>0&&c.length>o&&!c.warned){c.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=c.length,s=a,console&&console.warn&&console.warn(s)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=m.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):b(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var c;if(t.length>0&&(c=t[0]),c instanceof Error)throw c;var s=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw s.context=c,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)i(a,this,t);else{var l=a.length,u=b(a,l);for(n=0;n<l;++n)i(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return p(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return p(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,c;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){c=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,c||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t,n){var r=n(20);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function n(e,t,n,r,o,i,c){try{var s=e[i](c),a=s.value}catch(l){return void n(l)}s.done?t(a):Promise.resolve(a).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function s(e){n(c,o,i,s,a,"next",e)}function a(e){n(c,o,i,s,a,"throw",e)}s(void 0)}))}}},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(42)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},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},o=s(n(8)),i=s(n(44)),c=s(n(47));function s(e){return e&&e.__esModule?e:{default:e}}var a=void 0;function l(e,t){var n,c,s,u,p,m,f,d,g=[],b={};for(m=0;m<e.length;m++)if("string"!==(p=e[m]).type){if(!t.hasOwnProperty(p.value)||void 0===t[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==r(t[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+a);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){n=t[p.value],s=m;break}g.push(t[p.value])}else g.push(p.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(s,e),f=l(e.slice(s+1,u),t),c=o.default.cloneElement(n,{},f),g.push(c),u<e.length-1&&(d=l(e.slice(u+1),t),g=g.concat(d))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(a=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,c.default)(t);try{return l(i,n)}catch(s){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(16),o=n(22);function i(e){if(!(this instanceof i))return new i(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=i,o(i,r.EventEmitter),Object.defineProperty(i.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),i.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},i.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},i.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},i.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},i.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},i.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},i.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},i.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(14),o=n(48),i=n(49),c=r.rotl32,s=r.sum32,a=r.sum32_5,l=i.ft_1,u=o.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function m(){if(!(this instanceof m))return new m;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(m,u),e.exports=m,m.blockSize=512,m.outSize=160,m.hmacStrength=80,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],i=this.h[1],u=this.h[2],m=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var d=~~(r/20),g=a(c(o,5),l(d,i,u,m),f,n[r],p[d]);f=m,m=u,u=c(i,30),i=o,o=g}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],m),this.h[4]=s(this.h[4],f)},m.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},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(50);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,n){var r=n(51),o=n(52),i=n(53);e.exports=function(e){return function(){var t,n=r(e);if(o()){var c=r(this).constructor;t=Reflect.construct(n,arguments,c)}else t=n.apply(this,arguments);return i(this,t)}}},function(e,t,n){"use strict";e.exports=n(55)},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
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}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){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(20);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(15);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var c=r,s=Number(new Date),a=s-(n||s);c.diff=a,c.prev=n,c.curr=s,n=s,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;l++;var r=o.formatters[n];if("function"==typeof r){var i=t[l];e=r.call(c,i),t.splice(l,1),l--}return e})),o.formatArgs.call(c,t);var u=c.log||o.log;u.apply(c,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=c,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function c(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(s)),r(o.skips.map(s).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(43),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return c(e,t,i,"day");if(t>=o)return c(e,t,o,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(8),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(21),c=n(45),s=n(46),a="function"==typeof Symbol&&Symbol.iterator;function l(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var i,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===o)return n(r,e,""===t?"."+l(e,0):t),1;var p=0,m=""===t?".":t+":";if(Array.isArray(e))for(var f=0;f<e.length;f++)p+=u(i=e[f],m+l(i,f),n,r);else{var d=function(e){var t=e&&(a&&e[a]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(d){0;for(var g,b=d.call(e),h=0;!(g=b.next()).done;)p+=u(i=g.value,m+l(i,h++),n,r)}else if("object"===s){0;var y=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===y?"object with keys {"+Object.keys(e).join(", ")+"}":y,"")}}return p}var p=/\/+/g;function m(e){return(""+e).replace(p,"$&/")}var f,d,g=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},h=function(e){c(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function y(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function v(e,t,n){var o,c,s=e.result,a=e.keyPrefix,l=e.func,u=e.context,p=l.call(u,t,e.count++);Array.isArray(p)?O(p,s,n,i.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(o=p,c=a+(!p.key||t&&t.key===p.key?"":m(p.key)+"/")+n,p=r.cloneElement(o,{key:c},void 0!==o.props?o.props.children:void 0)),s.push(p))}function O(e,t,n,r,o){var i="";null!=n&&(i=m(n)+"/");var c=y.getPooled(t,i,r,o);!function(e,t,n){null==e||u(e,"",t,n)}(e,v,c),y.release(c)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},f=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(d=y).instancePool=[],d.getPooled=f||g,d.poolSize||(d.poolSize=10),d.release=h;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)O(e[n],t,n,i.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,c,s){if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,c,s],u=0;(a=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";var r=n(21);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";var r=n(14),o=n(23);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(14).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function c(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?c(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=c,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},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){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){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(54),o=n(12);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";
7
+ /** @license React v1.3.0
8
+ * use-subscription.production.min.js
9
+ *
10
+ * Copyright (c) Facebook, Inc. and its affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */Object.defineProperty(t,"__esModule",{value:!0});var r=n(56),o=n(8);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,i=o.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=i[0];var c=i[1];return i=e.value,e.getCurrentValue===t&&e.subscribe===n||(i=t(),c({getCurrentValue:t,subscribe:n,value:i})),o.useDebugValue(i),o.useEffect((function(){function e(){if(!o){var e=t();c((function(o){return o.getCurrentValue!==t||o.subscribe!==n||o.value===e?o:r({},o,{value:e})}))}}var o=!1,i=n(e);return e(),function(){o=!0,i()}}),[t,n]),i}},function(e,t,n){"use strict";
15
+ /*
16
+ object-assign
17
+ (c) Sindre Sorhus
18
+ @license MIT
19
+ */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,a=c(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))o.call(n,u)&&(a[u]=n[u]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(a[s[p]]=n[s[p]])}}return a}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return pt}));var r={};n.r(r),n.d(r,"name",(function(){return Ke})),n.d(r,"category",(function(){return He})),n.d(r,"settings",(function(){return Ge})),n.d(r,"SUPPORTED_CURRENCIES",(function(){return Ve})),n.d(r,"CURRENCY_OPTIONS",(function(){return We})),n.d(r,"minimumTransactionAmountForCurrency",(function(){return ze})),n.d(r,"isPriceValid",(function(){return Ze}));var o={};n.r(o),n.d(o,"name",(function(){return Je})),n.d(o,"category",(function(){return qe})),n.d(o,"settings",(function(){return Xe}));var i={};n.r(i),n.d(i,"name",(function(){return ct})),n.d(i,"category",(function(){return st})),n.d(i,"settings",(function(){return at}));var c=n(10),s=n.n(c),a=n(24),l=n(0),u=n(1),p={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function m(e){return p[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}var f,d,g,b,h=n(11),y=n(6),v=n.n(y),O=n(7),C=n.n(O),j=n(2),w=n(5),_=n(4),k=n(13),S=n(15),x=n.n(S),E=n(9),P=n.n(E),F=n(26),B=n.n(F),N=n(27),A=n.n(N);f={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},d=["(","?"],g={")":["("],":":["?","?:"]},b=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var L={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function R(e){var t=function(e){for(var t,n,r,o,i=[],c=[];t=e.match(b);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=c.pop();){if(g[n]){if(g[n][0]===o){n=g[n][1]||n;break}}else if(d.indexOf(o)>=0||f[o]<f[n]){c.push(o);break}i.push(o)}g[n]||c.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(c.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,c,s,a=[];for(n=0;n<e.length;n++){if(c=e[n],i=L[c]){for(r=i.length,o=Array(r);r--;)o[r]=a.pop();try{s=i.apply(null,o)}catch(l){return l}}else s=t.hasOwnProperty(c)?t[c]:+c;a.push(s)}return a[0]}(t,e)}}var T={contextDelimiter:"",onMissingKey:null};function D(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},T)this.options[n]=void 0!==t&&n in t?t[n]:T[n]}D.prototype.getPluralForm=function(e,t){var n,r,o,i,c=this.pluralForms[e];return c||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=R(r),o=function(e){return+i({n:e})}),c=this.pluralForms[e]=o),c(t)},D.prototype.dcnpgettext=function(e,t,n,r,o){var i,c,s;return i=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var M=n(28),I=n.n(M),$=n(29),U=n.n($),K=n(16),H=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function G(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(H,(function(){var e,r,o,i,c;return e=arguments[3],r=arguments[5],o=arguments[7],"%"===(i=arguments[9])?"%":("*"===o&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(c=t[0][r]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===i?c=parseFloat(c)||0:"d"===i&&(c=parseInt(c)||0),void 0!==o&&("f"===i?c=c.toFixed(o):"s"===i&&(c=c.substr(0,o))),null!=c?c:"")}))}
20
+ /*
21
+ * Exposes number format capability
22
+ *
23
+ * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
24
+ * @license See CREDITS.md
25
+ * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
26
+ */function V(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,s=void 0===n?".":n,a="";return(a=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(a[1]||"").length<i&&(a[1]=a[1]||"",a[1]+=new Array(i-a[1].length+1).join("0")),a.join(s)}var W=B()("i18n-calypso"),z=[function(e){return e}],Z={};function Y(){ee.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function J(e){return Array.prototype.slice.call(e)}function q(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&Y("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",J(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&Y("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",J(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function X(e,t){return e.dcnpgettext("messages",t.context,t.original,t.plural,t.count)}function Q(e,t){for(var n=z.length-1;n>=0;n--){var r=z[n](Object.assign({},t));if(e.state.locale[r.original])return X(e.state.tannin,r)}return null}function ee(){if(!(this instanceof ee))return new ee;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:I()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new K.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}ee.throwErrors=!1,ee.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},ee.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},ee.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},ee.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return V(e,n,r,o)},ee.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},ee.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==Z[n+e])return Z[n+e];var r=U()().update(e).digest("hex");return Z[n+e]=t?r.substr(0,t):r},c=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)z.push(c(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var a=Number(o.substr(5));z.push(c(a))}else for(var l=Number(o.substr(5,s)),u=Number(o.substr(6+s)),p=l;p<=u;p++)z.push(c(p))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new D(P()({},"messages",this.state.locale)),this.state.numberFormatSettings.decimal_point=X(this.state.tannin,q(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=X(this.state.tannin,q(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberFormatSettings.decimal_point&&(this.state.numberFormatSettings.decimal_point="."),"number_format_thousands_sep"===this.state.numberFormatSettings.thousands_sep&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},ee.prototype.getLocale=function(){return this.state.locale},ee.prototype.getLocaleSlug=function(){return this.state.localeSlug},ee.prototype.isRtl=function(){return"rtl"===this.state.textDirection},ee.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},ee.prototype.hasTranslation=function(){return!!Q(this,q(arguments))},ee.prototype.translate=function(){var e=q(arguments),t=Q(this,e);if(t||(t=X(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=G.apply(void 0,x()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=A()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},ee.prototype.reRenderTranslations=function(){W("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},ee.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},ee.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var te=ee,ne=n(30),re=n.n(ne),oe=n(31),ie=n.n(oe),ce=n(12),se=n.n(ce),ae=n(32),le=n.n(ae),ue=n(33),pe=n.n(ue),me=n(8),fe=n.n(me),de=n(34);var ge,be,he=new te,ye=he.numberFormat.bind(he),ve=(he.translate.bind(he),he.configure.bind(he),he.setLocale.bind(he),he.getLocale.bind(he),he.getLocaleSlug.bind(he),he.addTranslations.bind(he),he.reRenderTranslations.bind(he),he.registerComponentUpdateHook.bind(he),he.registerTranslateHook.bind(he),he.state,he.stateObserver,he.on.bind(he),he.off.bind(he),he.emit.bind(he),be={numberFormat:(ge=he).numberFormat.bind(ge),translate:ge.translate.bind(ge)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(he),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(de.useSubscription)(t)}var r=Object(w.createHigherOrderComponent)((function(e){return Object(me.forwardRef)((function(t,r){var o=n();return fe.a.createElement(e,v()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(he));ve.useRtl,ve.withRtl;function Oe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m(t);if(!r||isNaN(e))return null;var o=s()({},r,{},n),i=o.decimal,c=o.grouping,a=o.precision,l=o.symbol,u=e<0?"-":"",p=ye(Math.abs(e),{decimals:a,thousandsSep:c,decPoint:i});return n.stripZeros&&(p=Ce(p,i)),"".concat(u).concat(l).concat(p)}function Ce(e,t){var n=new RegExp("\\".concat(t,"0+$"));return e.replace(n,"")}function je(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,i=e.onSelected,c=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(l.createElement)("button",{type:"button",onClick:function(){return i(n)},className:c.join(" ")},r)}function we(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,i=e.selectBlock;return Object(l.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(l.createElement)(je,v()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(l.createElement)("button",{onClick:function(){Object(_.select)("core/edit-post").isEditorSidebarOpened()||Object(_.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),i()},className:"edit components-button is-button is-secondary"},Object(u.__)("Edit","premium-content")))}var _e=n(3);function ke(){return Object(l.createElement)("div",{className:"premium-content-wrapper"},Object(l.createElement)(_e.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function Se(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,i=e.onClose,c=e.getPlanDescription,s=r&&n.id===r.id,a=(s?["is-selected"]:[]).concat([t]).join(" "),u=s?"yes":void 0,p=null;return n&&(p=" "+c(n)),Object(l.createElement)(j.MenuItem,{onClick:function(e){e.preventDefault(),o(n),i()},className:a,key:n.id,value:n.id,selected:s,icon:u},n.title," : ",p)}function xe(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(l.createElement)(j.MenuGroup,null,t.map((function(t){return Object(l.createElement)(Se,v()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function Ee(e){return Object(l.createElement)(j.MenuGroup,null,Object(l.createElement)(j.MenuItem,{onClick:function(t){t.preventDefault(),Object(_.select)("core/edit-post").isEditorSidebarOpened()||Object(_.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(u.__)("Add a new subscription","premium-content")))}function Pe(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans,o=e.getPlanDescription,i=r.find((function(e){return e.id===t})),c=null;return i&&(c=" "+o(i)),Object(l.createElement)(_e.BlockControls,null,Object(l.createElement)(j.Toolbar,null,Object(l.createElement)(j.DropdownMenu,{icon:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(j.Dashicon,{icon:"update"})," ",c&&Object(l.createElement)(l.Fragment,null,c)),label:Object(u.__)("Select a plan","premium-content"),className:"premium-content-toolbar-button"},(function(t){var r=t.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(xe,v()({},e,{onSelected:n,onClose:r,selectedPlan:i})),Object(l.createElement)(Ee,v()({},e,{onClose:r})))}))))}function Fe(e){var t=Object(l.useState)(0),n=C()(t,2),r=n[0],o=n[1],i=e.attributes,c=e.setAttributes,s=e.className,a=e.savePlan,p=(e.currencies,e.siteSlug);return Object(l.createElement)(_e.InspectorControls,null,p&&Object(l.createElement)(j.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(p),className:"wp-block-premium-content-container---link-to-earn"},Object(u.__)("Manage your subscriptions.","premium-content")),Object(l.createElement)(j.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(s,"---settings-add_plan")},1===r&&Object(l.createElement)(j.Placeholder,{icon:"lock",label:Object(u.__)("Premium Content","premium-content"),instructions:Object(u.__)("Saving plan...","premium-content")},Object(l.createElement)(j.Spinner,null)),0===r&&Object(l.createElement)("div",null,Object(l.createElement)(j.PanelRow,{className:"plan-name"},Object(l.createElement)(j.TextControl,{id:"new-plan-name",label:"Name",value:i.newPlanName,onChange:function(e){return c({newPlanName:e})}})),Object(l.createElement)(j.PanelRow,{className:"plan-price"},Object(l.createElement)(j.SelectControl,{label:"Currency",onChange:function(e){return c({newPlanCurrency:e})},value:i.newPlanCurrency,options:We}),Object(l.createElement)(j.TextControl,{label:"Price",value:i.newPlanPrice,onChange:function(e){return c({newPlanPrice:parseFloat(e)})},type:"number"})),Object(l.createElement)(j.PanelRow,{className:"plan-interval"},Object(l.createElement)(j.SelectControl,{label:"Interval",onChange:function(e){return c({newPlanInterval:e})},value:i.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(l.createElement)(j.PanelRow,null,Object(l.createElement)(j.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),a(e.attributes,(function(e){o(0),e&&(c({newPlanPrice:5}),c({newPlanName:""}))}))}},Object(u.__)("Add subscription","premium-content"))))))}var Be=n(25),Ne=n.n(Be),Ae=Object(w.compose)([Object(_.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=Ne()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(l.createElement)(_e.Warning,{actions:n&&[Object(l.createElement)(j.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button"},Object(u.__)("Connect","premium-content"))],className:"premium-content-block-nudge"},Object(l.createElement)("span",{className:"premium-content-block-nudge__info"},Object(l.createElement)(j.Dashicon,{icon:"star-filled"}),Object(l.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(l.createElement)("span",{className:"premium-content-block-nudge__title"},Object(u.__)("Connect to Stripe to use this block on your site","premium-content")),Object(l.createElement)("span",{className:"premium-content-block-nudge__message"},Object(u.__)("This block will be hidden from your visitors until you connect to Stripe.","premium-content")))))})),Le={selectedTab:{id:"",className:"",label:Object(l.createElement)(l.Fragment,null)},stripeNudge:null},Re=Object(l.createContext)(Le),Te=n(17),De=n.n(Te),Me=[{id:"premium",label:Object(l.createElement)("span",null,Object(u.__)("Subscriber View","premium-content")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(l.createElement)("span",null,Object(u.__)("Logged Out View","premium-content")),className:"wp-premium-content-logged-out-view"}],Ie=[];function $e(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var Ue=Object(w.compose)([Object(_.withSelect)((function(e,t){return{postId:(0,e("core/editor").getCurrentPostId)(),containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),j.withNotices,Object(_.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){var t=Object(l.useState)(Me[1]),n=C()(t,2),r=n[0],o=n[1],i=Object(l.useState)(!1),c=C()(i,2),s=c[0],a=c[1],p=Object(l.useState)(Ie),m=C()(p,2),f=m[0],d=m[1],g=Object(l.useState)(null),b=C()(g,2),h=b[0],y=b[1],O=Object(l.useState)(0),w=C()(O,2),_=w[0],S=w[1],x=Object(l.useState)(!1),E=C()(x,2),P=E[0],F=E[1],B=Object(l.useState)(""),N=C()(B,2),A=N[0],L=N[1],R=Object(l.useState)(""),T=C()(R,2),D=T[0],M=T[1];function I(t,n){if(!t.newPlanName||0===t.newPlanName.length)return $e(e,Object(u.__)("Plan requires a name","premium-content")),void n(!1);var r=parseFloat(t.newPlanPrice),o=ze(t.newPlanCurrency),i=Object(u.sprintf)(Object(u.__)("Minimum allowed price is %s.","premium-content"),Oe(o,t.newPlanCurrency));if(r<o)return $e(e,i),void n(!1);if(!Ze(t.newPlanCurrency,r))return $e(e,Object(u.__)("Plan requires a valid price","premium-content")),void n(!1);var c={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};De()(c).then((function(e){var t={id:e.id,title:e.title,interval:e.interval,price:e.price,currency:e.currency};d(f.concat([t])),$(t),n&&n(!0)}),(function(){$e(e,Object(u.__)("There was an error when adding the plan.")),n&&n(!1)}))}function $(t){e.setAttributes({selectedPlanId:t.id})}var U=Object(l.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(l.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(U,a);var K=e.isSelected,H=e.className;if(Object(l.useEffect)((function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};De()(t).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return S(2),void $e(e,Object.values(t.errors)[0][0]);y(t.connect_url),F(t.should_upgrade_to_access_memberships),L(t.upgrade_url),M(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?I({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(u.__)("Monthly Subscription"),newPlanInterval:"1 month"},(function(){S(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(d(t.products),e.attributes.selectedPlanId||$(t.products[0])),S(t.connected_account_id?1:2))}}),(function(t){y(null),S(2),$e(e,t.message)})),e.selectBlock()}),[]),0===_)return Object(l.createElement)("div",{className:H,ref:U},e.noticeUI,Object(l.createElement)(j.Placeholder,{icon:"lock",label:Object(u.__)("Premium Content","premium-content"),instructions:Object(u.__)("Loading data...","premium-content")},Object(l.createElement)(j.Spinner,null)));if(P)return Object(l.createElement)("div",{className:H,ref:U},e.noticeUI,Object(l.createElement)(j.Placeholder,{icon:"lock",label:Object(u.__)("Premium Content","premium-content"),instructions:Object(u.__)("You'll need to upgrade your plan to use the Premium Content block.","premium-content")},Object(l.createElement)(j.Button,{isSecondary:!0,isLarge:!0,href:A,target:"_blank",className:"premium-content-block-nudge__button"},Object(u.__)("Upgrade Your Plan","premium-content")),Object(l.createElement)("div",{className:"membership-button__disclaimer"},Object(l.createElement)(j.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(u.__)("Read more about Premium Content and related fees.","premium-content")))));var G=null;if(!P&&1!==_&&h){var V=function(e,t){var n,r=e.postId;if(!Object(k.isURL)(t))return null;if(!r)return t;try{var o=Object(k.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(atob(o)))}catch(i){return t}return n.from_editor_post_id=r,Object(k.addQueryArgs)(t,{state:btoa(JSON.stringify(n))})}(e,h);G=Object(l.createElement)(Ae,v()({},e,{stripeConnectUrl:V}))}return Object(l.createElement)("div",{className:H,ref:U},e.noticeUI,(K||s)&&1===_&&Object(l.createElement)(Pe,v()({},e,{plans:f,selectedPlanId:e.attributes.selectedPlanId,onSelected:$,getPlanDescription:function(e){var t=Oe(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(u.sprintf)(Object(u.__)("%s / month","premium-content"),t):"1 year"===e.interval?Object(u.sprintf)(Object(u.__)("%s / year","premium-content"),t):"one-time"===e.interval?t:Object(u.sprintf)(Object(u.__)("%s / %s","premium-content"),t,e.interval)}})),(K||s)&&1===_&&Object(l.createElement)(Fe,v()({},e,{savePlan:I,siteSlug:D})),(K||s)&&Object(l.createElement)(we,v()({},e,{tabs:Me,selectedTab:r,onSelected:o})),Object(l.createElement)(Re.Provider,{value:{selectedTab:r,stripeNudge:G}},Object(l.createElement)(ke,null)))}));var Ke="premium-content/container",He="common",Ge={name:Ke,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(u.__)("Premium Content","premium-content"),description:Object(u.__)("Restrict access to your content for paying subscribers.","premium-content"),category:He,icon:Object(l.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(l.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(l.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},keywords:["premium-content",Object(u.__)("premium","premium-content"),Object(u.__)("paywall","premium-content")],edit:Ue,save:function(){return Object(l.createElement)("div",{className:"wp-block-premium-content-container"},Object(l.createElement)(_e.InnerBlocks.Content,null))}},Ve={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},We=Object.keys(Ve).map((function(e){var t=m(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(h.trimEnd)(t,"."))}}));function ze(e){return Ve[e]}function Ze(e,t){return!isNaN(t)&&t>=ze(e)}var Ye=Object(w.compose)([Object(_.withSelect)((function(e,t){return{hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length,containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(_.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){return Object(l.useEffect)((function(){e.selectBlock()}),[]),Object(l.createElement)(Re.Consumer,null,(function(t){var n=t.selectedTab,r=t.stripeNudge;return Object(l.createElement)("div",{hidden:"wall"===n.id,className:n.className},r,Object(l.createElement)(_e.InnerBlocks,{renderAppender:!e.hasInnerBlocks&&_e.InnerBlocks.ButtonBlockAppender,templateLock:!1,template:[["core/paragraph",{placeholder:Object(u.__)("Insert the piece of content you want your visitors to see after they subscribe.","premium-content")}]]}))}))}));var Je="premium-content/subscriber-view",qe="common",Xe={name:Je,category:qe,attributes:{},title:Object(u.__)("Subscriber View","premium-content"),description:Object(u.__)("Subscriber View.","premium-content"),parent:["premium-content/container"],supports:{inserter:!1},edit:Ye,save:function(){return Object(l.createElement)("div",{className:"wp-block-premium-content-subscriber-view"},Object(l.createElement)(_e.InnerBlocks.Content,null))}},Qe=n(35),et=n.n(Qe),tt=window.getComputedStyle,nt=Object(j.withFallbackStyles)((function(e,t){var n,r,o,i,c=t.textButtonColor,s=t.backgroundButtonColor,a=s&&s.color,l=c&&c.color;return!l&&e&&(n=e.querySelector('[contenteditable="true"]')),r=e.querySelector(".wp-block-button__link")?e.querySelector(".wp-block-button__link"):e,e&&r&&(o=tt(r).backgroundColor),n&&(i=tt(n).color),{fallbackBackgroundColor:a||o,fallbackTextColor:l||i}}));var rt=Object(w.compose)([Object(_e.withColors)({backgroundButtonColor:"background-color"},{textButtonColor:"color"}),nt])((function(e){function t(){var t,n=e.textButtonColor,r=e.backgroundButtonColor,o=Object(h.get)(n,"class"),i=Object(h.get)(r,"class");return et()("wp-block-button__link",(t={"has-text-color":n.color},P()(t,o,o),P()(t,"has-background",r.color),P()(t,i,i),t))}Object(l.useEffect)((function(){!function(){var n=t();e.setAttributes({buttonClasses:n})}(),function(){var t=Object(h.get)(e.textButtonColor,"color"),n=Object(h.get)(e.backgroundButtonColor,"color");void 0!==t&&e.setAttributes({customTextButtonColor:t});void 0!==n&&e.setAttributes({customBackgroundButtonColor:n})}()}),[e.backgroundButtonColor,e.textButtonColor]);var n=e.attributes,r=e.setAttributes,o=e.backgroundButtonColor,i=e.textButtonColor,c=e.setBackgroundButtonColor,s=e.setTextButtonColor,a=e.fallbackBackgroundColor,p=e.fallbackTextColor,m=o.color||a,f=i.color||p,d={border:"none",backgroundColor:m,color:f},g=t();return Object(l.createElement)("div",null,Object(l.createElement)("div",{className:"wp-block-button premium-content-logged-out-view-button"},Object(l.createElement)(_e.RichText,{placeholder:Object(u.__)("Add text…","premium-content"),value:n.subscribeButtonText,onChange:function(e){return r({subscribeButtonText:e})},className:g,style:d,keepPlaceholderOnFocus:!0}),Object(l.createElement)(_e.RichText,{placeholder:Object(u.__)("Add text…","premium-content"),value:n.loginButtonText,onChange:function(e){return r({loginButtonText:e})},className:g,style:d,keepPlaceholderOnFocus:!0})),Object(l.createElement)(_e.InspectorControls,null,Object(l.createElement)(_e.PanelColorSettings,{title:Object(u.__)("Button Color Settings","premium-content"),colorSettings:[{value:o||void 0,onChange:c,label:Object(u.__)("Background Color","premium-content")},{value:i||void 0,onChange:s,label:Object(u.__)("Text Color","premium-content")}]}),Object(l.createElement)(_e.ContrastChecker,{textColor:f,backgroundColor:m,fallbackBackgroundColor:a,fallbackTextColor:p})))}));var ot=Object(w.compose)([Object(_.withSelect)((function(e,t){return{containerClientId:e("core/block-editor").getBlockHierarchyRootClientId(t.clientId)}})),Object(_.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.containerClientId)}}}))])((function(e){Object(l.useEffect)((function(){e.selectBlock()}),[]);var t=Object(l.createElement)(rt,{attributes:Object(h.pick)(e.attributes,["subscribeButtonText","loginButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"]),setAttributes:e.setAttributes});return Object(l.createElement)(Re.Consumer,null,(function(e){var n=e.selectedTab,r=e.stripeNudge;return Object(l.createElement)("div",{hidden:"premium"===n.id,className:n.className},r,Object(l.createElement)(_e.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(u.__)("Subscribe to get access","premium-content"),level:3}],["core/paragraph",{content:Object(u.__)("Read more of this content when you subscribe today.","premium-content")}]]}),t)}))}));var it=n(18),ct="premium-content/logged-out-view",st="common",at={name:ct,category:st,attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},title:Object(u.__)("Logged Out View","premium-content"),description:Object(u.__)("Logged Out View.","premium-content"),parent:["premium-content/container"],supports:{inserter:!1},edit:ot,save:function(){return Object(l.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(l.createElement)(_e.InnerBlocks.Content,null))}},lt=Object(_.subscribe)((function(){var e=Object(_.select)("core/rich-text").getFormatType("core/link");if(e){lt(),Object(it.unregisterFormatType)("core/link");var t=Object(w.compose)(Object(_.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(w.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==ct})))(e.edit);Object(it.registerFormatType)("core/link",s()({},e,{edit:t}))}})),ut=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(a.registerBlockType)(t,s()({category:n},r))}},pt=function(){[r,i,o].forEach(ut)};pt()}]));
premium-content/editor.css CHANGED
@@ -28,15 +28,10 @@
28
  margin-left: auto;
29
  }
30
 
31
-
32
  .premium-content-wrapper {
33
  margin: 0;
34
  }
35
 
36
- .premium-content-toolbar-button {
37
- min-width: 150px;
38
- }
39
-
40
  .premium-content-block-nudge .editor-warning {
41
  margin-bottom: 0;
42
  }
@@ -97,8 +92,12 @@
97
  margin: 0;
98
  }
99
 
100
- .wp-block-premium-content-container---settings-add_plan .components-panel__row.plan-price {
101
- margin-bottom: 28px;
 
 
 
 
102
  }
103
 
104
  .wp-block-premium-content-container---link-to-earn {
28
  margin-left: auto;
29
  }
30
 
 
31
  .premium-content-wrapper {
32
  margin: 0;
33
  }
34
 
 
 
 
 
35
  .premium-content-block-nudge .editor-warning {
36
  margin-bottom: 0;
37
  }
92
  margin: 0;
93
  }
94
 
95
+ .wp-block-premium-content-container---settings-add_plan .components-panel__row:last-child {
96
+ margin-top: 25px;
97
+ }
98
+
99
+ .wp-block-premium-content-container---settings-add_plan .components-base-control:last-child {
100
+ margin: 0;
101
  }
102
 
103
  .wp-block-premium-content-container---link-to-earn {
premium-content/premium-content.php CHANGED
@@ -21,6 +21,7 @@ use A8C\FSE\Earn\PremiumContent\SubscriptionService\{
21
  Subscription_Service,
22
  Jetpack_Token_Subscription_Service,
23
  Unconfigured_Subscription_Service,
 
24
  WPCOM_Token_Subscription_Service
25
  };
26
 
@@ -118,6 +119,7 @@ function premium_content_current_visitor_can_access( $attributes ) {
118
  if ( ! isset( $attributes['selectedPlanId'] ) ) {
119
  return false;
120
  }
 
121
  $paywall = premium_content_subscription_service();
122
  $can_view = $paywall->visitor_can_view_content( array( $attributes['selectedPlanId'] ) );
123
 
@@ -269,6 +271,10 @@ function premium_content_default_service( $service ) {
269
  return $service;
270
  }
271
 
 
 
 
 
272
  if ( WPCOM_Token_Subscription_Service::available() ) {
273
  return new WPCOM_Token_Subscription_Service();
274
  }
21
  Subscription_Service,
22
  Jetpack_Token_Subscription_Service,
23
  Unconfigured_Subscription_Service,
24
+ WPCOM_Offline_Subscription_Service,
25
  WPCOM_Token_Subscription_Service
26
  };
27
 
119
  if ( ! isset( $attributes['selectedPlanId'] ) ) {
120
  return false;
121
  }
122
+
123
  $paywall = premium_content_subscription_service();
124
  $can_view = $paywall->visitor_can_view_content( array( $attributes['selectedPlanId'] ) );
125
 
271
  return $service;
272
  }
273
 
274
+ if ( WPCOM_Offline_Subscription_Service::available() ) {
275
+ return new WPCOM_Offline_Subscription_Service();
276
+ }
277
+
278
  if ( WPCOM_Token_Subscription_Service::available() ) {
279
  return new WPCOM_Token_Subscription_Service();
280
  }
premium-content/subscription-service/class-token-subscription-service.php CHANGED
@@ -152,7 +152,7 @@ abstract class Token_Subscription_Service implements Subscription_Service {
152
  *
153
  * @return bool
154
  */
155
- private function validate_subscriptions( $valid_plan_ids, $token_subscriptions ) {
156
  // Create a list of product_ids to compare against:
157
  $product_ids = array();
158
  foreach ( $valid_plan_ids as $plan_id ) {
152
  *
153
  * @return bool
154
  */
155
+ protected function validate_subscriptions( $valid_plan_ids, $token_subscriptions ) {
156
  // Create a list of product_ids to compare against:
157
  $product_ids = array();
158
  foreach ( $valid_plan_ids as $plan_id ) {
premium-content/subscription-service/class-wpcom-offline-subscription-service.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php declare( strict_types = 1 );
2
+ /**
3
+ * @package A8C\FSE\Earn
4
+ *
5
+ * This subscription service is used when a subscriber is offline and a token is not available.
6
+ * This subscription service will be used when rendering content in email and reader on WPCOM only.
7
+ * When content is being rendered, the current user and site are set.
8
+ * This allows us to lookup a users subscriptions and determine if the
9
+ * offline visitor can view content that has been deemed "Premium content".
10
+ */
11
+ namespace A8C\FSE\Earn\PremiumContent\SubscriptionService;
12
+
13
+ // phpcs:ignore ImportDetection.Imports.RequireImports.Symbol
14
+ class WPCOM_Offline_Subscription_Service extends WPCOM_Token_Subscription_Service {
15
+
16
+ /**
17
+ * @return boolean
18
+ */
19
+ public static function available() {
20
+ // Return available if on WPCOM and
21
+ // either running a job (sending email subscription) or handling API request (reader)
22
+ // and the user is logged in
23
+ return defined( 'IS_WPCOM' ) && IS_WPCOM === true && (
24
+ ( defined( 'IS_JOBS' ) && IS_JOBS ) ||
25
+ ( defined( 'REST_API_REQUEST' ) && REST_API_REQUEST )
26
+ ) && is_user_logged_in();
27
+ }
28
+
29
+ /**
30
+ * Lookup users subscriptions for a site and determine if the user has a valid subscription to match the plan ID
31
+ *
32
+ * @return bool
33
+ */
34
+ public function visitor_can_view_content( $valid_plan_ids ) {
35
+ $subscriptions = apply_filters( 'earn_get_user_subscriptions_for_site_id', array(), wp_get_current_user()->ID, $this->get_site_id() );
36
+ if ( empty( $subscriptions ) ) {
37
+ return false;
38
+ }
39
+ //format the subscriptions so that they can be validated
40
+ $subscriptions = self::abbreviate_subscriptions( $subscriptions );
41
+ return $this->validate_subscriptions( $valid_plan_ids, $subscriptions );
42
+ }
43
+
44
+ /**
45
+ * Report the subscriptions as an ID => [ 'end_date' => ]. mapping
46
+ * @param array $subscriptions_from_bd
47
+ *
48
+ * @return array<int, array>
49
+ */
50
+ static function abbreviate_subscriptions( $subscriptions_from_bd ) {
51
+ $subscriptions = [];
52
+ foreach ( $subscriptions_from_bd as $subscription ) {
53
+ // We are picking the expiry date that is the most in the future.
54
+ if (
55
+ $subscription['status'] === 'active' && (
56
+ ! isset( $subscriptions[ $subscription['product_id'] ] ) ||
57
+ empty( $subscription['end_date'] ) || // Special condition when subscription has no expiry date - we will default to a year from now for the purposes of the token.
58
+ strtotime( $subscription['end_date'] ) > strtotime( (string) $subscriptions[ $subscription['product_id'] ]['end_date'] )
59
+ )
60
+ ) {
61
+ $subscriptions[ $subscription['product_id'] ] = new \stdClass();
62
+ $subscriptions[ $subscription['product_id'] ]->end_date = empty( $subscription['end_date'] ) ? ( time() + 365 * 24 * 3600 ) : $subscription['end_date'];
63
+ }
64
+ }
65
+ return $subscriptions;
66
+ }
67
+ }
premium-content/subscription-service/include.php CHANGED
@@ -5,5 +5,6 @@ require_once __DIR__ . '/class-subscription-service.php';
5
  require_once __DIR__ . '/class-token-subscription.php';
6
  require_once __DIR__ . '/class-token-subscription-service.php';
7
  require_once __DIR__ . '/class-wpcom-token-subscription-service.php';
 
8
  require_once __DIR__ . '/class-jetpack-token-subscription-service.php';
9
  require_once __DIR__ . '/class-unconfigured-subscription-service.php';
5
  require_once __DIR__ . '/class-token-subscription.php';
6
  require_once __DIR__ . '/class-token-subscription-service.php';
7
  require_once __DIR__ . '/class-wpcom-token-subscription-service.php';
8
+ require_once __DIR__ . '/class-wpcom-offline-subscription-service.php';
9
  require_once __DIR__ . '/class-jetpack-token-subscription-service.php';
10
  require_once __DIR__ . '/class-unconfigured-subscription-service.php';
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: alexislloyd, allancole, automattic, bartkalisz, codebykat, copons,
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
- Stable tag: 1.3
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -40,6 +40,12 @@ This plugin is experimental, so we don't provide any support for it outside of w
40
 
41
  == Changelog ==
42
 
 
 
 
 
 
 
43
  = 1.3 =
44
  * Update Premium Content Block icon.
45
  * Add Showcase New Blocks module.
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
+ Stable tag: 1.4
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
40
 
41
  == Changelog ==
42
 
43
+ = 1.4 =
44
+ * Update Premium Block Style and Behaviour
45
+ * Support for Premium Content in email subscription and reader.
46
+ * Add plugin to notify users of Block Patterns new location.
47
+ * Add default link colors to the editor.
48
+
49
  = 1.3 =
50
  * Update Premium Content Block icon.
51
  * Add Showcase New Blocks module.
wpcom-block-editor-nux/dist/images/block-8609c325d8398aa551a1886601e194a8.svg DELETED
@@ -1,14 +0,0 @@
1
- <svg width="534" height="442" viewBox="0 0 534 442" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M0 0H534V442H0V0Z" fill="#1381D8"/>
3
- <rect x="66" y="146.194" width="401.585" height="200.792" rx="3.71838" fill="white"/>
4
- <rect x="66" y="96" width="202.652" height="44.6205" rx="3.71838" fill="white"/>
5
- <rect x="77.1562" y="107.153" width="22.3103" height="22.3103" fill="#E2E4E7"/>
6
- <rect x="127.352" y="107.153" width="22.3103" height="22.3103" fill="#E2E4E7"/>
7
- <rect x="162.68" y="107.153" width="22.3103" height="22.3103" fill="#E2E4E7"/>
8
- <rect x="198.004" y="107.153" width="22.3103" height="22.3103" fill="#E2E4E7"/>
9
- <rect x="233.328" y="107.153" width="22.3103" height="22.3103" fill="#E2E4E7"/>
10
- <line x1="272.215" y1="261.469" x2="272.215" y2="233.374" stroke="#1E1E1E" stroke-width="2.78878"/>
11
- <line x1="263.949" y1="261.469" x2="263.949" y2="233.374" stroke="#1E1E1E" stroke-width="2.78878"/>
12
- <line x1="278.566" y1="233.115" x2="262.04" y2="233.115" stroke="#1E1E1E" stroke-width="2.78878"/>
13
- <path d="M261.472 240.809V248.378C257.888 247.722 255.172 244.583 255.172 240.809C255.172 237.035 257.888 233.896 261.472 233.24V240.809Z" fill="#1E1E1E" stroke="#1E1E1E" stroke-width="2.78878"/>
14
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wpcom-block-editor-nux/dist/images/preview-e6daa84607b30e4c63a60423a8989e1a.svg ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="335" height="278" viewBox="0 0 335 278" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 0H334.656V277H0V0Z" fill="#1381D8"/>
3
+ <path d="M48 39.8672C48 38.8359 48.9907 38 50.213 38H284.787C286.01 38 287 38.8359 287 39.8672V277H48V39.8672Z" fill="white"/>
4
+ <path d="M186 60H164V68H186V60Z" fill="#E2E4E7"/>
5
+ <path d="M214 60H192V68H214V60Z" fill="#E2E4E7"/>
6
+ <path d="M242 60H220V68H242V60Z" fill="#E2E4E7"/>
7
+ <path d="M270 60H247V68H270V60Z" fill="#E2E4E7"/>
8
+ <circle cx="73" cy="64" r="9" fill="#1E1E1E"/>
9
+ <rect x="48" y="91" width="239" height="126" fill="#E2E4E7"/>
10
+ <rect x="48" y="235" width="108" height="42" fill="#E2E4E7"/>
11
+ <path d="M210 162H81V178H210V162Z" fill="white"/>
12
+ <path d="M121 185H81V194H121V185Z" fill="white"/>
13
+ <path d="M255 243H170V251H255V243Z" fill="#E2E4E7"/>
14
+ <path d="M255 256H170V264H255V256Z" fill="#E2E4E7"/>
15
+ <path d="M212.806 269H170V277H212.806V269Z" fill="#E2E4E7"/>
16
+ </svg>
wpcom-block-editor-nux/dist/images/private-598e2a26fcb0c685d165d750fdf02364.svg ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="534" height="442" viewBox="0 0 534 442" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 0H534V442H0V0Z" fill="#1381D8"/>
3
+ <rect x="76" y="82" width="381" height="278" fill="#E2E4E7"/>
4
+ <rect x="98.9531" y="103.563" width="337.228" height="42.3743" fill="white"/>
5
+ <rect x="140" y="315" width="105" height="45" fill="white"/>
6
+ <rect x="288" y="315" width="106" height="45" fill="white"/>
7
+ <rect x="76" y="167.124" width="381.368" height="127.123" fill="white"/>
8
+ <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="249" y="207" width="34" height="44">
9
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M276.415 221.708H278.499C280.79 221.708 282.665 223.583 282.665 225.875V246.708C282.665 249 280.79 250.875 278.499 250.875H253.499C251.207 250.875 249.332 249 249.332 246.708V225.875C249.332 223.583 251.207 221.708 253.499 221.708H255.582V217.542C255.582 211.792 260.249 207.125 265.999 207.125C271.749 207.125 276.415 211.792 276.415 217.542V221.708ZM265.999 211.292C262.54 211.292 259.749 214.083 259.749 217.542V221.708H272.249V217.542C272.249 214.083 269.457 211.292 265.999 211.292ZM253.499 246.708V225.875H278.499V246.708H253.499ZM270.165 236.292C270.165 238.583 268.29 240.458 265.999 240.458C263.707 240.458 261.832 238.583 261.832 236.292C261.832 234 263.707 232.125 265.999 232.125C268.29 232.125 270.165 234 270.165 236.292Z" fill="white"/>
10
+ </mask>
11
+ <g mask="url(#mask0)">
12
+ <rect x="241" y="204" width="50" height="50" fill="#1E1E1E"/>
13
+ </g>
14
+ <rect x="76" y="61" width="381" height="381" fill="#E2E4E7"/>
15
+ <rect x="98.9531" y="82.5635" width="337.228" height="42.3743" fill="white"/>
16
+ <rect x="140" y="294" width="105" height="64" fill="white"/>
17
+ <rect x="118" y="378" width="296.62" height="63.5614" fill="white"/>
18
+ <rect x="288" y="294" width="106" height="64" fill="white"/>
19
+ <rect x="76" y="146.124" width="381.368" height="127.123" fill="white"/>
20
+ <mask id="mask1" mask-type="alpha" maskUnits="userSpaceOnUse" x="249" y="186" width="34" height="44">
21
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M276.415 200.708H278.499C280.79 200.708 282.665 202.583 282.665 204.875V225.708C282.665 228 280.79 229.875 278.499 229.875H253.499C251.207 229.875 249.332 228 249.332 225.708V204.875C249.332 202.583 251.207 200.708 253.499 200.708H255.582V196.542C255.582 190.792 260.249 186.125 265.999 186.125C271.749 186.125 276.415 190.792 276.415 196.542V200.708ZM265.999 190.292C262.54 190.292 259.749 193.083 259.749 196.542V200.708H272.249V196.542C272.249 193.083 269.457 190.292 265.999 190.292ZM253.499 225.708V204.875H278.499V225.708H253.499ZM270.165 215.292C270.165 217.583 268.29 219.458 265.999 219.458C263.707 219.458 261.832 217.583 261.832 215.292C261.832 213 263.707 211.125 265.999 211.125C268.29 211.125 270.165 213 270.165 215.292Z" fill="white"/>
22
+ </mask>
23
+ <g mask="url(#mask1)">
24
+ <rect x="241" y="183" width="50" height="50" fill="#1E1E1E"/>
25
+ </g>
26
+ </svg>
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill'), 'version' => '6cecd567afe9f5a0b92707b56a2bc396');
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill'), 'version' => 'b564a083d3f722944034c00cc1d87ac8');
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=15)}([function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var o=n(11);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){function n(e,t,n,o,r,i,c){try{var a=e[i](c),u=a.value}catch(s){return void n(s)}a.done?t(u):Promise.resolve(u).then(o,r)}e.exports=function(e){return function(){var t=this,o=arguments;return new Promise((function(r,i){var c=e.apply(t,o);function a(e){n(c,r,i,a,u,"next",e)}function u(e){n(c,r,i,a,u,"throw",e)}a(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){e.exports=n.p+"images/block-8609c325d8398aa551a1886601e194a8.svg"},function(e,t,n){e.exports=n.p+"images/block-picker-53b676a08dd25f523d4adb0157a40b4c.svg"},function(e,t,n){e.exports=n.p+"images/editor-1a0c404dcc59d4a340edb4649127f4c9.svg"},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){!function(){e.exports=this.wp.nux}()},function(e,t,n){"object"==typeof window&&window.wpcomBlockEditorNuxAssetsUrl&&(n.p=window.wpcomBlockEditorNuxAssetsUrl)},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(5),r=n.n(o),i=n(4),c=n.n(i),a=n(0),u={setWpcomNuxStatus:function(e){var t=e.isNuxEnabled;return e.bypassApi||c()({path:"/wpcom/v2/block-editor/nux",method:"POST",data:{isNuxEnabled:t}}),{type:"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS",isNuxEnabled:t}}};Object(a.registerStore)("automattic/nux",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,o=t.isNuxEnabled;return"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS"===n?r()({},e,{isNuxEnabled:o}):e},actions:u,selectors:{isWpcomNuxEnabled:function(e){return e.isNuxEnabled}},persist:!0});n(12);var s=Object(a.subscribe)((function(){Object(a.dispatch)("core/nux").disableTips(),Object(a.select)("core/edit-post").isFeatureActive("welcomeGuide")&&Object(a.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),s()}));Object(a.subscribe)((function(){Object(a.select)("core/nux").areTipsEnabled()&&(Object(a.dispatch)("core/nux").disableTips(),Object(a.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0})),Object(a.select)("core/edit-post").isFeatureActive("welcomeGuide")&&(Object(a.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),Object(a.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0}))}));var l=n(6),p=n.n(l),d=n(1),b=(n(13),n(3)),f=n(2),m=n(7),O=(n(14),n(8)),g=n.n(O),x=n(9),j=n.n(x),v=n(10),h=n.n(v);function y(){var e,t=Object(a.useSelect)((function(e){return{isWpcomNuxEnabled:e("automattic/nux").isWpcomNuxEnabled(),isSPTOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen()}})),n=t.isWpcomNuxEnabled,o=t.isSPTOpen,r=Object(a.useDispatch)("automattic/nux").setWpcomNuxStatus;if(Object(d.useEffect)((function(){void 0===n&&function(){var e=p()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c()({path:"/wpcom/v2/block-editor/nux"});case 2:t=e.sent,r({isNuxEnabled:t.is_nux_enabled,bypassApi:!0});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[n,r]),!n||o)return null;var i=!!(null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding),u=i?Object(f.__)("Welcome to your website"):Object(f.__)("Welcome to the WordPress editor");return Object(d.createElement)(b.Guide,{className:"wpcom-block-editor-nux",contentLabel:u,finishButtonText:Object(f.__)("Get started"),onFinish:function(){return r({isNuxEnabled:!1})}},Object(d.createElement)(_,{heading:u,description:i?Object(f.__)("Edit your homepage, add the pages you need, and change your site’s look and feel."):Object(f.__)("Create and edit site pages, and customize the look and feel of each page."),imgSrc:h.a,alignBottom:!0}),Object(d.createElement)(_,{heading:i?Object(f.__)("Customize your content"):Object(f.__)("Create pages and add your content"),description:i?Object(f.__)("Start with an existing layout and make it your own."):Object(f.__)("Create and rearrange your site pages. Customize your site navigation menus so your visitors can explore your site."),imgSrc:g.a}),Object(d.createElement)(_,{heading:Object(f.__)("Add (almost) anything"),description:Object(f.__)("Insert text, photos, forms, Yelp reviews, testimonials, maps, and more. Rearrange the blocks on your page until they’re just right."),imgSrc:j.a}))}function _(e){var t=e.alignBottom,n=void 0!==t&&t,o=e.heading,r=e.description,i=e.imgSrc;return Object(d.createElement)(b.GuidePage,{className:"wpcom-block-editor-nux__page"},Object(d.createElement)("div",{className:"wpcom-block-editor-nux__text"},Object(d.createElement)("h1",{className:"wpcom-block-editor-nux__heading"},o),Object(d.createElement)("div",{className:"wpcom-block-editor-nux__description"},r)),Object(d.createElement)("div",{className:"wpcom-block-editor-nux__visual"},Object(d.createElement)("img",{key:i,src:i,alt:"","aria-hidden":"true",className:"wpcom-block-editor-nux__image"+(n?" align-bottom":"")})))}b.Guide&&b.GuidePage&&Object(m.registerPlugin)("wpcom-block-editor-nux",{render:function(){return Object(d.createElement)(y,null)}})}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},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=17)}([function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var i=n(13);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},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 i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){function n(e,t,n,i,o,r,c){try{var u=e[r](c),a=u.value}catch(s){return void n(s)}u.done?t(a):Promise.resolve(a).then(i,o)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise((function(o,r){var c=e.apply(t,i);function u(e){n(c,o,r,u,a,"next",e)}function a(e){n(c,o,r,u,a,"throw",e)}u(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){e.exports=n.p+"images/block-picker-53b676a08dd25f523d4adb0157a40b4c.svg"},function(e,t,n){e.exports=n.p+"images/editor-1a0c404dcc59d4a340edb4649127f4c9.svg"},function(e,t,n){e.exports=n.p+"images/preview-e6daa84607b30e4c63a60423a8989e1a.svg"},function(e,t,n){e.exports=n.p+"images/private-598e2a26fcb0c685d165d750fdf02364.svg"},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){!function(){e.exports=this.wp.nux}()},function(e,t,n){"object"==typeof window&&window.wpcomBlockEditorNuxAssetsUrl&&(n.p=window.wpcomBlockEditorNuxAssetsUrl)},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var i=n(5),o=n.n(i),r=n(4),c=n.n(r),u=n(0),a={setWpcomNuxStatus:function(e){var t=e.isNuxEnabled;return e.bypassApi||c()({path:"/wpcom/v2/block-editor/nux",method:"POST",data:{isNuxEnabled:t}}),{type:"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS",isNuxEnabled:t}}};Object(u.registerStore)("automattic/nux",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,i=t.isNuxEnabled;return"WPCOM_BLOCK_EDITOR_NUX_SET_STATUS"===n?o()({},e,{isNuxEnabled:i}):e},actions:a,selectors:{isWpcomNuxEnabled:function(e){return e.isNuxEnabled}},persist:!0});n(14);var s=Object(u.subscribe)((function(){Object(u.dispatch)("core/nux").disableTips(),Object(u.select)("core/edit-post").isFeatureActive("welcomeGuide")&&Object(u.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),s()}));Object(u.subscribe)((function(){Object(u.select)("core/nux").areTipsEnabled()&&(Object(u.dispatch)("core/nux").disableTips(),Object(u.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0})),Object(u.select)("core/edit-post").isFeatureActive("welcomeGuide")&&(Object(u.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),Object(u.dispatch)("automattic/nux").setWpcomNuxStatus({isNuxEnabled:!0}))}));var l=n(6),d=n.n(l),p=n(7),f=n.n(p),b=n(1),m=(n(15),n(3)),g=n(2),O=n(8),x=(n(16),n(9)),v=n.n(x),h=n(10),y=n.n(h),w=n(11),j=n.n(w),_=n(12),E=n.n(_);function N(){var e,t=Object(u.useSelect)((function(e){return{isWpcomNuxEnabled:e("automattic/nux").isWpcomNuxEnabled(),isSPTOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen()}})),n=t.isWpcomNuxEnabled,i=t.isSPTOpen,o=Object(u.useDispatch)("automattic/nux").setWpcomNuxStatus;if(Object(b.useEffect)((function(){void 0===n&&function(){var e=f()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c()({path:"/wpcom/v2/block-editor/nux"});case 2:t=e.sent,o({isNuxEnabled:t.is_nux_enabled,bypassApi:!0});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[n,o]),!n||i)return null;var r=!!(null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding);return Object(b.createElement)(m.Guide,{className:"wpcom-block-editor-nux",contentLabel:Object(g.__)("Welcome to your website","full-site-editing"),finishButtonText:Object(g.__)("Get started","full-site-editing"),onFinish:function(){return o({isNuxEnabled:!1})}},function(e){return[{heading:Object(g.__)("Welcome to your website","full-site-editing"),description:Object(g.__)("Edit your homepage, add the pages you need, and change your site’s look and feel.","full-site-editing"),imgSrc:y.a,alignBottom:!0},{heading:Object(g.__)("Add or edit your content","full-site-editing"),description:Object(g.__)("Edit the placeholder content we’ve started you off with, or click the plus sign to add more content.","full-site-editing"),imgSrc:v.a},{heading:Object(g.__)("Preview your site as you go","full-site-editing"),description:Object(g.__)("As you edit your site content, click “Preview” to see your site the way your visitors will.","full-site-editing"),imgSrc:j.a,alignBottom:!0},{heading:Object(g.__)("Private until you’re ready","full-site-editing"),description:Object(g.__)("Your site will remain private as you make changes until you’re ready to launch and share with the world.","full-site-editing"),imgSrc:E.a,shouldHide:!e,alignBottom:!0}].filter((function(e){return!e.shouldHide}))}(r).map((function(e){return Object(b.createElement)(P,d()({key:e.heading},e))})))}function P(e){var t=e.alignBottom,n=void 0!==t&&t,i=e.heading,o=e.description,r=e.imgSrc;return Object(b.createElement)(m.GuidePage,{className:"wpcom-block-editor-nux__page"},Object(b.createElement)("div",{className:"wpcom-block-editor-nux__text"},Object(b.createElement)("h1",{className:"wpcom-block-editor-nux__heading"},i),Object(b.createElement)("div",{className:"wpcom-block-editor-nux__description"},o)),Object(b.createElement)("div",{className:"wpcom-block-editor-nux__visual"},Object(b.createElement)("img",{key:r,src:r,alt:"","aria-hidden":"true",className:"wpcom-block-editor-nux__image"+(n?" align-bottom":"")})))}m.Guide&&m.GuidePage&&Object(O.registerPlugin)("wpcom-block-editor-nux",{render:function(){return Object(b.createElement)(N,null)}})}]));
wpcom-block-editor-nux/src/images/preview.svg ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="335" height="278" viewBox="0 0 335 278" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 0H334.656V277H0V0Z" fill="#1381D8"/>
3
+ <path d="M48 39.8672C48 38.8359 48.9907 38 50.213 38H284.787C286.01 38 287 38.8359 287 39.8672V277H48V39.8672Z" fill="white"/>
4
+ <path d="M186 60H164V68H186V60Z" fill="#E2E4E7"/>
5
+ <path d="M214 60H192V68H214V60Z" fill="#E2E4E7"/>
6
+ <path d="M242 60H220V68H242V60Z" fill="#E2E4E7"/>
7
+ <path d="M270 60H247V68H270V60Z" fill="#E2E4E7"/>
8
+ <circle cx="73" cy="64" r="9" fill="#1E1E1E"/>
9
+ <rect x="48" y="91" width="239" height="126" fill="#E2E4E7"/>
10
+ <rect x="48" y="235" width="108" height="42" fill="#E2E4E7"/>
11
+ <path d="M210 162H81V178H210V162Z" fill="white"/>
12
+ <path d="M121 185H81V194H121V185Z" fill="white"/>
13
+ <path d="M255 243H170V251H255V243Z" fill="#E2E4E7"/>
14
+ <path d="M255 256H170V264H255V256Z" fill="#E2E4E7"/>
15
+ <path d="M212.806 269H170V277H212.806V269Z" fill="#E2E4E7"/>
16
+ </svg>
wpcom-block-editor-nux/src/wpcom-nux.js CHANGED
@@ -17,10 +17,10 @@ import { registerPlugin } from '@wordpress/plugins';
17
  * Internal dependencies
18
  */
19
  import './style.scss';
20
- import blockImage from './images/block.svg';
21
  import blockPickerImage from './images/block-picker.svg';
22
  import editorImage from './images/editor.svg';
23
- //import privateImage from './images/private.svg';
 
24
 
25
  function WpcomNux() {
26
  const { isWpcomNuxEnabled, isSPTOpen } = useSelect( ( select ) => ( {
@@ -50,69 +50,72 @@ function WpcomNux() {
50
 
51
  const dismissWpcomNux = () => setWpcomNuxStatus( { isNuxEnabled: false } );
52
 
 
53
  const isGutenboarding = !! window.calypsoifyGutenberg?.isGutenboarding;
54
- const welcomeHeading = isGutenboarding
55
- ? __( 'Welcome to your website' )
56
- : __( 'Welcome to the WordPress editor' );
57
 
58
  return (
59
  <Guide
60
  className="wpcom-block-editor-nux"
61
- contentLabel={ welcomeHeading }
62
- finishButtonText={ __( 'Get started' ) }
63
  onFinish={ dismissWpcomNux }
64
  >
65
- <NuxPage
66
- heading={ welcomeHeading }
67
- description={
68
- isGutenboarding
69
- ? __(
70
- 'Edit your homepage, add the pages you need, and change your site’s look and feel.'
71
- )
72
- : __( 'Create and edit site pages, and customize the look and feel of each page.' )
73
- }
74
- imgSrc={ editorImage }
75
- alignBottom
76
- />
77
-
78
- <NuxPage
79
- heading={
80
- isGutenboarding
81
- ? __( 'Customize your content' )
82
- : __( 'Create pages and add your content' )
83
- }
84
- description={
85
- isGutenboarding
86
- ? __( 'Start with an existing layout and make it your own.' )
87
- : __(
88
- 'Create and rearrange your site pages. Customize your site navigation menus so your visitors can explore your site.'
89
- )
90
- }
91
- imgSrc={ blockImage }
92
- />
93
-
94
- <NuxPage
95
- heading={ __( 'Add (almost) anything' ) }
96
- description={ __(
97
- 'Insert text, photos, forms, Yelp reviews, testimonials, maps, and more. Rearrange the blocks on your page until they’re just right.'
98
- ) }
99
- imgSrc={ blockPickerImage }
100
- />
101
-
102
- { /* @TODO: hide for sites that are already public
103
- <NuxPage
104
- heading={ __( "Private until you're ready to launch" ) }
105
- description={ __(
106
- "Your site remains private until you're ready to launch. Take your time and make as many changes as you need until it's ready to share with the world."
107
- ) }
108
- imgSrc={ privateImage }
109
- alignBottom
110
- />
111
- */ }
112
  </Guide>
113
  );
114
  }
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  function NuxPage( { alignBottom = false, heading, description, imgSrc } ) {
117
  return (
118
  <GuidePage className="wpcom-block-editor-nux__page">
17
  * Internal dependencies
18
  */
19
  import './style.scss';
 
20
  import blockPickerImage from './images/block-picker.svg';
21
  import editorImage from './images/editor.svg';
22
+ import previewImage from './images/preview.svg';
23
+ import privateImage from './images/private.svg';
24
 
25
  function WpcomNux() {
26
  const { isWpcomNuxEnabled, isSPTOpen } = useSelect( ( select ) => ( {
50
 
51
  const dismissWpcomNux = () => setWpcomNuxStatus( { isNuxEnabled: false } );
52
 
53
+ /* @TODO: the copy, images, and slides will eventually be the same for all sites. `isGutenboarding` is only needed right now to show the Privacy slide */
54
  const isGutenboarding = !! window.calypsoifyGutenberg?.isGutenboarding;
 
 
 
55
 
56
  return (
57
  <Guide
58
  className="wpcom-block-editor-nux"
59
+ contentLabel={ __( 'Welcome to your website', 'full-site-editing' ) }
60
+ finishButtonText={ __( 'Get started', 'full-site-editing' ) }
61
  onFinish={ dismissWpcomNux }
62
  >
63
+ { getWpcomNuxPages( isGutenboarding ).map( ( nuxPage ) => (
64
+ <NuxPage key={ nuxPage.heading } { ...nuxPage } />
65
+ ) ) }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  </Guide>
67
  );
68
  }
69
 
70
+ /**
71
+ * This function returns a filtered collection of NUX slide data
72
+ * Function arguments can be extended to customize the slides for specific environments, e.g., Gutenboarding
73
+ *
74
+ * @param { boolean } isGutenboarding Whether the flow is Gutenboarding or not
75
+ * @returns { Array } a collection of <NuxPage /> props filtered by whether the flow is Gutenboarding or not
76
+ */
77
+ function getWpcomNuxPages( isGutenboarding ) {
78
+ return [
79
+ {
80
+ heading: __( 'Welcome to your website', 'full-site-editing' ),
81
+ description: __(
82
+ 'Edit your homepage, add the pages you need, and change your site’s look and feel.',
83
+ 'full-site-editing'
84
+ ),
85
+ imgSrc: editorImage,
86
+ alignBottom: true,
87
+ },
88
+ {
89
+ heading: __( 'Add or edit your content', 'full-site-editing' ),
90
+ description: __(
91
+ 'Edit the placeholder content we’ve started you off with, or click the plus sign to add more content.',
92
+ 'full-site-editing'
93
+ ),
94
+ imgSrc: blockPickerImage,
95
+ },
96
+ {
97
+ heading: __( 'Preview your site as you go', 'full-site-editing' ),
98
+ description: __(
99
+ 'As you edit your site content, click “Preview” to see your site the way your visitors will.',
100
+ 'full-site-editing'
101
+ ),
102
+ imgSrc: previewImage,
103
+ alignBottom: true,
104
+ },
105
+ {
106
+ heading: __( 'Private until you’re ready', 'full-site-editing' ),
107
+ description: __(
108
+ 'Your site will remain private as you make changes until you’re ready to launch and share with the world.',
109
+ 'full-site-editing'
110
+ ),
111
+ imgSrc: privateImage,
112
+ // @TODO: hide for sites that are already public
113
+ shouldHide: ! isGutenboarding,
114
+ alignBottom: true,
115
+ },
116
+ ].filter( ( nuxPage ) => ! nuxPage.shouldHide );
117
+ }
118
+
119
  function NuxPage( { alignBottom = false, heading, description, imgSrc } ) {
120
  return (
121
  <GuidePage className="wpcom-block-editor-nux__page">