Version Description
Download this release
Release Info
Developer | creativethemeshq |
Plugin | Blocksy Companion |
Version | 1.8.1 |
Comparing to | |
See all releases |
Code changes from version 1.7.63 to 1.8.1
- blocksy-companion.php +1 -1
- framework/cache-reset-manager.php +2 -2
- framework/dashboard.php +9 -2
- framework/extensions-manager.php +2 -2
- framework/extensions/cookies-consent/extension.php +3 -3
- framework/extensions/cookies-consent/readme.php +1 -17
- framework/extensions/cookies-consent/static/bundle/{main.css → main.min.css} +1 -1
- framework/extensions/mailchimp/extension.php +21 -9
- framework/extensions/mailchimp/mailchimp-manager.php +12 -7
- framework/extensions/mailchimp/static/bundle/main.js +1 -1
- framework/extensions/mailchimp/static/bundle/{main.css → main.min.css} +2 -2
- framework/extensions/mailchimp/static/js/main.js +50 -64
- framework/extensions/mailchimp/static/sass/main.scss +4 -5
- framework/extensions/mailchimp/static/sass/single-block.scss +1 -1
- framework/extensions/product-reviews/extension.php +2 -2
- framework/extensions/product-reviews/metabox.php +9 -3
- framework/extensions/product-reviews/pre-boot.php +1 -1
- framework/extensions/product-reviews/static/bundle/{main-admin.css → main-admin.min.css} +1 -1
- framework/extensions/product-reviews/static/bundle/{main.css → main.min.css} +1 -1
- framework/extensions/product-reviews/views/single-top.php +7 -1
- framework/extensions/trending/config.php +1 -1
- framework/extensions/trending/customizer.php +118 -79
- framework/extensions/trending/extension.php +76 -73
- framework/extensions/trending/global.php +14 -14
- framework/extensions/trending/helpers.php +31 -12
- framework/extensions/trending/static/bundle/main.js +1 -1
- framework/extensions/trending/static/bundle/main.min.css +8 -0
- framework/extensions/trending/static/js/main.js +12 -13
- framework/extensions/trending/static/js/trending-block.js +1 -19
- framework/extensions/trending/static/sass/main.scss +184 -0
- framework/extensions/widgets/extension.php +1 -1
- framework/extensions/widgets/static/bundle/main.css +0 -8
- framework/extensions/widgets/static/bundle/main.min.css +8 -0
- framework/extensions/widgets/static/sass/posts.scss +4 -4
- framework/extensions/widgets/widgets/ct-advertisement/options.php +7 -0
- framework/extensions/widgets/widgets/ct-advertisement/view.php +5 -1
- framework/extensions/widgets/widgets/ct-posts/view.php +13 -11
- framework/features/conditions-manager.php +132 -3
- framework/features/customizer-options-manager.php +4 -13
- framework/features/demo-install.php +1 -0
- framework/features/demo-install/content-installer.php +17 -0
- framework/features/demo-install/install-finish.php +27 -1
- framework/features/demo-install/options-import.php +0 -2
- framework/features/demo-install/wp-importer.php +0 -26
- framework/features/dynamic-css.php +2 -6
- framework/features/google-analytics.php +2 -4
- framework/features/header.php +61 -55
- framework/features/header/account-modal.php +28 -97
- framework/features/header/items/account/config.php +2 -1
- framework/features/header/items/account/dynamic-styles.php +6 -6
- framework/features/header/items/account/options.php +21 -16
- framework/features/header/items/account/sync.js +28 -0
- framework/features/header/items/account/view.php +6 -5
- framework/features/header/items/account/views/login.php +5 -1
- framework/features/header/items/account/views/logout.php +7 -1
- framework/features/header/modal/login.php +41 -0
- framework/features/header/modal/lostpassword.php +19 -0
- framework/features/header/modal/register.php +32 -0
- framework/helpers/helpers.php +44 -0
- framework/theme-integration.php +190 -23
- freemius/assets/img/blocksy-companion.jpg +0 -0
- readme.txt +58 -1
- static/bundle/account.js +1 -0
- static/bundle/dark-mode.js +1 -0
- static/bundle/dashboard.css +0 -8
- static/bundle/dashboard.js +1 -1
- static/bundle/dashboard.min.css +8 -0
- static/bundle/main.css +0 -7
- static/bundle/main.js +0 -1
- static/bundle/main.min.css +7 -0
- static/bundle/options.js +1 -1
- static/bundle/{options.css → options.min.css} +2 -2
- static/bundle/sticky.js +1 -0
- static/bundle/sync.js +1 -1
- static/js/account.js +46 -0
- static/js/dark-mode.js +15 -0
- static/js/frontend/account.js +17 -44
- static/js/frontend/sticky.js +49 -30
- static/js/header/EditConditions.js +3 -3
- static/js/header/PanelsManager.js +2 -0
- static/js/helpers/SubmitSupport.js +11 -3
- static/js/main.js +0 -14
- static/js/options/ConditionsManager.js +44 -48
- static/js/options/ConditionsManager/PostIdPicker.js +102 -0
- static/js/options/CustomizerOptionsManager.js +80 -6
- static/js/options/DisplayCondition.js +13 -12
- static/js/screens/DemoInstall/DemosList.js +10 -6
- static/js/screens/DemoInstall/Wizzard/ModifyDemo.js +11 -11
- static/js/screens/DemoInstall/Wizzard/Plugins.js +9 -8
- static/js/sticky.js +9 -0
- static/js/sync/header.js +13 -30
- static/sass/beta.scss +12 -0
- static/sass/demo-install/builders.scss +1 -1
- static/sass/demo-install/installer.scss +1 -1
- static/sass/demo-install/main.scss +1 -1
- static/sass/extensions/main.scss +4 -56
- static/sass/options/animated-checkbox.scss +1 -1
blocksy-companion.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Blocksy Companion
|
5 |
Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
|
6 |
-
Version: 1.
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blc
|
3 |
/*
|
4 |
Plugin Name: Blocksy Companion
|
5 |
Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
|
6 |
+
Version: 1.8.1
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blc
|
framework/cache-reset-manager.php
CHANGED
@@ -26,7 +26,7 @@ class CacheResetManager {
|
|
26 |
if ($options['type'] === 'theme') {
|
27 |
if (in_array('blocksy', $options['themes'])) {
|
28 |
$this->run_cache_purge();
|
29 |
-
do_action('blocksy:dynamic-css:
|
30 |
}
|
31 |
}
|
32 |
|
@@ -39,7 +39,7 @@ class CacheResetManager {
|
|
39 |
|
40 |
if (in_array(BLOCKSY_PLUGIN_BASE, $plugins)) {
|
41 |
$this->run_cache_purge();
|
42 |
-
do_action('blocksy:dynamic-css:
|
43 |
}
|
44 |
}
|
45 |
}
|
26 |
if ($options['type'] === 'theme') {
|
27 |
if (in_array('blocksy', $options['themes'])) {
|
28 |
$this->run_cache_purge();
|
29 |
+
do_action('blocksy:dynamic-css:refresh-caches');
|
30 |
}
|
31 |
}
|
32 |
|
39 |
|
40 |
if (in_array(BLOCKSY_PLUGIN_BASE, $plugins)) {
|
41 |
$this->run_cache_purge();
|
42 |
+
do_action('blocksy:dynamic-css:refresh-caches');
|
43 |
}
|
44 |
}
|
45 |
}
|
framework/dashboard.php
CHANGED
@@ -110,7 +110,14 @@ class Dashboard {
|
|
110 |
'connect_template' => $connect_template
|
111 |
];
|
112 |
|
113 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
$result['has_beta_consent'] = Plugin::instance()->premium->user_wants_beta_updates();
|
115 |
}
|
116 |
|
@@ -141,7 +148,7 @@ class Dashboard {
|
|
141 |
|
142 |
wp_enqueue_style(
|
143 |
'blocksy-dashboard-styles',
|
144 |
-
BLOCKSY_URL . 'static/bundle/dashboard.css',
|
145 |
[],
|
146 |
$data['Version']
|
147 |
);
|
110 |
'connect_template' => $connect_template
|
111 |
];
|
112 |
|
113 |
+
if (
|
114 |
+
Plugin::instance()->premium
|
115 |
+
&&
|
116 |
+
is_callable([
|
117 |
+
Plugin::instance()->premium,
|
118 |
+
'user_wants_beta_updates'
|
119 |
+
])
|
120 |
+
) {
|
121 |
$result['has_beta_consent'] = Plugin::instance()->premium->user_wants_beta_updates();
|
122 |
}
|
123 |
|
148 |
|
149 |
wp_enqueue_style(
|
150 |
'blocksy-dashboard-styles',
|
151 |
+
BLOCKSY_URL . 'static/bundle/dashboard.min.css',
|
152 |
[],
|
153 |
$data['Version']
|
154 |
);
|
framework/extensions-manager.php
CHANGED
@@ -146,7 +146,7 @@ class ExtensionsManager
|
|
146 |
|
147 |
$activated[] = strtolower( $id );
|
148 |
update_option( $this->get_option_name(), array_unique( $activated ) );
|
149 |
-
|
150 |
}
|
151 |
|
152 |
public function deactivate_extension( $id )
|
@@ -164,7 +164,7 @@ class ExtensionsManager
|
|
164 |
}
|
165 |
}
|
166 |
update_option( $this->get_option_name(), array_diff( $activated, [ $id ] ) );
|
167 |
-
|
168 |
}
|
169 |
|
170 |
private function read_installed_extensions()
|
146 |
|
147 |
$activated[] = strtolower( $id );
|
148 |
update_option( $this->get_option_name(), array_unique( $activated ) );
|
149 |
+
do_action( 'blocksy:dynamic-css:refresh-caches' );
|
150 |
}
|
151 |
|
152 |
public function deactivate_extension( $id )
|
164 |
}
|
165 |
}
|
166 |
update_option( $this->get_option_name(), array_diff( $activated, [ $id ] ) );
|
167 |
+
do_action( 'blocksy:dynamic-css:refresh-caches' );
|
168 |
}
|
169 |
|
170 |
private function read_installed_extensions()
|
framework/extensions/cookies-consent/extension.php
CHANGED
@@ -35,7 +35,7 @@ class BlocksyExtensionCookiesConsent {
|
|
35 |
wp_enqueue_script(
|
36 |
'blocksy-cookies-consent-customizer-sync',
|
37 |
BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/sync.js',
|
38 |
-
[ 'ct-
|
39 |
$data['Version'],
|
40 |
true
|
41 |
);
|
@@ -55,7 +55,7 @@ class BlocksyExtensionCookiesConsent {
|
|
55 |
|
56 |
wp_enqueue_style(
|
57 |
'blocksy-ext-cookies-consent-styles',
|
58 |
-
BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/main.css',
|
59 |
['ct-main-styles'],
|
60 |
$data['Version']
|
61 |
);
|
@@ -63,7 +63,7 @@ class BlocksyExtensionCookiesConsent {
|
|
63 |
wp_enqueue_script(
|
64 |
'blocksy-ext-cookies-consent-scripts',
|
65 |
BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/main.js',
|
66 |
-
['ct-
|
67 |
$data['Version'],
|
68 |
true
|
69 |
);
|
35 |
wp_enqueue_script(
|
36 |
'blocksy-cookies-consent-customizer-sync',
|
37 |
BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/sync.js',
|
38 |
+
[ 'ct-scripts', 'customize-preview' ],
|
39 |
$data['Version'],
|
40 |
true
|
41 |
);
|
55 |
|
56 |
wp_enqueue_style(
|
57 |
'blocksy-ext-cookies-consent-styles',
|
58 |
+
BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/main.min.css',
|
59 |
['ct-main-styles'],
|
60 |
$data['Version']
|
61 |
);
|
63 |
wp_enqueue_script(
|
64 |
'blocksy-ext-cookies-consent-scripts',
|
65 |
BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/main.js',
|
66 |
+
['ct-scripts'],
|
67 |
$data['Version'],
|
68 |
true
|
69 |
);
|
framework/extensions/cookies-consent/readme.php
CHANGED
@@ -19,20 +19,4 @@
|
|
19 |
?>
|
20 |
</i>
|
21 |
</li>
|
22 |
-
</ul>
|
23 |
-
|
24 |
-
<div class="extension-notice">
|
25 |
-
<h4><?php echo __('Known problems with caching plugins', 'blc'); ?></h4>
|
26 |
-
|
27 |
-
<p>
|
28 |
-
<?php
|
29 |
-
echo sprintf(
|
30 |
-
__('Please read %s to find out more information.', 'blc'),
|
31 |
-
sprintf(
|
32 |
-
'<a href="https://creativethemes.com/blocksy/docs/extensions/cookies-consent/#cache/">%s</a>',
|
33 |
-
__('this article', 'blc')
|
34 |
-
)
|
35 |
-
);
|
36 |
-
?>
|
37 |
-
</p>
|
38 |
-
</div>
|
19 |
?>
|
20 |
</i>
|
21 |
</li>
|
22 |
+
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
framework/extensions/cookies-consent/static/bundle/{main.css → main.min.css}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.1
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/mailchimp/extension.php
CHANGED
@@ -78,18 +78,30 @@ class BlocksyExtensionMailchimp {
|
|
78 |
|
79 |
wp_enqueue_style(
|
80 |
'blocksy-ext-newsletter-subscribe-styles',
|
81 |
-
BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.css',
|
82 |
['ct-main-styles'],
|
83 |
$data['Version']
|
84 |
);
|
|
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
});
|
94 |
|
95 |
add_filter('blocksy_widgets_paths', function ($all_widgets) {
|
@@ -132,7 +144,7 @@ class BlocksyExtensionMailchimp {
|
|
132 |
wp_enqueue_script(
|
133 |
'blocksy-newsletter-subscribe-customizer-sync',
|
134 |
BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/sync.js',
|
135 |
-
[ 'customize-preview', 'ct-
|
136 |
$data['Version'],
|
137 |
true
|
138 |
);
|
78 |
|
79 |
wp_enqueue_style(
|
80 |
'blocksy-ext-newsletter-subscribe-styles',
|
81 |
+
BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.min.css',
|
82 |
['ct-main-styles'],
|
83 |
$data['Version']
|
84 |
);
|
85 |
+
});
|
86 |
|
87 |
+
add_filter('blocksy:frontend:dynamic-js-chunks', function ($chunks) {
|
88 |
+
$chunks[] = [
|
89 |
+
'id' => 'blocksy_ext_mailchimp',
|
90 |
+
'selector' => implode(', ', [
|
91 |
+
'.ct-mailchimp-widget-form:not([data-skip-submit])',
|
92 |
+
'.ct-mailchimp-block-form:not([data-skip-submit])'
|
93 |
+
]),
|
94 |
+
'url' => blc_call_fn(
|
95 |
+
[
|
96 |
+
'fn' => 'blocksy_cdn_url',
|
97 |
+
'default' => BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.js'
|
98 |
+
],
|
99 |
+
BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.js'
|
100 |
+
),
|
101 |
+
'trigger' => 'submit'
|
102 |
+
];
|
103 |
+
|
104 |
+
return $chunks;
|
105 |
});
|
106 |
|
107 |
add_filter('blocksy_widgets_paths', function ($all_widgets) {
|
144 |
wp_enqueue_script(
|
145 |
'blocksy-newsletter-subscribe-customizer-sync',
|
146 |
BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/sync.js',
|
147 |
+
[ 'customize-preview', 'ct-scripts' ],
|
148 |
$data['Version'],
|
149 |
true
|
150 |
);
|
framework/extensions/mailchimp/mailchimp-manager.php
CHANGED
@@ -51,18 +51,23 @@ class BlocksyMailchimpManager {
|
|
51 |
|
52 |
$region = explode('-', $api_key);
|
53 |
|
54 |
-
$response = wp_remote_get(
|
55 |
-
'
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
57 |
]
|
58 |
-
|
59 |
|
60 |
-
if (
|
61 |
-
if (
|
62 |
return 'api_key_invalid';
|
63 |
}
|
64 |
|
65 |
-
$body = json_decode(wp_remote_retrieve_body(
|
66 |
|
67 |
if (! $body) {
|
68 |
return 'api_key_invalid';
|
51 |
|
52 |
$region = explode('-', $api_key);
|
53 |
|
54 |
+
$response = wp_remote_get(
|
55 |
+
'https://' . $region[1] . '.api.mailchimp.com/3.0/lists',
|
56 |
+
[
|
57 |
+
'headers' => [
|
58 |
+
'Authorization' => 'Basic ' . base64_encode(
|
59 |
+
'asd:' . $api_key
|
60 |
+
)
|
61 |
+
]
|
62 |
]
|
63 |
+
);
|
64 |
|
65 |
+
if (! is_wp_error($response)) {
|
66 |
+
if (200 !== wp_remote_retrieve_response_code($response)) {
|
67 |
return 'api_key_invalid';
|
68 |
}
|
69 |
|
70 |
+
$body = json_decode(wp_remote_retrieve_body($response), true);
|
71 |
|
72 |
if (! $body) {
|
73 |
return 'api_key_invalid';
|
framework/extensions/mailchimp/static/bundle/main.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var n=r(0);
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var n=r(0);Object(n.registerDynamicChunk)("blocksy_ext_mailchimp",{mount:function(e,t){var r=t.event.target;if(r.querySelector('[type="email"]').value.trim()){if(document.getElementById("js-validate-robot")&&""!==document.getElementById("js-validate-robot").value)return!1;for(var n=r.action.replace("subscribe","subscribe/post-json"),o="",c="mailchimpCallback",i=r.querySelectorAll("input"),u=0;u<i.length;u++)o+="&"+i[u].name+"="+encodeURIComponent(i[u].value);o+="&c=".concat(c);var s=document.createElement("script");s.src=n+o,document.body.appendChild(s),r.classList.remove("subscribe-error","subscribe-success"),r.classList.add("subscribe-loading"),window[c]=function(e){delete window[c],document.body.removeChild(s),r.classList.remove("subscribe-loading"),e&&(r.classList.add("error"===e.result?"subscribe-error":"subscribe-success"),r.querySelector(".ct-mailchimp-message").innerHTML=e.msg.replace("0 - ",""))}}}})}]);
|
framework/extensions/mailchimp/static/bundle/{main.css → main.min.css}
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
/**
|
2 |
-
* - v1.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
-
.ct-widget-inner[data-alignment="center"]{text-align:center}.ct-widget-inner[data-alignment="right"]{text-align:right}.ct-widget-inner[data-container="boxed"]{padding:30px;background:#fff;border-radius:3px;box-shadow:0px 12px 18px -6px rgba(34,56,101,0.04)}.ct-mailchimp-widget-form .ct-mailchimp-description:not(:empty){margin-bottom:10px}.ct-mailchimp-widget-form>*:not(:first-child){margin-top:10px}.ct-mailchimp-widget-form button{width:100%}.ct-mailchimp-widget-form .gdpr-confirm-policy{--display: inline-flex;--contentSpacing: 0;margin-top:20px}.ct-mailchimp-block{margin-top:60px;text-align:center;color:var(--color);padding:var(--padding);background:var(--backgroundColor);box-shadow:var(--box-shadow);--linkInitialColor: var(--color)}.ct-mailchimp-block>*:first-child{margin-top:20px}.ct-mailchimp-block>*:last-child{margin-bottom:20px}.ct-mailchimp-block>h3{--fontSize: 25px}.ct-mailchimp-block .ct-mailchimp-description:not(:empty){margin-bottom:30px}.ct-mailchimp-block form{max-width:550px;margin:0 auto}@media (min-width: 690px){.ct-mailchimp-block form{width:85%}}.ct-mailchimp-block form button{--buttonMinHeight: var(--
|
1 |
/**
|
2 |
+
* - v1.8.1
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
+
.ct-widget-inner[data-alignment="center"]{text-align:center}.ct-widget-inner[data-alignment="right"]{text-align:right}.ct-widget-inner[data-container="boxed"]{padding:30px;background:#fff;border-radius:3px;box-shadow:0px 12px 18px -6px rgba(34,56,101,0.04)}.ct-mailchimp-widget-form .ct-mailchimp-description:not(:empty){margin-bottom:10px}.ct-mailchimp-widget-form>*:not(:first-child){margin-top:10px}.ct-mailchimp-widget-form button{width:100%}.ct-mailchimp-widget-form .gdpr-confirm-policy{--display: inline-flex;--contentSpacing: 0;margin-top:20px}.ct-mailchimp-block{margin-top:60px;text-align:center;color:var(--color);padding:var(--padding);background:var(--backgroundColor);box-shadow:var(--box-shadow);--linkInitialColor: var(--color)}.ct-mailchimp-block>*:first-child{margin-top:20px}.ct-mailchimp-block>*:last-child{margin-bottom:20px}.ct-mailchimp-block>h3{--fontSize: 25px}.ct-mailchimp-block .ct-mailchimp-description:not(:empty){margin-bottom:30px}.ct-mailchimp-block form{max-width:550px;margin:0 auto}@media (min-width: 690px){.ct-mailchimp-block form{width:85%}}.ct-mailchimp-block form button{--buttonMinHeight: var(--form-field-height, 40px);--padding: 0 15px;width:100%}.ct-mailchimp-block form [data-fields]{display:grid;grid-column-gap:15px;grid-row-gap:15px}@media (min-width: 690px){.ct-mailchimp-block form [data-fields="1"]{grid-template-columns:65% 1fr}}@media (min-width: 690px){.ct-mailchimp-block form [data-fields="2"]{grid-template-columns:32.5% 32.5% 1fr}}.ct-mailchimp-block .ct-mailchimp-message,.ct-mailchimp-block .gdpr-confirm-policy{margin-top:15px;--contentSpacing: 0}form[class*='ct-mailchimp'] .button{--buttonFontWeight: 600}.ct-mailchimp-message{display:none;font-size:16px}.ct-mailchimp-message a{text-decoration:underline}.subscribe-error .ct-mailchimp-message{display:block;font-size:14px;color:#e42b2b}.subscribe-success button.button,.subscribe-success input[type='text'],.subscribe-success input[type='email'],.subscribe-success .gdpr-confirm-policy,.subscribe-success .ct-mailchimp-description{display:none}.subscribe-success .ct-mailchimp-message{display:block}
|
framework/extensions/mailchimp/static/js/main.js
CHANGED
@@ -1,82 +1,68 @@
|
|
1 |
-
import {
|
2 |
-
|
3 |
-
onDocumentLoaded(() => {
|
4 |
-
;[
|
5 |
-
...document.querySelectorAll(
|
6 |
-
'.ct-mailchimp-widget-form, .ct-mailchimp-block-form'
|
7 |
-
),
|
8 |
-
].map((el) => {
|
9 |
-
if (el.matches('[data-skip-submit]')) {
|
10 |
-
return
|
11 |
-
}
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
|
35 |
-
|
36 |
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
'=' +
|
44 |
-
encodeURIComponent(inputs[i].value)
|
45 |
-
}
|
46 |
|
47 |
-
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
-
|
54 |
|
55 |
-
|
56 |
-
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
})
|
82 |
})
|
1 |
+
import { registerDynamicChunk } from 'blocksy-frontend'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
registerDynamicChunk('blocksy_ext_mailchimp', {
|
4 |
+
mount: (el, { event }) => {
|
5 |
+
const form = event.target
|
6 |
|
7 |
+
if (!form.querySelector('[type="email"]').value.trim()) {
|
8 |
+
return
|
9 |
+
}
|
10 |
|
11 |
+
// Check for spam
|
12 |
+
if (
|
13 |
+
document.getElementById('js-validate-robot') &&
|
14 |
+
document.getElementById('js-validate-robot').value !== ''
|
15 |
+
) {
|
16 |
+
return false
|
17 |
+
}
|
18 |
|
19 |
+
// Get url for mailchimp
|
20 |
+
var url = form.action.replace('subscribe', 'subscribe/post-json')
|
21 |
|
22 |
+
// Add form data to object
|
23 |
+
var data = ''
|
24 |
|
25 |
+
var callback = 'mailchimpCallback'
|
26 |
|
27 |
+
var inputs = form.querySelectorAll('input')
|
28 |
|
29 |
+
for (var i = 0; i < inputs.length; i++) {
|
30 |
+
data +=
|
31 |
+
'&' + inputs[i].name + '=' + encodeURIComponent(inputs[i].value)
|
32 |
+
}
|
|
|
|
|
|
|
33 |
|
34 |
+
data += `&c=${callback}`
|
35 |
|
36 |
+
// Create & add post script to the DOM
|
37 |
+
var script = document.createElement('script')
|
38 |
+
script.src = url + data
|
39 |
|
40 |
+
document.body.appendChild(script)
|
41 |
|
42 |
+
form.classList.remove('subscribe-error', 'subscribe-success')
|
43 |
+
form.classList.add('subscribe-loading')
|
44 |
|
45 |
+
// Callback function
|
46 |
+
window[callback] = function (data) {
|
47 |
+
// Remove post script from the DOM
|
48 |
+
delete window[callback]
|
49 |
+
document.body.removeChild(script)
|
50 |
|
51 |
+
form.classList.remove('subscribe-loading')
|
52 |
|
53 |
+
if (!data) {
|
54 |
+
return
|
55 |
+
}
|
56 |
|
57 |
+
form.classList.add(
|
58 |
+
data.result === 'error'
|
59 |
+
? 'subscribe-error'
|
60 |
+
: 'subscribe-success'
|
61 |
+
)
|
62 |
|
63 |
+
form.querySelector(
|
64 |
+
'.ct-mailchimp-message'
|
65 |
+
).innerHTML = data.msg.replace('0 - ', '')
|
66 |
+
}
|
67 |
+
},
|
|
|
68 |
})
|
framework/extensions/mailchimp/static/sass/main.scss
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
@import 'widget';
|
3 |
@import 'single-block';
|
4 |
|
5 |
-
|
6 |
-
form[class*="ct-mailchimp"] {
|
7 |
.button {
|
8 |
--buttonFontWeight: 600;
|
9 |
}
|
@@ -27,8 +26,8 @@ form[class*="ct-mailchimp"] {
|
|
27 |
|
28 |
.subscribe-success {
|
29 |
button.button,
|
30 |
-
input[type=
|
31 |
-
input[type=
|
32 |
.gdpr-confirm-policy,
|
33 |
.ct-mailchimp-description {
|
34 |
display: none;
|
@@ -37,4 +36,4 @@ form[class*="ct-mailchimp"] {
|
|
37 |
.ct-mailchimp-message {
|
38 |
display: block;
|
39 |
}
|
40 |
-
}
|
2 |
@import 'widget';
|
3 |
@import 'single-block';
|
4 |
|
5 |
+
form[class*='ct-mailchimp'] {
|
|
|
6 |
.button {
|
7 |
--buttonFontWeight: 600;
|
8 |
}
|
26 |
|
27 |
.subscribe-success {
|
28 |
button.button,
|
29 |
+
input[type='text'],
|
30 |
+
input[type='email'],
|
31 |
.gdpr-confirm-policy,
|
32 |
.ct-mailchimp-description {
|
33 |
display: none;
|
36 |
.ct-mailchimp-message {
|
37 |
display: block;
|
38 |
}
|
39 |
+
}
|
framework/extensions/mailchimp/static/sass/single-block.scss
CHANGED
@@ -37,7 +37,7 @@
|
|
37 |
}
|
38 |
|
39 |
button {
|
40 |
-
--buttonMinHeight: var(--
|
41 |
--padding: 0 15px;
|
42 |
width: 100%;
|
43 |
}
|
37 |
}
|
38 |
|
39 |
button {
|
40 |
+
--buttonMinHeight: var(--form-field-height, 40px);
|
41 |
--padding: 0 15px;
|
42 |
width: 100%;
|
43 |
}
|
framework/extensions/product-reviews/extension.php
CHANGED
@@ -94,7 +94,7 @@ class BlocksyExtensionProductReviews {
|
|
94 |
}, 10, 2);
|
95 |
|
96 |
add_action(
|
97 |
-
'blocksy:
|
98 |
function () {
|
99 |
if (! is_singular('blc-product-review')) {
|
100 |
return;
|
@@ -121,7 +121,7 @@ class BlocksyExtensionProductReviews {
|
|
121 |
|
122 |
wp_enqueue_style(
|
123 |
'blocksy-ext-product-reviews-styles',
|
124 |
-
BLOCKSY_URL . 'framework/extensions/product-reviews/static/bundle/main.css',
|
125 |
['ct-main-styles'],
|
126 |
$data['Version']
|
127 |
);
|
94 |
}, 10, 2);
|
95 |
|
96 |
add_action(
|
97 |
+
'blocksy:template:before',
|
98 |
function () {
|
99 |
if (! is_singular('blc-product-review')) {
|
100 |
return;
|
121 |
|
122 |
wp_enqueue_style(
|
123 |
'blocksy-ext-product-reviews-styles',
|
124 |
+
BLOCKSY_URL . 'framework/extensions/product-reviews/static/bundle/main.min.css',
|
125 |
['ct-main-styles'],
|
126 |
$data['Version']
|
127 |
);
|
framework/extensions/product-reviews/metabox.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
$options = [
|
4 |
|
5 |
blocksy_rand_md5() => [
|
6 |
-
'title' => __( 'General', '
|
7 |
'type' => 'tab',
|
8 |
'options' => [
|
9 |
|
@@ -32,6 +32,12 @@ $options = [
|
|
32 |
'value' => '#'
|
33 |
],
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/*
|
36 |
'product_button_icon' => [
|
37 |
'type' => 'icon-picker',
|
@@ -80,7 +86,7 @@ $options = [
|
|
80 |
],
|
81 |
|
82 |
blocksy_rand_md5() => [
|
83 |
-
'title' => __( 'Rating', '
|
84 |
'type' => 'tab',
|
85 |
'options' => [
|
86 |
|
@@ -188,7 +194,7 @@ $options = [
|
|
188 |
],
|
189 |
|
190 |
// blocksy_rand_md5() => [
|
191 |
-
// 'title' => __( 'Design', '
|
192 |
// 'type' => 'tab',
|
193 |
// 'options' => [
|
194 |
|
3 |
$options = [
|
4 |
|
5 |
blocksy_rand_md5() => [
|
6 |
+
'title' => __( 'General', 'blc' ),
|
7 |
'type' => 'tab',
|
8 |
'options' => [
|
9 |
|
32 |
'value' => '#'
|
33 |
],
|
34 |
|
35 |
+
'product_link_target' => [
|
36 |
+
'label' => __( 'Open Link In New Tab', 'blc' ),
|
37 |
+
'type' => 'ct-switch',
|
38 |
+
'value' => 'no',
|
39 |
+
],
|
40 |
+
|
41 |
/*
|
42 |
'product_button_icon' => [
|
43 |
'type' => 'icon-picker',
|
86 |
],
|
87 |
|
88 |
blocksy_rand_md5() => [
|
89 |
+
'title' => __( 'Rating', 'blc' ),
|
90 |
'type' => 'tab',
|
91 |
'options' => [
|
92 |
|
194 |
],
|
195 |
|
196 |
// blocksy_rand_md5() => [
|
197 |
+
// 'title' => __( 'Design', 'blc' ),
|
198 |
// 'type' => 'tab',
|
199 |
// 'options' => [
|
200 |
|
framework/extensions/product-reviews/pre-boot.php
CHANGED
@@ -21,7 +21,7 @@ class BlocksyExtensionProductReviewsPreBoot {
|
|
21 |
|
22 |
wp_enqueue_style(
|
23 |
'blocksy-ext-product-reviews-admin-dashboard-styles',
|
24 |
-
BLOCKSY_URL . 'framework/extensions/product-reviews/static/bundle/main-admin.css',
|
25 |
[],
|
26 |
$data['Version']
|
27 |
);
|
21 |
|
22 |
wp_enqueue_style(
|
23 |
'blocksy-ext-product-reviews-admin-dashboard-styles',
|
24 |
+
BLOCKSY_URL . 'framework/extensions/product-reviews/static/bundle/main-admin.min.css',
|
25 |
[],
|
26 |
$data['Version']
|
27 |
);
|
framework/extensions/product-reviews/static/bundle/{main-admin.css → main-admin.min.css}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.1
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/static/bundle/{main.css → main.min.css}
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.1
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/views/single-top.php
CHANGED
@@ -16,6 +16,12 @@ if ($thumb_id) {
|
|
16 |
$gallery_images = [];
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
echo '<section class="ct-product-hero">';
|
20 |
echo '<div class="ct-container">';
|
21 |
if (count($gallery_images) === 1) {
|
@@ -147,7 +153,7 @@ if (! empty($product_button_label)) {
|
|
147 |
}
|
148 |
|
149 |
if (! empty($product_button_label) && ! empty($product_link)) {
|
150 |
-
echo '<a href="' . esc_url($product_link) . '" class="ct-button">';
|
151 |
echo $product_button_label;
|
152 |
|
153 |
/*
|
16 |
$gallery_images = [];
|
17 |
}
|
18 |
|
19 |
+
$target_output = '';
|
20 |
+
|
21 |
+
if (blocksy_akg('product_link_target', $atts, 'no') === 'yes') {
|
22 |
+
$target_output = 'target="_blank" rel="noopener noreferrer"';
|
23 |
+
}
|
24 |
+
|
25 |
echo '<section class="ct-product-hero">';
|
26 |
echo '<div class="ct-container">';
|
27 |
if (count($gallery_images) === 1) {
|
153 |
}
|
154 |
|
155 |
if (! empty($product_button_label) && ! empty($product_link)) {
|
156 |
+
echo '<a href="' . esc_url($product_link) . '" class="ct-button" ' . wp_kses_post($target_output) . '>';
|
157 |
echo $product_button_label;
|
158 |
|
159 |
/*
|
framework/extensions/trending/config.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
$config = [
|
4 |
-
'
|
5 |
'description' => __('Display a trending list of posts, products or custom post types at the bottom of your website.', 'blc')
|
6 |
];
|
1 |
<?php
|
2 |
|
3 |
$config = [
|
4 |
+
'name' => __('Trending Posts', 'blc'),
|
5 |
'description' => __('Display a trending list of posts, products or custom post types at the bottom of your website.', 'blc')
|
6 |
];
|
framework/extensions/trending/customizer.php
CHANGED
@@ -39,98 +39,121 @@ $options = [
|
|
39 |
'title' => __( 'General', 'blc' ),
|
40 |
'type' => 'tab',
|
41 |
'options' => [
|
42 |
-
|
43 |
-
'
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
],
|
56 |
-
] : [
|
57 |
-
'label' => __('Post Type', 'blc'),
|
58 |
-
'type' => 'hidden',
|
59 |
-
'value' => 'post',
|
60 |
-
'design' => 'none',
|
61 |
-
'setting' => ['transport' => 'postMessage'],
|
62 |
-
],
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
'
|
82 |
-
'render' => function () {
|
83 |
-
echo blocksy_get_trending_block();
|
84 |
-
}
|
85 |
],
|
86 |
-
],
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
'mobile' => '30px',
|
97 |
-
'tablet' => '30px',
|
98 |
-
'desktop' => '30px',
|
99 |
-
],
|
100 |
-
'units' => blocksy_units_config([
|
101 |
-
[
|
102 |
-
'unit' => 'px',
|
103 |
-
'min' => 0,
|
104 |
-
'max' => 100,
|
105 |
],
|
106 |
-
]),
|
107 |
-
'responsive' => true,
|
108 |
-
'sync' => 'live',
|
109 |
-
],
|
110 |
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
113 |
],
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
'
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
],
|
126 |
|
127 |
-
'
|
128 |
-
'
|
129 |
-
'
|
130 |
-
'
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
],
|
135 |
],
|
136 |
|
@@ -191,12 +214,28 @@ $options = [
|
|
191 |
'value' => blocksy_background_default_value([
|
192 |
'backgroundColor' => [
|
193 |
'default' => [
|
194 |
-
'color' => '
|
195 |
],
|
196 |
],
|
197 |
])
|
198 |
],
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
],
|
201 |
],
|
202 |
]
|
39 |
'title' => __( 'General', 'blc' ),
|
40 |
'type' => 'tab',
|
41 |
'options' => [
|
42 |
+
[
|
43 |
+
'trending_block_post_type' => count($all_post_types) > 1 ? [
|
44 |
+
'label' => __( 'Post Type', 'blc' ),
|
45 |
+
'type' => 'ct-select',
|
46 |
+
'value' => 'post',
|
47 |
+
'design' => 'inline',
|
48 |
+
'setting' => [ 'transport' => 'postMessage' ],
|
49 |
+
'choices' => blocksy_ordered_keys($all_post_types),
|
50 |
+
'sync' => [
|
51 |
+
'selector' => '.ct-trending-block',
|
52 |
+
'render' => function () {
|
53 |
+
echo blc_get_trending_block();
|
54 |
+
}
|
55 |
+
],
|
56 |
+
] : [
|
57 |
+
'label' => __('Post Type', 'blc'),
|
58 |
+
'type' => 'hidden',
|
59 |
+
'value' => 'post',
|
60 |
+
'design' => 'none',
|
61 |
+
'setting' => ['transport' => 'postMessage'],
|
62 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
'trending_block_filter' => [
|
65 |
+
'label' => __( 'Trending From', 'blc' ),
|
66 |
+
'type' => 'ct-select',
|
67 |
+
'divider' => 'top',
|
68 |
+
'value' => 'all_time',
|
69 |
+
'view' => 'text',
|
70 |
+
'design' => 'inline',
|
71 |
+
'setting' => [ 'transport' => 'postMessage' ],
|
72 |
+
'choices' => blocksy_ordered_keys(
|
73 |
+
[
|
74 |
+
'all_time' => __( 'All Time', 'blc' ),
|
75 |
+
'last_24_hours' => __( 'Last 24 Hours', 'blc' ),
|
76 |
+
'last_7_days' => __( 'Last 7 Days', 'blc' ),
|
77 |
+
'last_month' => __( 'Last Month', 'blc' ),
|
78 |
+
]
|
79 |
+
),
|
80 |
+
|
81 |
+
'sync' => [
|
82 |
+
'selector' => '.ct-trending-block',
|
83 |
+
'render' => function () {
|
84 |
+
echo blocksy_get_trending_block();
|
85 |
+
}
|
86 |
+
],
|
87 |
+
],
|
88 |
|
89 |
+
blocksy_rand_md5() => [
|
90 |
+
'type' => 'ct-divider',
|
|
|
|
|
|
|
91 |
],
|
|
|
92 |
|
93 |
+
'trending_block_visibility' => [
|
94 |
+
'label' => __( 'Container Visibility', 'blc' ),
|
95 |
+
'type' => 'ct-visibility',
|
96 |
+
'design' => 'block',
|
97 |
+
'sync' => 'live',
|
98 |
|
99 |
+
'value' => [
|
100 |
+
'desktop' => true,
|
101 |
+
'tablet' => true,
|
102 |
+
'mobile' => false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
],
|
|
|
|
|
|
|
|
|
104 |
|
105 |
+
'choices' => blocksy_ordered_keys([
|
106 |
+
'desktop' => __( 'Desktop', 'blc' ),
|
107 |
+
'tablet' => __( 'Tablet', 'blc' ),
|
108 |
+
'mobile' => __( 'Mobile', 'blc' ),
|
109 |
+
]),
|
110 |
+
],
|
111 |
],
|
112 |
|
113 |
+
blc_fs()->is__premium_only() ? [
|
114 |
+
|
115 |
+
'trending_block_location' => [
|
116 |
+
'label' => __('Display Location', 'blc'),
|
117 |
+
'type' => 'ct-select',
|
118 |
+
'design' => 'inline',
|
119 |
+
'divider' => 'top',
|
120 |
+
'value' => 'blocksy:content:bottom',
|
121 |
+
'choices' => [
|
122 |
+
[
|
123 |
+
'key' => 'blocksy:content:bottom',
|
124 |
+
'value' => __('Before Footer', 'blc')
|
125 |
+
],
|
126 |
|
127 |
+
[
|
128 |
+
'key' => 'blocksy:footer:after',
|
129 |
+
'value' => __('After Footer', 'blc')
|
130 |
+
],
|
131 |
+
|
132 |
+
[
|
133 |
+
'key' => 'blocksy:header:after',
|
134 |
+
'value' => __('After Header', 'blc')
|
135 |
+
]
|
136 |
+
]
|
137 |
],
|
138 |
|
139 |
+
'trending_block_conditions' => [
|
140 |
+
'label' => __('Display Conditions', 'blc'),
|
141 |
+
'type' => 'blocksy-display-condition',
|
142 |
+
'divider' => 'top',
|
143 |
+
'value' => [
|
144 |
+
[
|
145 |
+
'type' => 'include',
|
146 |
+
'rule' => 'everywhere',
|
147 |
+
]
|
148 |
+
],
|
149 |
+
'display' => 'modal',
|
150 |
|
151 |
+
'modalTitle' => __('Trending Block Display Conditions', 'blc'),
|
152 |
+
'modalDescription' => __('Add one or more conditions to display the trending block.', 'blc'),
|
153 |
+
'design' => 'block',
|
154 |
+
'sync' => 'live'
|
155 |
+
],
|
156 |
+
] : [],
|
157 |
],
|
158 |
],
|
159 |
|
214 |
'value' => blocksy_background_default_value([
|
215 |
'backgroundColor' => [
|
216 |
'default' => [
|
217 |
+
'color' => 'var(--paletteColor5)',
|
218 |
],
|
219 |
],
|
220 |
])
|
221 |
],
|
222 |
|
223 |
+
'trendingBlockContainerSpacing' => [
|
224 |
+
'label' => __( 'Container Inner Spacing', 'blc' ),
|
225 |
+
'type' => 'ct-slider',
|
226 |
+
'divider' => 'top',
|
227 |
+
'value' => '30px',
|
228 |
+
'units' => blocksy_units_config([
|
229 |
+
[
|
230 |
+
'unit' => 'px',
|
231 |
+
'min' => 0,
|
232 |
+
'max' => 100,
|
233 |
+
],
|
234 |
+
]),
|
235 |
+
'responsive' => true,
|
236 |
+
'sync' => 'live',
|
237 |
+
],
|
238 |
+
|
239 |
],
|
240 |
],
|
241 |
]
|
framework/extensions/trending/extension.php
CHANGED
@@ -1,76 +1,79 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require_once dirname(__FILE__) . '/helpers.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
public function __construct() {
|
7 |
-
add_action('wp_enqueue_scripts', function () {
|
8 |
-
if (! function_exists('get_plugin_data')) {
|
9 |
-
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
10 |
-
}
|
11 |
-
|
12 |
-
$data = get_plugin_data(BLOCKSY__FILE__);
|
13 |
-
|
14 |
-
if (is_admin()) {
|
15 |
-
return;
|
16 |
-
}
|
17 |
-
|
18 |
-
wp_enqueue_script(
|
19 |
-
'blocksy-ext-trending-scripts',
|
20 |
-
BLOCKSY_URL . 'framework/extensions/trending/static/bundle/main.js',
|
21 |
-
['ct-events', 'ct-scripts'],
|
22 |
-
$data['Version'],
|
23 |
-
true
|
24 |
-
);
|
25 |
-
});
|
26 |
-
|
27 |
-
add_filter(
|
28 |
-
'blocksy_extensions_customizer_options',
|
29 |
-
function ($opts) {
|
30 |
-
$opts['trending_posts_ext'] = blc_call_fn(
|
31 |
-
[
|
32 |
-
'fn' => 'blocksy_get_options',
|
33 |
-
'default' => 'array'
|
34 |
-
],
|
35 |
-
dirname( __FILE__ ) . '/customizer.php',
|
36 |
-
[], false
|
37 |
-
);
|
38 |
-
|
39 |
-
return $opts;
|
40 |
-
}
|
41 |
-
);
|
42 |
-
|
43 |
-
add_action(
|
44 |
-
'blocksy:template:after',
|
45 |
-
function () {
|
46 |
-
echo blc_get_trending_block();
|
47 |
-
}
|
48 |
-
);
|
49 |
-
|
50 |
-
add_action(
|
51 |
-
'customize_preview_init',
|
52 |
-
function () {
|
53 |
-
if (! function_exists('get_plugin_data')) {
|
54 |
-
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
55 |
-
}
|
56 |
-
|
57 |
-
$data = get_plugin_data(BLOCKSY__FILE__);
|
58 |
-
|
59 |
-
wp_enqueue_script(
|
60 |
-
'blocksy-trending-customizer-sync',
|
61 |
-
BLOCKSY_URL . 'framework/extensions/trending/static/bundle/sync.js',
|
62 |
-
['customize-preview', 'ct-events', 'ct-customizer'],
|
63 |
-
$data['Version'],
|
64 |
-
true
|
65 |
-
);
|
66 |
-
}
|
67 |
-
);
|
68 |
-
|
69 |
-
add_action('blocksy:global-dynamic-css:enqueue', function ($args) {
|
70 |
-
blocksy_theme_get_dynamic_styles(array_merge([
|
71 |
-
'path' => dirname( __FILE__ ) . '/global.php',
|
72 |
-
'chunk' => 'global'
|
73 |
-
], $args));
|
74 |
-
}, 10, 3);
|
75 |
-
}
|
76 |
-
}
|
1 |
<?php
|
2 |
|
3 |
+
require_once dirname( __FILE__ ) . '/helpers.php';
|
4 |
+
class BlocksyExtensionTrending
|
5 |
+
{
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
add_action( 'wp_enqueue_scripts', function () {
|
9 |
+
if ( !function_exists( 'get_plugin_data' ) ) {
|
10 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
11 |
+
}
|
12 |
+
$data = get_plugin_data( BLOCKSY__FILE__ );
|
13 |
+
if ( is_admin() ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
wp_enqueue_style(
|
17 |
+
'blocksy-ext-trending-styles',
|
18 |
+
BLOCKSY_URL . 'framework/extensions/trending/static/bundle/main.min.css',
|
19 |
+
[ 'ct-main-styles' ],
|
20 |
+
$data['Version']
|
21 |
+
);
|
22 |
+
} );
|
23 |
+
add_filter( 'blocksy:frontend:dynamic-js-chunks', function ( $chunks ) {
|
24 |
+
$chunks[] = [
|
25 |
+
'id' => 'blocksy_ext_trending',
|
26 |
+
'selector' => '.ct-trending-block [class*="ct-arrow"]',
|
27 |
+
'url' => blc_call_fn( [
|
28 |
+
'fn' => 'blocksy_cdn_url',
|
29 |
+
'default' => BLOCKSY_URL . 'framework/extensions/trending/static/bundle/main.js',
|
30 |
+
], BLOCKSY_URL . 'framework/extensions/trending/static/bundle/main.js' ),
|
31 |
+
'trigger' => 'click',
|
32 |
+
];
|
33 |
+
return $chunks;
|
34 |
+
} );
|
35 |
+
add_filter( 'blocksy_extensions_customizer_options', function ( $opts ) {
|
36 |
+
$opts['trending_posts_ext'] = blc_call_fn(
|
37 |
+
[
|
38 |
+
'fn' => 'blocksy_get_options',
|
39 |
+
'default' => 'array',
|
40 |
+
],
|
41 |
+
dirname( __FILE__ ) . '/customizer.php',
|
42 |
+
[],
|
43 |
+
false
|
44 |
+
);
|
45 |
+
return $opts;
|
46 |
+
} );
|
47 |
+
add_action( 'wp', function () {
|
48 |
+
$location = 'blocksy:template:after';
|
49 |
+
add_action( $location, function () {
|
50 |
+
echo blc_get_trending_block() ;
|
51 |
+
}, 50 );
|
52 |
+
} );
|
53 |
+
add_action( 'customize_preview_init', function () {
|
54 |
+
if ( !function_exists( 'get_plugin_data' ) ) {
|
55 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
56 |
+
}
|
57 |
+
$data = get_plugin_data( BLOCKSY__FILE__ );
|
58 |
+
wp_enqueue_script(
|
59 |
+
'blocksy-trending-customizer-sync',
|
60 |
+
BLOCKSY_URL . 'framework/extensions/trending/static/bundle/sync.js',
|
61 |
+
[ 'customize-preview', 'ct-scripts', 'ct-customizer' ],
|
62 |
+
$data['Version'],
|
63 |
+
true
|
64 |
+
);
|
65 |
+
} );
|
66 |
+
add_action(
|
67 |
+
'blocksy:global-dynamic-css:enqueue',
|
68 |
+
function ( $args ) {
|
69 |
+
blocksy_theme_get_dynamic_styles( array_merge( [
|
70 |
+
'path' => dirname( __FILE__ ) . '/global.php',
|
71 |
+
'chunk' => 'global',
|
72 |
+
], $args ) );
|
73 |
+
},
|
74 |
+
10,
|
75 |
+
3
|
76 |
+
);
|
77 |
+
}
|
78 |
|
79 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
framework/extensions/trending/global.php
CHANGED
@@ -26,7 +26,7 @@ blc_call_fn(['fn' => 'blocksy_output_background_css'], [
|
|
26 |
], [
|
27 |
'backgroundColor' => [
|
28 |
'default' => [
|
29 |
-
'color' => '
|
30 |
],
|
31 |
],
|
32 |
])
|
@@ -34,19 +34,19 @@ blc_call_fn(['fn' => 'blocksy_output_background_css'], [
|
|
34 |
'responsive' => true,
|
35 |
]);
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
'
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
'
|
45 |
-
'
|
46 |
-
'
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
|
51 |
blc_call_fn(['fn' => 'blocksy_output_colors'], [
|
52 |
'value' => get_theme_mod('trendingBlockFontColor'),
|
26 |
], [
|
27 |
'backgroundColor' => [
|
28 |
'default' => [
|
29 |
+
'color' => 'var(--paletteColor5)'
|
30 |
],
|
31 |
],
|
32 |
])
|
34 |
'responsive' => true,
|
35 |
]);
|
36 |
|
37 |
+
$container_inner_spacing = get_theme_mod( 'trendingBlockContainerSpacing', '30px' );
|
38 |
+
|
39 |
+
if ($container_inner_spacing !== '30px') {
|
40 |
+
blc_call_fn(['fn' => 'blocksy_output_responsive'], [
|
41 |
+
'css' => $css,
|
42 |
+
'tablet_css' => $tablet_css,
|
43 |
+
'mobile_css' => $mobile_css,
|
44 |
+
'selector' => ".ct-trending-block",
|
45 |
+
'variableName' => 'padding',
|
46 |
+
'value' => $container_inner_spacing,
|
47 |
+
'unit' => ''
|
48 |
+
]);
|
49 |
+
}
|
50 |
|
51 |
blc_call_fn(['fn' => 'blocksy_output_colors'], [
|
52 |
'value' => get_theme_mod('trendingBlockFontColor'),
|
framework/extensions/trending/helpers.php
CHANGED
@@ -66,11 +66,12 @@ if (! function_exists('blc_get_trending_posts_value')) {
|
|
66 |
|
67 |
$post_type = get_theme_mod('trending_block_post_type', 'post');
|
68 |
|
69 |
-
if ($post_type === 'product' && !class_exists('WooCommerce')) {
|
70 |
$post_type = 'post';
|
71 |
}
|
72 |
|
73 |
-
$query = new WP_Query(
|
|
|
74 |
[
|
75 |
'post_type' => $post_type,
|
76 |
'order' => 'DESC',
|
@@ -81,7 +82,7 @@ if (! function_exists('blc_get_trending_posts_value')) {
|
|
81 |
'ignore_sticky_posts' => true,
|
82 |
'post_status' => 'publish'
|
83 |
]
|
84 |
-
);
|
85 |
|
86 |
if (! $query->have_posts()) {
|
87 |
return [
|
@@ -95,18 +96,27 @@ if (! function_exists('blc_get_trending_posts_value')) {
|
|
95 |
while ($query->have_posts()) {
|
96 |
$query->the_post();
|
97 |
|
98 |
-
$
|
99 |
'id' => get_the_ID(),
|
100 |
'attachment_id' => get_post_thumbnail_id(),
|
101 |
'title' => get_the_title(),
|
102 |
'url' => get_permalink(),
|
103 |
-
'image' =>
|
104 |
-
'attachment_id' => get_post_thumbnail_id(),
|
105 |
-
'size' => 'thumbnail',
|
106 |
-
'ratio' => '1/1',
|
107 |
-
'tag_name' => 'div',
|
108 |
-
])
|
109 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
$is_last = intval($query->max_num_pages) === intval($args['paged']);
|
@@ -147,9 +157,18 @@ function blc_get_trending_block($forced = false) {
|
|
147 |
])
|
148 |
);
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
?>
|
151 |
|
152 |
-
|
153 |
<div class="ct-container" <?php echo $data_page ?>>
|
154 |
<h5 class="ct-block-title">
|
155 |
<?php echo __('Trending now', 'blc') ?>
|
@@ -170,7 +189,7 @@ function blc_get_trending_block($forced = false) {
|
|
170 |
echo blocksy_html_tag(
|
171 |
'a',
|
172 |
[
|
173 |
-
'href' => $post['url']
|
174 |
],
|
175 |
|
176 |
$post['image'] . blocksy_html_tag(
|
66 |
|
67 |
$post_type = get_theme_mod('trending_block_post_type', 'post');
|
68 |
|
69 |
+
if ($post_type === 'product' && ! class_exists('WooCommerce')) {
|
70 |
$post_type = 'post';
|
71 |
}
|
72 |
|
73 |
+
$query = new WP_Query(apply_filters(
|
74 |
+
'blocksy:trending-posts:query-args',
|
75 |
[
|
76 |
'post_type' => $post_type,
|
77 |
'order' => 'DESC',
|
82 |
'ignore_sticky_posts' => true,
|
83 |
'post_status' => 'publish'
|
84 |
]
|
85 |
+
));
|
86 |
|
87 |
if (! $query->have_posts()) {
|
88 |
return [
|
96 |
while ($query->have_posts()) {
|
97 |
$query->the_post();
|
98 |
|
99 |
+
$individual_entry = [
|
100 |
'id' => get_the_ID(),
|
101 |
'attachment_id' => get_post_thumbnail_id(),
|
102 |
'title' => get_the_title(),
|
103 |
'url' => get_permalink(),
|
104 |
+
'image' => ''
|
|
|
|
|
|
|
|
|
|
|
105 |
];
|
106 |
+
|
107 |
+
if (get_post_thumbnail_id()) {
|
108 |
+
$individual_entry['image'] = blc_call_fn(
|
109 |
+
['fn' => 'blocksy_image'],
|
110 |
+
[
|
111 |
+
'attachment_id' => get_post_thumbnail_id(),
|
112 |
+
'size' => 'thumbnail',
|
113 |
+
'ratio' => '1/1',
|
114 |
+
'tag_name' => 'div',
|
115 |
+
]
|
116 |
+
);
|
117 |
+
}
|
118 |
+
|
119 |
+
$result[] = $individual_entry;
|
120 |
}
|
121 |
|
122 |
$is_last = intval($query->max_num_pages) === intval($args['paged']);
|
157 |
])
|
158 |
);
|
159 |
|
160 |
+
$attr = [
|
161 |
+
'class' => $class
|
162 |
+
];
|
163 |
+
|
164 |
+
if (is_customize_preview()) {
|
165 |
+
$attr['data-shortcut'] = 'border';
|
166 |
+
$attr['data-location'] = 'trending_posts_ext';
|
167 |
+
}
|
168 |
+
|
169 |
?>
|
170 |
|
171 |
+
<section <?php echo blocksy_attr_to_html($attr) ?>>
|
172 |
<div class="ct-container" <?php echo $data_page ?>>
|
173 |
<h5 class="ct-block-title">
|
174 |
<?php echo __('Trending now', 'blc') ?>
|
189 |
echo blocksy_html_tag(
|
190 |
'a',
|
191 |
[
|
192 |
+
'href' => $post['url'],
|
193 |
],
|
194 |
|
195 |
$post['image'] . blocksy_html_tag(
|
framework/extensions/trending/static/bundle/main.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(
|
1 |
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){t.exports=window.ctFrontend},function(t,e,n){"use strict";n.r(e);var r=n(0);function o(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||i(t)||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 a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(t,e)||i(t,e)||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 i(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f={},d=function(t){return f[t]?new Promise((function(e){e(f[t]),window.ct_customizer_localizations||(f[t]=f[t].clone())})):new Promise((function(e){return fetch(t).then((function(n){e(n),window.ct_customizer_localizations||(f[t]=n.clone())}))}))},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((t=s({el:null,action:null},t)).el&&t.action&&!t.el.classList.contains("ct-loading")){var e=parseInt(t.el.dataset.page,10);if(("prev"!==t.action||1!==e)&&!(t.el.querySelectorAll(".ct-container > a").length<4&&1===e||t.el.dataset.page.indexOf("last")>-1&&"next"===t.action)){t.el.classList.add("ct-loading");var n="prev"===t.action?e-1:e+1;Promise.all([new Promise((function(e){t.el.classList.add("ct-leave-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-leave-active"),t.el.classList.add("ct-leave"),setTimeout((function(){return e()}),650)}))})),d("".concat(ct_localizations.ajax_url,"?action=blocksy_get_trending_posts&page=").concat(n)).then((function(t){return t.json()}))]).then((function(e){var i=a(e,2),c=(i[0],i[1]),l=c.success,s=c.data;if(l){var u=s.posts,f=u.is_last_page,d=u.posts;t.el.dataset.page="".concat(n).concat(f?":last":""),o(t.el.querySelectorAll("a")).map((function(t){return t.remove()})),d.map((function(e){return t.el.insertAdjacentHTML("beforeend",'<a href="'.concat(e.url,'">\n ').concat(e.image,'\n <span class="ct-item-title">\n ').concat(e.title,"\n </span>\n </a>"))})),setTimeout((function(){t.el.classList.remove("ct-leave"),t.el.classList.add("ct-enter-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-enter-active"),t.el.classList.add("ct-active"),setTimeout((function(){t.el.classList.remove("ct-active"),t.el.classList.remove("ct-loading")}),650)}))}),50),Object(r.markImagesAsLoaded)(t.el)}}))}}};Object(r.registerDynamicChunk)("blocksy_ext_trending",{mount:function(t,e){e.event;var n=t.closest("[data-page]");t.classList.contains("ct-arrow-left")&&p({el:n,action:"prev"}),t.classList.contains("ct-arrow-right")&&p({el:n,action:"next"})}})}]);
|
framework/extensions/trending/static/bundle/main.min.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* - v1.8.1
|
3 |
+
*
|
4 |
+
* Copyright (c) 2021
|
5 |
+
* Licensed GPLv2+
|
6 |
+
*/
|
7 |
+
|
8 |
+
.ct-trending-block{padding:var(--padding, 30px) 0}.ct-trending-block>div{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:30px;grid-row-gap:20px;margin-bottom:5px}@media (min-width: 690px) and (max-width: 999.98px){.ct-trending-block>div{--grid-template-columns: repeat(2, 1fr)}}@media (min-width: 1000px){.ct-trending-block>div{--grid-template-columns: repeat(4, 1fr)}}.ct-trending-block>div.ct-leave-active>a,.ct-trending-block>div.ct-leave>a{transition:opacity 0.3s ease, transform 0.3s ease}.ct-trending-block>div.ct-leave-active>a:nth-of-type(1),.ct-trending-block>div.ct-leave>a:nth-of-type(1){transition-delay:0s}.ct-trending-block>div.ct-leave-active>a:nth-of-type(2),.ct-trending-block>div.ct-leave>a:nth-of-type(2){transition-delay:0.15s}.ct-trending-block>div.ct-leave-active>a:nth-of-type(3),.ct-trending-block>div.ct-leave>a:nth-of-type(3){transition-delay:0.25s}.ct-trending-block>div.ct-leave-active>a:nth-of-type(4),.ct-trending-block>div.ct-leave>a:nth-of-type(4){transition-delay:0.35s}.ct-trending-block>div.ct-leave-active>a{opacity:1;transform:translateY(0)}.ct-trending-block>div.ct-leave>a{opacity:0;transform:translateY(3px)}.ct-trending-block>div.ct-enter-active>a,.ct-trending-block>div.ct-active>a{transition:opacity 0.3s ease, transform 0.3s ease}.ct-trending-block>div.ct-enter-active>a:nth-of-type(1),.ct-trending-block>div.ct-active>a:nth-of-type(1){transition-delay:0s}.ct-trending-block>div.ct-enter-active>a:nth-of-type(2),.ct-trending-block>div.ct-active>a:nth-of-type(2){transition-delay:0.15s}.ct-trending-block>div.ct-enter-active>a:nth-of-type(3),.ct-trending-block>div.ct-active>a:nth-of-type(3){transition-delay:0.25s}.ct-trending-block>div.ct-enter-active>a:nth-of-type(4),.ct-trending-block>div.ct-active>a:nth-of-type(4){transition-delay:0.35s}.ct-trending-block>div.ct-enter-active>a{opacity:0;transform:translateY(3px)}.ct-trending-block>div.ct-active>a{opacity:1;transform:translateY(0)}.ct-trending-block .ct-block-title{--fontSize: 15px;grid-column:1/-1;display:flex;align-items:center;margin-bottom:10px;--headings-color: var(--color)}.ct-trending-block .ct-block-title>svg{margin-top:4px;margin-left:10px}.ct-trending-block a{display:flex;align-items:center;--linkInitialColor: var(--color)}.ct-trending-block .ct-image-container{flex:0 0 60px;border-radius:100%;-webkit-margin-end:20px;margin-inline-end:20px;-webkit-mask-image:-webkit-radial-gradient(white, black)}.ct-trending-block .ct-item-title{word-break:break-word}.ct-trending-block [class*='ct-arrow']{display:flex;align-items:center;justify-content:center;width:23px;height:23px;cursor:pointer;background:transparent;border-radius:2px;opacity:0.5;border:1px solid var(--color);transition:var(--transition)}.ct-trending-block [class*='ct-arrow']:before{content:'';width:5px;height:5px;border:1px solid currentColor;border-right:none;border-bottom:none}.ct-trending-block [class*='ct-arrow']:hover{opacity:1;color:#fff;border-color:var(--paletteColor1);background:var(--paletteColor1)}.ct-trending-block .ct-arrow-left{margin-left:auto;margin-right:8px;padding-left:1px}.ct-trending-block .ct-arrow-left:before{transform:rotate(-45deg)}.ct-trending-block .ct-arrow-right{padding-right:1px}.ct-trending-block .ct-arrow-right:before{transform:rotate(135deg)}.ct-trending-block [data-page='1'] .ct-arrow-left,.ct-trending-block [data-page*="last"] .ct-arrow-right{opacity:0.2;pointer-events:none}
|
framework/extensions/trending/static/js/main.js
CHANGED
@@ -1,17 +1,16 @@
|
|
1 |
-
import {
|
2 |
-
import
|
3 |
-
import { mount } from './trending-block'
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
).map((el) => mount(el))
|
9 |
-
}
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
}
|
14 |
|
15 |
-
|
16 |
-
|
|
|
|
|
17 |
})
|
1 |
+
import { loadPage } from './trending-block'
|
2 |
+
import { registerDynamicChunk } from 'blocksy-frontend'
|
|
|
3 |
|
4 |
+
registerDynamicChunk('blocksy_ext_trending', {
|
5 |
+
mount: (el, { event }) => {
|
6 |
+
const loadingEl = el.closest('[data-page]')
|
|
|
|
|
7 |
|
8 |
+
if (el.classList.contains('ct-arrow-left')) {
|
9 |
+
loadPage({ el: loadingEl, action: 'prev' })
|
10 |
+
}
|
11 |
|
12 |
+
if (el.classList.contains('ct-arrow-right')) {
|
13 |
+
loadPage({ el: loadingEl, action: 'next' })
|
14 |
+
}
|
15 |
+
},
|
16 |
})
|
framework/extensions/trending/static/js/trending-block.js
CHANGED
@@ -20,7 +20,7 @@ const cachedFetch = (url) =>
|
|
20 |
})
|
21 |
)
|
22 |
|
23 |
-
const loadPage = (args = {}) => {
|
24 |
args = {
|
25 |
el: null,
|
26 |
// prev | next
|
@@ -119,21 +119,3 @@ const loadPage = (args = {}) => {
|
|
119 |
markImagesAsLoaded(args.el)
|
120 |
})
|
121 |
}
|
122 |
-
|
123 |
-
export const mount = (el) => {
|
124 |
-
if (el.hasListeners) {
|
125 |
-
return
|
126 |
-
}
|
127 |
-
|
128 |
-
el.hasListeners = true
|
129 |
-
|
130 |
-
el.querySelector('.ct-arrow-left').addEventListener('click', (e) => {
|
131 |
-
e.preventDefault()
|
132 |
-
loadPage({ el, action: 'prev' })
|
133 |
-
})
|
134 |
-
|
135 |
-
el.querySelector('.ct-arrow-right').addEventListener('click', (e) => {
|
136 |
-
e.preventDefault()
|
137 |
-
loadPage({ el, action: 'next' })
|
138 |
-
})
|
139 |
-
}
|
20 |
})
|
21 |
)
|
22 |
|
23 |
+
export const loadPage = (args = {}) => {
|
24 |
args = {
|
25 |
el: null,
|
26 |
// prev | next
|
119 |
markImagesAsLoaded(args.el)
|
120 |
})
|
121 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
framework/extensions/trending/static/sass/main.scss
ADDED
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import '../../../../../static/sass/common-frontend';
|
2 |
+
|
3 |
+
.ct-trending-block {
|
4 |
+
padding: var(--padding, 30px) 0;
|
5 |
+
|
6 |
+
> div {
|
7 |
+
display: grid;
|
8 |
+
grid-template-columns: var(--grid-template-columns);
|
9 |
+
grid-column-gap: 30px;
|
10 |
+
grid-row-gap: 20px;
|
11 |
+
margin-bottom: 5px;
|
12 |
+
|
13 |
+
@include media-breakpoint-only(md) {
|
14 |
+
--grid-template-columns: repeat(2, 1fr);
|
15 |
+
}
|
16 |
+
|
17 |
+
@include media-breakpoint-up(lg) {
|
18 |
+
--grid-template-columns: repeat(4, 1fr);
|
19 |
+
}
|
20 |
+
|
21 |
+
&.ct-leave-active,
|
22 |
+
&.ct-leave {
|
23 |
+
> a {
|
24 |
+
transition: opacity 0.3s ease,
|
25 |
+
transform 0.3s ease;
|
26 |
+
|
27 |
+
&:nth-of-type(1) {
|
28 |
+
transition-delay: 0s;
|
29 |
+
}
|
30 |
+
|
31 |
+
&:nth-of-type(2) {
|
32 |
+
transition-delay: 0.15s;
|
33 |
+
}
|
34 |
+
|
35 |
+
&:nth-of-type(3) {
|
36 |
+
transition-delay: 0.25s;
|
37 |
+
}
|
38 |
+
|
39 |
+
&:nth-of-type(4) {
|
40 |
+
transition-delay: 0.35s;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
&.ct-leave-active {
|
46 |
+
> a {
|
47 |
+
opacity: 1;
|
48 |
+
transform: translateY(0);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
&.ct-leave {
|
53 |
+
> a {
|
54 |
+
opacity: 0;
|
55 |
+
transform: translateY(3px);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
&.ct-enter-active,
|
60 |
+
&.ct-active {
|
61 |
+
> a {
|
62 |
+
transition: opacity 0.3s ease,
|
63 |
+
transform 0.3s ease;
|
64 |
+
|
65 |
+
&:nth-of-type(1) {
|
66 |
+
transition-delay: 0s;
|
67 |
+
}
|
68 |
+
|
69 |
+
&:nth-of-type(2) {
|
70 |
+
transition-delay: 0.15s;
|
71 |
+
}
|
72 |
+
|
73 |
+
&:nth-of-type(3) {
|
74 |
+
transition-delay: 0.25s;
|
75 |
+
}
|
76 |
+
|
77 |
+
&:nth-of-type(4) {
|
78 |
+
transition-delay: 0.35s;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
&.ct-enter-active {
|
84 |
+
> a {
|
85 |
+
opacity: 0;
|
86 |
+
transform: translateY(3px);
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
&.ct-active {
|
91 |
+
> a {
|
92 |
+
opacity: 1;
|
93 |
+
transform: translateY(0);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
.ct-block-title {
|
99 |
+
--fontSize: 15px;
|
100 |
+
grid-column: 1/-1;
|
101 |
+
display: flex;
|
102 |
+
align-items: center;
|
103 |
+
margin-bottom: 10px;
|
104 |
+
--headings-color: var(--color);
|
105 |
+
|
106 |
+
> svg {
|
107 |
+
margin-top: 4px;
|
108 |
+
margin-left: 10px;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
a {
|
113 |
+
display: flex;
|
114 |
+
align-items: center;
|
115 |
+
--linkInitialColor: var(--color);
|
116 |
+
}
|
117 |
+
|
118 |
+
.ct-image-container {
|
119 |
+
flex: 0 0 60px;
|
120 |
+
border-radius: 100%;
|
121 |
+
margin-inline-end: 20px;
|
122 |
+
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
123 |
+
}
|
124 |
+
|
125 |
+
.ct-item-title {
|
126 |
+
word-break: break-word;
|
127 |
+
}
|
128 |
+
|
129 |
+
// arrows
|
130 |
+
[class*='ct-arrow'] {
|
131 |
+
display: flex;
|
132 |
+
align-items: center;
|
133 |
+
justify-content: center;
|
134 |
+
width: 23px;
|
135 |
+
height: 23px;
|
136 |
+
cursor: pointer;
|
137 |
+
background: transparent;
|
138 |
+
border-radius: 2px;
|
139 |
+
opacity: 0.5;
|
140 |
+
border: 1px solid var(--color);
|
141 |
+
transition: var(--transition);
|
142 |
+
|
143 |
+
&:before {
|
144 |
+
content: '';
|
145 |
+
width: 5px;
|
146 |
+
height: 5px;
|
147 |
+
border: 1px solid currentColor;
|
148 |
+
border-right: none;
|
149 |
+
border-bottom: none;
|
150 |
+
}
|
151 |
+
|
152 |
+
&:hover {
|
153 |
+
opacity: 1;
|
154 |
+
color: #fff;
|
155 |
+
border-color: var(--paletteColor1);
|
156 |
+
background: var(--paletteColor1);
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
.ct-arrow-left {
|
161 |
+
margin-left: auto;
|
162 |
+
margin-right: 8px;
|
163 |
+
padding-left: 1px;
|
164 |
+
|
165 |
+
&:before {
|
166 |
+
transform: rotate(-45deg);
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
.ct-arrow-right {
|
171 |
+
padding-right: 1px;
|
172 |
+
|
173 |
+
&:before {
|
174 |
+
transform: rotate(135deg);
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
// disable arrows
|
179 |
+
[data-page='1'] .ct-arrow-left,
|
180 |
+
[data-page*="last"] .ct-arrow-right {
|
181 |
+
opacity: 0.2;
|
182 |
+
pointer-events: none;
|
183 |
+
}
|
184 |
+
}
|
framework/extensions/widgets/extension.php
CHANGED
@@ -25,7 +25,7 @@ class BlocksyExtensionWidgets {
|
|
25 |
|
26 |
wp_enqueue_style(
|
27 |
'blocksy-ext-widgets-styles',
|
28 |
-
BLOCKSY_URL . 'framework/extensions/widgets/static/bundle/main.css',
|
29 |
[
|
30 |
'ct-main-styles'
|
31 |
],
|
25 |
|
26 |
wp_enqueue_style(
|
27 |
'blocksy-ext-widgets-styles',
|
28 |
+
BLOCKSY_URL . 'framework/extensions/widgets/static/bundle/main.min.css',
|
29 |
[
|
30 |
'ct-main-styles'
|
31 |
],
|
framework/extensions/widgets/static/bundle/main.css
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* - v1.7.63
|
3 |
-
*
|
4 |
-
* Copyright (c) 2021
|
5 |
-
* Licensed GPLv2+
|
6 |
-
*/
|
7 |
-
|
8 |
-
.ct-posts-widget ul{--listItemSpacing: 20px}.ct-posts-widget ul a{display:var(--display, grid)}.ct-posts-widget ul .ct-image-container{align-self:start}.ct-posts-widget ul .ct-entry-content{align-self:center}.ct-posts-widget ul .ct-post-title{--fontSize: 15px;--lineHeight: 1.5;--fontWeight: 500;word-break:break-word}.ct-posts-widget ul .ct-entry-excerpt{margin-top:5px;font-size:13px;color:var(--color)}.ct-posts-widget ul .ct-entry-meta{color:var(--color)}.ct-posts-widget ul .ct-entry-meta span:not(:last-child):after{content:'/';margin:0 3px}.ct-posts-widget ul[data-type="rounded"] a,.ct-posts-widget ul[data-type="large-small"] a,.ct-posts-widget ul[data-type="small-thumbs"] a{grid-template-columns:25% 1fr;grid-column-gap:20px}.ct-posts-widget ul[data-type="no-thumbs"] a{--display: block}.ct-posts-widget ul[data-type="large-thumbs"]{--listItemSpacing: 25px}.ct-posts-widget ul[data-type="large-thumbs"] a{--display: block}.ct-posts-widget ul[data-type="large-thumbs"] a .ct-image-container{margin-bottom:12px}.ct-posts-widget ul[data-type="large-thumbs"] a .ct-post-title{--fontSize: 17px;--fontWeight: 600}.ct-posts-widget ul[data-type="large-small"] li:first-child{--listItemSpacing: 30px}.ct-posts-widget ul[data-type="large-small"] li:first-child a{--display: block}.ct-posts-widget ul[data-type="large-small"] li:first-child a .ct-image-container{margin-bottom:20px}.ct-posts-widget ul[data-type="large-small"] li:first-child a .ct-post-title{--fontSize: 17px;--fontWeight: 600}.ct-posts-widget ul[data-type="rounded"] .ct-image-container{overflow:hidden;border-radius:100%;-webkit-mask-image:-webkit-radial-gradient(white, black)}.ct-posts-widget ul[data-type="numbered"]{counter-reset:ct-counter}.ct-posts-widget ul[data-type="numbered"] a{grid-template-columns:34px 1fr;grid-column-gap:15px}.ct-posts-widget ul[data-type="numbered"] a:before{counter-increment:ct-counter;content:counter(ct-counter);display:flex;align-items:center;justify-content:center;width:34px;height:34px;font-size:12px;font-weight:700;border-radius:100%;border:1px solid #E5E5E5;transition:var(--transition)}.ct-posts-widget ul[data-type="numbered"] a:hover:before{color:#fff;border-color:var(--paletteColor1);background:var(--paletteColor1)}.ct-posts-widget ul[data-type="numbered"] .ct-post-title::before{content:'';display:block;height:0;width:0;margin-top:calc((1 - 1.65) * 0.5em)}.ct-quote-widget{--color: #fff;position:relative;min-height:250px;border-radius:7px;padding:70px 40px 60px 60px !important;background:var(--paletteColor1) !important}.ct-quote-widget:before{position:absolute;top:50px;left:35px;content:"”";font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-weight:bold;font-size:200px;line-height:150px;opacity:0.3;width:80px;height:80px;display:flex;justify-content:center;transform:rotate(180deg)}.ct-quote-widget .ct-quote-author{display:grid;grid-template-columns:40px 1fr;grid-column-gap:15px;align-items:center;margin-top:25px;--fontWeight: 500}.ct-quote-widget .ct-quote-author figure{max-width:40px;border-radius:100%}.ct-about-me-widget figure{margin-bottom:15px}.ct-about-me-widget figure[data-size="small"]{max-width:90px}.ct-about-me-widget figure[data-size="medium"]{max-width:140px}.ct-about-me-widget figure[data-shape="square"]{border-radius:2px}.ct-about-me-widget figure[data-shape="rounded"]{border-radius:100%}.ct-about-me-widget .ct-about-me-name{display:flex;flex-direction:column}.ct-about-me-widget .ct-about-me-name:not(:last-child){margin-bottom:15px}.ct-about-me-widget .ct-about-me-text:not(:last-child){margin-bottom:25px}.ct-about-me-widget .ct-about-me-link{font-size:13px;font-weight:normal}.ct-about-me-widget [data-alignment="center"]{text-align:center}.ct-about-me-widget [data-alignment="center"] .ct-social-box{justify-content:center}.ct-about-me-widget [data-alignment="right"]{text-align:right}.ct-about-me-widget [data-alignment="right"] .ct-social-box{justify-content:flex-end}.ct-about-me-widget [data-type="bordered"]{padding:35px 25px;border-radius:7px;background:#fff;border:1px dashed rgba(0,0,0,0.1)}.ct-facebook-like-box{overflow:hidden;--fbHeader: 0px;--fbFacepile: 0px}.ct-facebook-like-box .fb-page{display:flex;justify-content:center}.ct-facebook-like-box .fb-page[data-small-header="false"]{--fbHeader: 130px}.ct-facebook-like-box .fb-page[data-small-header="true"]{--fbHeader: 70px}.ct-facebook-like-box .fb-page[data-show-facepile="true"]{--fbFacepile: 84px}.ct-facebook-like-box .fb-page:not([data-tabs="timeline"]){min-height:calc(var(--fbHeader) + var(--fbFacepile))}.ct-facebook-like-box .fb-page[data-tabs="timeline"]{min-height:500px}.ct-facebook-like-box iframe{max-width:500px;margin:0 auto}.ct-socials-widget [data-icons-type*="solid"],.ct-about-me-widget [data-icons-type*="solid"],.ct-contact-info-widget [data-icons-type*="solid"]{--icon-hover-color: #fff;--background-color: rgba(218, 222, 228, 0.3);--background-hover-color: var(--paletteColor1)}.ct-socials-widget [data-icons-type*="outline"],.ct-about-me-widget [data-icons-type*="outline"],.ct-contact-info-widget [data-icons-type*="outline"]{--icon-hover-color: var(--paletteColor1);--background-color: rgba(218, 222, 228, 1);--background-hover-color: var(--paletteColor1)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
framework/extensions/widgets/static/bundle/main.min.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* - v1.8.1
|
3 |
+
*
|
4 |
+
* Copyright (c) 2021
|
5 |
+
* Licensed GPLv2+
|
6 |
+
*/
|
7 |
+
|
8 |
+
.ct-posts-widget ul{--listItemSpacing: 20px}.ct-posts-widget ul a{display:var(--display, flex)}.ct-posts-widget ul .ct-image-container{align-self:start}.ct-posts-widget ul .ct-entry-content{align-self:center}.ct-posts-widget ul .ct-post-title{--fontSize: 15px;--lineHeight: 1.5;--fontWeight: 500;word-break:break-word}.ct-posts-widget ul .ct-entry-excerpt{margin-top:5px;font-size:13px;color:var(--color)}.ct-posts-widget ul .ct-entry-meta{color:var(--color)}.ct-posts-widget ul .ct-entry-meta span:not(:last-child):after{content:'/';margin:0 3px}.ct-posts-widget ul[data-type="rounded"] .ct-image-container,.ct-posts-widget ul[data-type="large-small"] .ct-image-container,.ct-posts-widget ul[data-type="small-thumbs"] .ct-image-container{flex:0 0 25%;-webkit-margin-end:20px;margin-inline-end:20px}.ct-posts-widget ul[data-type="no-thumbs"] a{--display: block}.ct-posts-widget ul[data-type="large-thumbs"]{--listItemSpacing: 25px}.ct-posts-widget ul[data-type="large-thumbs"] a{--display: block}.ct-posts-widget ul[data-type="large-thumbs"] a .ct-image-container{margin-bottom:12px}.ct-posts-widget ul[data-type="large-thumbs"] a .ct-post-title{--fontSize: 17px;--fontWeight: 600}.ct-posts-widget ul[data-type="large-small"] li:first-child{--listItemSpacing: 30px}.ct-posts-widget ul[data-type="large-small"] li:first-child a{--display: block}.ct-posts-widget ul[data-type="large-small"] li:first-child a .ct-image-container{margin-bottom:20px}.ct-posts-widget ul[data-type="large-small"] li:first-child a .ct-post-title{--fontSize: 17px;--fontWeight: 600}.ct-posts-widget ul[data-type="rounded"] .ct-image-container{overflow:hidden;border-radius:100%;-webkit-mask-image:-webkit-radial-gradient(white, black)}.ct-posts-widget ul[data-type="numbered"]{counter-reset:ct-counter}.ct-posts-widget ul[data-type="numbered"] a{grid-template-columns:34px 1fr;grid-column-gap:15px}.ct-posts-widget ul[data-type="numbered"] a:before{counter-increment:ct-counter;content:counter(ct-counter);display:flex;align-items:center;justify-content:center;width:34px;height:34px;font-size:12px;font-weight:700;border-radius:100%;border:1px solid #E5E5E5;transition:var(--transition)}.ct-posts-widget ul[data-type="numbered"] a:hover:before{color:#fff;border-color:var(--paletteColor1);background:var(--paletteColor1)}.ct-posts-widget ul[data-type="numbered"] .ct-post-title::before{content:'';display:block;height:0;width:0;margin-top:calc((1 - 1.65) * 0.5em)}.ct-quote-widget{--color: #fff;position:relative;min-height:250px;border-radius:7px;padding:70px 40px 60px 60px !important;background:var(--paletteColor1) !important}.ct-quote-widget:before{position:absolute;top:50px;left:35px;content:"”";font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-weight:bold;font-size:200px;line-height:150px;opacity:0.3;width:80px;height:80px;display:flex;justify-content:center;transform:rotate(180deg)}.ct-quote-widget .ct-quote-author{display:grid;grid-template-columns:40px 1fr;grid-column-gap:15px;align-items:center;margin-top:25px;--fontWeight: 500}.ct-quote-widget .ct-quote-author figure{max-width:40px;border-radius:100%}.ct-about-me-widget figure{margin-bottom:15px}.ct-about-me-widget figure[data-size="small"]{max-width:90px}.ct-about-me-widget figure[data-size="medium"]{max-width:140px}.ct-about-me-widget figure[data-shape="square"]{border-radius:2px}.ct-about-me-widget figure[data-shape="rounded"]{border-radius:100%}.ct-about-me-widget .ct-about-me-name{display:flex;flex-direction:column}.ct-about-me-widget .ct-about-me-name:not(:last-child){margin-bottom:15px}.ct-about-me-widget .ct-about-me-text:not(:last-child){margin-bottom:25px}.ct-about-me-widget .ct-about-me-link{font-size:13px;font-weight:normal}.ct-about-me-widget [data-alignment="center"]{text-align:center}.ct-about-me-widget [data-alignment="center"] .ct-social-box{justify-content:center}.ct-about-me-widget [data-alignment="right"]{text-align:right}.ct-about-me-widget [data-alignment="right"] .ct-social-box{justify-content:flex-end}.ct-about-me-widget [data-type="bordered"]{padding:35px 25px;border-radius:7px;background:#fff;border:1px dashed rgba(0,0,0,0.1)}.ct-facebook-like-box{overflow:hidden;--fbHeader: 0px;--fbFacepile: 0px}.ct-facebook-like-box .fb-page{display:flex;justify-content:center}.ct-facebook-like-box .fb-page[data-small-header="false"]{--fbHeader: 130px}.ct-facebook-like-box .fb-page[data-small-header="true"]{--fbHeader: 70px}.ct-facebook-like-box .fb-page[data-show-facepile="true"]{--fbFacepile: 84px}.ct-facebook-like-box .fb-page:not([data-tabs="timeline"]){min-height:calc(var(--fbHeader) + var(--fbFacepile))}.ct-facebook-like-box .fb-page[data-tabs="timeline"]{min-height:500px}.ct-facebook-like-box iframe{max-width:500px;margin:0 auto}.ct-socials-widget [data-icons-type*="solid"],.ct-about-me-widget [data-icons-type*="solid"],.ct-contact-info-widget [data-icons-type*="solid"]{--icon-hover-color: #fff;--background-color: rgba(218, 222, 228, 0.3);--background-hover-color: var(--paletteColor1)}.ct-socials-widget [data-icons-type*="outline"],.ct-about-me-widget [data-icons-type*="outline"],.ct-contact-info-widget [data-icons-type*="outline"]{--icon-hover-color: var(--paletteColor1);--background-color: rgba(218, 222, 228, 1);--background-hover-color: var(--paletteColor1)}
|
framework/extensions/widgets/static/sass/posts.scss
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
--listItemSpacing: 20px;
|
3 |
|
4 |
a {
|
5 |
-
display: var(--display,
|
6 |
}
|
7 |
|
8 |
.ct-image-container {
|
@@ -41,9 +41,9 @@
|
|
41 |
&[data-type="rounded"],
|
42 |
&[data-type="large-small"],
|
43 |
&[data-type="small-thumbs"] {
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
}
|
48 |
}
|
49 |
|
2 |
--listItemSpacing: 20px;
|
3 |
|
4 |
a {
|
5 |
+
display: var(--display, flex);
|
6 |
}
|
7 |
|
8 |
.ct-image-container {
|
41 |
&[data-type="rounded"],
|
42 |
&[data-type="large-small"],
|
43 |
&[data-type="small-thumbs"] {
|
44 |
+
.ct-image-container {
|
45 |
+
flex: 0 0 25%;
|
46 |
+
margin-inline-end: 20px;
|
47 |
}
|
48 |
}
|
49 |
|
framework/extensions/widgets/widgets/ct-advertisement/options.php
CHANGED
@@ -63,6 +63,13 @@ $options = [
|
|
63 |
'filledLabel' => __('Change Image', 'blc'),
|
64 |
],
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
'ad_link' => [
|
67 |
'type' => 'text',
|
68 |
'label' => __( 'Ad URL', 'blc' ),
|
63 |
'filledLabel' => __('Change Image', 'blc'),
|
64 |
],
|
65 |
|
66 |
+
'ad_image_ratio' => [
|
67 |
+
'label' => __( 'Image Ratio', 'blocksy' ),
|
68 |
+
'type' => 'ct-ratio',
|
69 |
+
'value' => 'original',
|
70 |
+
'design' => 'inline',
|
71 |
+
],
|
72 |
+
|
73 |
'ad_link' => [
|
74 |
'type' => 'text',
|
75 |
'label' => __( 'Ad URL', 'blc' ),
|
framework/extensions/widgets/widgets/ct-advertisement/view.php
CHANGED
@@ -29,7 +29,11 @@ $ad_link_target = blocksy_default_akg( 'ad_link_target', $atts, 'yes' );
|
|
29 |
|
30 |
$image_output = blc_call_fn(['fn' => 'blocksy_image'], [
|
31 |
'attachment_id' => blocksy_default_akg( 'ad_image/attachment_id', $atts, null ),
|
32 |
-
'ratio' =>
|
|
|
|
|
|
|
|
|
33 |
'tag_name' => 'a',
|
34 |
'size' => 'large',
|
35 |
'html_atts' => array_merge([
|
29 |
|
30 |
$image_output = blc_call_fn(['fn' => 'blocksy_image'], [
|
31 |
'attachment_id' => blocksy_default_akg( 'ad_image/attachment_id', $atts, null ),
|
32 |
+
'ratio' => blocksy_default_akg(
|
33 |
+
'ad_image_ratio',
|
34 |
+
$atts,
|
35 |
+
'original'
|
36 |
+
),
|
37 |
'tag_name' => 'a',
|
38 |
'size' => 'large',
|
39 |
'html_atts' => array_merge([
|
framework/extensions/widgets/widgets/ct-posts/view.php
CHANGED
@@ -165,17 +165,19 @@ echo $before_title . wp_kses_post( $title ) . $after_title;
|
|
165 |
$ratio = '4/3';
|
166 |
}
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
179 |
}
|
180 |
?>
|
181 |
|
165 |
$ratio = '4/3';
|
166 |
}
|
167 |
|
168 |
+
if (get_post_thumbnail_id()) {
|
169 |
+
echo wp_kses_post(
|
170 |
+
blc_call_fn(
|
171 |
+
['fn' => 'blocksy_image'],
|
172 |
+
[
|
173 |
+
'attachment_id' => get_post_thumbnail_id(),
|
174 |
+
'ratio' => $ratio,
|
175 |
+
'tag_name' => 'div',
|
176 |
+
'size' => $size,
|
177 |
+
]
|
178 |
+
)
|
179 |
+
);
|
180 |
+
}
|
181 |
}
|
182 |
?>
|
183 |
|
framework/features/conditions-manager.php
CHANGED
@@ -6,7 +6,11 @@ class ConditionsManager {
|
|
6 |
public function __construct() {
|
7 |
}
|
8 |
|
9 |
-
public function condition_matches($rules = []) {
|
|
|
|
|
|
|
|
|
10 |
if (empty($rules)) {
|
11 |
return false;
|
12 |
}
|
@@ -38,7 +42,16 @@ class ConditionsManager {
|
|
38 |
|
39 |
if (! empty($all_includes)) {
|
40 |
// If at least one inclusion is true - return true
|
41 |
-
if (! empty($resolved_includes)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
return true;
|
43 |
}
|
44 |
}
|
@@ -196,6 +209,16 @@ class ConditionsManager {
|
|
196 |
}
|
197 |
}
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
if ($rule['rule'] === 'taxonomy_ids') {
|
200 |
if (is_tax() || is_category() || is_tag()) {
|
201 |
$tax_id = get_queried_object_id();
|
@@ -291,6 +314,7 @@ class ConditionsManager {
|
|
291 |
]
|
292 |
]
|
293 |
],
|
|
|
294 |
[
|
295 |
'title' => __('Basic', 'blc'),
|
296 |
'rules' => [
|
@@ -467,8 +491,113 @@ class ConditionsManager {
|
|
467 |
[
|
468 |
'title' => __('User Roles', 'blc'),
|
469 |
'rules' => $this->get_user_roles_rules()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
]
|
471 |
-
]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
}
|
473 |
|
474 |
private function get_user_roles_rules() {
|
6 |
public function __construct() {
|
7 |
}
|
8 |
|
9 |
+
public function condition_matches($rules = [], $args = []) {
|
10 |
+
$args = wp_parse_args($args, [
|
11 |
+
'relation' => 'OR'
|
12 |
+
]);
|
13 |
+
|
14 |
if (empty($rules)) {
|
15 |
return false;
|
16 |
}
|
42 |
|
43 |
if (! empty($all_includes)) {
|
44 |
// If at least one inclusion is true - return true
|
45 |
+
if ($args['relation'] === 'OR' && ! empty($resolved_includes)) {
|
46 |
+
return true;
|
47 |
+
}
|
48 |
+
|
49 |
+
// For AND relation all includes need to be resolved
|
50 |
+
if (
|
51 |
+
$args['relation'] === 'AND'
|
52 |
+
&&
|
53 |
+
count($resolved_includes) === count($all_includes)
|
54 |
+
) {
|
55 |
return true;
|
56 |
}
|
57 |
}
|
209 |
}
|
210 |
}
|
211 |
|
212 |
+
if (
|
213 |
+
$rule['rule'] === 'current_language'
|
214 |
+
&&
|
215 |
+
function_exists('blocksy_get_current_language')
|
216 |
+
&&
|
217 |
+
! empty($payload['language'])
|
218 |
+
) {
|
219 |
+
return $payload['language'] === blocksy_get_current_language();
|
220 |
+
}
|
221 |
+
|
222 |
if ($rule['rule'] === 'taxonomy_ids') {
|
223 |
if (is_tax() || is_category() || is_tag()) {
|
224 |
$tax_id = get_queried_object_id();
|
314 |
]
|
315 |
]
|
316 |
],
|
317 |
+
|
318 |
[
|
319 |
'title' => __('Basic', 'blc'),
|
320 |
'rules' => [
|
491 |
[
|
492 |
'title' => __('User Roles', 'blc'),
|
493 |
'rules' => $this->get_user_roles_rules()
|
494 |
+
],
|
495 |
+
],
|
496 |
+
|
497 |
+
(
|
498 |
+
function_exists('blocksy_get_current_language')
|
499 |
+
&&
|
500 |
+
blocksy_get_current_language() !== '__NOT_KNOWN__'
|
501 |
+
) ? [
|
502 |
+
[
|
503 |
+
'title' => __('Languages', 'blc'),
|
504 |
+
'rules' => [
|
505 |
+
[
|
506 |
+
'id' => 'current_language',
|
507 |
+
'title' => __('Current Language', 'blc')
|
508 |
+
]
|
509 |
+
]
|
510 |
]
|
511 |
+
] : []);
|
512 |
+
}
|
513 |
+
|
514 |
+
public function humanize_conditions($conditions) {
|
515 |
+
$result = [];
|
516 |
+
|
517 |
+
foreach ($conditions as $condition) {
|
518 |
+
$type = $condition['type'] === 'include' ? __('Include', 'blc') : __(
|
519 |
+
'Exclude', 'blc'
|
520 |
+
);
|
521 |
+
|
522 |
+
$maybe_descriptor = $this->find_rule_descriptor(
|
523 |
+
$condition['rule']
|
524 |
+
);
|
525 |
+
|
526 |
+
if (! $maybe_descriptor) {
|
527 |
+
continue;
|
528 |
+
}
|
529 |
+
|
530 |
+
$to_append = $type . ' ' . $maybe_descriptor['title'];
|
531 |
+
|
532 |
+
if (
|
533 |
+
(
|
534 |
+
$condition['rule'] === 'post_ids'
|
535 |
+
||
|
536 |
+
$condition['rule'] === 'page_ids'
|
537 |
+
||
|
538 |
+
$condition['rule'] === 'custom_post_type_ids'
|
539 |
+
) && isset($condition['payload']['post_id'])
|
540 |
+
) {
|
541 |
+
$to_append .= ' (<a href="' . get_edit_post_link(
|
542 |
+
$condition['payload']['post_id']
|
543 |
+
) . '" target="_blank">' . get_the_title($condition['payload']['post_id']) . '</a>)';
|
544 |
+
}
|
545 |
+
|
546 |
+
if (
|
547 |
+
(
|
548 |
+
$condition['rule'] === 'taxonomy_ids'
|
549 |
+
||
|
550 |
+
$condition['rule'] === 'post_with_taxonomy_ids'
|
551 |
+
) && isset($condition['payload']['taxonomy_id'])
|
552 |
+
) {
|
553 |
+
$tax = get_term_by(
|
554 |
+
'term_taxonomy_id',
|
555 |
+
$condition['payload']['taxonomy_id']
|
556 |
+
);
|
557 |
+
|
558 |
+
$to_append .= ' (<a href="' . get_edit_term_link(
|
559 |
+
$condition['payload']['taxonomy_id']
|
560 |
+
) . '" target="_blank">' . $tax->name . '</a>)';
|
561 |
+
}
|
562 |
+
|
563 |
+
if ($condition['rule'] === 'current_language') {
|
564 |
+
$to_append = null;
|
565 |
+
|
566 |
+
if (
|
567 |
+
isset($condition['payload']['language'])
|
568 |
+
&&
|
569 |
+
function_exists('blocksy_get_all_i18n_languages')
|
570 |
+
) {
|
571 |
+
foreach (blocksy_get_all_i18n_languages() as $lang) {
|
572 |
+
if ($lang['id'] === $condition['payload']['language']) {
|
573 |
+
$to_append = $type . ' ' . $lang['name'] . ' ' . __(
|
574 |
+
'Language', 'blc'
|
575 |
+
);
|
576 |
+
}
|
577 |
+
}
|
578 |
+
}
|
579 |
+
}
|
580 |
+
|
581 |
+
if ($to_append) {
|
582 |
+
$result[] = $to_append;
|
583 |
+
}
|
584 |
+
}
|
585 |
+
|
586 |
+
return $result;
|
587 |
+
}
|
588 |
+
|
589 |
+
private function find_rule_descriptor($rule) {
|
590 |
+
$all = $this->get_all_rules();
|
591 |
+
|
592 |
+
foreach ($all as $rules_group) {
|
593 |
+
foreach ($rules_group['rules'] as $single_rule) {
|
594 |
+
if ($single_rule['id'] === $rule) {
|
595 |
+
return $single_rule;
|
596 |
+
}
|
597 |
+
}
|
598 |
+
}
|
599 |
+
|
600 |
+
return null;
|
601 |
}
|
602 |
|
603 |
private function get_user_roles_rules() {
|
framework/features/customizer-options-manager.php
CHANGED
@@ -4,19 +4,10 @@ namespace Blocksy;
|
|
4 |
|
5 |
class CustomizerOptionsManager {
|
6 |
public function __construct() {
|
7 |
-
add_filter('blocksy:options:
|
8 |
-
$options[
|
9 |
-
'
|
10 |
-
'
|
11 |
-
'setting' => ['transport' => 'postMessage'],
|
12 |
-
'inner-options' => [
|
13 |
-
|
14 |
-
'importer' => [
|
15 |
-
'type' => 'blocksy-customizer-options-manager',
|
16 |
-
'design' => 'none',
|
17 |
-
],
|
18 |
-
|
19 |
-
],
|
20 |
];
|
21 |
|
22 |
return $options;
|
4 |
|
5 |
class CustomizerOptionsManager {
|
6 |
public function __construct() {
|
7 |
+
add_filter('blocksy:options:manage-options:top', function ($options) {
|
8 |
+
$options['importer'] = [
|
9 |
+
'type' => 'blocksy-customizer-options-manager',
|
10 |
+
'design' => 'none',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
];
|
12 |
|
13 |
return $options;
|
framework/features/demo-install.php
CHANGED
@@ -178,6 +178,7 @@ class DemoInstall {
|
|
178 |
|
179 |
public function fetch_all_demos() {
|
180 |
$request = wp_remote_get('https://demo.creativethemes.com/?route=get_all');
|
|
|
181 |
// $request = wp_remote_get('https://demo.creativethemes.BROKEN/?route=get_all');
|
182 |
|
183 |
if (is_wp_error($request)) {
|
178 |
|
179 |
public function fetch_all_demos() {
|
180 |
$request = wp_remote_get('https://demo.creativethemes.com/?route=get_all');
|
181 |
+
|
182 |
// $request = wp_remote_get('https://demo.creativethemes.BROKEN/?route=get_all');
|
183 |
|
184 |
if (is_wp_error($request)) {
|
framework/features/demo-install/content-installer.php
CHANGED
@@ -262,6 +262,23 @@ class DemoInstallContentInstaller {
|
|
262 |
$header_builder->patch_header_value_for($wp_import->processed_terms);
|
263 |
}
|
264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
$this->clean_plugins_cache();
|
266 |
$this->assign_pages_ids($demo, $builder);
|
267 |
|
262 |
$header_builder->patch_header_value_for($wp_import->processed_terms);
|
263 |
}
|
264 |
|
265 |
+
$old_nav_menu_locations = get_theme_mod('nav_menu_locations', []);
|
266 |
+
$should_update_nav_menu_locations = false;
|
267 |
+
|
268 |
+
foreach ($old_nav_menu_locations as $location => $menu_id) {
|
269 |
+
if (isset($wp_import->processed_terms[$menu_id])) {
|
270 |
+
$should_update_nav_menu_locations = true;
|
271 |
+
|
272 |
+
$old_nav_menu_locations[
|
273 |
+
$location
|
274 |
+
] = $wp_import->processed_terms[$menu_id];
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
if ($should_update_nav_menu_locations) {
|
279 |
+
set_theme_mod('nav_menu_locations', $old_nav_menu_locations);
|
280 |
+
}
|
281 |
+
|
282 |
$this->clean_plugins_cache();
|
283 |
$this->assign_pages_ids($demo, $builder);
|
284 |
|
framework/features/demo-install/install-finish.php
CHANGED
@@ -14,9 +14,13 @@ class DemoInstallFinalActions {
|
|
14 |
exit;
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
17 |
$this->replace_urls();
|
18 |
|
19 |
-
do_action('blocksy:dynamic-css:
|
20 |
Plugin::instance()->cache_manager->run_cache_purge();
|
21 |
|
22 |
if (class_exists('WC_REST_System_Status_Tools_V2_Controller')) {
|
@@ -36,6 +40,28 @@ class DemoInstallFinalActions {
|
|
36 |
global $wp_rewrite;
|
37 |
$wp_rewrite->flush_rules();
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
Plugin::instance()->demo->emit_sse_message([
|
40 |
'action' => 'complete',
|
41 |
'error' => false,
|
14 |
exit;
|
15 |
}
|
16 |
|
17 |
+
$wpforms_settings = get_option('wpforms_settings', []);
|
18 |
+
$wpforms_settings['disable-css'] = '2';
|
19 |
+
update_option('wpforms_settings', $wpforms_settings);
|
20 |
+
|
21 |
$this->replace_urls();
|
22 |
|
23 |
+
do_action('blocksy:dynamic-css:refresh-caches');
|
24 |
Plugin::instance()->cache_manager->run_cache_purge();
|
25 |
|
26 |
if (class_exists('WC_REST_System_Status_Tools_V2_Controller')) {
|
40 |
global $wp_rewrite;
|
41 |
$wp_rewrite->flush_rules();
|
42 |
|
43 |
+
if (get_option('qubely_global_options')) {
|
44 |
+
$maybe_presets = json_decode(
|
45 |
+
get_option('qubely_global_options'),
|
46 |
+
true
|
47 |
+
);
|
48 |
+
|
49 |
+
if (
|
50 |
+
$maybe_presets
|
51 |
+
&&
|
52 |
+
isset($maybe_presets['activePreset'])
|
53 |
+
&&
|
54 |
+
$maybe_presets['activePreset'] !== 'theme'
|
55 |
+
) {
|
56 |
+
$maybe_presets['activePreset'] = 'theme';
|
57 |
+
|
58 |
+
update_option(
|
59 |
+
'qubely_global_options',
|
60 |
+
json_encode($maybe_presets)
|
61 |
+
);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
Plugin::instance()->demo->emit_sse_message([
|
66 |
'action' => 'complete',
|
67 |
'error' => false,
|
framework/features/demo-install/options-import.php
CHANGED
@@ -121,9 +121,7 @@ class DemoInstallOptionsInstaller {
|
|
121 |
do_action('customize_save', $wp_customize);
|
122 |
|
123 |
foreach ($options['mods'] as $key => $val) {
|
124 |
-
if ($key === 'nav_menu_locations') continue;
|
125 |
if ($key === 'sidebars_widgets') continue;
|
126 |
-
|
127 |
do_action('customize_save_' . $key, $wp_customize);
|
128 |
set_theme_mod($key, $val);
|
129 |
}
|
121 |
do_action('customize_save', $wp_customize);
|
122 |
|
123 |
foreach ($options['mods'] as $key => $val) {
|
|
|
124 |
if ($key === 'sidebars_widgets') continue;
|
|
|
125 |
do_action('customize_save_' . $key, $wp_customize);
|
126 |
set_theme_mod($key, $val);
|
127 |
}
|
framework/features/demo-install/wp-importer.php
CHANGED
@@ -14,32 +14,6 @@ if ( ! class_exists( 'WP_Importer' ) ) {
|
|
14 |
// include WXR file parsers
|
15 |
require dirname( __FILE__ ) . '/parsers.php';
|
16 |
|
17 |
-
function blc_load_xml_file($url) {
|
18 |
-
set_time_limit(100);
|
19 |
-
|
20 |
-
if (ini_get('allow_url_fopen') == true) {
|
21 |
-
return file_get_contents($url, false, stream_context_create([
|
22 |
-
"ssl" => [
|
23 |
-
"verify_peer"=>false,
|
24 |
-
"verify_peer_name"=>false,
|
25 |
-
]
|
26 |
-
]));
|
27 |
-
} else if (function_exists('curl_init')) {
|
28 |
-
$curl = curl_init($url);
|
29 |
-
|
30 |
-
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
31 |
-
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
32 |
-
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
33 |
-
|
34 |
-
$result = curl_exec($curl);
|
35 |
-
curl_close($curl);
|
36 |
-
|
37 |
-
return $result;
|
38 |
-
} else {
|
39 |
-
throw new Exception("Can't load data.");
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
if ( ! function_exists( 'wp_slash_strings_only' ) ) {
|
44 |
/**
|
45 |
* Adds slashes to only string values in an array of values.
|
14 |
// include WXR file parsers
|
15 |
require dirname( __FILE__ ) . '/parsers.php';
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
if ( ! function_exists( 'wp_slash_strings_only' ) ) {
|
18 |
/**
|
19 |
* Adds slashes to only string values in an array of values.
|
framework/features/dynamic-css.php
CHANGED
@@ -64,7 +64,7 @@ class DynamicCss {
|
|
64 |
'type' => 'ct-switch',
|
65 |
'value' => 'no',
|
66 |
'setting' => [ 'transport' => 'postMessage' ],
|
67 |
-
'desc' => __( '
|
68 |
];
|
69 |
|
70 |
$opts[blocksy_rand_md5()] = [
|
@@ -81,11 +81,7 @@ class DynamicCss {
|
|
81 |
}
|
82 |
}, 10, 3);
|
83 |
|
84 |
-
add_action('
|
85 |
-
$this->generate_css_files();
|
86 |
-
});
|
87 |
-
|
88 |
-
add_action('blocksy:dynamic-css:regenere_css_files', function () {
|
89 |
$this->generate_css_files();
|
90 |
});
|
91 |
|
64 |
'type' => 'ct-switch',
|
65 |
'value' => 'no',
|
66 |
'setting' => [ 'transport' => 'postMessage' ],
|
67 |
+
'desc' => __( 'Enable this option if you want to remove WordPress emojis script in order to improve the performance.', 'blc' )
|
68 |
];
|
69 |
|
70 |
$opts[blocksy_rand_md5()] = [
|
81 |
}
|
82 |
}, 10, 3);
|
83 |
|
84 |
+
add_action('blocksy:dynamic-css:refresh-caches', function () {
|
|
|
|
|
|
|
|
|
85 |
$this->generate_css_files();
|
86 |
});
|
87 |
|
framework/features/google-analytics.php
CHANGED
@@ -11,7 +11,7 @@ class GoogleAnalytics {
|
|
11 |
|
12 |
if (is_admin()) return;
|
13 |
|
14 |
-
add_action('
|
15 |
if (is_admin()) return;
|
16 |
|
17 |
if (class_exists('BlocksyExtensionCookiesConsent')) {
|
@@ -60,8 +60,6 @@ class GoogleAnalytics {
|
|
60 |
|
61 |
<?php
|
62 |
};
|
63 |
-
|
64 |
-
|
65 |
});
|
66 |
}
|
67 |
|
@@ -86,7 +84,7 @@ class GoogleAnalytics {
|
|
86 |
'value' => '',
|
87 |
'desc' => sprintf(
|
88 |
__(
|
89 |
-
'Insert your Google Analytics
|
90 |
'blc'
|
91 |
),
|
92 |
'<a href="https://support.google.com/analytics/answer/9744165?hl=en">',
|
11 |
|
12 |
if (is_admin()) return;
|
13 |
|
14 |
+
add_action('wp_print_scripts', function () {
|
15 |
if (is_admin()) return;
|
16 |
|
17 |
if (class_exists('BlocksyExtensionCookiesConsent')) {
|
60 |
|
61 |
<?php
|
62 |
};
|
|
|
|
|
63 |
});
|
64 |
}
|
65 |
|
84 |
'value' => '',
|
85 |
'desc' => sprintf(
|
86 |
__(
|
87 |
+
'Insert your Google Analytics measurement ID. More instructions can be found %shere%s.',
|
88 |
'blc'
|
89 |
),
|
90 |
'<a href="https://support.google.com/analytics/answer/9744165?hl=en">',
|
framework/features/header.php
CHANGED
@@ -183,47 +183,29 @@ class HeaderAdditions {
|
|
183 |
10, 3
|
184 |
);
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
add_filter('blocksy:header:dynamic-styles-args', function ($args) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
$args['has_transparent_header'] = $this->current_screen_has_transparent(false);
|
188 |
-
$args['has_sticky_header'] = $this->current_screen_has_sticky();
|
189 |
|
190 |
return $args;
|
191 |
});
|
192 |
|
193 |
-
add_filter('blocksy:header:default_value', function ($value, $header_builder) {
|
194 |
-
$value['sections'][] = $header_builder->get_structure_for([
|
195 |
-
'id' => 'ct-custom-transparent',
|
196 |
-
'name' => __('Transparent', 'blocksy'),
|
197 |
-
'mode' => 'placements',
|
198 |
-
'settings' => [
|
199 |
-
'is_absolute' => 'yes'
|
200 |
-
],
|
201 |
-
'items' => [
|
202 |
-
'desktop' => [
|
203 |
-
'middle-row' => [
|
204 |
-
'start' => ['logo'],
|
205 |
-
'end' => ['menu', 'search']
|
206 |
-
]
|
207 |
-
],
|
208 |
-
|
209 |
-
'mobile' => [
|
210 |
-
'middle-row' => [
|
211 |
-
'start' => ['logo'],
|
212 |
-
'end' => ['trigger']
|
213 |
-
],
|
214 |
-
|
215 |
-
'offcanvas' => [
|
216 |
-
'start' => [
|
217 |
-
'mobile-menu',
|
218 |
-
]
|
219 |
-
]
|
220 |
-
]
|
221 |
-
]
|
222 |
-
]);
|
223 |
-
|
224 |
-
return $value;
|
225 |
-
}, 10, 2);
|
226 |
-
|
227 |
add_filter('blocksy:header:items-paths', function ($paths) {
|
228 |
$paths[] = dirname(__FILE__) . '/header/items';
|
229 |
return $paths;
|
@@ -309,14 +291,20 @@ class HeaderAdditions {
|
|
309 |
|
310 |
wp_enqueue_style(
|
311 |
'blocksy-styles',
|
312 |
-
BLOCKSY_URL . 'static/bundle/options.css',
|
313 |
[],
|
314 |
$data['Version']
|
315 |
);
|
316 |
}
|
317 |
|
318 |
public function current_screen_has_transparent($check_conditions = true) {
|
319 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
$current_section = blocksy_manager()->header_builder->get_current_section();
|
321 |
|
322 |
if (! isset($current_section['settings'])) {
|
@@ -386,9 +374,18 @@ class HeaderAdditions {
|
|
386 |
]
|
387 |
]
|
388 |
))
|
389 |
-
)
|
390 |
-
|
391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
)
|
393 |
) {
|
394 |
$this->has_transparent_header = $transparent_result;
|
@@ -398,21 +395,28 @@ class HeaderAdditions {
|
|
398 |
return $this->has_transparent_header;
|
399 |
}
|
400 |
|
401 |
-
public function current_screen_has_sticky() {
|
402 |
-
if (
|
403 |
-
$
|
|
|
|
|
|
|
|
|
|
|
404 |
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
|
409 |
-
|
|
|
|
|
410 |
|
411 |
-
|
412 |
-
$this->has_sticky_header = false;
|
413 |
-
return $this->has_sticky_header;
|
414 |
-
}
|
415 |
|
|
|
|
|
|
|
416 |
$atts = $current_section['settings'];
|
417 |
|
418 |
$sticky_behaviour = blocksy_akg(
|
@@ -424,7 +428,7 @@ class HeaderAdditions {
|
|
424 |
]
|
425 |
);
|
426 |
|
427 |
-
$
|
428 |
'devices' => [],
|
429 |
|
430 |
// top
|
@@ -444,13 +448,15 @@ class HeaderAdditions {
|
|
444 |
continue;
|
445 |
}
|
446 |
|
447 |
-
$
|
448 |
}
|
|
|
449 |
|
450 |
-
|
|
|
451 |
}
|
452 |
|
453 |
-
return $
|
454 |
}
|
455 |
|
456 |
public function patch_conditions($post_id, $old_post_id) {
|
183 |
10, 3
|
184 |
);
|
185 |
|
186 |
+
add_filter('blocksy:general:body-header-attr', function ($attr) {
|
187 |
+
if ($this->current_screen_has_sticky()) {
|
188 |
+
return $attr .= ':sticky';
|
189 |
+
}
|
190 |
+
|
191 |
+
return $attr;
|
192 |
+
});
|
193 |
+
|
194 |
add_filter('blocksy:header:dynamic-styles-args', function ($args) {
|
195 |
+
$check_transparent_conditions = false;
|
196 |
+
|
197 |
+
if (isset($args['check_transparent_conditions'])) {
|
198 |
+
$check_transparent_conditions = $args[
|
199 |
+
'check_transparent_conditions'
|
200 |
+
];
|
201 |
+
}
|
202 |
+
|
203 |
$args['has_transparent_header'] = $this->current_screen_has_transparent(false);
|
204 |
+
$args['has_sticky_header'] = $this->current_screen_has_sticky($args['section_id']);
|
205 |
|
206 |
return $args;
|
207 |
});
|
208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
add_filter('blocksy:header:items-paths', function ($paths) {
|
210 |
$paths[] = dirname(__FILE__) . '/header/items';
|
211 |
return $paths;
|
291 |
|
292 |
wp_enqueue_style(
|
293 |
'blocksy-styles',
|
294 |
+
BLOCKSY_URL . 'static/bundle/options.min.css',
|
295 |
[],
|
296 |
$data['Version']
|
297 |
);
|
298 |
}
|
299 |
|
300 |
public function current_screen_has_transparent($check_conditions = true) {
|
301 |
+
if (
|
302 |
+
true
|
303 |
+
||
|
304 |
+
$this->has_transparent_header === '__DEFAULT__'
|
305 |
+
||
|
306 |
+
! $check_conditions
|
307 |
+
) {
|
308 |
$current_section = blocksy_manager()->header_builder->get_current_section();
|
309 |
|
310 |
if (! isset($current_section['settings'])) {
|
374 |
]
|
375 |
]
|
376 |
))
|
377 |
+
)
|
378 |
+
||
|
379 |
+
$current_section['id'] !== 'type-1'
|
380 |
+
||
|
381 |
+
! $check_conditions
|
382 |
+
)
|
383 |
+
&&
|
384 |
+
apply_filters(
|
385 |
+
'blocksy:header:transparent:current-screen-allowed',
|
386 |
+
true,
|
387 |
+
$current_section,
|
388 |
+
$transparent_result
|
389 |
)
|
390 |
) {
|
391 |
$this->has_transparent_header = $transparent_result;
|
395 |
return $this->has_transparent_header;
|
396 |
}
|
397 |
|
398 |
+
public function current_screen_has_sticky($section_id = null) {
|
399 |
+
if (
|
400 |
+
$this->has_sticky_header !== '__DEFAULT__'
|
401 |
+
&&
|
402 |
+
! $section_id
|
403 |
+
) {
|
404 |
+
return $this->has_sticky_header;
|
405 |
+
}
|
406 |
|
407 |
+
$current_section = blocksy_manager()->header_builder->get_current_section(
|
408 |
+
$section_id
|
409 |
+
);
|
410 |
|
411 |
+
if (! isset($current_section['settings'])) {
|
412 |
+
$current_section['settings'] = [];
|
413 |
+
}
|
414 |
|
415 |
+
$atts = $current_section['settings'];
|
|
|
|
|
|
|
416 |
|
417 |
+
if (blocksy_akg('has_sticky_header', $atts, 'no') === 'no') {
|
418 |
+
$has_sticky_header_result = false;
|
419 |
+
} else {
|
420 |
$atts = $current_section['settings'];
|
421 |
|
422 |
$sticky_behaviour = blocksy_akg(
|
428 |
]
|
429 |
);
|
430 |
|
431 |
+
$has_sticky_header_result = [
|
432 |
'devices' => [],
|
433 |
|
434 |
// top
|
448 |
continue;
|
449 |
}
|
450 |
|
451 |
+
$has_sticky_header_result['devices'][] = $device;
|
452 |
}
|
453 |
+
}
|
454 |
|
455 |
+
if ($section_id) {
|
456 |
+
$this->has_sticky_header = $has_sticky_header_result;
|
457 |
}
|
458 |
|
459 |
+
return $has_sticky_header_result;
|
460 |
}
|
461 |
|
462 |
public function patch_conditions($post_id, $old_post_id) {
|
framework/features/header/account-modal.php
CHANGED
@@ -1,17 +1,36 @@
|
|
1 |
<?php
|
2 |
|
3 |
$users_can_register = get_option('users_can_register');
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
?>
|
7 |
|
8 |
<div id="account-modal" class="ct-panel" data-behaviour="modal">
|
9 |
<div class="ct-panel-actions">
|
10 |
-
<
|
11 |
-
<
|
12 |
-
<
|
13 |
-
</
|
14 |
-
</
|
15 |
</div>
|
16 |
|
17 |
<div class="ct-panel-content">
|
@@ -29,105 +48,17 @@ $users_can_register = get_option('users_can_register');
|
|
29 |
<?php } ?>
|
30 |
|
31 |
<section class="ct-login-form active">
|
32 |
-
<?php
|
33 |
-
|
34 |
-
<form name="loginform" id="loginform" action="<?php echo wp_login_url() ?>" method="post">
|
35 |
-
<?php do_action('woocommerce_login_form_start'); ?>
|
36 |
-
<?php do_action('blocksy:account:modal:login:start'); ?>
|
37 |
-
|
38 |
-
<p class="login-username">
|
39 |
-
<label for="user_login"><?php echo __('Email Address', 'blc') ?></label>
|
40 |
-
<input type="text" name="log" id="user_login" class="input" value="" size="20">
|
41 |
-
</p>
|
42 |
-
|
43 |
-
<p class="login-password">
|
44 |
-
<label for="user_pass"><?php echo __('Password', 'blc') ?></label>
|
45 |
-
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20">
|
46 |
-
</p>
|
47 |
-
|
48 |
-
<p class="login-remember col-2">
|
49 |
-
<label>
|
50 |
-
<input name="rememberme" type="checkbox" id="rememberme" value="forever">
|
51 |
-
<?php echo __('Remember Me', 'blc') ?>
|
52 |
-
</label>
|
53 |
-
|
54 |
-
<a href="<?php echo wp_lostpassword_url() ?>" class="ct-forgot-password">
|
55 |
-
<?php echo __('Forgot Password?', 'blc') ?>
|
56 |
-
</a>
|
57 |
-
</p>
|
58 |
-
|
59 |
-
<?php do_action('login_form') ?>
|
60 |
-
|
61 |
-
<p class="login-submit">
|
62 |
-
<button name="wp-submit" class="ct-button">
|
63 |
-
<?php echo __('Log In', 'blc') ?>
|
64 |
-
</button>
|
65 |
-
|
66 |
-
<input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>">
|
67 |
-
</p>
|
68 |
-
|
69 |
-
<?php do_action('blocksy:account:modal:login:end'); ?>
|
70 |
-
<?php do_action('woocommerce_login_form_end'); ?>
|
71 |
-
</form>
|
72 |
</section>
|
73 |
|
74 |
<?php if ($users_can_register) { ?>
|
75 |
<section class="ct-register-form">
|
76 |
-
|
77 |
-
<form name="registerform" id="registerform" action="<?php echo wp_registration_url() ?>" method="post" novalidate="novalidate">
|
78 |
-
<?php do_action('woocommerce_register_form_start') ?>
|
79 |
-
<?php do_action('blocksy:account:modal:register:start'); ?>
|
80 |
-
|
81 |
-
<p>
|
82 |
-
<label for="user_login_register"><?php echo __('Username', 'blc') ?></label>
|
83 |
-
<input type="text" name="user_login" id="user_login_register" class="input" value="" size="20" autocapitalize="off">
|
84 |
-
</p>
|
85 |
-
|
86 |
-
<p>
|
87 |
-
<label for="user_email"><?php echo __('Email', 'blc') ?></label>
|
88 |
-
<input type="email" name="user_email" id="user_email" class="input" value="" size="25">
|
89 |
-
</p>
|
90 |
-
|
91 |
-
<?php do_action('register_form') ?>
|
92 |
-
|
93 |
-
<p id="reg_passmail">
|
94 |
-
<?php echo __('Registration confirmation will be emailed to you', 'blc') ?>
|
95 |
-
</p>
|
96 |
-
|
97 |
-
<p>
|
98 |
-
<button name="wp-submit" class="ct-button">
|
99 |
-
<?php echo __('Register', 'blc') ?>
|
100 |
-
</button>
|
101 |
-
|
102 |
-
<!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
|
103 |
-
</p>
|
104 |
-
|
105 |
-
<?php do_action('blocksy:account:modal:register:end'); ?>
|
106 |
-
<?php do_action('woocommerce_register_form_end') ?>
|
107 |
-
</form>
|
108 |
-
|
109 |
</section>
|
110 |
<?php } ?>
|
111 |
|
112 |
<section class="ct-forgot-password-form">
|
113 |
-
|
114 |
-
<?php do_action('blocksy:account:modal:lostpassword:start'); ?>
|
115 |
-
|
116 |
-
<p>
|
117 |
-
<label for="user_login_forgot"><?php echo __('Username or Email Address', 'blc')?></label>
|
118 |
-
<input type="text" name="user_login" id="user_login_forgot" class="input" value="" size="20" autocapitalize="off" required>
|
119 |
-
</p>
|
120 |
-
|
121 |
-
<p>
|
122 |
-
<button name="wp-submit" class="ct-button">
|
123 |
-
<?php echo __('Get New Password', 'blc') ?>
|
124 |
-
</button>
|
125 |
-
|
126 |
-
<!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
|
127 |
-
</p>
|
128 |
-
|
129 |
-
<?php do_action('blocksy:account:modal:lostpassword:end'); ?>
|
130 |
-
</form>
|
131 |
|
132 |
<a href="<?php echo wp_login_url() ?>" class="ct-back-to-login ct-login">
|
133 |
← <?php echo __('Back to login', 'blc') ?>
|
1 |
<?php
|
2 |
|
3 |
$users_can_register = get_option('users_can_register');
|
4 |
+
|
5 |
+
if (get_option('woocommerce_enable_myaccount_registration') === 'yes') {
|
6 |
+
$users_can_register = true;
|
7 |
+
}
|
8 |
+
|
9 |
+
$form_views = [
|
10 |
+
'login' => '',
|
11 |
+
'register' => '',
|
12 |
+
'lostpassword' => ''
|
13 |
+
];
|
14 |
+
|
15 |
+
foreach ($form_views as $form_key => $value) {
|
16 |
+
$form_views[$form_key] = apply_filters(
|
17 |
+
'blocksy:header:account-modal:views:' . $form_key . '-form',
|
18 |
+
blocksy_render_view(
|
19 |
+
dirname(__FILE__) . '/modal/' . $form_key . '.php',
|
20 |
+
[]
|
21 |
+
)
|
22 |
+
);
|
23 |
+
}
|
24 |
|
25 |
?>
|
26 |
|
27 |
<div id="account-modal" class="ct-panel" data-behaviour="modal">
|
28 |
<div class="ct-panel-actions">
|
29 |
+
<span class="ct-close-button">
|
30 |
+
<svg class="ct-icon" width="12" height="12" viewBox="0 0 15 15">
|
31 |
+
<path d="M1 15a1 1 0 01-.71-.29 1 1 0 010-1.41l5.8-5.8-5.8-5.8A1 1 0 011.7.29l5.8 5.8 5.8-5.8a1 1 0 011.41 1.41l-5.8 5.8 5.8 5.8a1 1 0 01-1.41 1.41l-5.8-5.8-5.8 5.8A1 1 0 011 15z"/>
|
32 |
+
</svg>
|
33 |
+
</span>
|
34 |
</div>
|
35 |
|
36 |
<div class="ct-panel-content">
|
48 |
<?php } ?>
|
49 |
|
50 |
<section class="ct-login-form active">
|
51 |
+
<?php echo $form_views['login'] ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
</section>
|
53 |
|
54 |
<?php if ($users_can_register) { ?>
|
55 |
<section class="ct-register-form">
|
56 |
+
<?php echo $form_views['register'] ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
</section>
|
58 |
<?php } ?>
|
59 |
|
60 |
<section class="ct-forgot-password-form">
|
61 |
+
<?php echo $form_views['lostpassword'] ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
<a href="<?php echo wp_login_url() ?>" class="ct-back-to-login ct-login">
|
64 |
← <?php echo __('Back to login', 'blc') ?>
|
framework/features/header/items/account/config.php
CHANGED
@@ -19,7 +19,8 @@ $config = [
|
|
19 |
],
|
20 |
|
21 |
'translation_keys' => [
|
22 |
-
['key' => 'login_label']
|
|
|
23 |
]
|
24 |
];
|
25 |
|
19 |
],
|
20 |
|
21 |
'translation_keys' => [
|
22 |
+
['key' => 'login_label'],
|
23 |
+
['key' => 'account_custom_page']
|
24 |
]
|
25 |
];
|
26 |
|
framework/features/header/items/account/dynamic-styles.php
CHANGED
@@ -399,9 +399,9 @@ blocksy_output_colors([
|
|
399 |
], [
|
400 |
'selector' => [$root_selector[0]],
|
401 |
'operation' => 'suffix',
|
402 |
-
'to_add' => '#account-modal .close-button'
|
403 |
])),
|
404 |
-
'variable' => '
|
405 |
],
|
406 |
|
407 |
'hover' => [
|
@@ -413,9 +413,9 @@ blocksy_output_colors([
|
|
413 |
], [
|
414 |
'selector' => [$root_selector[0]],
|
415 |
'operation' => 'suffix',
|
416 |
-
'to_add' => '#account-modal .close-button'
|
417 |
])),
|
418 |
-
'variable' => '
|
419 |
]
|
420 |
],
|
421 |
]);
|
@@ -438,7 +438,7 @@ blocksy_output_colors([
|
|
438 |
], [
|
439 |
'selector' => [$root_selector[0]],
|
440 |
'operation' => 'suffix',
|
441 |
-
'to_add' => '#account-modal .close-button'
|
442 |
])),
|
443 |
'variable' => 'closeButtonBackground'
|
444 |
],
|
@@ -452,7 +452,7 @@ blocksy_output_colors([
|
|
452 |
], [
|
453 |
'selector' => [$root_selector[0]],
|
454 |
'operation' => 'suffix',
|
455 |
-
'to_add' => '#account-modal .close-button'
|
456 |
])),
|
457 |
'variable' => 'closeButtonHoverBackground'
|
458 |
]
|
399 |
], [
|
400 |
'selector' => [$root_selector[0]],
|
401 |
'operation' => 'suffix',
|
402 |
+
'to_add' => '#account-modal .ct-close-button'
|
403 |
])),
|
404 |
+
'variable' => 'icon-color'
|
405 |
],
|
406 |
|
407 |
'hover' => [
|
413 |
], [
|
414 |
'selector' => [$root_selector[0]],
|
415 |
'operation' => 'suffix',
|
416 |
+
'to_add' => '#account-modal .ct-close-button'
|
417 |
])),
|
418 |
+
'variable' => 'icon-hover-color'
|
419 |
]
|
420 |
],
|
421 |
]);
|
438 |
], [
|
439 |
'selector' => [$root_selector[0]],
|
440 |
'operation' => 'suffix',
|
441 |
+
'to_add' => '#account-modal .ct-close-button'
|
442 |
])),
|
443 |
'variable' => 'closeButtonBackground'
|
444 |
],
|
452 |
], [
|
453 |
'selector' => [$root_selector[0]],
|
454 |
'operation' => 'suffix',
|
455 |
+
'to_add' => '#account-modal .ct-close-button'
|
456 |
])),
|
457 |
'variable' => 'closeButtonHoverBackground'
|
458 |
]
|
framework/features/header/items/account/options.php
CHANGED
@@ -1,5 +1,23 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
$options = [
|
4 |
blocksy_rand_md5() => [
|
5 |
'type' => 'ct-title',
|
@@ -45,15 +63,7 @@ $options = [
|
|
45 |
'value' => 'profile',
|
46 |
'view' => 'text',
|
47 |
'design' => 'inline',
|
48 |
-
'choices' => blocksy_ordered_keys(
|
49 |
-
[
|
50 |
-
'profile' => __( 'Profile Page', 'blc' ),
|
51 |
-
'dashboard' => __( 'Dashboard Page', 'blc' ),
|
52 |
-
// 'menu' => __( 'Menu', 'blc' ),
|
53 |
-
'custom' => __( 'Custom Link', 'blc' ),
|
54 |
-
'logout' => __( 'Logout', 'blc' ),
|
55 |
-
]
|
56 |
-
),
|
57 |
],
|
58 |
|
59 |
blocksy_rand_md5() => [
|
@@ -304,12 +314,7 @@ $options = [
|
|
304 |
'view' => 'text',
|
305 |
'design' => 'inline',
|
306 |
'setting' => [ 'transport' => 'postMessage' ],
|
307 |
-
'choices' => blocksy_ordered_keys(
|
308 |
-
[
|
309 |
-
'modal' => __( 'Modal', 'blc' ),
|
310 |
-
'custom' => __( 'Custom Link', 'blc' ),
|
311 |
-
]
|
312 |
-
),
|
313 |
],
|
314 |
|
315 |
blocksy_rand_md5() => [
|
@@ -788,7 +793,7 @@ $options = [
|
|
788 |
|
789 |
blocksy_rand_md5() => [
|
790 |
'type' => 'ct-condition',
|
791 |
-
'condition' => [
|
792 |
'account_state' => 'out',
|
793 |
'login_account_action' => 'modal'
|
794 |
],
|
1 |
<?php
|
2 |
|
3 |
+
$link_options = [
|
4 |
+
'profile' => __( 'Profile Page', 'blc' ),
|
5 |
+
'dashboard' => __( 'Dashboard Page', 'blc' ),
|
6 |
+
// 'menu' => __( 'Menu', 'blc' ),
|
7 |
+
'custom' => __( 'Custom Link', 'blc' ),
|
8 |
+
'logout' => __( 'Logout', 'blc' ),
|
9 |
+
];
|
10 |
+
|
11 |
+
$logout_link_options = [
|
12 |
+
'modal' => __( 'Modal', 'blc' ),
|
13 |
+
'custom' => __( 'Custom Link', 'blc' ),
|
14 |
+
];
|
15 |
+
|
16 |
+
if (class_exists('WooCommerce')) {
|
17 |
+
$link_options['woocommerce_account'] = __('WooCommerce Account', 'blc');
|
18 |
+
$logout_link_options['woocommerce_account'] = __('WooCommerce Account', 'blc');
|
19 |
+
}
|
20 |
+
|
21 |
$options = [
|
22 |
blocksy_rand_md5() => [
|
23 |
'type' => 'ct-title',
|
63 |
'value' => 'profile',
|
64 |
'view' => 'text',
|
65 |
'design' => 'inline',
|
66 |
+
'choices' => blocksy_ordered_keys($link_options)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
],
|
68 |
|
69 |
blocksy_rand_md5() => [
|
314 |
'view' => 'text',
|
315 |
'design' => 'inline',
|
316 |
'setting' => [ 'transport' => 'postMessage' ],
|
317 |
+
'choices' => blocksy_ordered_keys($logout_link_options)
|
|
|
|
|
|
|
|
|
|
|
318 |
],
|
319 |
|
320 |
blocksy_rand_md5() => [
|
793 |
|
794 |
blocksy_rand_md5() => [
|
795 |
'type' => 'ct-condition',
|
796 |
+
'condition' => [
|
797 |
'account_state' => 'out',
|
798 |
'login_account_action' => 'modal'
|
799 |
],
|
framework/features/header/items/account/sync.js
CHANGED
@@ -83,6 +83,34 @@ ctEvents.on(
|
|
83 |
responsive: true,
|
84 |
},
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
accountHeaderMargin: {
|
87 |
selector: assembleSelector(getRootSelectorFor({ itemId })),
|
88 |
type: 'spacing',
|
83 |
responsive: true,
|
84 |
},
|
85 |
|
86 |
+
account_close_button_color: [
|
87 |
+
{
|
88 |
+
selector: '#account-modal .ct-close-button',
|
89 |
+
variable: 'icon-color',
|
90 |
+
type: 'color:default',
|
91 |
+
},
|
92 |
+
|
93 |
+
{
|
94 |
+
selector: '#account-modal .ct-close-button',
|
95 |
+
variable: 'icon-hover-color',
|
96 |
+
type: 'color:hover',
|
97 |
+
},
|
98 |
+
],
|
99 |
+
|
100 |
+
account_close_button_shape_color: [
|
101 |
+
{
|
102 |
+
selector: '#account-modal .ct-close-button',
|
103 |
+
variable: 'closeButtonBackground',
|
104 |
+
type: 'color:default',
|
105 |
+
},
|
106 |
+
|
107 |
+
{
|
108 |
+
selector: '#account-modal .ct-close-button',
|
109 |
+
variable: 'closeButtonHoverBackground',
|
110 |
+
type: 'color:hover',
|
111 |
+
},
|
112 |
+
],
|
113 |
+
|
114 |
accountHeaderMargin: {
|
115 |
selector: assembleSelector(getRootSelectorFor({ itemId })),
|
116 |
type: 'spacing',
|
framework/features/header/items/account/view.php
CHANGED
@@ -13,17 +13,18 @@ if (is_customize_preview()) {
|
|
13 |
}
|
14 |
|
15 |
$icon = apply_filters('blocksy:header:account:icons', [
|
16 |
-
'type-1' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M7.5
|
17 |
|
18 |
-
'type-2' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="
|
19 |
|
20 |
-
'type-3' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="
|
|
|
21 |
|
22 |
'type-4' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M7.5 0C3.4 0 0 3.4 0 7.5S3.4 15 7.5 15 15 11.6 15 7.5 11.6 0 7.5 0zm0 2.1c1.4 0 2.5 1.1 2.5 2.4S8.9 7 7.5 7 5 5.9 5 4.5s1.1-2.4 2.5-2.4zm0 11.4c-2.1 0-3.9-1-5-2.6C3.4 9.6 6 9 7.5 9s4.1.6 5 1.9c-1.1 1.6-2.9 2.6-5 2.6z"/></svg>',
|
23 |
|
24 |
-
'type-5' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M7.5
|
25 |
|
26 |
-
'type-6' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M14.
|
27 |
]);
|
28 |
|
29 |
$path = 'login';
|
13 |
}
|
14 |
|
15 |
$icon = apply_filters('blocksy:header:account:icons', [
|
16 |
+
'type-1' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M7.5,0C3.4,0,0,3.4,0,7.5c0,1.7,0.5,3.2,1.5,4.5c1.4,1.9,3.6,3,6,3s4.6-1.1,6-3c1-1.3,1.5-2.9,1.5-4.5C15,3.4,11.6,0,7.5,0zM7.5,13.5c-1.4,0-2.8-0.5-3.8-1.4c1.1-0.9,2.4-1.4,3.8-1.4s2.8,0.5,3.8,1.4C10.3,13,8.9,13.5,7.5,13.5z M12.3,11c-1.3-1.1-3-1.8-4.8-1.8S4,9.9,2.7,11c-0.8-1-1.2-2.2-1.2-3.5c0-3.3,2.7-6,6-6s6,2.7,6,6C13.5,8.8,13.1,10,12.3,11zM7.5,3C6.1,3,5,4.1,5,5.5S6.1,8,7.5,8S10,6.9,10,5.5S8.9,3,7.5,3zM7.5,6.5c-0.5,0-1-0.5-1-1s0.5-1,1-1s1,0.5,1,1S8,6.5,7.5,6.5z"/></svg>',
|
17 |
|
18 |
+
'type-2' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M13,7V6.1h0V3.9c0-1.4-1.1-2.6-2.6-2.6H9.7c0,0-0.6-1.3-3.2-1.3C4.1,0,1.9,2,2,4.5V7C1.4,7.4,1,8.1,1,8.8c0,0.9,0.6,1.8,1.4,2.1c0.8,2.1,2.7,3.7,4.9,4l0.1,0l0.1,0c2.3-0.4,4.1-1.9,5-4c0.8-0.3,1.4-1.2,1.4-2.1C14,8.1,13.6,7.4,13,7zM11.9,9.6l-0.5,0.1l-0.1,0.4c-0.5,1.7-2,3-3.8,3.3c-1.8-0.3-3.2-1.6-3.8-3.4L3.6,9.6L3.1,9.6C2.8,9.5,2.5,9.2,2.5,8.8c0-0.3,0.2-0.6,0.5-0.7L3.5,8V6.5h2.2c1.1,0,2-0.5,2.4-1.3h1.6c0.8,0,1.6,0.5,1.8,1.3V8L12,8.2c0.3,0.1,0.5,0.4,0.5,0.7C12.5,9.3,12.2,9.6,11.9,9.6z"/></svg>',
|
19 |
|
20 |
+
'type-3' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M10.5,9h-6c-2.1,0-3.8,1.7-3.8,3.8v1.5c0,0.4,0.3,0.8,0.8,0.8s0.8-0.3,0.8-0.8v-1.5c0-1.2,1-2.2,2.2-2.2h6c1.2,0,2.2,1,2.2,2.2v1.5c0,0.4,0.3,0.8,0.8,0.8s0.8-0.3,0.8-0.8v-1.5C14.2,10.7,12.6,9,10.5,9zM7.5,7C9.4,7,11,5.4,11,3.5
|
21 |
+
S9.4,0,7.5,0S4,1.6,4,3.5S5.6,7,7.5,7zM7.5,1.5c1.1,0,2,0.9,2,2s-0.9,2-2,2s-2-0.9-2-2S6.4,1.5,7.5,1.5z"/></svg>',
|
22 |
|
23 |
'type-4' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M7.5 0C3.4 0 0 3.4 0 7.5S3.4 15 7.5 15 15 11.6 15 7.5 11.6 0 7.5 0zm0 2.1c1.4 0 2.5 1.1 2.5 2.4S8.9 7 7.5 7 5 5.9 5 4.5s1.1-2.4 2.5-2.4zm0 11.4c-2.1 0-3.9-1-5-2.6C3.4 9.6 6 9 7.5 9s4.1.6 5 1.9c-1.1 1.6-2.9 2.6-5 2.6z"/></svg>',
|
24 |
|
25 |
+
'type-5' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M7.5,0C3.4,0,0,3.4,0,7.5S3.4,15,7.5,15S15,11.6,15,7.5S11.6,0,7.5,0z M11.6,11.9c-0.5-0.6-1.5-1-2.7-1.3c0,0-0.6-0.2-0.4-0.7c0.6-0.6,0.7-1.1,0.7-1.2c0,0,0.6-0.5,0.6-1.1C10,7,9.8,6.9,9.8,6.9c0.2-0.7,0.3-3.3-1.4-3C8.1,3.4,6.4,3,5.7,4.4C5.3,5.1,5.1,6.2,5.5,6.9c0,0-0.1-0.1-0.2,0.3c0,0.4,0.2,0.9,0.4,1.1c0.1,0.1,0.2,0.2,0.3,0.2c0,0,0.1,0.6,0.6,1.2c0.1,0.6-0.4,0.8-0.4,0.8c-1.2,0.2-2.3,0.7-2.7,1.4c-1.2-1.1-1.9-2.6-1.9-4.4c0-3.3,2.7-6,6-6s6,2.7,6,6C13.5,9.2,12.8,10.8,11.6,11.9z"/></svg>',
|
26 |
|
27 |
+
'type-6' => '<svg class="ct-icon" width="15" height="15" viewBox="0 0 15 15"><path d="M14.2,5.2l-6.3-5C7.6-0.1,7.2-0.1,7,0.2l-6.2,5C0.6,5.3,0.5,5.5,0.5,5.7v7.5c0,1,0.8,1.8,1.8,1.8h10.5c1,0,1.8-0.8,1.8-1.8V5.7C14.5,5.5,14.4,5.3,14.2,5.2z M8.8,13.5H6.3V9h2.5V13.5zM13,13.2c0,0.1-0.1,0.2-0.2,0.2h-2.5V8.2c0-0.4-0.3-0.8-0.8-0.8h-4c-0.4,0-0.8,0.3-0.8,0.8v5.2H2.3c-0.1,0-0.2-0.1-0.2-0.2V6.1l5.4-4.4L13,6.1V13.2z"/></svg>',
|
28 |
]);
|
29 |
|
30 |
$path = 'login';
|
framework/features/header/items/account/views/login.php
CHANGED
@@ -26,6 +26,10 @@ if ($account_link === 'custom') {
|
|
26 |
$link = blocksy_akg('account_custom_page', $atts, '');
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
29 |
// Media
|
30 |
$media_html = '';
|
31 |
$loggedin_media = blocksy_akg('loggedin_media', $atts, 'avatar');
|
@@ -77,7 +81,7 @@ if (! empty($media_html)) {
|
|
77 |
$attr['data-label'] = $loggedin_label_position[$device];
|
78 |
}
|
79 |
|
80 |
-
$attr['href'] = $link;
|
81 |
$attr['aria-label'] = $loggedin_label;
|
82 |
|
83 |
echo '<a ' . blocksy_attr_to_html($attr) . '>';
|
26 |
$link = blocksy_akg('account_custom_page', $atts, '');
|
27 |
}
|
28 |
|
29 |
+
if ($account_link === 'woocommerce_account' && class_exists('WooCommerce')) {
|
30 |
+
$link = get_permalink(get_option('woocommerce_myaccount_page_id'));
|
31 |
+
}
|
32 |
+
|
33 |
// Media
|
34 |
$media_html = '';
|
35 |
$loggedin_media = blocksy_akg('loggedin_media', $atts, 'avatar');
|
81 |
$attr['data-label'] = $loggedin_label_position[$device];
|
82 |
}
|
83 |
|
84 |
+
$attr['href'] = apply_filters('wpml_permalink', $link);
|
85 |
$attr['aria-label'] = $loggedin_label;
|
86 |
|
87 |
echo '<a ' . blocksy_attr_to_html($attr) . '>';
|
framework/features/header/items/account/views/logout.php
CHANGED
@@ -12,10 +12,16 @@ $loggedout_account_label_visibility = blocksy_akg(
|
|
12 |
|
13 |
$link = '#account-modal';
|
14 |
|
15 |
-
|
|
|
|
|
16 |
$link = blocksy_akg('loggedout_account_custom_page', $atts, '');
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
19 |
$loggedout_label_position = blocksy_expand_responsive_value(
|
20 |
blocksy_akg('loggedout_label_position', $atts, 'right')
|
21 |
);
|
12 |
|
13 |
$link = '#account-modal';
|
14 |
|
15 |
+
$login_account_action = blocksy_akg('login_account_action', $atts, 'modal');
|
16 |
+
|
17 |
+
if ($login_account_action === 'custom') {
|
18 |
$link = blocksy_akg('loggedout_account_custom_page', $atts, '');
|
19 |
}
|
20 |
|
21 |
+
if ($login_account_action === 'woocommerce_account') {
|
22 |
+
$link = get_permalink(get_option('woocommerce_myaccount_page_id'));
|
23 |
+
}
|
24 |
+
|
25 |
$loggedout_label_position = blocksy_expand_responsive_value(
|
26 |
blocksy_akg('loggedout_label_position', $atts, 'right')
|
27 |
);
|
framework/features/header/modal/login.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //wp_login_form([]); ?>
|
2 |
+
|
3 |
+
<form name="loginform" id="loginform" action="<?php echo wp_login_url() ?>" method="post">
|
4 |
+
<?php do_action('woocommerce_login_form_start'); ?>
|
5 |
+
<?php do_action('blocksy:account:modal:login:start'); ?>
|
6 |
+
|
7 |
+
<p class="login-username">
|
8 |
+
<label for="user_login"><?php echo __('Email Address', 'blc') ?></label>
|
9 |
+
<input type="text" name="log" id="user_login" class="input" value="" size="20">
|
10 |
+
</p>
|
11 |
+
|
12 |
+
<p class="login-password">
|
13 |
+
<label for="user_pass"><?php echo __('Password', 'blc') ?></label>
|
14 |
+
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20">
|
15 |
+
</p>
|
16 |
+
|
17 |
+
<p class="login-remember col-2">
|
18 |
+
<label>
|
19 |
+
<input name="rememberme" type="checkbox" id="rememberme" value="forever">
|
20 |
+
<?php echo __('Remember Me', 'blc') ?>
|
21 |
+
</label>
|
22 |
+
|
23 |
+
<a href="<?php echo wp_lostpassword_url() ?>" class="ct-forgot-password">
|
24 |
+
<?php echo __('Forgot Password?', 'blc') ?>
|
25 |
+
</a>
|
26 |
+
</p>
|
27 |
+
|
28 |
+
<?php do_action('login_form') ?>
|
29 |
+
|
30 |
+
<p class="login-submit">
|
31 |
+
<button name="wp-submit" class="ct-button">
|
32 |
+
<?php echo __('Log In', 'blc') ?>
|
33 |
+
</button>
|
34 |
+
|
35 |
+
<input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>">
|
36 |
+
</p>
|
37 |
+
|
38 |
+
<?php do_action('blocksy:account:modal:login:end'); ?>
|
39 |
+
<?php do_action('woocommerce_login_form_end'); ?>
|
40 |
+
</form>
|
41 |
+
|
framework/features/header/modal/lostpassword.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<form name="lostpasswordform" id="lostpasswordform" action="<?php echo wp_lostpassword_url() ?>" method="post">
|
2 |
+
<?php do_action('blocksy:account:modal:lostpassword:start'); ?>
|
3 |
+
|
4 |
+
<p>
|
5 |
+
<label for="user_login_forgot"><?php echo __('Username or Email Address', 'blc')?></label>
|
6 |
+
<input type="text" name="user_login" id="user_login_forgot" class="input" value="" size="20" autocapitalize="off" required>
|
7 |
+
</p>
|
8 |
+
|
9 |
+
<p>
|
10 |
+
<button name="wp-submit" class="ct-button">
|
11 |
+
<?php echo __('Get New Password', 'blc') ?>
|
12 |
+
</button>
|
13 |
+
|
14 |
+
<!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
|
15 |
+
</p>
|
16 |
+
|
17 |
+
<?php do_action('blocksy:account:modal:lostpassword:end'); ?>
|
18 |
+
</form>
|
19 |
+
|
framework/features/header/modal/register.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<form name="registerform" id="registerform" action="<?php echo wp_registration_url() ?>" method="post" novalidate="novalidate">
|
2 |
+
<?php do_action('woocommerce_register_form_start') ?>
|
3 |
+
<?php do_action('blocksy:account:modal:register:start'); ?>
|
4 |
+
|
5 |
+
<p>
|
6 |
+
<label for="user_login_register"><?php echo __('Username', 'blc') ?></label>
|
7 |
+
<input type="text" name="user_login" id="user_login_register" class="input" value="" size="20" autocapitalize="off">
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<p>
|
11 |
+
<label for="user_email"><?php echo __('Email', 'blc') ?></label>
|
12 |
+
<input type="email" name="user_email" id="user_email" class="input" value="" size="25">
|
13 |
+
</p>
|
14 |
+
|
15 |
+
<?php do_action('register_form') ?>
|
16 |
+
|
17 |
+
<p id="reg_passmail">
|
18 |
+
<?php echo __('Registration confirmation will be emailed to you', 'blc') ?>
|
19 |
+
</p>
|
20 |
+
|
21 |
+
<p>
|
22 |
+
<button name="wp-submit" class="ct-button">
|
23 |
+
<?php echo __('Register', 'blc') ?>
|
24 |
+
</button>
|
25 |
+
|
26 |
+
<!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
|
27 |
+
</p>
|
28 |
+
|
29 |
+
<?php do_action('blocksy:account:modal:register:end'); ?>
|
30 |
+
<?php do_action('woocommerce_register_form_end') ?>
|
31 |
+
</form>
|
32 |
+
|
framework/helpers/helpers.php
CHANGED
@@ -4,6 +4,49 @@ function blc_get_ext($id) {
|
|
4 |
return \Blocksy\Plugin::instance()->extensions->get($id);
|
5 |
}
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
function blc_get_contacts_output($args = []) {
|
8 |
$args = wp_parse_args($args, [
|
9 |
'data' => [],
|
@@ -67,6 +110,7 @@ function blc_get_contacts_output($args = []) {
|
|
67 |
|
68 |
<ul <?php echo blocksy_attr_to_html($attr) ?>>
|
69 |
<?php foreach ($args['data'] as $single_layer) { ?>
|
|
|
70 |
<li>
|
71 |
<span class="ct-icon-container">
|
72 |
<?php echo $svgs[$single_layer['id']] ?>
|
4 |
return \Blocksy\Plugin::instance()->extensions->get($id);
|
5 |
}
|
6 |
|
7 |
+
if (! function_exists('blc_load_xml_file')) {
|
8 |
+
function blc_load_xml_file($url, $useragent = '') {
|
9 |
+
set_time_limit(100);
|
10 |
+
|
11 |
+
if (ini_get('allow_url_fopen') == true) {
|
12 |
+
$context_options = [
|
13 |
+
"ssl" => [
|
14 |
+
"verify_peer"=>false,
|
15 |
+
"verify_peer_name"=>false,
|
16 |
+
]
|
17 |
+
];
|
18 |
+
|
19 |
+
if (! empty($useragent)) {
|
20 |
+
$context_options['http'] = [
|
21 |
+
'user_agent' => $useragent
|
22 |
+
];
|
23 |
+
}
|
24 |
+
|
25 |
+
return file_get_contents(
|
26 |
+
$url, false,
|
27 |
+
stream_context_create($context_options)
|
28 |
+
);
|
29 |
+
} else if (function_exists('curl_init')) {
|
30 |
+
$curl = curl_init($url);
|
31 |
+
|
32 |
+
if (! empty($useragent)) {
|
33 |
+
curl_setopt($curl, CURLOPT_USERAGENT, $user_agent);
|
34 |
+
}
|
35 |
+
|
36 |
+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
37 |
+
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
|
38 |
+
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
39 |
+
|
40 |
+
$result = curl_exec($curl);
|
41 |
+
curl_close($curl);
|
42 |
+
|
43 |
+
return $result;
|
44 |
+
} else {
|
45 |
+
throw new Exception("Can't load data.");
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
function blc_get_contacts_output($args = []) {
|
51 |
$args = wp_parse_args($args, [
|
52 |
'data' => [],
|
110 |
|
111 |
<ul <?php echo blocksy_attr_to_html($attr) ?>>
|
112 |
<?php foreach ($args['data'] as $single_layer) { ?>
|
113 |
+
<?php if (! $single_layer['enabled']) { continue; }?>
|
114 |
<li>
|
115 |
<span class="ct-icon-container">
|
116 |
<?php echo $svgs[$single_layer['id']] ?>
|
framework/theme-integration.php
CHANGED
@@ -4,6 +4,61 @@ namespace Blocksy;
|
|
4 |
|
5 |
class ThemeIntegration {
|
6 |
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
add_shortcode('blocksy_posts', function ($args, $content) {
|
8 |
$args = wp_parse_args(
|
9 |
$args,
|
@@ -66,12 +121,18 @@ class ThemeIntegration {
|
|
66 |
$terms = [];
|
67 |
|
68 |
foreach ($taxonomies as $taxonomy) {
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
$local_terms = array_map(function ($tax) {
|
70 |
return [
|
71 |
'id' => $tax->term_id,
|
72 |
'name' => $tax->name
|
73 |
];
|
74 |
-
}, get_terms(['taxonomy' => $taxonomy]));
|
75 |
|
76 |
if (empty($local_terms)) {
|
77 |
continue;
|
@@ -86,8 +147,71 @@ class ThemeIntegration {
|
|
86 |
$terms = array_merge($terms, $local_terms);
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
wp_send_json_success([
|
90 |
-
'taxonomies' => $terms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
]);
|
92 |
});
|
93 |
|
@@ -247,30 +371,11 @@ class ThemeIntegration {
|
|
247 |
/*
|
248 |
wp_enqueue_style(
|
249 |
'blocksy-companion-styles',
|
250 |
-
BLOCKSY_URL . 'static/bundle/
|
251 |
['ct-main-styles'],
|
252 |
$data['Version']
|
253 |
);
|
254 |
*/
|
255 |
-
|
256 |
-
wp_enqueue_script(
|
257 |
-
'blocksy-companion-scripts',
|
258 |
-
BLOCKSY_URL . 'static/bundle/main.js',
|
259 |
-
['ct-scripts'],
|
260 |
-
$data['Version'],
|
261 |
-
true
|
262 |
-
);
|
263 |
-
|
264 |
-
$data = [
|
265 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
266 |
-
'public_url' => BLOCKSY_URL . 'framework/extensions/instagram/static/bundle/',
|
267 |
-
];
|
268 |
-
|
269 |
-
wp_localize_script(
|
270 |
-
'blocksy-ext-instagram-scripts',
|
271 |
-
'blocksy_ext_instagram_localization',
|
272 |
-
$data
|
273 |
-
);
|
274 |
});
|
275 |
|
276 |
add_action(
|
@@ -281,7 +386,7 @@ class ThemeIntegration {
|
|
281 |
wp_enqueue_script(
|
282 |
'blocksy-companion-sync-scripts',
|
283 |
BLOCKSY_URL . 'static/bundle/sync.js',
|
284 |
-
['customize-preview', 'wp-date', 'ct-
|
285 |
$data['Version'],
|
286 |
true
|
287 |
);
|
@@ -353,4 +458,66 @@ class ThemeIntegration {
|
|
353 |
'orientation' => ($width > $height) ? 'landscape' : 'portrait'
|
354 |
);
|
355 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
}
|
4 |
|
5 |
class ThemeIntegration {
|
6 |
public function __construct() {
|
7 |
+
add_action(
|
8 |
+
'wp_ajax_blc_implement_user_registration',
|
9 |
+
[$this, 'blc_implement_user_registration']
|
10 |
+
);
|
11 |
+
|
12 |
+
add_action(
|
13 |
+
'wp_ajax_nopriv_blc_implement_user_registration',
|
14 |
+
[$this, 'blc_implement_user_registration']
|
15 |
+
);
|
16 |
+
|
17 |
+
add_filter('blocksy:frontend:dynamic-js-chunks', function ($chunks) {
|
18 |
+
$chunks[] = [
|
19 |
+
'id' => 'blocksy_account',
|
20 |
+
'selector' => implode(', ', [
|
21 |
+
'.ct-header-account[data-state="out"][href*="account-modal"]',
|
22 |
+
'.must-log-in a'
|
23 |
+
]),
|
24 |
+
'url' => blc_call_fn(
|
25 |
+
[
|
26 |
+
'fn' => 'blocksy_cdn_url',
|
27 |
+
'default' => BLOCKSY_URL . 'static/bundle/account.js'
|
28 |
+
],
|
29 |
+
BLOCKSY_URL . 'static/bundle/account.js'
|
30 |
+
),
|
31 |
+
'trigger' => 'click'
|
32 |
+
];
|
33 |
+
|
34 |
+
$chunks[] = [
|
35 |
+
'id' => 'blocksy_dark_mode',
|
36 |
+
'selector' => '[data-id="dark-mode-switcher"]',
|
37 |
+
'url' => blc_call_fn(
|
38 |
+
[
|
39 |
+
'fn' => 'blocksy_cdn_url',
|
40 |
+
'default' => BLOCKSY_URL . 'static/bundle/dark-mode.js'
|
41 |
+
],
|
42 |
+
BLOCKSY_URL . 'static/bundle/dark-mode.js'
|
43 |
+
),
|
44 |
+
'trigger' => 'click'
|
45 |
+
];
|
46 |
+
|
47 |
+
$chunks[] = [
|
48 |
+
'id' => 'blocksy_sticky_header',
|
49 |
+
'selector' => 'header [data-sticky]',
|
50 |
+
'url' => blc_call_fn(
|
51 |
+
[
|
52 |
+
'fn' => 'blocksy_cdn_url',
|
53 |
+
'default' => BLOCKSY_URL . 'static/bundle/sticky.js'
|
54 |
+
],
|
55 |
+
BLOCKSY_URL . 'static/bundle/sticky.js'
|
56 |
+
),
|
57 |
+
];
|
58 |
+
|
59 |
+
return $chunks;
|
60 |
+
});
|
61 |
+
|
62 |
add_shortcode('blocksy_posts', function ($args, $content) {
|
63 |
$args = wp_parse_args(
|
64 |
$args,
|
121 |
$terms = [];
|
122 |
|
123 |
foreach ($taxonomies as $taxonomy) {
|
124 |
+
$taxonomy_object = get_taxonomy($taxonomy);
|
125 |
+
|
126 |
+
if (! $taxonomy_object->public) {
|
127 |
+
continue;
|
128 |
+
}
|
129 |
+
|
130 |
$local_terms = array_map(function ($tax) {
|
131 |
return [
|
132 |
'id' => $tax->term_id,
|
133 |
'name' => $tax->name
|
134 |
];
|
135 |
+
}, get_terms(['taxonomy' => $taxonomy, 'lang' => '']));
|
136 |
|
137 |
if (empty($local_terms)) {
|
138 |
continue;
|
147 |
$terms = array_merge($terms, $local_terms);
|
148 |
}
|
149 |
|
150 |
+
$languages = [];
|
151 |
+
|
152 |
+
if (function_exists('blocksy_get_current_language')) {
|
153 |
+
$languages = blocksy_get_all_i18n_languages();
|
154 |
+
}
|
155 |
+
|
156 |
wp_send_json_success([
|
157 |
+
'taxonomies' => $terms,
|
158 |
+
'languages' => $languages
|
159 |
+
]);
|
160 |
+
});
|
161 |
+
|
162 |
+
add_action('wp_ajax_blocksy_conditions_get_all_posts', function () {
|
163 |
+
if (! current_user_can('manage_options')) {
|
164 |
+
wp_send_json_error();
|
165 |
+
}
|
166 |
+
|
167 |
+
$maybe_input = json_decode(file_get_contents('php://input'), true);
|
168 |
+
|
169 |
+
if (! $maybe_input) {
|
170 |
+
wp_send_json_error();
|
171 |
+
}
|
172 |
+
|
173 |
+
if (! isset($maybe_input['post_type'])) {
|
174 |
+
wp_send_json_error();
|
175 |
+
}
|
176 |
+
|
177 |
+
$query_args = [
|
178 |
+
'posts_per_page' => 10,
|
179 |
+
'post_type' => $maybe_input['post_type']
|
180 |
+
];
|
181 |
+
|
182 |
+
if (
|
183 |
+
isset($maybe_input['search_query'])
|
184 |
+
&&
|
185 |
+
! empty($maybe_input['search_query'])
|
186 |
+
) {
|
187 |
+
if (intval($maybe_input['search_query'])) {
|
188 |
+
$query_args['p'] = intval($maybe_input['search_query']);
|
189 |
+
} else {
|
190 |
+
$query_args['s'] = $maybe_input['search_query'];
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
if (strpos($query_args['post_type'], 'ct_cpt') !== false) {
|
195 |
+
$query_args['post_type'] = array_diff(
|
196 |
+
get_post_types(['public' => true]),
|
197 |
+
['post', 'page', 'attachment', 'ct_content_block']
|
198 |
+
);
|
199 |
+
}
|
200 |
+
|
201 |
+
$query = new \WP_Query($query_args);
|
202 |
+
|
203 |
+
$posts_result = $query->posts;
|
204 |
+
|
205 |
+
if (isset($maybe_input['alsoInclude'])) {
|
206 |
+
$maybe_post = get_post($maybe_input['alsoInclude']);
|
207 |
+
|
208 |
+
if ($maybe_post) {
|
209 |
+
$posts_result[] = $maybe_post;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
wp_send_json_success([
|
214 |
+
'posts' => $posts_result
|
215 |
]);
|
216 |
});
|
217 |
|
371 |
/*
|
372 |
wp_enqueue_style(
|
373 |
'blocksy-companion-styles',
|
374 |
+
BLOCKSY_URL . 'static/bundle/min.css',
|
375 |
['ct-main-styles'],
|
376 |
$data['Version']
|
377 |
);
|
378 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
});
|
380 |
|
381 |
add_action(
|
386 |
wp_enqueue_script(
|
387 |
'blocksy-companion-sync-scripts',
|
388 |
BLOCKSY_URL . 'static/bundle/sync.js',
|
389 |
+
['customize-preview', 'ct-scripts', 'wp-date', 'ct-scripts', 'ct-customizer'],
|
390 |
$data['Version'],
|
391 |
true
|
392 |
);
|
458 |
'orientation' => ($width > $height) ? 'landscape' : 'portrait'
|
459 |
);
|
460 |
}
|
461 |
+
|
462 |
+
public function blc_implement_user_registration() {
|
463 |
+
ob_start();
|
464 |
+
require_once ABSPATH . 'wp-login.php';
|
465 |
+
$res = ob_get_clean();
|
466 |
+
|
467 |
+
$users_can_register = get_option('users_can_register');
|
468 |
+
|
469 |
+
if (get_option('woocommerce_enable_myaccount_registration') === 'yes') {
|
470 |
+
$users_can_register = true;
|
471 |
+
}
|
472 |
+
|
473 |
+
if (! $users_can_register) {
|
474 |
+
exit;
|
475 |
+
}
|
476 |
+
|
477 |
+
$user_login = '';
|
478 |
+
$user_email = '';
|
479 |
+
|
480 |
+
if (
|
481 |
+
isset($_POST['user_login'])
|
482 |
+
&&
|
483 |
+
is_string($_POST['user_login'])
|
484 |
+
) {
|
485 |
+
$user_login = wp_unslash( $_POST['user_login'] );
|
486 |
+
}
|
487 |
+
|
488 |
+
if (isset($_POST['user_email']) && is_string($_POST['user_email'])) {
|
489 |
+
$user_email = wp_unslash( $_POST['user_email'] );
|
490 |
+
}
|
491 |
+
|
492 |
+
$errors = register_new_user($user_login, $user_email);
|
493 |
+
|
494 |
+
if (! is_wp_error($errors)) {
|
495 |
+
$errors = new \WP_Error();
|
496 |
+
|
497 |
+
$errors->add(
|
498 |
+
'registered',
|
499 |
+
sprintf(
|
500 |
+
/* translators: %s: Link to the login page. */
|
501 |
+
__( 'Registration complete. Please check your email, then visit the <a href="%s">login page</a>.' ),
|
502 |
+
wp_login_url()
|
503 |
+
),
|
504 |
+
'message'
|
505 |
+
);
|
506 |
+
|
507 |
+
$redirect_to = admin_url();
|
508 |
+
$errors = apply_filters('wp_login_errors', $errors, $redirect_to);
|
509 |
+
|
510 |
+
login_header(__('Check your email', 'blc'), '', $errors);
|
511 |
+
|
512 |
+
wp_die();
|
513 |
+
}
|
514 |
+
|
515 |
+
login_header(
|
516 |
+
__('Registration Form', 'blc'),
|
517 |
+
'<p class="message register">' . __('Register For This Site', 'blc') . '</p>',
|
518 |
+
$errors
|
519 |
+
);
|
520 |
+
|
521 |
+
wp_die();
|
522 |
+
}
|
523 |
}
|
freemius/assets/img/blocksy-companion.jpg
ADDED
Binary file
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
|
|
5 |
Tested up to: 5.6
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
Stable tag: 1.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -23,6 +23,63 @@ It runs and adds its enhancements only if the Blocksy theme is installed and act
|
|
23 |
2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
|
24 |
|
25 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
1.7.63: 2021-02-24
|
27 |
- Improvement: Cookies consent extension use SameSite=Lax in cookies
|
28 |
- Fix: Correctly order scripts in trending and cookies consent
|
5 |
Tested up to: 5.6
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
+
Stable tag: 1.8.1
|
9 |
|
10 |
== Description ==
|
11 |
|
23 |
2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
|
24 |
|
25 |
== Changelog ==
|
26 |
+
1.8.0: 2021-04-28
|
27 |
+
- New: Account custom link pass through WPML
|
28 |
+
- New: Ratio option for Advertisement widget
|
29 |
+
- New: Header transparent/sticky condition filter
|
30 |
+
- New: Implement PolyLang, TranslatePress and WPML conditions
|
31 |
+
- Improvement: Starter sites improvements
|
32 |
+
- Improvement: Product reviews affiliate link - target option
|
33 |
+
- Improvement: Account element - sign up functionality compatibility with WooCommerce
|
34 |
+
- Improvement: Starter site importer minor improvements
|
35 |
+
- Fix: Correctly initialise widgets in customizer
|
36 |
+
- Fix: Don't look at current screen when inserting sticky CSS
|
37 |
+
- Fix: Product reviews extension featured image
|
38 |
+
- Fix: Sticky header issue when logo has margin
|
39 |
+
|
40 |
+
1.8.0-beta6: 2021-04-23
|
41 |
+
- New: Implement PolyLang, TranslatePress and WPML conditions
|
42 |
+
- Improvement: Starter sites improvements
|
43 |
+
|
44 |
+
1.7.63.8: 2021-04-09
|
45 |
+
- New: Account custom link pass through WPML
|
46 |
+
- New: Ratio option for Advertisement widget
|
47 |
+
- New: Header transparent/sticky condition filter
|
48 |
+
- New: Implement PolyLang and WPML conditions
|
49 |
+
- Improvement: Product reviews affiliate link - target option
|
50 |
+
- Improvement: Account element - sign up functionality compatibility with WooCommerce
|
51 |
+
- Improvement: Starter site importer minor improvements
|
52 |
+
- Fix: Correctly initialise widgets in customizer
|
53 |
+
- Fix: Don't look at current screen when inserting sticky CSS
|
54 |
+
- Fix: Product reviews extension featured image
|
55 |
+
- Fix: Sticky header issue when logo has margin
|
56 |
+
|
57 |
+
1.7.63.7: 2021-04-06
|
58 |
+
- New: Account custom link pass through WPML
|
59 |
+
- New: Ratio option for Advertisement widget
|
60 |
+
- New: Header transparent/sticky condition filter
|
61 |
+
- New: Implement PolyLang and WPML conditions
|
62 |
+
- Improvement: Product reviews affiliate link - target option
|
63 |
+
- Improvement: Account element - sign up functionality compatibility with WooCommerce
|
64 |
+
- Improvement: Starter site importer minor improvements
|
65 |
+
- Fix: Correctly initialise widgets in customizer
|
66 |
+
- Fix: Don't look at current screen when inserting sticky CSS
|
67 |
+
- Fix: Product reviews extension featured image
|
68 |
+
- Fix: Sticky header issue when logo has margin
|
69 |
+
|
70 |
+
1.7.63.6: 2021-04-01
|
71 |
+
- New: Account custom link pass through WPML
|
72 |
+
- New: Ratio option for Advertisement widget
|
73 |
+
- New: Header transparent/sticky condition filter
|
74 |
+
- New: Implement PolyLang and WPML conditions
|
75 |
+
- Improvement: Product reviews affiliate link - target option
|
76 |
+
- Improvement: Account element register tab and WooCommerce
|
77 |
+
- Improvement: Starter site importer minor improvements
|
78 |
+
- Fix: Correctly initialise widgets in customizer
|
79 |
+
- Fix: Don't look at current screen when inserting sticky CSS
|
80 |
+
- Fix: Product reviews extension featured image
|
81 |
+
- Fix: Sticky header issue when logo has margin
|
82 |
+
|
83 |
1.7.63: 2021-02-24
|
84 |
- Improvement: Cookies consent extension use SameSite=Lax in cookies
|
85 |
- Fix: Correctly order scripts in trending and cookies consent
|
static/bundle/account.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){var t={};function r(o){if(t[o])return t[o].exports;var c=t[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(o,c,function(t){return e[t]}.bind(null,c));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var o=r(0),c=r.n(o),n=r(1),a=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");c&&c.remove();var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");n&&n.remove()},s=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-errors");o&&o.remove(),e.closest(".ct-account-form").classList.remove("ct-error");var c=r.querySelector("#login_error");return c&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-errors">'.concat(c.innerHTML,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")}))),{hasError:!!c,doc:r}},i=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-message");o&&o.remove();var c=e.querySelector(".ct-errors");c&&c.remove();var n=r.querySelector(".message");return e.closest(".ct-account-form").classList.remove("ct-error"),n&&e.insertAdjacentHTML("afterbegin",'<div class="ct-message">'.concat(n.innerHTML,"</div>")),{doc:r}};document.querySelector("#account-modal")&&function(e){if(e&&!e.hasListeners){e.hasListeners=!0,e.addEventListener("click",(function(t){t.target.href&&t.target.href.indexOf("lostpassword")>-1&&(a(e,{screen:"forgot-password"}),t.preventDefault()),t.target.href&&t.target.href.indexOf("wp-login")>-1&&-1===t.target.href.indexOf("lostpassword")&&(a(e,{screen:"login"}),t.preventDefault())}),!0);var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');t&&t.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(t.action,{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){var r=s(t.closest(".ct-login-form"),e);r.doc;r.hasError||(location=t.querySelector('[name="redirect_to"]').value)}))})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=s(r.closest(".ct-register-form"),e);t.doc;t.hasError||i(r.closest(".ct-register-form"),e)}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(o.action,{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=s(o.closest(".ct-forgot-password-form"),e);t.doc;t.hasError||i(o.closest(".ct-forgot-password-form"),e)}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(e,{screen:t})}))}))}))}}(document.querySelector("#account-modal")),Object(n.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var r=t.event;if(r.preventDefault(),e.closest(".must-log-in")){var o=document.querySelector(".ct-header-account[href]");o?o.click():(r.target.dynamicJsChunkStop(),r.target.click())}else{try{document.querySelector(e.hash)}catch(e){return}a(document.querySelector(e.hash),{screen:"login"}),c.a.trigger("ct:overlay:handle-click",{e:r,href:e.hash,options:{isModal:!0}})}}})}]);
|
static/bundle/dark-mode.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);r(2);var n=r(0);Object(n.registerDynamicChunk)("blocksy_dark_mode",{mount:function(e,t){t.event.preventDefault(),document.querySelector("html").dataset.palette?document.querySelector("html").removeAttribute("data-palette"):document.querySelector("html").dataset.palette="dark"}})},function(e,t){e.exports=window.ctEvents}]);
|
static/bundle/dashboard.css
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* - v1.7.63
|
3 |
-
*
|
4 |
-
* Copyright (c) 2021
|
5 |
-
* Licensed GPLv2+
|
6 |
-
*/
|
7 |
-
|
8 |
-
.ct-mailchimp-modal{--modal-min-height: 300px}.mailchimp-credentials{display:grid;grid-template-columns:1fr 1fr 1fr;grid-column-gap:10px;margin:5px 0 0 0;padding:25px 0 0 0;border-top:1px dashed #eee}.mailchimp-credentials section{display:flex;flex-direction:column;min-width:0}.mailchimp-credentials label{display:block;font-size:12px;margin-bottom:3px;opacity:0.7}.mailchimp-credentials input{--height: 35px}.ct-extensions-sourse{display:flex;justify-content:center;margin:0 0 40px 0}.ct-extensions-sourse li{display:flex;align-items:center;height:38px;font-weight:500;padding:0 30px;margin:0;cursor:pointer;border:1px solid rgba(226,230,235,0.7)}.ct-extensions-sourse li.active{color:#fff;background:#0085ba;border-color:#0085ba}.ct-extensions-sourse li:hover:not(.active){color:#0085ba}.ct-extensions-sourse li:first-child{border-right:0;border-radius:4px 0 0 4px}.ct-extensions-sourse li:last-child{border-left:0;border-radius:0 4px 4px 0}.ct-extensions-list{display:grid;grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));grid-column-gap:30px;grid-row-gap:30px;margin:0}.ct-extensions-list li{display:flex;flex-direction:column;margin:0;border-radius:3px;border:1px solid rgba(226,230,235,0.7);box-shadow:0 2px 5px rgba(143,163,184,0.12)}.ct-extension-title{display:flex;align-items:center;justify-content:space-between;margin:30px 0 15px 0;padding:0 25px}.ct-extension-title svg{opacity:0.7}.ct-extension-description{font-size:14px;line-height:1.7;margin-bottom:30px;padding:0 25px}.ct-extension-actions{display:flex;justify-content:space-between;margin-top:auto;padding:20px 13px 20px 25px;border-top:1px solid rgba(226,230,235,0.5);background:rgba(235,237,241,0.2)}.ct-extension-actions [class*="ct-button"]{--buttonHeight: 32px;--buttonPadding: 12px;min-width:92px}.ct-config-btn{margin-right:auto;margin-left:10px}.ct-config-btn:before{font-family:dashicons;content:"\f111";font-size:14px;margin-right:5px;opacity:0.9}.ct-minimal-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;padding:0;color:inherit;cursor:pointer;color:#c9cfd6;background:transparent;transition:color 0.2s ease}.ct-minimal-button:hover{color:#9ca9b9}.ct-minimal-button:focus{outline:none}.ct-minimal-button svg{fill:currentColor}.ct-option-info{display:flex;align-items:center;justify-content:center;font-style:normal;line-height:normal;margin-left:auto}.ct-option-info:before{font-family:dashicons;content:"\f348";font-size:16px;line-height:16px}.ct-demos-list-container ul{display:grid;grid-column-gap:30px;grid-row-gap:30px;margin:0;padding:0;list-style:none}@media (min-width: 783px){.ct-demos-list-container ul{grid-template-columns:repeat(2, 1fr)}}.ct-demos-list-container ul li{margin:0;box-sizing:border-box;box-shadow:0 2px 5px rgba(143,163,184,0.12)}.ct-demos-list-container ul li figure{position:relative;margin:0;overflow:hidden;border-radius:3px 3px 0 0}.ct-demos-list-container ul li figure:before{content:'';display:block;width:100%;padding-bottom:75%}.ct-demos-list-container ul li figure img{position:absolute;top:0;left:0;width:100%;height:100%}.ct-demos-list-container ul li figure section{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;right:0;bottom:0;opacity:0;background:rgba(36,41,45,0.9);transition:opacity 0.2s ease}.ct-demos-list-container ul li figure section h3{font-size:15px;color:#fff !important;margin:0 0 25px 0}.ct-demos-list-container ul li figure section div{display:flex}.ct-demos-list-container ul li figure section span{padding:8px 12px;display:block;font-size:17px;font-weight:500;color:#fff;border-radius:3px;border:2px solid rgba(255,255,255,0.5);background:rgba(36,41,45,0.4)}.ct-demos-list-container ul li figure section span:not(:last-child){margin-right:15px}.ct-demos-list-container ul li:hover figure>section{opacity:1}.ct-demos-list-container ul li.ct-is-pro figure{position:relative}.ct-demos-list-container ul li.ct-is-pro figure a{position:absolute;z-index:1;content:'PRO';top:0;right:0;font-size:13px;font-weight:700;letter-spacing:.03em;color:#a1680d;text-decoration:none;padding:5px 15px;margin:25px;background:#ffc568;border-radius:3px;box-shadow:0 5px 8px 0 rgba(234,157,33,0.3)}.ct-demo-actions{display:flex;align-items:center;padding:20px 25px;border-radius:0 0 3px 3px;border:1px solid rgba(226,230,235,0.7);background:rgba(235,237,241,0.2)}@media (max-width: 549px){.ct-demo-actions{flex-direction:column}}@media (min-width: 550px){.ct-demo-actions{justify-content:space-between}}.ct-demo-actions h4{margin:0}@media (max-width: 549px){.ct-demo-actions h4{margin-bottom:20px}}.ct-demo-actions .ct-button{margin-right:15px}.ct-demo-actions button[disabled]{opacity:0.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ct-demo-modal{--modal-width: 500px;height:100%;transition:max-height 0.2s ease}.ct-demo-modal:not(.ct-demo-installer){--modal-max-height: 620px}.ct-demo-modal.ct-demo-installer{--modal-max-height: 380px}.ct-demo-step-container{height:100%;display:flex;flex-direction:column;color:#687c93;text-align:center}.ct-demo-step-container>*:first-child{flex:1;position:relative}.ct-demo-step-container>*:first-child>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-step-container .ct-demo-icon{display:flex;align-items:center;justify-content:center;width:85px;height:85px;margin:10px auto 20px auto;background:#f3f6f8;border-radius:100%}.ct-demo-step-container h2{text-align:center;font-size:17px;font-weight:600;color:#3e5667;margin-top:0}.ct-demo-step-controls{position:relative;width:100%;height:40px}.ct-demo-step-controls button{position:absolute;z-index:2;top:0}.ct-demo-step-controls button.demo-back-btn{left:0}.ct-demo-step-controls button.demo-main-btn{right:0}.ct-steps-pills{display:flex;align-items:center;justify-content:center;position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;width:200px;margin:0;padding:0;list-style:none;margin:0 auto}.ct-steps-pills li{display:flex;align-items:center;justify-content:center;width:30px;height:30px;margin:0;font-size:0}.ct-steps-pills li:before{content:'';width:12px;height:12px;border-radius:100%;box-shadow:inset 0 0 0 2px rgba(104,124,147,0.8);transition:box-shadow 0.2s ease, transform 0.2s ease}.ct-steps-pills li:not(.active):before{transform:scale3d(0.5, 0.5, 1);box-shadow:inset 0 0 0 10px rgba(104,124,147,0.8)}.ct-demo-child .ct-checkbox-container{max-width:250px;margin:25px auto 0 auto;padding-left:15px;padding-right:15px;border-radius:4px;border:1px solid rgba(179,189,201,0.3)}.ct-demo-child a{display:block;color:#687c93;font-weight:500;text-decoration:none;margin-top:25px}.ct-demo-child a:hover{color:#0073aa}.ct-demo-builder .ct-demo-icon svg{margin-left:10px}.ct-demo-builder ul{display:grid;margin:0;padding:0;list-style:none;margin:40px auto 0 auto}.ct-demo-builder ul[data-count="2"]{max-width:70%;grid-template-columns:repeat(2, 1fr);grid-column-gap:30px}.ct-demo-builder ul[data-count="3"]{grid-template-columns:repeat(3, 1fr);grid-column-gap:20px}.ct-demo-builder ul li{margin-bottom:0;cursor:pointer}.ct-demo-builder ul li figure{position:relative;display:flex;align-items:center;justify-content:center;min-height:100px;border:2px solid #e9ecee;border-radius:5px;margin:0;font-weight:500;transition:border-color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),box-shadow 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-demo-builder ul li figure>svg{width:47%}.ct-demo-builder ul li .builder-name{font-weight:500;color:#3e5667;margin-top:15px}.ct-demo-builder ul li:hover figure{border-color:var(--accentColor)}.ct-demo-builder ul li.active figure{border-color:var(--accentColor);box-shadow:0 0 0 1px var(--accentColor)}.ct-demo-builder ul li .ct-checkbox{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: #0e8ecc;position:absolute;top:0px;right:0px}.ct-demo-builder ul li .ct-checkbox:before{width:22px !important;height:22px !important;border-radius:0px 3px 0px 5px}.ct-demo-builder ul li .ct-checkbox:not(.active):before{opacity:0}.ct-demo-plugins label{margin:0 auto}.ct-active-plugin{display:flex;align-items:center;position:relative;text-align:left;padding:10px 0}.ct-active-plugin span{display:flex;align-items:center;justify-content:center;position:absolute;right:-2px;width:22px;height:22px;border-radius:100%;box-sizing:border-box;background:rgba(179,189,201,0.3)}.ct-active-plugin span:before,.ct-active-plugin span:after{position:absolute;content:'';width:2px;border-radius:2px;background:rgba(104,124,147,0.6)}.ct-active-plugin span:before{top:10px;left:10px;height:5px;transform:rotate(-45deg);transform-origin:bottom center}.ct-active-plugin span:after{height:9px;left:9px;transform:rotate(40deg);transform-origin:bottom center}.ct-demo-erase{margin-top:10px;padding-top:10px;padding-bottom:20px;text-align:left;font-weight:600;border-top:1px dashed rgba(179,189,201,0.5);border-bottom:1px dashed rgba(179,189,201,0.5)}.ct-demo-erase .ct-checkbox-container{align-items:flex-start;padding-bottom:0}.ct-demo-erase i{display:block;width:90%;font-size:13px;margin-top:8px;opacity:0.8;font-weight:400;font-style:normal}.ct-export{text-align:center;margin-top:50px}.ct-site-export{display:flex;flex-direction:column;padding:30px}.ct-site-export label{display:flex;justify-content:space-between;padding:10px 0}.ct-site-export input[type="checkbox"]{margin:0}.ct-site-export textarea,.ct-site-export input[type="text"]{width:60%}.ct-site-export textarea{min-height:80px}.ct-site-export button{margin-top:20px}.ct-demo-installer .close-button{opacity:0 !important}.ct-demo-install{position:relative}.ct-demo-install>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-install svg path{transform-origin:50% 50%;transform-box:fill-box;-webkit-animation-name:spin;animation-name:spin;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.ct-demo-install .g1{fill:#44ACDF;-webkit-animation-duration:5.5s;animation-duration:5.5s;animation-direction:reverse}.ct-demo-install .g2{fill:#3497D3;-webkit-animation-duration:4.5s;animation-duration:4.5s}.ct-demo-install .g3{fill:#0C7AB3;-webkit-animation-duration:4s;animation-duration:4s}.ct-installer-progress{width:100%;border-radius:5px;background:#f3f6f8;box-sizing:border-box}.ct-installer-progress div{width:var(--progress);height:4px;border-radius:inherit;background:#0e8ecc;transition:width 0.3s ease}.ct-progress-info{display:flex;justify-content:space-between;margin-top:30px;margin-bottom:15px;font-size:13px;opacity:0.8}@-webkit-keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.ct-install-success{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.ct-install-success div{margin-top:10px}.ct-install-success a:first-child{margin-right:15px}.ct-modify-actions{margin-top:50px}.ct-modify-actions>*:not(:last-child){margin-right:15px}.ct-modify-actions .demo-remove{--ct-buttonHoverColor: #e04f4f}#ct-dashboard .ct-demo-notification{position:relative;padding:15px 20px 15px 55px;margin-bottom:40px;color:#0072aa;line-height:1.5;border:2px solid rgba(0,114,170,0.3);background:rgba(0,114,170,0.1);border-radius:5px}#ct-dashboard .ct-demo-notification:before{font-family:dashicons;content:"\f534";font-size:20px;position:absolute;top:13px;left:20px;color:rgba(0,114,170,0.8)}#ct-dashboard .ct-demo-notification b{font-weight:700}.ct-demos-list{display:flex;flex-direction:column}.ct-demos-list .ct-single-demo img{max-width:100px}.ct-demo-btn{font-size:15px;font-weight:600;letter-spacing:0.03em;color:#687c93;height:40px;border:none;cursor:pointer;padding:0 18px;border-radius:4px;background:#f3f6f8;transition:background 0.2s ease color 0.2s ease}.ct-demo-btn:focus{outline:none}.ct-demo-btn:hover{color:#fff;background:var(--ct-buttonHoverColor, #0073aa)}.ct-activation-action-modal{color:#687c93;text-align:center;padding:30px}.ct-activation-action-modal svg{width:65px;height:65px}.ct-activation-action-modal h2{color:#3e5667}.ct-activation-action-modal button{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-beta-consent{margin-top:60px;border-radius:3px;text-align:center;color:#fff}@media (max-width: 782px){.ct-beta-consent{padding:10%}}@media (min-width: 783px){.ct-beta-consent{padding:50px}}.ct-beta-consent h2{display:flex;align-items:center;justify-content:center;color:#fff !important;margin-top:0;cursor:pointer}.ct-beta-consent h2 span{display:flex;font-size:15px;font-weight:500;cursor:pointer}.ct-beta-consent h2 .ct-option-switch{margin-left:15px}.ct-beta-consent h2 .ct-option-switch:not(.ct-active){border-color:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active)>span{background:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active):after{border-color:#fff}.ct-beta-consent+.ct-support-container{margin-top:50px !important}.ct-beta-consent{background-color:#32373c;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%234f5660' fill-opacity='0.2' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E");background-size:250px;background-position:0 5px}.ct-freemius-optin-message{position:relative;text-align:center;border-radius:3px;background:#f5f7f9}@media (max-width: 782px){.ct-freemius-optin-message{padding:50px 10% 10% 10%}}@media (min-width: 783px){.ct-freemius-optin-message{padding:60px 50px 50px 50px}}.ct-freemius-optin-message h2{margin-top:0}.ct-freemius-optin-message i{display:flex;align-items:center;justify-content:center;position:absolute;top:-25px;left:0;right:0;margin:0 auto;width:50px;height:50px;background:#fff;border-radius:100%;color:#0591c9;border:2px solid #DEECF3}.ct-freemius-optin-message i svg{-webkit-animation:ring-shake 5s ease-in-out infinite;animation:ring-shake 5s ease-in-out infinite;transform-origin:50% 0%}.ct-freemius-optin-message p{max-width:600px;margin:0 auto 20px auto !important}.ct-freemius-optin-message .ct-button-primary{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-freemius-optin-message+.ct-first-steps-container{margin-top:55px;padding-top:50px;border-top:1px solid rgba(143,163,184,0.15)}@-webkit-keyframes ring-shake{0%{transform:rotate(-15deg)}2%{transform:rotate(15deg)}4%{transform:rotate(-18deg)}6%{transform:rotate(18deg)}8%{transform:rotate(-22deg)}10%{transform:rotate(22deg)}12%{transform:rotate(-18deg)}14%{transform:rotate(18deg)}16%{transform:rotate(-12deg)}18%{transform:rotate(12deg)}20%{transform:rotate(0deg)}100%{transform:rotate(0deg)}}@keyframes ring-shake{0%{transform:rotate(-15deg)}2%{transform:rotate(15deg)}4%{transform:rotate(-18deg)}6%{transform:rotate(18deg)}8%{transform:rotate(-22deg)}10%{transform:rotate(22deg)}12%{transform:rotate(-18deg)}14%{transform:rotate(18deg)}16%{transform:rotate(-12deg)}18%{transform:rotate(12deg)}20%{transform:rotate(0deg)}100%{transform:rotate(0deg)}}.blocksy-fs-optin-dashboard #wpwrap,.blocksy-fs-optin-dashboard #wpcontent,.blocksy-fs-optin-dashboard #wpbody{height:100%;min-height:100%}.blocksy-fs-optin-dashboard #wpbody-content{height:100%;padding-bottom:0}.blocksy-fs-optin-dashboard #wpbody-content #screen-meta,.blocksy-fs-optin-dashboard #wpbody-content .clear{display:none}.blocksy-fs-optin-dashboard .toplevel_page_ct-dashboard.current:after{border-right-color:#f2cf88 !important}.blocksy-fs-optin-wrapper{display:grid;grid-template-columns:repeat(2, 1fr);height:100%}.blocksy-fs-optin-wrapper>*{display:flex;flex-direction:column;justify-content:center;padding:9%;box-sizing:border-box}.blocksy-fs-optin-wrapper .ct-optin-svg{background:#F2CF88}.blocksy-fs-optin-wrapper .ct-optin-svg svg{max-width:750px;margin:0 auto}.blocksy-fs-optin-wrapper #fs_connect{width:100%;max-width:900px;margin:0;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-visual{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-content{padding:0;margin-bottom:30px}.blocksy-fs-optin-wrapper #fs_connect .fs-content>p span{display:block;font-size:25px;font-weight:700;color:#23282d;margin-bottom:20px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions{display:flex;padding:0;margin-bottom:20px;background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button{height:49px;line-height:49px;padding:0 20px !important}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button-primary{margin-right:15px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation{order:2;float:none;background:transparent;border-color:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation:hover{border-color:#0071a1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions{padding:0 0 30px 0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger{text-align:left;text-decoration:underline}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger:focus{outline:none;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li{margin-bottom:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li i.dashicons{font-size:18px;width:18px;height:18px;margin-right:8px;color:#23282d}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div{margin-left:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div span{text-transform:capitalize}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div p{margin-top:8px;font-size:12px;opacity:0.7}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(1){order:1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(2){order:4}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(3){order:3}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(4){order:2}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions.fs-open ul{display:grid;grid-template-columns:repeat(2, minmax(auto, 280px));grid-column-gap:30px;grid-row-gap:30px;margin:20px 0 0 0;padding-top:30px;border-top:1px dashed #ddd}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch{width:25px;height:16px;top:1px;right:20px;padding:0;box-shadow:none;box-sizing:border-box;transition:all 0.1s linear;border:2px solid #555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch .fs-toggle{box-sizing:border-box;border:none;top:1px;width:10px;height:10px;box-shadow:none;transition:all 0.1s linear}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off{background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off .fs-toggle{left:1px;background:#555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on{border-color:#0085ba}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on .fs-toggle{left:10px}.blocksy-fs-optin-wrapper #fs_connect .fs-terms{display:none}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container{width:100%;margin:30px 0 0 0}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container input[type=text]{min-height:49px;padding:0 12px;line-height:initial}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .dashicons{top:17px;right:10px;font-size:16px;height:16px;width:16px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .show-license-resend-modal{font-size:0.9em;margin-top:10px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions{flex-wrap:wrap}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions form{width:100%}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions #license_issues_link{flex:1 1 auto;text-align:left}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-permissions p{text-align:left}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-permissions p:last-of-type{margin-bottom:0}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin{border:none;padding:30px 0;margin:30px 0 0 0;box-shadow:none;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin.error{background:transparent}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin .fs-input-label{margin-left:22px}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing{border-top:1px dashed #ddd;padding:30px 0;background:transparent}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p{text-align:left;color:#444}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p a{color:#0073aa}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static/bundle/dashboard.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 n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=c.apply(null,r);a&&e.push(a)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,c,o=n(11),a=n(12),i=(c=[],{activateTrap:function(e){if(c.length>0){var t=c[c.length-1];t!==e&&t.pause()}var n=c.indexOf(e);-1===n||c.splice(n,1),c.push(e)},deactivateTrap:function(e){var t=c.indexOf(e);-1!==t&&c.splice(t,1),c.length>0&&c[c.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,c="string"==typeof e?n.querySelector(e):e,u=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),s={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(s.active)return;g(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:u.onActivate;t&&t();return d(),f},deactivate:m,pause:function(){if(s.paused||!s.active)return;s.paused=!0,b()},unpause:function(){if(!s.paused||!s.active)return;s.paused=!1,g(),d()}};return f;function m(e){if(s.active){clearTimeout(r),b(),s.active=!1,s.paused=!1,i.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:u.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:u.returnFocusOnDeactivate)&&l((function(){var e;_((e=s.nodeFocusedBeforeActivation,p("setReturnFocus")||e))})),f}}function d(){if(s.active)return i.activateTrap(f),r=l((function(){_(h())})),n.addEventListener("focusin",O,!0),n.addEventListener("mousedown",v,{capture:!0,passive:!1}),n.addEventListener("touchstart",v,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",y,{capture:!0,passive:!1}),f}function b(){if(s.active)return n.removeEventListener("focusin",O,!0),n.removeEventListener("mousedown",v,!0),n.removeEventListener("touchstart",v,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",y,!0),f}function p(e){var t=u[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function h(){var e;if(!(e=null!==p("initialFocus")?p("initialFocus"):c.contains(n.activeElement)?n.activeElement:s.firstTabbableNode||p("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function v(e){c.contains(e.target)||(u.clickOutsideDeactivates?m({returnFocus:!o.isFocusable(e.target)}):u.allowOutsideClick&&u.allowOutsideClick(e)||e.preventDefault())}function O(e){c.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(s.mostRecentlyFocusedNode||h()))}function y(e){if(!1!==u.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void m();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===s.firstTabbableNode)return e.preventDefault(),void _(s.lastTabbableNode);if(!e.shiftKey&&e.target===s.lastTabbableNode)e.preventDefault(),_(s.firstTabbableNode)}(e)}function j(e){u.clickOutsideDeactivates||c.contains(e.target)||u.allowOutsideClick&&u.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=o(c);s.firstTabbableNode=e[0]||h(),s.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),s.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,c,o;c=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?c(l):r(l.href)?t(e,n,a):c(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){c(a)}))}}:function(e,n,r,c){if((c=c||open("","_blank"))&&(c.document.title=c.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=e:location=e,c=null},u.readAsDataURL(e)}else{var s=o.URL||o.webkitURL,f=s.createObjectURL(e);c?c.location=f:location.href=f,c=null,setTimeout((function(){s.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,c):r)||(e.exports=o)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function c(){}function o(){}o.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,o,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:c};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),c="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var n,o,i,l=[],f=[],m=e.querySelectorAll(r);for(t.includeContainer&&c.call(e,r)&&(m=Array.prototype.slice.apply(m)).unshift(e),n=0;n<m.length;n++)a(o=m[n])&&(0===(i=u(o))?l.push(o):f.push({documentOrder:n,tabIndex:i,node:o}));return f.sort(s).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||u(e)<0)}function i(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,r)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=o},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var c in r)n.call(r,c)&&(e[c]=r[c])}return e};var n=Object.prototype.hasOwnProperty},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(4),o=n.n(c),a=n(1),i=n(2),l=n.n(i),u=n(5),s=n.n(u);n(8);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},b=function(e){function t(){var n,r;f(this,t);for(var c=arguments.length,o=Array(c),a=0;a<c;a++)o[a]=arguments[a];return n=r=m(this,e.call.apply(e,[this].concat(o))),p.call(r),m(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,c=this._refs;return{state:e,props:d(t),refs:c,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:d(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:d(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:d(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:d(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(s.a.Component);b.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var p=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},h=b,v=function(e){var t=e.children,n=e.container,c=void 0===n?document.body:n,o=e.type,a=void 0===o?"reach-portal":o;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=c.hasOwnProperty("current")?c.current:c;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=c.hasOwnProperty("current")?c.current:c;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var O=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},y=n(6),j=n.n(y);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){if(null==e)return{};var n,r,c=function(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var E=function(){},w=function(){},x=function(e,t){var n,r,c;e.disposeAriaHider=(n=e.overlayNode,r=[],c=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),c.push(e),e.setAttribute("aria-hidden","true"))}})),function(){c.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},S=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},C=React.createContext(),k=React.forwardRef((function(e,t){var n=e.container,c=e.isOpen,o=void 0===c||c,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,u=e.onClick,s=e.onKeyDown,f=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},o?Object(r.createElement)(v,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;x(t,l)},willUnmount:S},(function(e){var n=e.refs;return Object(r.createElement)(C.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:O(u,(function(e){e.stopPropagation(),i()})),onKeyDown:O(s,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));k.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},z=React.forwardRef((function(e,t){var n=e.onClick,c=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(C.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:O(n,D),ref:function(n){e(n),t&&t(n)}},c))}))})),A=n(3),P=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,c=void 0===n?P:n,o=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[c(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return c(e)&&function(t){return Object(r.createElement)(k,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(z,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),o(e,t)))}}))};function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e,t)||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 L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=function(e){var t=N(Object(r.useState)(!1),2),n=t[0],c=t[1];return[function(){return c(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return c(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function I(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){I(o,r,c,a,i,"next",e)}function i(e){I(o,r,c,a,i,"throw",e)}a(void 0)}))}}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}(e,t)||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 F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),c=U(n,2),o=c[0],i=c[1],l=Object(r.useState)(!1),u=U(l,2),s=u[0],f=u[1],m=ctDashboardLocalizations.plugin_data.is_pro,d=function(){var n=R(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[o,d,!m&&e.config.pro?Object(r.createElement)(M,{items:s,onDismiss:function(){return f(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-activation-action-modal"},Object(r.createElement)("svg",{viewBox:"0 0 59.99 60"},Object(r.createElement)("path",{d:"M14.41 43.65c0 .13.08.27.11.41a5.91 5.91 0 010 2.37c-1.78 1.14-3.2 1.19-4.34.68-2.83-1.27-3.81-6-3.81-6s.38-.08 1-.15a6.08 6.08 0 012.64.91 4.17 4.17 0 01-.22-1 6.47 6.47 0 013.2 1 8.14 8.14 0 01.35-5 12.74 12.74 0 01.65-1.62s8.51 4.32 3 9.27a5.81 5.81 0 01-2.34-.68 2 2 0 01-.24-.19zM7.17 15.93q.2.22.42.45a5.74 5.74 0 002.68-.74 5.51 5.51 0 00-.28 2.76 6.79 6.79 0 001.47.81c5 1.94 6.91-5.79 6.91-5.79a13.35 13.35 0 00-4.5-.26 5.64 5.64 0 00-2.15.72 4.42 4.42 0 00.23-.81c.51-2.62-.94-5.82-.94-5.82a13.76 13.76 0 00-2.44 1.51c-2 1.51-4 4-1.53 7a.65.65 0 00.13.17zm.93 16.56a6.7 6.7 0 00.84.76c7.28-1.28 2.36-9.46 2.36-9.46a14.28 14.28 0 00-2.18 1.69 7.39 7.39 0 00-2.13 3.35v-1.19a5.49 5.49 0 00-1.27-1.71 12.75 12.75 0 00-3.94-2.44 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.75.46 8.25 8.25 0 00.86 0 6.45 6.45 0 001.14-1.76 4.41 4.41 0 001.11 1.93zM18.79 9.27c6 1.85 8.82-7.61 8.82-7.61a17.44 17.44 0 00-6.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zM49.6 40.93a6.08 6.08 0 00-2.64.91 4.21 4.21 0 00.22-1 11.57 11.57 0 00-1.19-5.59 13.88 13.88 0 00-2.36 1.58c-1.87 1.58-3.82 4.16-1.33 7 .06.08.13.15.2.23s.29.3.46.45a5.69 5.69 0 002.65-.86 5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c5.16 1.94 6.81-6 6.81-6a13.28 13.28 0 00-4.02-.18zm-6.49-27.77a10.69 10.69 0 00-1.5.26s1.15 4.53 3.91 5.79c1.18.54 2.66.47 4.47-.81a5.88 5.88 0 00-.16-2.47 1.42 1.42 0 00-.1-.29l.23.13a6 6 0 002.45.61c5.24-5.19-3.42-9.13-3.42-9.13a13.57 13.57 0 00-.54 1.51 8.37 8.37 0 00-.17 5.12 6.62 6.62 0 00-3.29-.81 12.09 12.09 0 00-1.88.09zm15.13 10.33a13.53 13.53 0 00-2.61 1.37 7.1 7.1 0 00-2.64 2.78v1.18a6.69 6.69 0 00-1.73-2.89 13.85 13.85 0 00-2.62-2.14 13.17 13.17 0 00-.82 1.69c-.83 2-1.65 5.4 1 7a6.4 6.4 0 002.16.76 7.35 7.35 0 001-.93 4.26 4.26 0 001-1.76 6.06 6.06 0 00.76 1.3 6.25 6.25 0 00.4.5c7.43.09 4.1-8.86 4.1-8.86zM38.19 9.27c1.55.52 3.41.27 5.61-1.43.51-6.56-4.81-7.11-8.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zM41.99 54h-3v-6a2 2 0 00-2-2h-14a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h28v-3a2 2 0 00-2-2zM25.76 21.65l-5.77.84a1 1 0 00-.81.68 1 1 0 00.26 1l4.19 4.11a1 1 0 01.28.88l-.92 5.44-.07.4a1 1 0 00.4 1 1 1 0 001.06.07l3.55-1.88 1.6-.85a1 1 0 01.94 0l2.4 1.27 2.75 1.46a1 1 0 001.05-.07 1 1 0 00.4-1l-1-5.81a1 1 0 01.28-.88l4.19-4.11a1 1 0 00.26-1 1 1 0 00-.81-.68l-5.78-.84a1 1 0 01-.75-.55l-2.57-5.3a1 1 0 00-1.8 0l-1.17 2.39-1.41 2.88a1 1 0 01-.75.55z",fill:"#ffa800"}),Object(r.createElement)("path",{d:"M19.99 22.49l5.78-.84a1 1 0 00.75-.55l1.41-2.88 1.41 2.88a1 1 0 00.75.55l5.78.84a1 1 0 01.56 1.71l-4.19 4.11a1 1 0 00-.29.88l.92 5.4-2.4-1.27a1 1 0 00-.94 0l-1.6.85-1.6-.85a1 1 0 00-.93 0l-2.41 1.28.92-5.41a1 1 0 00-.28-.88l-4.2-4.11a1 1 0 01-.26-1 1 1 0 01.82-.71zm-13 8.07a4.41 4.41 0 001.14 1.93c2.67-1.61 1.85-5 1-7a7.39 7.39 0 00-2.14 3.34 3.49 3.49 0 000 1.7zm11.8-21.29c3.94-1.27 5.82-7.61 5.82-7.61a19.24 19.24 0 00-3.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zm-7.31 9.94c2.76-1.26 3.91-5.79 3.91-5.79a10.69 10.69 0 00-1.5-.26 12.35 12.35 0 00-1.9-.09 4.42 4.42 0 01-.23.81 3.48 3.48 0 00-1.46 1.75 5.51 5.51 0 00-.31 2.77 6.79 6.79 0 001.49.81zm37.4 13.28a4.41 4.41 0 001.11-1.93 3.57 3.57 0 000-1.72 7.31 7.31 0 00-2.17-3.34c-.83 2.02-1.61 5.38 1.06 6.99zM45.5 19.21a6.79 6.79 0 001.49-.81 5.51 5.51 0 00-.26-2.76 3.53 3.53 0 00-1.46-1.75 5.79 5.79 0 00-2.13-.72 10.69 10.69 0 00-1.5.26s1.1 4.57 3.86 5.78zm-7.31-9.94a8.42 8.42 0 002.61-1.43c.38-4.84-2.41-6.41-5.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zm8.8 32.57l-1.4 1.8a5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c2.83-1.27 3.81-6 3.81-6s-.38-.08-1-.15a6.08 6.08 0 00-2.61.89zm1.42-33.08a8.37 8.37 0 00-.17 5.12l1.46 1.75a1.42 1.42 0 01.1.29.65.65 0 00.13-.16c2.48-2.97.44-5.49-1.52-7zm-6.15 35.08a1.92 1.92 0 00.31-.18 3.55 3.55 0 001.42-1.79 8.1 8.1 0 00-.35-5c-1.92 1.54-3.87 4.13-1.38 6.97zm13.37-19a7.1 7.1 0 00-2.64 2.8v2.91a6.06 6.06 0 00.76 1.3c2.79-1.3 2.37-4.98 1.88-6.99zM11.41 43.65l-1.34-1.75a6.08 6.08 0 00-2.64-.91c-.6.07-1 .15-1 .15s1 4.77 3.81 6a6.75 6.75 0 001.34-.68 5.82 5.82 0 00-.14-2.78zM38.99 54h-3v-6a2 2 0 00-2-2h-11a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h25v-3a2 2 0 00-2-2zm-25.6-17.17a8.14 8.14 0 00-.35 5 3.45 3.45 0 001.31 1.72h.05c0 .13.08.27.11.41.07-.08.14-.15.2-.23 2.5-2.73.55-5.32-1.32-6.9z",fill:"#fedd0a"}),Object(r.createElement)("path",{d:"M16.18 7.84C15.8 3 18.59 1.43 21.51 1.08a14.84 14.84 0 013 0C21.6 1.44 18.82 3 19.2 7.84a8.42 8.42 0 002.59 1.43 4.81 4.81 0 01-3 0 8.42 8.42 0 01-2.61-1.43zm-7.61.92c-2 1.51-4 4-1.53 7a.65.65 0 00.13.16q.2.22.42.45a5.91 5.91 0 002.4-.61c-2.45-3-.42-5.49 1.54-7a13.57 13.57 0 00-.54-1.51 13.76 13.76 0 00-2.42 1.51zM15.99 56v3h3v-3a2 2 0 012-2h-3a2 2 0 00-2 2zm7-10a2 2 0 00-2 2v6h3v-6a2 2 0 012-2zM4.35 24.86a13.53 13.53 0 00-2.61-1.37 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.79.46 8.25 8.25 0 00.86 0 5.84 5.84 0 00.4-.5c-2.81-1.27-2.39-4.95-1.9-6.96z",fill:"#fff"}),Object(r.createElement)("path",{d:"M59.18 23.14a1 1 0 00-1.29-.59 14.74 14.74 0 00-3.85 2.26 24.35 24.35 0 00-.45-3.4 23.39 23.39 0 00-1.21-4 1 1 0 00.71-.29 5.42 5.42 0 001.9-4.91c-.64-3.56-5.44-5.78-5.65-5.87a1 1 0 00-1.32.5 14.57 14.57 0 00-.85 2.6 26.55 26.55 0 00-2.37-2.12 6.66 6.66 0 00-2.23-5.7C38.99-1.31 32.36.61 32.08.7a1 1 0 00-.59.48 1 1 0 00-.08.76c.08.28 2.09 6.87 6.51 8.3a5.84 5.84 0 001.74.27 7.41 7.41 0 004.15-1.44 22.7 22.7 0 013.1 3 1.48 1.48 0 000 .21 13.38 13.38 0 00-5.58.15 1 1 0 00-.72 1.21c.06.22 1.39 5.34 4.79 6.59a4.42 4.42 0 001.55.28 6.3 6.3 0 003.59-1.31 1.2 1.2 0 00.26-.29 22.46 22.46 0 01.82 2.88 21.37 21.37 0 01.43 3.47 15 15 0 00-2.86-2.35 1 1 0 00-1.38.34c-.11.2-2.81 4.75-1.3 8a5.31 5.31 0 004.07 2.87c-.08.21-.15.42-.24.63a21.75 21.75 0 01-2.25 4 14.51 14.51 0 00-1.26-4 1 1 0 00-.58-.5 1 1 0 00-.76.06c-.2.1-4.9 2.53-5.38 6.11a5.19 5.19 0 001.7 4.37 22.47 22.47 0 01-2.46 1.34A3 3 0 0036.99 45h-6V34.73l4.15 2.2a2.1 2.1 0 00.94.23 2 2 0 002-2.33l-1-5.81 4.2-4.11a2 2 0 00-1.12-3.4l-5.78-.85-2.59-5.26a2 2 0 00-3.6 0l-2.58 5.26-5.77.85a2 2 0 00-1.11 3.4L22.92 29l-1 5.81a2 2 0 00.8 1.94 2 2 0 002.11.15l4.16-2.17V45h-6a3 3 0 00-2.37 1.18 21 21 0 01-2.46-1.35 5.16 5.16 0 001.7-4.36c-.48-3.58-5.18-6-5.38-6.11a1 1 0 00-.76-.06 1 1 0 00-.58.5 14.38 14.38 0 00-1.26 4 21.11 21.11 0 01-2.25-4c-.09-.21-.16-.42-.24-.64a5.26 5.26 0 004.07-2.86c1.51-3.29-1.19-7.84-1.3-8a1 1 0 00-1.38-.34 15 15 0 00-2.86 2.35 21.37 21.37 0 01.43-3.47 22.46 22.46 0 01.82-2.88 1.2 1.2 0 00.26.29 6.3 6.3 0 003.56 1.28 4.42 4.42 0 001.55-.28c3.4-1.25 4.73-6.37 4.79-6.59a1 1 0 00-.72-1.21 13.57 13.57 0 00-5.58-.15 1.48 1.48 0 000-.21 22.7 22.7 0 013.1-3 7.39 7.39 0 004.15 1.44 5.73 5.73 0 001.73-.27c4.43-1.43 6.44-8 6.52-8.3a1 1 0 00-.08-.76 1 1 0 00-.55-.5c-.28-.09-6.89-2-10.51.92a6.66 6.66 0 00-2.23 5.7 26.55 26.55 0 00-2.37 2.12 14.57 14.57 0 00-.8-2.6 1 1 0 00-1.32-.5c-.2.09-5 2.31-5.65 5.87a5.42 5.42 0 001.91 4.88 1 1 0 00.71.29 23.65 23.65 0 00-1.21 4 24.35 24.35 0 00-.44 3.43 14.74 14.74 0 00-3.9-2.26 1 1 0 00-1.29.59c-.08.21-1.89 5.18.19 8.14a5.37 5.37 0 004.71 2.08h.11a1 1 0 00.73-.36c.09-.1.16-.22.25-.33a24.67 24.67 0 001 2.89 23.67 23.67 0 002.4 4.32 14.22 14.22 0 00-4 .19 1 1 0 00-.77 1.18c0 .22 1.15 5.4 4.49 6.8a4.41 4.41 0 001.75.35 6.4 6.4 0 003.43-1.15 1 1 0 00.44-.64 6.59 6.59 0 00.11-1.08l.84.59a23 23 0 003.51 1.97V53h-2a3 3 0 00-3 3v3a1 1 0 001 1h28a1 1 0 001-1v-3a3 3 0 00-3-3h-2v-4.91a23 23 0 003.51-1.94c.29-.19.56-.41.84-.62a7 7 0 00.11 1.11 1 1 0 00.44.64 6.4 6.4 0 003.43 1.15 4.41 4.41 0 001.75-.35c3.34-1.4 4.45-6.58 4.49-6.8a1 1 0 00-.77-1.18 14.22 14.22 0 00-4-.19 23.67 23.67 0 002.4-4.32 24.67 24.67 0 001-2.89c.09.11.16.23.25.33a1 1 0 00.73.33h.11a5.37 5.37 0 004.71-2.08c2.08-2.96.27-7.93.19-8.14zM38.65 6a22.22 22.22 0 013.4 1.82 4.32 4.32 0 01-3.51.53c-2.55-.82-4.18-4.24-4.86-6 1.81-.38 5.57-.88 7.65.81a4.12 4.12 0 011.42 2.71 23.48 23.48 0 00-3.33-1.75 1 1 0 00-1.31.53A1 1 0 0038.65 6zm-20-2.8c2.08-1.71 5.84-1.2 7.65-.83-.68 1.72-2.31 5.14-4.86 6a4.32 4.32 0 01-3.51-.53A22.22 22.22 0 0121.33 6a1 1 0 00.54-1.31 1 1 0 00-1.31-.53 24 24 0 00-3.33 1.75 4.12 4.12 0 011.42-2.73zM5.92 30.41a5.66 5.66 0 01-.58.94 3.27 3.27 0 01-2.71-1.21c-1-1.37-.65-3.75-.26-5.28a8.32 8.32 0 013.62 3.05v.61a4.45 4.45 0 00-.15.9 4.12 4.12 0 00.08.99zm6-15.39c1.25-1.11 3.66-1 5.21-.83-.55 1.47-1.64 3.61-3.21 4.18a3.23 3.23 0 01-2.93-.54 3.27 3.27 0 01.89-2.83zm-4.93-2.45c.29-1.65 2.21-3.11 3.56-3.91a8.35 8.35 0 01.38 4.61 3.81 3.81 0 00-.32.24 4.52 4.52 0 00-1.05 1.37 3.53 3.53 0 01-.56.25h-.01a4.51 4.51 0 01-.95.22 3.26 3.26 0 01-1.05-2.78zm.91 17c.09-1.7 1.78-3.37 3.09-4.32.66 1.42 1.4 3.7.7 5.23a3.23 3.23 0 01-2.43 1.69 3.25 3.25 0 01-1.41-2.63zm5.78 16.29a3.26 3.26 0 01-2.94.41c-1.55-.65-2.55-2.84-3-4.34a8.39 8.39 0 014.58.65 2.92 2.92 0 00.17.36 4.51 4.51 0 001.1 1.32 4.53 4.53 0 01.04 1.57zm3.08-2.36a5 5 0 01-.85-.21h-.08A2.84 2.84 0 0114.16 42c-.8-1.46-.22-3.8.34-5.27 1.32.86 3.16 2.4 3.38 4.06a3.28 3.28 0 01-1.17 2.68zm7.19-8.3l1-5.8a2 2 0 00-.57-1.77l-4.19-4.11 5.77-.85a2 2 0 001.51-1.1l2.52-5.3 2.58 5.27a2 2 0 001.51 1.1l5.77.84-4.19 4.12a2 2 0 00-.57 1.76l1 5.8-5.15-2.73a2 2 0 00-1.88 0zM21.99 48a1 1 0 011-1h14a1 1 0 011 1v5h-16zm20 7a1 1 0 011 1v2h-26v-2a1 1 0 011-1h24zm3.83-13a2.84 2.84 0 01-1.62 1.28h-.07a6.37 6.37 0 01-.86.21 3.28 3.28 0 01-1.17-2.73c.22-1.66 2.06-3.2 3.38-4.06.56 1.45 1.14 3.79.34 5.3zm6.5-.05c-.48 1.5-1.48 3.69-3 4.34a3.26 3.26 0 01-2.94-.41 4.53 4.53 0 01.12-1.6 4.51 4.51 0 001.1-1.32c.07-.12.11-.24.17-.36a8.39 8.39 0 014.55-.7zM46.1 18.37c-1.57-.57-2.66-2.71-3.21-4.18 1.55-.22 4-.28 5.21.83a3.27 3.27 0 01.89 2.81 3.26 3.26 0 01-2.89.54zm4.67 13.8a3.23 3.23 0 01-2.43-1.69c-.7-1.52 0-3.8.71-5.23 1.25.95 3 2.62 3.08 4.29a3.25 3.25 0 01-1.36 2.63zm1.22-16.82a4.75 4.75 0 01-1-.22 3.87 3.87 0 01-.55-.25 4.52 4.52 0 00-1-1.37 3.81 3.81 0 00-.32-.24 8.45 8.45 0 01.38-4.61c1.35.8 3.27 2.25 3.56 3.9a3.27 3.27 0 01-1.07 2.79zm5.36 14.79a3.27 3.27 0 01-2.71 1.21 5.66 5.66 0 01-.58-.94 4.09 4.09 0 00.06-1 5.28 5.28 0 00-.15-.9v-.6a8.37 8.37 0 013.6-3.06c.42 1.54.74 3.92-.22 5.29zM33.99 50a1 1 0 01-1 1h-6a1 1 0 010-2h6a1 1 0 011 1z"})),Object(r.createElement)("h2",null,"Upgrade to Pro"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant full access to all premium extensions and features.","blc")),Object(r.createElement)("button",{className:"ct-button-primary"},Object(a.__)("Upgrade Now","blc")))}}):null]},V=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Support","blc")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need some help with the theme? You can always submit a support ticket, and our team will help you out.","blc")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Ticket","blc")))};function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(e,t)}(e,t)||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 K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var G=null,Y=function(e){var t=e.extension,n=e.onExtsSync,c=$(T(t),2),o=c[0],i=c[1],u=$(B(t,(function(){n()})),3),s=u[0],f=u[1],m=u[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,s&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:s,onClick:function(){f()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),t.readme&&Object(r.createElement)("button",{onClick:function(){return o()},className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,c=e.url;return Object(r.createElement)("a",{href:c,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,m)},J=function(){var e=$(Object(r.useState)(!G),2),t=e[0],n=e[1],c=$(Object(r.useState)(G||[]),2),i=c[0],u=c[1],s=$(Object(r.useState)(!1),2),f=s[0],m=s[1],d=$(Object(r.useState)("free"),2),b=d[0],p=d[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i,l,s,f,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},r=H({verbose:!1,extension:null,extAction:null},t),c=r.verbose,o=r.extension,a=r.extAction,c&&n(!0),m(!0),e.prev=4,e.next=7,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),H({method:"POST"},o&&a?{body:JSON.stringify({extension:o,extAction:a})}:{}));case 7:if(200!==(i=e.sent).status){e.next=15;break}return e.next=11,i.json();case 11:l=e.sent,s=l.success,f=l.data,s&&(u(f),G=f);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:m(!1),n(!1);case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){Z(o,r,c,a,i,"next",e)}function i(e){Z(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!G});var e=function(){h()};return o.a.on("blocksy_exts_sync_exts",e),function(){o.a.off("blocksy_exts_sync_exts",e)}}),[]);var v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),O=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===b?!t.pro:t.pro}))}),[b,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blc"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,v&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return p(e)},className:l()({active:e===b})},{free:Object(a.__)("Free Extensions","blc"),pro:Object(a.__)("Pro Extensions","blc")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===b})},O.map((function(e){var t={extension:Y};return o.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:f,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i[e.name].__object=!i[e.name].__object,u(i),h(H(H({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(V,null)))}}))))},X=window.ctDashboardLocalizations.DashboardContext,Q=(X.Provider,X.Consumer,X),ee=function(e){var t=e.children,n=e.activated,c=e.checked,o=e.onChange;return Object(r.createElement)("div",{onClick:function(){return o()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oe(e,t)}(e,t)||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 oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ae=function(e){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Ye),i=o.currentDemo,l=o.demos_list,u=o.pluginsStatus,s=(o.setCurrentDemo,ce((i||"").split(":"),2)),f=s[0];s[1],l.filter((function(e){return e.name===f||""}));return Object(r.createElement)("div",{style:c},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blc")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blc")),t.plugins.map((function(e){var c=e.plugin,o=e.enabled;return Object(r.createElement)(r.Fragment,{key:c},!u[c]&&Object(r.createElement)(ee,{key:c,checked:o,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===c?ne(ne({},e),{},{enabled:!o}):e}))}))}},ae(c)),u[c]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(c)))}))))},le=function(){var e=Object(r.useContext)(Ye),t=e.currentlyInstalledDemo,n=e.demos_list,c=e.setCurrentDemo,o=e.demo_error;Object(r.useContext)(Q).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blc")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){return c(e.name)},disabled:!!o},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blc"):Object(a.__)("Import","blc")))))})))};function ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(e,t)||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 se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fe=function(e){var t=e.style,n=e.nextStep,c=(Object(r.useContext)(Q).is_child_theme,Object(r.useContext)(Ye)),o=c.setCurrentlyInstalledDemo,i=c.setCurrentDemo,l=c.currentDemo,u=c.demos_list,s=ue(Object(r.useState)(0),2),f=s[0],m=s[1],d=ue(Object(r.useState)("idle"),2),b=d[0],p=d[1],h=ue((l||"").split(":"),2),v=h[0],O=(h[1],u.filter((function(e){return e.name===v}))),y={erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blc"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(O[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[f],_=function(){var e=y[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),f===j.length-1)return void p("done");m(Math.min(j.length-1,f+1))}}};return Object(r.useEffect)((function(){0!==f&&"done"!==b&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===b&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blc")),"loading"===b&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(v,":hide"))}},Object(a.__)("Dismiss","blc")))),"idle"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){p("loading"),e.preventDefault(),_(),o()}},Object(a.__)("Remove","blc")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blc")))))};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Q),i=o.is_child_theme,l=o.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blc")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blc")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(de(de({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blc"):Object(a.__)("Install Child Theme","blc"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blc"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blc")))};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||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 je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Ye),i=o.currentDemo,u=o.demos_list,s=(o.pluginsStatus,o.setCurrentDemo,ye((i||"").split(":"),2)),f=s[0],m=(s[1],u.filter((function(e){return e.name===f||""})));return Object(r.createElement)("div",{style:c},m.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blc")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blc")),Object(r.createElement)("ul",{"data-count":m.length},m.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var c=e.builder,o=e.plugins;return Object(r.createElement)("li",{className:l()({active:c===(null===t.builder?m[0].builder:t.builder)}),onClick:function(){return n(ve(ve({},t),{},{builder:c,plugins:o.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c===(null===t.builder?m[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(c)||"Gutenberg"))})))))};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blc")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blc")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blc"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blc"))))))},Se=function(){var e=Object(r.useContext)(Q),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blc")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blc")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blc")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blc"))))},Ce=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blc");if("import_activate_child"===n)return Object(a.__)("activating child theme","blc");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blc"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blc"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blc");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blc");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blc");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blc");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blc");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blc");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blc");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blc");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blc");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blc");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blc");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],c=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(c,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blc"),term:Object(a.__)("terms","blc"),media:Object(a.__)("images","blc"),post:Object(a.__)("posts","blc"),comment:Object(a.__)("comments","blc")}[e.kind])}return""};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(e,t)||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 Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Me=function(e){e.preventDefault(),e.returnValue=""},Ne=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,c=e.includeMetaSteps,o=[];return void 0!==c&&c&&o.push("register_current_demo"),t.child_theme&&(r||o.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&o.push("plugins"),t.content.erase_content&&o.push("erase_content"),t.content.options&&o.push("options"),t.content.widgets&&o.push("widgets"),t.content.content&&o.push("content"),o.push("install_finish"),o},Le=function(e){var t=e.demoConfiguration,n=e.style,c=function(e){var t=Object(r.useContext)(Ye),n=t.demos_list,c=t.currentDemo,o=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,u=Object(r.useContext)(Q),s=(u.home_url,u.customizer_url,u.is_child_theme),f=(u.Link,Ae(Object(r.useState)(!1),2)),m=f[0],d=f[1],b=Ae(Object(r.useState)(0),2),p=b[0],h=b[1],v=Ae((c||"").split(":"),2),O=v[0],y=(v[1],n.filter((function(e){return e.name===O})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blc"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blc"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blc"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blc"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blc"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blc"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blc"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blc"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Ne({demoConfiguration:e,pluginsStatus:l,is_child_theme:s,includeMetaSteps:!0}),x=w[p],S=Ae(Object(r.useState)(0),2),C=S[0],k=S[1],D=Ae(Object(r.useState)(null),2),z=D[0],A=D[1],P=Object(r.useRef)(C),M=Object(r.useRef)(_);Object(r.useEffect)((function(){P.current=C,M.current=_}));var N=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},L=w.reduce((function(e,t,n){return n>=p?e:e+N(t)}),0)+100*C/_[x].expected_signals*(N(x)/100),T=function(){var e=_[x],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(k(P.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},ze({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var c=n.data,a=(c.comment_count,c.media_count,c.post_count,c.term_count,c.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),p===w.length-1)return d(!0),o(!0),void window.removeEventListener("beforeunload",Me);A(null),k(0),h(Math.min(w.length-1,p+1))}}};return Object(r.useEffect)((function(){m||(A(null),k(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[x]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(c,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:m,stepName:x,stepsDescriptors:_,lastMessage:z,progress:L}}(t),o=c.isCompleted,i=c.stepName,l=c.stepsDescriptors,u=c.lastMessage,s=c.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:o,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(Se,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blc"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blc")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,u&&Ce(u,l)?": ".concat(Ce(u,l)):"",Object(r.createElement)("span",null,Math.round(s),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(s,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(e)||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 Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||Re(e,t)||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 Re(e,t){if(e){if("string"==typeof e)return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ue(e,t):void 0}}function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fe=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Ye)),c=n.installerBlockingReleased,o=n.demos_list,i=n.currentDemo,u=n.pluginsStatus,s=n.currentlyInstalledDemo,f=n.setCurrentDemo,m=Object(r.useContext)(Q).is_child_theme,d=Ie(Object(r.useState)(s),2),b=d[0],p=d[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),v=h[0],O=h[1],y=Ie(Object(r.useState)(0),2),j=y[0],g=y[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!b)return!1;if(-1===b.demo.indexOf(E))return!1}if("child_theme"===e&&m)return!1;var t=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!u[e]})).length)&&("builder"!==e||t.length>1)}))),x=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),p(s),O({builder:1===e.length?e[0].builder:null,child_theme:!0,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||c)&&f("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:x,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(fe,{demoConfiguration:v,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(pe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:v,style:t,setDemoConfiguration:O}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"content"===e&&Object(r.createElement)(xe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"installer"===e&&Object(r.createElement)(Le,{style:t,demoConfiguration:v}))}}))),"installer"!==x&&"modify_demo"!==x&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blc")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===x}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===Ne({demoConfiguration:v,pluginsStatus:u,is_child_theme:m}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===x?Object(a.__)("Install","blc"):Object(a.__)("Next","blc"))))}})},Be=n(7),Ve=n.n(Be);function qe(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return We(e,t)}(e,t)||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 We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ze=function(){var e=He(Object(r.useState)(!1),2),t=e[0],n=e[1],c=He(Object(r.useState)(!1),2),o=c[0],i=c[1],l=He(Object(r.useState)(""),2),u=l[0],s=l[1],f=He(Object(r.useState)(""),2),m=f[0],d=f[1],b=He(Object(r.useState)("coblocks,elementor,contact-form-7"),2),p=b[0],h=b[1],v=He(Object(r.useState)(""),2),O=v[0],y=v[1],j=He(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",u),t.append("is_pro",g),t.append("url",O),t.append("builder",m),t.append("plugins",p),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:c=e.sent,o=c.success,a=c.data,o&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(u,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){qe(o,r,c,a,i,"next",e)}function i(e){qe(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:o,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blc"),value:u,onChange:function(e){var t=e.target.value;return s(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blc"),value:O,onChange:function(e){var t=e.target.value;return y(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blc"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blc"),value:m,onChange:function(e){var t=e.target.value;return d(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blc"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blc"),value:p,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blc"):Object(a.__)("Export site","blc")))}})):null};function $e(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}(e,t)||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 Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ye=Object(r.createContext)({demos:[]}),Je=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ke(Object(r.useState)(!Je),2),n=t[0],c=t[1],o=Ke(Object(r.useState)(Je||[]),2),i=o[0],l=o[1],u=Ke(Object(r.useState)(Xe||{}),2),s=u[0],f=u[1],m=Ke(Object(r.useState)(null),2),d=m[0],b=m[1],p=Ke(Object(r.useState)(null),2),h=p[0],v=p[1],O=Ke(Object(r.useState)(!1),2),y=O[0],j=O[1],g=Ke(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ke(Object(r.useState)(!1),2)),E=_[0],w=_[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&c(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,o=r.success,a=r.data,o&&(l(a.demos),f(a.active_plugins),v(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Je=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:c(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){$e(o,r,c,a,i,"next",e)}function i(e){$e(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){x(!Je)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},y&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:y}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blc"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("Connection to <b>demo.creativethemes.com</b> server didn't worked -- this is required for downloading the starter sites. You need to contact your hosting provider to figure out why your server can't reach to our server.")}}),Object(r.createElement)(V,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Ye.Provider,{value:{demo_error:y,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:d,pluginsStatus:s,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:b,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:v}},Object(r.createElement)(le,null),Object(r.createElement)(Fe,null),Object(r.createElement)(Ze,null)),Object(r.createElement)(V,null)))}})))};function et(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,c=r.success,r.data,c&&((o=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=o.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){et(o,r,c,a,i,"next",e)}function i(e){et(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blc")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blc")))};o.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(J,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),o.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blc"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blc"),path:"/extensions"})})),o.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),o.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
|
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 c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=c.apply(null,r);a&&e.push(a)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,c,o=n(11),a=n(12),i=(c=[],{activateTrap:function(e){if(c.length>0){var t=c[c.length-1];t!==e&&t.pause()}var n=c.indexOf(e);-1===n||c.splice(n,1),c.push(e)},deactivateTrap:function(e){var t=c.indexOf(e);-1!==t&&c.splice(t,1),c.length>0&&c[c.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,c="string"==typeof e?n.querySelector(e):e,u=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),s={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(s.active)return;g(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:u.onActivate;t&&t();return d(),f},deactivate:m,pause:function(){if(s.paused||!s.active)return;s.paused=!0,b()},unpause:function(){if(!s.paused||!s.active)return;s.paused=!1,g(),d()}};return f;function m(e){if(s.active){clearTimeout(r),b(),s.active=!1,s.paused=!1,i.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:u.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:u.returnFocusOnDeactivate)&&l((function(){var e;_((e=s.nodeFocusedBeforeActivation,p("setReturnFocus")||e))})),f}}function d(){if(s.active)return i.activateTrap(f),r=l((function(){_(h())})),n.addEventListener("focusin",O,!0),n.addEventListener("mousedown",v,{capture:!0,passive:!1}),n.addEventListener("touchstart",v,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",y,{capture:!0,passive:!1}),f}function b(){if(s.active)return n.removeEventListener("focusin",O,!0),n.removeEventListener("mousedown",v,!0),n.removeEventListener("touchstart",v,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",y,!0),f}function p(e){var t=u[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function h(){var e;if(!(e=null!==p("initialFocus")?p("initialFocus"):c.contains(n.activeElement)?n.activeElement:s.firstTabbableNode||p("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function v(e){c.contains(e.target)||(u.clickOutsideDeactivates?m({returnFocus:!o.isFocusable(e.target)}):u.allowOutsideClick&&u.allowOutsideClick(e)||e.preventDefault())}function O(e){c.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(s.mostRecentlyFocusedNode||h()))}function y(e){if(!1!==u.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void m();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===s.firstTabbableNode)return e.preventDefault(),void _(s.lastTabbableNode);if(!e.shiftKey&&e.target===s.lastTabbableNode)e.preventDefault(),_(s.firstTabbableNode)}(e)}function j(e){u.clickOutsideDeactivates||c.contains(e.target)||u.allowOutsideClick&&u.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=o(c);s.firstTabbableNode=e[0]||h(),s.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),s.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,c,o;c=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?c(l):r(l.href)?t(e,n,a):c(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){c(a)}))}}:function(e,n,r,c){if((c=c||open("","_blank"))&&(c.document.title=c.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=e:location=e,c=null},u.readAsDataURL(e)}else{var s=o.URL||o.webkitURL,f=s.createObjectURL(e);c?c.location=f:location.href=f,c=null,setTimeout((function(){s.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,c):r)||(e.exports=o)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function c(){}function o(){}o.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,o,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:c};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),c="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var n,o,i,l=[],f=[],m=e.querySelectorAll(r);for(t.includeContainer&&c.call(e,r)&&(m=Array.prototype.slice.apply(m)).unshift(e),n=0;n<m.length;n++)a(o=m[n])&&(0===(i=u(o))?l.push(o):f.push({documentOrder:n,tabIndex:i,node:o}));return f.sort(s).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||u(e)<0)}function i(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,r)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=o},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var c in r)n.call(r,c)&&(e[c]=r[c])}return e};var n=Object.prototype.hasOwnProperty},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(4),o=n.n(c),a=n(1),i=n(2),l=n.n(i),u=n(5),s=n.n(u);n(8);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},b=function(e){function t(){var n,r;f(this,t);for(var c=arguments.length,o=Array(c),a=0;a<c;a++)o[a]=arguments[a];return n=r=m(this,e.call.apply(e,[this].concat(o))),p.call(r),m(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,c=this._refs;return{state:e,props:d(t),refs:c,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:d(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:d(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:d(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:d(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(s.a.Component);b.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var p=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},h=b,v=function(e){var t=e.children,n=e.container,c=void 0===n?document.body:n,o=e.type,a=void 0===o?"reach-portal":o;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=c.hasOwnProperty("current")?c.current:c;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=c.hasOwnProperty("current")?c.current:c;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var O=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},y=n(6),j=n.n(y);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){if(null==e)return{};var n,r,c=function(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var E=function(){},w=function(){},x=function(e,t){var n,r,c;e.disposeAriaHider=(n=e.overlayNode,r=[],c=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),c.push(e),e.setAttribute("aria-hidden","true"))}})),function(){c.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},S=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},C=React.createContext(),k=React.forwardRef((function(e,t){var n=e.container,c=e.isOpen,o=void 0===c||c,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,u=e.onClick,s=e.onKeyDown,f=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},o?Object(r.createElement)(v,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;x(t,l)},willUnmount:S},(function(e){var n=e.refs;return Object(r.createElement)(C.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:O(u,(function(e){e.stopPropagation(),i()})),onKeyDown:O(s,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));k.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},z=React.forwardRef((function(e,t){var n=e.onClick,c=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(C.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:O(n,D),ref:function(n){e(n),t&&t(n)}},c))}))})),A=n(3),P=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,c=void 0===n?P:n,o=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[c(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return c(e)&&function(t){return Object(r.createElement)(k,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(z,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),o(e,t)))}}))};function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e,t)||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 L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=function(e){var t=N(Object(r.useState)(!1),2),n=t[0],c=t[1];return[function(){return c(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return c(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function I(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){I(o,r,c,a,i,"next",e)}function i(e){I(o,r,c,a,i,"throw",e)}a(void 0)}))}}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t)}(e,t)||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 U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),c=F(n,2),o=c[0],i=c[1],l=Object(r.useState)(!1),u=F(l,2),s=u[0],f=u[1],m=ctDashboardLocalizations.plugin_data.is_pro,d=function(){var n=R(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[o,d,!m&&e.config.pro?Object(r.createElement)(M,{items:s,onDismiss:function(){return f(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-activation-action-modal"},Object(r.createElement)("svg",{viewBox:"0 0 59.99 60"},Object(r.createElement)("path",{d:"M14.41 43.65c0 .13.08.27.11.41a5.91 5.91 0 010 2.37c-1.78 1.14-3.2 1.19-4.34.68-2.83-1.27-3.81-6-3.81-6s.38-.08 1-.15a6.08 6.08 0 012.64.91 4.17 4.17 0 01-.22-1 6.47 6.47 0 013.2 1 8.14 8.14 0 01.35-5 12.74 12.74 0 01.65-1.62s8.51 4.32 3 9.27a5.81 5.81 0 01-2.34-.68 2 2 0 01-.24-.19zM7.17 15.93q.2.22.42.45a5.74 5.74 0 002.68-.74 5.51 5.51 0 00-.28 2.76 6.79 6.79 0 001.47.81c5 1.94 6.91-5.79 6.91-5.79a13.35 13.35 0 00-4.5-.26 5.64 5.64 0 00-2.15.72 4.42 4.42 0 00.23-.81c.51-2.62-.94-5.82-.94-5.82a13.76 13.76 0 00-2.44 1.51c-2 1.51-4 4-1.53 7a.65.65 0 00.13.17zm.93 16.56a6.7 6.7 0 00.84.76c7.28-1.28 2.36-9.46 2.36-9.46a14.28 14.28 0 00-2.18 1.69 7.39 7.39 0 00-2.13 3.35v-1.19a5.49 5.49 0 00-1.27-1.71 12.75 12.75 0 00-3.94-2.44 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.75.46 8.25 8.25 0 00.86 0 6.45 6.45 0 001.14-1.76 4.41 4.41 0 001.11 1.93zM18.79 9.27c6 1.85 8.82-7.61 8.82-7.61a17.44 17.44 0 00-6.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zM49.6 40.93a6.08 6.08 0 00-2.64.91 4.21 4.21 0 00.22-1 11.57 11.57 0 00-1.19-5.59 13.88 13.88 0 00-2.36 1.58c-1.87 1.58-3.82 4.16-1.33 7 .06.08.13.15.2.23s.29.3.46.45a5.69 5.69 0 002.65-.86 5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c5.16 1.94 6.81-6 6.81-6a13.28 13.28 0 00-4.02-.18zm-6.49-27.77a10.69 10.69 0 00-1.5.26s1.15 4.53 3.91 5.79c1.18.54 2.66.47 4.47-.81a5.88 5.88 0 00-.16-2.47 1.42 1.42 0 00-.1-.29l.23.13a6 6 0 002.45.61c5.24-5.19-3.42-9.13-3.42-9.13a13.57 13.57 0 00-.54 1.51 8.37 8.37 0 00-.17 5.12 6.62 6.62 0 00-3.29-.81 12.09 12.09 0 00-1.88.09zm15.13 10.33a13.53 13.53 0 00-2.61 1.37 7.1 7.1 0 00-2.64 2.78v1.18a6.69 6.69 0 00-1.73-2.89 13.85 13.85 0 00-2.62-2.14 13.17 13.17 0 00-.82 1.69c-.83 2-1.65 5.4 1 7a6.4 6.4 0 002.16.76 7.35 7.35 0 001-.93 4.26 4.26 0 001-1.76 6.06 6.06 0 00.76 1.3 6.25 6.25 0 00.4.5c7.43.09 4.1-8.86 4.1-8.86zM38.19 9.27c1.55.52 3.41.27 5.61-1.43.51-6.56-4.81-7.11-8.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zM41.99 54h-3v-6a2 2 0 00-2-2h-14a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h28v-3a2 2 0 00-2-2zM25.76 21.65l-5.77.84a1 1 0 00-.81.68 1 1 0 00.26 1l4.19 4.11a1 1 0 01.28.88l-.92 5.44-.07.4a1 1 0 00.4 1 1 1 0 001.06.07l3.55-1.88 1.6-.85a1 1 0 01.94 0l2.4 1.27 2.75 1.46a1 1 0 001.05-.07 1 1 0 00.4-1l-1-5.81a1 1 0 01.28-.88l4.19-4.11a1 1 0 00.26-1 1 1 0 00-.81-.68l-5.78-.84a1 1 0 01-.75-.55l-2.57-5.3a1 1 0 00-1.8 0l-1.17 2.39-1.41 2.88a1 1 0 01-.75.55z",fill:"#ffa800"}),Object(r.createElement)("path",{d:"M19.99 22.49l5.78-.84a1 1 0 00.75-.55l1.41-2.88 1.41 2.88a1 1 0 00.75.55l5.78.84a1 1 0 01.56 1.71l-4.19 4.11a1 1 0 00-.29.88l.92 5.4-2.4-1.27a1 1 0 00-.94 0l-1.6.85-1.6-.85a1 1 0 00-.93 0l-2.41 1.28.92-5.41a1 1 0 00-.28-.88l-4.2-4.11a1 1 0 01-.26-1 1 1 0 01.82-.71zm-13 8.07a4.41 4.41 0 001.14 1.93c2.67-1.61 1.85-5 1-7a7.39 7.39 0 00-2.14 3.34 3.49 3.49 0 000 1.7zm11.8-21.29c3.94-1.27 5.82-7.61 5.82-7.61a19.24 19.24 0 00-3.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zm-7.31 9.94c2.76-1.26 3.91-5.79 3.91-5.79a10.69 10.69 0 00-1.5-.26 12.35 12.35 0 00-1.9-.09 4.42 4.42 0 01-.23.81 3.48 3.48 0 00-1.46 1.75 5.51 5.51 0 00-.31 2.77 6.79 6.79 0 001.49.81zm37.4 13.28a4.41 4.41 0 001.11-1.93 3.57 3.57 0 000-1.72 7.31 7.31 0 00-2.17-3.34c-.83 2.02-1.61 5.38 1.06 6.99zM45.5 19.21a6.79 6.79 0 001.49-.81 5.51 5.51 0 00-.26-2.76 3.53 3.53 0 00-1.46-1.75 5.79 5.79 0 00-2.13-.72 10.69 10.69 0 00-1.5.26s1.1 4.57 3.86 5.78zm-7.31-9.94a8.42 8.42 0 002.61-1.43c.38-4.84-2.41-6.41-5.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zm8.8 32.57l-1.4 1.8a5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c2.83-1.27 3.81-6 3.81-6s-.38-.08-1-.15a6.08 6.08 0 00-2.61.89zm1.42-33.08a8.37 8.37 0 00-.17 5.12l1.46 1.75a1.42 1.42 0 01.1.29.65.65 0 00.13-.16c2.48-2.97.44-5.49-1.52-7zm-6.15 35.08a1.92 1.92 0 00.31-.18 3.55 3.55 0 001.42-1.79 8.1 8.1 0 00-.35-5c-1.92 1.54-3.87 4.13-1.38 6.97zm13.37-19a7.1 7.1 0 00-2.64 2.8v2.91a6.06 6.06 0 00.76 1.3c2.79-1.3 2.37-4.98 1.88-6.99zM11.41 43.65l-1.34-1.75a6.08 6.08 0 00-2.64-.91c-.6.07-1 .15-1 .15s1 4.77 3.81 6a6.75 6.75 0 001.34-.68 5.82 5.82 0 00-.14-2.78zM38.99 54h-3v-6a2 2 0 00-2-2h-11a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h25v-3a2 2 0 00-2-2zm-25.6-17.17a8.14 8.14 0 00-.35 5 3.45 3.45 0 001.31 1.72h.05c0 .13.08.27.11.41.07-.08.14-.15.2-.23 2.5-2.73.55-5.32-1.32-6.9z",fill:"#fedd0a"}),Object(r.createElement)("path",{d:"M16.18 7.84C15.8 3 18.59 1.43 21.51 1.08a14.84 14.84 0 013 0C21.6 1.44 18.82 3 19.2 7.84a8.42 8.42 0 002.59 1.43 4.81 4.81 0 01-3 0 8.42 8.42 0 01-2.61-1.43zm-7.61.92c-2 1.51-4 4-1.53 7a.65.65 0 00.13.16q.2.22.42.45a5.91 5.91 0 002.4-.61c-2.45-3-.42-5.49 1.54-7a13.57 13.57 0 00-.54-1.51 13.76 13.76 0 00-2.42 1.51zM15.99 56v3h3v-3a2 2 0 012-2h-3a2 2 0 00-2 2zm7-10a2 2 0 00-2 2v6h3v-6a2 2 0 012-2zM4.35 24.86a13.53 13.53 0 00-2.61-1.37 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.79.46 8.25 8.25 0 00.86 0 5.84 5.84 0 00.4-.5c-2.81-1.27-2.39-4.95-1.9-6.96z",fill:"#fff"}),Object(r.createElement)("path",{d:"M59.18 23.14a1 1 0 00-1.29-.59 14.74 14.74 0 00-3.85 2.26 24.35 24.35 0 00-.45-3.4 23.39 23.39 0 00-1.21-4 1 1 0 00.71-.29 5.42 5.42 0 001.9-4.91c-.64-3.56-5.44-5.78-5.65-5.87a1 1 0 00-1.32.5 14.57 14.57 0 00-.85 2.6 26.55 26.55 0 00-2.37-2.12 6.66 6.66 0 00-2.23-5.7C38.99-1.31 32.36.61 32.08.7a1 1 0 00-.59.48 1 1 0 00-.08.76c.08.28 2.09 6.87 6.51 8.3a5.84 5.84 0 001.74.27 7.41 7.41 0 004.15-1.44 22.7 22.7 0 013.1 3 1.48 1.48 0 000 .21 13.38 13.38 0 00-5.58.15 1 1 0 00-.72 1.21c.06.22 1.39 5.34 4.79 6.59a4.42 4.42 0 001.55.28 6.3 6.3 0 003.59-1.31 1.2 1.2 0 00.26-.29 22.46 22.46 0 01.82 2.88 21.37 21.37 0 01.43 3.47 15 15 0 00-2.86-2.35 1 1 0 00-1.38.34c-.11.2-2.81 4.75-1.3 8a5.31 5.31 0 004.07 2.87c-.08.21-.15.42-.24.63a21.75 21.75 0 01-2.25 4 14.51 14.51 0 00-1.26-4 1 1 0 00-.58-.5 1 1 0 00-.76.06c-.2.1-4.9 2.53-5.38 6.11a5.19 5.19 0 001.7 4.37 22.47 22.47 0 01-2.46 1.34A3 3 0 0036.99 45h-6V34.73l4.15 2.2a2.1 2.1 0 00.94.23 2 2 0 002-2.33l-1-5.81 4.2-4.11a2 2 0 00-1.12-3.4l-5.78-.85-2.59-5.26a2 2 0 00-3.6 0l-2.58 5.26-5.77.85a2 2 0 00-1.11 3.4L22.92 29l-1 5.81a2 2 0 00.8 1.94 2 2 0 002.11.15l4.16-2.17V45h-6a3 3 0 00-2.37 1.18 21 21 0 01-2.46-1.35 5.16 5.16 0 001.7-4.36c-.48-3.58-5.18-6-5.38-6.11a1 1 0 00-.76-.06 1 1 0 00-.58.5 14.38 14.38 0 00-1.26 4 21.11 21.11 0 01-2.25-4c-.09-.21-.16-.42-.24-.64a5.26 5.26 0 004.07-2.86c1.51-3.29-1.19-7.84-1.3-8a1 1 0 00-1.38-.34 15 15 0 00-2.86 2.35 21.37 21.37 0 01.43-3.47 22.46 22.46 0 01.82-2.88 1.2 1.2 0 00.26.29 6.3 6.3 0 003.56 1.28 4.42 4.42 0 001.55-.28c3.4-1.25 4.73-6.37 4.79-6.59a1 1 0 00-.72-1.21 13.57 13.57 0 00-5.58-.15 1.48 1.48 0 000-.21 22.7 22.7 0 013.1-3 7.39 7.39 0 004.15 1.44 5.73 5.73 0 001.73-.27c4.43-1.43 6.44-8 6.52-8.3a1 1 0 00-.08-.76 1 1 0 00-.55-.5c-.28-.09-6.89-2-10.51.92a6.66 6.66 0 00-2.23 5.7 26.55 26.55 0 00-2.37 2.12 14.57 14.57 0 00-.8-2.6 1 1 0 00-1.32-.5c-.2.09-5 2.31-5.65 5.87a5.42 5.42 0 001.91 4.88 1 1 0 00.71.29 23.65 23.65 0 00-1.21 4 24.35 24.35 0 00-.44 3.43 14.74 14.74 0 00-3.9-2.26 1 1 0 00-1.29.59c-.08.21-1.89 5.18.19 8.14a5.37 5.37 0 004.71 2.08h.11a1 1 0 00.73-.36c.09-.1.16-.22.25-.33a24.67 24.67 0 001 2.89 23.67 23.67 0 002.4 4.32 14.22 14.22 0 00-4 .19 1 1 0 00-.77 1.18c0 .22 1.15 5.4 4.49 6.8a4.41 4.41 0 001.75.35 6.4 6.4 0 003.43-1.15 1 1 0 00.44-.64 6.59 6.59 0 00.11-1.08l.84.59a23 23 0 003.51 1.97V53h-2a3 3 0 00-3 3v3a1 1 0 001 1h28a1 1 0 001-1v-3a3 3 0 00-3-3h-2v-4.91a23 23 0 003.51-1.94c.29-.19.56-.41.84-.62a7 7 0 00.11 1.11 1 1 0 00.44.64 6.4 6.4 0 003.43 1.15 4.41 4.41 0 001.75-.35c3.34-1.4 4.45-6.58 4.49-6.8a1 1 0 00-.77-1.18 14.22 14.22 0 00-4-.19 23.67 23.67 0 002.4-4.32 24.67 24.67 0 001-2.89c.09.11.16.23.25.33a1 1 0 00.73.33h.11a5.37 5.37 0 004.71-2.08c2.08-2.96.27-7.93.19-8.14zM38.65 6a22.22 22.22 0 013.4 1.82 4.32 4.32 0 01-3.51.53c-2.55-.82-4.18-4.24-4.86-6 1.81-.38 5.57-.88 7.65.81a4.12 4.12 0 011.42 2.71 23.48 23.48 0 00-3.33-1.75 1 1 0 00-1.31.53A1 1 0 0038.65 6zm-20-2.8c2.08-1.71 5.84-1.2 7.65-.83-.68 1.72-2.31 5.14-4.86 6a4.32 4.32 0 01-3.51-.53A22.22 22.22 0 0121.33 6a1 1 0 00.54-1.31 1 1 0 00-1.31-.53 24 24 0 00-3.33 1.75 4.12 4.12 0 011.42-2.73zM5.92 30.41a5.66 5.66 0 01-.58.94 3.27 3.27 0 01-2.71-1.21c-1-1.37-.65-3.75-.26-5.28a8.32 8.32 0 013.62 3.05v.61a4.45 4.45 0 00-.15.9 4.12 4.12 0 00.08.99zm6-15.39c1.25-1.11 3.66-1 5.21-.83-.55 1.47-1.64 3.61-3.21 4.18a3.23 3.23 0 01-2.93-.54 3.27 3.27 0 01.89-2.83zm-4.93-2.45c.29-1.65 2.21-3.11 3.56-3.91a8.35 8.35 0 01.38 4.61 3.81 3.81 0 00-.32.24 4.52 4.52 0 00-1.05 1.37 3.53 3.53 0 01-.56.25h-.01a4.51 4.51 0 01-.95.22 3.26 3.26 0 01-1.05-2.78zm.91 17c.09-1.7 1.78-3.37 3.09-4.32.66 1.42 1.4 3.7.7 5.23a3.23 3.23 0 01-2.43 1.69 3.25 3.25 0 01-1.41-2.63zm5.78 16.29a3.26 3.26 0 01-2.94.41c-1.55-.65-2.55-2.84-3-4.34a8.39 8.39 0 014.58.65 2.92 2.92 0 00.17.36 4.51 4.51 0 001.1 1.32 4.53 4.53 0 01.04 1.57zm3.08-2.36a5 5 0 01-.85-.21h-.08A2.84 2.84 0 0114.16 42c-.8-1.46-.22-3.8.34-5.27 1.32.86 3.16 2.4 3.38 4.06a3.28 3.28 0 01-1.17 2.68zm7.19-8.3l1-5.8a2 2 0 00-.57-1.77l-4.19-4.11 5.77-.85a2 2 0 001.51-1.1l2.52-5.3 2.58 5.27a2 2 0 001.51 1.1l5.77.84-4.19 4.12a2 2 0 00-.57 1.76l1 5.8-5.15-2.73a2 2 0 00-1.88 0zM21.99 48a1 1 0 011-1h14a1 1 0 011 1v5h-16zm20 7a1 1 0 011 1v2h-26v-2a1 1 0 011-1h24zm3.83-13a2.84 2.84 0 01-1.62 1.28h-.07a6.37 6.37 0 01-.86.21 3.28 3.28 0 01-1.17-2.73c.22-1.66 2.06-3.2 3.38-4.06.56 1.45 1.14 3.79.34 5.3zm6.5-.05c-.48 1.5-1.48 3.69-3 4.34a3.26 3.26 0 01-2.94-.41 4.53 4.53 0 01.12-1.6 4.51 4.51 0 001.1-1.32c.07-.12.11-.24.17-.36a8.39 8.39 0 014.55-.7zM46.1 18.37c-1.57-.57-2.66-2.71-3.21-4.18 1.55-.22 4-.28 5.21.83a3.27 3.27 0 01.89 2.81 3.26 3.26 0 01-2.89.54zm4.67 13.8a3.23 3.23 0 01-2.43-1.69c-.7-1.52 0-3.8.71-5.23 1.25.95 3 2.62 3.08 4.29a3.25 3.25 0 01-1.36 2.63zm1.22-16.82a4.75 4.75 0 01-1-.22 3.87 3.87 0 01-.55-.25 4.52 4.52 0 00-1-1.37 3.81 3.81 0 00-.32-.24 8.45 8.45 0 01.38-4.61c1.35.8 3.27 2.25 3.56 3.9a3.27 3.27 0 01-1.07 2.79zm5.36 14.79a3.27 3.27 0 01-2.71 1.21 5.66 5.66 0 01-.58-.94 4.09 4.09 0 00.06-1 5.28 5.28 0 00-.15-.9v-.6a8.37 8.37 0 013.6-3.06c.42 1.54.74 3.92-.22 5.29zM33.99 50a1 1 0 01-1 1h-6a1 1 0 010-2h6a1 1 0 011 1z"})),Object(r.createElement)("h2",null,"Upgrade to Pro"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant full access to all premium extensions and features.","blc")),Object(r.createElement)("button",{className:"ct-button-primary"},Object(a.__)("Upgrade Now","blc")))}}):null]},V=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Need help or advice?","blc")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blc")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Support Ticket","blc")),Object(r.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Join Facebook Community","blc")))};function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(e,t)}(e,t)||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 K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var G=null,J=function(e){var t=e.extension,n=e.onExtsSync,c=$(T(t),2),o=c[0],i=c[1],u=$(B(t,(function(){n()})),3),s=u[0],f=u[1],m=u[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,s&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:s,onClick:function(){f()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),t.readme&&Object(r.createElement)("button",{onClick:function(){return o()},className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,c=e.url;return Object(r.createElement)("a",{href:c,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,m)},Y=function(){var e=$(Object(r.useState)(!G),2),t=e[0],n=e[1],c=$(Object(r.useState)(G||[]),2),i=c[0],u=c[1],s=$(Object(r.useState)(!1),2),f=s[0],m=s[1],d=$(Object(r.useState)("free"),2),b=d[0],p=d[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i,l,s,f,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},r=H({verbose:!1,extension:null,extAction:null},t),c=r.verbose,o=r.extension,a=r.extAction,c&&n(!0),m(!0),e.prev=4,e.next=7,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),H({method:"POST"},o&&a?{body:JSON.stringify({extension:o,extAction:a})}:{}));case 7:if(200!==(i=e.sent).status){e.next=15;break}return e.next=11,i.json();case 11:l=e.sent,s=l.success,f=l.data,s&&(u(f),G=f);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:m(!1),n(!1);case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){Z(o,r,c,a,i,"next",e)}function i(e){Z(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!G});var e=function(){h()};return o.a.on("blocksy_exts_sync_exts",e),function(){o.a.off("blocksy_exts_sync_exts",e)}}),[]);var v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),O=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return H(H({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===b?!t.pro:t.pro}))}),[b,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blc"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,v&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return p(e)},className:l()({active:e===b})},{free:Object(a.__)("Free Extensions","blc"),pro:Object(a.__)("Pro Extensions","blc")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===b})},O.map((function(e){var t={extension:J};return o.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:f,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i[e.name].__object=!i[e.name].__object,u(i),h(H(H({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(V,null)))}}))))},X=window.ctDashboardLocalizations.DashboardContext,Q=(X.Provider,X.Consumer,X),ee=function(e){var t=e.children,n=e.activated,c=e.checked,o=e.onChange;return Object(r.createElement)("div",{onClick:function(){return o()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oe(e,t)}(e,t)||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 oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ae=function(e){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Je),i=o.currentDemo,l=o.demos_list,u=o.pluginsStatus,s=(o.setCurrentDemo,ce((i||"").split(":"),2)),f=s[0];s[1],l.filter((function(e){return e.name===f||""}));return Object(r.createElement)("div",{style:c},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blc")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blc")),t.plugins.map((function(e){var c=e.plugin,o=e.enabled;return Object(r.createElement)(r.Fragment,{key:c},!u[c]&&Object(r.createElement)(ee,{key:c,checked:o,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===c?ne(ne({},e),{},{enabled:!o}):e}))}))}},ae(c)),u[c]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(c)))}))))},le=function(){var e=Object(r.useContext)(Je),t=e.currentlyInstalledDemo,n=e.demos_list,c=e.setCurrentDemo,o=e.demo_error,i=e.setInstallerBlockingReleased;Object(r.useContext)(Q).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blc")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){i(!1),c(e.name)},disabled:!!o},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blc"):Object(a.__)("Import","blc")))))})))};function ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(e,t)||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 se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fe=function(e){var t=e.style,n=e.nextStep,c=(Object(r.useContext)(Q).is_child_theme,Object(r.useContext)(Je)),o=c.setCurrentlyInstalledDemo,i=c.setCurrentDemo,l=c.currentDemo,u=c.demos_list,s=ue(Object(r.useState)(0),2),f=s[0],m=s[1],d=ue(Object(r.useState)("idle"),2),b=d[0],p=d[1],h=ue((l||"").split(":"),2),v=h[0],O=(h[1],u.filter((function(e){return e.name===v}))),y={erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blc"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(O[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[f],_=function(){var e=y[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),f===j.length-1)return void p("done");m(Math.min(j.length-1,f+1))}}};return Object(r.useEffect)((function(){0!==f&&"done"!==b&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===b&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blc")),"loading"===b&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(v,":hide"))}},Object(a.__)("Dismiss","blc")))),"idle"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){p("loading"),e.preventDefault(),_(),o()}},Object(a.__)("Remove","blc")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blc")))))};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Q),i=o.is_child_theme,l=o.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blc")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blc")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blc")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(de(de({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blc"):Object(a.__)("Install Child Theme","blc"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blc"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blc")))};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||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 je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Je),i=o.currentDemo,u=o.demos_list,s=(o.pluginsStatus,o.setCurrentDemo,ye((i||"").split(":"),2)),f=s[0],m=(s[1],u.filter((function(e){return e.name===f||""})));return Object(r.createElement)("div",{style:c},m.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blc")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blc")),Object(r.createElement)("ul",{"data-count":m.length},m.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var c=e.builder,o=e.plugins;return Object(r.createElement)("li",{className:l()({active:c===(null===t.builder?m[0].builder:t.builder)}),onClick:function(){return n(ve(ve({},t),{},{builder:c,plugins:o.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c===(null===t.builder?m[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===c&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(c)||"Gutenberg"))})))))};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:c},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blc")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blc")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blc"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blc"))))))},Se=function(){var e=Object(r.useContext)(Q),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blc")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blc")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blc")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blc"))))},Ce=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blc");if("import_activate_child"===n)return Object(a.__)("activating child theme","blc");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blc"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blc"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blc");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blc");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blc");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blc");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blc");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blc");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blc");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blc");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blc");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blc");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blc");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],c=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(c,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blc"),term:Object(a.__)("terms","blc"),media:Object(a.__)("images","blc"),post:Object(a.__)("posts","blc"),comment:Object(a.__)("comments","blc")}[e.kind])}return""};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(e,t)||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 Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Me=function(e){e.preventDefault(),e.returnValue=""},Ne=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,c=e.includeMetaSteps,o=[];return void 0!==c&&c&&o.push("register_current_demo"),t.child_theme&&(r||o.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&o.push("plugins"),t.content.erase_content&&o.push("erase_content"),t.content.options&&o.push("options"),t.content.widgets&&o.push("widgets"),t.content.content&&o.push("content"),o.push("install_finish"),o},Le=function(e){var t=e.demoConfiguration,n=e.style,c=function(e){var t=Object(r.useContext)(Je),n=t.demos_list,c=t.currentDemo,o=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,u=Object(r.useContext)(Q),s=(u.home_url,u.customizer_url,u.is_child_theme),f=(u.Link,Ae(Object(r.useState)(!1),2)),m=f[0],d=f[1],b=Ae(Object(r.useState)(0),2),p=b[0],h=b[1],v=Ae((c||"").split(":"),2),O=v[0],y=(v[1],n.filter((function(e){return e.name===O})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blc"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blc"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blc"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blc"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blc"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blc"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blc"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blc"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Ne({demoConfiguration:e,pluginsStatus:l,is_child_theme:s,includeMetaSteps:!0}),x=w[p],S=Ae(Object(r.useState)(0),2),C=S[0],k=S[1],D=Ae(Object(r.useState)(null),2),z=D[0],A=D[1],P=Object(r.useRef)(C),M=Object(r.useRef)(_);Object(r.useEffect)((function(){P.current=C,M.current=_}));var N=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},L=w.reduce((function(e,t,n){return n>=p?e:e+N(t)}),0)+100*C/_[x].expected_signals*(N(x)/100),T=function(){var e=_[x],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(k(P.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},ze({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var c=n.data,a=(c.comment_count,c.media_count,c.post_count,c.term_count,c.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),p===w.length-1)return d(!0),o(!0),void window.removeEventListener("beforeunload",Me);A(null),k(0),h(Math.min(w.length-1,p+1))}}};return Object(r.useEffect)((function(){m||(A(null),k(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[x]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(c,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:m,stepName:x,stepsDescriptors:_,lastMessage:z,progress:L}}(t),o=c.isCompleted,i=c.stepName,l=c.stepsDescriptors,u=c.lastMessage,s=c.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:o,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(Se,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blc"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blc")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,u&&Ce(u,l)?": ".concat(Ce(u,l)):"",Object(r.createElement)("span",null,Math.round(s),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(s,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(e)||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 Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||Re(e,t)||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 Re(e,t){if(e){if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fe(e,t):void 0}}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ue=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Je)),c=n.installerBlockingReleased,o=n.demos_list,i=n.currentDemo,u=n.pluginsStatus,s=n.currentlyInstalledDemo,f=n.setCurrentDemo,m=Object(r.useContext)(Q).is_child_theme,d=Ie(Object(r.useState)(s),2),b=d[0],p=d[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),v=h[0],O=h[1],y=Ie(Object(r.useState)(0),2),j=y[0],g=y[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!b)return!1;if(-1===b.demo.indexOf(E))return!1}if("child_theme"===e&&m)return!1;var t=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!u[e]})).length)&&("builder"!==e||t.length>1)}))),x=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=o.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),p(s),O({builder:1===e.length?e[0].builder:null,child_theme:!0,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||c)&&f("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:x,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(fe,{demoConfiguration:v,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(pe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:v,style:t,setDemoConfiguration:O}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"content"===e&&Object(r.createElement)(xe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"installer"===e&&Object(r.createElement)(Le,{style:t,demoConfiguration:v}))}}))),"installer"!==x&&"modify_demo"!==x&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blc")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===x}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===Ne({demoConfiguration:v,pluginsStatus:u,is_child_theme:m}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===x?Object(a.__)("Install","blc"):Object(a.__)("Next","blc"))))}})},Be=n(7),Ve=n.n(Be);function qe(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return We(e,t)}(e,t)||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 We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ze=function(){var e=He(Object(r.useState)(!1),2),t=e[0],n=e[1],c=He(Object(r.useState)(!1),2),o=c[0],i=c[1],l=He(Object(r.useState)(""),2),u=l[0],s=l[1],f=He(Object(r.useState)(""),2),m=f[0],d=f[1],b=He(Object(r.useState)("coblocks,elementor,contact-form-7"),2),p=b[0],h=b[1],v=He(Object(r.useState)(""),2),O=v[0],y=v[1],j=He(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",u),t.append("is_pro",g),t.append("url",O),t.append("builder",m),t.append("plugins",p),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:c=e.sent,o=c.success,a=c.data,o&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(u,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){qe(o,r,c,a,i,"next",e)}function i(e){qe(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:o,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blc"),value:u,onChange:function(e){var t=e.target.value;return s(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blc"),value:O,onChange:function(e){var t=e.target.value;return y(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blc"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blc"),value:m,onChange:function(e){var t=e.target.value;return d(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blc"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blc"),value:p,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blc"):Object(a.__)("Export site","blc")))}})):null};function $e(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}(e,t)||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 Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Je=Object(r.createContext)({demos:[]}),Ye=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ke(Object(r.useState)(!Ye),2),n=t[0],c=t[1],o=Ke(Object(r.useState)(Ye||[]),2),i=o[0],l=o[1],u=Ke(Object(r.useState)(Xe||{}),2),s=u[0],f=u[1],m=Ke(Object(r.useState)(null),2),d=m[0],b=m[1],p=Ke(Object(r.useState)(null),2),h=p[0],v=p[1],O=Ke(Object(r.useState)(!1),2),y=O[0],j=O[1],g=Ke(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ke(Object(r.useState)(!1),2)),E=_[0],w=_[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&c(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,o=r.success,a=r.data,o&&(l(a.demos),f(a.active_plugins),v(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Ye=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:c(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){$e(o,r,c,a,i,"next",e)}function i(e){$e(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){x(!Ye)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},y&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:y}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blc"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("Connection to <b>demo.creativethemes.com</b> server didn't worked -- this is required for downloading the starter sites. You need to contact your hosting provider to figure out why your server can't reach to our server.")}}),Object(r.createElement)(V,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Je.Provider,{value:{demo_error:y,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:d,pluginsStatus:s,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:b,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:v}},Object(r.createElement)(le,null),Object(r.createElement)(Ue,null),Object(r.createElement)(Ze,null)),Object(r.createElement)(V,null)))}})))};function et(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,c=r.success,r.data,c&&((o=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=o.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){et(o,r,c,a,i,"next",e)}function i(e){et(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blc")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blc")))};o.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(Y,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),o.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blc"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blc"),path:"/extensions"})})),o.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),o.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
|
static/bundle/dashboard.min.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* - v1.8.1
|
3 |
+
*
|
4 |
+
* Copyright (c) 2021
|
5 |
+
* Licensed GPLv2+
|
6 |
+
*/
|
7 |
+
|
8 |
+
.ct-mailchimp-modal{--modal-min-height: 300px}.mailchimp-credentials{display:grid;grid-template-columns:1fr 1fr 1fr;grid-column-gap:10px;margin:5px 0 0 0;padding:25px 0 0 0;border-top:1px dashed #eee}.mailchimp-credentials section{display:flex;flex-direction:column;min-width:0}.mailchimp-credentials label{display:block;font-size:12px;margin-bottom:3px;opacity:0.7}.mailchimp-credentials input{--height: 35px}.ct-extensions-sourse{display:flex;justify-content:center;margin:0 0 40px 0}.ct-extensions-sourse li{display:flex;align-items:center;height:38px;font-weight:500;padding:0 30px;margin:0;cursor:pointer;border:1px solid rgba(226,230,235,0.7)}.ct-extensions-sourse li.active{color:#fff;background:var(--accentColor);border-color:var(--accentColor)}.ct-extensions-sourse li:hover:not(.active){color:var(--accentColor)}.ct-extensions-sourse li:first-child{border-right:0;border-radius:4px 0 0 4px}.ct-extensions-sourse li:last-child{border-left:0;border-radius:0 4px 4px 0}.ct-config-btn{margin-right:auto;margin-left:10px}.ct-config-btn:before{font-family:dashicons;content:"\f111";font-size:14px;margin-right:5px;opacity:0.9}.ct-minimal-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;padding:0;color:inherit;cursor:pointer;color:#c9cfd6;background:transparent;transition:color 0.2s ease}.ct-minimal-button:hover{color:#9ca9b9}.ct-minimal-button:focus{outline:none}.ct-minimal-button svg{fill:currentColor}.ct-option-info{display:flex;align-items:center;justify-content:center;font-style:normal;line-height:normal;margin-left:auto}.ct-option-info:before{font-family:dashicons;content:"\f348";font-size:16px;line-height:16px}.ct-demos-list-container ul{display:grid;grid-column-gap:30px;grid-row-gap:30px;margin:0;padding:0;list-style:none}@media (min-width: 783px){.ct-demos-list-container ul{grid-template-columns:repeat(2, 1fr)}}.ct-demos-list-container ul li{margin:0;box-sizing:border-box;box-shadow:0 2px 5px rgba(143,163,184,0.12)}.ct-demos-list-container ul li figure{position:relative;margin:0;overflow:hidden;border-radius:3px 3px 0 0}.ct-demos-list-container ul li figure:before{content:'';display:block;width:100%;padding-bottom:75%}.ct-demos-list-container ul li figure img{position:absolute;top:0;left:0;width:100%;height:100%}.ct-demos-list-container ul li figure section{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;right:0;bottom:0;opacity:0;background:rgba(36,41,45,0.9);transition:opacity 0.2s ease}.ct-demos-list-container ul li figure section h3{font-size:15px;color:#fff !important;margin:0 0 25px 0}.ct-demos-list-container ul li figure section div{display:flex}.ct-demos-list-container ul li figure section span{padding:8px 12px;display:block;font-size:17px;font-weight:500;color:#fff;border-radius:3px;border:2px solid rgba(255,255,255,0.5);background:rgba(36,41,45,0.4)}.ct-demos-list-container ul li figure section span:not(:last-child){margin-right:15px}.ct-demos-list-container ul li:hover figure>section{opacity:1}.ct-demos-list-container ul li.ct-is-pro figure{position:relative}.ct-demos-list-container ul li.ct-is-pro figure a{position:absolute;z-index:1;content:'PRO';top:0;right:0;font-size:13px;font-weight:700;letter-spacing:.03em;color:#a1680d;text-decoration:none;padding:5px 15px;margin:25px;background:#ffc568;border-radius:3px;box-shadow:0 5px 8px 0 rgba(234,157,33,0.3)}.ct-demo-actions{display:flex;align-items:center;padding:20px 25px;border-radius:0 0 3px 3px;border:1px solid rgba(226,230,235,0.7);background:rgba(235,237,241,0.2)}@media (max-width: 549px){.ct-demo-actions{flex-direction:column}}@media (min-width: 550px){.ct-demo-actions{justify-content:space-between}}.ct-demo-actions h4{margin:0}@media (max-width: 549px){.ct-demo-actions h4{margin-bottom:20px}}.ct-demo-actions .ct-button{margin-right:15px}.ct-demo-actions button[disabled]{opacity:0.3;-webkit-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ct-demo-modal{--modal-width: 500px;height:100%;transition:max-height 0.2s ease}.ct-demo-modal:not(.ct-demo-installer){--modal-max-height: 620px}.ct-demo-modal.ct-demo-installer{--modal-max-height: 380px}.ct-demo-step-container{height:100%;display:flex;flex-direction:column;color:#687c93;text-align:center}.ct-demo-step-container>*:first-child{flex:1;position:relative}.ct-demo-step-container>*:first-child>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-step-container .ct-demo-icon{display:flex;align-items:center;justify-content:center;width:85px;height:85px;margin:10px auto 20px auto;background:#f3f6f8;border-radius:100%}.ct-demo-step-container h2{text-align:center;font-size:17px;font-weight:600;color:#3e5667;margin-top:0}.ct-demo-step-controls{position:relative;width:100%;height:40px}.ct-demo-step-controls button{position:absolute;z-index:2;top:0}.ct-demo-step-controls button.demo-back-btn{left:0}.ct-demo-step-controls button.demo-main-btn{right:0}.ct-steps-pills{display:flex;align-items:center;justify-content:center;position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;width:200px;margin:0;padding:0;list-style:none;margin:0 auto}.ct-steps-pills li{display:flex;align-items:center;justify-content:center;width:30px;height:30px;margin:0;font-size:0}.ct-steps-pills li:before{content:'';width:12px;height:12px;border-radius:100%;box-shadow:inset 0 0 0 2px rgba(104,124,147,0.8);transition:box-shadow 0.2s ease, transform 0.2s ease}.ct-steps-pills li:not(.active):before{transform:scale3d(0.5, 0.5, 1);box-shadow:inset 0 0 0 10px rgba(104,124,147,0.8)}.ct-demo-child .ct-checkbox-container{max-width:250px;margin:25px auto 0 auto;padding-left:15px;padding-right:15px;border-radius:4px;border:1px solid rgba(179,189,201,0.3)}.ct-demo-child a{display:block;color:#687c93;font-weight:500;text-decoration:none;margin-top:25px}.ct-demo-child a:hover{color:#0073aa}.ct-demo-builder .ct-demo-icon svg{margin-left:10px}.ct-demo-builder ul{display:grid;margin:0;padding:0;list-style:none;margin:40px auto 0 auto}.ct-demo-builder ul[data-count="2"]{max-width:70%;grid-template-columns:repeat(2, 1fr);grid-column-gap:30px}.ct-demo-builder ul[data-count="3"]{grid-template-columns:repeat(3, 1fr);grid-column-gap:20px}.ct-demo-builder ul li{margin-bottom:0;cursor:pointer}.ct-demo-builder ul li figure{position:relative;display:flex;align-items:center;justify-content:center;min-height:100px;border:2px solid #e9ecee;border-radius:5px;margin:0;font-weight:500;transition:border-color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),box-shadow 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-demo-builder ul li figure>svg{width:47%}.ct-demo-builder ul li .builder-name{font-weight:500;color:#3e5667;margin-top:15px}.ct-demo-builder ul li:hover figure{border-color:var(--accentColor)}.ct-demo-builder ul li.active figure{border-color:var(--accentColor);box-shadow:0 0 0 1px var(--accentColor)}.ct-demo-builder ul li .ct-checkbox{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: var(--accentColor);position:absolute;top:0px;right:0px}.ct-demo-builder ul li .ct-checkbox:before{width:22px !important;height:22px !important;border-radius:0px 3px 0px 5px}.ct-demo-builder ul li .ct-checkbox:not(.active):before{opacity:0}.ct-demo-plugins label{margin:0 auto}.ct-active-plugin{display:flex;align-items:center;position:relative;text-align:left;padding:10px 0}.ct-active-plugin span{display:flex;align-items:center;justify-content:center;position:absolute;right:-2px;width:22px;height:22px;border-radius:100%;box-sizing:border-box;background:rgba(179,189,201,0.3)}.ct-active-plugin span:before,.ct-active-plugin span:after{position:absolute;content:'';width:2px;border-radius:2px;background:rgba(104,124,147,0.6)}.ct-active-plugin span:before{top:10px;left:10px;height:5px;transform:rotate(-45deg);transform-origin:bottom center}.ct-active-plugin span:after{height:9px;left:9px;transform:rotate(40deg);transform-origin:bottom center}.ct-demo-erase{margin-top:10px;padding-top:10px;padding-bottom:20px;text-align:left;font-weight:600;border-top:1px dashed rgba(179,189,201,0.5);border-bottom:1px dashed rgba(179,189,201,0.5)}.ct-demo-erase .ct-checkbox-container{align-items:flex-start;padding-bottom:0}.ct-demo-erase i{display:block;width:90%;font-size:13px;margin-top:8px;opacity:0.8;font-weight:400;font-style:normal}.ct-export{text-align:center;margin-top:50px}.ct-site-export{display:flex;flex-direction:column;padding:30px}.ct-site-export label{display:flex;justify-content:space-between;padding:10px 0}.ct-site-export input[type="checkbox"]{margin:0}.ct-site-export textarea,.ct-site-export input[type="text"]{width:60%}.ct-site-export textarea{min-height:80px}.ct-site-export button{margin-top:20px}.ct-demo-installer .close-button{opacity:0 !important}.ct-demo-install{position:relative}.ct-demo-install>*{position:absolute;top:0;left:0;right:0;bottom:0}.ct-demo-install svg path{transform-origin:50% 50%;transform-box:fill-box;animation-name:spin;animation-iteration-count:infinite;animation-timing-function:linear}.ct-demo-install .g1{fill:#44ACDF;animation-duration:5.5s;animation-direction:reverse}.ct-demo-install .g2{fill:#3497D3;animation-duration:4.5s}.ct-demo-install .g3{fill:#0C7AB3;animation-duration:4s}.ct-installer-progress{width:100%;border-radius:5px;background:#f3f6f8;box-sizing:border-box}.ct-installer-progress div{width:var(--progress);height:4px;border-radius:inherit;background:var(--accentColor);transition:width 0.3s ease}.ct-progress-info{display:flex;justify-content:space-between;margin-top:30px;margin-bottom:15px;font-size:13px;opacity:0.8}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.ct-install-success{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.ct-install-success div{margin-top:10px}.ct-install-success a:first-child{margin-right:15px}.ct-modify-actions{margin-top:50px}.ct-modify-actions>*:not(:last-child){margin-right:15px}.ct-modify-actions .demo-remove{--ct-buttonHoverColor: #e04f4f}#ct-dashboard .ct-demo-notification{position:relative;padding:15px 20px 15px 55px;margin-bottom:40px;color:#0072aa;line-height:1.5;border:2px solid rgba(0,114,170,0.3);background:rgba(0,114,170,0.1);border-radius:5px}#ct-dashboard .ct-demo-notification:before{font-family:dashicons;content:"\f534";font-size:20px;position:absolute;top:13px;left:20px;color:rgba(0,114,170,0.8)}#ct-dashboard .ct-demo-notification b{font-weight:700}.ct-demos-list{display:flex;flex-direction:column}.ct-demos-list .ct-single-demo img{max-width:100px}.ct-demo-btn{font-size:15px;font-weight:600;letter-spacing:0.03em;color:#687c93;height:40px;border:none;cursor:pointer;padding:0 18px;border-radius:4px;background:#f3f6f8;transition:background 0.2s ease color 0.2s ease}.ct-demo-btn:focus{outline:none}.ct-demo-btn:hover{color:#fff;background:var(--ct-buttonHoverColor, var(--accentColor))}.ct-activation-action-modal{color:#687c93;text-align:center;padding:30px}.ct-activation-action-modal svg{width:65px;height:65px}.ct-activation-action-modal h2{color:#3e5667}.ct-activation-action-modal button{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-beta-consent{margin-top:60px;border-radius:3px;text-align:center;color:#fff}@media (max-width: 782px){.ct-beta-consent{padding:10%}}@media (min-width: 783px){.ct-beta-consent{padding:50px}}.ct-beta-consent h2{display:flex;align-items:center;justify-content:center;color:#fff !important;margin-top:0;cursor:pointer}.ct-beta-consent h2 span{display:flex;font-size:15px;font-weight:500;cursor:pointer}.ct-beta-consent h2 .ct-option-switch{margin-left:15px}.ct-beta-consent h2 .ct-option-switch:not(.ct-active){border-color:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active)>span{background:#fff}.ct-beta-consent h2 .ct-option-switch:not(.ct-active):after{border-color:#fff}.ct-beta-consent+.ct-support-container{margin-top:50px !important}.ct-beta-consent{background-color:#32373c;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%234f5660' fill-opacity='0.2' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E");background-size:250px;background-position:0 5px}.ct-beta-updates-consent{--modal-width: 450px;--modal-min-height: 330px;--modal-padding: 45px;text-align:center}.ct-beta-updates-consent .ct-modal-content p{margin-bottom:1.2em}.ct-freemius-optin-message{position:relative;text-align:center;border-radius:3px;background:#f5f7f9}@media (max-width: 782px){.ct-freemius-optin-message{padding:50px 10% 10% 10%}}@media (min-width: 783px){.ct-freemius-optin-message{padding:60px 50px 50px 50px}}.ct-freemius-optin-message h2{margin-top:0}.ct-freemius-optin-message i{display:flex;align-items:center;justify-content:center;position:absolute;top:-25px;left:0;right:0;margin:0 auto;width:50px;height:50px;background:#fff;border-radius:100%;color:#0591c9;border:2px solid #DEECF3}.ct-freemius-optin-message i svg{animation:ring-shake 5s ease-in-out infinite;transform-origin:50% 0%}.ct-freemius-optin-message p{max-width:600px;margin:0 auto 20px auto !important}.ct-freemius-optin-message .ct-button-primary{--buttonHeight: 42px;--buttonPadding: 20px;--buttonFontSize: 14px}.ct-freemius-optin-message+.ct-first-steps-container{margin-top:55px;padding-top:50px;border-top:1px solid rgba(143,163,184,0.15)}@keyframes ring-shake{0%{transform:rotate(-15deg)}2%{transform:rotate(15deg)}4%{transform:rotate(-18deg)}6%{transform:rotate(18deg)}8%{transform:rotate(-22deg)}10%{transform:rotate(22deg)}12%{transform:rotate(-18deg)}14%{transform:rotate(18deg)}16%{transform:rotate(-12deg)}18%{transform:rotate(12deg)}20%{transform:rotate(0deg)}100%{transform:rotate(0deg)}}.blocksy-fs-optin-dashboard #wpwrap,.blocksy-fs-optin-dashboard #wpcontent,.blocksy-fs-optin-dashboard #wpbody{height:100%;min-height:100%}.blocksy-fs-optin-dashboard #wpbody-content{height:100%;padding-bottom:0}.blocksy-fs-optin-dashboard #wpbody-content #screen-meta,.blocksy-fs-optin-dashboard #wpbody-content .clear{display:none}.blocksy-fs-optin-dashboard .toplevel_page_ct-dashboard.current:after{border-right-color:#f2cf88 !important}.blocksy-fs-optin-wrapper{display:grid;grid-template-columns:repeat(2, 1fr);height:100%}.blocksy-fs-optin-wrapper>*{display:flex;flex-direction:column;justify-content:center;padding:9%;box-sizing:border-box}.blocksy-fs-optin-wrapper .ct-optin-svg{background:#F2CF88}.blocksy-fs-optin-wrapper .ct-optin-svg svg{max-width:750px;margin:0 auto}.blocksy-fs-optin-wrapper #fs_connect{width:100%;max-width:900px;margin:0;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-visual{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-content{padding:0;margin-bottom:30px}.blocksy-fs-optin-wrapper #fs_connect .fs-content>p span{display:block;font-size:25px;font-weight:700;color:#23282d;margin-bottom:20px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions{display:flex;padding:0;margin-bottom:20px;background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button{height:49px;line-height:49px;padding:0 20px !important}.blocksy-fs-optin-wrapper #fs_connect .fs-actions .button-primary{margin-right:15px}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation{order:2;float:none;background:transparent;border-color:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-actions #skip_activation:hover{border-color:#0071a1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions{padding:0 0 30px 0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger{text-align:left;text-decoration:underline}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-trigger:focus{outline:none;box-shadow:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul{display:none}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li{margin-bottom:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li i.dashicons{font-size:18px;width:18px;height:18px;margin-right:8px;color:#23282d}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div{margin-left:0}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div span{text-transform:capitalize}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li div p{margin-top:8px;font-size:12px;opacity:0.7}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(1){order:1}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(2){order:4}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(3){order:3}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions ul li:nth-child(4){order:2}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions.fs-open ul{display:grid;grid-template-columns:repeat(2, minmax(auto, 280px));grid-column-gap:30px;grid-row-gap:30px;margin:20px 0 0 0;padding-top:30px;border-top:1px dashed #ddd}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch{width:25px;height:16px;top:1px;right:20px;padding:0;box-shadow:none;box-sizing:border-box;transition:all 0.1s linear;border:2px solid #555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch .fs-toggle{box-sizing:border-box;border:none;top:1px;width:10px;height:10px;box-shadow:none;transition:all 0.1s linear}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off{background:transparent}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-off .fs-toggle{left:1px;background:#555d66}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on{border-color:#0085ba}.blocksy-fs-optin-wrapper #fs_connect .fs-permissions .fs-switch.fs-on .fs-toggle{left:10px}.blocksy-fs-optin-wrapper #fs_connect .fs-terms{display:none}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container{width:100%;margin:30px 0 0 0}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container input[type=text]{min-height:49px;padding:0 12px;line-height:initial}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .dashicons{top:17px;right:10px;font-size:16px;height:16px;width:16px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-license-key-container .show-license-resend-modal{font-size:0.9em;margin-top:10px}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions{flex-wrap:wrap}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions form{width:100%}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-actions #license_issues_link{flex:1 1 auto;text-align:left}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-permissions p{text-align:left}.blocksy-fs-optin-dashboard #fs_connect.require-license-key .fs-permissions p:last-of-type{margin-bottom:0}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin{border:none;padding:30px 0;margin:30px 0 0 0;box-shadow:none;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin.error{background:transparent}.blocksy-fs-optin-dashboard #fs_connect #fs_marketing_optin .fs-input-label{margin-left:22px}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing{border-top:1px dashed #ddd;padding:30px 0;background:transparent}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p{text-align:left;color:#444}.blocksy-fs-optin-dashboard #fs_connect .fs-freemium-licensing p a{color:#0073aa}
|
static/bundle/main.css
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* - v1.7.43
|
3 |
-
*
|
4 |
-
* Copyright (c) 2020
|
5 |
-
* Licensed GPLv2+
|
6 |
-
*/
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static/bundle/main.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var o=r(0),n=r.n(o),a=r(1),c=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");n&&n.remove();var a=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");a&&a.remove()},i=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-errors");o&&o.remove(),e.closest(".ct-account-form").classList.remove("ct-error");var n=r.querySelector("#login_error");return n&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-errors">'.concat(n.innerHTML,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")}))),{hasError:!!n,doc:r}},s=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-message");o&&o.remove();var n=e.querySelector(".ct-errors");n&&n.remove();var a=r.querySelector(".message");return e.closest(".ct-account-form").classList.remove("ct-error"),a&&e.insertAdjacentHTML("afterbegin",'<div class="ct-message">'.concat(a.innerHTML,"</div>")),{doc:r}},u=function(){Array.from(document.querySelectorAll(".ct-header-account[href]")).map((function(e){e.hasSearchEventListener||(e.hasSearchEventListener=!0,e.addEventListener("click",(function(t){try{document.querySelector(e.hash)}catch(t){return}t.preventDefault(),c(document.querySelector(e.hash),{screen:"login"}),n.a.trigger("ct:overlay:handle-click",{e:t,href:e.hash,options:{isModal:!0}})})),document.querySelector("#account-modal")&&function(e){if(e){e.addEventListener("click",(function(t){t.target.href&&t.target.href.indexOf("lostpassword")>-1&&(c(e,{screen:"forgot-password"}),t.preventDefault()),t.target.href&&t.target.href.indexOf("wp-login")>-1&&-1===t.target.href.indexOf("lostpassword")&&(c(e,{screen:"login"}),t.preventDefault())}),!0);var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');t&&t.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(t.action,{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){var r=i(t.closest(".ct-login-form"),e);r.doc;r.hasError||(location=t.querySelector('[name="redirect_to"]').value)}))})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(r.action,{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=i(r.closest(".ct-register-form"),e);t.doc;t.hasError||s(r.closest(".ct-register-form"),e)}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(o.action,{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=i(o.closest(".ct-forgot-password-form"),e);t.doc;t.hasError||s(o.closest(".ct-forgot-password-form"),e)}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),c(e,{screen:t})}))}))}))}}(document.querySelector("#account-modal")))}))};function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e)||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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var y=!1,f=function(e,t,r){return Math.max(e,Math.min(t,r))},m=function(e,t,r){return t[0]+(t[1]-t[0])/(e[1]-e[0])*(r-e[0])},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(e.querySelectorAll("[data-row][data-transparent-row]")).map((function(e){e.dataset.transparentRow=t}))},h=function(e){return parseFloat(getComputedStyle(e).getPropertyValue("--height"))},v=function(e){var t=getComputedStyle(e).getPropertyValue("--stickyShrink");return t?parseFloat(t)/100*h(e):h(e)};var g=!1,S=function(){if(document.querySelector("[data-sticky]")){var e=window.scrollY,t=function(){var t=document.querySelector('[data-device="'.concat(Object(a.getCurrentScreen)(),'"] [data-sticky]'));if(t){var r=function(e){if(-1===e.dataset.sticky.indexOf("shrink")&&-1===e.dataset.sticky.indexOf("auto-hide"))return e.parentNode.getBoundingClientRect().height+200;var t=e.closest("header").getBoundingClientRect().top+scrollY,r=e.parentNode;return 1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container")?t:Array.from(r.parentNode.children).reduce((function(e,t,r){return e.indexOf(0)>-1||!t.dataset.row?[].concat(l(e),[0]):[].concat(l(e),[t.classList.contains("ct-sticky-container")?0:t.getBoundingClientRect().height])}),[]).reduce((function(e,t){return e+t}),t)}(t),o=r>0&&Math.abs(window.scrollY-r)<3||window.scrollY>r,n=t.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e})),c=Array.from(t.querySelectorAll("[data-row]")).reduce((function(e,t){return e+parseFloat(getComputedStyle(t).getPropertyValue("--height"))}),0);if(n.indexOf("auto-hide")>-1){if(window.scrollY<r&&(e=window.scrollY),o&&window.scrollY-e==0&&document.body.style.setProperty("--headerStickyHeightAnimated","0px"),o&&window.scrollY-e<-5)-1===t.dataset.sticky.indexOf("yes")&&(t.dataset.sticky=["yes-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-end","yes")}),200)}))),p(t,"no"),document.body.removeAttribute("style"),t.parentNode.style.setProperty("--minHeight","".concat(c,"px"));else{if(!o)return t.dataset.sticky=n.filter((function(e){return"yes-end"!==e})).join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),p(t,"yes"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),void(e=window.scrollY);-1===t.dataset.sticky.indexOf("yes-hide")&&t.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-e>5&&(t.dataset.sticky=["yes-hide-start"].concat(l(n)).join(":"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){t.dataset.sticky=n.join(":"),t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),p(t,"yes")}),200)})))}e=window.scrollY}if((n.indexOf("slide")>-1||n.indexOf("fade")>-1)&&(o?(-1===t.dataset.sticky.indexOf("yes")&&(t.dataset.sticky=["yes-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-end","yes")}),200)}))),p(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(c,"px"))):-1===t.dataset.sticky.indexOf("yes-hide")&&t.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-r)>10?(t.dataset.sticky=n.join(":"),setTimeout((function(){t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")}))}),300),p(t,"yes")):(t.dataset.sticky=["yes-hide-start"].concat(l(n)).join(":"),requestAnimationFrame((function(){t.dataset.sticky=t.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){t.dataset.sticky=n.join(":"),setTimeout((function(){t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")}))}),300),p(t,"yes")}),200)}))))),n.indexOf("shrink")>-1){if(o){p(t,"no"),t.parentNode.style.setProperty("--minHeight","".concat(c,"px"));var i=Array.from(t.querySelectorAll("[data-row]")).reduce((function(e,t,r){return e+v(t)}),0);l(t.querySelectorAll('[data-row="middle"]')).map((function(e){if(e.querySelector('[data-id="logo"] .site-logo-container')){var t=e.querySelector('[data-id="logo"] .site-logo-container'),o=parseFloat(getComputedStyle(t).getPropertyValue("--maxHeight")||50),n=parseFloat(getComputedStyle(t).getPropertyValue("--logoStickyShrink")||1),a=o*n;if(1===n)return;var c=h(e),i=v(e);t.style.setProperty("--logo-shrink-height",m([r,r+Math.abs(c===i?o-a:c-i)],[1,n],f(r,r+Math.abs(c===i?o-a:c-i),scrollY)))}})),i!==c&&t.querySelector('[data-row="middle"]')&&[t.querySelector('[data-row="middle"]')].map((function(e){var t=h(e),o=v(e);e.style.setProperty("--shrinkHeight","".concat(m([r,r+Math.abs(t-o)],[t,o],f(r,r+Math.abs(t-o),scrollY)),"px"))}))}else t.parentNode.removeAttribute("style"),Array.from(t.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("style")})),Array.from(t.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(e){return e.removeAttribute("style")})),p(t,"yes");var s=t.dataset.sticky.split(":").filter((function(e){return"yes"!==e&&"no"!==e}));t.dataset.sticky=(o?["yes"].concat(l(s)):s).join(":")}}};t(),g||(g=!0,window.addEventListener("scroll",(function(){y||(y=!0,requestAnimationFrame((function(){t(),y=!1})))})))}};Object(a.onDocumentLoaded)((function(){u(),S()})),n.a.on("blocksy:frontend:init",(function(){u(),S()}))}]);
|
|
static/bundle/main.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* - v1.8.0
|
3 |
+
*
|
4 |
+
* Copyright (c) 2021
|
5 |
+
* Licensed GPLv2+
|
6 |
+
*/
|
7 |
+
|
static/bundle/options.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 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 a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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=window.wp.components},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r="object"===("undefined"==typeof window?"undefined":n(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":n(self))&&self.self===self?self:"object"===(void 0===t?"undefined":n(t))&&t.global===t?t:this;function o(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"!==("undefined"==typeof window?"undefined":n(window))||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?c(l.href)?o(e,t,n):a(l,l.target="_blank"):a(l)):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"==typeof e)if(c(e))o(e,t,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==n(t)&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,r),t)}:function(e,t,c,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,c);var i="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||i&&l)&&"object"===("undefined"==typeof FileReader?"undefined":n(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,p=d.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}};e.exports=i}).call(this,n(12))},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(13);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(15);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),o=n(14);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||m(e,t)||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 s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(e)||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 m(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O=[],j=[],h=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(f(e),f(n.map((function(e){return p(p({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=s(t,["title","id"]);return[].concat(f(e),[p({key:r,value:n},o)])}),[]),i=u(Object(r.useState)(O),2),d=i[0],b=i[1],m=u(Object(r.useState)(j),2),y=m[0],h=m[1],v=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule};return Object(r.useEffect)((function(){Promise.all(["posts","pages","ct_cpt"].map((function(e){return fetch("".concat(blocksy_admin.rest_url,"wp/v2/").concat("ct_cpt"===e?"posts":e).concat(blocksy_admin.rest_url.indexOf("?")>-1?"&":"?","_embed&per_page=100").concat("ct_cpt"===e?"&post_type=ct_cpt":"")).then((function(e){return e.json()}))}))).then((function(e){var t=e.reduce((function(e,t){return[].concat(f(e),f(t))}),[]);b(t),O=t})),fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.taxonomies;h(t),j=t}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":v(e),"ct-cols-2":!v(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(a.Select,{key:"third",option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:"post_ids"===e.rule?Object(c.__)("Select post","blc"):"page_ids"===e.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:d.filter((function(t){var n=t.type;return"post_ids"===e.rule?"post"===n:"page_ids"===e.rule?"page"===n:"post"!==n&&"page"!==n})).map((function(e){return{key:e.id,value:e.title.rendered}})),search:!0},value:(e.payload||{}).post_id||"",onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{payload:p(p({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:y.map((function(e){return p({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:e.payload.taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return p({},n===i?p(p({},e),{},{payload:p(p({},e.payload),{},{taxonomy_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=f(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(f(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(f(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e,t)||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){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e){var t=e.option.display,n=void 0===t?"inline":t,o=e.value,i=e.onChange,l=v(Object(r.useState)(!1),2),u=l[0],s=l[1],d=v(Object(r.useState)(null),2),p=d[0],b=d[1];return"inline"===n?Object(r.createElement)(h,{value:o,onChange:i}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),s(!0),b(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:u,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){s(!1),b(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,Object(c.__)("Transparent Header Display Conditions","blc")),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions to display the transparent header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(h,{value:p||o,onChange:function(e){b(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!p,onClick:function(){i(p),s(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},E=n(7),w=n.n(E);function S(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||C(e)||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 x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||C(e,t)||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 C(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var N=function(){var e=x(Object(r.useState)(null),2),t=e[0],n=e[1],o=x(Object(r.useState)(null),2),i=o[0],u=o[1],s=x(Object(r.useState)(!1),2),d=s[0],p=s[1],b=x(Object(r.useState)(["options"]),2),f=b[0],m=b[1],y=Object(r.useRef)();return Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Click the button below to export the customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),p(!0)}},Object(c.__)("Export Customizations","blc")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Upload a file to import customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:"button ct-upload-button",onClick:function(){y.current.click()}},t?t.name:Object(c.__)("Click to upload a file...","blc")),Object(r.createElement)("input",{ref:y,type:"file",onChange:function(e){var t=x(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault();var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){var t=new FormData;t.append("action","blocksy_customizer_import"),t.append("wp_customize","on"),t.append("data",e.target.result);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}},Object(c.__)("Import Customizations","blc"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blc"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blc")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blc"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blc")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blc"))))}}),Object(r.createElement)(a.Overlay,{items:d,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return p(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blc")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blc")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===f.length&&f[0]===e||m((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(S(t),[e])}))}},{options:Object(c.__)("Customizer settings","blc"),widgets:Object(c.__)("Widgets settings","blc")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:f.includes(e)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),p(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",f.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});w()(r,"blocksy-export.dat"),p(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blc"))))}}))},A=n(5),P=n.n(A),T=n(8),D=n(9),z=n.n(D),I=n(10),L=n.n(I),R=n(11),F=n.n(R);function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||V(e)||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 B(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||V(e,t)||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 V(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $=L()(),Y=function(e){e.forcedEdit;var t,n,o=e.headerId,i=H(Object(r.useState)(!1),2),l=i[0],u=i[1],s=H(Object(r.useState)(null),2),d=s[0],p=s[1],b=Object(r.useContext)(a.PlacementsDragDropContext),f=(b.builderValueCollection,b.builderValueDispatch,Object(r.useRef)()),m=F()($),y=z()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){B(c,r,o,a,i,"next",e)}function i(e){B(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,j=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){j||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:f,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),p(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:f},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){p((function(e){return[].concat(M((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},U(e,"design","none"),U(e,"label",!1),e)},value:{conditions:((d||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(d)}).then((function(e){return e.json()})).then((function(){$(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function q(){return(q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var K=function(){ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header;var e=Object(r.useContext)(a.PlacementsDragDropContext),t=e.builderValueDispatch,n=e.builderValue,i=(e.option,e.builderValueCollection),u=e.panelsActions,s=Object(T.applyFilters)("blocksy.header.available-sections",null,i.sections)||i.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},s.map((function(e){var o=e.name,i=e.id,s=o||{"type-1":Object(c.__)("Global Header","blocksy")}[i]||i,d="builder_header_panel_".concat(i),p=ct_customizer_localizations.header_builder_data.header_data.header_options,b={label:s,"inner-options":W(W({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(Y,{headerId:i})}}}:{}),p)};return Object(r.createElement)(a.PanelMetaWrapper,q({id:d,key:i,option:b},u,{getActualOption:function(e){var o=e.open;return Object(r.createElement)(r.Fragment,null,i===n.id&&Object(r.createElement)(a.Panel,{id:d,getValues:function(){return W({id:i},n.settings||{})},option:b,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(p,Array.isArray(n.settings)?{}:n.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:i===n.id,"ct-global":"type-1"===i}),onClick:function(){i===n.id?o():t({type:"PICK_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("span",{className:"ct-panel-name"},s),i.indexOf("ct-custom")>-1&&i!==n.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),t({type:"REMOVE_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})))};P.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(K,null)))}})),P.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=g,e["blocksy-customizer-options-manager"]=N}))}]);
|
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 a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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=window.wp.components},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r="object"===("undefined"==typeof window?"undefined":n(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":n(self))&&self.self===self?self:"object"===(void 0===t?"undefined":n(t))&&t.global===t?t:this;function o(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"!==("undefined"==typeof window?"undefined":n(window))||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?c(l.href)?o(e,t,n):a(l,l.target="_blank"):a(l)):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"==typeof e)if(c(e))o(e,t,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==n(t)&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,r),t)}:function(e,t,c,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,c);var i="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||i&&l)&&"object"===("undefined"==typeof FileReader?"undefined":n(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,p=d.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}};e.exports=i}).call(this,n(12))},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(13);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(15);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),o=n(14);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(e)||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 s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||b(e,t)||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 b(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.ID===e.ID}))===t}))},O=[],j=function(e){var t=e.condition,n=e.onChange,o=f(Object(r.useState)(O),2),i=o[0],l=o[1],s=Object(r.useMemo)((function(){return{post_ids:"post",page_ids:"page",custom_post_type_ids:"ct_cpt"}[t.rule]}),[t.rule]),p=Object(r.useMemo)((function(){return(t.payload||{}).post_id||""}),[t.payload&&t.payload.post_id]),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_posts"),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(d(d({post_type:s},e?{search_query:e}:{}),p?{alsoInclude:p}:{})),method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.posts;l((function(e){return y([].concat(u(e),u(t)))})),O=y([].concat(u(O),u(t)))}))};return Object(r.useEffect)((function(){b()}),[s]),Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,searchPlaceholder:Object(c.__)("Type to search by ID or title...","blc"),placeholder:"post_ids"===t.rule?Object(c.__)("Select post","blc"):"page_ids"===t.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:i.filter((function(e){var t=e.post_type;return"ct_cpt"===s?"post"!==t&&"page"!==t:s===t})).map((function(e){return{key:e.ID,value:e.post_title}})),search:!0},value:p,onChange:function(e){return n(e)},onInputValueChange:function(e){i.find((function(t){return t.post_title===e}))||b(e)}})};function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||S(e,t)||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 v(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||S(e)||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 S(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C=[],k=[],A=[],P=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(w(e),w(n.map((function(e){return g(g({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=v(t,["title","id"]);return[].concat(w(e),[g({key:r,value:n},o)])}),[]),i=h(Object(r.useState)(C),2),u=(i[0],i[1],h(Object(r.useState)(k),2)),s=u[0],d=u[1],p=h(Object(r.useState)(A),2),f=p[0],b=p[1],m=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule||"current_language"===e.rule};return Object(r.useEffect)((function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data,n=t.taxonomies,r=t.languages;d(n),k=n,b(r),A=r}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":m(e),"ct-cols-2":!m(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(j,{condition:e,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:s.map((function(e){return g({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:(e.payload||{}).taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{taxonomy_id:r})}):t)})))}}),"current_language"===e.rule&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select language","blc"),choices:f.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:(e.payload||{}).language||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{language:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=w(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(e,t)}(e,t)||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 T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var D=function(e){var t=e.option,n=t.display,o=void 0===n?"inline":n,i=t.modalTitle,l=void 0===i?Object(c.__)("Transparent Header Display Conditions","blc"):i,u=t.modalDescription,s=void 0===u?Object(c.__)("Add one or more conditions to display the transparent header.","blc"):u,d=e.value,p=e.onChange,f=N(Object(r.useState)(!1),2),b=f[0],m=f[1],y=N(Object(r.useState)(null),2),O=y[0],j=y[1];return"inline"===o?Object(r.createElement)(P,{value:d,onChange:p}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),m(!0),j(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){m(!1),j(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,l),Object(r.createElement)("p",null,s),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(P,{value:O||d,onChange:function(e){j(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!O,onClick:function(){p(O),m(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},I=n(7),z=n.n(I);function L(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||F(e)||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 R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||F(e,t)||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 F(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var U=function(){var e=R(Object(r.useState)(null),2),t=e[0],n=e[1],o=R(Object(r.useState)(null),2),i=o[0],u=o[1],s=R(Object(r.useState)(!1),2),d=s[0],p=s[1],f=R(Object(r.useState)(!1),2),b=f[0],m=f[1],y=R(Object(r.useState)(["options"]),2),O=y[0],j=y[1],h=Object(r.useRef)(),v=Object(r.useRef)();return Object(r.useEffect)((function(){var e=function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",p(!0)},t=function(e){e.stopPropagation(),e.preventDefault(),p(!1)},r=function(e){e.stopPropagation(),e.preventDefault(),p(!1);var t=Array.from(e.dataTransfer.files||[]);if(Array.from(e.dataTransfer.items||[]).length>0){var r=e.dataTransfer.items[0].getAsFile();n(r)}else t.length>0&&n(t[0])};return v.current.addEventListener("dragover",e,!1),v.current.addEventListener("dragleave",t,!1),v.current.addEventListener("drop",r,!1),function(){v.current.removeEventListener("dragover",e,!1),v.current.removeEventListener("dragleave",t,!1),v.current.removeEventListener("drop",r,!1)}}),[]),Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Click the button below to export the customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),m(!0)}},Object(c.__)("Export Customizations","blc")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Upload a file to import customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:l()("button ct-upload-button",{active:d}),ref:v,onClick:function(){h.current.click()}},t?t.name:Object(c.__)("Click or drop to upload a file...","blc")),Object(r.createElement)("input",{ref:h,type:"file",onChange:function(e){var t=R(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){if(e.preventDefault(),t){var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){var t=new FormData;t.append("action","blocksy_customizer_import"),t.append("wp_customize","on"),t.append("data",e.target.result);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}}},Object(c.__)("Import Customizations","blc"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blc"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blc")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blc"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blc")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blc"))))}}),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blc")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blc")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===O.length&&O[0]===e||j((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(L(t),[e])}))}},{options:Object(c.__)("Customizer settings","blc"),widgets:Object(c.__)("Widgets settings","blc")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:O.includes(e)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),m(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",O.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});z()(r,"blocksy-export.dat"),m(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blc"))))}}))},B=n(5),V=n.n(B),H=n(8),G=n(9),$=n.n(G),q=n(10),J=n.n(q),Y=n(11),W=n.n(Y);function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ee(e)||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 Q(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||ee(e,t)||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 ee(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ne=J()(),re=function(e){e.forcedEdit;var t,n,o=e.headerId,i=Z(Object(r.useState)(!1),2),l=i[0],u=i[1],s=Z(Object(r.useState)(null),2),d=s[0],p=s[1],f=Object(r.useContext)(a.PlacementsDragDropContext),b=(f.builderValueCollection,f.builderValueDispatch,Object(r.useRef)()),m=W()(ne),y=$()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){Q(c,r,o,a,i,"next",e)}function i(e){Q(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,j=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){j||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),p(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){p((function(e){return[].concat(K((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},X(e,"design","none"),X(e,"label",!1),e)},value:{conditions:((d||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(d)}).then((function(e){return e.json()})).then((function(){ne(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function oe(){return(oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=function(){ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header;var e=Object(r.useContext)(a.PlacementsDragDropContext),t=e.builderValueDispatch,n=e.builderValue,i=(e.option,e.builderValueCollection),u=e.panelsActions,s=Object(H.applyFilters)("blocksy.header.available-sections",null,i.sections)||i.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},s.map((function(e){var o=e.name,i=e.id,s=o||{"type-1":Object(c.__)("Global Header","blocksy")}[i]||i,d="builder_header_panel_".concat(i),p=ct_customizer_localizations.header_builder_data.header_data.header_options,f={label:s,"inner-options":ae(ae({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(re,{headerId:i})}},divider:{type:"ct-divider"}}:{}),p)};return Object(r.createElement)(a.PanelMetaWrapper,oe({id:d,key:i,option:f},u,{getActualOption:function(e){var o=e.open;return Object(r.createElement)(r.Fragment,null,i===n.id&&Object(r.createElement)(a.Panel,{id:d,getValues:function(){return ae({id:i},n.settings||{})},option:f,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(p,Array.isArray(n.settings)?{}:n.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:i===n.id,"ct-global":"type-1"===i}),onClick:function(){i===n.id?o():t({type:"PICK_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("span",{className:"ct-panel-name"},s),i.indexOf("ct-custom")>-1&&i!==n.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),t({type:"REMOVE_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})))};V.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(le,null)))}})),V.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=D,e["blocksy-customizer-options-manager"]=U}))}]);
|
static/bundle/{options.css → options.min.css}
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
/**
|
2 |
-
* - v1.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
-
.ct-condition-location{display:grid;grid-template-columns:1fr 100px;grid-column-gap:10px;padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1);--x-select-dropdown-width: calc(100% + 110px)}.ct-new-condition-location{--options-vertical-spacing: 20px;padding:var(--options-horizontal-spacing, 0 14px)}.ct-new-condition-location .ct-new-location{--options-horizontal-spacing: 0}.ct-new-condition-location .ct-new-location .ct-control{padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-new-condition-location .ct-new-location button{right:-24px;width:24px}.ct-new-condition-location .button{width:100%;margin-top:20px}.ct-control[data-location]{--options-vertical-spacing: 20px}.ct-control[data-location][data-design="inline"] input{text-align:center;--width: 100px}.ct-control[data-location]:after{border-bottom-style:dashed}.ct-display-conditions{padding:30px 0;margin:10px 0 0 0;border-top:1px dashed rgba(0,0,0,0.1)}.ct-condition-group{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:10px;grid-row-gap:10px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-condition-group.ct-cols-2{--grid-template-columns: 110px 1fr}.ct-condition-group.ct-cols-2 .ct-select-input:nth-child(2):before{content:'ref-width'}.ct-condition-group.ct-cols-3{--grid-template-columns: 110px 1fr 1fr}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(2):before{content:'ref-width:right'}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(3):before{content:'ref-width:left'}.ct-condition-group .ct-select-dropdown{box-shadow:0 10px 15px rgba(0,0,0,0.08),0px 0px 0px 1px rgba(221,221,221,0.5)}.ct-condition-type span{position:absolute;top:6px;left:6px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:3px;background:#eee}.ct-condition-type span:before,.ct-condition-type span:after{position:absolute;content:'';width:6px;height:1px;background:currentColor}.ct-condition-type .ct-include:after{transform:rotate(90deg)}.ct-condition-type .ct-exclude:after{display:none}.ct-condition-type input{--padding: 0 0 0 30px}.ct-new-location,.ct-condition-group{position:relative}.ct-new-location button,.ct-condition-group button{position:absolute;top:0;right:-30px;font-size:18px;line-height:18px;width:30px;height:30px;padding:0;border:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0.5;background:transparent}.ct-new-location button:focus,.ct-condition-group button:focus{outline:none}.ct-new-location button:hover,.ct-condition-group button:hover{opacity:1;color:#a00}.ct-conditions-actions{display:grid;grid-template-columns:repeat(2, 1fr);grid-column-gap:15px}.blocksy-code-editor-trigger{display:inline-flex;align-items:center;margin:0 8px}.ct-checkbox-container{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive:
|
1 |
/**
|
2 |
+
* - v1.8.1
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
+
.ct-condition-location{display:grid;grid-template-columns:1fr 100px;grid-column-gap:10px;padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1);--x-select-dropdown-width: calc(100% + 110px)}.ct-new-condition-location{--options-vertical-spacing: 20px;padding:var(--options-horizontal-spacing, 0 14px)}.ct-new-condition-location .ct-new-location{--options-horizontal-spacing: 0}.ct-new-condition-location .ct-new-location .ct-control{padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-new-condition-location .ct-new-location button{right:-24px;width:24px}.ct-new-condition-location .button{width:100%;margin-top:20px}.ct-control[data-location]{--options-vertical-spacing: 20px}.ct-control[data-location][data-design="inline"] input{text-align:center;--width: 100px}.ct-control[data-location]:after{border-bottom-style:dashed}.ct-display-conditions{padding:30px 0;margin:10px 0 0 0;border-top:1px dashed rgba(0,0,0,0.1)}.ct-condition-group{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:10px;grid-row-gap:10px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-condition-group.ct-cols-2{--grid-template-columns: 110px 1fr}.ct-condition-group.ct-cols-2 .ct-select-input:nth-child(2):before{content:'ref-width'}.ct-condition-group.ct-cols-3{--grid-template-columns: 110px 1fr 1fr}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(2):before{content:'ref-width:right'}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(3):before{content:'ref-width:left'}.ct-condition-group .ct-select-dropdown{box-shadow:0 10px 15px rgba(0,0,0,0.08),0px 0px 0px 1px rgba(221,221,221,0.5)}.ct-condition-type span{position:absolute;top:6px;left:6px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:3px;background:#eee}.ct-condition-type span:before,.ct-condition-type span:after{position:absolute;content:'';width:6px;height:1px;background:currentColor}.ct-condition-type .ct-include:after{transform:rotate(90deg)}.ct-condition-type .ct-exclude:after{display:none}.ct-condition-type input{--padding: 0 0 0 30px}.ct-new-location,.ct-condition-group{position:relative}.ct-new-location button,.ct-condition-group button{position:absolute;top:0;right:-30px;font-size:18px;line-height:18px;width:30px;height:30px;padding:0;border:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0.5;background:transparent}.ct-new-location button:focus,.ct-condition-group button:focus{outline:none}.ct-new-location button:hover,.ct-condition-group button:hover{opacity:1;color:#a00}.ct-conditions-actions{display:grid;grid-template-columns:repeat(2, 1fr);grid-column-gap:15px}.blocksy-code-editor-trigger{display:inline-flex;align-items:center;margin:0 8px}.ct-checkbox-container{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: var(--accentColor);display:flex;align-items:center;justify-content:space-between;padding:10px 0;transition:color 0.15s ease}.ct-checkbox-container:not(.activated){cursor:pointer}.ct-checkbox-container:not(.activated):hover{color:#0e8ecc}.ct-checkbox-container:not(.activated):hover .ct-checkbox:not(.active){--background: var(--backgroundActive)}.ct-checkbox-container.activated{--checkMarkColor: rgba(104, 124, 147, 0.6);--backgroundActive: rgba(179, 189, 201, 0.3)}.ct-checkbox{display:inline-flex;align-items:center;justify-content:center;position:relative;width:18px;height:18px;flex:0 0 18px}.ct-checkbox:before{position:absolute;z-index:1;content:'';width:18px;height:18px;margin:auto;border-radius:100%;box-shadow:inset 0px 0px 0px 2px var(--background);transition:all 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox svg{position:relative;z-index:2}.ct-checkbox.active:before{width:22px;height:22px;box-shadow:inset 0px 0px 0px 12px var(--backgroundActive)}.ct-checkbox .check{fill:none;stroke:var(--checkMarkColor);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:15;stroke-dashoffset:16;transition:stroke 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955),stroke-dashoffset 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox.active .check{stroke-dashoffset:0}.ct-import-export input[type="file"]{display:none}.ct-import-export .button{width:100%}.ct-import-export .button:not(:last-child){margin-bottom:20px}.toplevel_page_ct-dashboard .wp-menu-image img{max-width:18px;height:auto}.toplevel_page_ct-dashboard a[href*='ct-dashboard-pricing']{display:none !important}[data-slug='blocksy-companion'] .upgrade{display:none}.fs-field-beta_program{display:none}
|
static/bundle/sticky.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){t.exports=window.ctFrontend},function(t,e){t.exports=window.ctEvents},function(t,e,r){"use strict";r.r(e);r(1);var n=r(0);function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t)||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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var i=!1,s=function(t,e,r){return Math.max(t,Math.min(e,r))},c=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},u=function(t){return parseFloat(getComputedStyle(t).getPropertyValue("--height"))},y=function(t){var e=getComputedStyle(t).getPropertyValue("--stickyShrink");return e?parseFloat(e)/100*u(t):u(t)};var l=!1;!function(){if(document.querySelector("header [data-sticky]")){var t=window.scrollY,e=function(){var e=document.querySelector('[data-device="'.concat(Object(n.getCurrentScreen)(),'"] [data-sticky]'));if(e){var r=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.parentNode;return 1===e.parentNode.children.length||e.parentNode.children[0].classList.contains("ct-sticky-container")?0:Array.from(e.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(o(t),[0]):[].concat(o(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),0)}(e),a=r>0&&Math.abs(window.scrollY-r)<5||window.scrollY>r,i=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t})),l=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0);if(a&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!a&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink","")),i.indexOf("auto-hide")>-1){if(window.scrollY<r&&(t=window.scrollY),a&&window.scrollY-t==0&&document.body.style.setProperty("--headerStickyHeightAnimated","0px"),a&&window.scrollY-t<-5)-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(o(i)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),d(e,"no"),document.body.removeAttribute("style"),e.parentNode.style.setProperty("--minHeight","".concat(l,"px"));else{if(!a)return e.dataset.sticky=i.filter((function(t){return"yes-end"!==t})).join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),d(e,"yes"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),void(t=window.scrollY);-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-t>5&&(e.dataset.sticky=["yes-hide-start"].concat(o(i)).join(":"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=i.join(":"),e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),d(e,"yes")}),200)})))}t=window.scrollY}if((i.indexOf("slide")>-1||i.indexOf("fade")>-1)&&(a?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(o(i)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),d(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(l,"px"))):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-r)>10?(e.dataset.sticky=i.join(":"),setTimeout((function(){e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),d(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(o(i)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=i.join(":"),setTimeout((function(){e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),d(e,"yes")}),200)}))))),i.indexOf("shrink")>-1){if(a){d(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(l,"px"));var f=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e,r){return t+y(e)}),0);o(e.querySelectorAll('[data-row="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=parseFloat(getComputedStyle(e).getPropertyValue("--maxHeight")||50),o=parseFloat(getComputedStyle(e).getPropertyValue("--logoStickyShrink")||1),a=n*o;if(1===o)return;var i=u(t),d=y(t);e.style.setProperty("--logo-shrink-height",c([r,r+Math.abs(i===d?n-a:i-d)],[1,o],s(r,r+Math.abs(i===d?n-a:i-d),scrollY)))}})),f!==l&&e.querySelector('[data-row="middle"]')&&[e.querySelector('[data-row="middle"]')].map((function(t){var e=u(t),n=y(t);e!==n&&t.style.setProperty("--shrinkHeight","".concat(c([r,r+Math.abs(e-n)],[e,n],s(r,r+Math.abs(e-n),scrollY)),"px"))}))}else e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(e.querySelectorAll('[data-row="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),d(e,"yes");var m=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t}));e.dataset.sticky=(a?["yes"].concat(o(m)):m).join(":")}}};e(),l||(l=!0,window.addEventListener("scroll",(function(){i||(i=!0,requestAnimationFrame((function(){e(),i=!1})))})))}}(),Object(n.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}]);
|
static/bundle/sync.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function o(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)o.d(r,c,function(t){return e[t]}.bind(null,c));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=3)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,o){"use strict";o.r(t);var r=o(1),c=o.n(r),a=o(0);o(2);function n(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return l(e,t)}(e)||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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){u(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function u(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.account=function(e){var t=e.itemId;return s(s(s(s({accountHeaderIconSize:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="out"]'})),variable:"icon-size",responsive:!0,unit:"px"},account_loggedin_icon_size:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="in"]'})),variable:"icon-size",responsive:!0,unit:"px"},accountHeaderAvatarSize:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"avatar-size",responsive:!0,unit:"px"}},Object(a.handleBackgroundOptionFor)({id:"accountHeaderFormBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"}))})),Object(a.handleBackgroundOptionFor)({id:"accountHeaderBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal"}))})),{},{account_form_shadow:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"})),type:"box-shadow",variable:"box-shadow",responsive:!0},accountHeaderMargin:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),type:"spacing",variable:"margin",responsive:!0,important:!0}},Object(a.typographyOption)({id:"account_label_font",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"suffix",to_add:".ct-label"}))})),{},{accountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],transparentAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],transparent_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],stickyAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],sticky_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}]})}})),c.a.on("ct:header:sync:item:account",(function(e){var t=e.optionId,o=e.optionValue,r='[data-id="account"]';"header_account_visibility"===t&&Object(a.updateAndSaveEl)(r,(function(e){return Object(a.responsiveClassesFor)(s(s({},o),{},{desktop:!0}),e)})),"loggedin_account_label_visibility"!==t&&"loggedout_account_label_visibility"!==t||Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){Object(a.responsiveClassesFor)(o,e)}))})),"loggedin_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"login_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"loggedout_label_position"!==t&&"loggedin_label_position"!==t||(Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.desktop}),{onlyView:"desktop"}),Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.mobile}),{onlyView:"mobile"}))})),c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){})),c.a.on("ct:header:sync:item:global",(function(e){var t=e.optionId,o=e.optionValue,r=e.values;if("has_sticky_header"===t||"sticky_rows"===t||"sticky_behaviour"===t){var a=r.has_sticky_header,n=r.sticky_rows,l=r.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===a&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var t=e.dataset.row;if(n[t]){var o=[];l.desktop&&o.push("desktop"),l.mobile&&o.push("mobile"),e.dataset.sticky=o.join(":")}})),c.a.trigger("blocksy:frontend:init")}if("transparent_behaviour"===t){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),o[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),c.a.trigger("blocksy:frontend:init")}))}}))}]);
|
1 |
+
!function(e){var t={};function o(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)o.d(r,c,function(t){return e[t]}.bind(null,c));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=3)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,o){"use strict";o.r(t);var r=o(1),c=o.n(r),a=o(0);o(2);function n(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return l(e,t)}(e)||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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){u(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function u(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.account=function(e){var t=e.itemId;return s(s(s(s({accountHeaderIconSize:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="out"]'})),variable:"icon-size",responsive:!0,unit:"px"},account_loggedin_icon_size:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="in"]'})),variable:"icon-size",responsive:!0,unit:"px"},accountHeaderAvatarSize:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"avatar-size",responsive:!0,unit:"px"}},Object(a.handleBackgroundOptionFor)({id:"accountHeaderFormBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"}))})),Object(a.handleBackgroundOptionFor)({id:"accountHeaderBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal"}))})),{},{account_form_shadow:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"})),type:"box-shadow",variable:"box-shadow",responsive:!0},account_close_button_color:[{selector:"#account-modal .ct-close-button",variable:"icon-color",type:"color:default"},{selector:"#account-modal .ct-close-button",variable:"icon-hover-color",type:"color:hover"}],account_close_button_shape_color:[{selector:"#account-modal .ct-close-button",variable:"closeButtonBackground",type:"color:default"},{selector:"#account-modal .ct-close-button",variable:"closeButtonHoverBackground",type:"color:hover"}],accountHeaderMargin:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),type:"spacing",variable:"margin",responsive:!0,important:!0}},Object(a.typographyOption)({id:"account_label_font",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"suffix",to_add:".ct-label"}))})),{},{accountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],transparentAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],transparent_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],stickyAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],sticky_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}]})}})),c.a.on("ct:header:sync:item:account",(function(e){var t=e.optionId,o=e.optionValue,r='[data-id="account"]';"header_account_visibility"===t&&Object(a.updateAndSaveEl)(r,(function(e){return Object(a.responsiveClassesFor)(s(s({},o),{},{desktop:!0}),e)})),"loggedin_account_label_visibility"!==t&&"loggedout_account_label_visibility"!==t||Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){Object(a.responsiveClassesFor)(o,e)}))})),"loggedin_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"login_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){n(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"loggedout_label_position"!==t&&"loggedin_label_position"!==t||(Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.desktop}),{onlyView:"desktop"}),Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.mobile}),{onlyView:"mobile"}))})),c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.global=function(e){e.itemId;return{transparent_behaviour:{selector:'[data-header*="'.concat(document.body.dataset.header,'"]'),variable:"has-transparent-header",responsive:!0,extractValue:function(e){return{desktop:e.desktop?"var(--true)":"var(--false)",tablet:e.mobile?"var(--true)":"var(--false)",mobile:e.mobile?"var(--true)":"var(--false)"}},unit:""}}}})),c.a.on("ct:header:sync:item:global",(function(e){var t=e.optionId,o=e.optionValue,r=e.values;if("has_sticky_header"===t||"sticky_rows"===t||"sticky_behaviour"===t){var a=r.has_sticky_header,n=r.sticky_rows,l=r.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===a&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var t=e.dataset.row;if(n[t]){var o=[];l.desktop&&o.push("desktop"),l.mobile&&o.push("mobile"),e.dataset.sticky=o.join(":")}})),c.a.trigger("blocksy:frontend:init")}if("transparent_behaviour"===t){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),o[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),c.a.trigger("blocksy:frontend:init")}))}}))}]);
|
static/js/account.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ctEvents from 'ct-events'
|
2 |
+
import { registerDynamicChunk } from 'blocksy-frontend'
|
3 |
+
import { handleAccountModal, activateScreen } from './frontend/account'
|
4 |
+
|
5 |
+
if (document.querySelector('#account-modal')) {
|
6 |
+
handleAccountModal(document.querySelector('#account-modal'))
|
7 |
+
}
|
8 |
+
|
9 |
+
registerDynamicChunk('blocksy_account', {
|
10 |
+
mount: (el, { event }) => {
|
11 |
+
event.preventDefault()
|
12 |
+
|
13 |
+
if (el.closest('.must-log-in')) {
|
14 |
+
let maybeAccount = document.querySelector(
|
15 |
+
'.ct-header-account[href]'
|
16 |
+
)
|
17 |
+
|
18 |
+
if (maybeAccount) {
|
19 |
+
maybeAccount.click()
|
20 |
+
} else {
|
21 |
+
event.target.dynamicJsChunkStop()
|
22 |
+
event.target.click()
|
23 |
+
}
|
24 |
+
|
25 |
+
return
|
26 |
+
}
|
27 |
+
|
28 |
+
try {
|
29 |
+
document.querySelector(el.hash)
|
30 |
+
} catch (e) {
|
31 |
+
return
|
32 |
+
}
|
33 |
+
|
34 |
+
activateScreen(document.querySelector(el.hash), {
|
35 |
+
screen: 'login',
|
36 |
+
})
|
37 |
+
|
38 |
+
ctEvents.trigger('ct:overlay:handle-click', {
|
39 |
+
e: event,
|
40 |
+
href: el.hash,
|
41 |
+
options: {
|
42 |
+
isModal: true,
|
43 |
+
},
|
44 |
+
})
|
45 |
+
},
|
46 |
+
})
|
static/js/dark-mode.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ctEvents from 'ct-events'
|
2 |
+
import { registerDynamicChunk } from 'blocksy-frontend'
|
3 |
+
|
4 |
+
registerDynamicChunk('blocksy_dark_mode', {
|
5 |
+
mount: (el, { event }) => {
|
6 |
+
event.preventDefault()
|
7 |
+
|
8 |
+
if (document.querySelector('html').dataset.palette) {
|
9 |
+
document.querySelector('html').removeAttribute('data-palette')
|
10 |
+
return
|
11 |
+
}
|
12 |
+
|
13 |
+
document.querySelector('html').dataset.palette = 'dark'
|
14 |
+
},
|
15 |
+
})
|
static/js/frontend/account.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import ctEvents from 'ct-events'
|
2 |
|
3 |
-
const activateScreen = (
|
4 |
el,
|
5 |
{
|
6 |
// login | register | forgot
|
@@ -99,11 +99,17 @@ const maybeAddMessage = (container, html) => {
|
|
99 |
return { doc }
|
100 |
}
|
101 |
|
102 |
-
const handleAccountModal = (el) => {
|
103 |
if (!el) {
|
104 |
return
|
105 |
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
el.addEventListener(
|
108 |
'click',
|
109 |
(e) => {
|
@@ -164,10 +170,15 @@ const handleAccountModal = (el) => {
|
|
164 |
return
|
165 |
}
|
166 |
|
167 |
-
fetch(
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
171 |
.then((response) => response.text())
|
172 |
.then((html) => {
|
173 |
const { doc, hasError } = maybeAddErrors(
|
@@ -225,41 +236,3 @@ const handleAccountModal = (el) => {
|
|
225 |
})
|
226 |
})
|
227 |
}
|
228 |
-
|
229 |
-
export const mountAccount = () => {
|
230 |
-
Array.from(document.querySelectorAll('.ct-header-account[href]')).map(
|
231 |
-
(el) => {
|
232 |
-
if (el.hasSearchEventListener) {
|
233 |
-
return
|
234 |
-
}
|
235 |
-
|
236 |
-
el.hasSearchEventListener = true
|
237 |
-
|
238 |
-
el.addEventListener('click', (e) => {
|
239 |
-
try {
|
240 |
-
document.querySelector(el.hash)
|
241 |
-
} catch (e) {
|
242 |
-
return
|
243 |
-
}
|
244 |
-
|
245 |
-
e.preventDefault()
|
246 |
-
|
247 |
-
activateScreen(document.querySelector(el.hash), {
|
248 |
-
screen: 'login',
|
249 |
-
})
|
250 |
-
|
251 |
-
ctEvents.trigger('ct:overlay:handle-click', {
|
252 |
-
e,
|
253 |
-
href: el.hash,
|
254 |
-
options: {
|
255 |
-
isModal: true,
|
256 |
-
},
|
257 |
-
})
|
258 |
-
})
|
259 |
-
|
260 |
-
if (document.querySelector('#account-modal')) {
|
261 |
-
handleAccountModal(document.querySelector('#account-modal'))
|
262 |
-
}
|
263 |
-
}
|
264 |
-
)
|
265 |
-
}
|
1 |
import ctEvents from 'ct-events'
|
2 |
|
3 |
+
export const activateScreen = (
|
4 |
el,
|
5 |
{
|
6 |
// login | register | forgot
|
99 |
return { doc }
|
100 |
}
|
101 |
|
102 |
+
export const handleAccountModal = (el) => {
|
103 |
if (!el) {
|
104 |
return
|
105 |
}
|
106 |
|
107 |
+
if (el.hasListeners) {
|
108 |
+
return
|
109 |
+
}
|
110 |
+
|
111 |
+
el.hasListeners = true
|
112 |
+
|
113 |
el.addEventListener(
|
114 |
'click',
|
115 |
(e) => {
|
170 |
return
|
171 |
}
|
172 |
|
173 |
+
fetch(
|
174 |
+
// maybeRegister.action,
|
175 |
+
`${ct_localizations.ajax_url}?action=blc_implement_user_registration`,
|
176 |
+
|
177 |
+
{
|
178 |
+
method: maybeRegister.method,
|
179 |
+
body: new FormData(maybeRegister),
|
180 |
+
}
|
181 |
+
)
|
182 |
.then((response) => response.text())
|
183 |
.then((html) => {
|
184 |
const { doc, hasError } = maybeAddErrors(
|
236 |
})
|
237 |
})
|
238 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static/js/frontend/sticky.js
CHANGED
@@ -53,8 +53,10 @@ const getStartPositionFor = (stickyContainer) => {
|
|
53 |
return stickyContainer.parentNode.getBoundingClientRect().height + 200
|
54 |
}
|
55 |
|
56 |
-
|
57 |
-
|
|
|
|
|
58 |
|
59 |
const row = stickyContainer.parentNode
|
60 |
|
@@ -85,7 +87,7 @@ const getStartPositionFor = (stickyContainer) => {
|
|
85 |
let hasListener = false
|
86 |
|
87 |
export const mountStickyHeader = () => {
|
88 |
-
const stickyHeader = document.querySelector('[data-sticky]')
|
89 |
|
90 |
if (!stickyHeader) {
|
91 |
return
|
@@ -106,7 +108,7 @@ export const mountStickyHeader = () => {
|
|
106 |
|
107 |
const isSticky =
|
108 |
(startPosition > 0 &&
|
109 |
-
Math.abs(window.scrollY - startPosition) <
|
110 |
window.scrollY > startPosition
|
111 |
|
112 |
const stickyComponents = stickyContainer.dataset.sticky
|
@@ -116,13 +118,28 @@ export const mountStickyHeader = () => {
|
|
116 |
let containerInitialHeight = Array.from(
|
117 |
stickyContainer.querySelectorAll('[data-row]')
|
118 |
).reduce((sum, el) => {
|
119 |
-
let rowInitialHeight =
|
|
|
|
|
|
|
120 |
getComputedStyle(el).getPropertyValue('--height')
|
121 |
)
|
|
|
122 |
|
123 |
return sum + rowInitialHeight
|
124 |
}, 0)
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
if (stickyComponents.indexOf('auto-hide') > -1) {
|
127 |
if (window.scrollY < startPosition) {
|
128 |
prevScrollY = window.scrollY
|
@@ -403,31 +420,33 @@ export const mountStickyHeader = () => {
|
|
403 |
let rowInitialHeight = getRowInitialHeight(row)
|
404 |
let rowStickyHeight = getRowStickyHeight(row)
|
405 |
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
|
|
|
|
431 |
}
|
432 |
)
|
433 |
}
|
53 |
return stickyContainer.parentNode.getBoundingClientRect().height + 200
|
54 |
}
|
55 |
|
56 |
+
// stickyContainer.closest('header').getBoundingClientRect().top +
|
57 |
+
// TODO: compute items that are before the header & are not fixed
|
58 |
+
// scrollY
|
59 |
+
const stickyOffset = 0
|
60 |
|
61 |
const row = stickyContainer.parentNode
|
62 |
|
87 |
let hasListener = false
|
88 |
|
89 |
export const mountStickyHeader = () => {
|
90 |
+
const stickyHeader = document.querySelector('header [data-sticky]')
|
91 |
|
92 |
if (!stickyHeader) {
|
93 |
return
|
108 |
|
109 |
const isSticky =
|
110 |
(startPosition > 0 &&
|
111 |
+
Math.abs(window.scrollY - startPosition) < 5) ||
|
112 |
window.scrollY > startPosition
|
113 |
|
114 |
const stickyComponents = stickyContainer.dataset.sticky
|
118 |
let containerInitialHeight = Array.from(
|
119 |
stickyContainer.querySelectorAll('[data-row]')
|
120 |
).reduce((sum, el) => {
|
121 |
+
let rowInitialHeight = el.getBoundingClientRect().height
|
122 |
+
|
123 |
+
/*
|
124 |
+
parseFloat(
|
125 |
getComputedStyle(el).getPropertyValue('--height')
|
126 |
)
|
127 |
+
*/
|
128 |
|
129 |
return sum + rowInitialHeight
|
130 |
}, 0)
|
131 |
|
132 |
+
if (isSticky && document.body.dataset.header.indexOf('shrink') === -1) {
|
133 |
+
document.body.dataset.header = `${document.body.dataset.header}:shrink`
|
134 |
+
}
|
135 |
+
|
136 |
+
if (!isSticky && document.body.dataset.header.indexOf('shrink') > -1) {
|
137 |
+
document.body.dataset.header = document.body.dataset.header.replace(
|
138 |
+
':shrink',
|
139 |
+
''
|
140 |
+
)
|
141 |
+
}
|
142 |
+
|
143 |
if (stickyComponents.indexOf('auto-hide') > -1) {
|
144 |
if (window.scrollY < startPosition) {
|
145 |
prevScrollY = window.scrollY
|
420 |
let rowInitialHeight = getRowInitialHeight(row)
|
421 |
let rowStickyHeight = getRowStickyHeight(row)
|
422 |
|
423 |
+
if (rowInitialHeight !== rowStickyHeight) {
|
424 |
+
row.style.setProperty(
|
425 |
+
'--shrinkHeight',
|
426 |
+
`${computeLinearScale(
|
427 |
+
[
|
428 |
+
startPosition,
|
429 |
+
startPosition +
|
430 |
+
Math.abs(
|
431 |
+
rowInitialHeight -
|
432 |
+
rowStickyHeight
|
433 |
+
),
|
434 |
+
],
|
435 |
+
[rowInitialHeight, rowStickyHeight],
|
436 |
+
clamp(
|
437 |
+
startPosition,
|
438 |
+
|
439 |
+
startPosition +
|
440 |
+
Math.abs(
|
441 |
+
rowInitialHeight -
|
442 |
+
rowStickyHeight
|
443 |
+
),
|
444 |
+
|
445 |
+
scrollY
|
446 |
+
)
|
447 |
+
)}px`
|
448 |
+
)
|
449 |
+
}
|
450 |
}
|
451 |
)
|
452 |
}
|
static/js/header/EditConditions.js
CHANGED
@@ -105,9 +105,9 @@ const EditConditions = ({ forcedEdit = false, headerId }) => {
|
|
105 |
<OptionsPanel
|
106 |
onChange={(optionId, cond) => {
|
107 |
setConditions((localConditions) => [
|
108 |
-
...(
|
109 |
-
|
110 |
-
),
|
111 |
{
|
112 |
id: headerId,
|
113 |
conditions: cond,
|
105 |
<OptionsPanel
|
106 |
onChange={(optionId, cond) => {
|
107 |
setConditions((localConditions) => [
|
108 |
+
...(
|
109 |
+
localConditions || conditions
|
110 |
+
).filter(({ id }) => id !== headerId),
|
111 |
{
|
112 |
id: headerId,
|
113 |
conditions: cond,
|
static/js/header/PanelsManager.js
CHANGED
@@ -75,6 +75,8 @@ const PanelsManager = () => {
|
|
75 |
<EditConditions headerId={id} />
|
76 |
),
|
77 |
},
|
|
|
|
|
78 |
}
|
79 |
: {}),
|
80 |
|
75 |
<EditConditions headerId={id} />
|
76 |
),
|
77 |
},
|
78 |
+
|
79 |
+
divider: {type: 'ct-divider'}
|
80 |
}
|
81 |
: {}),
|
82 |
|
static/js/helpers/SubmitSupport.js
CHANGED
@@ -15,10 +15,10 @@ const SubmitSupport = () => {
|
|
15 |
|
16 |
return (
|
17 |
<div className="ct-support-container">
|
18 |
-
<h2>{__('
|
19 |
<p>
|
20 |
{__(
|
21 |
-
`Got a question or need
|
22 |
'blc'
|
23 |
)}
|
24 |
</p>
|
@@ -27,7 +27,15 @@ const SubmitSupport = () => {
|
|
27 |
className="ct-button"
|
28 |
data-hover="blue"
|
29 |
target="_blank">
|
30 |
-
{__(`Submit a Ticket`, 'blc')}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
</a>
|
32 |
</div>
|
33 |
)
|
15 |
|
16 |
return (
|
17 |
<div className="ct-support-container">
|
18 |
+
<h2>{__('Need help or advice?', 'blc')}</h2>
|
19 |
<p>
|
20 |
{__(
|
21 |
+
`Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.`,
|
22 |
'blc'
|
23 |
)}
|
24 |
</p>
|
27 |
className="ct-button"
|
28 |
data-hover="blue"
|
29 |
target="_blank">
|
30 |
+
{__(`Submit a Support Ticket`, 'blc')}
|
31 |
+
</a>
|
32 |
+
|
33 |
+
<a
|
34 |
+
href="https://www.facebook.com/groups/blocksy.community"
|
35 |
+
className="ct-button"
|
36 |
+
data-hover="blue"
|
37 |
+
target="_blank">
|
38 |
+
{__(`Join Facebook Community`, 'blc')}
|
39 |
</a>
|
40 |
</div>
|
41 |
)
|
static/js/main.js
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
import ctEvents from 'ct-events'
|
2 |
-
import { onDocumentLoaded } from 'blocksy-frontend'
|
3 |
-
import { mountAccount } from './frontend/account'
|
4 |
-
import { mountStickyHeader } from './frontend/sticky'
|
5 |
-
|
6 |
-
onDocumentLoaded(() => {
|
7 |
-
mountAccount()
|
8 |
-
mountStickyHeader()
|
9 |
-
})
|
10 |
-
|
11 |
-
ctEvents.on('blocksy:frontend:init', () => {
|
12 |
-
mountAccount()
|
13 |
-
mountStickyHeader()
|
14 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static/js/options/ConditionsManager.js
CHANGED
@@ -3,8 +3,11 @@ import cls from 'classnames'
|
|
3 |
import { __ } from 'ct-i18n'
|
4 |
import { Select } from 'blocksy-options'
|
5 |
|
|
|
|
|
6 |
let allPostsCache = []
|
7 |
let allTaxonomiesCache = []
|
|
|
8 |
|
9 |
const ConditionsManager = ({ value, onChange }) => {
|
10 |
const allRules = blocksy_admin.all_condition_rules
|
@@ -32,34 +35,17 @@ const ConditionsManager = ({ value, onChange }) => {
|
|
32 |
|
33 |
const [allPosts, setAllPosts] = useState(allPostsCache)
|
34 |
const [allTaxonomies, setAllTaxonomies] = useState(allTaxonomiesCache)
|
|
|
35 |
|
36 |
const hasAdditions = (condition) =>
|
37 |
condition.rule === 'post_ids' ||
|
38 |
condition.rule === 'page_ids' ||
|
39 |
condition.rule === 'custom_post_type_ids' ||
|
40 |
condition.rule === 'taxonomy_ids' ||
|
41 |
-
condition.rule === 'post_with_taxonomy_ids'
|
|
|
42 |
|
43 |
useEffect(() => {
|
44 |
-
Promise.all(
|
45 |
-
['posts', 'pages', 'ct_cpt'].map((type) =>
|
46 |
-
fetch(
|
47 |
-
`${blocksy_admin.rest_url}wp/v2/${
|
48 |
-
type === 'ct_cpt' ? 'posts' : type
|
49 |
-
}${
|
50 |
-
blocksy_admin.rest_url.indexOf('?') > -1 ? '&' : '?'
|
51 |
-
}_embed&per_page=100${
|
52 |
-
type === 'ct_cpt' ? '&post_type=ct_cpt' : ''
|
53 |
-
}`
|
54 |
-
).then((r) => r.json())
|
55 |
-
)
|
56 |
-
).then((results) => {
|
57 |
-
let all = results.reduce((r, current) => [...r, ...current], [])
|
58 |
-
|
59 |
-
setAllPosts(all)
|
60 |
-
allPostsCache = all
|
61 |
-
})
|
62 |
-
|
63 |
fetch(
|
64 |
`${wp.ajax.settings.url}?action=blocksy_conditions_get_all_taxonomies`,
|
65 |
{
|
@@ -71,9 +57,12 @@ const ConditionsManager = ({ value, onChange }) => {
|
|
71 |
}
|
72 |
)
|
73 |
.then((r) => r.json())
|
74 |
-
.then(({ data: { taxonomies } }) => {
|
75 |
setAllTaxonomies(taxonomies)
|
76 |
allTaxonomiesCache = taxonomies
|
|
|
|
|
|
|
77 |
})
|
78 |
}, [])
|
79 |
|
@@ -149,32 +138,8 @@ const ConditionsManager = ({ value, onChange }) => {
|
|
149 |
{(condition.rule === 'post_ids' ||
|
150 |
condition.rule === 'custom_post_type_ids' ||
|
151 |
condition.rule === 'page_ids') && (
|
152 |
-
<
|
153 |
-
|
154 |
-
option={{
|
155 |
-
appendToBody: true,
|
156 |
-
defaultToFirstItem: false,
|
157 |
-
placeholder:
|
158 |
-
condition.rule === 'post_ids'
|
159 |
-
? __('Select post', 'blc')
|
160 |
-
: condition.rule === 'page_ids'
|
161 |
-
? __('Select page', 'blc')
|
162 |
-
: __('Custom Post Type ID', 'blc'),
|
163 |
-
choices: allPosts
|
164 |
-
.filter(({ type }) =>
|
165 |
-
condition.rule === 'post_ids'
|
166 |
-
? type === 'post'
|
167 |
-
: condition.rule === 'page_ids'
|
168 |
-
? type === 'page'
|
169 |
-
: type !== 'post' && type !== 'page'
|
170 |
-
)
|
171 |
-
.map((post) => ({
|
172 |
-
key: post.id,
|
173 |
-
value: post.title.rendered,
|
174 |
-
})),
|
175 |
-
search: true,
|
176 |
-
}}
|
177 |
-
value={(condition.payload || {}).post_id || ''}
|
178 |
onChange={(post_id) => {
|
179 |
onChange(
|
180 |
value.map((r, i) => ({
|
@@ -209,7 +174,7 @@ const ConditionsManager = ({ value, onChange }) => {
|
|
209 |
})),
|
210 |
search: true,
|
211 |
}}
|
212 |
-
value={condition.payload.taxonomy_id || ''}
|
213 |
onChange={(taxonomy_id) => {
|
214 |
onChange(
|
215 |
value.map((r, i) => ({
|
@@ -228,6 +193,37 @@ const ConditionsManager = ({ value, onChange }) => {
|
|
228 |
/>
|
229 |
)}
|
230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
<button
|
232 |
type="button"
|
233 |
onClick={(e) => {
|
3 |
import { __ } from 'ct-i18n'
|
4 |
import { Select } from 'blocksy-options'
|
5 |
|
6 |
+
import PostIdPicker from './ConditionsManager/PostIdPicker'
|
7 |
+
|
8 |
let allPostsCache = []
|
9 |
let allTaxonomiesCache = []
|
10 |
+
let allLanguagesCache = []
|
11 |
|
12 |
const ConditionsManager = ({ value, onChange }) => {
|
13 |
const allRules = blocksy_admin.all_condition_rules
|
35 |
|
36 |
const [allPosts, setAllPosts] = useState(allPostsCache)
|
37 |
const [allTaxonomies, setAllTaxonomies] = useState(allTaxonomiesCache)
|
38 |
+
const [allLanguages, setAllLanguages] = useState(allLanguagesCache)
|
39 |
|
40 |
const hasAdditions = (condition) =>
|
41 |
condition.rule === 'post_ids' ||
|
42 |
condition.rule === 'page_ids' ||
|
43 |
condition.rule === 'custom_post_type_ids' ||
|
44 |
condition.rule === 'taxonomy_ids' ||
|
45 |
+
condition.rule === 'post_with_taxonomy_ids' ||
|
46 |
+
condition.rule === 'current_language'
|
47 |
|
48 |
useEffect(() => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
fetch(
|
50 |
`${wp.ajax.settings.url}?action=blocksy_conditions_get_all_taxonomies`,
|
51 |
{
|
57 |
}
|
58 |
)
|
59 |
.then((r) => r.json())
|
60 |
+
.then(({ data: { taxonomies, languages } }) => {
|
61 |
setAllTaxonomies(taxonomies)
|
62 |
allTaxonomiesCache = taxonomies
|
63 |
+
|
64 |
+
setAllLanguages(languages)
|
65 |
+
allLanguagesCache = languages
|
66 |
})
|
67 |
}, [])
|
68 |
|
138 |
{(condition.rule === 'post_ids' ||
|
139 |
condition.rule === 'custom_post_type_ids' ||
|
140 |
condition.rule === 'page_ids') && (
|
141 |
+
<PostIdPicker
|
142 |
+
condition={condition}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
onChange={(post_id) => {
|
144 |
onChange(
|
145 |
value.map((r, i) => ({
|
174 |
})),
|
175 |
search: true,
|
176 |
}}
|
177 |
+
value={(condition.payload || {}).taxonomy_id || ''}
|
178 |
onChange={(taxonomy_id) => {
|
179 |
onChange(
|
180 |
value.map((r, i) => ({
|
193 |
/>
|
194 |
)}
|
195 |
|
196 |
+
{condition.rule === 'current_language' && (
|
197 |
+
<Select
|
198 |
+
option={{
|
199 |
+
appendToBody: true,
|
200 |
+
defaultToFirstItem: false,
|
201 |
+
placeholder: __('Select language', 'blc'),
|
202 |
+
choices: allLanguages.map((language) => ({
|
203 |
+
key: language.id,
|
204 |
+
value: language.name,
|
205 |
+
})),
|
206 |
+
search: true,
|
207 |
+
}}
|
208 |
+
value={(condition.payload || {}).language || ''}
|
209 |
+
onChange={(language) => {
|
210 |
+
onChange(
|
211 |
+
value.map((r, i) => ({
|
212 |
+
...(i === index
|
213 |
+
? {
|
214 |
+
...condition,
|
215 |
+
payload: {
|
216 |
+
...condition.payload,
|
217 |
+
language,
|
218 |
+
},
|
219 |
+
}
|
220 |
+
: r),
|
221 |
+
}))
|
222 |
+
)
|
223 |
+
}}
|
224 |
+
/>
|
225 |
+
)}
|
226 |
+
|
227 |
<button
|
228 |
type="button"
|
229 |
onClick={(e) => {
|
static/js/options/ConditionsManager/PostIdPicker.js
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { createElement, useEffect, useState, useMemo } from '@wordpress/element'
|
2 |
+
import { Select } from 'blocksy-options'
|
3 |
+
import { __ } from 'ct-i18n'
|
4 |
+
|
5 |
+
const withUniqueIDs = (data) =>
|
6 |
+
data.filter(
|
7 |
+
(value, index, self) =>
|
8 |
+
self.findIndex((m) => m.ID === value.ID) === index
|
9 |
+
)
|
10 |
+
|
11 |
+
let allPostsCache = []
|
12 |
+
|
13 |
+
const PostIdPicker = ({ condition, onChange }) => {
|
14 |
+
const [allPosts, setAllPosts] = useState(allPostsCache)
|
15 |
+
|
16 |
+
const postTypeToDisplay = useMemo(
|
17 |
+
() =>
|
18 |
+
({
|
19 |
+
post_ids: 'post',
|
20 |
+
page_ids: 'page',
|
21 |
+
custom_post_type_ids: 'ct_cpt',
|
22 |
+
}[condition.rule]),
|
23 |
+
[condition.rule]
|
24 |
+
)
|
25 |
+
|
26 |
+
const currentPostId = useMemo(
|
27 |
+
() => (condition.payload || {}).post_id || '',
|
28 |
+
[condition.payload && condition.payload.post_id]
|
29 |
+
)
|
30 |
+
|
31 |
+
const fetchPosts = (searchQuery = '') => {
|
32 |
+
fetch(
|
33 |
+
`${wp.ajax.settings.url}?action=blocksy_conditions_get_all_posts`,
|
34 |
+
{
|
35 |
+
headers: {
|
36 |
+
Accept: 'application/json',
|
37 |
+
'Content-Type': 'application/json',
|
38 |
+
},
|
39 |
+
body: JSON.stringify({
|
40 |
+
post_type: postTypeToDisplay,
|
41 |
+
|
42 |
+
...(searchQuery ? { search_query: searchQuery } : {}),
|
43 |
+
...(currentPostId ? { alsoInclude: currentPostId } : {}),
|
44 |
+
}),
|
45 |
+
method: 'POST',
|
46 |
+
}
|
47 |
+
)
|
48 |
+
.then((r) => r.json())
|
49 |
+
.then(({ data: { posts } }) => {
|
50 |
+
setAllPosts((allPosts) =>
|
51 |
+
withUniqueIDs([...allPosts, ...posts])
|
52 |
+
)
|
53 |
+
|
54 |
+
allPostsCache = withUniqueIDs([...allPostsCache, ...posts])
|
55 |
+
})
|
56 |
+
}
|
57 |
+
|
58 |
+
useEffect(() => {
|
59 |
+
fetchPosts()
|
60 |
+
}, [postTypeToDisplay])
|
61 |
+
|
62 |
+
return (
|
63 |
+
<Select
|
64 |
+
option={{
|
65 |
+
appendToBody: true,
|
66 |
+
defaultToFirstItem: false,
|
67 |
+
searchPlaceholder: __(
|
68 |
+
'Type to search by ID or title...',
|
69 |
+
'blc'
|
70 |
+
),
|
71 |
+
placeholder:
|
72 |
+
condition.rule === 'post_ids'
|
73 |
+
? __('Select post', 'blc')
|
74 |
+
: condition.rule === 'page_ids'
|
75 |
+
? __('Select page', 'blc')
|
76 |
+
: __('Custom Post Type ID', 'blc'),
|
77 |
+
choices: allPosts
|
78 |
+
.filter(({ post_type }) =>
|
79 |
+
postTypeToDisplay === 'ct_cpt'
|
80 |
+
? post_type !== 'post' && post_type !== 'page'
|
81 |
+
: postTypeToDisplay === post_type
|
82 |
+
)
|
83 |
+
.map((post) => ({
|
84 |
+
key: post.ID,
|
85 |
+
value: post.post_title,
|
86 |
+
})),
|
87 |
+
search: true,
|
88 |
+
}}
|
89 |
+
value={currentPostId}
|
90 |
+
onChange={(post_id) => onChange(post_id)}
|
91 |
+
onInputValueChange={(value) => {
|
92 |
+
if (allPosts.find(({ post_title }) => post_title === value)) {
|
93 |
+
return
|
94 |
+
}
|
95 |
+
|
96 |
+
fetchPosts(value)
|
97 |
+
}}
|
98 |
+
/>
|
99 |
+
)
|
100 |
+
}
|
101 |
+
|
102 |
+
export default PostIdPicker
|
static/js/options/CustomizerOptionsManager.js
CHANGED
@@ -1,4 +1,10 @@
|
|
1 |
-
import {
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import { __ } from 'ct-i18n'
|
3 |
import saveAs from './file-saver'
|
4 |
import { Overlay } from 'blocksy-options'
|
@@ -8,16 +14,72 @@ import classnames from 'classnames'
|
|
8 |
const CustomizerOptionsManager = () => {
|
9 |
const [futureConfig, setFutureConfig] = useState(null)
|
10 |
const [isCopyingOptions, setIsCopyingOptions] = useState(null)
|
|
|
11 |
|
12 |
const [isExporting, setIsExporting] = useState(false)
|
13 |
const [dataToExport, setDataToExport] = useState(['options'])
|
14 |
|
15 |
const inputRef = useRef()
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
return (
|
18 |
<div className="ct-import-export">
|
19 |
<div className="ct-title" data-type="simple">
|
20 |
-
<h3>{__('Export', 'blc')}</h3>
|
21 |
|
22 |
<div className="ct-option-description">
|
23 |
{__(
|
@@ -43,7 +105,7 @@ const CustomizerOptionsManager = () => {
|
|
43 |
</div>
|
44 |
|
45 |
<div className="ct-title" data-type="simple">
|
46 |
-
<h3>{__('Import', 'blc')}</h3>
|
47 |
|
48 |
<div className="ct-option-description">
|
49 |
{__(
|
@@ -60,13 +122,19 @@ const CustomizerOptionsManager = () => {
|
|
60 |
<div className="ct-file-upload">
|
61 |
<button
|
62 |
type="button"
|
63 |
-
className=
|
|
|
|
|
|
|
64 |
onClick={() => {
|
65 |
inputRef.current.click()
|
66 |
}}>
|
67 |
{futureConfig
|
68 |
? futureConfig.name
|
69 |
-
: __(
|
|
|
|
|
|
|
70 |
</button>
|
71 |
|
72 |
<input
|
@@ -86,6 +154,10 @@ const CustomizerOptionsManager = () => {
|
|
86 |
onClick={(e) => {
|
87 |
e.preventDefault()
|
88 |
|
|
|
|
|
|
|
|
|
89 |
var reader = new FileReader()
|
90 |
reader.readAsText(futureConfig, 'UTF-8')
|
91 |
reader.onload = function (evt) {
|
@@ -201,7 +273,9 @@ const CustomizerOptionsManager = () => {
|
|
201 |
)}
|
202 |
</p>
|
203 |
|
204 |
-
<div
|
|
|
|
|
205 |
<button
|
206 |
onClick={(e) => {
|
207 |
e.preventDefault()
|
1 |
+
import {
|
2 |
+
useRef,
|
3 |
+
useState,
|
4 |
+
useEffect,
|
5 |
+
createElement,
|
6 |
+
Fragment,
|
7 |
+
} from '@wordpress/element'
|
8 |
import { __ } from 'ct-i18n'
|
9 |
import saveAs from './file-saver'
|
10 |
import { Overlay } from 'blocksy-options'
|
14 |
const CustomizerOptionsManager = () => {
|
15 |
const [futureConfig, setFutureConfig] = useState(null)
|
16 |
const [isCopyingOptions, setIsCopyingOptions] = useState(null)
|
17 |
+
const [isDraggedOver, setIsDraggerOver] = useState(false)
|
18 |
|
19 |
const [isExporting, setIsExporting] = useState(false)
|
20 |
const [dataToExport, setDataToExport] = useState(['options'])
|
21 |
|
22 |
const inputRef = useRef()
|
23 |
|
24 |
+
const dropZoneRef = useRef()
|
25 |
+
|
26 |
+
useEffect(() => {
|
27 |
+
const onDragOver = (e) => {
|
28 |
+
e.stopPropagation()
|
29 |
+
e.preventDefault()
|
30 |
+
e.dataTransfer.dropEffect = 'copy'
|
31 |
+
|
32 |
+
setIsDraggerOver(true)
|
33 |
+
}
|
34 |
+
|
35 |
+
const onDragLeave = (e) => {
|
36 |
+
e.stopPropagation()
|
37 |
+
e.preventDefault()
|
38 |
+
setIsDraggerOver(false)
|
39 |
+
}
|
40 |
+
|
41 |
+
const onDrop = (e) => {
|
42 |
+
e.stopPropagation()
|
43 |
+
e.preventDefault()
|
44 |
+
|
45 |
+
setIsDraggerOver(false)
|
46 |
+
|
47 |
+
const files = Array.from(e.dataTransfer.files || [])
|
48 |
+
const items = Array.from(e.dataTransfer.items || [])
|
49 |
+
|
50 |
+
if (items.length > 0) {
|
51 |
+
const futureConfig = e.dataTransfer.items[0].getAsFile()
|
52 |
+
setFutureConfig(futureConfig)
|
53 |
+
} else {
|
54 |
+
if (files.length > 0) {
|
55 |
+
setFutureConfig(files[0])
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
dropZoneRef.current.addEventListener('dragover', onDragOver, false)
|
61 |
+
dropZoneRef.current.addEventListener('dragleave', onDragLeave, false)
|
62 |
+
dropZoneRef.current.addEventListener('drop', onDrop, false)
|
63 |
+
|
64 |
+
return () => {
|
65 |
+
dropZoneRef.current.removeEventListener(
|
66 |
+
'dragover',
|
67 |
+
onDragOver,
|
68 |
+
false
|
69 |
+
)
|
70 |
+
dropZoneRef.current.removeEventListener(
|
71 |
+
'dragleave',
|
72 |
+
onDragLeave,
|
73 |
+
false
|
74 |
+
)
|
75 |
+
dropZoneRef.current.removeEventListener('drop', onDrop, false)
|
76 |
+
}
|
77 |
+
}, [])
|
78 |
+
|
79 |
return (
|
80 |
<div className="ct-import-export">
|
81 |
<div className="ct-title" data-type="simple">
|
82 |
+
<h3>{__('Export Options', 'blc')}</h3>
|
83 |
|
84 |
<div className="ct-option-description">
|
85 |
{__(
|
105 |
</div>
|
106 |
|
107 |
<div className="ct-title" data-type="simple">
|
108 |
+
<h3>{__('Import Options', 'blc')}</h3>
|
109 |
|
110 |
<div className="ct-option-description">
|
111 |
{__(
|
122 |
<div className="ct-file-upload">
|
123 |
<button
|
124 |
type="button"
|
125 |
+
className={classnames('button ct-upload-button', {
|
126 |
+
active: isDraggedOver,
|
127 |
+
})}
|
128 |
+
ref={dropZoneRef}
|
129 |
onClick={() => {
|
130 |
inputRef.current.click()
|
131 |
}}>
|
132 |
{futureConfig
|
133 |
? futureConfig.name
|
134 |
+
: __(
|
135 |
+
'Click or drop to upload a file...',
|
136 |
+
'blc'
|
137 |
+
)}
|
138 |
</button>
|
139 |
|
140 |
<input
|
154 |
onClick={(e) => {
|
155 |
e.preventDefault()
|
156 |
|
157 |
+
if (!futureConfig) {
|
158 |
+
return
|
159 |
+
}
|
160 |
+
|
161 |
var reader = new FileReader()
|
162 |
reader.readAsText(futureConfig, 'UTF-8')
|
163 |
reader.onload = function (evt) {
|
273 |
)}
|
274 |
</p>
|
275 |
|
276 |
+
<div
|
277 |
+
className="ct-modal-actions has-divider"
|
278 |
+
data-buttons="2">
|
279 |
<button
|
280 |
onClick={(e) => {
|
281 |
e.preventDefault()
|
static/js/options/DisplayCondition.js
CHANGED
@@ -2,7 +2,7 @@ import {
|
|
2 |
createElement,
|
3 |
Fragment,
|
4 |
useEffect,
|
5 |
-
useState
|
6 |
} from '@wordpress/element'
|
7 |
import { __ } from 'ct-i18n'
|
8 |
import { Switch, Select } from 'blocksy-options'
|
@@ -13,10 +13,16 @@ import { Overlay } from 'blocksy-options'
|
|
13 |
const DisplayCondition = ({
|
14 |
option: {
|
15 |
// inline | modal
|
16 |
-
display = 'inline'
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
},
|
18 |
value,
|
19 |
-
onChange
|
20 |
}) => {
|
21 |
const [isEditing, setIsEditing] = useState(false)
|
22 |
const [localValue, setLocalValue] = useState(null)
|
@@ -30,7 +36,7 @@ const DisplayCondition = ({
|
|
30 |
<button
|
31 |
className="button-primary"
|
32 |
style={{ width: '100%' }}
|
33 |
-
onClick={e => {
|
34 |
e.preventDefault()
|
35 |
setIsEditing(true)
|
36 |
setLocalValue(null)
|
@@ -47,18 +53,13 @@ const DisplayCondition = ({
|
|
47 |
}}
|
48 |
render={() => (
|
49 |
<div className="ct-modal-content">
|
50 |
-
<h2>{
|
51 |
-
<p>
|
52 |
-
{__(
|
53 |
-
'Add one or more conditions to display the transparent header.',
|
54 |
-
'blc'
|
55 |
-
)}
|
56 |
-
</p>
|
57 |
|
58 |
<div className="ct-modal-scroll">
|
59 |
<ConditionsManager
|
60 |
value={localValue || value}
|
61 |
-
onChange={value => {
|
62 |
setLocalValue(value)
|
63 |
}}
|
64 |
/>
|
2 |
createElement,
|
3 |
Fragment,
|
4 |
useEffect,
|
5 |
+
useState,
|
6 |
} from '@wordpress/element'
|
7 |
import { __ } from 'ct-i18n'
|
8 |
import { Switch, Select } from 'blocksy-options'
|
13 |
const DisplayCondition = ({
|
14 |
option: {
|
15 |
// inline | modal
|
16 |
+
display = 'inline',
|
17 |
+
|
18 |
+
modalTitle = __('Transparent Header Display Conditions', 'blc'),
|
19 |
+
modalDescription = __(
|
20 |
+
'Add one or more conditions to display the transparent header.',
|
21 |
+
'blc'
|
22 |
+
),
|
23 |
},
|
24 |
value,
|
25 |
+
onChange,
|
26 |
}) => {
|
27 |
const [isEditing, setIsEditing] = useState(false)
|
28 |
const [localValue, setLocalValue] = useState(null)
|
36 |
<button
|
37 |
className="button-primary"
|
38 |
style={{ width: '100%' }}
|
39 |
+
onClick={(e) => {
|
40 |
e.preventDefault()
|
41 |
setIsEditing(true)
|
42 |
setLocalValue(null)
|
53 |
}}
|
54 |
render={() => (
|
55 |
<div className="ct-modal-content">
|
56 |
+
<h2>{modalTitle}</h2>
|
57 |
+
<p>{modalDescription}</p>
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
<div className="ct-modal-scroll">
|
60 |
<ConditionsManager
|
61 |
value={localValue || value}
|
62 |
+
onChange={(value) => {
|
63 |
setLocalValue(value)
|
64 |
}}
|
65 |
/>
|
static/js/screens/DemoInstall/DemosList.js
CHANGED
@@ -5,7 +5,7 @@ import {
|
|
5 |
useState,
|
6 |
createContext,
|
7 |
useContext,
|
8 |
-
Fragment
|
9 |
} from '@wordpress/element'
|
10 |
import { __ } from 'ct-i18n'
|
11 |
import classnames from 'classnames'
|
@@ -18,7 +18,8 @@ const DemosList = () => {
|
|
18 |
currentlyInstalledDemo,
|
19 |
demos_list,
|
20 |
setCurrentDemo,
|
21 |
-
demo_error
|
|
|
22 |
} = useContext(DemosContext)
|
23 |
const { Link } = useContext(DashboardContext)
|
24 |
|
@@ -29,11 +30,11 @@ const DemosList = () => {
|
|
29 |
(v, i) =>
|
30 |
demos_list.map(({ name }) => name).indexOf(v.name) === i
|
31 |
)
|
32 |
-
.map(demo => (
|
33 |
<li
|
34 |
key={demo.name}
|
35 |
className={classnames('ct-single-demo', {
|
36 |
-
'ct-is-pro': demo.is_pro
|
37 |
})}>
|
38 |
<figure>
|
39 |
<img src={demo.screenshot} />
|
@@ -68,7 +69,7 @@ const DemosList = () => {
|
|
68 |
</section>
|
69 |
|
70 |
{demo.is_pro && (
|
71 |
-
<a onClick={e => e.preventDefault()} href="#">
|
72 |
PRO
|
73 |
</a>
|
74 |
)}
|
@@ -86,7 +87,10 @@ const DemosList = () => {
|
|
86 |
</a>
|
87 |
<button
|
88 |
className="ct-button-primary"
|
89 |
-
onClick={() =>
|
|
|
|
|
|
|
90 |
disabled={!!demo_error}>
|
91 |
{currentlyInstalledDemo &&
|
92 |
currentlyInstalledDemo.demo.indexOf(
|
5 |
useState,
|
6 |
createContext,
|
7 |
useContext,
|
8 |
+
Fragment,
|
9 |
} from '@wordpress/element'
|
10 |
import { __ } from 'ct-i18n'
|
11 |
import classnames from 'classnames'
|
18 |
currentlyInstalledDemo,
|
19 |
demos_list,
|
20 |
setCurrentDemo,
|
21 |
+
demo_error,
|
22 |
+
setInstallerBlockingReleased,
|
23 |
} = useContext(DemosContext)
|
24 |
const { Link } = useContext(DashboardContext)
|
25 |
|
30 |
(v, i) =>
|
31 |
demos_list.map(({ name }) => name).indexOf(v.name) === i
|
32 |
)
|
33 |
+
.map((demo) => (
|
34 |
<li
|
35 |
key={demo.name}
|
36 |
className={classnames('ct-single-demo', {
|
37 |
+
'ct-is-pro': demo.is_pro,
|
38 |
})}>
|
39 |
<figure>
|
40 |
<img src={demo.screenshot} />
|
69 |
</section>
|
70 |
|
71 |
{demo.is_pro && (
|
72 |
+
<a onClick={(e) => e.preventDefault()} href="#">
|
73 |
PRO
|
74 |
</a>
|
75 |
)}
|
87 |
</a>
|
88 |
<button
|
89 |
className="ct-button-primary"
|
90 |
+
onClick={() => {
|
91 |
+
setInstallerBlockingReleased(false)
|
92 |
+
setCurrentDemo(demo.name)
|
93 |
+
}}
|
94 |
disabled={!!demo_error}>
|
95 |
{currentlyInstalledDemo &&
|
96 |
currentlyInstalledDemo.demo.indexOf(
|
static/js/screens/DemoInstall/Wizzard/ModifyDemo.js
CHANGED
@@ -5,7 +5,7 @@ import {
|
|
5 |
useState,
|
6 |
useContext,
|
7 |
createContext,
|
8 |
-
Fragment
|
9 |
} from '@wordpress/element'
|
10 |
import { __ } from 'ct-i18n'
|
11 |
import classnames from 'classnames'
|
@@ -18,7 +18,7 @@ const ModifyDemo = ({ style, nextStep }) => {
|
|
18 |
setCurrentlyInstalledDemo,
|
19 |
setCurrentDemo,
|
20 |
currentDemo,
|
21 |
-
demos_list
|
22 |
} = useContext(DemosContext)
|
23 |
|
24 |
const [currentStep, setCurrentStep] = useState(0)
|
@@ -35,26 +35,26 @@ const ModifyDemo = ({ style, nextStep }) => {
|
|
35 |
const stepsDescriptors = {
|
36 |
erase_content: {
|
37 |
title: __('Erase content', 'blc'),
|
38 |
-
query_string: `action=blocksy_demo_erase_content&wp_customize=on
|
39 |
},
|
40 |
|
41 |
deactivate_demo_plugins: {
|
42 |
title: __('Deactivate demo plugins', 'blc'),
|
43 |
query_string: `action=blocksy_demo_deactivate_plugins&plugins=${demoVariations[0].plugins.join(
|
44 |
':'
|
45 |
-
)}
|
46 |
},
|
47 |
|
48 |
deregister_current_demo: {
|
49 |
title: __('Erase content', 'blc'),
|
50 |
-
query_string: `action=blocksy_demo_deregister_current_demo
|
51 |
-
}
|
52 |
}
|
53 |
|
54 |
const stepsForConfiguration = [
|
55 |
'erase_content',
|
56 |
'deactivate_demo_plugins',
|
57 |
-
'deregister_current_demo'
|
58 |
]
|
59 |
|
60 |
const stepName = stepsForConfiguration[currentStep]
|
@@ -66,7 +66,7 @@ const ModifyDemo = ({ style, nextStep }) => {
|
|
66 |
`${ctDashboardLocalizations.ajax_url}?${stepDescriptor.query_string}`
|
67 |
)
|
68 |
|
69 |
-
evtSource.onmessage = e => {
|
70 |
var data = JSON.parse(e.data)
|
71 |
|
72 |
if (data.action === 'complete') {
|
@@ -122,7 +122,7 @@ const ModifyDemo = ({ style, nextStep }) => {
|
|
122 |
<div className="ct-modify-actions">
|
123 |
<button
|
124 |
className="ct-demo-btn ct-dismiss"
|
125 |
-
onClick={e => {
|
126 |
e.preventDefault()
|
127 |
setCurrentDemo(`${properDemoName}:hide`)
|
128 |
}}>
|
@@ -141,7 +141,7 @@ const ModifyDemo = ({ style, nextStep }) => {
|
|
141 |
<div className="ct-modify-actions">
|
142 |
<button
|
143 |
className="ct-demo-btn demo-remove"
|
144 |
-
onClick={e => {
|
145 |
setRunningState('loading')
|
146 |
e.preventDefault()
|
147 |
fireOffNextStep()
|
@@ -152,7 +152,7 @@ const ModifyDemo = ({ style, nextStep }) => {
|
|
152 |
|
153 |
<button
|
154 |
className="ct-demo-btn"
|
155 |
-
onClick={e => {
|
156 |
e.preventDefault()
|
157 |
nextStep()
|
158 |
}}>
|
5 |
useState,
|
6 |
useContext,
|
7 |
createContext,
|
8 |
+
Fragment,
|
9 |
} from '@wordpress/element'
|
10 |
import { __ } from 'ct-i18n'
|
11 |
import classnames from 'classnames'
|
18 |
setCurrentlyInstalledDemo,
|
19 |
setCurrentDemo,
|
20 |
currentDemo,
|
21 |
+
demos_list,
|
22 |
} = useContext(DemosContext)
|
23 |
|
24 |
const [currentStep, setCurrentStep] = useState(0)
|
35 |
const stepsDescriptors = {
|
36 |
erase_content: {
|
37 |
title: __('Erase content', 'blc'),
|
38 |
+
query_string: `action=blocksy_demo_erase_content&wp_customize=on`,
|
39 |
},
|
40 |
|
41 |
deactivate_demo_plugins: {
|
42 |
title: __('Deactivate demo plugins', 'blc'),
|
43 |
query_string: `action=blocksy_demo_deactivate_plugins&plugins=${demoVariations[0].plugins.join(
|
44 |
':'
|
45 |
+
)}`,
|
46 |
},
|
47 |
|
48 |
deregister_current_demo: {
|
49 |
title: __('Erase content', 'blc'),
|
50 |
+
query_string: `action=blocksy_demo_deregister_current_demo`,
|
51 |
+
},
|
52 |
}
|
53 |
|
54 |
const stepsForConfiguration = [
|
55 |
'erase_content',
|
56 |
'deactivate_demo_plugins',
|
57 |
+
'deregister_current_demo',
|
58 |
]
|
59 |
|
60 |
const stepName = stepsForConfiguration[currentStep]
|
66 |
`${ctDashboardLocalizations.ajax_url}?${stepDescriptor.query_string}`
|
67 |
)
|
68 |
|
69 |
+
evtSource.onmessage = (e) => {
|
70 |
var data = JSON.parse(e.data)
|
71 |
|
72 |
if (data.action === 'complete') {
|
122 |
<div className="ct-modify-actions">
|
123 |
<button
|
124 |
className="ct-demo-btn ct-dismiss"
|
125 |
+
onClick={(e) => {
|
126 |
e.preventDefault()
|
127 |
setCurrentDemo(`${properDemoName}:hide`)
|
128 |
}}>
|
141 |
<div className="ct-modify-actions">
|
142 |
<button
|
143 |
className="ct-demo-btn demo-remove"
|
144 |
+
onClick={(e) => {
|
145 |
setRunningState('loading')
|
146 |
e.preventDefault()
|
147 |
fireOffNextStep()
|
152 |
|
153 |
<button
|
154 |
className="ct-demo-btn"
|
155 |
+
onClick={(e) => {
|
156 |
e.preventDefault()
|
157 |
nextStep()
|
158 |
}}>
|
static/js/screens/DemoInstall/Wizzard/Plugins.js
CHANGED
@@ -5,14 +5,14 @@ import {
|
|
5 |
useState,
|
6 |
useContext,
|
7 |
createContext,
|
8 |
-
Fragment
|
9 |
} from '@wordpress/element'
|
10 |
import { __ } from 'ct-i18n'
|
11 |
import classnames from 'classnames'
|
12 |
import { DemosContext } from '../../DemoInstall'
|
13 |
import Checkbox from '../../../helpers/Checkbox'
|
14 |
|
15 |
-
export const getNameForPlugin = plugin =>
|
16 |
((
|
17 |
{
|
18 |
coblocks: 'CoBlocks',
|
@@ -22,17 +22,18 @@ export const getNameForPlugin = plugin =>
|
|
22 |
brizy: 'Brizy',
|
23 |
getwid: 'Getwid',
|
24 |
'wpforms-lite': 'WPForms - Contact Form',
|
|
|
25 |
'stackable-ultimate-gutenberg-blocks':
|
26 |
-
'Stackable – Gutenberg Blocks'
|
27 |
}[plugin] || plugin
|
28 |
-
).replace(/\b\w/, v => v.toUpperCase()))
|
29 |
|
30 |
const Plugins = ({ demoConfiguration, setDemoConfiguration, style }) => {
|
31 |
const {
|
32 |
currentDemo,
|
33 |
demos_list,
|
34 |
pluginsStatus,
|
35 |
-
setCurrentDemo
|
36 |
} = useContext(DemosContext)
|
37 |
|
38 |
const [properDemoName, _] = (currentDemo || '').split(':')
|
@@ -75,14 +76,14 @@ const Plugins = ({ demoConfiguration, setDemoConfiguration, style }) => {
|
|
75 |
setDemoConfiguration({
|
76 |
...demoConfiguration,
|
77 |
plugins: demoConfiguration.plugins.map(
|
78 |
-
demo =>
|
79 |
demo.plugin === plugin
|
80 |
? {
|
81 |
...demo,
|
82 |
-
enabled: !enabled
|
83 |
}
|
84 |
: demo
|
85 |
-
)
|
86 |
})
|
87 |
}>
|
88 |
{getNameForPlugin(plugin)}
|
5 |
useState,
|
6 |
useContext,
|
7 |
createContext,
|
8 |
+
Fragment,
|
9 |
} from '@wordpress/element'
|
10 |
import { __ } from 'ct-i18n'
|
11 |
import classnames from 'classnames'
|
12 |
import { DemosContext } from '../../DemoInstall'
|
13 |
import Checkbox from '../../../helpers/Checkbox'
|
14 |
|
15 |
+
export const getNameForPlugin = (plugin) =>
|
16 |
((
|
17 |
{
|
18 |
coblocks: 'CoBlocks',
|
22 |
brizy: 'Brizy',
|
23 |
getwid: 'Getwid',
|
24 |
'wpforms-lite': 'WPForms - Contact Form',
|
25 |
+
'recipe-card-blocks-by-wpzoom': 'Recipe Card Blocks by WPZOOM',
|
26 |
'stackable-ultimate-gutenberg-blocks':
|
27 |
+
'Stackable – Gutenberg Blocks',
|
28 |
}[plugin] || plugin
|
29 |
+
).replace(/\b\w/, (v) => v.toUpperCase()))
|
30 |
|
31 |
const Plugins = ({ demoConfiguration, setDemoConfiguration, style }) => {
|
32 |
const {
|
33 |
currentDemo,
|
34 |
demos_list,
|
35 |
pluginsStatus,
|
36 |
+
setCurrentDemo,
|
37 |
} = useContext(DemosContext)
|
38 |
|
39 |
const [properDemoName, _] = (currentDemo || '').split(':')
|
76 |
setDemoConfiguration({
|
77 |
...demoConfiguration,
|
78 |
plugins: demoConfiguration.plugins.map(
|
79 |
+
(demo) =>
|
80 |
demo.plugin === plugin
|
81 |
? {
|
82 |
...demo,
|
83 |
+
enabled: !enabled,
|
84 |
}
|
85 |
: demo
|
86 |
+
),
|
87 |
})
|
88 |
}>
|
89 |
{getNameForPlugin(plugin)}
|
static/js/sticky.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ctEvents from 'ct-events'
|
2 |
+
import { registerDynamicChunk } from 'blocksy-frontend'
|
3 |
+
import { mountStickyHeader } from './frontend/sticky'
|
4 |
+
|
5 |
+
mountStickyHeader()
|
6 |
+
|
7 |
+
registerDynamicChunk('blocksy_sticky_header', {
|
8 |
+
mount: (el) => {},
|
9 |
+
})
|
static/js/sync/header.js
CHANGED
@@ -1,39 +1,22 @@
|
|
1 |
import ctEvents from 'ct-events'
|
|
|
2 |
|
3 |
ctEvents.on(
|
4 |
'ct:header:sync:collect-variable-descriptors',
|
5 |
(variableDescriptors) => {
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
selector: 'header',
|
11 |
-
addToDescriptors: {
|
12 |
-
fullValue: true
|
13 |
-
},
|
14 |
responsive: true,
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
})
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
})
|
24 |
-
|
25 |
-
variableDescriptors['global'] = {
|
26 |
-
...handleBackgroundOptionForSpecific('is_absolute'),
|
27 |
-
...handleBackgroundOptionForSpecific('headerBackground'),
|
28 |
-
...handleBackgroundOptionForSpecific('absoluteHeaderBackground')
|
29 |
-
}
|
30 |
-
|
31 |
-
variableDescriptors['global'] = {
|
32 |
-
...handleBackgroundOptionForSpecific('is_absolute'),
|
33 |
-
...handleBackgroundOptionForSpecific('headerBackground'),
|
34 |
-
...handleBackgroundOptionForSpecific('absoluteHeaderBackground')
|
35 |
-
}
|
36 |
-
*/
|
37 |
}
|
38 |
)
|
39 |
|
1 |
import ctEvents from 'ct-events'
|
2 |
+
import { withKeys } from 'blocksy-customizer-sync'
|
3 |
|
4 |
ctEvents.on(
|
5 |
'ct:header:sync:collect-variable-descriptors',
|
6 |
(variableDescriptors) => {
|
7 |
+
variableDescriptors['global'] = ({ itemId }) => ({
|
8 |
+
transparent_behaviour: {
|
9 |
+
selector: `[data-header*="${document.body.dataset.header}"]`,
|
10 |
+
variable: 'has-transparent-header',
|
|
|
|
|
|
|
|
|
11 |
responsive: true,
|
12 |
+
extractValue: (value) => ({
|
13 |
+
desktop: value.desktop ? 'var(--true)' : 'var(--false)',
|
14 |
+
tablet: value.mobile ? 'var(--true)' : 'var(--false)',
|
15 |
+
mobile: value.mobile ? 'var(--true)' : 'var(--false)',
|
16 |
+
}),
|
17 |
+
unit: '',
|
18 |
+
},
|
19 |
+
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
)
|
22 |
|
static/sass/beta.scss
CHANGED
@@ -55,4 +55,16 @@ background-color: #32373c;
|
|
55 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%234f5660' fill-opacity='0.2' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E");
|
56 |
background-size: 250px;
|
57 |
background-position: 0 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
55 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%234f5660' fill-opacity='0.2' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E");
|
56 |
background-size: 250px;
|
57 |
background-position: 0 5px;
|
58 |
+
}
|
59 |
+
|
60 |
+
// beta modal
|
61 |
+
.ct-beta-updates-consent {
|
62 |
+
--modal-width: 450px;
|
63 |
+
--modal-min-height: 330px;
|
64 |
+
--modal-padding: 45px;
|
65 |
+
text-align: center;
|
66 |
+
|
67 |
+
.ct-modal-content p {
|
68 |
+
margin-bottom: 1.2em;
|
69 |
+
}
|
70 |
}
|
static/sass/demo-install/builders.scss
CHANGED
@@ -68,7 +68,7 @@
|
|
68 |
.ct-checkbox {
|
69 |
--checkMarkColor: #fff;
|
70 |
--background: rgba(179, 189, 201, 0.8);
|
71 |
-
--backgroundActive:
|
72 |
position: absolute;
|
73 |
top: 0px;
|
74 |
right: 0px;
|
68 |
.ct-checkbox {
|
69 |
--checkMarkColor: #fff;
|
70 |
--background: rgba(179, 189, 201, 0.8);
|
71 |
+
--backgroundActive: var(--accentColor);
|
72 |
position: absolute;
|
73 |
top: 0px;
|
74 |
right: 0px;
|
static/sass/demo-install/installer.scss
CHANGED
@@ -53,7 +53,7 @@
|
|
53 |
width: var(--progress);
|
54 |
height: 4px;
|
55 |
border-radius: inherit;
|
56 |
-
background:
|
57 |
transition: width 0.3s ease;
|
58 |
}
|
59 |
}
|
53 |
width: var(--progress);
|
54 |
height: 4px;
|
55 |
border-radius: inherit;
|
56 |
+
background: var(--accentColor);
|
57 |
transition: width 0.3s ease;
|
58 |
}
|
59 |
}
|
static/sass/demo-install/main.scss
CHANGED
@@ -41,6 +41,6 @@
|
|
41 |
|
42 |
&:hover {
|
43 |
color: #fff;
|
44 |
-
background: var(--ct-buttonHoverColor,
|
45 |
}
|
46 |
}
|
41 |
|
42 |
&:hover {
|
43 |
color: #fff;
|
44 |
+
background: var(--ct-buttonHoverColor, var(--accentColor));
|
45 |
}
|
46 |
}
|
static/sass/extensions/main.scss
CHANGED
@@ -1,8 +1,5 @@
|
|
1 |
@import 'mailchimp-config';
|
2 |
|
3 |
-
$extension-spacing: 25px;
|
4 |
-
|
5 |
-
|
6 |
.ct-extensions-sourse {
|
7 |
display: flex;
|
8 |
justify-content: center;
|
@@ -20,12 +17,12 @@ $extension-spacing: 25px;
|
|
20 |
|
21 |
&.active {
|
22 |
color: #fff;
|
23 |
-
background:
|
24 |
-
border-color:
|
25 |
}
|
26 |
|
27 |
&:hover:not(.active) {
|
28 |
-
color:
|
29 |
}
|
30 |
|
31 |
&:first-child {
|
@@ -40,56 +37,7 @@ $extension-spacing: 25px;
|
|
40 |
}
|
41 |
}
|
42 |
|
43 |
-
.ct-extensions-list {
|
44 |
-
display: grid;
|
45 |
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
46 |
-
grid-column-gap: 30px;
|
47 |
-
grid-row-gap: 30px;
|
48 |
-
margin: 0;
|
49 |
-
|
50 |
-
li {
|
51 |
-
display: flex;
|
52 |
-
flex-direction: column;
|
53 |
-
margin: 0;
|
54 |
-
border-radius: 3px;
|
55 |
-
border: 1px solid rgba(226, 230, 235, 0.7);
|
56 |
-
box-shadow: 0 2px 5px rgba(143, 163, 184, 0.12);
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
.ct-extension-title {
|
61 |
-
display: flex;
|
62 |
-
align-items: center;
|
63 |
-
justify-content: space-between;
|
64 |
-
margin: 30px 0 15px 0;
|
65 |
-
padding: 0 $extension-spacing;
|
66 |
-
|
67 |
-
svg {
|
68 |
-
opacity: 0.7;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
-
.ct-extension-description {
|
73 |
-
font-size: 14px;
|
74 |
-
line-height: 1.7;
|
75 |
-
margin-bottom: 30px;
|
76 |
-
padding: 0 $extension-spacing;
|
77 |
-
}
|
78 |
|
79 |
-
.ct-extension-actions {
|
80 |
-
display: flex;
|
81 |
-
justify-content: space-between;
|
82 |
-
margin-top: auto;
|
83 |
-
padding: 20px #{$extension-spacing - 12px} 20px $extension-spacing;
|
84 |
-
border-top: 1px solid rgba(226, 230, 235, 0.5);
|
85 |
-
background: rgba(235, 237, 241, 0.2);
|
86 |
-
|
87 |
-
[class*="ct-button"] {
|
88 |
-
--buttonHeight: 32px;
|
89 |
-
--buttonPadding: 12px;
|
90 |
-
min-width: 92px;
|
91 |
-
}
|
92 |
-
}
|
93 |
|
94 |
.ct-config-btn {
|
95 |
margin-right: auto;
|
@@ -146,4 +94,4 @@ $extension-spacing: 25px;
|
|
146 |
font-size: 16px;
|
147 |
line-height: 16px;
|
148 |
}
|
149 |
-
}
|
1 |
@import 'mailchimp-config';
|
2 |
|
|
|
|
|
|
|
3 |
.ct-extensions-sourse {
|
4 |
display: flex;
|
5 |
justify-content: center;
|
17 |
|
18 |
&.active {
|
19 |
color: #fff;
|
20 |
+
background: var(--accentColor);
|
21 |
+
border-color: var(--accentColor);
|
22 |
}
|
23 |
|
24 |
&:hover:not(.active) {
|
25 |
+
color: var(--accentColor);
|
26 |
}
|
27 |
|
28 |
&:first-child {
|
37 |
}
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
.ct-config-btn {
|
43 |
margin-right: auto;
|
94 |
font-size: 16px;
|
95 |
line-height: 16px;
|
96 |
}
|
97 |
+
}
|
static/sass/options/animated-checkbox.scss
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
.ct-checkbox-container {
|
2 |
--checkMarkColor: #fff;
|
3 |
--background: rgba(179, 189, 201, 0.8);
|
4 |
-
--backgroundActive:
|
5 |
|
6 |
|
7 |
display: flex;
|
1 |
.ct-checkbox-container {
|
2 |
--checkMarkColor: #fff;
|
3 |
--background: rgba(179, 189, 201, 0.8);
|
4 |
+
--backgroundActive: var(--accentColor);
|
5 |
|
6 |
|
7 |
display: flex;
|