Blocksy Companion - Version 1.8.54

Version Description

Download this release

Release Info

Developer creativethemeshq
Plugin Icon wp plugin Blocksy Companion
Version 1.8.54
Comparing to
See all releases

Code changes from version 1.8.53 to 1.8.54

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.8.53
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blocksy-companion
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.54
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blocksy-companion
framework/extensions/cookies-consent/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/newsletter-subscribe/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main-admin.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/trending/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/widgets/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/features/account-auth.php CHANGED
@@ -53,7 +53,7 @@ class AccountAuth {
53
  $nonce_value = wp_unslash($_POST['blocksy-lostpassword-nonce']);
54
  }
55
 
56
- if (! wp_verify_nonce($nonce_value, 'blocksy-lostpassword')) {
57
  wp_send_json_error([]);
58
  exit;
59
  }
@@ -61,7 +61,7 @@ class AccountAuth {
61
  if (class_exists('WC_Shortcode_My_Account')) {
62
  $success = \WC_Shortcode_My_Account::retrieve_password();
63
 
64
- if (! $success) {
65
  $errors = new \WP_Error();
66
  $notices = wc_get_notices();
67
 
@@ -79,7 +79,7 @@ class AccountAuth {
79
  }
80
  } else {
81
  $errors = retrieve_password();
82
- $success = ! is_wp_error($errors);
83
  }
84
 
85
  if ($success) {
@@ -119,7 +119,7 @@ class AccountAuth {
119
 
120
  login_header(
121
  __('Lost Password'),
122
- '<p class="message">' . __( 'Please enter your username or email address. You will receive an email message with instructions on how to reset your password.' ) . '</p>',
123
  $errors
124
  );
125
  }
@@ -138,7 +138,7 @@ class AccountAuth {
138
  $users_can_register = true;
139
  }
140
 
141
- if (! $users_can_register) {
142
  exit;
143
  }
144
 
@@ -167,7 +167,7 @@ class AccountAuth {
167
  $nonce_value = wp_unslash($_POST['blocksy-register-nonce']);
168
  }
169
 
170
- if (! wp_verify_nonce($nonce_value, 'blocksy-register')) {
171
  wp_send_json_error([]);
172
  exit;
173
  }
@@ -187,6 +187,24 @@ class AccountAuth {
187
  wc_clean($user_login),
188
  $user_pass
189
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  } else {
191
  $errors = register_new_user($user_login, $user_email);
192
  }
@@ -203,7 +221,7 @@ class AccountAuth {
203
  wp_login_url()
204
  );
205
 
206
- if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) ) {
207
  $error_message = sprintf(
208
  __(
209
  'Your account was created successfully and a password has been sent to your email address. Please visit the <a href="%s">login page</a>.',
@@ -219,7 +237,7 @@ class AccountAuth {
219
  'registered',
220
  sprintf(
221
  /* translators: %s: Link to the login page. */
222
- __( 'Registration complete. Please check your email, then visit the <a href="%s">login page</a>.' ),
223
  wp_login_url()
224
  ),
225
  'message'
53
  $nonce_value = wp_unslash($_POST['blocksy-lostpassword-nonce']);
54
  }
55
 
56
+ if (!wp_verify_nonce($nonce_value, 'blocksy-lostpassword')) {
57
  wp_send_json_error([]);
58
  exit;
59
  }
61
  if (class_exists('WC_Shortcode_My_Account')) {
62
  $success = \WC_Shortcode_My_Account::retrieve_password();
63
 
64
+ if (!$success) {
65
  $errors = new \WP_Error();
66
  $notices = wc_get_notices();
67
 
79
  }
80
  } else {
81
  $errors = retrieve_password();
82
+ $success = !is_wp_error($errors);
83
  }
84
 
85
  if ($success) {
119
 
120
  login_header(
121
  __('Lost Password'),
122
+ '<p class="message">' . __('Please enter your username or email address. You will receive an email message with instructions on how to reset your password.') . '</p>',
123
  $errors
124
  );
125
  }
138
  $users_can_register = true;
139
  }
140
 
141
+ if (!$users_can_register) {
142
  exit;
143
  }
144
 
167
  $nonce_value = wp_unslash($_POST['blocksy-register-nonce']);
168
  }
169
 
170
+ if (!wp_verify_nonce($nonce_value, 'blocksy-register')) {
171
  wp_send_json_error([]);
172
  exit;
173
  }
187
  wc_clean($user_login),
188
  $user_pass
189
  );
190
+
191
+ if (
192
+ ! is_wp_error($errors)
193
+ &&
194
+ apply_filters(
195
+ 'woocommerce_registration_auth_new_customer',
196
+ true,
197
+ $errors
198
+ )
199
+ &&
200
+ isset($_POST['role'])
201
+ &&
202
+ $_POST['role'] === 'seller'
203
+ ) {
204
+ ob_start();
205
+ wc_set_customer_auth_cookie($errors);
206
+ ob_clean();
207
+ }
208
  } else {
209
  $errors = register_new_user($user_login, $user_email);
210
  }
221
  wp_login_url()
222
  );
223
 
224
+ if ('yes' === get_option('woocommerce_registration_generate_password')) {
225
  $error_message = sprintf(
226
  __(
227
  'Your account was created successfully and a password has been sent to your email address. Please visit the <a href="%s">login page</a>.',
237
  'registered',
238
  sprintf(
239
  /* translators: %s: Link to the login page. */
240
+ __('Registration complete. Please check your email, then visit the <a href="%s">login page</a>.'),
241
  wp_login_url()
242
  ),
243
  'message'
framework/features/header.php CHANGED
@@ -23,6 +23,15 @@ class HeaderAdditions {
23
  50
24
  );
25
 
 
 
 
 
 
 
 
 
 
26
  add_filter('blocksy:header:selective_refresh', function ($selective_refresh) {
27
 
28
  $selective_refresh[] = [
@@ -59,7 +68,7 @@ class HeaderAdditions {
59
  add_filter('blocksy:header:device-wrapper-attr', function ($attr, $device) {
60
  $transparent_result = $this->current_screen_has_transparent();
61
 
62
- if (! $transparent_result) {
63
  return $attr;
64
  }
65
 
@@ -80,7 +89,7 @@ class HeaderAdditions {
80
  add_filter('blocksy:header:row-wrapper-attr', function ($attr, $row, $device) {
81
  $current_section = blocksy_manager()->header_builder->get_current_section();
82
 
83
- if (! isset($current_section['settings'])) {
84
  $current_section['settings'] = [];
85
  }
86
 
@@ -102,11 +111,11 @@ class HeaderAdditions {
102
  function ($custom_content, $rows, $device) {
103
  $sticky_result = $this->current_screen_has_sticky();
104
 
105
- if (! $sticky_result) {
106
  return $custom_content;
107
  }
108
 
109
- if (! in_array($device, $sticky_result['devices'])) {
110
  return $custom_content;
111
  }
112
 
@@ -118,8 +127,7 @@ class HeaderAdditions {
118
  if (
119
  $sticky_result['behaviour'] === 'top_middle'
120
  &&
121
- (
122
- isset($rows['top-row'])
123
  ||
124
  isset($rows['middle-row'])
125
  )
@@ -142,8 +150,7 @@ class HeaderAdditions {
142
  if (
143
  $sticky_result['behaviour'] === 'middle_bottom'
144
  &&
145
- (
146
- isset($rows['middle-row'])
147
  ||
148
  isset($rows['bottom-row'])
149
  )
@@ -198,7 +205,8 @@ class HeaderAdditions {
198
 
199
  return null;
200
  },
201
- 10, 3
 
202
  );
203
 
204
  add_filter('blocksy:general:body-header-attr', function ($attr) {
@@ -219,9 +227,7 @@ class HeaderAdditions {
219
  $check_transparent_conditions = false;
220
 
221
  if (isset($args['check_transparent_conditions'])) {
222
- $check_transparent_conditions = $args[
223
- 'check_transparent_conditions'
224
- ];
225
  }
226
 
227
  $args['has_transparent_header'] = $this->current_screen_has_transparent(
@@ -245,24 +251,36 @@ class HeaderAdditions {
245
  'fn' => 'blocksy_get_options',
246
  'default' => 'array'
247
  ],
248
- dirname( __FILE__ ) . '/header/header-options.php',
249
- [], false
 
250
  );
251
 
252
  return $opt;
253
  });
254
 
255
- add_filter('blocksy:footer:offcanvas-drawer', function ($els) {
256
- if ($this->has_account_modal()) {
257
- $els[] = $this->retrieve_account_modal();
258
- }
259
 
260
- return $els;
261
- });
 
 
 
 
 
 
 
 
 
 
 
262
  }
263
 
264
  public function enqueue_static() {
265
- if (! function_exists('get_plugin_data')) {
266
  require_once(ABSPATH . 'wp-admin/includes/plugin.php');
267
  }
268
 
@@ -322,13 +340,13 @@ class HeaderAdditions {
322
  ||
323
  $this->has_transparent_header === '__DEFAULT__'
324
  ||
325
- ! $check_conditions
326
  ) {
327
  $current_section = blocksy_manager()->header_builder->get_current_section(
328
  $current_section_id
329
  );
330
 
331
- if (! isset($current_section['settings'])) {
332
  $current_section['settings'] = [];
333
  }
334
 
@@ -352,7 +370,7 @@ class HeaderAdditions {
352
  $transparent_result = [];
353
 
354
  foreach ($transparent_behaviour as $device => $value) {
355
- if (! $value) {
356
  continue;
357
  }
358
 
@@ -367,8 +385,7 @@ class HeaderAdditions {
367
  count($transparent_result) > 0
368
  &&
369
  (
370
- (
371
- $current_section['id'] === 'type-1'
372
  &&
373
  $conditions_manager->condition_matches(blocksy_akg(
374
  'transparent_conditions',
@@ -399,7 +416,7 @@ class HeaderAdditions {
399
  ||
400
  $current_section['id'] !== 'type-1'
401
  ||
402
- ! $check_conditions
403
  )
404
  &&
405
  apply_filters(
@@ -420,7 +437,7 @@ class HeaderAdditions {
420
  if (
421
  $this->has_sticky_header !== '__DEFAULT__'
422
  &&
423
- ! $section_id
424
  ) {
425
  return $this->has_sticky_header;
426
  }
@@ -429,7 +446,7 @@ class HeaderAdditions {
429
  $section_id
430
  );
431
 
432
- if (! isset($current_section['settings'])) {
433
  $current_section['settings'] = [];
434
  }
435
 
@@ -465,7 +482,7 @@ class HeaderAdditions {
465
  ];
466
 
467
  foreach ($sticky_behaviour as $device => $value) {
468
- if (! $value) {
469
  continue;
470
  }
471
 
@@ -488,12 +505,10 @@ class HeaderAdditions {
488
 
489
  foreach ($particular_conditions as $nested_index => $single_particular_condition) {
490
  if (
491
- (
492
- $single_particular_condition['rule'] === 'page_ids'
493
  ||
494
  $single_particular_condition['rule'] === 'post_ids'
495
- ) && (
496
- isset($single_particular_condition['payload'])
497
  &&
498
  isset($single_particular_condition['payload']['post_id'])
499
  &&
@@ -514,11 +529,11 @@ class HeaderAdditions {
514
  $section_value = blocksy_manager()->header_builder->get_section_value();
515
 
516
  foreach ($section_value['sections'] as $index => $current_section) {
517
- if (! isset($current_section['settings'])) {
518
  continue;
519
  }
520
 
521
- if (! isset($current_section['settings']['transparent_conditions'])) {
522
  continue;
523
  }
524
 
@@ -526,12 +541,10 @@ class HeaderAdditions {
526
  $particular_conditions = $single_condition;
527
 
528
  if (
529
- (
530
- $single_condition['rule'] === 'page_ids'
531
  ||
532
  $single_condition['rule'] === 'post_ids'
533
- ) && (
534
- isset($single_condition['payload'])
535
  &&
536
  isset($single_condition['payload']['post_id'])
537
  &&
@@ -543,9 +556,7 @@ class HeaderAdditions {
543
  $single_condition['payload']['post_id'] = $post_id;
544
  }
545
 
546
- $section_value['sections'][$index]['settings'][
547
- 'transparent_conditions'
548
- ][$cond_index] = $single_condition;
549
  }
550
  }
551
 
@@ -607,7 +618,7 @@ class HeaderAdditions {
607
  return true;
608
  }
609
 
610
- if (! class_exists('Blocksy_Header_Builder_Render')) {
611
  return false;
612
  }
613
 
@@ -622,7 +633,7 @@ class HeaderAdditions {
622
 
623
  $render = new \Blocksy_Header_Builder_Render();
624
 
625
- if (! $render->contains_item('account')) {
626
  $this->has_account_modal = false;
627
  return false;
628
  }
@@ -638,4 +649,3 @@ class HeaderAdditions {
638
  return true;
639
  }
640
  }
641
-
23
  50
24
  );
25
 
26
+ add_action('plugins_loaded', function () {
27
+ if (function_exists('dokan')) {
28
+ add_action('wp_enqueue_scripts', function () {
29
+ wp_enqueue_script('dokan-form-validate');
30
+ wp_enqueue_script('dokan-vendor-registration');
31
+ });
32
+ }
33
+ });
34
+
35
  add_filter('blocksy:header:selective_refresh', function ($selective_refresh) {
36
 
37
  $selective_refresh[] = [
68
  add_filter('blocksy:header:device-wrapper-attr', function ($attr, $device) {
69
  $transparent_result = $this->current_screen_has_transparent();
70
 
71
+ if (!$transparent_result) {
72
  return $attr;
73
  }
74
 
89
  add_filter('blocksy:header:row-wrapper-attr', function ($attr, $row, $device) {
90
  $current_section = blocksy_manager()->header_builder->get_current_section();
91
 
92
+ if (!isset($current_section['settings'])) {
93
  $current_section['settings'] = [];
94
  }
95
 
111
  function ($custom_content, $rows, $device) {
112
  $sticky_result = $this->current_screen_has_sticky();
113
 
114
+ if (!$sticky_result) {
115
  return $custom_content;
116
  }
117
 
118
+ if (!in_array($device, $sticky_result['devices'])) {
119
  return $custom_content;
120
  }
121
 
127
  if (
128
  $sticky_result['behaviour'] === 'top_middle'
129
  &&
130
+ (isset($rows['top-row'])
 
131
  ||
132
  isset($rows['middle-row'])
133
  )
150
  if (
151
  $sticky_result['behaviour'] === 'middle_bottom'
152
  &&
153
+ (isset($rows['middle-row'])
 
154
  ||
155
  isset($rows['bottom-row'])
156
  )
205
 
206
  return null;
207
  },
208
+ 10,
209
+ 3
210
  );
211
 
212
  add_filter('blocksy:general:body-header-attr', function ($attr) {
227
  $check_transparent_conditions = false;
228
 
229
  if (isset($args['check_transparent_conditions'])) {
230
+ $check_transparent_conditions = $args['check_transparent_conditions'];
 
 
231
  }
232
 
233
  $args['has_transparent_header'] = $this->current_screen_has_transparent(
251
  'fn' => 'blocksy_get_options',
252
  'default' => 'array'
253
  ],
254
+ dirname(__FILE__) . '/header/header-options.php',
255
+ [],
256
+ false
257
  );
258
 
259
  return $opt;
260
  });
261
 
262
+ add_filter(
263
+ 'blocksy:footer:offcanvas-drawer',
264
+ function ($els) {
265
+ global $blocksy_has_default_header;
266
 
267
+ if (
268
+ isset($blocksy_has_default_header)
269
+ &&
270
+ $blocksy_has_default_header
271
+ &&
272
+ $this->has_account_modal()
273
+ ) {
274
+ $els[] = $this->retrieve_account_modal();
275
+ }
276
+
277
+ return $els;
278
+ }
279
+ );
280
  }
281
 
282
  public function enqueue_static() {
283
+ if (!function_exists('get_plugin_data')) {
284
  require_once(ABSPATH . 'wp-admin/includes/plugin.php');
285
  }
286
 
340
  ||
341
  $this->has_transparent_header === '__DEFAULT__'
342
  ||
343
+ !$check_conditions
344
  ) {
345
  $current_section = blocksy_manager()->header_builder->get_current_section(
346
  $current_section_id
347
  );
348
 
349
+ if (!isset($current_section['settings'])) {
350
  $current_section['settings'] = [];
351
  }
352
 
370
  $transparent_result = [];
371
 
372
  foreach ($transparent_behaviour as $device => $value) {
373
+ if (!$value) {
374
  continue;
375
  }
376
 
385
  count($transparent_result) > 0
386
  &&
387
  (
388
+ ($current_section['id'] === 'type-1'
 
389
  &&
390
  $conditions_manager->condition_matches(blocksy_akg(
391
  'transparent_conditions',
416
  ||
417
  $current_section['id'] !== 'type-1'
418
  ||
419
+ !$check_conditions
420
  )
421
  &&
422
  apply_filters(
437
  if (
438
  $this->has_sticky_header !== '__DEFAULT__'
439
  &&
440
+ !$section_id
441
  ) {
442
  return $this->has_sticky_header;
443
  }
446
  $section_id
447
  );
448
 
449
+ if (!isset($current_section['settings'])) {
450
  $current_section['settings'] = [];
451
  }
452
 
482
  ];
483
 
484
  foreach ($sticky_behaviour as $device => $value) {
485
+ if (!$value) {
486
  continue;
487
  }
488
 
505
 
506
  foreach ($particular_conditions as $nested_index => $single_particular_condition) {
507
  if (
508
+ ($single_particular_condition['rule'] === 'page_ids'
 
509
  ||
510
  $single_particular_condition['rule'] === 'post_ids'
511
+ ) && (isset($single_particular_condition['payload'])
 
512
  &&
513
  isset($single_particular_condition['payload']['post_id'])
514
  &&
529
  $section_value = blocksy_manager()->header_builder->get_section_value();
530
 
531
  foreach ($section_value['sections'] as $index => $current_section) {
532
+ if (!isset($current_section['settings'])) {
533
  continue;
534
  }
535
 
536
+ if (!isset($current_section['settings']['transparent_conditions'])) {
537
  continue;
538
  }
539
 
541
  $particular_conditions = $single_condition;
542
 
543
  if (
544
+ ($single_condition['rule'] === 'page_ids'
 
545
  ||
546
  $single_condition['rule'] === 'post_ids'
547
+ ) && (isset($single_condition['payload'])
 
548
  &&
549
  isset($single_condition['payload']['post_id'])
550
  &&
556
  $single_condition['payload']['post_id'] = $post_id;
557
  }
558
 
559
+ $section_value['sections'][$index]['settings']['transparent_conditions'][$cond_index] = $single_condition;
 
 
560
  }
561
  }
562
 
618
  return true;
619
  }
620
 
621
+ if (!class_exists('Blocksy_Header_Builder_Render')) {
622
  return false;
623
  }
624
 
633
 
634
  $render = new \Blocksy_Header_Builder_Render();
635
 
636
+ if (!$render->contains_item('account')) {
637
  $this->has_account_modal = false;
638
  return false;
639
  }
649
  return true;
650
  }
651
  }
 
framework/features/header/modal/register.php CHANGED
@@ -47,34 +47,34 @@ if (
47
  </p>
48
  <?php } ?>
49
 
50
- <?php if (\Blocksy\Plugin::instance()->account_auth->has_woo_register_flow() && ! $has_password) { ?>
51
- <p>
52
- <?php echo __('A link to set a new password will be sent to your email address.', 'blocksy-companion') ?>
53
- </p>
54
  <?php } ?>
55
 
56
  <?php
57
- if (function_exists('blc_fs') && blc_fs()->can_use_premium_code()) {
58
- if (class_exists('NextendSocialLogin')) {
59
- \NextendSocialLogin::addRegisterFormButtons();
60
- }
61
  }
 
62
 
63
- if (class_exists('LoginNocaptcha')) {
64
- remove_action(
65
- 'woocommerce_register_form',
66
- array('LoginNocaptcha', 'nocaptcha_form')
67
- );
68
- }
69
 
70
- do_action('register_form');
71
- do_action('woocommerce_register_form');
72
  ?>
73
 
74
- <?php if (! \Blocksy\Plugin::instance()->account_auth->has_woo_register_flow()) { ?>
75
- <p id="reg_passmail">
76
- <?php echo __('Registration confirmation will be emailed to you.', 'blocksy-companion') ?>
77
- </p>
78
  <?php } ?>
79
 
80
  <p>
@@ -82,19 +82,24 @@ if (
82
  <?php echo __('Register', 'blocksy-companion') ?>
83
 
84
  <svg width="23" height="23" viewBox="0 0 40 40">
85
- <path opacity=".2" fill="currentColor" d="M20.201 5.169c-8.254 0-14.946 6.692-14.946 14.946 0 8.255 6.692 14.946 14.946 14.946s14.946-6.691 14.946-14.946c-.001-8.254-6.692-14.946-14.946-14.946zm0 26.58c-6.425 0-11.634-5.208-11.634-11.634 0-6.425 5.209-11.634 11.634-11.634 6.425 0 11.633 5.209 11.633 11.634 0 6.426-5.208 11.634-11.633 11.634z"/>
86
 
87
  <path fill="currentColor" d="m26.013 10.047 1.654-2.866a14.855 14.855 0 0 0-7.466-2.012v3.312c2.119 0 4.1.576 5.812 1.566z">
88
- <animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="1s" repeatCount="indefinite"/>
89
  </path>
90
  </svg>
91
  </button>
92
 
93
- <!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
 
 
 
 
 
 
94
  </p>
95
 
96
  <?php do_action('blocksy:account:modal:register:end'); ?>
97
  <?php do_action('woocommerce_register_form_end') ?>
98
  <?php wp_nonce_field('blocksy-register', 'blocksy-register-nonce'); ?>
99
  </form>
100
-
47
  </p>
48
  <?php } ?>
49
 
50
+ <?php if (\Blocksy\Plugin::instance()->account_auth->has_woo_register_flow() && !$has_password) { ?>
51
+ <p>
52
+ <?php echo __('A link to set a new password will be sent to your email address.', 'blocksy-companion') ?>
53
+ </p>
54
  <?php } ?>
55
 
56
  <?php
57
+ if (function_exists('blc_fs') && blc_fs()->can_use_premium_code()) {
58
+ if (class_exists('NextendSocialLogin')) {
59
+ \NextendSocialLogin::addRegisterFormButtons();
 
60
  }
61
+ }
62
 
63
+ if (class_exists('LoginNocaptcha')) {
64
+ remove_action(
65
+ 'woocommerce_register_form',
66
+ array('LoginNocaptcha', 'nocaptcha_form')
67
+ );
68
+ }
69
 
70
+ do_action('register_form');
71
+ do_action('woocommerce_register_form');
72
  ?>
73
 
74
+ <?php if (!\Blocksy\Plugin::instance()->account_auth->has_woo_register_flow()) { ?>
75
+ <p id="reg_passmail">
76
+ <?php echo __('Registration confirmation will be emailed to you.', 'blocksy-companion') ?>
77
+ </p>
78
  <?php } ?>
79
 
80
  <p>
82
  <?php echo __('Register', 'blocksy-companion') ?>
83
 
84
  <svg width="23" height="23" viewBox="0 0 40 40">
85
+ <path opacity=".2" fill="currentColor" d="M20.201 5.169c-8.254 0-14.946 6.692-14.946 14.946 0 8.255 6.692 14.946 14.946 14.946s14.946-6.691 14.946-14.946c-.001-8.254-6.692-14.946-14.946-14.946zm0 26.58c-6.425 0-11.634-5.208-11.634-11.634 0-6.425 5.209-11.634 11.634-11.634 6.425 0 11.633 5.209 11.633 11.634 0 6.426-5.208 11.634-11.633 11.634z" />
86
 
87
  <path fill="currentColor" d="m26.013 10.047 1.654-2.866a14.855 14.855 0 0 0-7.466-2.012v3.312c2.119 0 4.1.576 5.812 1.566z">
88
+ <animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="1s" repeatCount="indefinite" />
89
  </path>
90
  </svg>
91
  </button>
92
 
93
+ <?php if (
94
+ \Blocksy\Plugin::instance()->account_auth->has_woo_register_flow()
95
+ &&
96
+ function_exists('dokan')
97
+ ) { ?>
98
+ <input type="hidden" name="redirect_to" value="<?php echo apply_filters('dokan_seller_setup_wizard_url', site_url('?page=dokan-seller-setup')) ?>">
99
+ <?php } ?>
100
  </p>
101
 
102
  <?php do_action('blocksy:account:modal:register:end'); ?>
103
  <?php do_action('woocommerce_register_form_end') ?>
104
  <?php wp_nonce_field('blocksy-register', 'blocksy-register-nonce'); ?>
105
  </form>
 
framework/theme-integration.php CHANGED
@@ -48,7 +48,7 @@ class ThemeIntegration {
48
  'Please enter a stronger password.',
49
  'woocommerce'
50
  ),
51
- 'i18n_password_hint' => esc_attr( wp_get_password_hint() ),
52
  ]
53
  ],
54
 
48
  'Please enter a stronger password.',
49
  'woocommerce'
50
  ),
51
+ 'i18n_password_hint' => addslashes(wp_get_password_hint()),
52
  ]
53
  ],
54
 
languages/blocksy-companion.pot CHANGED
@@ -7,7 +7,7 @@ msgstr ""
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
- "POT-Creation-Date: 2022-10-20 17:30+0000\n"
11
  "Project-Id-Version: undefined\n"
12
  "X-Poedit-Basepath: ..\n"
13
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;"
@@ -212,27 +212,27 @@ msgid ""
212
  msgstr ""
213
 
214
  #: framework/features/account-auth.php:104,
215
- #: framework/features/account-auth.php:232
216
  msgid "Check your email"
217
  msgstr ""
218
 
219
- #: framework/features/account-auth.php:199
220
  msgid ""
221
  "Your account was created successfully. Your login details have been sent to "
222
  "your email address. Please visit the <a href=\"%s\">login page</a>."
223
  msgstr ""
224
 
225
- #: framework/features/account-auth.php:208
226
  msgid ""
227
  "Your account was created successfully and a password has been sent to your "
228
  "email address. Please visit the <a href=\"%s\">login page</a>."
229
  msgstr ""
230
 
231
- #: framework/features/account-auth.php:238
232
  msgid "Registration Form"
233
  msgstr ""
234
 
235
- #: framework/features/account-auth.php:239
236
  msgid "Register For This Site"
237
  msgstr ""
238
 
@@ -1982,7 +1982,6 @@ msgid "Icon"
1982
  msgstr ""
1983
 
1984
  #: framework/premium/features/premium-header.php:217,
1985
- #: framework/premium/extensions/mega-menu/options.php:441,
1986
  #: framework/premium/extensions/woocommerce-extra/extension.php:397,
1987
  #: framework/extensions/widgets/widgets/ct-contact-info/options.php:489,
1988
  #: framework/extensions/widgets/widgets/ct-socials/options.php:92,
@@ -2330,6 +2329,15 @@ msgstr ""
2330
  msgid "Label Link"
2331
  msgstr ""
2332
 
 
 
 
 
 
 
 
 
 
2333
  #: framework/premium/extensions/mega-menu/options.php:491,
2334
  #: framework/premium/extensions/mega-menu/options.php:812
2335
  msgid "Menu Badge Settings"
@@ -2610,14 +2618,6 @@ msgstr ""
2610
  msgid "Bottom"
2611
  msgstr ""
2612
 
2613
- #: framework/premium/extensions/shortcuts/customizer.php:672,
2614
- #: framework/features/header/items/account/options.php:258,
2615
- #: framework/features/header/items/account/options.php:499,
2616
- #: framework/features/header/items/account/options.php:555,
2617
- #: framework/premium/extensions/woocommerce-extra/header-items/wish-list/options.php:74
2618
- msgid "Icon Size"
2619
- msgstr ""
2620
-
2621
  #: framework/premium/extensions/shortcuts/customizer.php:682
2622
  msgid "Container Height"
2623
  msgstr ""
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
+ "POT-Creation-Date: 2022-10-27 19:55+0000\n"
11
  "Project-Id-Version: undefined\n"
12
  "X-Poedit-Basepath: ..\n"
13
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;"
212
  msgstr ""
213
 
214
  #: framework/features/account-auth.php:104,
215
+ #: framework/features/account-auth.php:250
216
  msgid "Check your email"
217
  msgstr ""
218
 
219
+ #: framework/features/account-auth.php:217
220
  msgid ""
221
  "Your account was created successfully. Your login details have been sent to "
222
  "your email address. Please visit the <a href=\"%s\">login page</a>."
223
  msgstr ""
224
 
225
+ #: framework/features/account-auth.php:226
226
  msgid ""
227
  "Your account was created successfully and a password has been sent to your "
228
  "email address. Please visit the <a href=\"%s\">login page</a>."
229
  msgstr ""
230
 
231
+ #: framework/features/account-auth.php:256
232
  msgid "Registration Form"
233
  msgstr ""
234
 
235
+ #: framework/features/account-auth.php:257
236
  msgid "Register For This Site"
237
  msgstr ""
238
 
1982
  msgstr ""
1983
 
1984
  #: framework/premium/features/premium-header.php:217,
 
1985
  #: framework/premium/extensions/woocommerce-extra/extension.php:397,
1986
  #: framework/extensions/widgets/widgets/ct-contact-info/options.php:489,
1987
  #: framework/extensions/widgets/widgets/ct-socials/options.php:92,
2329
  msgid "Label Link"
2330
  msgstr ""
2331
 
2332
+ #: framework/premium/extensions/mega-menu/options.php:441,
2333
+ #: framework/premium/extensions/shortcuts/customizer.php:672,
2334
+ #: framework/features/header/items/account/options.php:258,
2335
+ #: framework/features/header/items/account/options.php:499,
2336
+ #: framework/features/header/items/account/options.php:555,
2337
+ #: framework/premium/extensions/woocommerce-extra/header-items/wish-list/options.php:74
2338
+ msgid "Icon Size"
2339
+ msgstr ""
2340
+
2341
  #: framework/premium/extensions/mega-menu/options.php:491,
2342
  #: framework/premium/extensions/mega-menu/options.php:812
2343
  msgid "Menu Badge Settings"
2618
  msgid "Bottom"
2619
  msgstr ""
2620
 
 
 
 
 
 
 
 
 
2621
  #: framework/premium/extensions/shortcuts/customizer.php:682
2622
  msgid "Container Height"
2623
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
5
  Tested up to: 6.0
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
- Stable tag: 1.8.53
9
 
10
  == Description ==
11
 
@@ -23,6 +23,11 @@ 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.8.53: 2022-10-20
27
  - Improvement: Account modal show password strength in Sign Up tab
28
  - Fix: Cookies consent decline button is not translatable
5
  Tested up to: 6.0
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ Stable tag: 1.8.54
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.54: 2022-10-27
27
+ - Improvement: Sticky header makes floating cart cut off under some specific circumstances
28
+ - Improvement: Ensure special characters in localize data is correctly sanitized
29
+ - Improvement: Better integration with Dokan plugin and account modal extension
30
+
31
  1.8.53: 2022-10-20
32
  - Improvement: Account modal show password strength in Sign Up tab
33
  - Fix: Cookies consent decline button is not translatable
static/bundle/account-lazy.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/account.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.ctEvents,r=e.n(t),o=window.ctFrontend;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},n(e)}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(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 c(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 i=function(e){a(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.classList.contains("anr_captcha_field")?grecaptcha.reset(parseFloat(e.firstElementChild.id.replace("anr_captcha_field_",""))-1):grecaptcha.reset(e.gID)}))},s=function(e){return new Promise((function(t){(function(e,t){return!(!window.WFLSVars||!parseInt(WFLSVars.useCAPTCHA)||(function(e,t){var r=function(e){var t=jQuery();return a(e.querySelectorAll("input")).map((function(e){t=t.add(e)})),t}(t);if("object"===("undefined"==typeof grecaptcha?"undefined":n(grecaptcha)))grecaptcha.ready((function(){grecaptcha.execute(WFLSVars.recaptchasitekey,{action:"login"}).then((function(t){var o=jQuery("#wfls-captcha-token");o.length?o.val(t):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val(t),r.parent().append(o)),"function"==typeof e&&e(!0)}))}));else{var o=jQuery("#wfls-captcha-token");o.length?o.val("grecaptcha-missing"):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val("grecaptcha-missing"),r.parent().append(o)),"function"==typeof e&&e(!0)}}((function(){return e()}),t),0))})(t,e)||t()}))},l=window.jQuery,u=e.n(l);function f(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 d=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.add("ct-loading")},m=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.remove("ct-loading")},p=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),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-form-notification");n&&n.remove();var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification-error");c&&c.remove(),function(e){a(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.gID||(e.innerHTML="",e.gID=grecaptcha.render(e))}))}(e)},h=function(e,t){var r=e.querySelector(".ct-form-notification-error");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification-error">'.concat(t,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")})))},y=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector("#login_error"),n="";return o&&(n=o.innerHTML),h(e,n),{hasError:!!o,doc:r}},g=function(e,t){var r=e.querySelector(".ct-form-notification");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification">'.concat(t,"</div>"))},w=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector(".message"),n="";return o&&(n=o.innerHTML),g(e,n),{doc:r}},v="";(0,o.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var n=t.event;if(n.preventDefault(),!v){var a=document.querySelector("#account-modal");if(!a)return void(location=document.querySelector('[data-id="account"]')?document.querySelector('[data-id="account"]').href:e.href);v=a.innerHTML,a.remove()}var c=document.querySelector(".ct-drawer-canvas").lastElementChild;c.id="account-modal";var l=ct_localizations.dynamic_styles_selectors.find((function(e){return c.matches(e.selector)})),b=function(){c.innerHTML=v,function(e){if(e&&!e.hasListeners){e.hasListeners=!0;var t=e.querySelector('[name="loginform"]'),o=e.querySelector('[name="registerform"]'),n=e.querySelector('[name="lostpasswordform"]');if(e.addEventListener("click",(function(r){r.target.href&&r.target.href.indexOf("lostpassword")>-1&&(p(e,{screen:"forgot-password"}),r.preventDefault()),r.target.href&&r.target.classList.contains("showlogin")&&(p(e,{screen:"login"}),r.preventDefault()),r.target.href&&(r.target.href.indexOf("wp-login")>-1||t&&r.target.href===t.action)&&-1===r.target.href.indexOf("lostpassword")&&(p(e,{screen:"login"}),r.preventDefault())}),!0),(c=e.querySelectorAll(".show-password-input"),function(e){if(Array.isArray(e))return f(e)}(c)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(c)||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.")}()).map((function(e){e.addEventListener("click",(function(t){e.previousElementSibling.type="password"===e.previousElementSibling.type?"text":"password"}))})),t&&t.addEventListener("submit",(function(e){if(e.preventDefault(),!window.ct_customizer_localizations){d(t);var r=new FormData(t),o="".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login");if(window.WFLSVars&&!t.loginProceed)return r.append("action","wordfence_ls_authenticate"),o=WFLSVars.ajaxurl,void s(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.json()})).then((function(e){m(t);var r=!!e.error,o=t.closest(".ct-login-form"),n=t.closest(".ct-login-form").querySelector("form");if(r&&h(o,e.error),e.message&&g(n,e.message),e.login)if(e.jwt){if(!jQuery("#wfls-token").length){var a=jQuery('<div id="wfls-prompt-overlay-blocksy"></div>'),c=jQuery('<div id="wfls-prompt-wrapper"></div>'),s=jQuery('<label for="wfls-token">2FA Code <a href="javascript:void(0)" class="wfls-2fa-code-help wfls-tooltip-trigger" title="The 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes."><i class="dashicons dashicons-editor-help"></i></a></label>'),l=jQuery('<input type="text" name="wfls-token" id="wfls-token" aria-describedby="wfls-token-error" class="input" value="" size="6" autocomplete="off"/>'),u=jQuery('<label for="wfls-remember-device"><input name="wfls-remember-device" type="checkbox" id="wfls-remember-device" class="ct-checkbox" value="1" /> Remember for 30 days</label>');c.append(s),c.append(l),parseInt(WFLSVars.allowremember)&&c.append(u),a.append(c),jQuery(n).prepend(a),new jQuery.Zebra_Tooltips(jQuery(".wfls-tooltip-trigger"))}var f=jQuery("#wfls-token-jwt");f.length||(f=jQuery('<input type="hidden" name="wfls-token-jwt" id="wfls-token-jwt" value=""/>'),jQuery("#wfls-prompt-overlay-blocksy").append(f)),jQuery("#wfls-token-jwt").val(e.jwt)}else fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}));e.combined&&(t.loginProceed=!0,fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}))),(!r||r&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}));s(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.text()})).then((function(e){m(t);var r=y(t.closest(".ct-login-form"),e),o=(r.doc,r.hasError);o||setTimeout((function(){location=t.querySelector('[name="redirect_to"]').value}),2e3),(!o||o&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}))}})),o){o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(d(o),s(o).then((function(){return fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=y(o.closest(".ct-register-form"),e),n=(t.doc,t.hasError);m(o),n||w(o.closest(".ct-register-form"),e),r().trigger("blocksy:account:register:".concat(n?"error":"success")),(!n||n&&-1===o.closest(".ct-register-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(o.closest(".ct-register-form"))}))})))}));var a=o.querySelector("#user_pass_register");a&&function(e){var t=function(){var t=e.closest("form");!function(e,t){var r=u()(e).find(".woocommerce-password-strength");""===u()(t).val()?(r.hide(),u()(document.body).trigger("wc-password-strength-hide")):0===r.length?(u()(t.nextElementSibling).after('<div class="woocommerce-password-strength" aria-live="polite"></div>'),u()(document.body).trigger("wc-password-strength-added")):(r.show(),u()(document.body).trigger("wc-password-strength-show"))}(t,e);var r=function(e,t){var r=u()(e).find(".woocommerce-password-strength"),o=u()(e).find(".woocommerce-password-hint"),n='<small class="woocommerce-password-hint">'+wc_password_strength_meter_params.i18n_password_hint+"</small>",a=wp.passwordStrength.meter(u()(t).val(),wp.passwordStrength.userInputDisallowedList()),c="";if(r.removeClass("short bad good strong"),o.remove(),r.is(":hidden"))return a;switch(a<wc_password_strength_meter_params.min_password_strength&&(c=" - "+wc_password_strength_meter_params.i18n_password_error),a){case 0:r.addClass("short").html(pwsL10n.short+c),r.after(n);break;case 1:case 2:r.addClass("bad").html(pwsL10n.bad+c),r.after(n);break;case 3:r.addClass("good").html(pwsL10n.good+c);break;case 4:r.addClass("strong").html(pwsL10n.strong+c);break;case 5:r.addClass("short").html(pwsL10n.mismatch)}return a}(t,e),o=u()(t).find('button[name="wp-submit"]');e.value.length>0&&r<wc_password_strength_meter_params.min_password_strength&&-1!==r?o.attr("disabled","disabled").addClass("disabled"):o.prop("disabled",!1).removeClass("disabled")};e.addEventListener("keyup",t),e.addEventListener("change",t)}(a)}n&&n.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(d(n),fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_lostpassword"),{method:n.method,body:new FormData(n)}).then((function(e){return e.text()})).then((function(e){var t=y(n.closest(".ct-forgot-password-form"),e),r=(t.doc,t.hasError);m(n),r||w(n.closest(".ct-forgot-password-form"),e),(!r||r&&-1===n.closest(".ct-forgot-password-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(n.closest(".ct-forgot-password-form"))})))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),p(e,{screen:t})})),r.addEventListener("keyup",(function(r){13===r.keyCode&&(r.preventDefault(),p(e,{screen:t}))}))}))}))}var c}(c),p(c,{screen:e.dataset.view||"login"}),window.anr_onloadCallback&&window.anr_onloadCallback(),r().trigger("ct:overlay:handle-click",{e:n,href:"#account-modal",options:{openStrategy:"skip",isModal:!0}})};l?(0,o.loadStyle)(l.url).then((function(){b()})):b()}}),r().on("ct:modal:closed",(function(e){e.closest("#account-modal")&&e.remove()}))}();
1
+ !function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.ctEvents,r=e.n(t),o=window.ctFrontend;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},n(e)}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(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 c(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 i=function(e){a(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.classList.contains("anr_captcha_field")?grecaptcha.reset(parseFloat(e.firstElementChild.id.replace("anr_captcha_field_",""))-1):grecaptcha.reset(e.gID)}))},s=function(e){return new Promise((function(t){(function(e,t){return!(!window.WFLSVars||!parseInt(WFLSVars.useCAPTCHA)||(function(e,t){var r=function(e){var t=jQuery();return a(e.querySelectorAll("input")).map((function(e){t=t.add(e)})),t}(t);if("object"===("undefined"==typeof grecaptcha?"undefined":n(grecaptcha)))grecaptcha.ready((function(){grecaptcha.execute(WFLSVars.recaptchasitekey,{action:"login"}).then((function(t){var o=jQuery("#wfls-captcha-token");o.length?o.val(t):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val(t),r.parent().append(o)),"function"==typeof e&&e(!0)}))}));else{var o=jQuery("#wfls-captcha-token");o.length?o.val("grecaptcha-missing"):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val("grecaptcha-missing"),r.parent().append(o)),"function"==typeof e&&e(!0)}}((function(){return e()}),t),0))})(t,e)||t()}))},l=window.jQuery,u=e.n(l);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 f=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.add("ct-loading")},m=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.remove("ct-loading")},p=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),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-form-notification");n&&n.remove();var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification-error");c&&c.remove(),function(e){a(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.gID||(e.innerHTML="",e.gID=grecaptcha.render(e))}))}(e)},h=function(e,t){var r=e.querySelector(".ct-form-notification-error");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification-error">'.concat(t,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")})))},y=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector("#login_error"),n="";return o&&(n=o.innerHTML),h(e,n),{hasError:!!o,doc:r}},w=function(e,t){var r=e.querySelector(".ct-form-notification");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification">'.concat(t,"</div>"))},g=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector(".message"),n="";return o&&(n=o.innerHTML),w(e,n),{doc:r}},v="";(0,o.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var n=t.event;if(n.preventDefault(),!v){var a=document.querySelector("#account-modal");if(!a)return void(location=document.querySelector('[data-id="account"]')?document.querySelector('[data-id="account"]').href:e.href);v=a.innerHTML,a.remove()}var c=document.querySelector(".ct-drawer-canvas").lastElementChild;c.id="account-modal";var l=ct_localizations.dynamic_styles_selectors.find((function(e){return c.matches(e.selector)})),b=function(){c.innerHTML=v,function(e){if(e&&!e.hasListeners){e.hasListeners=!0;var t=e.querySelector('[name="loginform"]'),o=e.querySelector('[name="registerform"]'),n=e.querySelector('[name="lostpasswordform"]');if(e.addEventListener("click",(function(r){r.target.href&&r.target.href.indexOf("lostpassword")>-1&&(p(e,{screen:"forgot-password"}),r.preventDefault()),r.target.href&&r.target.classList.contains("showlogin")&&(p(e,{screen:"login"}),r.preventDefault()),r.target.href&&(r.target.href.indexOf("wp-login")>-1||t&&r.target.href===t.action)&&-1===r.target.href.indexOf("lostpassword")&&(p(e,{screen:"login"}),r.preventDefault())}),!0),(c=e.querySelectorAll(".show-password-input"),function(e){if(Array.isArray(e))return d(e)}(c)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(c)||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.")}()).map((function(e){e.addEventListener("click",(function(t){e.previousElementSibling.type="password"===e.previousElementSibling.type?"text":"password"}))})),t&&t.addEventListener("submit",(function(e){if(e.preventDefault(),!window.ct_customizer_localizations){f(t);var r=new FormData(t),o="".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login");if(window.WFLSVars&&!t.loginProceed)return r.append("action","wordfence_ls_authenticate"),o=WFLSVars.ajaxurl,void s(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.json()})).then((function(e){m(t);var r=!!e.error,o=t.closest(".ct-login-form"),n=t.closest(".ct-login-form").querySelector("form");if(r&&h(o,e.error),e.message&&w(n,e.message),e.login)if(e.jwt){if(!jQuery("#wfls-token").length){var a=jQuery('<div id="wfls-prompt-overlay-blocksy"></div>'),c=jQuery('<div id="wfls-prompt-wrapper"></div>'),s=jQuery('<label for="wfls-token">2FA Code <a href="javascript:void(0)" class="wfls-2fa-code-help wfls-tooltip-trigger" title="The 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes."><i class="dashicons dashicons-editor-help"></i></a></label>'),l=jQuery('<input type="text" name="wfls-token" id="wfls-token" aria-describedby="wfls-token-error" class="input" value="" size="6" autocomplete="off"/>'),u=jQuery('<label for="wfls-remember-device"><input name="wfls-remember-device" type="checkbox" id="wfls-remember-device" class="ct-checkbox" value="1" /> Remember for 30 days</label>');c.append(s),c.append(l),parseInt(WFLSVars.allowremember)&&c.append(u),a.append(c),jQuery(n).prepend(a),new jQuery.Zebra_Tooltips(jQuery(".wfls-tooltip-trigger"))}var d=jQuery("#wfls-token-jwt");d.length||(d=jQuery('<input type="hidden" name="wfls-token-jwt" id="wfls-token-jwt" value=""/>'),jQuery("#wfls-prompt-overlay-blocksy").append(d)),jQuery("#wfls-token-jwt").val(e.jwt)}else fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}));e.combined&&(t.loginProceed=!0,fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}))),(!r||r&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}));s(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.text()})).then((function(e){m(t);var r=y(t.closest(".ct-login-form"),e),o=(r.doc,r.hasError);o||setTimeout((function(){location=t.querySelector('[name="redirect_to"]').value}),2e3),(!o||o&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}))}})),o){o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(f(o),s(o).then((function(){return fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=y(o.closest(".ct-register-form"),e),n=(t.doc,t.hasError);m(o),n||g(o.closest(".ct-register-form"),e),r().trigger("blocksy:account:register:".concat(n?"error":"success")),n||o.querySelector('[name="redirect_to"]')&&o.querySelector('[name="role"][value="seller"]:checked')&&(location=o.querySelector('[name="redirect_to"]').value),(!n||n&&-1===o.closest(".ct-register-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(o.closest(".ct-register-form"))}))})))}));var a=o.querySelector("#user_pass_register");a&&function(e){var t=function(){var t=e.closest("form");!function(e,t){var r=u()(e).find(".woocommerce-password-strength");""===u()(t).val()?(r.hide(),u()(document.body).trigger("wc-password-strength-hide")):0===r.length?(u()(t.nextElementSibling).after('<div class="woocommerce-password-strength" aria-live="polite"></div>'),u()(document.body).trigger("wc-password-strength-added")):(r.show(),u()(document.body).trigger("wc-password-strength-show"))}(t,e);var r=function(e,t){var r=u()(e).find(".woocommerce-password-strength"),o=u()(e).find(".woocommerce-password-hint"),n='<small class="woocommerce-password-hint">'+wc_password_strength_meter_params.i18n_password_hint+"</small>",a=wp.passwordStrength.meter(u()(t).val(),wp.passwordStrength.userInputDisallowedList()),c="";if(r.removeClass("short bad good strong"),o.remove(),r.is(":hidden"))return a;switch(a<wc_password_strength_meter_params.min_password_strength&&(c=" - "+wc_password_strength_meter_params.i18n_password_error),a){case 0:r.addClass("short").html(pwsL10n.short+c),r.after(n);break;case 1:case 2:r.addClass("bad").html(pwsL10n.bad+c),r.after(n);break;case 3:r.addClass("good").html(pwsL10n.good+c);break;case 4:r.addClass("strong").html(pwsL10n.strong+c);break;case 5:r.addClass("short").html(pwsL10n.mismatch)}return a}(t,e),o=u()(t).find('button[name="wp-submit"]');e.value.length>0&&r<wc_password_strength_meter_params.min_password_strength&&-1!==r?o.attr("disabled","disabled").addClass("disabled"):o.prop("disabled",!1).removeClass("disabled")};e.addEventListener("keyup",t),e.addEventListener("change",t)}(a)}n&&n.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(f(n),fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_lostpassword"),{method:n.method,body:new FormData(n)}).then((function(e){return e.text()})).then((function(e){var t=y(n.closest(".ct-forgot-password-form"),e),r=(t.doc,t.hasError);m(n),r||g(n.closest(".ct-forgot-password-form"),e),(!r||r&&-1===n.closest(".ct-forgot-password-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(n.closest(".ct-forgot-password-form"))})))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),p(e,{screen:t})})),r.addEventListener("keyup",(function(r){13===r.keyCode&&(r.preventDefault(),p(e,{screen:t}))}))}))}))}var c}(c),p(c,{screen:e.dataset.view||"login"}),window.anr_onloadCallback&&window.anr_onloadCallback(),window.Dokan_Vendor_Registration&&window.Dokan_Vendor_Registration.init(),r().trigger("ct:overlay:handle-click",{e:n,href:"#account-modal",options:{openStrategy:"skip",isModal:!0}})};l?(0,o.loadStyle)(l.url).then((function(){b()})):b()}}),r().on("ct:modal:closed",(function(e){e.closest("#account-modal")&&e.remove()}))}();
static/bundle/dashboard.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/options.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.53
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.54
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/sticky.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.ctEvents,n=t.n(e),r=window.ctFrontend,i=function(t,e,n){return Math.max(t,Math.min(e,n))},o=function(t,e,n){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(n-t[0])},a=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild;t.firstElementChild.firstElementChild&&(e=t.firstElementChild.firstElementChild);var n=e.getBoundingClientRect().height;return t.blcInitialHeight=n,n},c=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.blcStickyHeight)return t.blcStickyHeight;var n=a(t),r=getComputedStyle(t),i=getComputedStyle(t.firstElementChild);if(t.closest('[data-sticky*="yes"]')){var o=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);e||(o=0);var c=t.getBoundingClientRect().height-o;if(c!==n)return t.blcStickyHeight=t.getBoundingClientRect().height,c}var s=100;return t.dataset.row.includes("middle")&&(s=r.getPropertyValue("--sticky-shrink")),s&&(n*=parseFloat(s)/100),n},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return 0},e=document.querySelector(".ct-floating-bar");e&&e.style.setProperty("--header-sticky-height-animated",t())};function l(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}var u=null,d=function(){u=null},y=function(t){var e,n=t.stickyContainer,r=t.startPosition;(e=n.querySelectorAll('[data-row*="middle"]'),function(t){if(Array.isArray(t))return l(t)}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return l(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)?l(t,e):void 0}}(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.")}()).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=function(t){var e=t.logo,n=t.row;if(u)return u;var r=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),i=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),o=a(n),s=c(n);return u={initialHeight:r,stickyShrink:i,rowInitialHeight:o,rowStickyHeight:s}}({logo:e,row:t}),s=n.initialHeight,l=n.stickyShrink,d=n.rowInitialHeight,y=n.rowStickyHeight,f=s*l;1!==l&&e.style.setProperty("--logo-shrink-height","".concat(o([r,r+Math.abs(d===y?s-f:d-y)],[1,l],i(r,r+Math.abs(d===y?s-f:d-y),scrollY))*s,"px"))}}))},f=null,h=function(){f=null},m=function(t){var e=t.stickyContainer,n=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(f)return f;var n=a(e),r=c(e);return f={rowInitialHeight:n,rowStickyHeight:r}}({row:t}),r=e.rowInitialHeight,s=e.rowStickyHeight;if(r!==s){var l;l=o([n,n+Math.abs(r-s)],[r,s],i(n,n+Math.abs(r-s),scrollY)),t.style.setProperty("--shrink-height","".concat(l,"px"))}}))};function p(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return g(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)?g(t,e):void 0}}(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 g(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 k(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return v(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)?v(t,e):void 0}}(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 v(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}var b=function(t){var e=t.stickyContainer,n=k(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e,!1)}),0);return{stickyContainerHeight:n,stickyContainerHeightAbsolute:n+parseFloat(getComputedStyle(e).top)}},w=null;function S(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){if("string"==typeof t)return A(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)?A(t,e):void 0}}(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 n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function C(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return O(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)?O(t,e):void 0}}(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 O(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}var x=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}))},I=null,j=null,H=null,P=null;n().on("blocksy:sticky:compute",(function(){setTimeout((function(){h(),d(),I=null,j=null,H=null,P=null,Y=null,q()}),100)})),window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){h(),d(),I=null,j=null,H=null,P=null,Y=null,q()}),500)}));var Y=null,q=function(){if(Y!==scrollY){var t=document.querySelector('[data-device="'.concat((0,r.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=j;e||(e=j=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(e,"px"));var n=I;null===n&&(n=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.closest("header").getBoundingClientRect().top+scrollY;if(e>0){var n=document.elementFromPoint(0,3);n&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(n).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=n.getBoundingClientRect().height)}var r=t.parentNode,i=getComputedStyle(document.body),o=parseFloat(i.getPropertyValue("--header-sticky-offset")||0);if(o+=parseFloat(i.getPropertyValue("--frame-size"))||0,1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-o:e;var a=Array.from(r.parentNode.children).reduce((function(t,e,n){return t.indexOf(0)>-1||!e.dataset.row?[].concat(C(t),[0]):[].concat(C(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e);return a>0?a-o:a}(t),I=n);var i=H;null===i&&(i=t.closest("[data-device]").getBoundingClientRect().height,H=i);var o=P,a=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t}));o||(o=parseInt(t.getBoundingClientRect().height),P=parseInt(o),s((function(){return-1===a.indexOf("auto-hide")?"".concat(C(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e)}),0),"px"):"0px"})));var l=n>0&&Math.abs(window.scrollY-n)<5||window.scrollY>n;a.indexOf("shrink")>-1&&(l=n>0?window.scrollY>=n:window.scrollY>0),setTimeout((function(){l&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!l&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var u=scrollY;a.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,n=t.stickyContainer,r=t.isSticky,i=t.startPosition,o=t.stickyComponents;if(0===i&&0===window.scrollY&&(n.dataset.sticky=["fixed"].concat(p(o)).join(":")),r){if(o.indexOf("yes")>-1)return;-1===n.dataset.sticky.indexOf("yes")&&(x(n,"no"),n.dataset.sticky=["yes"].concat(p(o)).join(":")),y({stickyContainer:n,startPosition:i}),m({stickyContainer:n,containerInitialHeight:e,startPosition:i})}else Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),x(n,"yes"),0===i&&window.scrollY<=0?n.dataset.sticky=["fixed"].concat(p(o)).join(":"):n.dataset.sticky=o.join(":")}({stickyContainer:t,stickyContainerHeight:o,containerInitialHeight:e,isSticky:l,startPosition:n,stickyComponents:a}),a.indexOf("auto-hide")>-1&&function(t){var e=t.currentScrollY,n=t.stickyContainer,r=t.containerInitialHeight,i=t.headerInitialHeight,o=t.startPosition,a=t.isSticky,c=t.stickyComponents;a&&e-t.prevScrollY==0&&s((function(){return"0px"})),a?-1===n.dataset.sticky.indexOf("yes")&&e>2*i+o&&(n.dataset.sticky=["yes"].concat(k(c)).join(":"),y({stickyContainer:n,startPosition:o}),m({stickyContainer:n,containerInitialHeight:r,startPosition:o}),x(n,"no"),document.body.removeAttribute("style")):(Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),n.dataset.sticky=k(c).join(":"),x(n,"yes"),s((function(){return"0px"})),w=null),null===w&&(w=1e3);var l=w+t.prevScrollY-e,u=0;if(e>2*i+o||n.dataset.sticky.indexOf("yes")>-1){if(e<=o)u=0;else if(e>t.prevScrollY){var d=b({stickyContainer:n}).stickyContainerHeightAbsolute;u=Math.abs(l)>d?-d:l}else u=l>0?0:l;n.style.transform="translateY(".concat(u,"px)"),w=u}else n.removeAttribute("style");n.dataset.sticky.indexOf("yes")>-1&&(e<=o||e>t.prevScrollY||(y({stickyContainer:n,startPosition:o}),m({stickyContainer:n,containerInitialHeight:r,startPosition:o}))),s((function(){var t=b({stickyContainer:n}).stickyContainerHeight;return"".concat(t-Math.abs(u),"px")}))}({stickyContainer:t,isSticky:l,startPosition:n,stickyComponents:a,containerInitialHeight:e,stickyContainerHeight:o,headerInitialHeight:i,currentScrollY:u,prevScrollY:Y}),(a.indexOf("slide")>-1||a.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,n=t.startPosition,r=t.stickyComponents;t.isSticky?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(S(r)).join(":"),setTimeout((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)}),1)),x(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(S(r)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:l,startPosition:n,stickyComponents:a}),Y=u}}},E=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){q(t),n().trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){q(t),n().trigger("ct:header:update")})),window.addEventListener("scroll",q,!1),window.addEventListener("load",q,!1),q())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){E()}),500):E(),(0,r.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}();
1
+ !function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.ctEvents,n=t.n(e),r=window.ctFrontend,i=function(t,e,n){return Math.max(t,Math.min(e,n))},o=function(t,e,n){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(n-t[0])},a=function(t){var e=getComputedStyle(t);return parseFloat(e.getPropertyValue("--height"))},c=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild;t.firstElementChild.firstElementChild&&(e=t.firstElementChild.firstElementChild);var n=e.getBoundingClientRect().height;return t.blcInitialHeight=n,n},s=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.blcStickyHeight)return t.blcStickyHeight;var n=c(t),r=getComputedStyle(t),i=getComputedStyle(t.firstElementChild);if(t.closest('[data-sticky*="yes"]')){var o=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);e||(o=0);var s=t.getBoundingClientRect().height-o;if(s!==n||n>a(t))return t.blcStickyHeight=t.getBoundingClientRect().height,s}var l=100;return t.dataset.row.includes("middle")&&(l=r.getPropertyValue("--sticky-shrink")),l&&(n*=parseFloat(l)/100),n},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return 0},e=document.querySelector(".ct-floating-bar");e&&e.style.setProperty("--header-sticky-height-animated",t())};function u(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}var d=null,y=function(){d=null},f=function(t){var e,n=t.stickyContainer,r=t.startPosition;(e=n.querySelectorAll('[data-row*="middle"]'),function(t){if(Array.isArray(t))return u(t)}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}(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.")}()).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=function(t){var e=t.logo,n=t.row;if(d)return d;var r=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),i=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),o=c(n),a=s(n);return d={initialHeight:r,stickyShrink:i,rowInitialHeight:o,rowStickyHeight:a}}({logo:e,row:t}),a=n.initialHeight,l=n.stickyShrink,u=n.rowInitialHeight,y=n.rowStickyHeight,f=a*l;1!==l&&e.style.setProperty("--logo-shrink-height","".concat(o([r,r+Math.abs(u===y?a-f:u-y)],[1,l],i(r,r+Math.abs(u===y?a-f:u-y),scrollY))*a,"px"))}}))},h=null,m=function(){h=null},p=function(t){var e=t.stickyContainer,n=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(h)return h;var n=c(e),r=s(e);return h={rowInitialHeight:n,rowStickyHeight:r}}({row:t}),r=e.rowInitialHeight,a=e.rowStickyHeight;if(r!==a){var l;l=o([n,n+Math.abs(r-a)],[r,a],i(n,n+Math.abs(r-a),scrollY)),t.style.setProperty("--shrink-height","".concat(l,"px"))}}))};function g(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}(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 k(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 v(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return b(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)?b(t,e):void 0}}(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 b(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}var w=function(t){var e=t.stickyContainer,n=v(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+s(e,!1)}),0);return{stickyContainerHeight:n,stickyContainerHeightAbsolute:n+parseFloat(getComputedStyle(e).top)}},S=null;function A(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)||function(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}}(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 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 O(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return x(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)?x(t,e):void 0}}(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 x(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}var I=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}))},j=null,H=null,P=null,q=null;n().on("blocksy:sticky:compute",(function(){setTimeout((function(){m(),y(),j=null,H=null,P=null,q=null,Y=null,E()}),100)})),window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){m(),y(),j=null,H=null,P=null,q=null,Y=null,E()}),500)}));var Y=null,E=function(){if(Y!==scrollY){var t=document.querySelector('[data-device="'.concat((0,r.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=H;e||(e=H=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(e,"px"));var n=j;null===n&&(n=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.closest("header").getBoundingClientRect().top+scrollY;if(e>0){var n=document.elementFromPoint(0,3);n&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(n).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=n.getBoundingClientRect().height)}var r=t.parentNode,i=getComputedStyle(document.body),o=parseFloat(i.getPropertyValue("--header-sticky-offset")||0);if(o+=parseFloat(i.getPropertyValue("--frame-size"))||0,1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-o:e;var a=Array.from(r.parentNode.children).reduce((function(t,e,n){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}),e);return a>0?a-o:a}(t),j=n);var i=P;null===i&&(i=t.closest("[data-device]").getBoundingClientRect().height,P=i);var o=q,c=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t}));o||(o=parseInt(t.getBoundingClientRect().height),q=parseInt(o),l((function(){return-1===c.indexOf("auto-hide")?o>O(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+a(e)}),0)?"".concat(o,"px"):"".concat(O(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+s(e)}),0),"px"):"0px"})));var u=n>0&&Math.abs(window.scrollY-n)<5||window.scrollY>n;c.indexOf("shrink")>-1&&(u=n>0?window.scrollY>=n:window.scrollY>0),setTimeout((function(){u&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!u&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var d=scrollY;c.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,n=t.stickyContainer,r=t.isSticky,i=t.startPosition,o=t.stickyComponents;if(0===i&&0===window.scrollY&&(n.dataset.sticky=["fixed"].concat(g(o)).join(":")),r){if(o.indexOf("yes")>-1)return;-1===n.dataset.sticky.indexOf("yes")&&(I(n,"no"),n.dataset.sticky=["yes"].concat(g(o)).join(":")),f({stickyContainer:n,startPosition:i}),p({stickyContainer:n,containerInitialHeight:e,startPosition:i})}else Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),I(n,"yes"),0===i&&window.scrollY<=0?n.dataset.sticky=["fixed"].concat(g(o)).join(":"):n.dataset.sticky=o.join(":")}({stickyContainer:t,stickyContainerHeight:o,containerInitialHeight:e,isSticky:u,startPosition:n,stickyComponents:c}),c.indexOf("auto-hide")>-1&&function(t){var e=t.currentScrollY,n=t.stickyContainer,r=t.containerInitialHeight,i=t.headerInitialHeight,o=t.startPosition,a=t.isSticky,c=t.stickyComponents;a&&e-t.prevScrollY==0&&l((function(){return"0px"})),a?-1===n.dataset.sticky.indexOf("yes")&&e>2*i+o&&(n.dataset.sticky=["yes"].concat(v(c)).join(":"),f({stickyContainer:n,startPosition:o}),p({stickyContainer:n,containerInitialHeight:r,startPosition:o}),I(n,"no"),document.body.removeAttribute("style")):(Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),n.dataset.sticky=v(c).join(":"),I(n,"yes"),l((function(){return"0px"})),S=null),null===S&&(S=1e3);var s=S+t.prevScrollY-e,u=0;if(e>2*i+o||n.dataset.sticky.indexOf("yes")>-1){if(e<=o)u=0;else if(e>t.prevScrollY){var d=w({stickyContainer:n}).stickyContainerHeightAbsolute;u=Math.abs(s)>d?-d:s}else u=s>0?0:s;n.style.transform="translateY(".concat(u,"px)"),S=u}else n.removeAttribute("style");n.dataset.sticky.indexOf("yes")>-1&&(e<=o||e>t.prevScrollY||(f({stickyContainer:n,startPosition:o}),p({stickyContainer:n,containerInitialHeight:r,startPosition:o}))),l((function(){var t=w({stickyContainer:n}).stickyContainerHeight;return"".concat(t-Math.abs(u),"px")}))}({stickyContainer:t,isSticky:u,startPosition:n,stickyComponents:c,containerInitialHeight:e,stickyContainerHeight:o,headerInitialHeight:i,currentScrollY:d,prevScrollY:Y}),(c.indexOf("slide")>-1||c.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,n=t.startPosition,r=t.stickyComponents;t.isSticky?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(A(r)).join(":"),setTimeout((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)}),1)),I(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),I(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(A(r)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),I(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:u,startPosition:n,stickyComponents:c}),Y=d}}},M=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){E(t),n().trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){E(t),n().trigger("ct:header:update")})),window.addEventListener("scroll",E,!1),window.addEventListener("load",E,!1),E())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){M()}),500):M(),(0,r.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}();
static/js/account.js CHANGED
@@ -44,6 +44,10 @@ registerDynamicChunk('blocksy_account', {
44
  window.anr_onloadCallback()
45
  }
46
 
 
 
 
 
47
  ctEvents.trigger('ct:overlay:handle-click', {
48
  e: event,
49
  href: '#account-modal',
44
  window.anr_onloadCallback()
45
  }
46
 
47
+ if (window.Dokan_Vendor_Registration) {
48
+ window.Dokan_Vendor_Registration.init()
49
+ }
50
+
51
  ctEvents.trigger('ct:overlay:handle-click', {
52
  e: event,
53
  href: '#account-modal',
static/js/frontend/account.js CHANGED
@@ -423,6 +423,21 @@ export const handleAccountModal = (el) => {
423
  }`
424
  )
425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  if (
427
  !hasError ||
428
  (hasError &&
423
  }`
424
  )
425
 
426
+ if (!hasError) {
427
+ if (
428
+ maybeRegister.querySelector(
429
+ '[name="redirect_to"]'
430
+ ) &&
431
+ maybeRegister.querySelector(
432
+ '[name="role"][value="seller"]:checked'
433
+ )
434
+ ) {
435
+ location = maybeRegister.querySelector(
436
+ '[name="redirect_to"]'
437
+ ).value
438
+ }
439
+ }
440
+
441
  if (
442
  !hasError ||
443
  (hasError &&
static/js/frontend/sticky.js CHANGED
@@ -7,6 +7,7 @@ import { computeFadeSlide } from './sticky/fade-slide'
7
 
8
  import {
9
  getRowStickyHeight,
 
10
  maybeSetStickyHeightAnimated,
11
  } from './sticky/shrink-utils'
12
 
@@ -204,10 +205,19 @@ const compute = () => {
204
 
205
  maybeSetStickyHeightAnimated(() => {
206
  return stickyComponents.indexOf('auto-hide') === -1
207
- ? `${[...stickyContainer.querySelectorAll('[data-row]')].reduce(
208
- (res, row) => res + getRowStickyHeight(row),
 
 
209
  0
210
- )}px`
 
 
 
 
 
 
 
211
  : '0px'
212
  })
213
  }
7
 
8
  import {
9
  getRowStickyHeight,
10
+ getRowInitialMinHeight,
11
  maybeSetStickyHeightAnimated,
12
  } from './sticky/shrink-utils'
13
 
205
 
206
  maybeSetStickyHeightAnimated(() => {
207
  return stickyComponents.indexOf('auto-hide') === -1
208
+ ? // case when content is forcing the initial height to be bigger
209
+ stickyContainerHeight >
210
+ [...stickyContainer.querySelectorAll('[data-row]')].reduce(
211
+ (res, row) => res + getRowInitialMinHeight(row),
212
  0
213
+ )
214
+ ? `${stickyContainerHeight}px`
215
+ : `${[
216
+ ...stickyContainer.querySelectorAll('[data-row]'),
217
+ ].reduce(
218
+ (res, row) => res + getRowStickyHeight(row),
219
+ 0
220
+ )}px`
221
  : '0px'
222
  })
223
  }
static/js/frontend/sticky/shrink-utils.js CHANGED
@@ -4,7 +4,7 @@ export const computeLinearScale = (domain, range, value) =>
4
  range[0] +
5
  ((range[1] - range[0]) / (domain[1] - domain[0])) * (value - domain[0])
6
 
7
- const getRowInitialMinHeight = (el) => {
8
  const elComp = getComputedStyle(el)
9
  return parseFloat(elComp.getPropertyValue('--height'))
10
  }
@@ -50,7 +50,11 @@ export const getRowStickyHeight = (el, hasBorder = true) => {
50
 
51
  let stickyHeight = el.getBoundingClientRect().height - borderHeight
52
 
53
- if (stickyHeight !== rowStickyHeight) {
 
 
 
 
54
  el.blcStickyHeight = el.getBoundingClientRect().height
55
  return stickyHeight
56
  }
4
  range[0] +
5
  ((range[1] - range[0]) / (domain[1] - domain[0])) * (value - domain[0])
6
 
7
+ export const getRowInitialMinHeight = (el) => {
8
  const elComp = getComputedStyle(el)
9
  return parseFloat(elComp.getPropertyValue('--height'))
10
  }
50
 
51
  let stickyHeight = el.getBoundingClientRect().height - borderHeight
52
 
53
+ if (
54
+ stickyHeight !== rowStickyHeight ||
55
+ // case when content is forcing the initial height to be bigger
56
+ rowStickyHeight > getRowInitialMinHeight(el)
57
+ ) {
58
  el.blcStickyHeight = el.getBoundingClientRect().height
59
  return stickyHeight
60
  }