WordPress Page Builder – Beaver Builder - Version 2.4.2.4

Version Description

Download this release

Release Info

Developer pross
Plugin Icon 128x128 WordPress Page Builder – Beaver Builder
Version 2.4.2.4
Comparing to
See all releases

Code changes from version 2.4.2.2 to 2.4.2.4

changelog.txt CHANGED
@@ -1,3 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>2.4.2.2 - 03/01/2021</h4>
2
  <strong>Hot Fix</strong>
3
  <ul>
1
+ <h4>2.4.2.4 - 06/15/2021</h4>
2
+ <strong>Hot Fix</strong>
3
+ <ul>
4
+ <li>Callout Module: Fix link on icon ignoring link target setting</li>
5
+ <li>Allow .webp uploads when using WordPress 5.8 which adds support for .webp files</li>
6
+ <li>Add plugin data to data collected when opted into Sending Usage Data</li>
7
+ <li>Add support for SendinBlue API v3 since v2 will be discontinued at the end of the month</li>
8
+ </ul>
9
+
10
+ <h4>2.4.2.3 - 05/25/2021</h4>
11
+ <strong>Hot Fix</strong>
12
+ <ul>
13
+ <li>Fixed column width resetting to very small/narrow</li>
14
+ </ul>
15
+
16
  <h4>2.4.2.2 - 03/01/2021</h4>
17
  <strong>Hot Fix</strong>
18
  <ul>
classes/class-fl-builder-loader.php CHANGED
@@ -48,7 +48,7 @@ if ( ! class_exists( 'FLBuilderLoader' ) ) {
48
  * @return void
49
  */
50
  static private function define_constants() {
51
- define( 'FL_BUILDER_VERSION', '2.4.2.2' );
52
  define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
53
  define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
54
  define( 'FL_BUILDER_URL', plugins_url( '/', FL_BUILDER_FILE ) );
48
  * @return void
49
  */
50
  static private function define_constants() {
51
+ define( 'FL_BUILDER_VERSION', '2.4.2.4' );
52
  define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
53
  define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
54
  define( 'FL_BUILDER_URL', plugins_url( '/', FL_BUILDER_FILE ) );
classes/class-fl-builder-model.php CHANGED
@@ -2417,6 +2417,11 @@ final class FLBuilderModel {
2417
  * @return void
2418
  */
2419
  static public function reset_col_widths( $group_id = null ) {
 
 
 
 
 
2420
  if ( 'array' == gettype( $group_id ) ) {
2421
  foreach ( $group_id as $id ) {
2422
  self::reset_col_widths( $id );
2417
  * @return void
2418
  */
2419
  static public function reset_col_widths( $group_id = null ) {
2420
+
2421
+ if ( ! $group_id ) {
2422
+ return;
2423
+ }
2424
+
2425
  if ( 'array' == gettype( $group_id ) ) {
2426
  foreach ( $group_id as $id ) {
2427
  self::reset_col_widths( $id );
classes/class-fl-builder-service-mailerlite.php CHANGED
@@ -41,16 +41,9 @@ final class FLBuilderServiceMailerLite extends FLBuilderService {
41
  if ( $this->api_instance ) {
42
  return $this->api_instance;
43
  }
44
- // if ( ! class_exists( 'FL_ML_Rest' ) ) {
45
- // require_once FL_BUILDER_DIR . 'includes/vendor/mailerlite/FL_ML_Rest.php';
46
- // }
47
- //
48
- // $this->api_instance = new FL_ML_Rest( $api_key );
49
- // $this->api_instance->setUrl( $this->api_url );
50
- //
51
- // return $this->api_instance;
52
  require_once FL_BUILDER_DIR . 'includes/vendor/mailerlite/autoload.php';
53
- // $mailerliteClient = new \MailerLiteApi\MailerLite('your-api-key');
54
 
55
  $groupsapi = new \MailerLiteApi\MailerLite( $api_key );
56
  return $groupsapi;
41
  if ( $this->api_instance ) {
42
  return $this->api_instance;
43
  }
44
+
 
 
 
 
 
 
 
45
  require_once FL_BUILDER_DIR . 'includes/vendor/mailerlite/autoload.php';
46
+ require FL_BUILDER_DIR . 'includes/vendor/mailerlite/guzzlehttp/psr7/src/functions_include.php';
47
 
48
  $groupsapi = new \MailerLiteApi\MailerLite( $api_key );
49
  return $groupsapi;
classes/class-fl-builder-service-sendinblue.php CHANGED
@@ -37,7 +37,7 @@ final class FLBuilderServiceSendinBlue extends FLBuilderService {
37
  require_once FL_BUILDER_DIR . 'includes/vendor/sendinblue/Mailin.php';
38
  }
39
 
40
- $this->api_instance = new Mailin_Rest( 'https://api.sendinblue.com/v2.0', $access_key );
41
 
42
  return $this->api_instance;
43
  }
@@ -62,7 +62,9 @@ final class FLBuilderServiceSendinBlue extends FLBuilderService {
62
 
63
  // Make sure we have an access key.
64
  if ( ! isset( $fields['access_key'] ) || empty( $fields['access_key'] ) ) {
65
- $response['error'] = __( 'Error: You must provide an Access Key.', 'fl-builder' );
 
 
66
  } else {
67
 
68
  $api = $this->get_api( $fields['access_key'] );
@@ -70,7 +72,7 @@ final class FLBuilderServiceSendinBlue extends FLBuilderService {
70
 
71
  if ( ! is_array( $result ) ) {
72
  $response['error'] = __( 'There was an error connecting to SendinBlue. Please try again.', 'fl-builder' );
73
- } elseif ( isset( $result['code'] ) && 'failure' == $result['code'] ) {
74
  /* translators: %s: error */
75
  $response['error'] = sprintf( __( 'Error: Could not connect to SendinBlue. %s', 'fl-builder' ), $result['message'] );
76
  } else {
@@ -96,8 +98,8 @@ final class FLBuilderServiceSendinBlue extends FLBuilderService {
96
  'row_class' => 'fl-builder-service-connect-row',
97
  'class' => 'fl-builder-service-connect-input',
98
  'type' => 'text',
99
- 'label' => __( 'Access Key', 'fl-builder' ),
100
- 'help' => __( 'Your Access Key can be found in your SendinBlue account under API & Integration > Manager Your Keys > Version 2.0 > Access Key.', 'fl-builder' ),
101
  'preview' => array(
102
  'type' => 'none',
103
  ),
@@ -125,15 +127,15 @@ final class FLBuilderServiceSendinBlue extends FLBuilderService {
125
  'html' => '',
126
  );
127
 
128
- $result = $api->get_lists( 1, 50 );
129
 
130
  if ( ! is_array( $result ) ) {
131
  $response['error'] = __( 'There was an error connecting to SendinBlue. Please try again.', 'fl-builder' );
132
- } elseif ( isset( $result['code'] ) && 'failure' == $result['code'] ) {
133
  /* translators: %s: error */
134
  $response['error'] = sprintf( __( 'Error: Could not connect to SendinBlue. %s', 'fl-builder' ), $result['message'] );
135
  } else {
136
- $response['html'] = $this->render_list_field( $result['data']['lists'], $settings );
137
  }
138
 
139
  return $response;
@@ -195,37 +197,37 @@ final class FLBuilderServiceSendinBlue extends FLBuilderService {
195
  } else {
196
 
197
  $api = $this->get_api( $account_data['access_key'] );
198
- $data = array();
199
 
200
  if ( $name ) {
201
 
202
  $contact_attrs = $api->get_contact_attributes();
203
-
204
- $names = explode( ' ', $name );
205
-
206
  if ( isset( $names[0] ) ) {
207
- $data['NAME'] = $names[0];
208
 
209
  if ( in_array( 'FIRSTNAME', $contact_attrs ) ) {
210
- $data['FIRSTNAME'] = $names[0];
211
  }
212
  }
213
  if ( isset( $names[1] ) ) {
214
- $data['SURNAME'] = $names[1];
215
 
216
  if ( in_array( 'LASTNAME', $contact_attrs ) ) {
217
- $data['LASTNAME'] = $names[1];
218
  }
219
  }
220
  }
221
-
222
- $result = $api->create_update_user( $email, $data, 0, array( $settings->list_id ), array(), 0 );
223
-
224
- if ( ! is_array( $result ) ) {
225
- $response['error'] = __( 'There was an error subscribing to SendinBlue. Please try again.', 'fl-builder' );
226
- } elseif ( isset( $result['code'] ) && 'failure' == $result['code'] ) {
227
- /* translators: %s: error */
228
- $response['error'] = sprintf( __( 'Error: Could not subscribe to SendinBlue. %s', 'fl-builder' ), $result['message'] );
 
 
229
  }
230
  }
231
 
37
  require_once FL_BUILDER_DIR . 'includes/vendor/sendinblue/Mailin.php';
38
  }
39
 
40
+ $this->api_instance = new Mailin_Rest( 'https://api.sendinblue.com/v3', $access_key );
41
 
42
  return $this->api_instance;
43
  }
62
 
63
  // Make sure we have an access key.
64
  if ( ! isset( $fields['access_key'] ) || empty( $fields['access_key'] ) ) {
65
+ $response['error'] = __( 'Error: You must provide an API Key.', 'fl-builder' );
66
+ } elseif ( ! strstr( $fields['access_key'], 'xkeysib-' ) ) {
67
+ $response['error'] = __( 'Error: API key needs to be upgraded to v3.', 'fl-builder' );
68
  } else {
69
 
70
  $api = $this->get_api( $fields['access_key'] );
72
 
73
  if ( ! is_array( $result ) ) {
74
  $response['error'] = __( 'There was an error connecting to SendinBlue. Please try again.', 'fl-builder' );
75
+ } elseif ( isset( $result['code'] ) && 'unauthorized' == $result['code'] ) {
76
  /* translators: %s: error */
77
  $response['error'] = sprintf( __( 'Error: Could not connect to SendinBlue. %s', 'fl-builder' ), $result['message'] );
78
  } else {
98
  'row_class' => 'fl-builder-service-connect-row',
99
  'class' => 'fl-builder-service-connect-input',
100
  'type' => 'text',
101
+ 'label' => __( 'API Key', 'fl-builder' ),
102
+ 'help' => __( 'Your API Key can be found in your SendinBlue account under SMTP & API > API Keys > Version v3 > API KEY.', 'fl-builder' ),
103
  'preview' => array(
104
  'type' => 'none',
105
  ),
127
  'html' => '',
128
  );
129
 
130
+ $result = $api->get_lists( 50 );
131
 
132
  if ( ! is_array( $result ) ) {
133
  $response['error'] = __( 'There was an error connecting to SendinBlue. Please try again.', 'fl-builder' );
134
+ } elseif ( isset( $result['code'] ) && 'unauthorized' == $result['code'] ) {
135
  /* translators: %s: error */
136
  $response['error'] = sprintf( __( 'Error: Could not connect to SendinBlue. %s', 'fl-builder' ), $result['message'] );
137
  } else {
138
+ $response['html'] = $this->render_list_field( $result['lists'], $settings );
139
  }
140
 
141
  return $response;
197
  } else {
198
 
199
  $api = $this->get_api( $account_data['access_key'] );
200
+ $data = new stdClass();
201
 
202
  if ( $name ) {
203
 
204
  $contact_attrs = $api->get_contact_attributes();
205
+ $names = explode( ' ', $name );
 
 
206
  if ( isset( $names[0] ) ) {
207
+ $data->NAME = $names[0]; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
208
 
209
  if ( in_array( 'FIRSTNAME', $contact_attrs ) ) {
210
+ $data->FIRSTNAME = $names[0]; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
211
  }
212
  }
213
  if ( isset( $names[1] ) ) {
214
+ $data->SURNAME = $names[1]; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
215
 
216
  if ( in_array( 'LASTNAME', $contact_attrs ) ) {
217
+ $data->LASTNAME = $names[1]; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
218
  }
219
  }
220
  }
221
+ $settings->list_id = (int) $settings->list_id;
222
+ $result = $api->create_update_user( $email, $data, false, array( $settings->list_id ), true, array(), false );
223
+
224
+ if ( isset( $result['code'] ) && 'unauthorized' == $result['code'] ) {
225
+ if ( 'Key not found' === $result['message'] ) {
226
+ $response['error'] = 'Error: API key needs to be upgraded to v3.';
227
+ } else {
228
+ /* translators: %s: error */
229
+ $response['error'] = sprintf( __( 'Error: Could not subscribe to SendinBlue. %s', 'fl-builder' ), $result['message'] );
230
+ }
231
  }
232
  }
233
 
classes/class-fl-builder-usage.php CHANGED
@@ -267,9 +267,15 @@ final class FLBuilderUsage {
267
  $plugins_data = get_plugins();
268
  $data['plugins'] = count( $plugins_data );
269
  $data['plugins_active'] = 0;
 
270
 
271
  foreach ( (array) $plugins_data as $plugin_slug => $plugin ) {
272
  if ( is_plugin_active( $plugin_slug ) ) {
 
 
 
 
 
273
  $data['plugins_active'] ++;
274
  }
275
  }
267
  $plugins_data = get_plugins();
268
  $data['plugins'] = count( $plugins_data );
269
  $data['plugins_active'] = 0;
270
+ $data['active_plugins_installed'] = array();
271
 
272
  foreach ( (array) $plugins_data as $plugin_slug => $plugin ) {
273
  if ( is_plugin_active( $plugin_slug ) ) {
274
+ $data['active_plugins_installed'][] = array(
275
+ 'name' => $plugin['Name'],
276
+ 'version' => $plugin['Version'],
277
+ 'slug' => $plugin_slug,
278
+ );
279
  $data['plugins_active'] ++;
280
  }
281
  }
classes/class-fl-builder.php CHANGED
@@ -3748,7 +3748,7 @@ final class FLBuilder {
3748
  $ext = pathinfo( $file['name'], PATHINFO_EXTENSION );
3749
 
3750
  $regex = array(
3751
- 'photo' => '#(jpe?g|png|gif|bmp|tiff?)#i',
3752
  'video' => '#(mp4|m4v|webm)#i',
3753
  );
3754
 
3748
  $ext = pathinfo( $file['name'], PATHINFO_EXTENSION );
3749
 
3750
  $regex = array(
3751
+ 'photo' => '#(jpe?g|png|gif|bmp|tiff?|webp)#i',
3752
  'video' => '#(mp4|m4v|webm)#i',
3753
  );
3754
 
fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 2.4.2.2
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
9
  * Copyright: (c) 2014 Beaver Builder
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 2.4.2.4
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
9
  * Copyright: (c) 2014 Beaver Builder
includes/updater-config.php CHANGED
@@ -3,7 +3,7 @@
3
  if ( class_exists( 'FLUpdater' ) ) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
- 'version' => '2.4.2.2',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin',
9
  ));
3
  if ( class_exists( 'FLUpdater' ) ) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
+ 'version' => '2.4.2.4',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin',
9
  ));
includes/vendor/sendinblue/Mailin.php CHANGED
@@ -18,8 +18,8 @@ class Mailin_Rest
18
  $this->api_key = $api_key;
19
  }
20
  /**
21
- * Do CURL request with authorization
22
- */
23
  private function do_request($resource,$method,$input)
24
  {
25
  $called_url = $this->base_url."/".$resource;
@@ -57,277 +57,28 @@ class Mailin_Rest
57
  {
58
  return $this->do_request($resource,"DELETE",$input);
59
  }
60
- public function get_account()
61
- {
62
- return $this->get("account","");
63
- }
64
- public function get_smtp_details()
65
- {
66
- return $this->get("account/smtpdetail","");
67
- }
68
- public function create_child_account($email,$password,$company_org,$first_name,$last_name,$credits,$associate_ip)
69
- {
70
- return $this->post("account",json_encode(array("child_email"=>$email,"password"=>$password,"company_org"=>$company_org,"first_name"=>$first_name,"last_name"=>$last_name,"credits"=>$credits,"associate_ip"=>$associate_ip)));
71
- }
72
- public function update_child_account($child_authkey,$company_org,$first_name,$last_name,$password,$associate_ip,$disassociate_ip)
73
- {
74
- return $this->put("account",json_encode(array("auth_key"=>$child_authkey,"company_org"=>$company_org,"first_name"=>$first_name,"last_name"=>$last_name,"password"=>$password,"associate_ip"=>$associate_ip,"disassociate_ip"=>$disassociate_ip)));
75
- }
76
- public function delete_child_account($child_authkey)
77
- {
78
- return $this->delete("account/".$child_authkey,"");
79
- }
80
- public function get_reseller_child($child_authkey)
81
- {
82
- return $this->post("account/getchildv2",json_encode(array("auth_key"=>$child_authkey)));
83
- }
84
- public function add_remove_child_credits($child_authkey,$add_credits,$remove_credits)
85
- {
86
- return $this->post("account/addrmvcredit",json_encode(array("auth_key"=>$child_authkey,"add_credit"=>$add_credits,"rmv_credit"=>$remove_credits)));
87
- }
88
- public function send_sms($to,$from,$text,$web_url,$tag,$type)
89
- {
90
- return $this->post("sms",json_encode(array("text"=>$text,"tag"=>$tag,"web_url"=>$web_url,"from"=>$from,"to"=>$to,"type"=>$type)));
91
- }
92
- public function create_sms_campaign($camp_name,$sender,$content,$bat_sent,$listids,$exclude_list,$scheduled_date)
93
- {
94
- return $this->post("sms",json_encode(array("name"=>$camp_name,"sender"=>$sender,"content"=>$content,"bat"=>$bat_sent,"listid"=>$listids,"exclude_list"=>$exclude_list, "scheduled_date"=>$scheduled_date)));
95
- }
96
- public function update_sms_campaign($id,$camp_name,$sender,$content,$bat_sent,$listids,$exclude_list,$scheduled_date)
97
- {
98
- return $this->put("sms/".$id,json_encode(array("name"=>$camp_name,"sender"=>$sender,"content"=>$content,"bat"=>$bat_sent,"listid"=>$listids,"exclude_list"=>$exclude_list, "scheduled_date"=>$scheduled_date)));
99
- }
100
- public function send_bat_sms($campid,$mobilephone)
101
- {
102
- return $this->get("sms/".$campid,json_encode(array("to"=>$mobilephone)));
103
- }
104
- public function get_campaigns_v2($type,$status,$page,$page_limit)
105
- {
106
- return $this->get("campaign/detailsv2",json_encode(array("type"=>$type,"status"=>$status,"page"=>$page,"page_limit"=>$page_limit)));
107
- }
108
- public function get_campaign_v2($id)
109
- {
110
- return $this->get("campaign/".$id."/detailsv2","");
111
- }
112
- public function create_campaign($category,$from_name,$name,$bat_sent,$html_content,$html_url,$listid,$scheduled_date,$subject,$from_email,$reply_to,$to_field,$exclude_list,$attachmentUrl,$inline_image)
113
- {
114
- return $this->post("campaign",json_encode(array("category"=>$category,"from_name"=>$from_name,"name"=>$name,"bat"=>$bat_sent,"html_content"=>$html_content,"html_url"=>$html_url,"listid"=>$listid,"scheduled_date"=>$scheduled_date,"subject"=>$subject,"from_email"=>$from_email,"reply_to"=>$reply_to,"to_field"=>$to_field,"exclude_list"=>$exclude_list,"attachment_url"=>$attachmentUrl,"inline_image"=>$inline_image)));
115
- }
116
- public function delete_campaign($id)
117
- {
118
- return $this->delete("campaign/".$id,"");
119
- }
120
- public function update_campaign($id,$category,$from_name,$name,$bat_sent,$html_content,$html_url,$listid,$scheduled_date,$subject,$from_email,$reply_to,$to_field,$exclude_list,$attachmentUrl,$inline_image)
121
- {
122
- return $this->put("campaign/".$id,json_encode(array("category"=>$category,"from_name"=>$from_name,"name"=>$name,"bat"=>$bat_sent,"html_content"=>$html_content,"html_url"=>$html_url,"listid"=>$listid,"scheduled_date"=>$scheduled_date,"subject"=>$subject,"from_email"=>$from_email,"reply_to"=>$reply_to,"to_field"=>$to_field,"exclude_list"=>$exclude_list,"attachment_url"=>$attachmentUrl,"inline_image"=>$inline_image)));
123
- }
124
- public function campaign_report_email($id,$lang,$email_subject,$email_to,$email_content_type,$email_bcc,$email_cc,$email_body)
125
- {
126
- return $this->post("campaign/".$id."/report",json_encode(array("lang"=>$lang,"email_subject"=>$email_subject,"email_to"=>$email_to,"email_content_type"=>$email_content_type,"email_bcc"=>$email_bcc,"email_cc"=>$email_cc,"email_body"=>$email_body)));
127
- }
128
- public function campaign_recipients_export($id,$notify_url,$type)
129
- {
130
- return $this->post("campaign/".$id."/recipients",json_encode(array("notify_url"=>$notify_url,"type"=>$type)));
131
- }
132
- public function send_bat_email($campid,$email_to)
133
- {
134
- return $this->post("campaign/".$campid."/test",json_encode(array("emails"=>$email_to)));
135
- }
136
- public function create_trigger_campaign($category,$from_name,$name,$bat_sent,$html_content,$html_url,$listid,$scheduled_date,$subject,$from_email,$reply_to,$to_field,$exclude_list,$recurring,$attachmentUrl,$inline_image)
137
- {
138
- return $this->post("campaign",json_encode(array("category"=>$category,"from_name"=>$from_name,"trigger_name"=>$name,"bat"=>$bat_sent,"html_content"=>$html_content,"html_url"=>$html_url,"listid"=>$listid,"scheduled_date"=>$scheduled_date,"subject"=>$subject,"from_email"=>$from_email,"reply_to"=>$reply_to,"to_field"=>$to_field,"exclude_list"=>$exclude_list,"recurring"=>$recurring,"attachment_url"=>$attachmentUrl,"inline_image"=>$inline_image)));
139
- }
140
- public function update_trigger_campaign($id,$category,$from_name,$name,$bat_sent,$html_content,$html_url,$listid,$scheduled_date,$subject,$from_email,$reply_to,$to_field,$exclude_list,$recurring,$attachmentUrl,$inline_image)
141
- {
142
- return $this->put("campaign/".$id,json_encode(array("category"=>$category,"from_name"=>$from_name,"trigger_name"=>$name,"bat"=>$bat_sent,"html_content"=>$html_content,"html_url"=>$html_url,"listid"=>$listid,"scheduled_date"=>$scheduled_date,"subject"=>$subject,"from_email"=>$from_email,"reply_to"=>$reply_to,"to_field"=>$to_field,"exclude_list"=>$exclude_list,"recurring"=>$recurring,"attachment_url"=>$attachmentUrl,"inline_image"=>$inline_image)));
143
- }
144
- public function share_campaign($campaign_ids)
145
- {
146
- return $this->post("campaign/sharelinkv2",json_encode(array("camp_ids"=>$campaign_ids)));
147
- }
148
- public function update_campaign_status($id,$status)
149
- {
150
- return $this->put("campaign/".$id."/updatecampstatus",json_encode(array("status"=>$status)));
151
- }
152
- public function get_processes($page,$page_limit)
153
- {
154
- return $this->get("process",json_encode(array("page"=>$page,"page_limit"=>$page_limit)));
155
- }
156
- public function get_process($id)
157
- {
158
- return $this->get("process/".$id,"");
159
- }
160
- public function get_lists($page,$page_limit)
161
- {
162
- return $this->get("list",json_encode(array("page"=>$page,"page_limit"=>$page_limit)));
163
- }
164
- public function get_list($id)
165
- {
166
- return $this->get("list/".$id,"");
167
- }
168
- public function create_list($list_name,$list_parent)
169
- {
170
- return $this->post("list",json_encode(array("list_name"=>$list_name,"list_parent"=>$list_parent)));
171
- }
172
- public function delete_list($id)
173
- {
174
- return $this->delete("list/".$id,"");
175
- }
176
- public function update_list($id,$list_name,$list_parent)
177
- {
178
- return $this->put("list/".$id,json_encode(array("list_name"=>$list_name,"list_parent"=>$list_parent)));
179
- }
180
- public function display_list_users($listids,$page,$page_limit)
181
- {
182
- return $this->post("list/display",json_encode(array("listids"=>$listids, "page"=>$page, "page_limit"=>$page_limit)));
183
- }
184
- public function add_users_list($id,$users)
185
- {
186
- return $this->post("list/".$id."/users",json_encode(array("users"=>$users)));
187
- }
188
- public function delete_users_list($id,$users)
189
- {
190
- return $this->delete("list/".$id."/delusers",json_encode(array("users"=>$users)));
191
- }
192
- public function send_email($to,$subject,$from,$html,$text,$cc,$bcc,$replyto,$attachment,$headers)
193
- {
194
- return $this->post("email",json_encode(array("cc"=>$cc,"text"=>$text,"bcc"=>$bcc,"replyto"=>$replyto,"html"=>$html,"to"=>$to,"attachment"=>$attachment,"from"=>$from,"subject"=>$subject,"headers"=>$headers)));
195
- }
196
- public function get_webhooks($is_plat)
197
- {
198
- return $this->get("webhook",json_encode(array("is_plat"=>$is_plat)));
199
- }
200
- public function get_webhook($id)
201
- {
202
- return $this->get("webhook/".$id,"");
203
- }
204
- public function create_webhook($url,$description,$events,$is_plat)
205
- {
206
- return $this->post("webhook",json_encode(array("url"=>$url,"description"=>$description,"events"=>$events,"is_plat"=>$is_plat)));
207
- }
208
- public function delete_webhook($id)
209
- {
210
- return $this->delete("webhook/".$id,"");
211
- }
212
- public function update_webhook($id,$url,$description,$events)
213
- {
214
- return $this->put("webhook/".$id,json_encode(array("url"=>$url,"description"=>$description,"events"=>$events)));
215
- }
216
- public function get_statistics($aggregate,$tag,$days,$end_date,$start_date)
217
- {
218
- return $this->post("statistics",json_encode(array("aggregate"=>$aggregate,"tag"=>$tag,"days"=>$days,"end_date"=>$end_date,"start_date"=>$start_date)));
219
- }
220
- public function get_user($email)
221
- {
222
- return $this->get("user/".$email,"");
223
- }
224
- public function create_user($attributes,$blacklisted,$email,$listid)
225
- {
226
- return $this->post("user",json_encode(array("attributes"=>$attributes,"blacklisted"=>$blacklisted,"email"=>$email,"listid"=>$listid)));
227
- }
228
- public function delete_user($email)
229
- {
230
- return $this->delete("user/".$email,"");
231
- }
232
- public function update_user($email,$attributes,$blacklisted,$listid,$listid_unlink)
233
- {
234
- return $this->put("user/".$email,json_encode(array("attributes"=>$attributes,"blacklisted"=>$blacklisted,"listid"=>$listid,"listid_unlink"=>$listid_unlink)));
235
- }
236
- public function import_users($url,$listids,$notify_url,$name,$folder_id)
237
- {
238
- return $this->post("user/import",json_encode(array("url"=>$url,"listids"=>$listids,"notify_url"=>$notify_url,"name"=>$name,"list_parent"=>$folder_id)));
239
- }
240
- public function export_users($export_attrib,$filter,$notify_url)
241
- {
242
- return $this->post("user/export",json_encode(array("export_attrib"=>$export_attrib,"filter"=>$filter,"notify_url"=>$notify_url)));
243
- }
244
- public function create_update_user($email,$attributes,$blacklisted,$listid,$listid_unlink,$blacklisted_sms)
245
- {
246
- return $this->post("user/createdituser",json_encode(array("email"=>$email,"attributes"=>$attributes,"blacklisted"=>$blacklisted,"listid"=>$listid,"listid_unlink"=>$listid_unlink,"blacklisted_sms"=>$blacklisted_sms)));
247
- }
248
- public function get_attributes()
249
- {
250
- return $this->get("attribute","");
251
- }
252
- public function get_contact_attributes()
253
- {
254
- $attrs = $this->get("attribute","");
255
- $attr_names = array();
256
-
257
- if ( isset( $attrs['data']['normal_attributes'] ) ) {
258
- foreach( $attrs['data']['normal_attributes'] as $data ) {
259
- $attr_names[] = $data['name'];
260
- }
261
- }
262
- return $attr_names;
263
- }
264
- public function get_attribute($type)
265
- {
266
- return $this->get("attribute/".$type,"");
267
- }
268
- public function create_attribute($type,$data)
269
- {
270
- return $this->post("attribute",json_encode(array("type"=>$type,"data"=>$data)));
271
- }
272
- public function delete_attribute($type,$data)
273
- {
274
- return $this->post("attribute/".$type,json_encode(array("data"=>$data)));
275
- }
276
- public function get_report($limit,$start_date,$end_date,$offset,$date,$days,$email)
277
- {
278
- return $this->post("report",json_encode(array("limit"=>$limit,"start_date"=>$start_date,"end_date"=>$end_date,"offset"=>$offset,"date"=>$date,"days"=>$days,"email"=>$email)));
279
- }
280
- public function get_folders($page,$page_limit)
281
- {
282
- return $this->get("folder",json_encode(array("page"=>$page,"page_limit"=>$page_limit)));
283
- }
284
- public function get_folder($id)
285
- {
286
- return $this->get("folder/".$id,"");
287
- }
288
- public function create_folder($name)
289
- {
290
- return $this->post("folder",json_encode(array("name"=>$name)));
291
- }
292
- public function delete_folder($id)
293
- {
294
- return $this->delete("folder/".$id,"");
295
- }
296
- public function update_folder($id,$name)
297
- {
298
- return $this->put("folder/".$id,json_encode(array("name"=>$name)));
299
- }
300
- public function delete_bounces($start_date,$end_date,$email)
301
- {
302
- return $this->post("bounces",json_encode(array("start_date"=>$start_date,"end_date"=>$end_date,"email"=>$email)));
303
- }
304
- public function send_transactional_template($id,$to,$cc,$bcc,$attr,$attachmentUrl,$attachment)
305
- {
306
- return $this->put("template/".$id,json_encode(array("cc"=>$cc,"to"=>$to,"attr"=>$attr,"bcc"=>$bcc,"attachment_url"=>$attachmentUrl,"attachment"=>$attachment)));
307
- }
308
- public function create_template($from_name,$name,$bat_sent,$html_content,$html_url,$subject,$from_email,$reply_to,$to_field,$status,$attach)
309
- {
310
- return $this->post("template",json_encode(array("from_name"=>$from_name,"template_name"=>$name,"bat"=>$bat_sent,"html_content"=>$html_content,"html_url"=>$html_url,"subject"=>$subject,"from_email"=>$from_email,"reply_to"=>$reply_to,"to_field"=>$to_field,"status"=>$status,"attachment"=>$attach)));
311
- }
312
- public function update_template($id,$from_name,$name,$bat_sent,$html_content,$html_url,$subject,$from_email,$reply_to,$to_field,$status,$attach)
313
- {
314
- return $this->put("template/".$id,json_encode(array("from_name"=>$from_name,"template_name"=>$name,"bat"=>$bat_sent,"html_content"=>$html_content,"html_url"=>$html_url,"subject"=>$subject,"from_email"=>$from_email,"reply_to"=>$reply_to,"to_field"=>$to_field,"status"=>$status,"attachment"=>$attach)));
315
- }
316
- public function get_senders($option)
317
- {
318
- return $this->get("advanced",json_encode(array("option"=>$option)));
319
- }
320
- public function create_sender($sender_name,$sender_email,$ip_domain)
321
- {
322
- return $this->post("advanced",json_encode(array("name"=>$sender_name,"email"=>$sender_email,"ip_domain"=>$ip_domain)));
323
- }
324
- public function update_sender($id,$sender_name,$sender_email,$ip_domain)
325
- {
326
- return $this->put("advanced/".$id,json_encode(array("name"=>$sender_name,"email"=>$sender_email,"ip_domain"=>$ip_domain)));
327
- }
328
- public function delete_sender($id)
329
- {
330
- return $this->delete("advanced/".$id,"");
331
- }
332
  }
333
  ?>
18
  $this->api_key = $api_key;
19
  }
20
  /**
21
+ * Do CURL request with authorization
22
+ */
23
  private function do_request($resource,$method,$input)
24
  {
25
  $called_url = $this->base_url."/".$resource;
57
  {
58
  return $this->do_request($resource,"DELETE",$input);
59
  }
60
+ public function get_account()
61
+ {
62
+ return $this->get("account","");
63
+ }
64
+ public function get_lists($page_limit)
65
+ {
66
+ return $this->get("contacts/lists",json_encode(array("limit"=>$page_limit, "offset"=>0)));
67
+ }
68
+ public function create_update_user($email,$attributes,$blacklisted,$listid,$update_enabled,$listid_unlink,$blacklisted_sms)
69
+ {
70
+ return $this->post("contacts",json_encode(array("email"=>$email,"attributes"=>$attributes,"emailBlacklisted"=>$blacklisted,"listIds"=>$listid,"updateEnabled"=>$update_enabled,"smsBlacklisted"=>$blacklisted_sms)));
71
+ }
72
+ public function get_contact_attributes()
73
+ {
74
+ $attrs = $this->get("contacts/attributes","");
75
+ $attr_names = array();
76
+ if ( ! empty( $attrs['attributes'] ) ) {
77
+ foreach ( $attrs['attributes'] as $attr ) {
78
+ $attr_names[] = $attr['name'];
79
+ }
80
+ }
81
+ return $attr_names;
82
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
  ?>
js/fl-builder-responsive-editing.js CHANGED
@@ -104,6 +104,7 @@
104
  FLBuilderConfig.postId + '-layout-draft-partial.css',
105
  FLBuilderConfig.postId + '-layout-preview.css',
106
  FLBuilderConfig.postId + '-layout-preview-partial.css',
 
107
  'fl-builder-global-css',
108
  'fl-builder-layout-css'
109
  ] );
104
  FLBuilderConfig.postId + '-layout-draft-partial.css',
105
  FLBuilderConfig.postId + '-layout-preview.css',
106
  FLBuilderConfig.postId + '-layout-preview-partial.css',
107
+ FLBuilderConfig.postId + '-inline-css',
108
  'fl-builder-global-css',
109
  'fl-builder-layout-css'
110
  ] );
js/fl-builder.min.js CHANGED
@@ -5,7 +5,7 @@ a=l.attr("data-node"),o&&s&&r?FLBuilderConfig.userCanEditGlobalTemplates&&(win=w
5
  },_getSettingsJSONForHTML:function(e){return JSON.stringify(e).replace(/\'/g,"&#39;").replace("<wbr />","<wbr>")},_getOriginalSettings:function(t,i){var l=t.find(".fl-builder-settings-json"),n=t.data("node"),o=FLBuilderSettingsConfig.nodes,s=null,r={};if(n&&o[n]?s=o[n]:l.length&&(s=FLBuilder._jsonParse(l.val().replace(/&#39;/g,"'"))),s)for(key in s)(e("#fl-field-"+key).length||i)&&(r[key]=s[key]);return r},_getSettingsForChangedCheck:function(t,i){var l=FLBuilder._getSettings(i);if(t){var n=e(".fl-node-"+t);if(n.hasClass("fl-module")){var o=n.data("type"),s=FLBuilderSettingsConfig.editables[o];if(s&&FLBuilderSettingsConfig.nodes[t])for(var r in s)l[r]=FLBuilderSettingsConfig.nodes[t][r]}}return l},_saveSettings:function(t){function i(){FLBuilder._showNodeLoading(o),FLBuilderSettingsConfig.nodes[o]=s,FLBuilder.ajax({action:"save_settings",node_id:o,settings:s},FLBuilder._saveSettingsComplete.bind(this,t,r)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:o,settings:s}),FLBuilder._lightbox.close()}var l=e(".fl-builder-settings-lightbox .fl-builder-settings"),n=l.data("new-module"),o=l.attr("data-node"),s=FLBuilder._getSettings(l),r=FLBuilder.preview;return!FLBuilder.isUndefined(t)&&FLBuilder.isBoolean(t)||(t=!0),r&&!r._settingsHaveChanged()&&FLBuilder.isUndefined(n)?void FLBuilder._lightbox.close():void(FLBuilderConfig.userCaps.unfiltered_html?i():(FLBuilderSettingsForms.showLightboxLoader(),FLBuilder.ajax({action:"verify_settings",settings:s},function(t){"true"===t?i():(msg='<p style="font-weight:bold;text-align:center;">'+FLBuilderStrings.noScriptWarn.heading+"</p>",FLBuilderConfig.userCaps.global_unfiltered_html?msg+="<p>"+FLBuilderStrings.noScriptWarn.global+"</p>":msg+="<p>"+FLBuilderStrings.noScriptWarn.message+"</p>",msg+='<p><div class="fl-diff"></div></p>',msg+="<p>"+FLBuilderStrings.noScriptWarn.footer+"</p>",FLBuilderSettingsForms.hideLightboxLoader(),FLBuilder.alert(msg),data=e.parseJSON(t),""!==data.diff&&(e(".fl-diff").html(data.diff),e(".fl-diff").prepend("<p>"+FLBuilderStrings.codeErrorDetected+"</p>"),e(".fl-diff .diff-deletedline").each(function(){e(this).find("del").length<1?e(this).css("background-color","rgb(255, 192, 203, 0.7)").css("padding","10px").css("border","1px solid pink"):e(this).find("del").css("background-color","rgb(255, 192, 203, 0.7)").css("border","1px solid pink")}),console.log("============"),console.log("key: "+data.key),console.log("value: "+data.value),console.log("parsed: "+data.parsed),console.log("============")))})))},_saveSettingsComplete:function(e,t,i){var l=FLBuilder._jsonParse(i),n=l.layout.nodeType,o=l.layout.moduleType,s="didSave"+n.charAt(0).toUpperCase()+n.slice(1)+"SettingsComplete",r=function(){t&&l.layout.partial&&l.layout.nodeId===t.nodeId&&(t.clear(),t=null)};!0===e?FLBuilder._renderLayout(l.layout,r):r(),FLBuilder.triggerHook("didSaveNodeSettingsComplete",{nodeId:l.node_id,nodeType:n,moduleType:o,settings:l.settings}),FLBuilder.triggerHook(s,{nodeId:l.node_id,nodeType:n,moduleType:o,settings:l.settings})},_triggerSettingsSave:function(t,i,l){var n=FLBuilder._lightbox._node.find("form.fl-builder-settings"),o=FLBuilder._lightbox._node.data("instance-id"),s=FLLightbox._instances[o],r=e(".fl-lightbox-wrap[data-parent]:visible"),a=!1,d=!0;return t=!_.isUndefined(t)&&t,i=!_.isUndefined(i)&&i,l=!!_.isUndefined(l)||l,n.length&&(r.length&&(r.find(".fl-builder-settings-save").trigger("click"),(r.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),d&&!n.validate().form()&&(d=!1),a=FLBuilderSettingsForms.settingsHaveChanged(),d&&a&&(t&&s.disableClose(),n.find(".fl-builder-settings-save").trigger("click"),t&&s.enableClose(),(n.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),l&&(FLBuilder._destroySettingsForms(),!a&&FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)),a||t||s.close()),d?FLBuilder.triggerHook("didTriggerSettingsSave"):(FLBuilder.triggerHook("didFailSettingsSave"),FLBuilder._toggleSettingsTabErrors(),i&&!e(".fl-builder-alert-lightbox:visible").length&&FLBuilder.alert(FLBuilderStrings.settingsHaveErrors)),d},_refreshSettingsPreviewReference:function(){FLBuilder.preview&&FLBuilder.preview._initElementsAndClasses()},_openNestedSettings:function(t){t.className&&-1===t.className.indexOf("fl-builder-settings-lightbox")&&(t.className+=" fl-builder-settings-lightbox"),t=e.extend({className:"fl-builder-lightbox fl-builder-settings-lightbox",destroyOnClose:!0,resizable:!0},t);var i=e(".fl-lightbox-wrap:visible"),l=i.find(".fl-lightbox"),n=new FLLightbox(t),o=n._node,s=o.find(".fl-lightbox");return i.hide(),o.attr("data-parent",i.attr("data-instance-id")),s.attr("style",l.attr("style")),n.on("resized",FLBuilder._calculateSettingsTabsOverflow),n.open('<div class="fl-builder-lightbox-loading"></div>'),n},_closeNestedSettings:function(){var t=e(".fl-builder-lightbox[data-parent]:visible"),i=t.find(".fl-lightbox"),l=t.attr("data-instance-id"),n=FLLightbox._instances[l],o=t.attr("data-parent"),s=e('[data-instance-id="'+o+'"]'),r=s.find(".fl-lightbox"),a=s.find("form"),d=FLLightbox._instances[o];n&&(n.on("close",function(){r.attr("style",i.attr("style")),s.show(),d._resize(),s.find("label.error").remove(),a.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors(),FLBuilder._initMultipleFields()}),n.close())},_showHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeOut()},_initSection:function(){var t=e(this),i=t.find(".fl-builder-settings-section-header");i.on("click",function(){t.toggleClass("fl-builder-settings-section-collapsed")})},_initButtonGroupFields:function(){e(".fl-builder-settings:visible").find(".fl-button-group-field").each(FLBuilder._initButtonGroupField)},_initButtonGroupField:function(){var t=e(this),i=t.find(".fl-button-group-field-option"),l=t.find("input");i.on("click",function(){var t=e(this);"1"==t.attr("data-selected")?(t.attr("data-selected","0"),l.val("").trigger("change")):(i.attr("data-selected","0"),t.attr("data-selected","1"),l.val(t.data("value")).trigger("change"))}),l.on("change",function(e){var t=l.val(),n=i.filter('[data-value="'+t+'"]');i.attr("data-selected","0"),n.attr("data-selected","1")})},_initCompoundFields:function(){e(".fl-builder-settings:visible").find(".fl-compound-field").each(FLBuilder._initCompoundField)},_initCompoundField:function(){var t=e(this),i=t.find(".fl-compound-field-section"),l=t.find(".fl-compound-field-section-toggle"),n=t.find(".fl-compound-field-setting").has(".fl-dimension-field-units");i.each(function(){var t=e(this);t.find(".fl-compound-field-section-toggle").length||t.addClass("fl-compound-field-section-visible")}),l.on("click",function(){var t=e(this),i=t.closest(".fl-field"),l=t.closest(".fl-compound-field-section"),n="."+l.attr("class").split(" ").join(".");i.find(n).toggleClass("fl-compound-field-section-visible")}),n.each(function(){var t=e(this),i=t.find(".fl-compound-field-label"),l='<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>';i.length&&!t.find(".fl-shadow-field").length&&i.append(l)})},_initAutoSuggestFields:function(){var t=e(".fl-builder-settings:visible .fl-suggest-field"),i=null,l=null,n=null,o=[];t.each(function(){i=e(this),""!==i.attr("data-value")&&(FLBuilderSettingsForms.showFieldLoader(i),o.push({name:i.attr("name"),value:i.attr("data-value"),action:i.attr("data-action"),data:i.attr("data-action-data")}))}),o.length?FLBuilder.ajax({action:"get_autosuggest_values",fields:o},function(i){l=FLBuilder._jsonParse(i);for(n in l)e('.fl-suggest-field[name="'+n+'"]').attr("data-value",l[n]);t.each(FLBuilder._initAutoSuggestField)}):t.each(FLBuilder._initAutoSuggestField)},_initAutoSuggestField:function(){var t=e(this);t.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:t.data("action"),fl_as_action_data:t.data("action-data"),_wpnonce:FLBuilderConfig.ajaxNonce}),e.extend({},{asHtmlID:t.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:2,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,preFill:t.data("value"),queryParam:"fl_as_query",afterSelectionAdd:FLBuilder._updateAutoSuggestField,afterSelectionRemove:FLBuilder._updateAutoSuggestField,selectionLimit:t.data("limit"),canGenerateNewSelections:!1},t.data("args"))),FLBuilderSettingsForms.hideFieldLoader(t)},_updateAutoSuggestField:function(t,i,l){e(this).siblings(".as-values").val(l.join(",")).trigger("change")},_CodeFieldSSLCheck:function(){e("body").append('<div class="sg-test" style="display:none"><svg xmlns="http://www.w3.org/2000/svg"></svg></div>'),"https://www.w3.org/2000/svg"===e(".sg-test").find("svg").attr("xmlns")&&(FLBuilder._codeDisabled=!0),e(".sg-test").remove()},_initCodeFields:function(){FLBuilder._codeDisabled||e(".fl-builder-settings:visible").find(".fl-code-field").each(FLBuilder._initCodeField)},_initCodeField:function(){var t=e(this),i=t.closest(".fl-builder-settings"),l=t.find("textarea"),n=(l.attr("id"),l.data("editor")),o=l.data("wrap"),s=e("<div>",{position:"absolute",height:20*parseInt(l.attr("rows"),10)}),r=null,a=!(!i.hasClass("fl-builder-global-settings")&&!i.hasClass("fl-builder-layout-settings"));s.insertBefore(l),l.css("display","none"),ace.require("ace/ext/language_tools"),r=ace.edit(s[0]),r.$blockScrolling=1/0,r.getSession().setValue(l.val()),r.getSession().setMode("ace/mode/"+n),o&&r.getSession().setUseWrapMode(!0),r.setOptions(FLBuilderConfig.AceEditorSettings),r.getSession().on("change",function(e){l.val(r.getSession().getValue()).trigger("change")}),r.getSession().on("changeAnnotation",function(){for(var e=r.getSession().getAnnotations(),t=i.find(".fl-builder-settings-save"),l=i.find(".fl-builder-settings-error"),n=!1,o=0;o<e.length;o++)if(!(e[o].text.indexOf("DOCTYPE")>-1||e[o].text.indexOf("Named entity expected")>-1||e[o].text.indexOf("@supports")>-1||"error"!==e[o].type)){n=!0;break}val=r.getSession().getValue(),a&&n&&null!==val.match(/<\/iframe>|<\/script>/gm)&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldCriticalError)),n&&!t.hasClass("fl-builder-settings-error")&&l.length&&FLBuilderConfig.CheckCodeErrors&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldError)),n||(l.removeClass("fl-builder-settings-error"),l.off("click",FLBuilder._showCodeFieldError),l.off("click",FLBuilder._showCodeFieldCriticalError))}),l.closest(".fl-field").data("editor",r)},_showCodeFieldError:function(t){t.stopImmediatePropagation(),FLBuilder.confirm({message:FLBuilderStrings.codeError,cancel:function(){var t=e(".fl-builder-settings:visible .fl-builder-settings-save");t.removeClass("fl-builder-settings-error"),t.off("click",FLBuilder._showCodeFieldError),t.trigger("click")},strings:{ok:FLBuilderStrings.codeErrorFix,cancel:FLBuilderStrings.codeErrorIgnore}})},_showCodeFieldCriticalError:function(e){e.stopImmediatePropagation(),FLBuilder.alert(FLBuilderStrings.codeerrorhtml)},_initMultipleFields:function(){var t=e(".fl-builder-settings:visible .fl-builder-field-multiples"),i=null,l=null,n=0,o=FLBuilderConfig.isRtl?{left:10}:{right:10},s=t.attr("data-limit")||0,r=e("tbody.fl-builder-field-multiples").find("tr").length||0;for(parseInt(s)>0&&r-1>=parseInt(s)?(e(".fl-builder-field-copy").hide(),e(".fl-builder-field-add").fadeOut()):e(".fl-builder-field-copy, .fl-builder-field-add").show();n<t.length;n++)i=t.eq(n),l=i.find(".fl-builder-field-multiple"),1===l.length?l.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):l.find(".fl-builder-field-actions").removeClass("fl-builder-field-actions-single");e(".fl-builder-field-multiples").sortable({items:".fl-builder-field-multiple",cursor:"move",cursorAt:o,distance:5,opacity:.5,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer",axis:"y"})},_addFieldClicked:function(){var t=e(this),i=t.attr("data-field"),l=t.closest("tr").siblings("tr[data-field="+i+"]").last(),n=l.clone(),o=n.find(".fl-form-field"),s=null,r=null,a=parseInt(l.find("label span.fl-builder-field-index").html(),10)+1;n.find("th label span.fl-builder-field-index").html(a),n.find(".fl-form-field-preview-text").html(""),n.find(".fl-form-field-before").remove(),n.find(".fl-form-field-after").remove(),n.find("input, textarea, select").val(""),l.after(n),FLBuilder._initMultipleFields(),o.length?(s=o.find(".fl-form-field-edit").data("type"),o.find("input").val(JSON.stringify(FLBuilderSettingsConfig.defaults.forms[s]))):(o=t.closest("form.fl-builder-settings"),s=o.data("type"),s&&o.hasClass("fl-builder-module-settings")&&(r=FLBuilderSettingsConfig.defaults.modules[s][i][0],n.find("input, textarea, select").val(r)))},_copyFieldClicked:function(){var t=e(this),i=t.closest("tr"),l=i.clone(),n=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;l.find("th label span.fl-builder-field-index").html(n),i.after(l),FLBuilder._renumberFields(i.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var t=e(this).closest("tr"),i=t.parent(),l=confirm(FLBuilderStrings.deleteFieldMessage);l&&(t.remove(),FLBuilder._renumberFields(i),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){for(var t=e.find(".fl-builder-field-multiple"),i=0;i<t.length;i++)t.eq(i).find("th label span.fl-builder-field-index").html(i+1)},_fieldDragHelper:function(){return e('<div class="fl-builder-field-dd-helper"></div>')},_fieldDragStop:function(e,t){FLBuilder._renumberFields(t.item.parent()),FLBuilder.preview.delayPreview()},_initSelectFields:function(){var t=e(".fl-builder-settings:visible").find("select");t.on("change",FLBuilder._settingsSelectChanged),t.trigger("change"),t.on("change",FLBuilder._calculateSettingsTabsOverflow);var i=e(".fl-builder-settings:visible").find(".fl-button-group-field input[type=hidden]");i.on("change",FLBuilder._settingsSelectChanged),i.trigger("change"),i.on("change",FLBuilder._calculateSettingsTabsOverflow)},_settingsSelectChanged:function(){var t=e(this),i=t.attr("data-toggle"),l=t.attr("data-hide"),n=t.attr("data-trigger"),o=t.val(),s=0,r=(t.attr("name"),!1);if("undefined"!=typeof i){i=FLBuilder._jsonParse(i),r=!0;for(s in i)r&&(FLBuilder._settingsSelectToggle(i[s].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[s].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[s].tabs,"hide","a[href*=fl-builder-settings-tab-","]"));"undefined"!=typeof i[o]&&r&&(FLBuilder._settingsSelectToggle(i[o].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(i[o].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[o].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof l){l=FLBuilder._jsonParse(l);for(s in l)FLBuilder._settingsSelectToggle(l[s].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(l[s].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[s].tabs,"show","a[href*=fl-builder-settings-tab-","]");"undefined"!=typeof l[o]&&(FLBuilder._settingsSelectToggle(l[o].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l[o].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[o].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof n&&(n=FLBuilder._jsonParse(n),"undefined"!=typeof n[o]&&"undefined"!=typeof n[o].fields))for(s=0;s<n[o].fields.length;s++)e("#fl-field-"+n[o].fields[s]).find("select").trigger("change")},_settingsSelectToggle:function(t,i,l,n){var o=0;if(n="undefined"==typeof n?"":n,"undefined"!=typeof t)for(;o<t.length;o++)e(".fl-builder-settings:visible").find(l+t[o]+n)[i](),e(l+t[o]+n).parent().find('.fl-field[data-type="code"]').each(function(){FLBuilder._codeDisabled||e(this).data("editor").resize()})},_initColorPickers:function(){var t=FLBuilderConfig.colorPresets?FLBuilderConfig.colorPresets:[];FLBuilder.colorPicker=new FLBuilderColorPicker({mode:"hsv",elements:".fl-color-picker .fl-color-picker-value",presets:t,labels:{colorPresets:FLBuilderStrings.colorPresets,colorPicker:FLBuilderStrings.colorPicker,placeholder:FLBuilderStrings.placeholder,removePresetConfirm:FLBuilderStrings.removePresetConfirm,noneColorSelected:FLBuilderStrings.noneColorSelected,alreadySaved:FLBuilderStrings.alreadySaved,noPresets:FLBuilderStrings.noPresets,presetAdded:FLBuilderStrings.presetAdded}}),e(FLBuilder.colorPicker).on("presetRemoved presetAdded presetSorted",function(e,t){FLBuilder.ajax({action:"save_color_presets",presets:t.presets})})},_initGradientPickers:function(){e(".fl-builder-settings:visible .fl-gradient-picker").each(FLBuilder._initGradientPicker)},_initGradientPicker:function(){var t=e(this),i=t.find(".fl-gradient-picker-type-select"),l=t.find(".fl-gradient-picker-angle-wrap"),n=t.find(".fl-gradient-picker-position");i.on("change",function(){"linear"===e(this).val()?(l.show(),n.hide()):(l.hide(),n.show())})},_initPhotoFields:function(){var t=e(".fl-builder-settings:visible").find(".fl-photo-field select");t.on("change",FLBuilder._toggleSettingsOnIconChange),t.trigger("change")},_initSinglePhotoSelector:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:FLBuilderConfig.uploadTypes.image},multiple:!1}),FLBuilder._singlePhotoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="photo")},_selectSinglePhoto:function(){FLBuilder._initSinglePhotoSelector(),FLBuilder._singlePhotoSelector.once("open",e.proxy(FLBuilder._singlePhotoOpened,this)),FLBuilder._singlePhotoSelector.once("select",e.proxy(FLBuilder._singlePhotoSelected,this)),FLBuilder._singlePhotoSelector.open()},_singlePhotoOpened:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection"),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),n=l.val(),o=null;e(this).hasClass("fl-photo-replace")?(t.reset(),i.addClass("fl-photo-empty"),l.val("")):""!==n?(o=wp.media.attachment(n),o.fetch(),t.add(o?[o]:[])):t.reset()},_singlePhotoSelected:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),n=i.find(".fl-photo-preview img"),o=i.find("select");l.val(t.id),n.attr("src",FLBuilder._getPhotoSrc(t)),i.removeClass("fl-photo-empty").removeClass("fl-photo-no-attachment"),i.find("label.error").remove(),o.show(),o.html(FLBuilder._getPhotoSizeOptions(t)),o.trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_singlePhotoRemoved:function(){FLBuilder._initSinglePhotoSelector();var t=FLBuilder._singlePhotoSelector.state(),i="undefined"!=typeof t?t.get("selection"):null,l=e(this).closest(".fl-photo-field"),n=l.find("input[type=hidden]"),o=l.find("select");i&&i.reset(),l.addClass("fl-photo-empty"),n.val(""),o.html('<option value="" selected></option>'),o.trigger("change")},_getPhotoSrc:function(e){return"undefined"==typeof e.sizes?e.url:"undefined"!=typeof e.sizes.thumbnail?e.sizes.thumbnail.url:e.sizes.full.url},_getPhotoSizeOptions:function(e,t){var i="",l=null,n=null,o="",s={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if("undefined"==typeof e.sizes||0===e.sizes.length)i+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else{t&&(t=t.split(/[\\\/]/).pop());for(l in e.sizes)o="undefined"!=typeof s[l]?s[l]+" - ":"undefined"!=typeof FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]+" - ":"",n="",t?t===e.sizes[l].url.split(/[\\\/]/).pop()&&(n=' selected="selected"'):n="full"==l?' selected="selected"':"",i+='<option value="'+e.sizes[l].url+'"'+n+">"+o+e.sizes[l].width+" x "+e.sizes[l].height+"</option>"}return i},_selectMultiplePhotos:function(){var t=e(this).closest(".fl-multiple-photos-field"),i=t.find("input[type=hidden]"),l=i.val(),n=""===l?"":FLBuilder._jsonParse(l),o=wp.media.gallery.defaults.id,s='[gallery ids="-1"]',r=null,a=null,d=null,u=null,c=[];if("object"==typeof n){for(u in n)c.push(n[u]);s='[gallery ids="'+c.join()+'"]'}r=wp.shortcode.next("gallery",s).shortcode,_.isUndefined(r.get("id"))&&!_.isUndefined(o)&&r.set("id",o),a=wp.media.gallery.attachments(r),d=new wp.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:!0}),d.gallery=a.gallery,d.more().done(function(){d.length||FLBuilder._multiplePhotoSelector.setState("gallery-library"),d.props.set({query:!1}),d.unmirror(),d.props.unset("orderby")}),FLBuilder._multiplePhotoSelector&&FLBuilder._multiplePhotoSelector.dispose(),FLBuilder._multiplePhotoSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-photos-edit")?"gallery-edit":"gallery-library",title:wp.media.view.l10n.editGalleryTitle,editing:!0,multiple:!0,selection:d}).open(),e(FLBuilder._multiplePhotoSelector.views.view.el).addClass("fl-multiple-photos-lightbox"),FLBuilder._multiplePhotoSelector.once("update",e.proxy(FLBuilder._multiplePhotosSelected,this))},_multiplePhotosSelected:function(t){for(var i=e(this).closest(".fl-multiple-photos-field"),l=i.find("input[type=hidden]"),n=i.find(".fl-multiple-photos-count"),o=[],s=0;s<t.models.length;s++)o.push(t.models[s].id);1==o.length?n.html("1 "+FLBuilderStrings.photoSelected):n.html(o.length+" "+FLBuilderStrings.photosSelected),i.removeClass("fl-multiple-photos-empty"),i.find("label.error").remove(),l.val(JSON.stringify(o)).trigger("change")},_initSingleVideoSelector:function(){null===FLBuilder._singleVideoSelector&&(FLBuilder._singleVideoSelector=wp.media({title:FLBuilderStrings.selectVideo,button:{text:FLBuilderStrings.selectVideo},library:{type:FLBuilderConfig.uploadTypes.video},multiple:!1}),FLBuilder._singleVideoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="video")},_selectSingleVideo:function(){FLBuilder._initSingleVideoSelector(),FLBuilder._singleVideoSelector.once("select",e.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var t=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-video-field"),l=i.find(".fl-video-preview-img"),n=i.find(".fl-video-preview-filename"),o=i.find("input[type=hidden]");l.html('<span class="dashicons dashicons-media-video"></span>'),n.html(t.filename),i.removeClass("fl-video-empty"),i.find("label.error").remove(),o.val(t.id).trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_singleVideoRemoved:function(){FLBuilder._initSingleVideoSelector();var t=FLBuilder._singleVideoSelector.state(),i="undefined"!=typeof t?t.get("selection"):null,l=e(this).closest(".fl-video-field"),n=l.find(".fl-video-preview-img img"),o=l.find(".fl-video-preview-filename"),s=l.find("input[type=hidden]");i&&i.reset(),n.attr("src",""),o.html(""),l.addClass("fl-video-empty"),s.val("").trigger("change")},_selectMultipleAudios:function(){var t=e(this).closest(".fl-multiple-audios-field"),i=t.find("input[type=hidden]"),l=i.val(),n=""==l?'[playlist ids="-1"]':'[playlist ids="'+FLBuilder._jsonParse(l).join()+'"]',o=wp.shortcode.next("playlist",n).shortcode,s=wp.media.playlist.defaults.id,r=null,a=null;_.isUndefined(o.get("id"))&&!_.isUndefined(s)&&o.set("id",s),r=wp.media.playlist.attachments(o),a=new wp.media.model.Selection(r.models,{props:r.props.toJSON(),multiple:!0}),a.playlist=r.playlist,a.more().done(function(){a.props.set({query:!1}),a.unmirror(),a.props.unset("orderby")}),FLBuilder._multipleAudiosSelector&&FLBuilder._multipleAudiosSelector.dispose(),FLBuilder._multipleAudiosSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-audios-edit")?"playlist-edit":"playlist-library",title:wp.media.view.l10n.editPlaylistTitle,editing:!0,multiple:!0,selection:a}).open(),FLBuilder._multipleAudiosSelector.content.get("view").sidebar.unset("playlist"),FLBuilder._multipleAudiosSelector.on("content:render:browse",function(e){e&&e.sidebar.on("ready",function(){e.sidebar.unset("playlist")})}),FLBuilder._multipleAudiosSelector.once("update",e.proxy(FLBuilder._multipleAudiosSelected,this))},_multipleAudiosSelected:function(t){for(var i=e(this).closest(".fl-multiple-audios-field"),l=i.find(".fl-multiple-audios-count"),n=i.find("input[type=hidden]"),o=[],s=0;s<t.models.length;s++)o.push(t.models[s].id);1==o.length?l.html("1 "+FLBuilderStrings.audioSelected):l.html(o.length+" "+FLBuilderStrings.audiosSelected),n.val(JSON.stringify(o)).trigger("change"),i.removeClass("fl-multiple-audios-empty"),i.find("label.error").remove()},_initIconFields:function(){var t=e(".fl-builder-settings:visible").find(".fl-icon-field input");t.on("change",FLBuilder._toggleSettingsOnIconChange),t.trigger("change")},_toggleSettingsOnIconChange:function(){var t=e(this),i=t.val(),l=t.attr("data-show");"undefined"!=typeof l&&(l=FLBuilder._jsonParse(l),FLBuilder._settingsSelectToggle(l.fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l.sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l.tabs,"hide","a[href*=fl-builder-settings-tab-","]"),i&&(FLBuilder._settingsSelectToggle(l.fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(l.sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l.tabs,"show","a[href*=fl-builder-settings-tab-","]"),FLBuilder._calculateSettingsTabsOverflow()))},_selectIcon:function(){var e=this;FLIconSelector.open(function(t){FLBuilder._iconSelected.apply(e,[t])})},_iconSelected:function(t){var i=e(this).closest(".fl-icon-field"),l=i.find("input[type=hidden]"),n=i.find("i"),o=n.attr("data-icon");l.val(t).trigger("change"),n.removeClass(o),n.addClass(t),n.attr("data-icon",t),i.removeClass("fl-icon-empty"),i.find("label.error").remove()},_removeIcon:function(){var t=e(this).closest(".fl-icon-field"),i=t.find("input[type=hidden]"),l=t.find("i");i.val("").trigger("change"),l.removeClass(),l.attr("data-icon",""),t.addClass("fl-icon-empty")},_formFieldClicked:function(){var t=e(this),i=t.closest(".fl-builder-settings"),l=t.attr("data-type"),n=t.siblings("input").val(),o=FLBuilder._moduleHelpers[l],s=(FLBuilderSettingsConfig.forms[l],FLBuilder._openNestedSettings({className:"fl-builder-lightbox fl-form-field-settings"}));""===n&&(n=JSON.stringify(FLBuilderSettingsConfig.forms[l])),FLBuilderSettingsForms.render({id:l,nodeId:i.attr("data-node"),nodeSettings:FLBuilder._getSettings(i),settings:FLBuilder._jsonParse(n.replace(/&#39;/g,"'")),lightbox:s,helper:o,rules:o?o.rules:null},function(){t.attr("id","fl-"+s._node.attr("data-instance-id")),s._node.find("form.fl-builder-settings").attr("data-type",l),FLBuilderResponsiveEditing._switchAllSettingsToCurrentMode()})},_saveFormFieldClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),l=t.attr("data-type"),n=FLBuilder._getSettings(t),o={},s=FLBuilder._moduleHelpers[l],r=e(".fl-builder-settings #fl-"+i),a=r.parent().attr("data-preview-text"),d=t.find("#fl-field-"+a),u=n[a],c=e('select[name="'+a+'"]'),f=document.createElement("div"),h=!0;return c.length>0&&(u=c.find('option[value="'+n[a]+'"]').text()),"undefined"!=typeof s&&(t.find("label.error").remove(),t.validate().hideErrors(),h=t.validate().form(),h&&(h=s.submit())),h?("undefined"!=typeof a&&"undefined"!=typeof u&&("icon"===d.data("type")?u='<i class="'+u+'"></i>':u.length>35&&(f.innerHTML=u,u=(f.textContent||f.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),r.siblings(".fl-form-field-preview-text").html(u)),o=r.siblings("input").val().replace(/&#39;/g,"'"),""!=o&&(n=e.extend(FLBuilder._jsonParse(o),n)),r.siblings("input").val(JSON.stringify(n)).trigger("change"),FLBuilder._closeNestedSettings(),!0):(FLBuilder._toggleSettingsTabErrors(),!1)},_layoutFieldClicked:function(){var t=e(this);t.siblings().removeClass("fl-layout-field-option-selected"),t.addClass("fl-layout-field-option-selected"),t.siblings("input").val(t.attr("data-value"))},_initLinkFields:function(){e(".fl-builder-settings:visible .fl-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var t=e(this),i=t.find(".fl-link-field-search-input"),l=t.find(".fl-link-field-options-wrap input[type=checkbox]");i.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links",_wpnonce:FLBuilderConfig.ajaxNonce}),{asHtmlID:i.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:3,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,queryParam:"fl_as_query",selectionLimit:1,afterSelectionAdd:FLBuilder._updateLinkField,formatList:function(e,t){var i=t.html(e.name+'<span class="type">['+e.type+"]</span>");return i}}),l.on("click",FLBuilder._linkFieldCheckboxClicked)},_updateLinkField:function(e,t,i){var l=e.closest(".fl-link-field"),n=l.find(".fl-link-field-search"),o=l.find(".fl-link-field-search-input"),s=l.find(".fl-link-field-input");s.val(t.value).trigger("keyup"),o.autoSuggest("remove",t.value),n.hide()},_linkFieldSelectClicked:function(){var t=e(this).closest(".fl-link-field").find(".fl-link-field-search");t.show(),t.find("input").focus()},_linkFieldSelectCancelClicked:function(){var t=e(this);t.parent().hide(),t.closest(".fl-link-field").find("input.fl-link-field-input").focus()},_linkFieldCheckboxClicked:function(){var t=e(this),i=t.is(":checked"),l=t.siblings("input[type=hidden]"),n="";n=t.hasClass("fl-link-field-target-cb")?i?"_blank":"_self":i?"yes":"no",l.val(n)},_initFontFields:function(){e(".fl-builder-settings:visible .fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var t=e(this),i=t.attr("data-value"),l=t.find(".fl-font-field-font"),n=t.find(".fl-font-field-weight");FLBuilderConfig.select2Enabled&&l.select2({width:"100%"}).on("select2:open",function(t){e(".select2-search__field").attr("placeholder",FLBuilderStrings.placeholderSelect2)}),l.on("change",function(){FLBuilder._getFontWeights(l)}),i.indexOf("family")>-1&&(i=FLBuilder._jsonParse(i),l.val(i.family),l.trigger("change"),n.find("option[value="+i.weight+"]").length&&n.val(i.weight))},_getFontWeights:function(t){var i=t.closest(".fl-font-field").find(".fl-font-field-weight"),l=t.val(),n=i.val(),o=FLBuilderConfig.FontWeights,s={},r=t.closest(".fl-font-field").find(".recent-fonts option");if(i.html(""),r.length>0){var a=e(r).filter(function(e,t){return t.value===l}).length>0;!1===a&&t.closest(".fl-font-field").find(".recent-fonts").append(e("<option>",{value:l,text:l}))}s="undefined"!=typeof FLBuilderFontFamilies.system[l]?FLBuilderFontFamilies.system[l].weights:"undefined"!=typeof FLBuilderFontFamilies.google[l]?FLBuilderFontFamilies.google[l]:FLBuilderFontFamilies["default"][l],e.each(s,function(e,t){var l=n===t?" selected":"";i.append('<option value="'+t+'"'+l+">"+o[t]+"</option>")})},_initTinyMCE:function(){"object"==typeof tinymce&&"undefined"!=typeof tinymce.ui.FloatPanel&&(tinymce.ui.FloatPanel.zIndex=100100),e(".fl-builder-hidden-editor").each(FLBuilder._initEditorField)},_initEditorFields:function(){e(".fl-builder-settings:visible .fl-editor-field").each(FLBuilder._initEditorField)},_initEditorField:function(){var t=e(this),i=t.find("textarea"),l=t.attr("data-name"),n="flrich"+(new Date).getTime()+"_"+l,o=FLBuilderConfig.wp_editor,s=tinyMCEPreInit,r=Number(t.attr("data-buttons")),a=t.attr("data-rows"),d=null,u=null;o=o.replace(/flbuildereditor/g,n),s=FLBuilder._jsonParse(JSON.stringify(s).replace(/flbuildereditor/g,n)),s=JSONfn.parse(JSONfn.stringify(s).replace(/flbuildereditor/g,n)),i.after(o).remove(),e("textarea#"+n).val(i.val()),void 0!==typeof tinymce&&void 0!==s.mceInit[n]&&(d=s.mceInit[n],d.setup=function(e){e.on("SaveContent",function(e){e.content=e.content.replace(/<a href="(\.\.\/){1,2}/g,'<a href="'+FLBuilderConfig.homeUrl+"/"),
6
  e.content=e.content.replace(/src="(\.\.\/){1,2}/g,'src="'+FLBuilderConfig.homeUrl+"/")})},u=tinymce.$("#wp-"+n+"-wrap"),u.find("textarea").attr("rows",a),r||u.find(".wp-media-buttons").remove(),!u.hasClass("tmce-active")&&s.qtInit.hasOwnProperty(n)||d.wp_skip_init||tinymce.init(d)),void 0!==typeof quicktags&&quicktags(s.qtInit[n]),window.wpActiveEditor=n},_reinitEditorFields:function(){e(".fl-lightbox-resizable:visible").length&&setTimeout(function(){var t,i;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)tinymce.editors[t].inline||(i=tinymce.editors[t].id,tinyMCE.execCommand("mceRemoveEditor",!0,i),tinyMCE.execCommand("mceAddEditor",!0,i));FLBuilder.preview&&FLBuilder.preview._initDefaultFieldPreviews(e('.fl-field[data-type="editor"]'))}},1)},_destroyEditorFields:function(){var t;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)tinymce.editors[t].inline||tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[t].id);e(".wplink-autocomplete").remove(),e(".ui-helper-hidden-accessible").remove()}},_updateEditorFields:function(){var t=e(".fl-builder-settings:visible textarea.wp-editor-area");t.each(FLBuilder._updateEditorField)},_updateEditorField:function(){var t=e(this),i=t.closest(".fl-editor-field"),l=(t.closest(".fl-builder-settings"),t.closest(".wp-editor-wrap")),n=t.attr("id"),o=i.attr("data-name"),s="undefined"!=typeof tinymce&&tinymce.get(n),r=t.siblings('textarea[name="'+o+'"]'),a=i.data("wpautop");0===r.length&&(r=e('<textarea name="'+o+'"></textarea>').hide(),t.after(r)),a?s&&l.hasClass("tmce-active")?r.val(s.getContent()):"undefined"!=typeof switchEditors?r.val(switchEditors.wpautop(t.val())):r.val(t.val()):(s&&l.hasClass("tmce-active")&&s.save(),r.val(t.val()))},_loopDataSourceChange:function(){var t=e(this).val();e(".fl-loop-data-source").hide(),e('.fl-loop-data-source[data-source="'+t+'"]').show()},_customQueryPostTypeChange:function(){var t=e(this).val();e(".fl-custom-query-filter").hide(),e(".fl-custom-query-"+t+"-filter").show()},_initOrderingFields:function(){e(".fl-builder-settings:visible .fl-ordering-field-options").each(FLBuilder._initOrderingField)},_initOrderingField:function(){e(this).sortable({items:".fl-ordering-field-option",containment:"parent",tolerance:"pointer",stop:FLBuilder._updateOrderingField})},_updateOrderingField:function(t){var i=e(t.target),l=i.siblings("input[type=hidden]"),n=[];i.find(".fl-ordering-field-option").each(function(){n.push(e(this).attr("data-key"))}),l.val(JSON.stringify(n)).trigger("change")},_textFieldAddValueSelectChange:function(){var t=e(this),i=e('input[name="'+t.data("target")+'"]'),l=i.val(),n=t.val(),o="";-1==l.indexOf(n)&&(o=(l.trim()+" "+n.trim()).trim(),i.val(o).trigger("change").trigger("keyup")),t.val("")},_onNumberFieldFocus:function(t){var i=e(t.currentTarget);i.addClass("mousetrap"),Mousetrap.bind("up",function(){i.attr("step",1)}),Mousetrap.bind("down",function(){i.attr("step",1)}),Mousetrap.bind("shift+up",function(){i.attr("step",10)}),Mousetrap.bind("shift+down",function(){i.attr("step",10)})},_onNumberFieldBlur:function(t){var i=e(t.currentTarget);i.attr("step","any").removeClass("mousetrap")},_initTimezoneFields:function(){e(".fl-builder-settings:visible .fl-field[data-type=timezone]").each(FLBuilder._initTimezoneField)},_initTimezoneField:function(){var t=e(this).find("select"),i=t.attr("data-value");t.find('option[value="'+i+'"]').prop("selected",!0)},_initDimensionFields:function(){var t=e(".fl-builder-settings:visible");t.find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionField),t.find(".fl-dimension-field-link").on("click",FLBuilder._dimensionFieldLinkClicked),FLBuilder.addHook("responsive-editing-switched",this._initResponsiveDimensionFieldLinking),t.find(".fl-compound-field-setting").has(".fl-dimension-field-link").each(FLBuilder._initDimensionFieldLinking)},_initDimensionField:function(){var t=e(this),i=t.find(".fl-field-label label"),l=t.find(".fl-field-control-wrapper"),n='<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>';i.append(n),l.prepend(n),FLBuilder._initTipTips(),FLBuilder._initDimensionFieldLinking.apply(this)},_initDimensionFieldLinking:function(){var t=e(this),i=t.find(".fl-dimension-field-link"),l=FLBuilder._getDimensionFieldLinkingInputs(t),n=FLBuilder._dimensionFieldInputsAreEqual(l);n?(i.removeClass("dashicons-admin-links"),i.addClass("dashicons-editor-unlink"),l.off("input",FLBuilder._dimensionFieldLinkedValueChange),l.on("input",FLBuilder._dimensionFieldLinkedValueChange)):(i.addClass("dashicons-admin-links"),i.removeClass("dashicons-editor-unlink"))},_initResponsiveDimensionFieldLinking:function(){var t=e(".fl-builder-settings:visible");t.find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionFieldLinking)},_dimensionFieldLinkClicked:function(){var t=e(this),i=t.closest(".fl-compound-field-setting"),l=i.length?i:t.closest(".fl-field"),n=l.find(".fl-dimension-field-link"),o=n.hasClass("dashicons-editor-unlink"),s=FLBuilder._getDimensionFieldLinkingInputs(l);n.toggleClass("dashicons-admin-links"),n.toggleClass("dashicons-editor-unlink"),o?s.off("input",FLBuilder._dimensionFieldLinkedValueChange):(s.val(s.eq(0).val()).trigger("input"),s.on("input",FLBuilder._dimensionFieldLinkedValueChange))},_dimensionFieldLinkedValueChange:function(){var t=e(this),i=t.attr("name"),l=t.closest(".fl-dimension-field-units"),n=l.find('input:not([name="'+i+'"])');n.off("input",FLBuilder._dimensionFieldLinkedValueChange),n.val(t.val()).trigger("input"),n.on("input",FLBuilder._dimensionFieldLinkedValueChange)},_getDimensionFieldLinkingInputs:function(e){var t=!!e.find(".fl-field-responsive-setting").length,i=FLBuilderResponsiveEditing._mode,l=null;return l=t?e.find(".fl-field-responsive-setting-"+i+" input"):e.find(".fl-dimension-field-unit input")},_dimensionFieldInputsAreEqual:function(e){var t=e.eq(0).val();if(""===t)return!1;for(var i=1;i<4;i++)if(e.eq(i).val()!==t)return!1;return!0},_initFieldPopupSliders:function(){var t=e(".fl-builder-settings:visible"),i=t.find(".fl-field-popup-slider");i.each(FLBuilder._initFieldPopupSlider)},_initFieldPopupSlider:function(){var t=e("body"),i=e(this),l=i.find(".fl-field-popup-slider-input"),n=i.find(".fl-field-popup-slider-arrow"),o=i.data("input"),s=e('input[name="'+o+'"]');s.on("click",function(){l.hasClass("fl-field-popup-slider-init")||(l.slider({value:s.val(),slide:function(e,t){s.val(t.value).trigger("input")}}),s.on("input",function(){l.slider("value",e(this).val())}),l.addClass("fl-field-popup-slider-init"),l.find(".ui-slider-handle").removeAttr("tabindex")),FLBuilder._setFieldPopupSliderMinMax(l),FLBuilder._hideFieldPopupSliders(),t.on("mousedown",FLBuilder._hideFieldPopupSliders),s.addClass("fl-field-popup-slider-focus"),i.show();var o=e(".fl-builder-settings:visible .fl-builder-settings-tab.fl-active"),r=o.offset(),a=s.offset(),d=s.width(),u=i.offset();u.top+i.outerHeight()>r.top+o.outerHeight()&&i.addClass("fl-field-popup-slider-top"),n.css("left",2+a.left-u.left+d/2+"px")}),s.on("focus",function(){FLBuilder._hideFieldPopupSliders()})},_hideFieldPopupSliders:function(t){var i=t?e(t.target):null,l=e("body"),n=e(".fl-field-popup-slider:visible"),o=e(".fl-field-popup-slider-focus");if(i){if(i.closest(".fl-field-popup-slider").length)return;if(i.closest(".fl-field-popup-slider-focus").length)return}l.off("mousedown",FLBuilder._hideFieldPopupSliders),o.removeClass("fl-field-popup-slider-focus"),n.hide()},_setFieldPopupSliderMinMax:function(e){var t=e.parent(),i=t.parent().parent(),l=i.find("select.fl-field-unit-select"),n=l.val(),o=t.data("slider"),s=0,r=100,a=1;""!==n&&"em"!==n&&"rem"!==n||(r=10,a=.1),"object"==typeof o&&(s=o.min?parseFloat(o.min):s,r=o.max?parseFloat(o.max):r,a=o.step?parseFloat(o.step):a,l.length&&o[n]&&(s=o[n].min?parseFloat(o[n].min):s,r=o[n].max?parseFloat(o[n].max):r,a=o[n].step?parseFloat(o[n].step):a)),e.slider({min:s,max:r,step:a})},_initPresetFields:function(){var t=e(".fl-builder-settings:visible"),i=t.find(".fl-preset-select-controls");i.each(FLBuilder._initPresetField)},_initPresetField:function(){var t=e(this),i=t.find("select"),l=t.data("presets"),n=t.data("prefix");i.on("change",FLBuilder._setFormPreset.bind(this,l,n))},_setFormPreset:function(t,i,l){var n=e(l.currentTarget).val();if(presetLists=FLBuilderConfig.presets,presets=presetLists[t],form=e(".fl-builder-settings:visible"),"undefined"!==presets&&"undefined"!==presets[n]){var o=presets[n].settings;for(var s in o){var r,n=o[s];r="undefined"!=typeof i&&""!==i?form.find('[name="'+i+s+'"]'):form.find('[name="'+s+'"]'),r.val(n).trigger("change").trigger("input")}}},ajax:function(t,i){var l;if(FLBuilder._ajaxRequest)return void FLBuilder._ajaxQueue.push({data:t,callback:i});FLBuilder.triggerHook("didBeginAJAX",t);for(l in t)"undefined"==typeof t[l]&&(t[l]=null);return t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=FLBuilderConfig.postId,t.fl_builder=1,t.fl_action=t.action,"undefined"!=typeof t.settings&&(t.settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.settings))),"undefined"!=typeof t.node_settings&&(t.node_settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.node_settings))),"undefined"!=typeof t.node_preview&&(t.node_preview=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.node_preview))),t.settings=FLBuilder._inputVarsCheck(t.settings),t.node_settings=FLBuilder._inputVarsCheck(t.node_settings),"error"===t.settings||"error"===t.node_settings?0:(t={fl_builder_data:t},FLBuilder._ajaxRequest=e.post(FLBuilder._ajaxUrl(),t,function(e){"undefined"!=typeof i&&i.call(this,e),FLBuilder.triggerHook("didCompleteAJAX",t)}).always(FLBuilder._ajaxComplete).fail(function(e,t,i){switch(msg=!1,e.status){case 403:case 409:msg="Something you entered has triggered a "+e.status+" error.<br /><br />This is nearly always due to mod_security settings from your hosting provider.",window.crash_vars.white_label||(msg+='<br /><br />See this <a target="_blank" style="color: #428bca;font-size:inherit" href="https://kb.wpbeaverbuilder.com/article/40-403-forbidden-or-blocked-error">Knowledge Base</a> article for more info.</br />')}msg&&(console.log(e),console.log(i),FLBuilder.alert(msg))}),FLBuilder._ajaxRequest)},_inputVarsCheck:function(t){var i=FLBuilderConfig.MaxInputVars||0;return"undefined"!=typeof t&&i>0&&(count=e.map(t,function(e,t){return t}).length,count>i)?(FLBuilder.alert('<h1 style="font-size:2em;text-align:center">Critical Issue</h1><br />The number of settings being saved ('+count+") exceeds the PHP Max Input Vars setting ("+i+").<br />Please contact your host to have this value increased, the default is 1000."),console.log("Vars Count: "+count),console.log("Max Input: "+i),"error"):t},_ajaxComplete:function(){if(FLBuilder._ajaxRequest=null,FLBuilder.hideAjaxLoader(),FLBuilder._ajaxQueue.length){var e=FLBuilder._ajaxQueue.shift();FLBuilder.ajax(e.data,e.callback)}},_ajaxUrl:function(e){var t=FLBuilderConfig,i=t.shortlink,l=null;if("undefined"!=typeof e)for(l in e)i+=i.indexOf("?")>-1?"&":"?",i+=l+"="+e[l];return i},showAjaxLoader:function(){0===e(".fl-builder-lightbox-loading").length&&e(".fl-builder-loading").show()},hideAjaxLoader:function(){e(".fl-builder-loading").hide()},_showNodeLoading:function(t){var i=e(".fl-node-"+t);i.addClass("fl-builder-node-loading"),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didStartNodeLoading",i)},_hideNodeLoading:function(t){var i=e(".fl-node-"+t);i.removeClass("fl-builder-node-loading")},_showNodeLoadingPlaceholder:function(t,i){var l=e('<div class="fl-builder-node-loading-placeholder"></div>');e(".fl-builder-node-loading-placeholder").remove(),t.hasClass("fl-builder-content")?siblings=t.find(" > .fl-row"):t.hasClass("fl-row-content")?siblings=t.find(" > .fl-col-group"):t.hasClass("fl-col-group")?(t.addClass("fl-col-group-has-child-loading"),siblings=t.find(" > .fl-col")):siblings=t.find(" > .fl-col-group, > .fl-module"),0===siblings.length||siblings.length==i?t.append(l):siblings.eq(i).before(l)},_removeNodeLoadingPlaceholder:function(e){var t=e.prev(".fl-builder-node-loading-placeholder"),i=e.next(".fl-builder-node-loading-placeholder");t.length?t.remove():i.remove()},_ajaxModSecFix:function(e){var t;if(FLBuilderConfig.modSecFix&&"undefined"!=typeof btoa)if("string"==typeof e)e=FLBuilder._btoa(e);else for(t in e)"string"==typeof e[t]?e[t]=FLBuilder._btoa(e[t]):"object"==typeof e[t]&&(e[t]=FLBuilder._ajaxModSecFix(e[t]));return e},_btoa:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},_wpmedia_reset_errors:function(){e(".upload-error").remove(),e(".media-uploader-status").removeClass("errors").hide()},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox",resizable:!0}),FLBuilder._lightbox.on("resized",FLBuilder._calculateSettingsTabsOverflow),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._lightbox.on("beforeCloseLightbox",FLBuilder._destroyEditorFields),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_showLightbox:function(e){e||(e='<div class="fl-builder-lightbox-loading"></div>'),FLBuilder._lightbox.open(e),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder.triggerHook("settings-lightbox-closed"),FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=null},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder.triggerHook("actions-lightbox-settings",e),FLBuilder._actionsLightbox.open(t(e))},alert:function(e){var t=new FLLightbox({className:"fl-builder-alert-lightbox",destroyOnClose:!0}),i=wp.template("fl-alert-lightbox");t.open(i({message:e}))},crashMessage:function(e){FLLightbox.closeAll();var t=new FLLightbox({className:"fl-builder-alert-lightbox fl-builder-crash-lightbox",destroyOnClose:!0}),i=wp.template("fl-crash-lightbox"),l=window.crash_vars.product,n=window.crash_vars.white_label,o=window.crash_vars.labeled_txt;message=l+" has detected a plugin conflict that is preventing the page from saving.<p>( In technical terms there’s probably a PHP error in Ajax. )</p>",info="<p>If you contact Beaver Builder Support, we need to know what the error is in the JavaScript console in your browser.</p>",info+="<div><div style='width:49%;float:left;'>",info+="<p>MacOS Users:<br />Chrome: View > Developer > JavaScript Console<br />Firefox: Tools > Web Developer > Browser Console<br />Safari: Develop > Show JavaScript console</p>",info+="</div>",info+="<div style='width:49%;float:right;'>",info+="<p>Windows Users:<br />Chrome: Settings > More Tools > Developer > Console<br />Firefox: Menu/Settings > Web Developer > Web Console<br />Edge: Settings and More > More Tools > Console</p>",info+="</div></div>",info+="<p style='display:inline-block;'>Copy the errors you find there and submit them with your Support ticket. It saves us having to ask you that as a second step.<br /><br />If you want to troubleshoot further, you can check our <a class='link' target='_blank' href='https://kb.wpbeaverbuilder.com/article/42-known-beaver-builder-incompatibilities'>Knowledge Base</a> for plugins we know to be incompatible. Then deactivate your plugins one by one while you try to save the page in the Beaver Builder editor. When the page saves normally, you have identified the plugin causing the conflict. <a class='link' target='_blank' href='https://www.wpbeaverbuilder.com/beaver-builder-support/'>Contact Support</a> if you need further help.</p>",FLBuilderConfig.MaxInputVars<=3e3&&(info+="<br /><br />The PHP config value max_input_vars is only set to "+FLBuilderConfig.MaxInputVars+'. If you are using 3rd party addons this could very likely be the cause of this error. [<a class="link" href="https://kb.wpbeaverbuilder.com/article/746-troubleshooting-number-of-settings-being-saved-exceeds-php-max-input-vars">doc link</a>].'),e=!1,n&&(info=o),t.open(i({message:message,info:info,debug:e}))},_alertClose:function(){FLLightbox.closeParent(this)},confirm:function(t){var i={message:"",ok:function(){},cancel:function(){},strings:{ok:FLBuilderStrings.ok,cancel:FLBuilderStrings.cancel}},l=e.extend({},i,"undefined"==typeof t?{}:t);lightbox=new FLLightbox({className:"fl-builder-confirm-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),template=wp.template("fl-confirm-lightbox"),lightbox.open(template(l)),lightbox._node.find(".fl-builder-confirm-ok").on("click",l.ok),lightbox._node.find(".fl-builder-confirm-cancel").on("click",l.cancel)},triggerHook:function(t,i){e("body").trigger("fl-builder."+t,i)},addHook:function(t,i){e("body").on("fl-builder."+t,i)},removeHook:function(t,i){e("body").off("fl-builder."+t,i)},log:function(e){"undefined"!=typeof window.console&&"undefined"!=typeof window.console.log&&console.log(e)},logError:function(t,i){var l=null;"undefined"!=typeof t&&("undefined"!=typeof t.stack?l=t.stack:"undefined"!=typeof t.message&&(l=t.message),l&&(FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(l),"undefined"!=typeof i&&i&&(FLBuilder.log("Debug Info"),console.log(i)),e.each(window.crash_vars.vars,function(e,t){console.log(e+": "+t)}),FLBuilder.log("************************************************************************"),"undefined"!=typeof i&&i&&(l=i+"\n"+l),FLBuilder.crashMessage(l)))},logGlobalError:function(e,t,i,l,n){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",i).replace("{file}",t)),"undefined"!=typeof n&&"undefined"!=typeof n.stack&&FLBuilder.log(n.stack),FLBuilder.log("************************************************************************")},_jsonParse:function(e){try{e=JSON.parse(e)}catch(t){FLBuilder.logError(t,FLBuilder._parseError(e))}return e},_parseError:function(t){if(t.indexOf("</head>"))return"AJAX returned HTML page instead of data. (Possible 404 or max_input_vars)";if(php=t.match(/^<.*/gm)||!1,php&&php.length>0){var i="";return e.each(php,function(e,t){i+=t}),e(i).text()}return!1},isUndefined:function(e){return void 0===e},isBoolean:function(e){return e===!0||e===!1}},e(function(){FLBuilder._init()})}(jQuery),function(e){FLBuilderAJAXLayout=function(t,i){this._data=e.extend({},this._defaults,"string"==typeof t?FLBuilder._jsonParse(t):t),this._callback=i,this._post=FLBuilderConfig.postId,this._head=e("head").eq(0),this._body=e("body").eq(0),this._data.css&&("inline"===FLBuilderConfig.enqueueMethod?(this._oldCss=e("#fl-builder-layout-"+this._post+"-inline-css"),this._newCss=e('<style id="fl-builder-layout-'+this._post+'-inline-css" type="text/css">'+this._data.css+"</style>")):(this._loader=e('<img src="'+this._data.css+'" />'),this._oldCss=e('link[href*="/cache/'+this._post+'-layout"]'),this._newCss=e('<link rel="stylesheet" id="fl-builder-layout-'+this._post+'-css" href="'+this._data.css+'" />'))),this._data.partial?(this._data.js&&(this._oldJs=e("#fl-builder-partial-refresh-js"),this._newJs=e('<script type="text/javascript" id="fl-builder-partial-refresh-js">'+this._data.js+"</script>")),this._data.nodeId&&(this._data.oldNodeId?(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.oldNodeId+'"]'),this._content=e(".fl-node-"+this._data.oldNodeId)):(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.nodeId+'"]'),this._content=e(".fl-node-"+this._data.nodeId).eq(0)))):("inline"===FLBuilderConfig.enqueueMethod?(this._oldJs=e("#fl-builder-layout-"+this._post+"-inline-js"),this._newJs=e('<script id="fl-builder-layout-'+this._post+'-inline-js">'+this._data.js+"</script>")):(this._oldJs=e('script[src*="/cache/'+this._post+'"]'),this._newJs=e('<script src="'+this._data.js+'"></script>')),this._oldScriptsStyles=e(".fl-builder-layout-scripts-styles"),this._content=e(FLBuilder._contentClass)),this._init()},FLBuilderAJAXLayout.prototype={_defaults:{partial:!1,nodeId:null,nodeType:null,nodeParent:null,nodePosition:null,oldNodeId:null,html:null,scriptsStyles:null,css:null,js:null},_data:null,_callback:function(){},_post:null,_head:null,_body:null,_loader:null,_oldCss:null,_newCss:null,_oldJs:null,_newJs:null,_oldScriptsStyles:null,_content:null,_init:function(){this._body.height(this._body.height()),this._data.css?"inline"===FLBuilderConfig.enqueueMethod?(this._addNewCSS(),this._finish()):"onload"in document.createElement("link")?(this._newCss.on("load",e.proxy(this._finish,this)),this._addNewCSS()):(this._loader.on("error",e.proxy(this._loadNewCSSFallbackComplete,this)),this._body.append(this._loader)):this._finish()},_loadNewCSSFallbackComplete:function(){this._loader.remove(),this._addNewCSS(),setTimeout(e.proxy(this._finish,this),250)},_addNewCSS:function(){this._oldCss.length>0?this._oldCss.after(this._newCss):this._head.append(this._newCss)},_finish:function(){this._removeOldContentAndAssets(),this._cleanNewHTML(),this._cleanNewAssets(),this._addNewHTML(),this._addNewScriptsStyles(),this._addNewJS(),e(FLBuilder._contentClass).trigger("fl-builder.layout-rendered"),FLBuilder.hideAjaxLoader()},_removeOldContentAndAssets:function(){this._content&&this._content.empty(),this._oldCss&&this._oldCss.remove(),this._oldJs&&this._oldJs.remove(),this._oldScriptsStyles&&this._oldScriptsStyles.remove()},_cleanNewHTML:function(){if(this._data.scriptsStyles){var t=e("<div>"+this._data.html+"</div>"),i="fl-row",l=this._data.scriptsStyles,n="";this._data.partial&&(i="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),t.find("> *, script").each(function(){e(this).hasClass(i)||"application/json"==e(this).attr("type")||(n=e(this).remove(),l+=n[0].outerHTML)}),""!==l&&(l=this._data.partial?'<div class="fl-builder-node-scripts-styles" data-node="'+this._data.nodeId+'">'+l+"<div>":'<div class="fl-builder-node-scripts-styles">'+l+"<div>"),this._data.html=t.html(),this._data.scriptsStyles=l}},_addNewHTML:function(){var t;if(this._data.partial?this._data.nodeParent?(t=this._data.nodeParent.hasClass("fl-builder-content")?this._data.nodeParent.find(" > .fl-row"):this._data.nodeParent.hasClass("fl-row-content")?this._data.nodeParent.find(" > .fl-col-group"):this._data.nodeParent.hasClass("fl-col-group")?this._data.nodeParent.find(" > .fl-col"):this._data.nodeParent.find(" > .fl-col-group, > .fl-module"),t=t.filter(":not(.fl-builder-node-clone)"),0===t.length||this._data.nodePosition>=t.length?this._data.nodeParent.append(this._data.html):t.eq(this._data.nodePosition).before(this._data.html),this._data.nodeId&&FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+this._data.nodeId))):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.html),FLBuilder.preview&&this._data.nodeId&&this._data.nodeId!=FLBuilder.preview.nodeId){var i=e(FLBuilder.preview.classes.node),l=i.closest(".fl-node-"+this._data.nodeId).length;l&&i.html(FLBuilder.preview.elements.node.html())}this._data.onAddNewHTML&&this._data.onAddNewHTML()},_cleanNewAssets:function(){var t=this;this._data.html=this._removeDuplicateAssets(this._data.html),this._data.scriptsStyles&&""!==this._data.scriptsStyles&&(this._data.scriptsStyles=this._removeDuplicateAssets(this._data.scriptsStyles)),this._data.partial?e(".fl-builder-node-scripts-styles").each(function(){t._data.html.indexOf("fl-node-"+e(this).data("node"))>-1&&e(this).remove()}):(e("#fl-builder-partial-refresh-js").remove(),e(".fl-builder-node-scripts-styles").remove())},_removeDuplicateAssets:function(t){var i=e("<div>"+t+"</div>"),l="",n=null,o="",s=null,r=window.location,a=r.protocol+"//"+r.hostname+(r.port?":"+r.port:"");return i.find("script").each(function(){l=e(this).attr("src"),"undefined"!=typeof l&&(l=l.replace(a,""),n=e('script[src*="'+l+'"]'),n.length>0&&e(this).remove())}),i.find("link").each(function(){o=e(this).attr("href"),"undefined"!=typeof o&&(o=o.replace(a,""),s=e('link[href*="'+o+'"]'),s.length>0&&e(this).remove())}),i.html()},_addNewScriptsStyles:function(){this._data.scriptsStyles&&""!==this._data.scriptsStyles&&this._body.append(this._data.scriptsStyles)},_addNewJS:function(){setTimeout(e.proxy(function(){this._newJs&&this._head.append(this._newJs),FLBuilder.triggerHook("didRenderLayoutJSComplete")},this),50)},_complete:function(){FLBuilder._dragging?(FLBuilder._highlightRowsAndColsForDrag(),FLBuilder._refreshSortables()):(FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._resizeLayout()),FLBuilder._initMediaElements(),FLBuilderLayout.init(),FLBuilderResponsiveEditing.refreshPreview(this._callback),FLBuilder.triggerHook("didRenderLayoutComplete"),this._body.height("auto")}}}(jQuery),function(e){FLBuilderPreview=function(e){this.id=(new Date).getTime(),this.type=e.type,this._saveState(),e.layout?FLBuilder._renderLayout(e.layout,function(){this._init(),e.callback&&e.callback()}.bind(this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.getFormattedSelector=function(e,t){for(var i="",l=t.split(","),n=0;n<l.length;n++)i+=l[n].indexOf("{node}")>-1?l[n].replace("{node}",e):l[n].indexOf("{node_id}")>-1?l[n].replace(/{node_id}/g,this.nodeId):e+" "+l[n],n!=l.length-1&&(i+=", ");return i},FLBuilderPreview.prototype={id:"",type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_styleSheetMedium:null,_styleSheetResponsive:null,_timeout:null,_loaderTimeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=e(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),this._createSheets(),this._initResponsivePreviews(),this._initDefaultFieldPreviews(),this.type){case"row":this._initRow();break;case"col":this._initColumn();break;case"module":this._initModule()}FLBuilder.triggerHook("preview-init",this)},_saveSettings:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings");this._savedSettings=FLBuilder._getSettingsForChangedCheck(this.nodeId,t)},_settingsHaveChanged:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=FLBuilder._getSettings(t);return JSON.stringify(this._savedSettings)!=JSON.stringify(i)},_initElementsAndClasses:function(){var t;t="row"==this.type?".fl-row-content-wrap":".fl-"+this.type+"-content",e.extend(this.classes,{settings:".fl-builder-"+this.type+"-settings",settingsHeader:".fl-builder-"+this.type+"-settings .fl-lightbox-header",node:FLBuilder._contentClass+" .fl-node-"+this.nodeId,content:FLBuilder._contentClass+" .fl-node-"+this.nodeId+" > "+t}),e.extend(this.elements,{settings:e(this.classes.settings),settingsHeader:e(this.classes.settingsHeader),node:e(this.classes.node),content:e(this.classes.content)})},_createSheets:function(){this._destroySheets(),this._styleSheet||(this._styleSheet=new FLStyleSheet({id:"fl-builder-preview",className:"fl-builder-preview-style"})),this._styleSheetMedium||(this._styleSheetMedium=new FLStyleSheet({id:"fl-builder-preview-medium",className:"fl-builder-preview-style"}),this._styleSheetMedium.disable()),this._styleSheetResponsive||(this._styleSheetResponsive=new FLStyleSheet({id:"fl-builder-preview-responsive",className:"fl-builder-preview-style"}),this._styleSheetResponsive.disable())},_destroySheets:function(){this._styleSheet&&(this._styleSheet.destroy(),this._styleSheet=null),this._styleSheetMedium&&(this._styleSheetMedium.destroy(),this._styleSheetMedium=null),this._styleSheetResponsive&&(this._styleSheetResponsive.destroy(),this._styleSheetResponsive=null)},_disableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=FLBuilderConfig.global,i=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.responsive_breakpoint),this._styleSheetResponsive.disable()):"medium"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.medium_breakpoint),this._styleSheetMedium.disable()):i.removeClass(function(e,t){return(t.match(/fl-node-[^\s]*/g)||[]).join(" ")})},_enableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetResponsive.enable()):"medium"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetMedium.enable()):t.addClass("fl-node-"+t.data("node"))},_getDefaultValue:function(t,i){var l="",n=e(t),o=n.closest("[data-node]"),s=["line-height","font-weight"];return"width"===i?l="auto":-1===e.inArray(i,s)&&o.length&&(this._disableStyles(),l=n.css(i),this._enableStyles()),l},updateCSSRule:function(e,t,i,l){var n=FLBuilderResponsiveEditing._mode,o="";""!==i&&"null"!==i||(i=this._getDefaultValue(e,t)),l?(o="string"==typeof l?this.toUpperCaseWords(l):"default"===n?"":this.toUpperCaseWords(n),this["_styleSheet"+o].updateRule(e,t,i)):this._styleSheet.updateRule(e,t,i)},delay:function(e,t){this._cancelDelay(),this._timeout=setTimeout(t,e)},_cancelDelay:function(){null!==this._timeout&&clearTimeout(this._timeout)},hexToRgb:function(e){var t=parseInt(e,16),i=t>>16&255,l=t>>8&255,n=255&t;return[i,l,n]},hexOrRgb:function(e){return e.indexOf("rgb")<0&&e.indexOf("#")<0&&(e="#"+e),e},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_initResponsivePreviews:function(){var t=".preview-"+this.id;FLBuilder.addHook("responsive-editing-switched"+t,e.proxy(this._responsiveEditingSwitched,this)),FLBuilder.addHook("responsive-editing-before-preview-fields"+t,e.proxy(this._responsiveEditingPreviewFields,this))},_destroyResponsivePreviews:function(){var e=".preview-"+this.id;FLBuilder.removeHook("responsive-editing-switched"+e),FLBuilder.removeHook("responsive-editing-before-preview-fields"+e)},_responsiveEditingSwitched:function(e,t){"default"==t?(this._styleSheetMedium.disable(),this._styleSheetResponsive.disable()):"medium"==t?(this._styleSheetMedium.enable(),this._styleSheetResponsive.disable()):"responsive"==t&&(this._styleSheetMedium.enable(),this._styleSheetResponsive.enable())},_responsiveEditingPreviewFields:function(e,t){"medium"===t&&"col"===this.type&&this.elements.node[0].style.width&&(size=parseFloat(this.elements.node[0].style.width),this.elements.size.val(size))},updateResponsiveCSSRule:function(e,t,i){this.updateCSSRule(e,t,i,!0)},_saveState:function(){var t=FLBuilderConfig.postId,i=e('link[href*="/cache/'+t+'"]').attr("href"),l=e('script[src*="/cache/'+t+'"]').attr("src"),n=e(FLBuilder._contentClass).html();this.state={css:i,js:l,html:n}},preview:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=t.attr("data-node"),l=FLBuilder._getSettings(t);return FLBuilder._showNodeLoading(i),this._cancelPreview(),l=FLBuilder._inputVarsCheck(l),"error"===l?0:void(this._xhr=FLBuilder.ajax({action:"render_layout",node_id:i,node_preview:l},e.proxy(this._renderPreview,this)))},delayPreview:function(t){var i="undefined"==typeof t?[]:e(t.target).closest("tr").find("th"),l=e(".fl-builder-widget-settings .fl-builder-settings-title"),n=e(".fl-builder-settings .fl-lightbox-header"),o=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.svg",s=e('<img class="fl-builder-preview-loader" src="'+o+'" />');this.delay(1e3,e.proxy(this.preview,this)),this._loaderTimeout=setTimeout(function(){e(".fl-builder-preview-loader").remove(),i.length>0?i.append(s):l.length>0?l.append(s):n.length>0&&n.append(s)},1500)},_cancelPreview:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)},_renderPreview:function(t){this._xhr=null,FLBuilder._renderLayout(t,e.proxy(this._renderPreviewComplete,this))},_renderPreviewComplete:function(){
7
  this._createSheets(),this._initElementsAndClasses(),this._initDefaultFieldPreviews(),null!==this._loaderTimeout&&clearTimeout(this._loaderTimeout),e(".fl-builder-preview-loader").remove(),e(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){var e=this.nodeId;return this._settingsHaveChanged()?("col"===this.type&&(e=this.elements.node.closest(".fl-col-group").data("node")),void FLBuilder._updateNode(e,function(){this.clear()}.bind(this))):void this.clear()},cancel:function(){this._cancelDelay(),this._cancelPreview()},clear:function(){this.cancel(),this._destroySheets(),this._destroyResponsivePreviews()},_initNodeTextColor:function(){e.extend(this.elements,{textColor:e(this.classes.settings+" input[name=text_color]"),linkColor:e(this.classes.settings+" input[name=link_color]"),hoverColor:e(this.classes.settings+" input[name=hover_color]"),headingColor:e(this.classes.settings+" input[name=heading_color]")}),this.elements.textColor.on("change",e.proxy(this._textColorChange,this)),this.elements.linkColor.on("change",e.proxy(this._textColorChange,this)),this.elements.hoverColor.on("change",e.proxy(this._textColorChange,this)),this.elements.headingColor.on("change",e.proxy(this._textColorChange,this))},_textColorChange:function(t){var i=this.elements.textColor.val(),l=this.elements.linkColor.val(),n=this.elements.hoverColor.val(),o=this.elements.headingColor.val();l=""===l?i:l,n=""===n?i:n,o=""===o?i:o,i&&i.indexOf("rgb")<0&&(i="#"+i),l&&l.indexOf("rgb")<0&&(l="#"+l),n&&n.indexOf("rgb")<0&&(n="#"+n),o&&o.indexOf("rgb")<0&&(o="#"+o),this.delay(50,e.proxy(function(){""===i?this.updateCSSRule(this.classes.node,"color",""):this.updateCSSRule(this.classes.node,"color",i),""===l?this.updateCSSRule(this.classes.node+" a","color",""):this.updateCSSRule(this.classes.node+" a","color",l),""===n?this.updateCSSRule(this.classes.node+" a:hover","color",""):this.updateCSSRule(this.classes.node+" a:hover","color",n),""===o?(this.updateCSSRule(this.classes.node+" h1","color",""),this.updateCSSRule(this.classes.node+" h2","color",""),this.updateCSSRule(this.classes.node+" h3","color",""),this.updateCSSRule(this.classes.node+" h4","color",""),this.updateCSSRule(this.classes.node+" h5","color",""),this.updateCSSRule(this.classes.node+" h6","color",""),this.updateCSSRule(this.classes.node+" h1 a","color",""),this.updateCSSRule(this.classes.node+" h2 a","color",""),this.updateCSSRule(this.classes.node+" h3 a","color",""),this.updateCSSRule(this.classes.node+" h4 a","color",""),this.updateCSSRule(this.classes.node+" h5 a","color",""),this.updateCSSRule(this.classes.node+" h6 a","color","")):(this.updateCSSRule(this.classes.node+" h1","color",o),this.updateCSSRule(this.classes.node+" h2","color",o),this.updateCSSRule(this.classes.node+" h3","color",o),this.updateCSSRule(this.classes.node+" h4","color",o),this.updateCSSRule(this.classes.node+" h5","color",o),this.updateCSSRule(this.classes.node+" h6","color",o),this.updateCSSRule(this.classes.node+" h1 a","color",o),this.updateCSSRule(this.classes.node+" h2 a","color",o),this.updateCSSRule(this.classes.node+" h3 a","color",o),this.updateCSSRule(this.classes.node+" h4 a","color",o),this.updateCSSRule(this.classes.node+" h5 a","color",o),this.updateCSSRule(this.classes.node+" h6 a","color",o))},this))},_initNodeBg:function(){e.extend(this.elements,{bgType:e(this.classes.settings+" select[name=bg_type]"),bgColor:e(this.classes.settings+" input[name=bg_color]"),bgColorPicker:e(this.classes.settings+" .fl-picker-bg_color"),bgGradientType:e(this.classes.settings+" select.fl-gradient-picker-type-select"),bgVideoSource:e(this.classes.settings+" select[name=bg_video_source]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:e(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:e(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:e(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:e(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:e(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:e(this.classes.settings+" input[name=ss_speed]"),bgSlideshowTrans:e(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:e(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:e(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayType:e(this.classes.settings+" select[name=bg_overlay_type]"),bgOverlayColor:e(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayGradient:e(this.classes.settings+" #fl-field-bg_overlay_gradient select")}),this.elements.bgType.on("change",e.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",e.proxy(this._bgColorChange,this)),this.elements.bgVideoServiceUrl.on("change",e.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",e.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayType.on("change",e.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayColor.on("change",e.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val(),i=FLBuilderResponsiveEditing._mode;this.elements.node.removeClass("fl-row-bg-video"),this.elements.node.removeClass("fl-row-bg-slideshow"),this.elements.node.removeClass("fl-row-bg-parallax"),this.elements.node.find(".fl-bg-video").remove(),this.elements.node.find(".fl-bg-slideshow").remove(),this.elements.content.css("background-image",""),this.updateCSSRule(this.classes.content,"background-color","transparent"),this.updateCSSRule(this.classes.content,"background-image","none"),this.updateCSSRule(this.classes.content,"background-image","none","medium"),this.updateCSSRule(this.classes.content,"background-image","none","responsive"),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"gradient"==t?(this.elements.bgGradientType.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.settings.find('[data-device="'+i+'"] select[name*="bg_"]').trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(t){var i;""===this.elements.bgColor.val()?this.updateCSSRule(this.classes.content,"background-color","transparent"):(i=this.hexOrRgb(this.elements.bgColor.val()),this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",i)},this)))},_bgVideoChange:function(t){var i=this.elements,l=i.bgVideoSource.val(),n=i.bgVideo.val(),o=i.bgVideoServiceUrl.val(),s="https://www.youtube.com/iframe_api",r="https://player.vimeo.com/api/player.js",a=e("<script>");"video_service"==l&&""!=o?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(o)&&e('script[src*="youtube.com"').length<1?a.attr("src",s):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(o)&&e('script[src*="vimeo.com"').length<1&&a.attr("src",r),a.attr("type","text/javascript").appendTo("head"),this.delay(500,e.proxy(this.preview,this))):""!=n&&this.preview()},_bgSlideshowChange:function(t){var i=this.elements,l=i.bgSlideshowSource.val(),n=i.bgSlideshowPhotos.val(),o=i.bgSlideshowFeedUrl.val(),s=i.bgSlideshowSpeed.val(),r=i.bgSlideshowTransSpeed.val();"wordpress"==l&&""===n||"smugmug"==l&&""===o||isNaN(parseInt(s))||isNaN(parseInt(r))||this.delay(500,e.proxy(this.preview,this))},_bgParallaxChange:function(e){this.elements.bgParallaxImageSrc.val()&&this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgParallaxImageSrc.val()+")","background-repeat":"no-repeat","background-position":"center center","background-attachment":"fixed","background-size":"cover"})},_bgOverlayChange:function(t){var i,l=this.elements.bgOverlayType.val(),n=this.elements.bgOverlayColor.val();"color"===l?(""===n?(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent")):(i=this.hexOrRgb(this.elements.bgOverlayColor.val()),this.delay(100,e.proxy(function(){this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color",i)},this))),this.updateCSSRule(this.classes.content+"::after","background-image","none")):"gradient"===l?(this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.elements.bgOverlayGradient.trigger("change")):(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.updateCSSRule(this.classes.content+"::after","background-image","none"))},_bgOverlayAddClasses:function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay")},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click"),this.elements.bgOverlayType.val("color").trigger("change")},_initNodeClassName:function(){e.extend(this.elements,{className:e(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",e.proxy(this._classNameChange,this)),this._lastClassName=this.elements.className.val()},_classNameChange:function(e){var t=this.elements.className.val();null!==this._lastClassName&&this.elements.node.removeClass(this._lastClassName),this.elements.node.addClass(t),this._lastClassName=t},_initNodeDimensions:function(t){var i={},l=["Top","Bottom","Left","Right"],n=["","Medium","Responsive"],o=this.classes.settings,s="",r="",a=null,d=null;for(a=0;a<l.length;a++)for(d=0;d<n.length;d++)s=t+l[a]+n[d],r=t+"_"+l[a].toLowerCase(),""!=n[d]&&(r+="_"+n[d].toLowerCase()),i[s]=e(o+" input[name="+r+"]");e.extend(this.elements,i)},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),contentWidth:e(this.classes.settings+" select[name=content_width]"),maxContentWidth:e(this.classes.settings+" input[name=max_content_width]"),maxContentWidthUnit:e(this.classes.settings+" select[name=max_content_width_unit]"),height:e(this.classes.settings+" select[name=full_height]"),minHeight:e(this.classes.settings+" input[name=min_height]"),align:e(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("input",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.maxContentWidthUnit.on("change",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.align.on("change",e.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_rowWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.width.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width")),this._rowMaxContentWidthChange()},_rowContentWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.contentWidth.val()?(i.removeClass("fl-row-fixed-width"),i.addClass("fl-row-full-width")):(i.removeClass("fl-row-full-width"),i.addClass("fl-row-fixed-width"),this._rowMaxContentWidthChange())},_rowMaxContentWidthChange:function(e){var t=FLBuilderConfig.global,i=this.elements.node,l=this.elements.content.find(".fl-row-content"),n=this.elements.maxContentWidth.val(),o=this.elements.maxContentWidthUnit.val();""==n?n=t.row_width+t.row_width_unit:n+=o,"fixed"===this.elements.width.val()&&i.css("max-width",n),l.css("max-width",n)},_rowHeightChange:function(e){var t=this.elements.node;this.elements.content;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),t.removeClass("fl-row-full-height"),t.removeClass("fl-row-custom-height"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.val("").trigger("input")):"custom"==this.elements.height.val()?(t.addClass("fl-row-custom-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.trigger("input")):this.elements.minHeight.val("").trigger("input")},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),sizeMedium:e(this.classes.settings+" input[name=size_medium]"),sizeResponsive:e(this.classes.settings+" input[name=size_responsive]"),columnHeight:e(this.classes.settings+" select[name=equal_height]"),columnAlign:e(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:e(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeMedium.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeResponsive.on("input",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",e.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",e.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_colSizeChange:function(t){var i=e(t.target),l=8,n=100-l,o=parseFloat(i.val()),s=this.elements.node.closest(".fl-col-group"),r=this.elements.node.prev(".fl-col"),a=this.elements.node.next(".fl-col"),d=0===a.length?r:a,u=this.elements.node.siblings(".fl-col"),c=0,f=FLBuilderResponsiveEditing._mode;0!==u.length&&(isNaN(o)&&("medium"===f?o=this.elements.size.val():"responsive"===f&&(o=this.elements.sizeMedium.val()?this.elements.sizeMedium.val():"auto"),"auto"!==o&&isNaN(o)&&(o=l)),"default"===f?(u.each(function(){e(this).data("node")!=d.data("node")&&(n-=parseFloat(e(this)[0].style.width),c+=parseFloat(e(this)[0].style.width))}),o<l&&(o=l),o>n&&(o=n),this.elements.node.css("width",o+"%"),d.css("width",100-c-o+"%")):(o>100&&(o=100,i.val(100)),this.updateCSSRule(this.classes.node,{"max-width":("auto"===o?100:o)+"% !important",width:("auto"===o?o:o+"%")+" !important"},void 0,!0),"responsive"===f&&(i.val()?(this.updateCSSRule(this.classes.node,"float",FLBuilderConfig.isRtl?"right":"left",!0),this.updateCSSRule(this.classes.node,"clear","none",!0)):(this.updateCSSRule(this.classes.node,"float","none",!0),this.updateCSSRule(this.classes.node,"clear","both",!0)),i.val()||this._colsHaveCustomResponsiveWidth(u)?s.addClass("fl-col-group-custom-width"):s.removeClass("fl-col-group-custom-width"))))},_colsHaveCustomResponsiveWidth:function(t){var i=FLBuilderSettingsConfig.nodes,l=!1;return t.each(function(){var t=e(this).data("node");i[t]&&i[t].size_responsive&&(l=!0)}),l},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initNodeDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var e=FLBuilder.isUndefined(e)?this.elements.settings.find(".fl-field"):e,t=null,i=null,l=null,n=0;n<e.length;n++)t=e.eq(n),i=t.data("type"),l=t.data("preview"),"refresh"==l.type&&this._initFieldRefreshPreview(t),"text"==l.type&&this._initFieldTextPreview(t),"css"==l.type&&this._initFieldCSSPreview(t),"widget"==l.type&&this._initFieldWidgetPreview(t),"font"==l.type&&this._initFieldFontPreview(t),"attribute"==l.type&&this._initFieldAttributePreview(t),"animation"==l.type&&this._initFieldAnimationPreview(l,t),"callback"==l.type&&this._initFieldCallbackPreview(l,t,i,e),this._initFieldUnitSelect(t)},_initFieldCallbackPreview:function(t,i,l,n){var o,s=t.callback,r=e(".fl-builder-settings:visible"),a=r.data("node"),d=e(".fl-builder-content .fl-node-"+a);if("undefined"!=typeof FLBuilderPreviewCallbacks[s]?o=FLBuilderPreviewCallbacks[s]:"undefined"!=typeof window[s]&&(o=window[s]),"function"==typeof o){var u={field:i,fields:n,type:l,preview:t,form:r,nodeID:a,node:d};switch(l){case"align":case"button-group":case"text":case"multiple-photos":case"video":case"icon":case"ordering":u.input=i.find("input"),u.getValue=function(){return u.input.val()};break;case"color":u.input=i.find("input.fl-color-picker-value"),u.getValues=function(){var e=u.input.val();({value:e,formattedValue:FLBuilderPreview.formatColor(e)})};break;case"textarea":case"code":u.textarea=i.find("textarea"),u.getValue=function(){return u.textarea.val()};break;case"select":case"photo-sizes":case"post-type":u.select=i.find("select"),u.getValue=function(){return u.select.val()};break;case"photo":u.input=i.find("input[type=hidden]"),u.sizeSelect=i.find("select"),u.getValues=function(){return{value:u.input.val(),size:u.sizeSelect.val()}};break;case"unit":u.input=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var e=u.input.val(),t=u.unitSelect.val(),i={value:e,unit:t,formattedValue:e+t};return i};break;case"dimension":u.inputs=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var t={inputs:[],props:{},unit:u.unitSelect.val()};return u.inputs.each(function(i,l){var l=e(l),n=l.val(),o=l.data("unit");t.inputs.push(n),t.props[o]=n}),t};break;case"animation":u.input=i.find("input"),u.select=i.find("select"),u.getValues=function(){return{delay:u.input.val(),style:u.select.val()}};break;case"link":u.input=i.find(".fl-link-field-input-wrap input"),u.targetInput=i.find("input[name$=_target]"),u.noFollowInput=i.find("input[name$=_nofollow]"),u.getValues=function(){return{url:u.input.val(),target:u.targetInput.val(),noFollow:u.noFollowInput.val()}};break;case"shadow":u.colorInput=i.find("input.fl-color-picker-value"),u.inputs=i.find("input[type=number]"),u.getValues=function(){({color:u.colorInput.val(),x:u.inputs[0].val(),y:u.inputs[1].val(),blur:u.inputs[2].val(),spread:u.inputs[3].val()})};break;case"gradient":u.inputs=i.find("input"),u.select=i.find("select"),u.gradientInputs={},u.gradientInputs.type=i.find('select[name$="[type]"]'),u.gradientInputs.angle=i.find('input[name$="[angle]"]'),u.gradientInputs.position=i.find('select[name$="[position]"]'),u.gradientInputs.stops=[],i.find(".fl-gradient-picker-colors .fl-gradient-picker-color-row").each(function(t,i){i=e(i),u.gradientInputs.stops.push({color:i.find(".fl-gradient-picker-color input"),stop:i.find(".fl-gradient-picker-stop input")})}),u.getValues=function(){var e={type:u.gradientInputs.type.val(),angle:u.gradientInputs.angle.val(),position:u.gradientInputs.position.val(),stops:[]};for(var t in u.gradientInputs.stops){var i=u.gradientInputs.stops[t];e.stops[t]={color:i.color.val(),stop:i.stop.val()}}return e};break;case"shape-transform":u.inputs=i.find("input"),u.getValues=function(){return{scaleXSign:u.inputs.eq(0).val(),scaleYSign:u.inputs.eq(1).val(),skewX:u.inputs.eq(2).val(),skewY:u.inputs.eq(3).val(),scaleX:u.inputs.eq(4).val(),rotate:u.inputs.eq(5).val(),scaleY:u.inputs.eq(6).val()}};break;default:u.input=i.find("input"),u.getValue=function(){return u.input.val()}}var c=i.find(".fl-field-responsive-toggle");u.responsiveToggle=!!c.length&&c,o=o.bind(this,u);var f={input:"change keyup input",inputs:"change keyup input",targetInput:"change keyup input",noFollowInput:"change keyup input",colorInput:"change input",textarea:"change keyup input",select:"change",sizeSelect:"change",unitSelect:"change"};for(var h in f)"undefined"!=typeof u[h]&&u[h].on(f[h],o)}},_initFieldRefreshPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this.delayPreview,this);switch(i){case"align":t.find("input").on("change",n);break;case"text":t.find("input[type=text]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"select":t.find("select").on("change",n);break;case"color":t.find(".fl-color-picker-value").on("change",n);break;case"photo":t.find("select").on("change",n);break;case"multiple-photos":t.find("input").on("change",n);break;case"photo-sizes":t.find("select").on("change",n);break;case"video":t.find("input").on("change",n);break;case"multiple-audios":t.find("input").on("change",n);break;case"icon":t.find("input").on("change",n);break;case"form":t.delegate("input","change",n);break;case"editor":this._addTextEditorCallback(t,l);break;case"code":t.find("textarea").on("change",n);break;case"post-type":t.find("select").on("change",n);break;case"suggest":t.find(".as-values").on("change",n),t.find("select").on("change",n);break;case"unit":case"dimension":t.find("input[type=number]").on("input",n);break;case"ordering":t.find("input[type=hidden]").on("change",n);break;default:t.on("change",n)}},_initFieldTextPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this._previewText,this,l);switch(i){case"text":t.find("input[type=text]").on("keyup",n);break;case"unit":t.find("input[type=number]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"code":t.find("textarea").on("change",n);break;case"editor":this._addTextEditorCallback(t,l)}},_previewText:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),n=e(l),o=e("<div>"+e(i.target).val()+"</div>");n.length>0?(o.find("script").remove(),n.html(o.html())):this.delayPreview(i)},_previewTextEditor:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(n),s="undefined"!=typeof tinyMCE?tinyMCE.get(i):null,r=e("#"+i),a="";o.length>0&&(a=e(s&&"none"==r.css("display")?"<div>"+s.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+r.val()+"</div>":"<div>"+switchEditors.wpautop(r.val())+"</div>"),a.find("script").remove(),o.html(a.html()))},_addTextEditorCallback:function(t,i){var l=t.find("textarea.wp-editor-area").attr("id"),n=null;if("refresh"==i.type)n=e.proxy(this.delayPreview,this);else{if("text"!=i.type)return;n=e.proxy(this._previewTextEditor,this,i,l)}e("#"+l).on("keyup",n),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(l),editor.on("change",n),editor.on("keyup",n))},_initFieldFontPreview:function(t){var i=t.data("type"),l=t.data("preview");l.id=t.attr("id");var n=e.proxy(this._previewFont,this,l);"font"==i&&t.find(".fl-font-field").on("change","select",n)},_previewFont:function(t,i){var l=e(i.delegateTarget),n=l.find(".fl-font-field-font"),o=e(n).find(":selected"),s=o.parent().attr("label"),r=l.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector),u=t.important?" !important":"",c="";"Google"!=s&&"Recently Used"!=s||this._buildFontStylesheet(a,n.val(),r.val()),c=n.val();var f=new RegExp("[0-9]");f.test(n.val())&&(c='"'+n.val()+'"'),this.updateCSSRule(d,"font-family","Default"===n.val()?"":c+u),this.updateCSSRule(d,"font-weight","default"===r.val()?"":r.val()+u)},_buildFontStylesheet:function(t,i,l){var n=FLBuilderConfig.googleFontsUrl,o="",s={},r={};s[i]=[l],FLBuilderPreview._fontsList[t]=s,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var i=t[e];r[e]=r[e]||[],i=i.filter(function(t){return r[e].indexOf(t)<0}),r[e]=r[e].concat(i)})}),e.each(r,function(e,t){o+=e+":"+t.join()+"|"}),o=n+o.slice(0,-1).replace(" ","+"),e("#fl-builder-google-fonts-preview").length<1?e("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",o).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",o)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if("undefined"!=typeof t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,i){switch(t.data("type")){case"align":t.find("input").on("change",e.proxy(this._previewCSS,this,i,t));break;case"border":t.find("select").on("change",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewBorderCSS,this,i,t));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColorCSS,this,i,t));break;case"dimension":t.find("input[type=number]").on("input",e.proxy(this._previewDimensionCSS,this,i,t));break;case"gradient":t.find("select").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-angle").on("input",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-stop").on("input",e.proxy(this._previewGradientCSS,this,i,t));break;case"photo":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"shadow":t.find("input").on("input",e.proxy(this._previewShadowCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewShadowCSS,this,i,t));break;case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,i,t));break;case"typography":t.find("select").on("change",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewTypographyCSS,this,i,t));break;case"unit":t.find("input[type=number]").on("input",e.proxy(this._previewCSS,this,i,t))}},_previewCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=t.property,s=this._getPreviewCSSUnit(t,i,l),r=e(l.target),a=r.val(),d=!!r.closest(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";o.indexOf("image")>-1&&a?a="url("+a+")":"%"===s&&"opacity"===o?a=parseInt(a)/100:""!==a&&(a+=s),this.updateCSSRule(n,o,a+u,d)},_previewBorderCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target),i=o.closest(".fl-field"),s=o.closest(".fl-compound-field-setting"),r=s.data("property"),a=o.val(),d=(s.find(".fl-field-unit-select"),!!o.closest(".fl-field-responsive-setting").length),u=t.important&&""!==a?" !important":"";t.property=r,"border-color"===r?this._previewColorCSS(t,i,l):"border-width"===r||"border-radius"===r?this._previewDimensionCSS(t,i,l):"box-shadow"===r?this._previewShadowCSS(t,s,l):("border-style"===r&&i.find(".fl-border-field-width input:visible").trigger("input"),this.updateCSSRule(n,r,a+u,d))},_previewColorCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target),s=o.val(),r=!!o.closest(".fl-field-responsive-setting").length,a=t.important&&""!==s?" !important":"";""!==s&&s.indexOf("rgb")<0&&(s="#"+s),this.updateCSSRule(n,t.property,s+a,r)},_previewDimensionCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=t.property,s=i.attr("id").replace("fl-field-",""),r=e(l.target).data("unit"),a=this._getDimensionValue(t,i,r,l),d=!!i.find(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";o="border-radius"===o?"border-"+r.replace("_","-")+"-radius":"border-width"===o?"border-"+r+"-width":o+"-"+r,this.updateCSSRule(n,o,a+u,d),"margin"!==s&&"padding"!==s&&"border"!==s||this.elements.node.find(".fl-bg-slideshow").length&&FLBuilder._resizeLayout()},_getDimensionValue:function(t,i,l,n){var o=e(n.target).val(),s="";return o=o.toLowerCase().replace(/[^a-z0-9%.\-]/g,""),null===o||""===o||isNaN(o)||(s=this._getPreviewCSSUnit(t,i,n),o=parseFloat(o)+(s?s:"px")),o},_getPreviewCSSUnit:function(t,i,l){var n=e(l.target),o=(FLBuilderResponsiveEditing._mode,!!n.closest(".fl-compound-field-setting").length),s=!!n.closest(".fl-field-responsive-setting").length,r=null;return r=o?n.closest(".fl-compound-field-setting").find(".fl-field-unit-select"):s?n.closest(".fl-field-responsive-setting").find(".fl-field-unit-select"):i.find(".fl-field-unit-select"),r&&r.length?"SELECT"===r.prop("tagName")?r.val():r.text():t.unit?t.unit:""},_initFieldUnitSelect:function(t){t.find(".fl-field-unit-select").on("change",function(){var t=e(this),i=t.closest(".fl-field-responsive-setting"),l=t.closest(".fl-field");i.length?i.find("input").trigger("input"):l.find("input").trigger("input")})},_previewGradientCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=i.find(".fl-gradient-picker-type-select").val(),s=i.find(".fl-gradient-picker-angle").val(),r=i.find(".fl-gradient-picker-position").val(),a=i.find(".fl-color-picker-value"),d=i.find(".fl-gradient-picker-stop input"),u=[],c="",f="";a.each(function(t){var i=e(this).val(),l=d.eq(t).val();""===i&&(i="rgba(255,255,255,0)"),i.indexOf("rgb")<0&&(i="#"+i),isNaN(l)&&(l=0),u.push(i+" "+l+"%")}),u=u.join(", "),"linear"===o?(isNaN(s)&&(s=0),c="linear-gradient("+s+"deg, "+u+")"):c="radial-gradient(at "+r+", "+u+")",f=t.important&&""!==c?" !important":"",this.updateCSSRule(n,t.property,c+f)},_previewShadowCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=i.find(".fl-shadow-field-color input").val(),s=i.find(".fl-shadow-field-horizontal input").val(),r=i.find(".fl-shadow-field-vertical input").val(),a=i.find(".fl-shadow-field-blur input").val(),d=i.find(".fl-shadow-field-spread input").val(),u=!!i.find(".fl-shadow-field-spread input").length,c=!!e(l.target).closest(".fl-field-responsive-setting").length,f="",h="";""!==o&&(""===s&&(s=0),""===r&&(r=0),""===a&&(a=0),""===d&&(d=0),o.indexOf("rgb")<0&&(o="#"+o),f=s+"px ",f+=r+"px ",f+=a+"px ",u&&(f+=d+"px "),f+=o,f+=h),h=t.important&&""!==f?" !important":"",this.updateCSSRule(n,t.property,f,c)},_previewTypographyCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target),i=o.closest(".fl-field"),s=o.closest(".fl-compound-field-setting"),r=s.data("property"),a=o.val(),d=s.find(".fl-field-unit-select"),u=!!o.closest(".fl-field-responsive-setting").length,c=t.important&&""!==a?" !important":"";"font-family"===r?(t.id=i.attr("id"),this._previewFont(t,{delegateTarget:s
8
- })):"text-shadow"===r?(t.property="text-shadow",this._previewShadowCSS(t,s,l)):(d.length&&""!==a&&("vw"===d.val()?a="calc("+FLBuilderConfig.global.responsive_base_fontsize+"px + "+a+"vw)":a+="SELECT"===d.prop("tagName")?d.val():"px"),this.updateCSSRule(n,r,a+c,u))},_initFieldAttributePreview:function(t){var i=t.data("preview"),l=i.attribute,n=t.find("input"),o=(t.val(),window[i.format_callback]),s=this._getPreviewSelector(this.classes.node,i.selector),r=e(s),a=this._previewAttribute.bind(this,n,r,l,o);n.on("change",a),n.on("keyup",a),n.on("input",a)},_previewAttribute:function(e,t,l,n){var o=e.val();for("function"==typeof n&&(o=n(o)),i=0;i<t.length;i++)t[i].setAttribute(l,o)},_initFieldWidgetPreview:function(t){var i=e.proxy(this.delayPreview,this);t.find("input").on("keyup",i),t.find("input[type=checkbox]").on("click",i),t.find("textarea").on("keyup",i),t.find("select").on("change",i)},_initFieldAnimationPreview:function(t,i){i.find(".fl-animation-field-style select").on("change",e.proxy(this._previewAnimationField,this,t,i)),i.find(".fl-animation-field-duration input").on("input",e.proxy(this._previewAnimationField,this,t,i))},_previewAnimationField:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(n),s=i.find(".fl-animation-field-style select"),r=i.find(".fl-animation-field-duration input"),a=s[0].options;o.removeClass("fl-animated"),o.removeClass("fl-animation"),o.css("animation-duration","");for(var d=0;d<a.length;d++)o.removeClass("fl-"+a[d].value);""!==s.val()&&(o.addClass("fl-animation"),o.addClass("fl-"+s.val()),o.data("animation-delay",0),o.data("animation-duration",r.val())),FLBuilderLayout._doModuleAnimation.apply(o)},_getPreviewSelector:function(e,t){return FLBuilderPreview.getFormattedSelector.call(this,e,t)},toUpperCaseWords:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},FLBuilderPreview.formatColor=function(e){return""!==e&&e.indexOf("rgb")<0&&e.indexOf("url")<0&&(e="#"+e),e},FLBuilderPreviewCallbacks={previewShape:function(e,t){var i=e.preview.position,l=e.preview.prefix,n=e.form,o=l+"transform[][scaleYSign]";yOrientation=n.find('input[name="'+o+'"]'),"bottom"===i?yOrientation.val("invert"):yOrientation.val(""),yOrientation.trigger("change"),this.delayPreview()},previewShapeLayerSize:function(e,t){var i=e.getValues(),l=i.unit,n=i.props.width,o=i.props.height,s=i.props.top,r=e.preview.prefix,a=e.preview.position,d=this._getPreviewSelector(this.classes.node,".fl-builder-"+a+"-edge-layer"),u=d+" > *",c=e.form.find('[name="'+r+'align"]'),f=c.val(),h=f.split(" "),p=h[0],g=h[1],m=e.form.find('[name="'+r+'shape"]'),b=m.val(),v=FLBuilderConfig.presets.shape[b];if(shapeProps={},shapeProps.width="100%",shapeProps.left="auto",shapeProps.right="auto",shapeProps.height="auto",shapeProps.top="auto",shapeProps.bottom="auto",n){shapeProps.width=n+l;var _=n/2+l;switch(g){case"left":shapeProps.left="0",shapeProps.right="auto";break;case"right":shapeProps.left="auto",shapeProps.right="0";break;case"center":shapeProps.left="calc( 50% - "+_+")",shapeProps.right="auto"}}this.updateCSSRule(u,"width",shapeProps.width),this.updateCSSRule(u,"left",shapeProps.left),this.updateCSSRule(u,"right",shapeProps.right);var L;if(o)L=o/2+l;else if(n){var F=v.data.viewBox.width,w=n/F*100;L=w/2+l}else L="";switch(o&&(shapeProps.height=o+l),p){case"top":shapeProps.top="0",shapeProps.bottom="auto";break;case"bottom":shapeProps.top="auto",shapeProps.bottom="0";break;case"center":shapeProps.top="calc( 50% - "+L+")",shapeProps.bottom="auto"}this.updateCSSRule(u,"height",shapeProps.height),this.updateCSSRule(u,"top",shapeProps.top),this.updateCSSRule(u,"bottom",shapeProps.bottom),""===s?this.updateCSSRule(d,a,"0"):this.updateCSSRule(d,a,s+l)},previewShapeAlign:function(e,t){var i=e.preview.prefix,l=e.form.find('[name="'+i+'size_width"]');l.trigger("input")},previewShapeFillStyle:function(e,t){var i=e.input.val(),l=e.preview,n=e.preview.prefix,o="fl-row-"+e.nodeID+"-"+n+"-linear-gradient",s="fl-row-"+e.nodeID+"-"+n+"-radial-gradient",r="fl-row-"+e.nodeID+"-"+n+"-pattern",a=e.form;if("undefined"!=typeof i){var d=this._getPreviewSelector(this.classes.node,l.selector);switch(i){case"color":var u=a.find("[name="+n+"fill_color]").val();this.updateCSSRule(d,"fill",FLBuilderPreview.formatColor(u));break;case"gradient":var c=a.find("#fl-field-"+n+"fill_gradient"),f=c.find('select[name$="[type]"]').val(),h="radial"===f?s:o;this.updateCSSRule(d,"fill","url(#"+h+")");break;case"pattern":var p="url(#"+r+")";this.updateCSSRule(d,"fill",p)}}},previewShapeGradientFill:function(e,t){var i=e.getValues(),l=e.node,n=e.preview,o=".fl-builder-"+n.position+"-edge-layer",s=l.find(o+" "+i.type+"Gradient"),r="url(#"+s.attr("id")+")",a=this._getPreviewSelector(this.classes.node,o+" .fl-shape");this.updateCSSRule(a,"fill",r);var d=s.find("stop");for(var u in i.stops){var c=i.stops[u],f=d.eq(u),h=c.color,p=c.stop,g=1;if(0===h.indexOf("rgba")){var m=h.substring(h.indexOf("(")+1,h.lastIndexOf(")")).split(/,\s*/);g=m.pop(),h="rgb("+m.join(",")+")"}f.attr("stop-color",FLBuilderPreview.formatColor(h)),f.attr("stop-opacity",g),f.attr("offset",p+"%")}if("linear"===i.type&&"undefined"!=typeof s[0]&&s[0].setAttribute("gradientTransform","rotate("+i.angle+" .5 .5 )"),"radial"===i.type){parts=i.position.split(" ");var b,v,_,L=parts[0],F=parts[1];switch(L){case"top":case"left":b=0;break;case"center":b=.5;break;case"bottom":case"right":b=1}switch(F){case"top":case"left":v=0;break;case"center":v=.5;break;case"bottom":case"right":v=1}_=.5,.5===b&&.5===v||(_=1),s.attr("cx",b),s.attr("cy",v),s.attr("r",_)}},previewShapeTransform:function(e,t){var i=(e.form,e.preview),l=(i.prefix,this._getPreviewSelector(this.classes.node,i.selector)),n=l+" > *",o=e.getValues(),s=[];Object.keys(o).map(function(e){var t=o[e],i="",l="";switch(e){case"scaleXSign":case"scaleYSign":return;case"scaleX":case"scaleY":t&&""!==t&&0!==t||(t="1"),l="scaleX"===e?o.scaleXSign:o.scaleYSign,t="invert"===l?-Math.abs(t):Math.abs(t),s.push(e+"("+t+")");break;case"translateX":case"translateY":t&&(i="px",s.push(e+"("+t+i+")"));break;case"skewX":case"skewY":t&&(i="deg",s.push(e+"("+t+i+")"));break;case"rotate":i="deg",""!==t&&"0"!==t&&s.push("rotate("+t+i+")")}}),this.updateCSSRule(n,"transform",s.join(" "))}}}(jQuery),function(e){var t={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^{]*{([\s\S]+?})\s*}/gi,empty:/@media[^{]*{([^{}]*?)}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,i.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var t=null,i=null,l=null,n=null,o=null,s=null,r=null,a=!1,d=0,u=0;d<document.styleSheets.length;d++)if(element=document.styleSheets[d].ownerNode,t=element.href,i=element.id,l=element.tagName.toLowerCase(),n=element.rel,o=element.media,s=t?t.split("?").shift():i?i:"style-"+d,r=!0,a=!1,"style"===l||t&&n&&"stylesheet"===n.toLowerCase()){for(u=0;u<this.ignored.length;u++)if(s.indexOf(this.ignored[u])>-1){a=!0;break}if(a)continue;for(u=0;u<this.reparsed.length;u++)if(s.indexOf(this.reparsed[u])>-1){this.sheets[s]=null;break}void 0!==this.sheets[s]&&this.sheets[s]||this.queue.push({docSheet:document.styleSheets[d],element:e(element),key:s,tagName:l,href:t,id:i,media:o})}return this.queue.length},runQueue:function(){var t;this.queue.length?(t=this.queue.shift(),"style"===t.tagName?(this.parse(t.element.html(),t),this.runQueue()):e.get(t.href,e.proxy(function(e){this.parse(e,t),this.runQueue()},this)).fail(this.runQueue.bind(this))):this.applyStyles()},parse:function(e,t){var i=this.regex,l=this.cleanStyles(e),n=l.match(i.media),o=n&&n.length||0,s=!o&&t.media,r=null,a=null,d=null,u="",c=0,f=0;for(n?u=l.replace(i.media,""):s&&"all"!=t.media?o=1:u=l,this.sheets[t.key]={docSheet:t.docSheet,element:t.element,key:t.key,tagName:t.tagName,href:t.href,id:t.id,all:u,queries:[]},c=0;c<o;c++)for(s?(r=t.media,l=this.convertURLs(l,t.href)):(r=n[c].match(i.findStyles)&&RegExp.$1,l=RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),a=r.split(","),f=0;f<a.length;f++)r=a[f],d=r.split("(")[0].match(i.only)&&RegExp.$2,"print"!=d&&(r.replace(i.minmaxwh,"").match(i.other)||this.sheets[t.key].queries.push({minw:r.match(i.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(i.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:l}))},applyStyles:function(){var t=e("head"),i={all:"",queries:[]},l=null,n=null,o=null,s=null,r=null,a=null,d=null,u=!1;this.clearStyles();for(o in this.sheets)if(n=this.sheets[o],n.queries.length&&this.width){for(i.all+=n.all,r=0;r<n.queries.length;r++)s=n.queries[r],a=s.minw,d=s.maxw,u=!1,a&&(a=parseFloat(a)*(a.indexOf("em")>-1?this.getEmPxValue():1),this.width>=a&&(i.queries.push({media:"min",width:a,styles:s.styles}),u=!0)),d&&!u&&(d=parseFloat(d)*(d.indexOf("em")>-1?this.getEmPxValue():1),this.width<=d&&i.queries.push({media:"max",width:d,styles:s.styles}));n.docSheet.disabled=!0}for(""!==i.all&&(l=e('<style class="fl-builder-media-query" data-query="all"></style>'),this.styles.push(l),t.append(l),l.html(i.all)),r=0;r<i.queries.length;r++)s=i.queries[r],l=e('<style class="fl-builder-media-query" data-query="'+s.media+'" data-value="'+s.width+'"></style>'),this.styles.push(l),t.append(l),l.html(s.styles);this.callback&&(this.callback(),this.callback=null)},clearStyles:function(){var e=null,t=this.styles.slice(0);this.styles=[];for(e in this.sheets)this.sheets[e].docSheet.disabled=!1;for(var i=0;i<t.length;i++)t[i].empty(),t[i].remove()},disableStyles:function(e){for(var t,i,l,n=0;n<this.styles.length;n++)t=this.styles[n],i=t.attr("data-query"),l=parseInt(t.attr("data-value")),"max"===i&&!isNaN(l)&&l<=e&&(this.styles[n][0].sheet.disabled=!0)},enableStyles:function(){for(var e=0;e<this.styles.length;e++)this.styles[e][0].sheet.disabled=!1,this.styles[e][0].sheet.disabled=!0,this.styles[e][0].sheet.disabled=!1},cleanStyles:function(e){var t=this.regex;return e.replace(t.comments,"").replace(t.keyframes,"").replace(t.empty,"")},convertURLs:function(e,t){return t?(t=t.substring(0,t.lastIndexOf("/")),t.length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")):e},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=null,t=window.document,i=t.documentElement,l=t.body,n=t.createElement("div"),o=i.style.fontSize,s=l&&l.style.fontSize,r=!1;return n.style.cssText="position:absolute;font-size:1em;width:1em",l||(l=r=t.createElement("body"),l.style.background="none"),i.style.fontSize="100%",l.style.fontSize="100%",l.appendChild(n),r&&i.insertBefore(l,i.firstChild),e=parseFloat(n.offsetWidth),r?i.removeChild(l):l.removeChild(n),i.style.fontSize=o,s?l.style.fontSize=s:l.style.fontSize="",this.emPxValue=e,e}},i={_functions:null,update:function(){var e;if(!this._functions){this._functions={};for(e in l)this._functions[e]=jQuery.fn[e]}if(t.width)for(e in l)jQuery.fn[e]=l[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},l={width:function(l){return void 0!=l?i._functions.width.call(this,l):e.isWindow(this[0])?t.width:i._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){t.ignore(e)},reparse:function(e){t.reparse(e)},update:function(e,i){t.update(e,i)},disableStyles:function(e){t.disableStyles(e)},enableStyles:function(){t.enableStyles()}}}(jQuery),function(e){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(t){var i;e(".fl-responsive-preview").length&&"default"!==this._mode?("responsive"==this._mode?(i=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)):"medium"==this._mode&&(i=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)),FLBuilder._resizeLayout()):t&&t()},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("endEditingSession",this._clearPreview),FLBuilder.addHook("didEnterRevisionPreview",this._clearPreview),FLBuilder.addHook("responsiveEditing",this._menuToggleClicked),FLBuilder.addHook("preview-init",this._switchAllSettingsToCurrentMode),FLBuilder.addHook("responsive-editing-switched",this._showSize),e("body").delegate(".fl-field-responsive-toggle","click",this._settingToggleClicked),e("body").delegate(".fl-responsive-preview-message button","click",this._previewToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,FLBuilderConfig.relativePluginUrl]),FLBuilderSimulateMediaQuery.ignore(FLBuilderConfig.responsiveIgnore),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css",FLBuilderConfig.postId+"-layout-draft-partial.css",FLBuilderConfig.postId+"-layout-preview.css",FLBuilderConfig.postId+"-layout-preview-partial.css","fl-builder-global-css","fl-builder-layout-css"])},_showSize:function(){var t=e(".fl-responsive-preview-message .size"),i="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,l="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,n="";e(".fl-responsive-preview").hasClass("fl-preview-responsive")?n=FLBuilderStrings.mobile+" "+l+"px":e(".fl-responsive-preview").hasClass("fl-preview-medium")&&(n=FLBuilderStrings.medium+" "+i+"px"),t.html("").html(n)},_switchTo:function(t,i){var l=e("html"),n=e("body"),o=e(FLBuilder._contentClass),s=e(".fl-responsive-preview"),r=e(".fl-responsive-preview-mask"),a=e(".fl-content-placeholder"),d=null;if(FLBuilderResponsiveEditing._mode=t,"default"==t){if(0===a.length)return;l.removeClass("fl-responsive-preview-enabled"),a.after(o),a.remove(),s.remove(),r.remove()}else 0===s.length?(l.addClass("fl-responsive-preview-enabled"),o.after('<div class="fl-content-placeholder"></div>'),n.prepend(wp.template("fl-responsive-preview")()),e(".fl-responsive-preview").addClass("fl-preview-"+t),e(".fl-responsive-preview-content").append(o)):(s.removeClass("fl-preview-responsive fl-preview-medium"),s.addClass("fl-preview-"+t));"responsive"==t?(d="1"!==FLBuilderConfig.global.responsive_preview&&FLBuilderConfig.global.responsive_breakpoint>=360?360:FLBuilderConfig.global.responsive_breakpoint,o.width(d),FLBuilderSimulateMediaQuery.update(d,i),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):"medium"==t?(d="1"!==FLBuilderConfig.global.responsive_preview&&FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,o.width(d),FLBuilderSimulateMediaQuery.update(d,i),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):(o.width(""),FLBuilderSimulateMediaQuery.update(null,i)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),this._previewFields(),FLBuilder.triggerHook("responsive-editing-switched",t)},_setContentBackgroundColor:function(){var t=e(FLBuilder._contentClass),i=e(".fl-responsive-preview"),l=e(".fl-content-placeholder"),n=l.parents(),o="#fff",s=0;if(0===i.length)t.css("background-color","");else{for(;s<n.length&&(o=n.eq(s).css("background-color"),"rgba(0, 0, 0, 0)"==o);s++);t.css("background-color",o)}},_switchToAndScroll:function(t){var i=e(".fl-builder-settings").data("node"),l=void 0===i?void 0:e(".fl-node-"+i);FLBuilderResponsiveEditing._switchTo(t,function(){if(void 0!==l&&l){var t=(e(window),e(".fl-responsive-preview-content"));t.length?(t.scrollTop(0),t.scrollTop(l.offset().top-150)):e("html, body").scrollTop(l.offset().top-100)}})},_switchAllSettingsTo:function(t){var i="dashicons-desktop dashicons-tablet dashicons-smartphone";e(".fl-field-responsive-toggle").removeClass(i),e(".fl-field-responsive-setting").hide(),i="default"==t?"dashicons-desktop":"medium"==t?"dashicons-tablet":"dashicons-smartphone",e(".fl-field-responsive-toggle").addClass(i).data("mode",t),e(".fl-field-responsive-setting-"+t).css("display","inline-block")},_switchAllSettingsToCurrentMode:function(){var e=FLBuilderResponsiveEditing;e._switchAllSettingsTo(e._mode),FLBuilder.triggerHook("responsive-editing-switched",e._mode)},_setMarginPaddingPlaceholders:function(){var t="#fl-field-padding .fl-field-responsive-setting-default",i={values:{top:e(t+' input[ name="padding_top" ]').val(),right:e(t+' input[ name="padding_right" ]').val(),bottom:e(t+' input[ name="padding_bottom" ]').val(),left:e(t+' input[ name="padding_left" ]').val()},placeholders:{top:e(t+' input[ name="padding_top" ]').attr("placeholder"),right:e(t+' input[ name="padding_right" ]').attr("placeholder"),bottom:e(t+' input[ name="padding_bottom" ]').attr("placeholder"),left:e(t+' input[ name="padding_left" ]').attr("placeholder")}},l="#fl-field-padding .fl-field-responsive-setting-medium",n={values:{top:e(l+' input[ name="padding_top_medium" ]').val(),right:e(l+' input[ name="padding_right_medium" ]').val(),bottom:e(l+' input[ name="padding_bottom_medium" ]').val(),left:e(l+' input[ name="padding_left_medium" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}},o="#fl-field-padding .fl-field-responsive-setting-responsive",s=({values:{top:e(l+' input[ name="padding_top_responsive" ]').val(),right:e(l+' input[ name="padding_right_responsive" ]').val(),bottom:e(l+' input[ name="padding_bottom_responsive" ]').val(),left:e(l+' input[ name="padding_left_responsive" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}},"#fl-field-margin .fl-field-responsive-setting-default"),r={values:{top:e(s+' input[ name="margin_top" ]').val(),right:e(s+' input[ name="margin_right" ]').val(),bottom:e(s+' input[ name="margin_bottom" ]').val(),left:e(s+' input[ name="margin_left" ]').val()},placeholders:{top:e(s+' input[ name="margin_top" ]').attr("placeholder"),right:e(s+' input[ name="margin_right" ]').attr("placeholder"),bottom:e(s+' input[ name="margin_bottom" ]').attr("placeholder"),left:e(s+' input[ name="margin_left" ]').attr("placeholder")}},a="#fl-field-margin .fl-field-responsive-setting-medium",d={values:{top:e(a+' input[ name="margin_top_medium" ]').val(),right:e(a+' input[ name="margin_right_medium" ]').val(),bottom:e(a+' input[ name="margin_bottom_medium" ]').val(),left:e(a+' input[ name="margin_left_medium" ]').val()},placeholders:{top:r.values.top?r.values.top:r.placeholders.top,right:r.values.right?r.values.right:r.placeholders.right,bottom:r.values.bottom?r.values.bottom:r.placeholders.bottom,left:r.values.left?r.values.left:r.placeholders.left}},u="#fl-field-margin .fl-field-responsive-setting-responsive";({values:{top:e(u+' input[ name="margin_top_responsive" ]').val(),right:e(u+' input[ name="margin_right_responsive" ]').val(),bottom:e(u+' input[ name="margin_bottom_responsive" ]').val(),left:e(u+' input[ name="margin_left_responsive" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}});""!=i.values.top?e(l+' input[ name="padding_top_medium"] ').attr("placeholder",i.values.top):e(l+' input[ name="padding_top_medium"] ').attr("placeholder",i.placeholders.top),""!=i.values.right?e(l+' input[ name="padding_right_medium"] ').attr("placeholder",i.values.right):e(l+' input[ name="padding_right_medium"] ').attr("placeholder",i.placeholders.right),""!=i.values.bottom?e(l+' input[ name="padding_bottom_medium"] ').attr("placeholder",i.values.bottom):e(l+' input[ name="padding_bottom_medium"] ').attr("placeholder",i.placeholders.bottom),""!=i.values.left?e(l+' input[ name="padding_left_medium"] ').attr("placeholder",i.values.left):e(l+' input[ name="padding_left_medium"] ').attr("placeholder",i.placeholders.left),""!=n.values.top?e(o+' input[ name="padding_top_responsive"] ').attr("placeholder",n.values.top):""!=i.values.top?e(o+' input[ name="padding_top_responsive"] ').attr("placeholder",i.values.top):e(o+' input[ name="padding_top_responsive"] ').attr("placeholder",i.placeholders.top),""!=n.values.right?e(o+' input[ name="padding_right_responsive"] ').attr("placeholder",n.values.right):""!=i.values.right?e(o+' input[ name="padding_right_responsive"] ').attr("placeholder",i.values.right):e(o+' input[ name="padding_right_responsive"] ').attr("placeholder",i.placeholders.right),""!=n.values.bottom?e(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",n.values.bottom):""!=i.values.bottom?e(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",i.values.bottom):e(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",i.placeholders.bottom),""!=n.values.left?e(o+' input[ name="padding_left_responsive"] ').attr("placeholder",n.values.left):""!=i.values.left?e(o+' input[ name="padding_left_responsive"] ').attr("placeholder",i.values.left):e(o+' input[ name="padding_left_responsive"] ').attr("placeholder",i.placeholders.left),""!=r.values.top?e(a+' input[ name="margin_top_medium" ]').attr("placeholder",r.values.top):e(a+' input[ name="margin_top_medium" ]').attr("placeholder",r.placeholders.top),""!=r.values.right?e(a+' input[ name="margin_right_medium" ]').attr("placeholder",r.values.right):e(a+' input[ name="margin_right_medium" ]').attr("placeholder",r.placeholders.right),""!=r.values.bottom?e(a+' input[ name="margin_bottom_medium" ]').attr("placeholder",r.values.bottom):e(a+' input[ name="margin_bottom_medium" ]').attr("placeholder",r.placeholders.bottom),""!=r.values.left?e(a+' input[ name="margin_left_medium" ]').attr("placeholder",r.values.left):e(a+' input[ name="margin_left_medium" ]').attr("placeholder",r.placeholders.left),""!=d.values.top?e(u+' input[ name="margin_top_responsive" ]').attr("placeholder",d.values.top):""!=r.values.top?e(u+' input[ name="margin_top_responsive" ]').attr("placeholder",r.values.top):e(u+' input[ name="margin_top_responsive" ]').attr("placeholder",r.placeholders.top),""!=d.values.right?e(u+' input[ name="margin_right_responsive" ]').attr("placeholder",d.values.right):""!=r.values.right?e(u+' input[ name="margin_right_responsive" ]').attr("placeholder",r.values.right):e(u+' input[ name="margin_right_responsive" ]').attr("placeholder",r.placeholders.right),""!=d.values.bottom?e(u+' input[ name="margin_bottom_responsive" ]').attr("placeholder",d.values.bottom):""!=r.values.bottom?e(u+' input[ name="margin_bottom_responsive" ]').attr("placeholder",r.values.bottom):e(u+' input[ name="margin_bottom_responsive" ]').attr("placeholder",r.placeholders.bottom),""!=d.values.left?e(u+' input[ name="margin_left_responsive" ]').attr("placeholder",d.values.left):""!=r.values.left?e(u+' input[ name="margin_left_responsive" ]').attr("placeholder",r.values.left):e(u+' input[ name="margin_left_responsive" ]').attr("placeholder",r.placeholders.left)},_settingToggleClicked:function(){var t=e(this),i=t.data("mode");i="default"==i?"medium":"medium"==i?"responsive":"default",FLBuilderResponsiveEditing._switchAllSettingsTo(i),FLBuilderResponsiveEditing._switchToAndScroll(i),t.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_menuToggleClicked:function(){var e=FLBuilderResponsiveEditing._mode;e="default"==e?"medium":"medium"==e?"responsive":"default",FLBuilder.MainMenu.hide(),FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_previewToggleClicked:function(){var t=e(this).data("mode");FLBuilderResponsiveEditing._switchAllSettingsTo(t),FLBuilderResponsiveEditing._switchToAndScroll(t)},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_previewFields:function(){var t=FLBuilderResponsiveEditing._mode,i=e(".fl-builder-settings:visible");0!==i.length&&void 0!==i.attr("data-node")&&(FLBuilder.triggerHook("responsive-editing-before-preview-fields",t),i.find(".fl-builder-settings-tab").each(function(){var i=e(this);i.css("display","block"),i.find(".fl-field-responsive-setting-"+t+":visible").each(function(){var i=e(this),l=i.closest(".fl-field"),n=l.data("type"),o=l.data("preview"),s=l.find(".fl-field-connection-visible").length;"refresh"!=o.type&&(s?"photo"===n&&"default"!==t&&i.find(".fl-photo-remove").trigger("click"):(i.find("input").trigger("keyup"),i.find("select").trigger("change")))}),i.css("display","")}),FLBuilder.triggerHook("responsive-editing-after-preview-fields",t))}},e(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(e){FLBuilderResponsivePreview={enter:function(){this.render()},exit:function(){this.destroy()},switchTo:function(t){var i=FLBuilderConfig.global,l=e("#fl-builder-preview-frame"),n="100%";"responsive"==t?(n="1"!==i.responsive_preview&&i.responsive_breakpoint>=360?360:i.responsive_breakpoint,l.width(n)):"medium"==t&&(n="1"!==i.responsive_preview&&i.medium_breakpoint>=769?769:i.medium_breakpoint,l.width(n)),l.width(n)},render:function(){var t=e("body"),i=FLBuilderConfig.previewUrl,l=e("#fl-builder-preview-mask, #fl-builder-preview-frame"),n=e('<div id="fl-builder-preview-mask"></div>'),o=e('<iframe id="fl-builder-preview-frame" src="'+i+'"></iframe>');l.remove(),t.append(n),t.append(o),t.css("overflow","hidden")},_showSize:function(t){var i=e(".fl-builder--preview-actions .size"),l="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,n="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,o="";"responsive"===t?o=FLBuilderStrings.mobile+" "+n+"px":"medium"===t&&(o=FLBuilderStrings.medium+" "+l+"px"),i.html("").html(o)},destroy:function(){e("#fl-builder-preview-mask, #fl-builder-preview-frame").remove(),e("body").css("overflow","visible"),e(".fl-builder--preview-actions .size").html("")}}}(jQuery),function(e){var t={init:function(){var t=e("body");t.delegate(".fl-builder-service-select","change",this._serviceChange),t.delegate(".fl-builder-service-connect-button","click",this._connectClicked),t.delegate(".fl-builder-service-account-select","change",this._accountChange),t.delegate(".fl-builder-service-account-delete","click",this._accountDeleteClicked),t.delegate(".fl-builder-campaign-monitor-client-select","change",this._campaignMonitorClientChange),t.delegate(".fl-builder-mailchimp-list-select","change",this._mailChimpListChange),t.delegate(".fl-builder-activecampaign-list_type-select","change",this._activeCampaignChange)},_startSettingsLoading:function(t){var i=e(".fl-builder-settings"),l=t.closest(".fl-builder-service-settings"),n=e(".fl-builder-service-error");i.append('<div class="fl-builder-loading"></div>'),l.addClass("fl-builder-service-settings-loading"),n.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),i=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),i.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this),n=l.closest("tr"),o=l.val();n.siblings("tr.fl-builder-service-account-row").remove(),n.siblings("tr.fl-builder-service-connect-row").remove(),n.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==o&&(t._startSettingsLoading(l),FLBuilder.ajax({action:"render_service_settings",node_id:i,service:o},t._serviceChangeComplete))},_serviceChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-select-row");o.after(l.html),t._addAccountDelete(n),t._finishSettingsLoading()},_connectClicked:function(){for(var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-connect-row"),s=l.find(".fl-builder-service-connect-input"),r=null,a=null,d=0,u={action:"connect_service",node_id:i,service:n.val(),fields:{}};d<s.length;d++)r=s.eq(d),a=r.attr("name"),u.fields[a]=r.val();o.hide(),t._startSettingsLoading(n),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-select-row"),s=n.find(".fl-builder-service-select"),r=n.find(".fl-builder-service-account-row"),a=n.find(".fl-builder-service-account-select"),d=n.find(".fl-builder-service-connect-row");l.error?(d.show(),0===a.length?s.after('<div class="fl-builder-service-error">'+l.error+"</div>"):a.after('<div class="fl-builder-service-error">'+l.error+"</div>")):(d.remove(),r.remove(),o.after(l.html)),t._addAccountDelete(n),t._finishSettingsLoading()},_accountChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=l.find(".fl-builder-service-connect-row"),r=l.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=o.val(),u=null;s.remove(),r.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:i,service:n.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:i,service:n.val(),account:d}),u&&(t._startSettingsLoading(n),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(l)},_accountChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-account-row");o.after(l.html),t._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");t.length>0&&(e.find(".fl-builder-service-account-delete").remove(),""!==t.val()&&"add_new_account"!=t.val()&&t.after('<a href="javascript:void(0);" class="fl-builder-service-account-delete">'+FLBuilderStrings.deleteAccount+"</a>"))},_accountDeleteClicked:function(){var i=e(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),n=i.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:l.val(),account:n.val()},t._accountDeleteComplete),t._startSettingsLoading(n))},_accountDeleteComplete:function(){var i=e(".fl-builder-service-settings-loading"),l=i.find(".fl-builder-service-select");t._finishSettingsLoading(),l.trigger("change")},_campaignMonitorClientChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=e(this),r=l.find(".fl-builder-service-list-select"),a=s.val();0!==r.length&&r.closest("tr").remove(),""!==a&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:o.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-campaign-monitor-client-select");o.closest("tr").after(l.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=l.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==s.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:o.val(),list_id:s.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-list-select");o.closest("tr").after(l.html),t._finishSettingsLoading()},_activeCampaignChange:function(){
9
- var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=l.find(".fl-builder-service-list-select");list_type=l.find('select[name="list_type"]'),0!==s.length&&s.closest("tr").remove(),""!==list_type.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:o.val(),list_type:list_type.val()},t._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-field-row");o.after(l.html),t._finishSettingsLoading()}};e(function(){t.init()})}(jQuery),function(e){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var t={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fas fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),e(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),e(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-bar-title",placement:"bottom",title:FLBuilderStrings.tourToolsButtonTitle,content:FLBuilderStrings.tourToolsButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-done-button",placement:"bottom",title:FLBuilderStrings.tourDoneButtonTitle,content:FLBuilderStrings.tourDoneButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,orphan:!0,backdrop:!0,title:FLBuilderStrings.tourFinishedTitle,content:FLBuilderStrings.tourFinished,template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <i class="fas fa-times" data-role="end"></i> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="end">'+FLBuilderStrings.tourEnd+"</button> </div> </div>"}]};return"disabled"==FLBuilderConfig.enabledTemplates?t.steps.shift():"fl-builder-template"==FLBuilderConfig.postType&&t.steps.shift(),t},_onStart:function(){var t=e("body");t.scrollTop(0),t.append('<div class="fl-builder-tour-mask"></div>'),"module"!=FLBuilderConfig.userTemplateType&&(0===e(".fl-row").length?(e(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-builder-tour-placeholder-content fl-row fl-row-full-width fl-row-bg-none"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-fixed-width fl-node-content"> <div class="fl-col-group"> <div class="fl-col" style="width: 100%;"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text" data-type="rich-text" data-name="Text Editor"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque ut lorem non cursus. Sed mauris nunc, porttitor iaculis lorem a, sollicitudin lacinia sapien. Proin euismod orci lacus, et sollicitudin leo posuere ac. In hac habitasse platea dictumst. Maecenas elit magna, consequat in turpis suscipit, ultrices rhoncus arcu. Phasellus finibus sapien nec elit tempus venenatis. Maecenas tincidunt sapien non libero maximus, in aliquam felis tincidunt. Mauris mollis ultricies facilisis. Duis condimentum dignissim tortor sit amet facilisis. Aenean gravida lacus eu risus molestie egestas. Donec ut dolor dictum, fringilla metus malesuada, viverra nunc. Maecenas ut purus ac justo aliquet lacinia. Cras vestibulum elementum tincidunt. Maecenas mattis tortor neque, consectetur dignissim neque tempor nec.</p> </div> </div> </div> </div> </div> </div> </div> </div></div>'),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols()):e(".fl-row").eq(0).addClass("fl-builder-tour-demo-content"))},_onPrev:function(){e(".fl-builder-tour-dimmed").remove()},_onNext:function(){e(".fl-builder-tour-dimmed").remove()},_onEnd:function(){e("body").off("fl-builder.template-selector-loaded"),e(".fl-builder-tour-mask").remove(),e(".fl-builder-tour-dimmed").remove(),e(".fl-builder-tour-placeholder-content").remove(),e(".fl-builder-tour-demo-content").removeClass("fl-builder-tour-demo-content"),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(t){e(t).find(".fl-builder-tour-dimmed").remove(),e(t).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(e,t){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;var l=i.indexOf(e,t);return l!==-1&&l===t}),e.fn.textWidth=function(t,i){return e.fn.textWidth.fakeEl||(e.fn.textWidth.fakeEl=e("<span>").hide().appendTo(document.body)),e.fn.textWidth.fakeEl.text(t||this.val()||this.text()).css("font",i||this.css("font")),e.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(t){var i=Object.create(this);return i=e.extend(i,t),e(this).trigger("onCreate"),i}},e.fn.switchClass=function(t,i){return this.each(function(){return e(this).removeClass(function(e,i){var l=[],n=i.split(" ");for(var e in n)n[e].startsWith(t)&&l.push(n[e]);return l.join(" ")}),e(this).addClass(t+i)})};var i={init:function(){t.addHook("cancelTask",this.onCancelTask.bind(this)),t.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),t.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),t.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),t.addHook("endEditingSession",this.onEndEditingSession.bind(this)),t.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(t,i,l){var n=e.proxy(this,"onTriggerKey",t);l?Mousetrap.bindGlobal(i,n):Mousetrap.bind(i,n)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){this.reset();for(var e in FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,i){t.triggerHook(e),i.preventDefault?i.preventDefault():i.returnValue=!1},onCancelTask:function(){return n.isPreviewing?void n.endPreview():l.isShowing?void l.hide():t.ContentPanel.isShowing?void t.ContentPanel.hide():void 0},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){if("Builder"in FL&&"data"in FL.Builder){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!1)}document.documentElement.classList.remove("fl-builder-assistant-visible"),this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){if("Builder"in FL&&"data"in FL.Builder){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!0)}const t=FL.Builder.data.getSystemState().currentPanel;"assistant"===t&&document.documentElement.classList.add("fl-builder-assistant-visible"),this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){if(t.SaveManager.layoutNeedsPublish()){var e=FLBuilderStrings.savedStatus.hasAlreadySaved;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}else{var e=FLBuilderStrings.savedStatus.nothingToSave;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}},onNextPrevTabShortcut:function(i,l){var n,o,s=e(".fl-lightbox:visible"),r=s.find(".fl-builder-settings-tabs a");s.length>0&&(n=r.filter("a.fl-active"),o="next"==i?n.is(r.last())?r.first():n.next("a"):n.is(r.first())?r.last():n.prev("a"),o.trigger("click")),t._calculateSettingsTabsOverflow(),l.preventDefault()}},l=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=e(".fl-builder-publish-actions"),this.$defaultBarButtons=e(".fl-builder-bar-actions"),this.$clickAwayMask=e(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click touchend",this.onActionClicked.bind(this)),t.addHook("triggerDone",this.onDoneTriggered.bind(this));var i=this.hide.bind(this);t.addHook("cancelPublishActions",i),t.addHook("endEditingSession",i),this.$clickAwayMask.on("click",i)},onDoneTriggered:function(){t.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?t._exit():t._exitWithoutRefresh()},show:function(){this.isShowing||t._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,t.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(i){var l=e(i.currentTarget).data("action");switch(l){case"dismiss":this.hide();break;case"discard":this.hide(),n.muteToolbar(),t._discardButtonClicked();break;case"publish":this.hide(),n.muteToolbar(),t._publishButtonClicked(),t._destroyOverlayEvents();break;case"draft":this.hide(),n.muteToolbar(),t._draftButtonClicked();break;default:this.hide(),n.muteToolbar(),t._draftButtonClicked()}t.triggerHook(l+"ButtonClicked")}}),n={isPreviewing:!1,init:function(){this.$el=e("body"),this.$mainToolbar=e(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=e("#wpadminbar"),this.$endPreviewBtn=e(".fl-builder--preview-actions .end-preview-btn"),t.addHook("endEditingSession",this.endEditingSession.bind(this)),t.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=e(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this));var i=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a");i.on("click",this.onClickPageBuilderToolbarLink.bind(this)),e("#wpadminbar a").attr("tabindex","-1");var l=this.restartEditingSession.bind(this);t.addHook("restartEditingSession",l),t.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),t.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),t.addHook("didEnterRevisionPreview",this.hide.bind(this)),t.addHook("didExitRevisionPreview",this.show.bind(this)),t.addHook("didPublishLayout",this.onPublish.bind(this))},endEditingSession:function(){t._destroyOverlayEvents(),t._removeAllOverlays(),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t._unbindEvents(),e("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),e("body").removeClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex",null),e(t._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(i){t._initTemplateSelector(),t._bindOverlayEvents(),t._highlightEmptyCols(),t._rebindEvents(),e("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),e("body").addClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex","-1"),e(t._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),i.preventDefault()},onClickPageBuilderToolbarLink:function(e){t.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){var e=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span");e.css("color","#6bc373")},hide:function(){e("html").hasClass("fl-builder-edit")&&(t._unbindEvents(),t._destroyOverlayEvents(),t._removeAllOverlays(),e("html").removeClass("fl-builder-edit"),e("body").removeClass("admin-bar"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init(),t.triggerHook("didHideEditingUI"))},show:function(){e("html").hasClass("fl-builder-edit")||(t._rebindEvents(),t._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),e("html").addClass("fl-builder-edit"),e("body").addClass("admin-bar"),t.triggerHook("didShowEditingUI"))},beginPreview:function(){t._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),e("html").addClass("fl-builder-preview"),e("html, body").removeClass("fl-builder-edit"),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t.triggerHook("didBeginPreview"),FLBuilderResponsivePreview.enter())},endPreview:function(){this.isPreviewing=!1,this.show(),t._highlightEmptyCols(),FLBuilderResponsivePreview.exit(),e("html").removeClass("fl-builder-preview"),e("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),e("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),e("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(t){var i=e(t.target).data("mode");FLBuilderResponsivePreview.switchTo(i),FLBuilderResponsivePreview._showSize(i)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),t._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},o={isEditing:!0,init:function(){history.pushState&&(t.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),t.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url),this.isEditing=!1}},s={$row:null,$rowContent:null,row:null,drag:{},init:function(){if(this.userCanResize()){var i=e(t._contentClass);i.delegate(".fl-row","mouseenter touchstart",this.onDragHandleHover.bind(this)),i.delegate(".fl-block-row-resize","mousedown touchstart",this.onDragHandleDown.bind(this))}},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(t){if(!this.drag.isDragging){var i=this,l=e(t.target),n=l.closest(".fl-row"),o=n.data("node"),s=e(".fl-builder-row-settings[data-node="+o+"]"),r=s.find("[name=max_content_width_unit]"),a="px";i.onSettingsReady(o,function(t){r.length?a=r.length:"undefined"!=typeof t&&(a=t.max_content_width_unit),i.$row=n,i.$rowContent=i.$row.find(".fl-row-content"),i.row={node:o,form:s,unit:a,isFixedWidth:i.$row.hasClass("fl-row-fixed-width"),parentWidth:"vw"===a?e(window).width():i.$row.parent().width()},i.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},i.row.isFixedWidth?i.drag.originalWidth=i.$row.width():i.drag.originalWidth=i.$rowContent.width(),i.dragInit()})}},onSettingsReady:function(e,t){var i="undefined"!=typeof FLBuilderSettingsConfig.nodes?FLBuilderSettingsConfig.nodes:null;null!==i&&"undefined"!=typeof i[e]?(t(i[e]),null!=s._mouseEnterTimeout&&(clearTimeout(s._mouseEnterTimeout),s._mouseEnterTimeout=null)):(clearTimeout(s._mouseEnterTimeout),s._mouseEnterTimeout=setTimeout(this.onSettingsReady.bind(this),350,e,t))},onDragHandleDown:function(){e("body").addClass("fl-builder-row-resizing"),null!=s._mouseEnterTimeout&&(clearTimeout(s._mouseEnterTimeout),s._mouseEnterTimeout=null)},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(i,l){var n=e("body"),o=e(l.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),o.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=o.find(".fl-block-col-resize-feedback-left")),o.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=o.find(".fl-block-col-resize-feedback-right")),n.addClass("fl-builder-row-resizing"),t._colResizing=!0,t._destroyOverlayEvents(),t._closePanel()},dragging:function(e,t){var i=t.position.left,l=t.originalPosition.left,n=this.drag.originalWidth,o=0,s=this.drag.edge,r=FLBuilderConfig.rowResize.minAllowedWidth,a=FLBuilderConfig.rowResize.maxAllowedWidth;l!==i&&(FLBuilderConfig.isRtl&&(s="w"==s?"e":"w"),l>i?"w"===s?this.drag.operation="+":this.drag.operation="-":"e"===s?this.drag.operation="+":this.drag.operation="-",o=Math.abs(l-i),"+"===this.drag.operation?this.drag.calculatedWidth=n+2*o:this.drag.calculatedWidth=n-2*o,!1!==r&&this.drag.calculatedWidth<r&&(this.drag.calculatedWidth=r),!1!==a&&this.drag.calculatedWidth>a&&(this.drag.calculatedWidth=a),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),"px"!==this.row.unit&&(this.drag.calculatedWidth=Math.round(this.drag.calculatedWidth/this.row.parentWidth*100)),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+this.row.unit).show(),this.row.form.length&&this.row.form.find("[name=max_content_width]").val(this.drag.calculatedWidth))},dragStop:function(i,l){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();var n={action:"resize_row_content",node:this.row.node,width:this.drag.calculatedWidth},o=e("body");t.ajax(n),t._bindOverlayEvents(),o.removeClass("fl-builder-row-resizing"),e(".fl-block-overlay").each(function(){t._buildOverlayOverflowMenu(e(this))}),setTimeout(function(){t._colResizing=!1},50),t.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},r={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips();var e=this.$el.find(".fl-builder-content-panel-button");e.on("click",t._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",t._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",t._upgradeClicked),this.$el.find("#fl-builder-toggle-notifications").on("click",this.onNotificationsButtonClicked.bind(this)),t.addHook("notificationsLoaded",this.onNotificationsLoaded.bind(this))},render:function(t){var i=e(this.template(t));this.$el=i,this.el=i.get(0),n.$mainToolbar=this.$el,e("body").prepend(i),e("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),e(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})},onNotificationsButtonClicked:function(){t.triggerHook("toggleNotifications")},onNotificationsLoaded:function(){e("body").removeClass("fl-builder-has-new-notifications");var i={action:"fl_builder_notifications",read:!0};t.ajax(i)}};e(function(){t.ContentPanel.init(),FLBuilderConfig.simpleUi||t.MainMenu.init(),FLBuilderConfig.showToolbar?(r.init(),t.ContentPanel.alignPanelArrow()):e("html").addClass("fl-builder-no-toolbar"),i.init(),n.init(),o.init(),s.init(),l.init(),t.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing"),this.isShowing=!0},hide:function(){this.$el.removeClass("is-showing"),this.isShowing=!1},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),l=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){this.template=wp.template(this.templateName),e("body").prepend(this.template(this)),this.$el=e(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html("");for(var i in FLBuilderConfig.mainMenu)this.renderPanel(i);e("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=e(".fl-builder-bar-title"),e("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var l=this.hide.bind(this);t.addHook("didShowPublishActions",l),t.addHook("didBeginSearch",l),t.addHook("didBeginPreview",l),t.addHook("didShowContentPanel",l),t.addHook("endEditingSession",l),t.addHook("didFocusSearchBox",l),t.addHook("didEnterRevisionPreview",l),t.addHook("didFailSettingsSave",l),t.addHook("showKeyboardShortcuts",l),this.$mask=e(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",l),n.init(),o.init()},renderPanel:function(t){var l,n,o,s=this.views[t];l=FLBuilderConfig.mainMenu[t],l.handle=t,n=i.create(l),n.init(),o=e(n.render()),n.$el=o,e(".fl-builder--main-menu-panel-views").append(o),n.bindEvents(),n.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),"undefined"!=typeof s&&(s.$el.remove(),s.isShowing&&(this.currentView=n,n.show())),n.isRootView&&(this.rootView=n,this.currentView=n),this.views[t]=n},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),t.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(i){var l=e(i.currentTarget),n=l.data("type");switch(n){case"view":var o=l.data("view");this.goToView(o);break;case"event":var s=l.data("event");t.triggerHook(s,l);break;case"link":}},goToView:function(e){var t=this.currentView,i=this.views[e];t.transitionOut(),i.transitionIn(),this.currentView=i,this.viewNavigationStack.push(t)},goToPreviousView:function(){var t=this.currentView,i=this.viewNavigationStack.pop();t.transitionOut(!0),i.transitionIn(!0),this.currentView=i,e(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}});t.MainMenu=l;var n={init:function(){if(t.addHook("saveTemplate",this.saveTemplate.bind(this)),t.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),t.addHook("duplicateLayout",this.duplicateLayout.bind(this)),t.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),t.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),t.addHook("toggleUISkin",this.toggleUISkin.bind(this)),t.addHook("clearLayoutCache",this.clearLayoutCache.bind(this)),t.addHook("launchThemerLayouts",this.launchThemerLayouts.bind(this)),"FL"in window&&"Builder"in FL){var e=FL.Builder.data.getSystemActions();t.addHook("showKeyboardShortcuts",function(){e.setShouldShowShortcuts(!0)})}},saveTemplate:function(){t._saveUserTemplateClicked(),l.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),l.hide()},duplicateLayout:function(){t._duplicateLayoutClicked(),l.hide()},showGlobalSettings:function(){t._globalSettingsClicked(),l.hide()},showLayoutSettings:function(){t._layoutSettingsClicked(),l.hide()},clearLayoutCache:function(){t.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),t.showAjaxLoader(),l.hide()},toggleUISkin:function(i){e('a[data-event="toggleUISkin"]');if(e("body").hasClass("fl-builder-ui-skin--light"))var l="light",n="dark";if(e("body").hasClass("fl-builder-ui-skin--dark"))var l="dark",n="light";if(e("body").removeClass("fl-builder-ui-skin--"+l).addClass("fl-builder-ui-skin--"+n),"Builder"in FL&&"data"in FL.Builder){var o=FL.Builder.data.getSystemActions();o.setColorScheme(n)}t.ajax({action:"save_ui_skin",skin_name:n})},launchThemerLayouts:function(){FLBuilderConfig.lite?t._showProMessage("Themer Layouts"):window.open(FLBuilderConfig.themerLayoutsUrl),l.hide()}},o={init:function(){t.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),l.hide()}}}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(i){this.categorySelector=a.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),e(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));i.views;if(this.initViews(i.views),0===Object.keys(this.views).length){var l={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"};this.addView(l)}if(!this.activeView){var n=Object.keys(this.views)[0],l=this.views[n];this.activeView=l}this.defaultView=this.activeView,e(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),e(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),t.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){var i=e[t];this.categorySelector.addItem(i),"separator"!==i.type&&this.addView(i)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=n;break;case"rows":t=o;break;case"templates":t=s;break;case"saved":t=r;break;default:t=l}_.isNull(this.viewController)||_.isUndefined(this.viewController)||(t=window[this.viewController]);var i=t.create(e),a=i.handle;i.init(),this.views[a]=i,i.isShowing&&(this.activeView=i)},renderView:function(e){if(this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),_.isObject(e))var i=e;else var i=this.views[e];if(_.isObject(i)&&_.isFunction(i.render)){var l=i.render();this.$el.find(".fl-nanoscroller-content").html(l),this.activeView=i,t._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0)}},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){e(this.activeView).trigger("onBeforeShow"),this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e=this.panel.$groupSelect,t=this.panel.$el.find(".fl-builder-panel-search");if(this.isSearchEnabled?t.show():t.hide(),Object.keys(this.views).length>1&&!_.isUndefined(this.categorySelector)){var i=this.categorySelector.render();this.panel.$el.find(".fl-builder-content-group-select");e.html(i),e.show(),this.panel.$el.removeClass("single-view")}else e.hide(),t.hide(),this.panel.$el.addClass("single-view")},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=t.Search.byQuery(this.query)),e},render:function(){e(this).trigger("beforeRender");var t=this;t=this.filterTemplateData(t);var i=e(this.template(t));return this.$el=i,e(this).trigger("afterRender"),i},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),n=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),o=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),s=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=e(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(t){var i=e(t.currentTarget),l=i.val(),n=i.siblings("button");""!==l?n.show():n.hide()},onSaveButtonClick:function(i){var l=e(i.currentTarget),n=l.siblings('input[name="template-name"]').val(),o=l.siblings('input[name="template-category"]').val(),s={
10
  name:n,category:o};""!==n&&t.ajax({action:"save_user_template",settings:s},t._saveUserTemplateSettingsComplete)},onTemplateClick:function(i){var l=e(i.currentTarget),n=l.data("id"),o=l.data("type"),s=l.data("premium");FLBuilderConfig.lite&&s?t._showProMessage(l.find(".fl-builder--template-name").text()):t._requestTemplateInsert(n,o)}}),r=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=t.Search.byQuery({kind:"template",type:"user",content:["module","column","row"]}),e}}),a=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var t=e(this.template(this));return this.$el=t,e(this).trigger("afterRender"),t},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t;t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle,this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(t){var i=e(t.target),l=i.data("view");if(i.hasClass("fl-has-children")){var n=e('[data-parent="'+l+'"]');n.is(":visible")?(this.items[l].hasChildrenOpen=!1,i.removeClass("fl-has-children-showing"),n.hide()):(this.items[l].hasChildrenOpen=!0,i.addClass("fl-has-children-showing"),n.show()),i.blur()}else e(this).trigger("categorySelected",l)}});t.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e=FLBuilderConfig.panelData.tabs;for(var l in e){var n=e[l];if(s=i.create(n),s.panel=this,s.views={},s.init(n),this.tabs[l]=s,s.isShowing&&(this.activeTab=s),!this.activeTab){var o=Object.keys(this.tabs)[0],s=this.tabs[o];s.isShowing=!0,this.activeTab=s}}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),t.triggerHook("contentPanelDidInit")}},render:function(){e("body").prepend(this.template(this)),this.$el=e(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),e(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),t.addHook("showContentPanel",this.show.bind(this)),t.addHook("showModules",this.show.bind(this,"modules")),t.addHook("showRows",this.show.bind(this,"rows")),t.addHook("showTemplates",this.show.bind(this,"templates")),t.addHook("showSaved",this.show.bind(this,"saved")),t.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this);t.addHook("hideContentPanel",e),t.addHook("didShowLightbox",e),t.addHook("didShowPublishActions",e),t.addHook("didBeginSearch",e),t.addHook("didInitDrag",e),t.addHook("didOpenMainMenu",e),t.addHook("didApplyTemplate",e);var i=this.toggleShowHide.bind(this);t.addHook("toggleContentPanel",i),t.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var t,i,l=this.$el,n=null,o=this.$el.find(".fl-builder--panel-arrow"),s=e(".fl-builder-content-panel-button"),r=this.$el.css("animation-duration");if(0!=s.length){this.$el.css("animation-duration","0s"),this.show(),n=l[0].getBoundingClientRect(),t=o[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",r);var a=s[0].getBoundingClientRect(),d=a.x+a.width/2;i=d<n.x?20:d-n.x-t.width/2,o.css({right:"auto",left:i+"px"})}},show:function(i){if("module"!==FLBuilderConfig.userTemplateType&&!FLBuilderConfig.simpleUi&&(t.triggerHook("willShowContentPanel"),"undefined"!=typeof i&&this.showTab(i),!this.isShowing&&t._triggerSettingsSave(!1,!0)&&(e("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,e(this).trigger("onShow"),t.triggerHook("didShowContentPanel"),"Builder"in FL&&"data"in FL.Builder))){const l=FL.Builder.data.getSystemActions();l.hideCurrentPanel()}},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(e("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,e(this).trigger("onHide"),t.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(t){var i=this.tabs[t];_.isObject(i)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),i.show(),this.$tabs.filter('[data-tab="'+i.handle+'"]').addClass("is-showing"),this.activeTab=i,e(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(t){e(t.currentTarget).blur()},onTabItemClick:function(t){var i=e(t.target),l=i.data("tab");this.showTab(l)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),e(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),e(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),e(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var i=this.$searchInput.val();if(""!==i){var l=t.Search.byTerm(i);""!=l.term?this.showSearchResults(l):this.hideSearchResults()}else this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(i){if(i.total>0){var l=e(this.renderSearchResults(i));this.$searchPanel.html(l),t._initSortables()}else{var l=e(this.renderNoResults(i));this.$searchPanel.html(l)}e("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){e("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(e){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(t,i){var l=FLBuilderSettingsConfig.forms,n=FLBuilderSettingsConfig.modules,o={type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],activeTab:null,buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null,messages:null};if(t.nodeId&&!t.settings)return void this.loadNodeSettings(t,i);if(t=e.extend(o,t),i=void 0===i?function(){}:i,t.id){if("general"===t.type&&void 0!==l[t.id])t=e.extend(!0,t,l[t.id]);else{if("module"!==t.type||void 0===n[t.id])return;t=e.extend(!0,t,n[t.id])}if(this.config=t,this.renderLightbox(t)&&(t.legacy||!this.renderLegacySettings(t,i)?this.renderComplete(t,i):this.showLightboxLoader()),"Builder"in FL&&"data"in FL.Builder){const s=FL.Builder.data.getSystemActions();s.hideCurrentPanel()}}},loadNodeSettings:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"get_node_settings",node_id:e.nodeId},function(i){e.settings=FLBuilder._jsonParse(i),FLBuilderSettingsConfig.nodes[e.nodeId]=e.settings,FLBuilderSettingsForms.render(e,t),FLBuilder.hideAjaxLoader()})},renderLightbox:function(t){var i=wp.template("fl-builder-settings"),l=FLBuilder._lightbox._node.find("form.fl-builder-settings"),n=(e(".fl-lightbox-wrap[data-parent]"),localStorage.getItem("fl-builder-settings-tab"));if(t.nodeId&&t.nodeId===l.data("node")&&!t.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(t.hide)return!0;if(n)for(var o in t.tabs)o===n.replace("fl-builder-settings-tab-","")&&(t.activeTab=o);if(t.activeTab||(t.activeTab=Object.keys(t.tabs).shift()),t.lightbox)t.lightbox.setContent(i(t));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(i(t))}return!0},renderComplete:function(t,i){var l=e(".fl-builder-settings:visible");setTimeout(function(){t.legacy&&this.renderLegacySettingsComplete(t.legacy),i(),FLBuilder._initSettingsForms(),t.rules&&FLBuilder._initSettingsValidation(t.rules,t.messages),t.preview&&(FLBuilder.preview=new FLBuilderPreview(t.preview)),t.helper&&t.helper.init(),l.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,l))}.bind(this),1)},renderFields:function(t,i){var l=wp.template("fl-builder-settings-row"),n="",o=null,s=null,r=null,a=!1,d=null,u=["align","border","dimension","unit","photo","select","typography"],i=i?i:this.config.settings,c=FLBuilderConfig.global;for(s in t)o=t[s],a=!!o.multiple,supportsResponsive=e.inArray(o.type,u)>-1,r=_.isUndefined(i[s])?"":i[s],o.type&&(_.isUndefined(i[s])&&o["default"]&&(r=o["default"]),d=o.responsive&&c.responsive_enabled&&!a&&supportsResponsive?o.responsive:null,n+=l({field:o,name:s,rootName:s,value:r,preview:JSON.stringify(o.preview?o.preview:{type:"refresh"}),responsive:d,rowClass:o.row_class?" "+o.row_class:"",isMultiple:a,supportsMultiple:"editor"!==o.type&&"service"!==o.type,settings:i,globalSettings:c,template:e("#tmpl-fl-builder-field-"+o.type)}));return n},renderField:function(e){var t=wp.template("fl-builder-field");return t(e)},renderSectionTemplate:function(e,t){var i=wp.template(e.template.id);return i({section:e,settings:t})},renderTabTemplate:function(e,t){var i=wp.template(e.template.id);return i({tab:e,settings:t})},renderLegacySettings:function(t,i){var l=e(".fl-builder-settings:visible"),n=null,o=!1,s={tabs:[],sections:[],fields:[],settings:null,node_id:null};return l.find(".fl-legacy-field").each(function(){n=e(this),s.fields.push(n.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(n),o=!0}),l.find(".fl-legacy-settings-section").each(function(){n=e(this),s.sections.push({tab:n.attr("data-tab"),section:n.attr("data-section")}),o=!0}),l.find(".fl-legacy-settings-tab").each(function(){n=e(this),s.tabs.push(n.attr("data-tab")),o=!0}),l.attr("data-node")?s.node_id=l.attr("data-node"):s.settings=FLBuilder._getOriginalSettings(l,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(e.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:s,form:l.attr("data-form-id"),group:l.attr("data-form-group"),lightbox:l.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),o&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),o},renderLegacySettingsComplete:function(t){var i="object"==typeof t?t:FLBuilder._jsonParse(t),l=null,n=null,o="",s=null,r=null,a=null;if(i.lightbox?(l=e(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]"),n=l.length?l.find(".fl-builder-settings"):null):(n=e(".fl-builder-settings:visible"),l=n.closest(".fl-builder-lightbox")),n&&n.length){for(o in i.fields)s=e("#fl-field-"+o).attr("id",""),s.after(i.fields[o]).remove();for(o in i.extras)s=e("#fl-field-"+o).find(".fl-field-control-wrapper"),i.extras[o].multiple?s.each(function(t,l){t in i.extras[o].before&&""!=i.extras[o].before[t]&&e(this).prepend('<div class="fl-form-field-before">'+i.extras[o].before[t]+"</div>"),t in i.extras[o].after&&""!=i.extras[o].after[t]&&e(this).append('<div class="fl-form-field-after">'+i.extras[o].after[t]+"</div>")}):(""!=i.extras[o].before&&s.prepend('<div class="fl-form-field-before">'+i.extras[o].before+"</div>"),""!=i.extras[o].after&&s.append('<div class="fl-form-field-after">'+i.extras[o].after+"</div>"));for(a in i.sections)for(o in i.sections[a])r=e("#fl-builder-settings-section-"+o),r.html(i.sections[a][o]);for(o in i.tabs)a=e("#fl-builder-settings-tab-"+o),a.html(i.tabs[o]);l.data("parent")||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,n),FLBuilder.preview&&(this.settings=e.extend(this.settings,FLBuilder.preview._savedSettings),FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var t=e(".fl-builder-settings:visible"),i=t.closest(".fl-builder-lightbox"),l=i.attr("data-parent"),n=null,o=null,s={};return l&&(l=e(".fl-builder-lightbox[data-instance-id="+l+"]"),t=l.find("form.fl-builder-settings"),n=FLBuilder._getSettings(t),o=t.attr("data-node"),o&&(s.node_id=o,s.node_settings=n)),s},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),i=!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(t);return i},closeOnDeleteNode:function(t){var i=e(".fl-builder-settings[data-node]"),l=FLBuilder._contentClass+" .fl-node-"+i.data("node");i.length&&!e(l).length&&FLLightbox.closeAll()},showLightboxLoader:function(){e(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(t){e(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){var t=e.closest(".fl-field-control").find(".fl-field-control-wrapper");t.hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field"),i=e.closest(".fl-field-control").find(".fl-field-control-wrapper");i.show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,e.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.reload),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyColTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreHistoryComplete",this.updateOnHistoryRestored.bind(this))},reload:function(){var t=FLBuilderConfig.editUrl+"&fl_builder_load_settings_config=core";e('script[src*="fl_builder_load_settings_config=core"]').remove(),e("head").append('<script src="'+t+'"></script>')},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t,FLBuilderConfig.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];e.namespace.indexOf("didAdd")>-1?this.addNode("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didSaveNodeSettings")>-1?this.updateNode(arguments[1].nodeId,arguments[1].settings):e.namespace.indexOf("didDelete")>-1?this.deleteNodes("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didDuplicate")>-1&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(t,i){var l=this;i.cols.each(function(){var t=e(this),i=t.attr("data-node");l.nodes[i]&&(l.nodes[i].size=parseFloat(t[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},updateOnHistoryRestored:function(e,t){this.nodes=t.config.nodes,this.attachments=t.config.attachments,this.settings.layout=t.settings.layout,this.settings.global=t.settings.global,FLBuilderConfig.global=t.settings.global},addNode:function(t,i){var l=e(".fl-node-"+t),n=l.hasClass("fl-row"),o=l.hasClass("fl-col"),s=l.hasClass("fl-col-group"),r=l.hasClass("fl-module"),a=this;this.nodes[t]||(i||(n?i=e.extend({},this.defaults.row):o?i=e.extend({},this.defaults.column):r&&(i=e.extend({},this.defaults.modules[l.attr("data-type")])),n||s?l.find(".fl-col").each(function(){var t=e(this),i=e.extend({},a.defaults.column);i.size=parseFloat(t[0].style.width),a.addNode(t.attr("data-node"),i)}):r&&(a.addNode(l.closest(".fl-row").attr("data-node")),a.addNode(l.closest(".fl-col").attr("data-node")),a.updateOnResetColumnWidths(null,{cols:l.closest(".fl-col-group").find("> .fl-col")}))),i&&(this.nodes[t]=i))},updateNode:function(t,i){var l=e(".fl-node-"+t),n=this;l.hasClass("fl-col")&&l.closest(".fl-col-group").find("> .fl-col").each(function(){var t=e(this),l=t.attr("data-node");n.nodes[l].size=parseFloat(t[0].style.width),n.nodes[l].equal_height=i.equal_height,n.nodes[l].content_alignment=i.content_alignment,n.nodes[l].responsive_order=i.responsive_order}),this.nodes[t]=i},duplicateNode:function(t,i){var l=e(".fl-node-"+i),n=l.find("[data-node]"),o=e(".fl-node-"+t),s=o.find("[data-node]"),r=this;this.nodes[i]=this.nodes[t],n.each(function(l){t=s.eq(l).attr("data-node"),i=e(this).attr("data-node"),r.nodes[t]&&(r.nodes[i]=r.nodes[t])})},deleteNodes:function(){var t="",i=e(FLBuilder._contentClass).html();for(t in this.nodes)i.indexOf(t)===-1&&(this.nodes[t]=null,delete this.nodes[t])}}),e(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(e){FLBuilderSettingsCopyPaste={init:function(){FLBuilder.addHook("settings-form-init",this.initExportButton),FLBuilder.addHook("settings-form-init",this.initImportButton)},initExportButton:function(){new ClipboardJS("button.module-export-all",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),o=FLBuilder._getSettings(l),s=new Date,r=s.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-all"),u=d.attr("title");return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(o)}}),new ClipboardJS("button.module-export-style",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),o=FLBuilder._getSettings(l),s=new Date,r=s.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-style"),u=d.attr("title"),c={};for(var f in o){var h=l.find('[name="'+f+'"]'),p=l.find('[name*="'+f+'["]'),g=!1;h.length?g=h.closest(".fl-field").data("is-style"):p.length&&(g=p.closest(".fl-field").data("is-style")),g&&(c[f]=o[f])}return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(c)}})},initImportButton:function(){e("button.module-import-apply").click(function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=e(".module-import-input").val(),l=i.match(/\/\/\/\s\{type:([_a-z0-9-]+)/),n=!1,o=e(".fl-builder-module-settings").data("type"),s=e(".fl-builder-settings-lightbox .module-import-error");if(s.hide(),l&&"undefined"!=typeof l[1]&&(n=l[1]),!n||n!==o)return s.html(FLBuilderStrings.module_import.type).show(),!1;var r=i.replace(/\/\/\/.+\/\/\//,"");try{var a=JSON.parse(r)}catch(d){var a=!1;return s.html(FLBuilderStrings.module_import.error).show(),!1}if(a){var u=t.attr("data-node"),c=e.extend({},FLBuilderSettingsConfig.nodes[u],a);FLBuilderSettingsConfig.nodes[u]=c,FLBuilder.ajax({action:"save_settings",node_id:u,settings:c},FLBuilder._saveSettingsComplete.bind(this,!0,null)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:u,settings:c}),FLBuilder._lightbox.close()}})}},e(function(){FLBuilderSettingsCopyPaste.init()})}(jQuery),function(e){var t={minWidth:320,maxWidth:600,minHeight:400,init:function(){this.initPanel(),this.pinOrUnpin(),this.bind()},bind:function(){var t=e(window),i=e("body");t.on("resize",_.throttle(this.windowResize.bind(this),250)),i.delegate(".fl-builder-ui-pinned-collapse","click",this.collapse),i.delegate(".fl-builder--content-library-panel .fl-builder--tabs","click",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return e(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didPinContentPanel")},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didUnpinContentPanel")},pinOrUnpin:function(){var t=e(".fl-builder--content-library-panel"),i=this.isPinned();t.hasClass("fl-builder-ui-pinned-hidden")||(window.innerWidth<=this.maxWidth?(i&&this.unpin(!1),this.disableDragAndResize()):(i||this.restorePosition(),this.enableDragAndResize()))},show:function(){var t=e(".fl-builder--content-library-panel");t.hasClass("fl-builder-ui-pinned-hidden")&&(t.removeClass("fl-builder-ui-pinned-hidden"),t.show(),this.restorePosition())},hide:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),i.addClass("fl-builder-ui-pinned-hidden"),i.hide(),t.css("margin",""),FLBuilder._resizeLayout())},collapse:function(){var t=e(this).find("i:visible"),i=e("body"),l=t.data("toggle"),n=t.data("position"),o=e(".fl-builder--content-library-panel"),s=o.outerWidth();"hide"===l?(o.css(n,"-"+s+"px"),i.css("margin-"+n,""),i.addClass("fl-builder-ui-pinned-is-collapsed")):(o.css(n,"0px"),i.css("margin-"+n,s+"px"),i.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&e(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return e("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var t=e(".fl-builder--content-library-panel");t.draggable({cursor:"move",handle:".fl-builder--tabs",cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:this.minHeight,minWidth:this.minWidth,maxWidth:this.maxWidth,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),t.addClass("fl-builder-ui-pinned-container"),t.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(t){var i=e(".fl-builder--content-library-panel"),l=i.outerWidth(),n=e("body"),o=e(".fl-responsive-preview, .fl-responsive-preview-mask"),s=e(FLBuilder._contentClass).parentsUntil("body").last();n.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+t),n.addClass("fl-builder-content-panel-is-showing"),n.css("margin-"+t,l+"px"),o.css("margin-"+t,l+"px"),s.addClass("fl-builder-ui-pinned-content-transform"),i.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+t),i.find(".ui-resizable-"+("left"===t?"e":"w")).show(),i.on("resize",_.throttle(this.resize.bind(this),250)),i.attr("style",""),FLBuilder.ContentPanel.isShowing=!0},unpinPanel:function(){var t=e(".fl-builder--content-library-panel"),i=t.find(".fl-builder--panel-content .is-showing").data("tab"),l=e("body"),n=e(".fl-responsive-preview, .fl-responsive-preview-mask"),o=e(FLBuilder._contentClass).parentsUntil("body").last();l.css("margin-left",""),l.css("margin-right",""),l.removeClass("fl-builder-ui-is-pinned"),l.removeClass("fl-builder-ui-is-pinned-left"),l.removeClass("fl-builder-ui-is-pinned-right"),n.css("margin-left",""),n.css("margin-right",""),o.removeClass("fl-lightbox-content-transform"),t.removeClass("fl-builder-ui-pinned"),t.removeClass("fl-builder-ui-pinned-left"),t.removeClass("fl-builder-ui-pinned-right"),t.find(".ui-resizable-handle").hide(),t.off("resize"),t.attr("style",""),t.find(".fl-builder--tabs [data-tab="+i+"]").addClass("is-showing")},pinLightboxes:function(){var t=this;e(".fl-lightbox-resizable").each(function(){t.pinLightbox(e(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(t){var i=e(".fl-builder--content-library-panel"),l=t.closest(".fl-lightbox-wrap");l.closest(".fl-builder-ui-pinned").length||(i.append(l),t.attr("style",""),t.draggable("disable"),t.resizable("disable")),t.is(":visible")&&i.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){var i=t._node.find(".fl-lightbox-resizable");i.length&&(i.hasClass("fl-builder-ui-pinning-initialized")||(i.draggable("option","start",this.dragStart.bind(this)),i.draggable("option","drag",this.drag.bind(this)),i.draggable("option","stop",this.dragStop.bind(this)),i.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(i),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var t=e(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=t.find(".fl-builder--panel-content .is-showing").data("tab"),t.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),e(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");i.find(".fl-lightbox-wrap").each(function(){var l=e(this),n=l.find(".fl-lightbox"),o=0,s=0,r=0;n.draggable("enable"),n.resizable("enable"),n.find(".ui-resizable-handle").show(),t.append(l),n.is(":visible")?(o=parseInt(i.css("top"))-parseInt(l.css("top"))-parseInt(l.css("padding-top")),s=parseInt(i.css("left"))-parseInt(l.css("padding-left")),r=parseInt(i.css("right"))-parseInt(l.css("padding-right")),n.css("top",(o<0?0:o)+"px"),n.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?r:s)+"px"),n.addClass("fl-lightbox-prevent-animation"),t.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):n.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var t=e("body"),i=e(".fl-responsive-preview, .fl-responsive-preview-mask"),l=e(".fl-builder--content-library-panel"),n=l.outerWidth();l.is(":visible")?l.hasClass("fl-builder-ui-pinned-left")?(t.css("margin-left",n+"px"),i.css("margin-left",n+"px")):l.hasClass("fl-builder-ui-pinned-right")&&(t.css("margin-right",n+"px"),i.css("margin-right",n+"px")):t.css("margin","")},resizeStop:function(){e("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(t,i){var l=e("body"),n=(e(t.target),e(".fl-builder-bar-actions"));e(".fl-lightbox-resizable:visible").length||n.addClass("fl-builder-content-panel-pin-zone"),l.addClass("fl-builder-draggable-is-dragging"),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(t,i){var l=e("body"),n=e(".fl-responsive-preview"),o=e(window),s=n.length?n.width():o.width(),r=o.scrollTop(),a=e(".fl-builder--content-library-panel"),d=a.offset().top,u=e(".fl-builder-bar-actions"),c=e(t.target);c.hasClass("fl-builder--content-library-panel")&&(t.clientX<s-75&&d-r<46?u.addClass("fl-builder-content-panel-pin-zone-hover"):u.removeClass("fl-builder-content-panel-pin-zone-hover")),c.hasClass("fl-builder-ui-pinned")?this.unpinPanel():t.clientX<75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):t.clientX>s-75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(t,i){var l=(e(window),e("body")),n=e(".fl-builder-bar-actions"),o=e(".fl-builder-ui-pin-zone"),s=e(".fl-builder--content-library-panel"),r=e(".fl-lightbox-resizable:visible");e(t.target);l.removeClass("fl-builder-draggable-is-dragging"),n.removeClass("fl-builder-content-panel-pin-zone"),n.removeClass("fl-builder-content-panel-pin-zone-hover"),o.remove(),r.length&&parseInt(r.css("top"))<0&&r.css("top","0"),l.hasClass("fl-builder-ui-show-pin-zone")?(l.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right")):s.find(".fl-lightbox").length?(this.unpin(!0),("module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi)&&s.hide()):(s.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable");
11
  t.draggable("disable"),t.resizable("disable"),i.draggable("disable"),i.resizable("disable")},enableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");t.draggable("enable"),t.resizable("enable"),this.isPinned()||(i.draggable("enable"),i.resizable("enable"))},savePosition:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:visible"),l={pinned:{width:t.outerWidth(),position:null}};t.hasClass("fl-builder-ui-pinned-left")?l.pinned.position="left":t.hasClass("fl-builder-ui-pinned-right")?l.pinned.position="right":i.length&&(l.lightbox={width:i.width(),height:i.height(),top:parseInt(i.css("top"))<0?"0px":i.css("top"),left:i.css("left")}),FLBuilderConfig.userSettings.pinned=l.pinned,l.lightbox&&(FLBuilderConfig.userSettings.lightbox=l.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:l})},restorePosition:function(){var t=e(".fl-builder--content-library-panel"),i=FLBuilderConfig.userSettings.pinned;i&&i.position&&(t.css("width",i.width+"px"),this.pin(i.position,!1),t.css("width",i.width+"px"))}};e(function(){t.init()})}(jQuery),function(e){var t={init:function(){this.setupMainMenuData(),e(".fl-builder--revision-actions select").on("change",this.selectChanged),e(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),e(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var t=FLBuilderConfig.revisions.posts,i=FLBuilderConfig.revisions.authors,l=wp.template("fl-revision-list-item"),n=e(".fl-builder--revision-actions select"),o="",s="",r=0;if(FLBuilderConfig.mainMenu.revisions.items=[],n.html(""),0===t.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()});else for(;r<t.length;r++)o=FLBuilderStrings.revisionDate.replace("%s",t[r].date.diff),o+=" ("+t[r].date.published+")",s=FLBuilderStrings.revisionAuthor.replace("%s",i[t[r].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:l({id:t[r].id,date:o,author:s,avatar:i[t[r].author].avatar})}),n.append('<option value="'+t[r].id+'">'+o+"</option>");void 0!==FLBuilder.MainMenu&&FLBuilder.MainMenu.renderPanel("revisions")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=FLBuilder._jsonParse(e),this.setupMainMenuData()},itemClicked:function(t,i){var l=e(i).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(e(".fl-builder--revision-actions select").val(l),this.preview(l))},selectChanged:function(i){t.preview(e(this).val())},applyClicked:function(i){var l=e(".fl-builder--revision-actions select").val();t.restore(l)},preview:function(t){e(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:t},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(i){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:i},t.restoreComplete)},restoreComplete:function(e){var t=FLBuilder._jsonParse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",t.config),settings=t.settings,"undefined"!=typeof settings.css&&null!==settings.css&&(FLBuilderSettingsConfig.settings.layout.css=settings.css),"undefined"!=typeof settings.js&&null!==settings.js&&(FLBuilderSettingsConfig.settings.layout.js=settings.js)}};e(function(){t.init()})}(jQuery),function(e){var t={query:function(e){var t={},i=null,l={library:{}},n=null;if(e=this.normalizeQuery(e),_.isNull(e.kind))t=FLBuilderConfig.contentItems;else for(var o in e.kind)i=e.kind[o],t[i]=FLBuilderConfig.contentItems[i];return n=this.findMatches(e,t),l.library=this.formatResults(n,e),l},normalizeQuery:function(e){var t={kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1};return e=_.extend(t,e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i={},l=null,n=null,o=null,s=null,r=null,a=null;for(l in t){n=t[l],i[l]={items:[]};for(a in n)if(o=n[a],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(o.category,e.category)){switch(l){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(s=_.includes(e.content,o.content),r=e.content===o.content,s||r)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==o.type)continue;if(!_.isNull(e.group)){var d=e.group,u=o.group;if(_.isString(d)&&(d=[d]),_.isString(u)&&(u=[u]),_.isEmpty(d)||_.isEmpty(u))continue;var c=!1;for(a in d){var f=d[a];_.includes(u,f)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(e.group===!1&&o.group.length>0)continue;if(e.group!==!1&&!_.includes(o.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(o,e.searchTerm))&&i[l].items.push(o)}}return i},matchesCategory:function(e,t){var i,l,n,o,s,r;if(e===t)return!0;_.isString(t)&&(t=[t]);for(l in t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(n in e)if(o=e[n],o===i)return!0;if(_.isObject(e))for(s in e)if(r=e[s],r===i||s===i)return!0}return!1},matchesSearchTerm:function(e,t){var i,l,n=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(n))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(n))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(n))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(n))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||(i="widget",!i.includes(n)))||!(_.isUndefined(e.editor_export)||(l="module",!l.includes(n))))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,t){var i,l,n={};return _.forEach(e,function(e,o,s){i=e[t],_.isNull(i)||_.isUndefined(i)||_.isString(i)&&""===e[i]||(_.isString(i)&&(n[i]=n[i]||[],n[i].push(e)),_.isArray(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})),_.isObject(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})))}),n},search:function(e){var t={searchTerm:e},i=this.query(t),l={total:0,term:e,sections:{}};if(!_.isUndefined(i.library.module.items)){var n={};for(var o in i.library.module.items){var s=i.library.module.items[o],r=s.group[0],a=s.category;s.name;_.isUndefined(n[r])&&(n[r]={}),_.isUndefined(n[r][a])&&(n[r][a]=[]),n[r][a].push(s)}l.grouped=n}for(var o in i.library){var d=i.library[o];!_.isUndefined(d.items)&&d.items.length>0&&(l.sections[o]={name:FLBuilderStrings.typeLabels[o],handle:o,type:"",items:d.items},l.total+=d.items.length)}return l}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){var i=t.search(e);return i}}}(jQuery),function(e,t){var i={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=e(".fl-builder--saving-indicator"),t.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),t.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),t.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),t.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),t.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabled||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,e("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&("save_pinned_ui_position"!=e&&("fl_builder_notifications"!=e&&!(e.indexOf("history")>-1)))))))},onLayoutSaved:function(e,t){if(this.isUpdatingLayout(t.fl_builder_data.action)){this.showStatusMessage(this.messages.saved,this.messages.savedTooltip);var i=this;setTimeout(function(){i.resetStatusMessage()},2e3)}},onLayoutPublished:function(){this.layoutNeedsPublish=!1,e("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(i,l){this.$savingIndicator.html(i),t.isUndefined(l)||(this.$savingIndicator.attr("title",l),e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fas fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){if(t.MainMenu.hide(),this.layoutNeedsPublish)t._publishLayout(!1,!0);else{this.showStatusMessage(this.messages.noChanges);var e=this;setTimeout(function(){e.resetStatusMessage()},2e3)}}};t.SaveManager={layoutNeedsPublish:function(){return i.layoutNeedsPublish},showStatusMessage:function(e,t){i.showStatusMessage(e,t)},resetStatusMessage:function(){i.resetStatusMessage()}},e(function(){i.init()})}(jQuery,FLBuilder),function(e){FLBuilderHistoryManager={states:[],position:0,rendering:!1,init:function(){var t=FLBuilderConfig.history,i=this;this.states=t.states,this.position=parseInt(t.position),this.setupMainMenuData(),e.each(t.hooks,function(e,t){FLBuilder.addHook(e,function(e,l){i.saveCurrentState(t,l)})}),FLBuilder.addHook("didPublishLayout",this.clearStatesOnPublish.bind(this)),FLBuilder.addHook("restartEditingSession",this.saveCurrentStateOnRestartSession.bind(this)),FLBuilder.addHook("historyItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("undo",this.onUndo.bind(this)),FLBuilder.addHook("redo",this.onRedo.bind(this))},saveCurrentState:function(e,t){var i=this,t="undefined"==typeof t?{}:t,l=null;"undefined"!=typeof t.moduleType&&t.moduleType&&(l=t.moduleType),FLBuilder.ajax({action:"save_history_state",label:e,module_type:l},function(e){var t=JSON.parse(e);i.states=t.states,i.position=parseInt(t.position),i.setupMainMenuData()})},saveCurrentStateOnRestartSession:function(e){this.states.length||this.saveCurrentState("draft_created")},clearStatesOnPublish:function(e,t){var i=this;this.states=[],this.position=0,this.setupMainMenuData(),FLBuilder.ajax({action:"clear_history_states",post_id:FLBuilderConfig.postId},function(){t.shouldExit||i.saveCurrentState("draft_created")})},renderState:function(t){var i=this;if(!this.rendering&&this.states.length&&!e(".fl-builder-settings:visible").length){var l=setTimeout(FLBuilder.showAjaxLoader,2e3);this.rendering=!0,FLBuilder.ajax({action:"render_history_state",position:t},function(e){var t=JSON.parse(e);t.error||(i.position=parseInt(t.position),FLBuilder.triggerHook("didRestoreHistoryComplete",t),FLBuilder._renderLayout(t.layout),i.setupMainMenuData()),clearTimeout(l),i.rendering=!1})}},onUndo:function(){this.renderState("prev")},onRedo:function(){this.renderState("next")},setupMainMenuData:function(){var e=FLBuilderConfig.history.labels,t="";FLBuilderConfig.mainMenu.history.items=[];for(var i=this.states.length-1;i>=0;i--)"string"==typeof this.states[i]?t=e[this.states[i]]?e[this.states[i]]:this.states[i]:(t=e[this.states[i].label]?e[this.states[i].label]:this.states[i].label,(this.states[i].moduleType||this.states[i].label.indexOf("module")>-1)&&(t=t.replace("%s",this.getModuleName(this.states[i].moduleType)))),FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:t,current:i===this.position?1:0,position:i})});FLBuilderConfig.history.enabled||FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:FLBuilderConfig.history.labels.history_disabled,current:0,position:0})}),void 0!==FLBuilder.MainMenu&&FLBuilder.MainMenu.renderPanel("history")},getModuleName:function(e){var t=FLBuilderConfig.contentItems.module,i=0;if("widget"===e)return FLBuilderStrings.widget;for(;i<t.length;i++)if("undefined"!=typeof t[i].slug&&e===t[i].slug)return t[i].name;return FLBuilderStrings.module},itemClicked:function(t,i){var l=e(i).find(".fl-history-list-item"),n=l.attr("data-position"),o=e(".fl-history-list-item[data-current=1]");e(".fl-builder-settings:visible").length&&(FLBuilder._closeNestedSettings(),FLBuilder._lightbox.close()),o.attr("data-current",0),l.attr("data-current",1),this.renderState(n)}},e(function(){FLBuilderHistoryManager.init()})}(jQuery),function(exports){"use strict";exports.stringify=function(e){return JSON.stringify(e,function(e,t){var i;return t instanceof Function||"function"==typeof t?(i=t.toString(),i.length<8||"function"!==i.substring(0,8)?"_NuFrRa_"+i:i):t instanceof RegExp?"_PxEgEr_"+t:t})},exports.parse=function(str,date2obj){var iso8061=!!date2obj&&/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/;return JSON.parse(str,function(key,value){var prefix;return"string"!=typeof value?value:value.length<8?value:(prefix=value.substring(0,8),iso8061&&value.match(iso8061)?new Date(value):"function"===prefix?eval("("+value+")"):"_PxEgEr_"===prefix?eval(value.slice(8)):"_NuFrRa_"===prefix?eval(value.slice(8)):value)})},exports.clone=function(e,t){return exports.parse(exports.stringify(e),t)}}("undefined"==typeof exports?window.JSONfn={}:exports);
5
  },_getSettingsJSONForHTML:function(e){return JSON.stringify(e).replace(/\'/g,"&#39;").replace("<wbr />","<wbr>")},_getOriginalSettings:function(t,i){var l=t.find(".fl-builder-settings-json"),n=t.data("node"),o=FLBuilderSettingsConfig.nodes,s=null,r={};if(n&&o[n]?s=o[n]:l.length&&(s=FLBuilder._jsonParse(l.val().replace(/&#39;/g,"'"))),s)for(key in s)(e("#fl-field-"+key).length||i)&&(r[key]=s[key]);return r},_getSettingsForChangedCheck:function(t,i){var l=FLBuilder._getSettings(i);if(t){var n=e(".fl-node-"+t);if(n.hasClass("fl-module")){var o=n.data("type"),s=FLBuilderSettingsConfig.editables[o];if(s&&FLBuilderSettingsConfig.nodes[t])for(var r in s)l[r]=FLBuilderSettingsConfig.nodes[t][r]}}return l},_saveSettings:function(t){function i(){FLBuilder._showNodeLoading(o),FLBuilderSettingsConfig.nodes[o]=s,FLBuilder.ajax({action:"save_settings",node_id:o,settings:s},FLBuilder._saveSettingsComplete.bind(this,t,r)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:o,settings:s}),FLBuilder._lightbox.close()}var l=e(".fl-builder-settings-lightbox .fl-builder-settings"),n=l.data("new-module"),o=l.attr("data-node"),s=FLBuilder._getSettings(l),r=FLBuilder.preview;return!FLBuilder.isUndefined(t)&&FLBuilder.isBoolean(t)||(t=!0),r&&!r._settingsHaveChanged()&&FLBuilder.isUndefined(n)?void FLBuilder._lightbox.close():void(FLBuilderConfig.userCaps.unfiltered_html?i():(FLBuilderSettingsForms.showLightboxLoader(),FLBuilder.ajax({action:"verify_settings",settings:s},function(t){"true"===t?i():(msg='<p style="font-weight:bold;text-align:center;">'+FLBuilderStrings.noScriptWarn.heading+"</p>",FLBuilderConfig.userCaps.global_unfiltered_html?msg+="<p>"+FLBuilderStrings.noScriptWarn.global+"</p>":msg+="<p>"+FLBuilderStrings.noScriptWarn.message+"</p>",msg+='<p><div class="fl-diff"></div></p>',msg+="<p>"+FLBuilderStrings.noScriptWarn.footer+"</p>",FLBuilderSettingsForms.hideLightboxLoader(),FLBuilder.alert(msg),data=e.parseJSON(t),""!==data.diff&&(e(".fl-diff").html(data.diff),e(".fl-diff").prepend("<p>"+FLBuilderStrings.codeErrorDetected+"</p>"),e(".fl-diff .diff-deletedline").each(function(){e(this).find("del").length<1?e(this).css("background-color","rgb(255, 192, 203, 0.7)").css("padding","10px").css("border","1px solid pink"):e(this).find("del").css("background-color","rgb(255, 192, 203, 0.7)").css("border","1px solid pink")}),console.log("============"),console.log("key: "+data.key),console.log("value: "+data.value),console.log("parsed: "+data.parsed),console.log("============")))})))},_saveSettingsComplete:function(e,t,i){var l=FLBuilder._jsonParse(i),n=l.layout.nodeType,o=l.layout.moduleType,s="didSave"+n.charAt(0).toUpperCase()+n.slice(1)+"SettingsComplete",r=function(){t&&l.layout.partial&&l.layout.nodeId===t.nodeId&&(t.clear(),t=null)};!0===e?FLBuilder._renderLayout(l.layout,r):r(),FLBuilder.triggerHook("didSaveNodeSettingsComplete",{nodeId:l.node_id,nodeType:n,moduleType:o,settings:l.settings}),FLBuilder.triggerHook(s,{nodeId:l.node_id,nodeType:n,moduleType:o,settings:l.settings})},_triggerSettingsSave:function(t,i,l){var n=FLBuilder._lightbox._node.find("form.fl-builder-settings"),o=FLBuilder._lightbox._node.data("instance-id"),s=FLLightbox._instances[o],r=e(".fl-lightbox-wrap[data-parent]:visible"),a=!1,d=!0;return t=!_.isUndefined(t)&&t,i=!_.isUndefined(i)&&i,l=!!_.isUndefined(l)||l,n.length&&(r.length&&(r.find(".fl-builder-settings-save").trigger("click"),(r.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),d&&!n.validate().form()&&(d=!1),a=FLBuilderSettingsForms.settingsHaveChanged(),d&&a&&(t&&s.disableClose(),n.find(".fl-builder-settings-save").trigger("click"),t&&s.enableClose(),(n.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),l&&(FLBuilder._destroySettingsForms(),!a&&FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)),a||t||s.close()),d?FLBuilder.triggerHook("didTriggerSettingsSave"):(FLBuilder.triggerHook("didFailSettingsSave"),FLBuilder._toggleSettingsTabErrors(),i&&!e(".fl-builder-alert-lightbox:visible").length&&FLBuilder.alert(FLBuilderStrings.settingsHaveErrors)),d},_refreshSettingsPreviewReference:function(){FLBuilder.preview&&FLBuilder.preview._initElementsAndClasses()},_openNestedSettings:function(t){t.className&&-1===t.className.indexOf("fl-builder-settings-lightbox")&&(t.className+=" fl-builder-settings-lightbox"),t=e.extend({className:"fl-builder-lightbox fl-builder-settings-lightbox",destroyOnClose:!0,resizable:!0},t);var i=e(".fl-lightbox-wrap:visible"),l=i.find(".fl-lightbox"),n=new FLLightbox(t),o=n._node,s=o.find(".fl-lightbox");return i.hide(),o.attr("data-parent",i.attr("data-instance-id")),s.attr("style",l.attr("style")),n.on("resized",FLBuilder._calculateSettingsTabsOverflow),n.open('<div class="fl-builder-lightbox-loading"></div>'),n},_closeNestedSettings:function(){var t=e(".fl-builder-lightbox[data-parent]:visible"),i=t.find(".fl-lightbox"),l=t.attr("data-instance-id"),n=FLLightbox._instances[l],o=t.attr("data-parent"),s=e('[data-instance-id="'+o+'"]'),r=s.find(".fl-lightbox"),a=s.find("form"),d=FLLightbox._instances[o];n&&(n.on("close",function(){r.attr("style",i.attr("style")),s.show(),d._resize(),s.find("label.error").remove(),a.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors(),FLBuilder._initMultipleFields()}),n.close())},_showHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeOut()},_initSection:function(){var t=e(this),i=t.find(".fl-builder-settings-section-header");i.on("click",function(){t.toggleClass("fl-builder-settings-section-collapsed")})},_initButtonGroupFields:function(){e(".fl-builder-settings:visible").find(".fl-button-group-field").each(FLBuilder._initButtonGroupField)},_initButtonGroupField:function(){var t=e(this),i=t.find(".fl-button-group-field-option"),l=t.find("input");i.on("click",function(){var t=e(this);"1"==t.attr("data-selected")?(t.attr("data-selected","0"),l.val("").trigger("change")):(i.attr("data-selected","0"),t.attr("data-selected","1"),l.val(t.data("value")).trigger("change"))}),l.on("change",function(e){var t=l.val(),n=i.filter('[data-value="'+t+'"]');i.attr("data-selected","0"),n.attr("data-selected","1")})},_initCompoundFields:function(){e(".fl-builder-settings:visible").find(".fl-compound-field").each(FLBuilder._initCompoundField)},_initCompoundField:function(){var t=e(this),i=t.find(".fl-compound-field-section"),l=t.find(".fl-compound-field-section-toggle"),n=t.find(".fl-compound-field-setting").has(".fl-dimension-field-units");i.each(function(){var t=e(this);t.find(".fl-compound-field-section-toggle").length||t.addClass("fl-compound-field-section-visible")}),l.on("click",function(){var t=e(this),i=t.closest(".fl-field"),l=t.closest(".fl-compound-field-section"),n="."+l.attr("class").split(" ").join(".");i.find(n).toggleClass("fl-compound-field-section-visible")}),n.each(function(){var t=e(this),i=t.find(".fl-compound-field-label"),l='<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>';i.length&&!t.find(".fl-shadow-field").length&&i.append(l)})},_initAutoSuggestFields:function(){var t=e(".fl-builder-settings:visible .fl-suggest-field"),i=null,l=null,n=null,o=[];t.each(function(){i=e(this),""!==i.attr("data-value")&&(FLBuilderSettingsForms.showFieldLoader(i),o.push({name:i.attr("name"),value:i.attr("data-value"),action:i.attr("data-action"),data:i.attr("data-action-data")}))}),o.length?FLBuilder.ajax({action:"get_autosuggest_values",fields:o},function(i){l=FLBuilder._jsonParse(i);for(n in l)e('.fl-suggest-field[name="'+n+'"]').attr("data-value",l[n]);t.each(FLBuilder._initAutoSuggestField)}):t.each(FLBuilder._initAutoSuggestField)},_initAutoSuggestField:function(){var t=e(this);t.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:t.data("action"),fl_as_action_data:t.data("action-data"),_wpnonce:FLBuilderConfig.ajaxNonce}),e.extend({},{asHtmlID:t.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:2,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,preFill:t.data("value"),queryParam:"fl_as_query",afterSelectionAdd:FLBuilder._updateAutoSuggestField,afterSelectionRemove:FLBuilder._updateAutoSuggestField,selectionLimit:t.data("limit"),canGenerateNewSelections:!1},t.data("args"))),FLBuilderSettingsForms.hideFieldLoader(t)},_updateAutoSuggestField:function(t,i,l){e(this).siblings(".as-values").val(l.join(",")).trigger("change")},_CodeFieldSSLCheck:function(){e("body").append('<div class="sg-test" style="display:none"><svg xmlns="http://www.w3.org/2000/svg"></svg></div>'),"https://www.w3.org/2000/svg"===e(".sg-test").find("svg").attr("xmlns")&&(FLBuilder._codeDisabled=!0),e(".sg-test").remove()},_initCodeFields:function(){FLBuilder._codeDisabled||e(".fl-builder-settings:visible").find(".fl-code-field").each(FLBuilder._initCodeField)},_initCodeField:function(){var t=e(this),i=t.closest(".fl-builder-settings"),l=t.find("textarea"),n=(l.attr("id"),l.data("editor")),o=l.data("wrap"),s=e("<div>",{position:"absolute",height:20*parseInt(l.attr("rows"),10)}),r=null,a=!(!i.hasClass("fl-builder-global-settings")&&!i.hasClass("fl-builder-layout-settings"));s.insertBefore(l),l.css("display","none"),ace.require("ace/ext/language_tools"),r=ace.edit(s[0]),r.$blockScrolling=1/0,r.getSession().setValue(l.val()),r.getSession().setMode("ace/mode/"+n),o&&r.getSession().setUseWrapMode(!0),r.setOptions(FLBuilderConfig.AceEditorSettings),r.getSession().on("change",function(e){l.val(r.getSession().getValue()).trigger("change")}),r.getSession().on("changeAnnotation",function(){for(var e=r.getSession().getAnnotations(),t=i.find(".fl-builder-settings-save"),l=i.find(".fl-builder-settings-error"),n=!1,o=0;o<e.length;o++)if(!(e[o].text.indexOf("DOCTYPE")>-1||e[o].text.indexOf("Named entity expected")>-1||e[o].text.indexOf("@supports")>-1||"error"!==e[o].type)){n=!0;break}val=r.getSession().getValue(),a&&n&&null!==val.match(/<\/iframe>|<\/script>/gm)&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldCriticalError)),n&&!t.hasClass("fl-builder-settings-error")&&l.length&&FLBuilderConfig.CheckCodeErrors&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldError)),n||(l.removeClass("fl-builder-settings-error"),l.off("click",FLBuilder._showCodeFieldError),l.off("click",FLBuilder._showCodeFieldCriticalError))}),l.closest(".fl-field").data("editor",r)},_showCodeFieldError:function(t){t.stopImmediatePropagation(),FLBuilder.confirm({message:FLBuilderStrings.codeError,cancel:function(){var t=e(".fl-builder-settings:visible .fl-builder-settings-save");t.removeClass("fl-builder-settings-error"),t.off("click",FLBuilder._showCodeFieldError),t.trigger("click")},strings:{ok:FLBuilderStrings.codeErrorFix,cancel:FLBuilderStrings.codeErrorIgnore}})},_showCodeFieldCriticalError:function(e){e.stopImmediatePropagation(),FLBuilder.alert(FLBuilderStrings.codeerrorhtml)},_initMultipleFields:function(){var t=e(".fl-builder-settings:visible .fl-builder-field-multiples"),i=null,l=null,n=0,o=FLBuilderConfig.isRtl?{left:10}:{right:10},s=t.attr("data-limit")||0,r=e("tbody.fl-builder-field-multiples").find("tr").length||0;for(parseInt(s)>0&&r-1>=parseInt(s)?(e(".fl-builder-field-copy").hide(),e(".fl-builder-field-add").fadeOut()):e(".fl-builder-field-copy, .fl-builder-field-add").show();n<t.length;n++)i=t.eq(n),l=i.find(".fl-builder-field-multiple"),1===l.length?l.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):l.find(".fl-builder-field-actions").removeClass("fl-builder-field-actions-single");e(".fl-builder-field-multiples").sortable({items:".fl-builder-field-multiple",cursor:"move",cursorAt:o,distance:5,opacity:.5,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer",axis:"y"})},_addFieldClicked:function(){var t=e(this),i=t.attr("data-field"),l=t.closest("tr").siblings("tr[data-field="+i+"]").last(),n=l.clone(),o=n.find(".fl-form-field"),s=null,r=null,a=parseInt(l.find("label span.fl-builder-field-index").html(),10)+1;n.find("th label span.fl-builder-field-index").html(a),n.find(".fl-form-field-preview-text").html(""),n.find(".fl-form-field-before").remove(),n.find(".fl-form-field-after").remove(),n.find("input, textarea, select").val(""),l.after(n),FLBuilder._initMultipleFields(),o.length?(s=o.find(".fl-form-field-edit").data("type"),o.find("input").val(JSON.stringify(FLBuilderSettingsConfig.defaults.forms[s]))):(o=t.closest("form.fl-builder-settings"),s=o.data("type"),s&&o.hasClass("fl-builder-module-settings")&&(r=FLBuilderSettingsConfig.defaults.modules[s][i][0],n.find("input, textarea, select").val(r)))},_copyFieldClicked:function(){var t=e(this),i=t.closest("tr"),l=i.clone(),n=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;l.find("th label span.fl-builder-field-index").html(n),i.after(l),FLBuilder._renumberFields(i.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var t=e(this).closest("tr"),i=t.parent(),l=confirm(FLBuilderStrings.deleteFieldMessage);l&&(t.remove(),FLBuilder._renumberFields(i),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){for(var t=e.find(".fl-builder-field-multiple"),i=0;i<t.length;i++)t.eq(i).find("th label span.fl-builder-field-index").html(i+1)},_fieldDragHelper:function(){return e('<div class="fl-builder-field-dd-helper"></div>')},_fieldDragStop:function(e,t){FLBuilder._renumberFields(t.item.parent()),FLBuilder.preview.delayPreview()},_initSelectFields:function(){var t=e(".fl-builder-settings:visible").find("select");t.on("change",FLBuilder._settingsSelectChanged),t.trigger("change"),t.on("change",FLBuilder._calculateSettingsTabsOverflow);var i=e(".fl-builder-settings:visible").find(".fl-button-group-field input[type=hidden]");i.on("change",FLBuilder._settingsSelectChanged),i.trigger("change"),i.on("change",FLBuilder._calculateSettingsTabsOverflow)},_settingsSelectChanged:function(){var t=e(this),i=t.attr("data-toggle"),l=t.attr("data-hide"),n=t.attr("data-trigger"),o=t.val(),s=0,r=(t.attr("name"),!1);if("undefined"!=typeof i){i=FLBuilder._jsonParse(i),r=!0;for(s in i)r&&(FLBuilder._settingsSelectToggle(i[s].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[s].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[s].tabs,"hide","a[href*=fl-builder-settings-tab-","]"));"undefined"!=typeof i[o]&&r&&(FLBuilder._settingsSelectToggle(i[o].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(i[o].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[o].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof l){l=FLBuilder._jsonParse(l);for(s in l)FLBuilder._settingsSelectToggle(l[s].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(l[s].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[s].tabs,"show","a[href*=fl-builder-settings-tab-","]");"undefined"!=typeof l[o]&&(FLBuilder._settingsSelectToggle(l[o].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l[o].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[o].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof n&&(n=FLBuilder._jsonParse(n),"undefined"!=typeof n[o]&&"undefined"!=typeof n[o].fields))for(s=0;s<n[o].fields.length;s++)e("#fl-field-"+n[o].fields[s]).find("select").trigger("change")},_settingsSelectToggle:function(t,i,l,n){var o=0;if(n="undefined"==typeof n?"":n,"undefined"!=typeof t)for(;o<t.length;o++)e(".fl-builder-settings:visible").find(l+t[o]+n)[i](),e(l+t[o]+n).parent().find('.fl-field[data-type="code"]').each(function(){FLBuilder._codeDisabled||e(this).data("editor").resize()})},_initColorPickers:function(){var t=FLBuilderConfig.colorPresets?FLBuilderConfig.colorPresets:[];FLBuilder.colorPicker=new FLBuilderColorPicker({mode:"hsv",elements:".fl-color-picker .fl-color-picker-value",presets:t,labels:{colorPresets:FLBuilderStrings.colorPresets,colorPicker:FLBuilderStrings.colorPicker,placeholder:FLBuilderStrings.placeholder,removePresetConfirm:FLBuilderStrings.removePresetConfirm,noneColorSelected:FLBuilderStrings.noneColorSelected,alreadySaved:FLBuilderStrings.alreadySaved,noPresets:FLBuilderStrings.noPresets,presetAdded:FLBuilderStrings.presetAdded}}),e(FLBuilder.colorPicker).on("presetRemoved presetAdded presetSorted",function(e,t){FLBuilder.ajax({action:"save_color_presets",presets:t.presets})})},_initGradientPickers:function(){e(".fl-builder-settings:visible .fl-gradient-picker").each(FLBuilder._initGradientPicker)},_initGradientPicker:function(){var t=e(this),i=t.find(".fl-gradient-picker-type-select"),l=t.find(".fl-gradient-picker-angle-wrap"),n=t.find(".fl-gradient-picker-position");i.on("change",function(){"linear"===e(this).val()?(l.show(),n.hide()):(l.hide(),n.show())})},_initPhotoFields:function(){var t=e(".fl-builder-settings:visible").find(".fl-photo-field select");t.on("change",FLBuilder._toggleSettingsOnIconChange),t.trigger("change")},_initSinglePhotoSelector:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:FLBuilderConfig.uploadTypes.image},multiple:!1}),FLBuilder._singlePhotoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="photo")},_selectSinglePhoto:function(){FLBuilder._initSinglePhotoSelector(),FLBuilder._singlePhotoSelector.once("open",e.proxy(FLBuilder._singlePhotoOpened,this)),FLBuilder._singlePhotoSelector.once("select",e.proxy(FLBuilder._singlePhotoSelected,this)),FLBuilder._singlePhotoSelector.open()},_singlePhotoOpened:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection"),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),n=l.val(),o=null;e(this).hasClass("fl-photo-replace")?(t.reset(),i.addClass("fl-photo-empty"),l.val("")):""!==n?(o=wp.media.attachment(n),o.fetch(),t.add(o?[o]:[])):t.reset()},_singlePhotoSelected:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),n=i.find(".fl-photo-preview img"),o=i.find("select");l.val(t.id),n.attr("src",FLBuilder._getPhotoSrc(t)),i.removeClass("fl-photo-empty").removeClass("fl-photo-no-attachment"),i.find("label.error").remove(),o.show(),o.html(FLBuilder._getPhotoSizeOptions(t)),o.trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_singlePhotoRemoved:function(){FLBuilder._initSinglePhotoSelector();var t=FLBuilder._singlePhotoSelector.state(),i="undefined"!=typeof t?t.get("selection"):null,l=e(this).closest(".fl-photo-field"),n=l.find("input[type=hidden]"),o=l.find("select");i&&i.reset(),l.addClass("fl-photo-empty"),n.val(""),o.html('<option value="" selected></option>'),o.trigger("change")},_getPhotoSrc:function(e){return"undefined"==typeof e.sizes?e.url:"undefined"!=typeof e.sizes.thumbnail?e.sizes.thumbnail.url:e.sizes.full.url},_getPhotoSizeOptions:function(e,t){var i="",l=null,n=null,o="",s={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if("undefined"==typeof e.sizes||0===e.sizes.length)i+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else{t&&(t=t.split(/[\\\/]/).pop());for(l in e.sizes)o="undefined"!=typeof s[l]?s[l]+" - ":"undefined"!=typeof FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]+" - ":"",n="",t?t===e.sizes[l].url.split(/[\\\/]/).pop()&&(n=' selected="selected"'):n="full"==l?' selected="selected"':"",i+='<option value="'+e.sizes[l].url+'"'+n+">"+o+e.sizes[l].width+" x "+e.sizes[l].height+"</option>"}return i},_selectMultiplePhotos:function(){var t=e(this).closest(".fl-multiple-photos-field"),i=t.find("input[type=hidden]"),l=i.val(),n=""===l?"":FLBuilder._jsonParse(l),o=wp.media.gallery.defaults.id,s='[gallery ids="-1"]',r=null,a=null,d=null,u=null,c=[];if("object"==typeof n){for(u in n)c.push(n[u]);s='[gallery ids="'+c.join()+'"]'}r=wp.shortcode.next("gallery",s).shortcode,_.isUndefined(r.get("id"))&&!_.isUndefined(o)&&r.set("id",o),a=wp.media.gallery.attachments(r),d=new wp.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:!0}),d.gallery=a.gallery,d.more().done(function(){d.length||FLBuilder._multiplePhotoSelector.setState("gallery-library"),d.props.set({query:!1}),d.unmirror(),d.props.unset("orderby")}),FLBuilder._multiplePhotoSelector&&FLBuilder._multiplePhotoSelector.dispose(),FLBuilder._multiplePhotoSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-photos-edit")?"gallery-edit":"gallery-library",title:wp.media.view.l10n.editGalleryTitle,editing:!0,multiple:!0,selection:d}).open(),e(FLBuilder._multiplePhotoSelector.views.view.el).addClass("fl-multiple-photos-lightbox"),FLBuilder._multiplePhotoSelector.once("update",e.proxy(FLBuilder._multiplePhotosSelected,this))},_multiplePhotosSelected:function(t){for(var i=e(this).closest(".fl-multiple-photos-field"),l=i.find("input[type=hidden]"),n=i.find(".fl-multiple-photos-count"),o=[],s=0;s<t.models.length;s++)o.push(t.models[s].id);1==o.length?n.html("1 "+FLBuilderStrings.photoSelected):n.html(o.length+" "+FLBuilderStrings.photosSelected),i.removeClass("fl-multiple-photos-empty"),i.find("label.error").remove(),l.val(JSON.stringify(o)).trigger("change")},_initSingleVideoSelector:function(){null===FLBuilder._singleVideoSelector&&(FLBuilder._singleVideoSelector=wp.media({title:FLBuilderStrings.selectVideo,button:{text:FLBuilderStrings.selectVideo},library:{type:FLBuilderConfig.uploadTypes.video},multiple:!1}),FLBuilder._singleVideoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="video")},_selectSingleVideo:function(){FLBuilder._initSingleVideoSelector(),FLBuilder._singleVideoSelector.once("select",e.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var t=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-video-field"),l=i.find(".fl-video-preview-img"),n=i.find(".fl-video-preview-filename"),o=i.find("input[type=hidden]");l.html('<span class="dashicons dashicons-media-video"></span>'),n.html(t.filename),i.removeClass("fl-video-empty"),i.find("label.error").remove(),o.val(t.id).trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_singleVideoRemoved:function(){FLBuilder._initSingleVideoSelector();var t=FLBuilder._singleVideoSelector.state(),i="undefined"!=typeof t?t.get("selection"):null,l=e(this).closest(".fl-video-field"),n=l.find(".fl-video-preview-img img"),o=l.find(".fl-video-preview-filename"),s=l.find("input[type=hidden]");i&&i.reset(),n.attr("src",""),o.html(""),l.addClass("fl-video-empty"),s.val("").trigger("change")},_selectMultipleAudios:function(){var t=e(this).closest(".fl-multiple-audios-field"),i=t.find("input[type=hidden]"),l=i.val(),n=""==l?'[playlist ids="-1"]':'[playlist ids="'+FLBuilder._jsonParse(l).join()+'"]',o=wp.shortcode.next("playlist",n).shortcode,s=wp.media.playlist.defaults.id,r=null,a=null;_.isUndefined(o.get("id"))&&!_.isUndefined(s)&&o.set("id",s),r=wp.media.playlist.attachments(o),a=new wp.media.model.Selection(r.models,{props:r.props.toJSON(),multiple:!0}),a.playlist=r.playlist,a.more().done(function(){a.props.set({query:!1}),a.unmirror(),a.props.unset("orderby")}),FLBuilder._multipleAudiosSelector&&FLBuilder._multipleAudiosSelector.dispose(),FLBuilder._multipleAudiosSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-audios-edit")?"playlist-edit":"playlist-library",title:wp.media.view.l10n.editPlaylistTitle,editing:!0,multiple:!0,selection:a}).open(),FLBuilder._multipleAudiosSelector.content.get("view").sidebar.unset("playlist"),FLBuilder._multipleAudiosSelector.on("content:render:browse",function(e){e&&e.sidebar.on("ready",function(){e.sidebar.unset("playlist")})}),FLBuilder._multipleAudiosSelector.once("update",e.proxy(FLBuilder._multipleAudiosSelected,this))},_multipleAudiosSelected:function(t){for(var i=e(this).closest(".fl-multiple-audios-field"),l=i.find(".fl-multiple-audios-count"),n=i.find("input[type=hidden]"),o=[],s=0;s<t.models.length;s++)o.push(t.models[s].id);1==o.length?l.html("1 "+FLBuilderStrings.audioSelected):l.html(o.length+" "+FLBuilderStrings.audiosSelected),n.val(JSON.stringify(o)).trigger("change"),i.removeClass("fl-multiple-audios-empty"),i.find("label.error").remove()},_initIconFields:function(){var t=e(".fl-builder-settings:visible").find(".fl-icon-field input");t.on("change",FLBuilder._toggleSettingsOnIconChange),t.trigger("change")},_toggleSettingsOnIconChange:function(){var t=e(this),i=t.val(),l=t.attr("data-show");"undefined"!=typeof l&&(l=FLBuilder._jsonParse(l),FLBuilder._settingsSelectToggle(l.fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l.sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l.tabs,"hide","a[href*=fl-builder-settings-tab-","]"),i&&(FLBuilder._settingsSelectToggle(l.fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(l.sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l.tabs,"show","a[href*=fl-builder-settings-tab-","]"),FLBuilder._calculateSettingsTabsOverflow()))},_selectIcon:function(){var e=this;FLIconSelector.open(function(t){FLBuilder._iconSelected.apply(e,[t])})},_iconSelected:function(t){var i=e(this).closest(".fl-icon-field"),l=i.find("input[type=hidden]"),n=i.find("i"),o=n.attr("data-icon");l.val(t).trigger("change"),n.removeClass(o),n.addClass(t),n.attr("data-icon",t),i.removeClass("fl-icon-empty"),i.find("label.error").remove()},_removeIcon:function(){var t=e(this).closest(".fl-icon-field"),i=t.find("input[type=hidden]"),l=t.find("i");i.val("").trigger("change"),l.removeClass(),l.attr("data-icon",""),t.addClass("fl-icon-empty")},_formFieldClicked:function(){var t=e(this),i=t.closest(".fl-builder-settings"),l=t.attr("data-type"),n=t.siblings("input").val(),o=FLBuilder._moduleHelpers[l],s=(FLBuilderSettingsConfig.forms[l],FLBuilder._openNestedSettings({className:"fl-builder-lightbox fl-form-field-settings"}));""===n&&(n=JSON.stringify(FLBuilderSettingsConfig.forms[l])),FLBuilderSettingsForms.render({id:l,nodeId:i.attr("data-node"),nodeSettings:FLBuilder._getSettings(i),settings:FLBuilder._jsonParse(n.replace(/&#39;/g,"'")),lightbox:s,helper:o,rules:o?o.rules:null},function(){t.attr("id","fl-"+s._node.attr("data-instance-id")),s._node.find("form.fl-builder-settings").attr("data-type",l),FLBuilderResponsiveEditing._switchAllSettingsToCurrentMode()})},_saveFormFieldClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),l=t.attr("data-type"),n=FLBuilder._getSettings(t),o={},s=FLBuilder._moduleHelpers[l],r=e(".fl-builder-settings #fl-"+i),a=r.parent().attr("data-preview-text"),d=t.find("#fl-field-"+a),u=n[a],c=e('select[name="'+a+'"]'),f=document.createElement("div"),h=!0;return c.length>0&&(u=c.find('option[value="'+n[a]+'"]').text()),"undefined"!=typeof s&&(t.find("label.error").remove(),t.validate().hideErrors(),h=t.validate().form(),h&&(h=s.submit())),h?("undefined"!=typeof a&&"undefined"!=typeof u&&("icon"===d.data("type")?u='<i class="'+u+'"></i>':u.length>35&&(f.innerHTML=u,u=(f.textContent||f.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),r.siblings(".fl-form-field-preview-text").html(u)),o=r.siblings("input").val().replace(/&#39;/g,"'"),""!=o&&(n=e.extend(FLBuilder._jsonParse(o),n)),r.siblings("input").val(JSON.stringify(n)).trigger("change"),FLBuilder._closeNestedSettings(),!0):(FLBuilder._toggleSettingsTabErrors(),!1)},_layoutFieldClicked:function(){var t=e(this);t.siblings().removeClass("fl-layout-field-option-selected"),t.addClass("fl-layout-field-option-selected"),t.siblings("input").val(t.attr("data-value"))},_initLinkFields:function(){e(".fl-builder-settings:visible .fl-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var t=e(this),i=t.find(".fl-link-field-search-input"),l=t.find(".fl-link-field-options-wrap input[type=checkbox]");i.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links",_wpnonce:FLBuilderConfig.ajaxNonce}),{asHtmlID:i.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:3,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,queryParam:"fl_as_query",selectionLimit:1,afterSelectionAdd:FLBuilder._updateLinkField,formatList:function(e,t){var i=t.html(e.name+'<span class="type">['+e.type+"]</span>");return i}}),l.on("click",FLBuilder._linkFieldCheckboxClicked)},_updateLinkField:function(e,t,i){var l=e.closest(".fl-link-field"),n=l.find(".fl-link-field-search"),o=l.find(".fl-link-field-search-input"),s=l.find(".fl-link-field-input");s.val(t.value).trigger("keyup"),o.autoSuggest("remove",t.value),n.hide()},_linkFieldSelectClicked:function(){var t=e(this).closest(".fl-link-field").find(".fl-link-field-search");t.show(),t.find("input").focus()},_linkFieldSelectCancelClicked:function(){var t=e(this);t.parent().hide(),t.closest(".fl-link-field").find("input.fl-link-field-input").focus()},_linkFieldCheckboxClicked:function(){var t=e(this),i=t.is(":checked"),l=t.siblings("input[type=hidden]"),n="";n=t.hasClass("fl-link-field-target-cb")?i?"_blank":"_self":i?"yes":"no",l.val(n)},_initFontFields:function(){e(".fl-builder-settings:visible .fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var t=e(this),i=t.attr("data-value"),l=t.find(".fl-font-field-font"),n=t.find(".fl-font-field-weight");FLBuilderConfig.select2Enabled&&l.select2({width:"100%"}).on("select2:open",function(t){e(".select2-search__field").attr("placeholder",FLBuilderStrings.placeholderSelect2)}),l.on("change",function(){FLBuilder._getFontWeights(l)}),i.indexOf("family")>-1&&(i=FLBuilder._jsonParse(i),l.val(i.family),l.trigger("change"),n.find("option[value="+i.weight+"]").length&&n.val(i.weight))},_getFontWeights:function(t){var i=t.closest(".fl-font-field").find(".fl-font-field-weight"),l=t.val(),n=i.val(),o=FLBuilderConfig.FontWeights,s={},r=t.closest(".fl-font-field").find(".recent-fonts option");if(i.html(""),r.length>0){var a=e(r).filter(function(e,t){return t.value===l}).length>0;!1===a&&t.closest(".fl-font-field").find(".recent-fonts").append(e("<option>",{value:l,text:l}))}s="undefined"!=typeof FLBuilderFontFamilies.system[l]?FLBuilderFontFamilies.system[l].weights:"undefined"!=typeof FLBuilderFontFamilies.google[l]?FLBuilderFontFamilies.google[l]:FLBuilderFontFamilies["default"][l],e.each(s,function(e,t){var l=n===t?" selected":"";i.append('<option value="'+t+'"'+l+">"+o[t]+"</option>")})},_initTinyMCE:function(){"object"==typeof tinymce&&"undefined"!=typeof tinymce.ui.FloatPanel&&(tinymce.ui.FloatPanel.zIndex=100100),e(".fl-builder-hidden-editor").each(FLBuilder._initEditorField)},_initEditorFields:function(){e(".fl-builder-settings:visible .fl-editor-field").each(FLBuilder._initEditorField)},_initEditorField:function(){var t=e(this),i=t.find("textarea"),l=t.attr("data-name"),n="flrich"+(new Date).getTime()+"_"+l,o=FLBuilderConfig.wp_editor,s=tinyMCEPreInit,r=Number(t.attr("data-buttons")),a=t.attr("data-rows"),d=null,u=null;o=o.replace(/flbuildereditor/g,n),s=FLBuilder._jsonParse(JSON.stringify(s).replace(/flbuildereditor/g,n)),s=JSONfn.parse(JSONfn.stringify(s).replace(/flbuildereditor/g,n)),i.after(o).remove(),e("textarea#"+n).val(i.val()),void 0!==typeof tinymce&&void 0!==s.mceInit[n]&&(d=s.mceInit[n],d.setup=function(e){e.on("SaveContent",function(e){e.content=e.content.replace(/<a href="(\.\.\/){1,2}/g,'<a href="'+FLBuilderConfig.homeUrl+"/"),
6
  e.content=e.content.replace(/src="(\.\.\/){1,2}/g,'src="'+FLBuilderConfig.homeUrl+"/")})},u=tinymce.$("#wp-"+n+"-wrap"),u.find("textarea").attr("rows",a),r||u.find(".wp-media-buttons").remove(),!u.hasClass("tmce-active")&&s.qtInit.hasOwnProperty(n)||d.wp_skip_init||tinymce.init(d)),void 0!==typeof quicktags&&quicktags(s.qtInit[n]),window.wpActiveEditor=n},_reinitEditorFields:function(){e(".fl-lightbox-resizable:visible").length&&setTimeout(function(){var t,i;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)tinymce.editors[t].inline||(i=tinymce.editors[t].id,tinyMCE.execCommand("mceRemoveEditor",!0,i),tinyMCE.execCommand("mceAddEditor",!0,i));FLBuilder.preview&&FLBuilder.preview._initDefaultFieldPreviews(e('.fl-field[data-type="editor"]'))}},1)},_destroyEditorFields:function(){var t;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)tinymce.editors[t].inline||tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[t].id);e(".wplink-autocomplete").remove(),e(".ui-helper-hidden-accessible").remove()}},_updateEditorFields:function(){var t=e(".fl-builder-settings:visible textarea.wp-editor-area");t.each(FLBuilder._updateEditorField)},_updateEditorField:function(){var t=e(this),i=t.closest(".fl-editor-field"),l=(t.closest(".fl-builder-settings"),t.closest(".wp-editor-wrap")),n=t.attr("id"),o=i.attr("data-name"),s="undefined"!=typeof tinymce&&tinymce.get(n),r=t.siblings('textarea[name="'+o+'"]'),a=i.data("wpautop");0===r.length&&(r=e('<textarea name="'+o+'"></textarea>').hide(),t.after(r)),a?s&&l.hasClass("tmce-active")?r.val(s.getContent()):"undefined"!=typeof switchEditors?r.val(switchEditors.wpautop(t.val())):r.val(t.val()):(s&&l.hasClass("tmce-active")&&s.save(),r.val(t.val()))},_loopDataSourceChange:function(){var t=e(this).val();e(".fl-loop-data-source").hide(),e('.fl-loop-data-source[data-source="'+t+'"]').show()},_customQueryPostTypeChange:function(){var t=e(this).val();e(".fl-custom-query-filter").hide(),e(".fl-custom-query-"+t+"-filter").show()},_initOrderingFields:function(){e(".fl-builder-settings:visible .fl-ordering-field-options").each(FLBuilder._initOrderingField)},_initOrderingField:function(){e(this).sortable({items:".fl-ordering-field-option",containment:"parent",tolerance:"pointer",stop:FLBuilder._updateOrderingField})},_updateOrderingField:function(t){var i=e(t.target),l=i.siblings("input[type=hidden]"),n=[];i.find(".fl-ordering-field-option").each(function(){n.push(e(this).attr("data-key"))}),l.val(JSON.stringify(n)).trigger("change")},_textFieldAddValueSelectChange:function(){var t=e(this),i=e('input[name="'+t.data("target")+'"]'),l=i.val(),n=t.val(),o="";-1==l.indexOf(n)&&(o=(l.trim()+" "+n.trim()).trim(),i.val(o).trigger("change").trigger("keyup")),t.val("")},_onNumberFieldFocus:function(t){var i=e(t.currentTarget);i.addClass("mousetrap"),Mousetrap.bind("up",function(){i.attr("step",1)}),Mousetrap.bind("down",function(){i.attr("step",1)}),Mousetrap.bind("shift+up",function(){i.attr("step",10)}),Mousetrap.bind("shift+down",function(){i.attr("step",10)})},_onNumberFieldBlur:function(t){var i=e(t.currentTarget);i.attr("step","any").removeClass("mousetrap")},_initTimezoneFields:function(){e(".fl-builder-settings:visible .fl-field[data-type=timezone]").each(FLBuilder._initTimezoneField)},_initTimezoneField:function(){var t=e(this).find("select"),i=t.attr("data-value");t.find('option[value="'+i+'"]').prop("selected",!0)},_initDimensionFields:function(){var t=e(".fl-builder-settings:visible");t.find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionField),t.find(".fl-dimension-field-link").on("click",FLBuilder._dimensionFieldLinkClicked),FLBuilder.addHook("responsive-editing-switched",this._initResponsiveDimensionFieldLinking),t.find(".fl-compound-field-setting").has(".fl-dimension-field-link").each(FLBuilder._initDimensionFieldLinking)},_initDimensionField:function(){var t=e(this),i=t.find(".fl-field-label label"),l=t.find(".fl-field-control-wrapper"),n='<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>';i.append(n),l.prepend(n),FLBuilder._initTipTips(),FLBuilder._initDimensionFieldLinking.apply(this)},_initDimensionFieldLinking:function(){var t=e(this),i=t.find(".fl-dimension-field-link"),l=FLBuilder._getDimensionFieldLinkingInputs(t),n=FLBuilder._dimensionFieldInputsAreEqual(l);n?(i.removeClass("dashicons-admin-links"),i.addClass("dashicons-editor-unlink"),l.off("input",FLBuilder._dimensionFieldLinkedValueChange),l.on("input",FLBuilder._dimensionFieldLinkedValueChange)):(i.addClass("dashicons-admin-links"),i.removeClass("dashicons-editor-unlink"))},_initResponsiveDimensionFieldLinking:function(){var t=e(".fl-builder-settings:visible");t.find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionFieldLinking)},_dimensionFieldLinkClicked:function(){var t=e(this),i=t.closest(".fl-compound-field-setting"),l=i.length?i:t.closest(".fl-field"),n=l.find(".fl-dimension-field-link"),o=n.hasClass("dashicons-editor-unlink"),s=FLBuilder._getDimensionFieldLinkingInputs(l);n.toggleClass("dashicons-admin-links"),n.toggleClass("dashicons-editor-unlink"),o?s.off("input",FLBuilder._dimensionFieldLinkedValueChange):(s.val(s.eq(0).val()).trigger("input"),s.on("input",FLBuilder._dimensionFieldLinkedValueChange))},_dimensionFieldLinkedValueChange:function(){var t=e(this),i=t.attr("name"),l=t.closest(".fl-dimension-field-units"),n=l.find('input:not([name="'+i+'"])');n.off("input",FLBuilder._dimensionFieldLinkedValueChange),n.val(t.val()).trigger("input"),n.on("input",FLBuilder._dimensionFieldLinkedValueChange)},_getDimensionFieldLinkingInputs:function(e){var t=!!e.find(".fl-field-responsive-setting").length,i=FLBuilderResponsiveEditing._mode,l=null;return l=t?e.find(".fl-field-responsive-setting-"+i+" input"):e.find(".fl-dimension-field-unit input")},_dimensionFieldInputsAreEqual:function(e){var t=e.eq(0).val();if(""===t)return!1;for(var i=1;i<4;i++)if(e.eq(i).val()!==t)return!1;return!0},_initFieldPopupSliders:function(){var t=e(".fl-builder-settings:visible"),i=t.find(".fl-field-popup-slider");i.each(FLBuilder._initFieldPopupSlider)},_initFieldPopupSlider:function(){var t=e("body"),i=e(this),l=i.find(".fl-field-popup-slider-input"),n=i.find(".fl-field-popup-slider-arrow"),o=i.data("input"),s=e('input[name="'+o+'"]');s.on("click",function(){l.hasClass("fl-field-popup-slider-init")||(l.slider({value:s.val(),slide:function(e,t){s.val(t.value).trigger("input")}}),s.on("input",function(){l.slider("value",e(this).val())}),l.addClass("fl-field-popup-slider-init"),l.find(".ui-slider-handle").removeAttr("tabindex")),FLBuilder._setFieldPopupSliderMinMax(l),FLBuilder._hideFieldPopupSliders(),t.on("mousedown",FLBuilder._hideFieldPopupSliders),s.addClass("fl-field-popup-slider-focus"),i.show();var o=e(".fl-builder-settings:visible .fl-builder-settings-tab.fl-active"),r=o.offset(),a=s.offset(),d=s.width(),u=i.offset();u.top+i.outerHeight()>r.top+o.outerHeight()&&i.addClass("fl-field-popup-slider-top"),n.css("left",2+a.left-u.left+d/2+"px")}),s.on("focus",function(){FLBuilder._hideFieldPopupSliders()})},_hideFieldPopupSliders:function(t){var i=t?e(t.target):null,l=e("body"),n=e(".fl-field-popup-slider:visible"),o=e(".fl-field-popup-slider-focus");if(i){if(i.closest(".fl-field-popup-slider").length)return;if(i.closest(".fl-field-popup-slider-focus").length)return}l.off("mousedown",FLBuilder._hideFieldPopupSliders),o.removeClass("fl-field-popup-slider-focus"),n.hide()},_setFieldPopupSliderMinMax:function(e){var t=e.parent(),i=t.parent().parent(),l=i.find("select.fl-field-unit-select"),n=l.val(),o=t.data("slider"),s=0,r=100,a=1;""!==n&&"em"!==n&&"rem"!==n||(r=10,a=.1),"object"==typeof o&&(s=o.min?parseFloat(o.min):s,r=o.max?parseFloat(o.max):r,a=o.step?parseFloat(o.step):a,l.length&&o[n]&&(s=o[n].min?parseFloat(o[n].min):s,r=o[n].max?parseFloat(o[n].max):r,a=o[n].step?parseFloat(o[n].step):a)),e.slider({min:s,max:r,step:a})},_initPresetFields:function(){var t=e(".fl-builder-settings:visible"),i=t.find(".fl-preset-select-controls");i.each(FLBuilder._initPresetField)},_initPresetField:function(){var t=e(this),i=t.find("select"),l=t.data("presets"),n=t.data("prefix");i.on("change",FLBuilder._setFormPreset.bind(this,l,n))},_setFormPreset:function(t,i,l){var n=e(l.currentTarget).val();if(presetLists=FLBuilderConfig.presets,presets=presetLists[t],form=e(".fl-builder-settings:visible"),"undefined"!==presets&&"undefined"!==presets[n]){var o=presets[n].settings;for(var s in o){var r,n=o[s];r="undefined"!=typeof i&&""!==i?form.find('[name="'+i+s+'"]'):form.find('[name="'+s+'"]'),r.val(n).trigger("change").trigger("input")}}},ajax:function(t,i){var l;if(FLBuilder._ajaxRequest)return void FLBuilder._ajaxQueue.push({data:t,callback:i});FLBuilder.triggerHook("didBeginAJAX",t);for(l in t)"undefined"==typeof t[l]&&(t[l]=null);return t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=FLBuilderConfig.postId,t.fl_builder=1,t.fl_action=t.action,"undefined"!=typeof t.settings&&(t.settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.settings))),"undefined"!=typeof t.node_settings&&(t.node_settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.node_settings))),"undefined"!=typeof t.node_preview&&(t.node_preview=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.node_preview))),t.settings=FLBuilder._inputVarsCheck(t.settings),t.node_settings=FLBuilder._inputVarsCheck(t.node_settings),"error"===t.settings||"error"===t.node_settings?0:(t={fl_builder_data:t},FLBuilder._ajaxRequest=e.post(FLBuilder._ajaxUrl(),t,function(e){"undefined"!=typeof i&&i.call(this,e),FLBuilder.triggerHook("didCompleteAJAX",t)}).always(FLBuilder._ajaxComplete).fail(function(e,t,i){switch(msg=!1,e.status){case 403:case 409:msg="Something you entered has triggered a "+e.status+" error.<br /><br />This is nearly always due to mod_security settings from your hosting provider.",window.crash_vars.white_label||(msg+='<br /><br />See this <a target="_blank" style="color: #428bca;font-size:inherit" href="https://kb.wpbeaverbuilder.com/article/40-403-forbidden-or-blocked-error">Knowledge Base</a> article for more info.</br />')}msg&&(console.log(e),console.log(i),FLBuilder.alert(msg))}),FLBuilder._ajaxRequest)},_inputVarsCheck:function(t){var i=FLBuilderConfig.MaxInputVars||0;return"undefined"!=typeof t&&i>0&&(count=e.map(t,function(e,t){return t}).length,count>i)?(FLBuilder.alert('<h1 style="font-size:2em;text-align:center">Critical Issue</h1><br />The number of settings being saved ('+count+") exceeds the PHP Max Input Vars setting ("+i+").<br />Please contact your host to have this value increased, the default is 1000."),console.log("Vars Count: "+count),console.log("Max Input: "+i),"error"):t},_ajaxComplete:function(){if(FLBuilder._ajaxRequest=null,FLBuilder.hideAjaxLoader(),FLBuilder._ajaxQueue.length){var e=FLBuilder._ajaxQueue.shift();FLBuilder.ajax(e.data,e.callback)}},_ajaxUrl:function(e){var t=FLBuilderConfig,i=t.shortlink,l=null;if("undefined"!=typeof e)for(l in e)i+=i.indexOf("?")>-1?"&":"?",i+=l+"="+e[l];return i},showAjaxLoader:function(){0===e(".fl-builder-lightbox-loading").length&&e(".fl-builder-loading").show()},hideAjaxLoader:function(){e(".fl-builder-loading").hide()},_showNodeLoading:function(t){var i=e(".fl-node-"+t);i.addClass("fl-builder-node-loading"),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didStartNodeLoading",i)},_hideNodeLoading:function(t){var i=e(".fl-node-"+t);i.removeClass("fl-builder-node-loading")},_showNodeLoadingPlaceholder:function(t,i){var l=e('<div class="fl-builder-node-loading-placeholder"></div>');e(".fl-builder-node-loading-placeholder").remove(),t.hasClass("fl-builder-content")?siblings=t.find(" > .fl-row"):t.hasClass("fl-row-content")?siblings=t.find(" > .fl-col-group"):t.hasClass("fl-col-group")?(t.addClass("fl-col-group-has-child-loading"),siblings=t.find(" > .fl-col")):siblings=t.find(" > .fl-col-group, > .fl-module"),0===siblings.length||siblings.length==i?t.append(l):siblings.eq(i).before(l)},_removeNodeLoadingPlaceholder:function(e){var t=e.prev(".fl-builder-node-loading-placeholder"),i=e.next(".fl-builder-node-loading-placeholder");t.length?t.remove():i.remove()},_ajaxModSecFix:function(e){var t;if(FLBuilderConfig.modSecFix&&"undefined"!=typeof btoa)if("string"==typeof e)e=FLBuilder._btoa(e);else for(t in e)"string"==typeof e[t]?e[t]=FLBuilder._btoa(e[t]):"object"==typeof e[t]&&(e[t]=FLBuilder._ajaxModSecFix(e[t]));return e},_btoa:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},_wpmedia_reset_errors:function(){e(".upload-error").remove(),e(".media-uploader-status").removeClass("errors").hide()},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox",resizable:!0}),FLBuilder._lightbox.on("resized",FLBuilder._calculateSettingsTabsOverflow),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._lightbox.on("beforeCloseLightbox",FLBuilder._destroyEditorFields),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_showLightbox:function(e){e||(e='<div class="fl-builder-lightbox-loading"></div>'),FLBuilder._lightbox.open(e),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder.triggerHook("settings-lightbox-closed"),FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=null},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder.triggerHook("actions-lightbox-settings",e),FLBuilder._actionsLightbox.open(t(e))},alert:function(e){var t=new FLLightbox({className:"fl-builder-alert-lightbox",destroyOnClose:!0}),i=wp.template("fl-alert-lightbox");t.open(i({message:e}))},crashMessage:function(e){FLLightbox.closeAll();var t=new FLLightbox({className:"fl-builder-alert-lightbox fl-builder-crash-lightbox",destroyOnClose:!0}),i=wp.template("fl-crash-lightbox"),l=window.crash_vars.product,n=window.crash_vars.white_label,o=window.crash_vars.labeled_txt;message=l+" has detected a plugin conflict that is preventing the page from saving.<p>( In technical terms there’s probably a PHP error in Ajax. )</p>",info="<p>If you contact Beaver Builder Support, we need to know what the error is in the JavaScript console in your browser.</p>",info+="<div><div style='width:49%;float:left;'>",info+="<p>MacOS Users:<br />Chrome: View > Developer > JavaScript Console<br />Firefox: Tools > Web Developer > Browser Console<br />Safari: Develop > Show JavaScript console</p>",info+="</div>",info+="<div style='width:49%;float:right;'>",info+="<p>Windows Users:<br />Chrome: Settings > More Tools > Developer > Console<br />Firefox: Menu/Settings > Web Developer > Web Console<br />Edge: Settings and More > More Tools > Console</p>",info+="</div></div>",info+="<p style='display:inline-block;'>Copy the errors you find there and submit them with your Support ticket. It saves us having to ask you that as a second step.<br /><br />If you want to troubleshoot further, you can check our <a class='link' target='_blank' href='https://kb.wpbeaverbuilder.com/article/42-known-beaver-builder-incompatibilities'>Knowledge Base</a> for plugins we know to be incompatible. Then deactivate your plugins one by one while you try to save the page in the Beaver Builder editor. When the page saves normally, you have identified the plugin causing the conflict. <a class='link' target='_blank' href='https://www.wpbeaverbuilder.com/beaver-builder-support/'>Contact Support</a> if you need further help.</p>",FLBuilderConfig.MaxInputVars<=3e3&&(info+="<br /><br />The PHP config value max_input_vars is only set to "+FLBuilderConfig.MaxInputVars+'. If you are using 3rd party addons this could very likely be the cause of this error. [<a class="link" href="https://kb.wpbeaverbuilder.com/article/746-troubleshooting-number-of-settings-being-saved-exceeds-php-max-input-vars">doc link</a>].'),e=!1,n&&(info=o),t.open(i({message:message,info:info,debug:e}))},_alertClose:function(){FLLightbox.closeParent(this)},confirm:function(t){var i={message:"",ok:function(){},cancel:function(){},strings:{ok:FLBuilderStrings.ok,cancel:FLBuilderStrings.cancel}},l=e.extend({},i,"undefined"==typeof t?{}:t);lightbox=new FLLightbox({className:"fl-builder-confirm-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),template=wp.template("fl-confirm-lightbox"),lightbox.open(template(l)),lightbox._node.find(".fl-builder-confirm-ok").on("click",l.ok),lightbox._node.find(".fl-builder-confirm-cancel").on("click",l.cancel)},triggerHook:function(t,i){e("body").trigger("fl-builder."+t,i)},addHook:function(t,i){e("body").on("fl-builder."+t,i)},removeHook:function(t,i){e("body").off("fl-builder."+t,i)},log:function(e){"undefined"!=typeof window.console&&"undefined"!=typeof window.console.log&&console.log(e)},logError:function(t,i){var l=null;"undefined"!=typeof t&&("undefined"!=typeof t.stack?l=t.stack:"undefined"!=typeof t.message&&(l=t.message),l&&(FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(l),"undefined"!=typeof i&&i&&(FLBuilder.log("Debug Info"),console.log(i)),e.each(window.crash_vars.vars,function(e,t){console.log(e+": "+t)}),FLBuilder.log("************************************************************************"),"undefined"!=typeof i&&i&&(l=i+"\n"+l),FLBuilder.crashMessage(l)))},logGlobalError:function(e,t,i,l,n){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",i).replace("{file}",t)),"undefined"!=typeof n&&"undefined"!=typeof n.stack&&FLBuilder.log(n.stack),FLBuilder.log("************************************************************************")},_jsonParse:function(e){try{e=JSON.parse(e)}catch(t){FLBuilder.logError(t,FLBuilder._parseError(e))}return e},_parseError:function(t){if(t.indexOf("</head>"))return"AJAX returned HTML page instead of data. (Possible 404 or max_input_vars)";if(php=t.match(/^<.*/gm)||!1,php&&php.length>0){var i="";return e.each(php,function(e,t){i+=t}),e(i).text()}return!1},isUndefined:function(e){return void 0===e},isBoolean:function(e){return e===!0||e===!1}},e(function(){FLBuilder._init()})}(jQuery),function(e){FLBuilderAJAXLayout=function(t,i){this._data=e.extend({},this._defaults,"string"==typeof t?FLBuilder._jsonParse(t):t),this._callback=i,this._post=FLBuilderConfig.postId,this._head=e("head").eq(0),this._body=e("body").eq(0),this._data.css&&("inline"===FLBuilderConfig.enqueueMethod?(this._oldCss=e("#fl-builder-layout-"+this._post+"-inline-css"),this._newCss=e('<style id="fl-builder-layout-'+this._post+'-inline-css" type="text/css">'+this._data.css+"</style>")):(this._loader=e('<img src="'+this._data.css+'" />'),this._oldCss=e('link[href*="/cache/'+this._post+'-layout"]'),this._newCss=e('<link rel="stylesheet" id="fl-builder-layout-'+this._post+'-css" href="'+this._data.css+'" />'))),this._data.partial?(this._data.js&&(this._oldJs=e("#fl-builder-partial-refresh-js"),this._newJs=e('<script type="text/javascript" id="fl-builder-partial-refresh-js">'+this._data.js+"</script>")),this._data.nodeId&&(this._data.oldNodeId?(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.oldNodeId+'"]'),this._content=e(".fl-node-"+this._data.oldNodeId)):(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.nodeId+'"]'),this._content=e(".fl-node-"+this._data.nodeId).eq(0)))):("inline"===FLBuilderConfig.enqueueMethod?(this._oldJs=e("#fl-builder-layout-"+this._post+"-inline-js"),this._newJs=e('<script id="fl-builder-layout-'+this._post+'-inline-js">'+this._data.js+"</script>")):(this._oldJs=e('script[src*="/cache/'+this._post+'"]'),this._newJs=e('<script src="'+this._data.js+'"></script>')),this._oldScriptsStyles=e(".fl-builder-layout-scripts-styles"),this._content=e(FLBuilder._contentClass)),this._init()},FLBuilderAJAXLayout.prototype={_defaults:{partial:!1,nodeId:null,nodeType:null,nodeParent:null,nodePosition:null,oldNodeId:null,html:null,scriptsStyles:null,css:null,js:null},_data:null,_callback:function(){},_post:null,_head:null,_body:null,_loader:null,_oldCss:null,_newCss:null,_oldJs:null,_newJs:null,_oldScriptsStyles:null,_content:null,_init:function(){this._body.height(this._body.height()),this._data.css?"inline"===FLBuilderConfig.enqueueMethod?(this._addNewCSS(),this._finish()):"onload"in document.createElement("link")?(this._newCss.on("load",e.proxy(this._finish,this)),this._addNewCSS()):(this._loader.on("error",e.proxy(this._loadNewCSSFallbackComplete,this)),this._body.append(this._loader)):this._finish()},_loadNewCSSFallbackComplete:function(){this._loader.remove(),this._addNewCSS(),setTimeout(e.proxy(this._finish,this),250)},_addNewCSS:function(){this._oldCss.length>0?this._oldCss.after(this._newCss):this._head.append(this._newCss)},_finish:function(){this._removeOldContentAndAssets(),this._cleanNewHTML(),this._cleanNewAssets(),this._addNewHTML(),this._addNewScriptsStyles(),this._addNewJS(),e(FLBuilder._contentClass).trigger("fl-builder.layout-rendered"),FLBuilder.hideAjaxLoader()},_removeOldContentAndAssets:function(){this._content&&this._content.empty(),this._oldCss&&this._oldCss.remove(),this._oldJs&&this._oldJs.remove(),this._oldScriptsStyles&&this._oldScriptsStyles.remove()},_cleanNewHTML:function(){if(this._data.scriptsStyles){var t=e("<div>"+this._data.html+"</div>"),i="fl-row",l=this._data.scriptsStyles,n="";this._data.partial&&(i="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),t.find("> *, script").each(function(){e(this).hasClass(i)||"application/json"==e(this).attr("type")||(n=e(this).remove(),l+=n[0].outerHTML)}),""!==l&&(l=this._data.partial?'<div class="fl-builder-node-scripts-styles" data-node="'+this._data.nodeId+'">'+l+"<div>":'<div class="fl-builder-node-scripts-styles">'+l+"<div>"),this._data.html=t.html(),this._data.scriptsStyles=l}},_addNewHTML:function(){var t;if(this._data.partial?this._data.nodeParent?(t=this._data.nodeParent.hasClass("fl-builder-content")?this._data.nodeParent.find(" > .fl-row"):this._data.nodeParent.hasClass("fl-row-content")?this._data.nodeParent.find(" > .fl-col-group"):this._data.nodeParent.hasClass("fl-col-group")?this._data.nodeParent.find(" > .fl-col"):this._data.nodeParent.find(" > .fl-col-group, > .fl-module"),t=t.filter(":not(.fl-builder-node-clone)"),0===t.length||this._data.nodePosition>=t.length?this._data.nodeParent.append(this._data.html):t.eq(this._data.nodePosition).before(this._data.html),this._data.nodeId&&FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+this._data.nodeId))):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.html),FLBuilder.preview&&this._data.nodeId&&this._data.nodeId!=FLBuilder.preview.nodeId){var i=e(FLBuilder.preview.classes.node),l=i.closest(".fl-node-"+this._data.nodeId).length;l&&i.html(FLBuilder.preview.elements.node.html())}this._data.onAddNewHTML&&this._data.onAddNewHTML()},_cleanNewAssets:function(){var t=this;this._data.html=this._removeDuplicateAssets(this._data.html),this._data.scriptsStyles&&""!==this._data.scriptsStyles&&(this._data.scriptsStyles=this._removeDuplicateAssets(this._data.scriptsStyles)),this._data.partial?e(".fl-builder-node-scripts-styles").each(function(){t._data.html.indexOf("fl-node-"+e(this).data("node"))>-1&&e(this).remove()}):(e("#fl-builder-partial-refresh-js").remove(),e(".fl-builder-node-scripts-styles").remove())},_removeDuplicateAssets:function(t){var i=e("<div>"+t+"</div>"),l="",n=null,o="",s=null,r=window.location,a=r.protocol+"//"+r.hostname+(r.port?":"+r.port:"");return i.find("script").each(function(){l=e(this).attr("src"),"undefined"!=typeof l&&(l=l.replace(a,""),n=e('script[src*="'+l+'"]'),n.length>0&&e(this).remove())}),i.find("link").each(function(){o=e(this).attr("href"),"undefined"!=typeof o&&(o=o.replace(a,""),s=e('link[href*="'+o+'"]'),s.length>0&&e(this).remove())}),i.html()},_addNewScriptsStyles:function(){this._data.scriptsStyles&&""!==this._data.scriptsStyles&&this._body.append(this._data.scriptsStyles)},_addNewJS:function(){setTimeout(e.proxy(function(){this._newJs&&this._head.append(this._newJs),FLBuilder.triggerHook("didRenderLayoutJSComplete")},this),50)},_complete:function(){FLBuilder._dragging?(FLBuilder._highlightRowsAndColsForDrag(),FLBuilder._refreshSortables()):(FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._resizeLayout()),FLBuilder._initMediaElements(),FLBuilderLayout.init(),FLBuilderResponsiveEditing.refreshPreview(this._callback),FLBuilder.triggerHook("didRenderLayoutComplete"),this._body.height("auto")}}}(jQuery),function(e){FLBuilderPreview=function(e){this.id=(new Date).getTime(),this.type=e.type,this._saveState(),e.layout?FLBuilder._renderLayout(e.layout,function(){this._init(),e.callback&&e.callback()}.bind(this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.getFormattedSelector=function(e,t){for(var i="",l=t.split(","),n=0;n<l.length;n++)i+=l[n].indexOf("{node}")>-1?l[n].replace("{node}",e):l[n].indexOf("{node_id}")>-1?l[n].replace(/{node_id}/g,this.nodeId):e+" "+l[n],n!=l.length-1&&(i+=", ");return i},FLBuilderPreview.prototype={id:"",type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_styleSheetMedium:null,_styleSheetResponsive:null,_timeout:null,_loaderTimeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=e(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),this._createSheets(),this._initResponsivePreviews(),this._initDefaultFieldPreviews(),this.type){case"row":this._initRow();break;case"col":this._initColumn();break;case"module":this._initModule()}FLBuilder.triggerHook("preview-init",this)},_saveSettings:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings");this._savedSettings=FLBuilder._getSettingsForChangedCheck(this.nodeId,t)},_settingsHaveChanged:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=FLBuilder._getSettings(t);return JSON.stringify(this._savedSettings)!=JSON.stringify(i)},_initElementsAndClasses:function(){var t;t="row"==this.type?".fl-row-content-wrap":".fl-"+this.type+"-content",e.extend(this.classes,{settings:".fl-builder-"+this.type+"-settings",settingsHeader:".fl-builder-"+this.type+"-settings .fl-lightbox-header",node:FLBuilder._contentClass+" .fl-node-"+this.nodeId,content:FLBuilder._contentClass+" .fl-node-"+this.nodeId+" > "+t}),e.extend(this.elements,{settings:e(this.classes.settings),settingsHeader:e(this.classes.settingsHeader),node:e(this.classes.node),content:e(this.classes.content)})},_createSheets:function(){this._destroySheets(),this._styleSheet||(this._styleSheet=new FLStyleSheet({id:"fl-builder-preview",className:"fl-builder-preview-style"})),this._styleSheetMedium||(this._styleSheetMedium=new FLStyleSheet({id:"fl-builder-preview-medium",className:"fl-builder-preview-style"}),this._styleSheetMedium.disable()),this._styleSheetResponsive||(this._styleSheetResponsive=new FLStyleSheet({id:"fl-builder-preview-responsive",className:"fl-builder-preview-style"}),this._styleSheetResponsive.disable())},_destroySheets:function(){this._styleSheet&&(this._styleSheet.destroy(),this._styleSheet=null),this._styleSheetMedium&&(this._styleSheetMedium.destroy(),this._styleSheetMedium=null),this._styleSheetResponsive&&(this._styleSheetResponsive.destroy(),this._styleSheetResponsive=null)},_disableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=FLBuilderConfig.global,i=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.responsive_breakpoint),this._styleSheetResponsive.disable()):"medium"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.medium_breakpoint),this._styleSheetMedium.disable()):i.removeClass(function(e,t){return(t.match(/fl-node-[^\s]*/g)||[]).join(" ")})},_enableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetResponsive.enable()):"medium"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetMedium.enable()):t.addClass("fl-node-"+t.data("node"))},_getDefaultValue:function(t,i){var l="",n=e(t),o=n.closest("[data-node]"),s=["line-height","font-weight"];return"width"===i?l="auto":-1===e.inArray(i,s)&&o.length&&(this._disableStyles(),l=n.css(i),this._enableStyles()),l},updateCSSRule:function(e,t,i,l){var n=FLBuilderResponsiveEditing._mode,o="";""!==i&&"null"!==i||(i=this._getDefaultValue(e,t)),l?(o="string"==typeof l?this.toUpperCaseWords(l):"default"===n?"":this.toUpperCaseWords(n),this["_styleSheet"+o].updateRule(e,t,i)):this._styleSheet.updateRule(e,t,i)},delay:function(e,t){this._cancelDelay(),this._timeout=setTimeout(t,e)},_cancelDelay:function(){null!==this._timeout&&clearTimeout(this._timeout)},hexToRgb:function(e){var t=parseInt(e,16),i=t>>16&255,l=t>>8&255,n=255&t;return[i,l,n]},hexOrRgb:function(e){return e.indexOf("rgb")<0&&e.indexOf("#")<0&&(e="#"+e),e},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_initResponsivePreviews:function(){var t=".preview-"+this.id;FLBuilder.addHook("responsive-editing-switched"+t,e.proxy(this._responsiveEditingSwitched,this)),FLBuilder.addHook("responsive-editing-before-preview-fields"+t,e.proxy(this._responsiveEditingPreviewFields,this))},_destroyResponsivePreviews:function(){var e=".preview-"+this.id;FLBuilder.removeHook("responsive-editing-switched"+e),FLBuilder.removeHook("responsive-editing-before-preview-fields"+e)},_responsiveEditingSwitched:function(e,t){"default"==t?(this._styleSheetMedium.disable(),this._styleSheetResponsive.disable()):"medium"==t?(this._styleSheetMedium.enable(),this._styleSheetResponsive.disable()):"responsive"==t&&(this._styleSheetMedium.enable(),this._styleSheetResponsive.enable())},_responsiveEditingPreviewFields:function(e,t){"medium"===t&&"col"===this.type&&this.elements.node[0].style.width&&(size=parseFloat(this.elements.node[0].style.width),this.elements.size.val(size))},updateResponsiveCSSRule:function(e,t,i){this.updateCSSRule(e,t,i,!0)},_saveState:function(){var t=FLBuilderConfig.postId,i=e('link[href*="/cache/'+t+'"]').attr("href"),l=e('script[src*="/cache/'+t+'"]').attr("src"),n=e(FLBuilder._contentClass).html();this.state={css:i,js:l,html:n}},preview:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=t.attr("data-node"),l=FLBuilder._getSettings(t);return FLBuilder._showNodeLoading(i),this._cancelPreview(),l=FLBuilder._inputVarsCheck(l),"error"===l?0:void(this._xhr=FLBuilder.ajax({action:"render_layout",node_id:i,node_preview:l},e.proxy(this._renderPreview,this)))},delayPreview:function(t){var i="undefined"==typeof t?[]:e(t.target).closest("tr").find("th"),l=e(".fl-builder-widget-settings .fl-builder-settings-title"),n=e(".fl-builder-settings .fl-lightbox-header"),o=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.svg",s=e('<img class="fl-builder-preview-loader" src="'+o+'" />');this.delay(1e3,e.proxy(this.preview,this)),this._loaderTimeout=setTimeout(function(){e(".fl-builder-preview-loader").remove(),i.length>0?i.append(s):l.length>0?l.append(s):n.length>0&&n.append(s)},1500)},_cancelPreview:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)},_renderPreview:function(t){this._xhr=null,FLBuilder._renderLayout(t,e.proxy(this._renderPreviewComplete,this))},_renderPreviewComplete:function(){
7
  this._createSheets(),this._initElementsAndClasses(),this._initDefaultFieldPreviews(),null!==this._loaderTimeout&&clearTimeout(this._loaderTimeout),e(".fl-builder-preview-loader").remove(),e(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){var e=this.nodeId;return this._settingsHaveChanged()?("col"===this.type&&(e=this.elements.node.closest(".fl-col-group").data("node")),void FLBuilder._updateNode(e,function(){this.clear()}.bind(this))):void this.clear()},cancel:function(){this._cancelDelay(),this._cancelPreview()},clear:function(){this.cancel(),this._destroySheets(),this._destroyResponsivePreviews()},_initNodeTextColor:function(){e.extend(this.elements,{textColor:e(this.classes.settings+" input[name=text_color]"),linkColor:e(this.classes.settings+" input[name=link_color]"),hoverColor:e(this.classes.settings+" input[name=hover_color]"),headingColor:e(this.classes.settings+" input[name=heading_color]")}),this.elements.textColor.on("change",e.proxy(this._textColorChange,this)),this.elements.linkColor.on("change",e.proxy(this._textColorChange,this)),this.elements.hoverColor.on("change",e.proxy(this._textColorChange,this)),this.elements.headingColor.on("change",e.proxy(this._textColorChange,this))},_textColorChange:function(t){var i=this.elements.textColor.val(),l=this.elements.linkColor.val(),n=this.elements.hoverColor.val(),o=this.elements.headingColor.val();l=""===l?i:l,n=""===n?i:n,o=""===o?i:o,i&&i.indexOf("rgb")<0&&(i="#"+i),l&&l.indexOf("rgb")<0&&(l="#"+l),n&&n.indexOf("rgb")<0&&(n="#"+n),o&&o.indexOf("rgb")<0&&(o="#"+o),this.delay(50,e.proxy(function(){""===i?this.updateCSSRule(this.classes.node,"color",""):this.updateCSSRule(this.classes.node,"color",i),""===l?this.updateCSSRule(this.classes.node+" a","color",""):this.updateCSSRule(this.classes.node+" a","color",l),""===n?this.updateCSSRule(this.classes.node+" a:hover","color",""):this.updateCSSRule(this.classes.node+" a:hover","color",n),""===o?(this.updateCSSRule(this.classes.node+" h1","color",""),this.updateCSSRule(this.classes.node+" h2","color",""),this.updateCSSRule(this.classes.node+" h3","color",""),this.updateCSSRule(this.classes.node+" h4","color",""),this.updateCSSRule(this.classes.node+" h5","color",""),this.updateCSSRule(this.classes.node+" h6","color",""),this.updateCSSRule(this.classes.node+" h1 a","color",""),this.updateCSSRule(this.classes.node+" h2 a","color",""),this.updateCSSRule(this.classes.node+" h3 a","color",""),this.updateCSSRule(this.classes.node+" h4 a","color",""),this.updateCSSRule(this.classes.node+" h5 a","color",""),this.updateCSSRule(this.classes.node+" h6 a","color","")):(this.updateCSSRule(this.classes.node+" h1","color",o),this.updateCSSRule(this.classes.node+" h2","color",o),this.updateCSSRule(this.classes.node+" h3","color",o),this.updateCSSRule(this.classes.node+" h4","color",o),this.updateCSSRule(this.classes.node+" h5","color",o),this.updateCSSRule(this.classes.node+" h6","color",o),this.updateCSSRule(this.classes.node+" h1 a","color",o),this.updateCSSRule(this.classes.node+" h2 a","color",o),this.updateCSSRule(this.classes.node+" h3 a","color",o),this.updateCSSRule(this.classes.node+" h4 a","color",o),this.updateCSSRule(this.classes.node+" h5 a","color",o),this.updateCSSRule(this.classes.node+" h6 a","color",o))},this))},_initNodeBg:function(){e.extend(this.elements,{bgType:e(this.classes.settings+" select[name=bg_type]"),bgColor:e(this.classes.settings+" input[name=bg_color]"),bgColorPicker:e(this.classes.settings+" .fl-picker-bg_color"),bgGradientType:e(this.classes.settings+" select.fl-gradient-picker-type-select"),bgVideoSource:e(this.classes.settings+" select[name=bg_video_source]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:e(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:e(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:e(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:e(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:e(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:e(this.classes.settings+" input[name=ss_speed]"),bgSlideshowTrans:e(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:e(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:e(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayType:e(this.classes.settings+" select[name=bg_overlay_type]"),bgOverlayColor:e(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayGradient:e(this.classes.settings+" #fl-field-bg_overlay_gradient select")}),this.elements.bgType.on("change",e.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",e.proxy(this._bgColorChange,this)),this.elements.bgVideoServiceUrl.on("change",e.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",e.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayType.on("change",e.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayColor.on("change",e.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val(),i=FLBuilderResponsiveEditing._mode;this.elements.node.removeClass("fl-row-bg-video"),this.elements.node.removeClass("fl-row-bg-slideshow"),this.elements.node.removeClass("fl-row-bg-parallax"),this.elements.node.find(".fl-bg-video").remove(),this.elements.node.find(".fl-bg-slideshow").remove(),this.elements.content.css("background-image",""),this.updateCSSRule(this.classes.content,"background-color","transparent"),this.updateCSSRule(this.classes.content,"background-image","none"),this.updateCSSRule(this.classes.content,"background-image","none","medium"),this.updateCSSRule(this.classes.content,"background-image","none","responsive"),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"gradient"==t?(this.elements.bgGradientType.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.settings.find('[data-device="'+i+'"] select[name*="bg_"]').trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(t){var i;""===this.elements.bgColor.val()?this.updateCSSRule(this.classes.content,"background-color","transparent"):(i=this.hexOrRgb(this.elements.bgColor.val()),this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",i)},this)))},_bgVideoChange:function(t){var i=this.elements,l=i.bgVideoSource.val(),n=i.bgVideo.val(),o=i.bgVideoServiceUrl.val(),s="https://www.youtube.com/iframe_api",r="https://player.vimeo.com/api/player.js",a=e("<script>");"video_service"==l&&""!=o?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(o)&&e('script[src*="youtube.com"').length<1?a.attr("src",s):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(o)&&e('script[src*="vimeo.com"').length<1&&a.attr("src",r),a.attr("type","text/javascript").appendTo("head"),this.delay(500,e.proxy(this.preview,this))):""!=n&&this.preview()},_bgSlideshowChange:function(t){var i=this.elements,l=i.bgSlideshowSource.val(),n=i.bgSlideshowPhotos.val(),o=i.bgSlideshowFeedUrl.val(),s=i.bgSlideshowSpeed.val(),r=i.bgSlideshowTransSpeed.val();"wordpress"==l&&""===n||"smugmug"==l&&""===o||isNaN(parseInt(s))||isNaN(parseInt(r))||this.delay(500,e.proxy(this.preview,this))},_bgParallaxChange:function(e){this.elements.bgParallaxImageSrc.val()&&this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgParallaxImageSrc.val()+")","background-repeat":"no-repeat","background-position":"center center","background-attachment":"fixed","background-size":"cover"})},_bgOverlayChange:function(t){var i,l=this.elements.bgOverlayType.val(),n=this.elements.bgOverlayColor.val();"color"===l?(""===n?(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent")):(i=this.hexOrRgb(this.elements.bgOverlayColor.val()),this.delay(100,e.proxy(function(){this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color",i)},this))),this.updateCSSRule(this.classes.content+"::after","background-image","none")):"gradient"===l?(this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.elements.bgOverlayGradient.trigger("change")):(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.updateCSSRule(this.classes.content+"::after","background-image","none"))},_bgOverlayAddClasses:function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay")},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click"),this.elements.bgOverlayType.val("color").trigger("change")},_initNodeClassName:function(){e.extend(this.elements,{className:e(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",e.proxy(this._classNameChange,this)),this._lastClassName=this.elements.className.val()},_classNameChange:function(e){var t=this.elements.className.val();null!==this._lastClassName&&this.elements.node.removeClass(this._lastClassName),this.elements.node.addClass(t),this._lastClassName=t},_initNodeDimensions:function(t){var i={},l=["Top","Bottom","Left","Right"],n=["","Medium","Responsive"],o=this.classes.settings,s="",r="",a=null,d=null;for(a=0;a<l.length;a++)for(d=0;d<n.length;d++)s=t+l[a]+n[d],r=t+"_"+l[a].toLowerCase(),""!=n[d]&&(r+="_"+n[d].toLowerCase()),i[s]=e(o+" input[name="+r+"]");e.extend(this.elements,i)},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),contentWidth:e(this.classes.settings+" select[name=content_width]"),maxContentWidth:e(this.classes.settings+" input[name=max_content_width]"),maxContentWidthUnit:e(this.classes.settings+" select[name=max_content_width_unit]"),height:e(this.classes.settings+" select[name=full_height]"),minHeight:e(this.classes.settings+" input[name=min_height]"),align:e(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("input",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.maxContentWidthUnit.on("change",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.align.on("change",e.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_rowWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.width.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width")),this._rowMaxContentWidthChange()},_rowContentWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.contentWidth.val()?(i.removeClass("fl-row-fixed-width"),i.addClass("fl-row-full-width")):(i.removeClass("fl-row-full-width"),i.addClass("fl-row-fixed-width"),this._rowMaxContentWidthChange())},_rowMaxContentWidthChange:function(e){var t=FLBuilderConfig.global,i=this.elements.node,l=this.elements.content.find(".fl-row-content"),n=this.elements.maxContentWidth.val(),o=this.elements.maxContentWidthUnit.val();""==n?n=t.row_width+t.row_width_unit:n+=o,"fixed"===this.elements.width.val()&&i.css("max-width",n),l.css("max-width",n)},_rowHeightChange:function(e){var t=this.elements.node;this.elements.content;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),t.removeClass("fl-row-full-height"),t.removeClass("fl-row-custom-height"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.val("").trigger("input")):"custom"==this.elements.height.val()?(t.addClass("fl-row-custom-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.trigger("input")):this.elements.minHeight.val("").trigger("input")},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),sizeMedium:e(this.classes.settings+" input[name=size_medium]"),sizeResponsive:e(this.classes.settings+" input[name=size_responsive]"),columnHeight:e(this.classes.settings+" select[name=equal_height]"),columnAlign:e(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:e(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeMedium.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeResponsive.on("input",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",e.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",e.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_colSizeChange:function(t){var i=e(t.target),l=8,n=100-l,o=parseFloat(i.val()),s=this.elements.node.closest(".fl-col-group"),r=this.elements.node.prev(".fl-col"),a=this.elements.node.next(".fl-col"),d=0===a.length?r:a,u=this.elements.node.siblings(".fl-col"),c=0,f=FLBuilderResponsiveEditing._mode;0!==u.length&&(isNaN(o)&&("medium"===f?o=this.elements.size.val():"responsive"===f&&(o=this.elements.sizeMedium.val()?this.elements.sizeMedium.val():"auto"),"auto"!==o&&isNaN(o)&&(o=l)),"default"===f?(u.each(function(){e(this).data("node")!=d.data("node")&&(n-=parseFloat(e(this)[0].style.width),c+=parseFloat(e(this)[0].style.width))}),o<l&&(o=l),o>n&&(o=n),this.elements.node.css("width",o+"%"),d.css("width",100-c-o+"%")):(o>100&&(o=100,i.val(100)),this.updateCSSRule(this.classes.node,{"max-width":("auto"===o?100:o)+"% !important",width:("auto"===o?o:o+"%")+" !important"},void 0,!0),"responsive"===f&&(i.val()?(this.updateCSSRule(this.classes.node,"float",FLBuilderConfig.isRtl?"right":"left",!0),this.updateCSSRule(this.classes.node,"clear","none",!0)):(this.updateCSSRule(this.classes.node,"float","none",!0),this.updateCSSRule(this.classes.node,"clear","both",!0)),i.val()||this._colsHaveCustomResponsiveWidth(u)?s.addClass("fl-col-group-custom-width"):s.removeClass("fl-col-group-custom-width"))))},_colsHaveCustomResponsiveWidth:function(t){var i=FLBuilderSettingsConfig.nodes,l=!1;return t.each(function(){var t=e(this).data("node");i[t]&&i[t].size_responsive&&(l=!0)}),l},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initNodeDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var e=FLBuilder.isUndefined(e)?this.elements.settings.find(".fl-field"):e,t=null,i=null,l=null,n=0;n<e.length;n++)t=e.eq(n),i=t.data("type"),l=t.data("preview"),"refresh"==l.type&&this._initFieldRefreshPreview(t),"text"==l.type&&this._initFieldTextPreview(t),"css"==l.type&&this._initFieldCSSPreview(t),"widget"==l.type&&this._initFieldWidgetPreview(t),"font"==l.type&&this._initFieldFontPreview(t),"attribute"==l.type&&this._initFieldAttributePreview(t),"animation"==l.type&&this._initFieldAnimationPreview(l,t),"callback"==l.type&&this._initFieldCallbackPreview(l,t,i,e),this._initFieldUnitSelect(t)},_initFieldCallbackPreview:function(t,i,l,n){var o,s=t.callback,r=e(".fl-builder-settings:visible"),a=r.data("node"),d=e(".fl-builder-content .fl-node-"+a);if("undefined"!=typeof FLBuilderPreviewCallbacks[s]?o=FLBuilderPreviewCallbacks[s]:"undefined"!=typeof window[s]&&(o=window[s]),"function"==typeof o){var u={field:i,fields:n,type:l,preview:t,form:r,nodeID:a,node:d};switch(l){case"align":case"button-group":case"text":case"multiple-photos":case"video":case"icon":case"ordering":u.input=i.find("input"),u.getValue=function(){return u.input.val()};break;case"color":u.input=i.find("input.fl-color-picker-value"),u.getValues=function(){var e=u.input.val();({value:e,formattedValue:FLBuilderPreview.formatColor(e)})};break;case"textarea":case"code":u.textarea=i.find("textarea"),u.getValue=function(){return u.textarea.val()};break;case"select":case"photo-sizes":case"post-type":u.select=i.find("select"),u.getValue=function(){return u.select.val()};break;case"photo":u.input=i.find("input[type=hidden]"),u.sizeSelect=i.find("select"),u.getValues=function(){return{value:u.input.val(),size:u.sizeSelect.val()}};break;case"unit":u.input=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var e=u.input.val(),t=u.unitSelect.val(),i={value:e,unit:t,formattedValue:e+t};return i};break;case"dimension":u.inputs=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var t={inputs:[],props:{},unit:u.unitSelect.val()};return u.inputs.each(function(i,l){var l=e(l),n=l.val(),o=l.data("unit");t.inputs.push(n),t.props[o]=n}),t};break;case"animation":u.input=i.find("input"),u.select=i.find("select"),u.getValues=function(){return{delay:u.input.val(),style:u.select.val()}};break;case"link":u.input=i.find(".fl-link-field-input-wrap input"),u.targetInput=i.find("input[name$=_target]"),u.noFollowInput=i.find("input[name$=_nofollow]"),u.getValues=function(){return{url:u.input.val(),target:u.targetInput.val(),noFollow:u.noFollowInput.val()}};break;case"shadow":u.colorInput=i.find("input.fl-color-picker-value"),u.inputs=i.find("input[type=number]"),u.getValues=function(){({color:u.colorInput.val(),x:u.inputs[0].val(),y:u.inputs[1].val(),blur:u.inputs[2].val(),spread:u.inputs[3].val()})};break;case"gradient":u.inputs=i.find("input"),u.select=i.find("select"),u.gradientInputs={},u.gradientInputs.type=i.find('select[name$="[type]"]'),u.gradientInputs.angle=i.find('input[name$="[angle]"]'),u.gradientInputs.position=i.find('select[name$="[position]"]'),u.gradientInputs.stops=[],i.find(".fl-gradient-picker-colors .fl-gradient-picker-color-row").each(function(t,i){i=e(i),u.gradientInputs.stops.push({color:i.find(".fl-gradient-picker-color input"),stop:i.find(".fl-gradient-picker-stop input")})}),u.getValues=function(){var e={type:u.gradientInputs.type.val(),angle:u.gradientInputs.angle.val(),position:u.gradientInputs.position.val(),stops:[]};for(var t in u.gradientInputs.stops){var i=u.gradientInputs.stops[t];e.stops[t]={color:i.color.val(),stop:i.stop.val()}}return e};break;case"shape-transform":u.inputs=i.find("input"),u.getValues=function(){return{scaleXSign:u.inputs.eq(0).val(),scaleYSign:u.inputs.eq(1).val(),skewX:u.inputs.eq(2).val(),skewY:u.inputs.eq(3).val(),scaleX:u.inputs.eq(4).val(),rotate:u.inputs.eq(5).val(),scaleY:u.inputs.eq(6).val()}};break;default:u.input=i.find("input"),u.getValue=function(){return u.input.val()}}var c=i.find(".fl-field-responsive-toggle");u.responsiveToggle=!!c.length&&c,o=o.bind(this,u);var f={input:"change keyup input",inputs:"change keyup input",targetInput:"change keyup input",noFollowInput:"change keyup input",colorInput:"change input",textarea:"change keyup input",select:"change",sizeSelect:"change",unitSelect:"change"};for(var h in f)"undefined"!=typeof u[h]&&u[h].on(f[h],o)}},_initFieldRefreshPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this.delayPreview,this);switch(i){case"align":t.find("input").on("change",n);break;case"text":t.find("input[type=text]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"select":t.find("select").on("change",n);break;case"color":t.find(".fl-color-picker-value").on("change",n);break;case"photo":t.find("select").on("change",n);break;case"multiple-photos":t.find("input").on("change",n);break;case"photo-sizes":t.find("select").on("change",n);break;case"video":t.find("input").on("change",n);break;case"multiple-audios":t.find("input").on("change",n);break;case"icon":t.find("input").on("change",n);break;case"form":t.delegate("input","change",n);break;case"editor":this._addTextEditorCallback(t,l);break;case"code":t.find("textarea").on("change",n);break;case"post-type":t.find("select").on("change",n);break;case"suggest":t.find(".as-values").on("change",n),t.find("select").on("change",n);break;case"unit":case"dimension":t.find("input[type=number]").on("input",n);break;case"ordering":t.find("input[type=hidden]").on("change",n);break;default:t.on("change",n)}},_initFieldTextPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this._previewText,this,l);switch(i){case"text":t.find("input[type=text]").on("keyup",n);break;case"unit":t.find("input[type=number]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"code":t.find("textarea").on("change",n);break;case"editor":this._addTextEditorCallback(t,l)}},_previewText:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),n=e(l),o=e("<div>"+e(i.target).val()+"</div>");n.length>0?(o.find("script").remove(),n.html(o.html())):this.delayPreview(i)},_previewTextEditor:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(n),s="undefined"!=typeof tinyMCE?tinyMCE.get(i):null,r=e("#"+i),a="";o.length>0&&(a=e(s&&"none"==r.css("display")?"<div>"+s.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+r.val()+"</div>":"<div>"+switchEditors.wpautop(r.val())+"</div>"),a.find("script").remove(),o.html(a.html()))},_addTextEditorCallback:function(t,i){var l=t.find("textarea.wp-editor-area").attr("id"),n=null;if("refresh"==i.type)n=e.proxy(this.delayPreview,this);else{if("text"!=i.type)return;n=e.proxy(this._previewTextEditor,this,i,l)}e("#"+l).on("keyup",n),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(l),editor.on("change",n),editor.on("keyup",n))},_initFieldFontPreview:function(t){var i=t.data("type"),l=t.data("preview");l.id=t.attr("id");var n=e.proxy(this._previewFont,this,l);"font"==i&&t.find(".fl-font-field").on("change","select",n)},_previewFont:function(t,i){var l=e(i.delegateTarget),n=l.find(".fl-font-field-font"),o=e(n).find(":selected"),s=o.parent().attr("label"),r=l.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector),u=t.important?" !important":"",c="";"Google"!=s&&"Recently Used"!=s||this._buildFontStylesheet(a,n.val(),r.val()),c=n.val();var f=new RegExp("[0-9]");f.test(n.val())&&(c='"'+n.val()+'"'),this.updateCSSRule(d,"font-family","Default"===n.val()?"":c+u),this.updateCSSRule(d,"font-weight","default"===r.val()?"":r.val()+u)},_buildFontStylesheet:function(t,i,l){var n=FLBuilderConfig.googleFontsUrl,o="",s={},r={};s[i]=[l],FLBuilderPreview._fontsList[t]=s,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var i=t[e];r[e]=r[e]||[],i=i.filter(function(t){return r[e].indexOf(t)<0}),r[e]=r[e].concat(i)})}),e.each(r,function(e,t){o+=e+":"+t.join()+"|"}),o=n+o.slice(0,-1).replace(" ","+"),e("#fl-builder-google-fonts-preview").length<1?e("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",o).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",o)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if("undefined"!=typeof t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,i){switch(t.data("type")){case"align":t.find("input").on("change",e.proxy(this._previewCSS,this,i,t));break;case"border":t.find("select").on("change",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewBorderCSS,this,i,t));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColorCSS,this,i,t));break;case"dimension":t.find("input[type=number]").on("input",e.proxy(this._previewDimensionCSS,this,i,t));break;case"gradient":t.find("select").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-angle").on("input",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-stop").on("input",e.proxy(this._previewGradientCSS,this,i,t));break;case"photo":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"shadow":t.find("input").on("input",e.proxy(this._previewShadowCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewShadowCSS,this,i,t));break;case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,i,t));break;case"typography":t.find("select").on("change",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewTypographyCSS,this,i,t));break;case"unit":t.find("input[type=number]").on("input",e.proxy(this._previewCSS,this,i,t))}},_previewCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=t.property,s=this._getPreviewCSSUnit(t,i,l),r=e(l.target),a=r.val(),d=!!r.closest(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";o.indexOf("image")>-1&&a?a="url("+a+")":"%"===s&&"opacity"===o?a=parseInt(a)/100:""!==a&&(a+=s),this.updateCSSRule(n,o,a+u,d)},_previewBorderCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target),i=o.closest(".fl-field"),s=o.closest(".fl-compound-field-setting"),r=s.data("property"),a=o.val(),d=(s.find(".fl-field-unit-select"),!!o.closest(".fl-field-responsive-setting").length),u=t.important&&""!==a?" !important":"";t.property=r,"border-color"===r?this._previewColorCSS(t,i,l):"border-width"===r||"border-radius"===r?this._previewDimensionCSS(t,i,l):"box-shadow"===r?this._previewShadowCSS(t,s,l):("border-style"===r&&i.find(".fl-border-field-width input:visible").trigger("input"),this.updateCSSRule(n,r,a+u,d))},_previewColorCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target),s=o.val(),r=!!o.closest(".fl-field-responsive-setting").length,a=t.important&&""!==s?" !important":"";""!==s&&s.indexOf("rgb")<0&&(s="#"+s),this.updateCSSRule(n,t.property,s+a,r)},_previewDimensionCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=t.property,s=i.attr("id").replace("fl-field-",""),r=e(l.target).data("unit"),a=this._getDimensionValue(t,i,r,l),d=!!i.find(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";o="border-radius"===o?"border-"+r.replace("_","-")+"-radius":"border-width"===o?"border-"+r+"-width":o+"-"+r,this.updateCSSRule(n,o,a+u,d),"margin"!==s&&"padding"!==s&&"border"!==s||this.elements.node.find(".fl-bg-slideshow").length&&FLBuilder._resizeLayout()},_getDimensionValue:function(t,i,l,n){var o=e(n.target).val(),s="";return o=o.toLowerCase().replace(/[^a-z0-9%.\-]/g,""),null===o||""===o||isNaN(o)||(s=this._getPreviewCSSUnit(t,i,n),o=parseFloat(o)+(s?s:"px")),o},_getPreviewCSSUnit:function(t,i,l){var n=e(l.target),o=(FLBuilderResponsiveEditing._mode,!!n.closest(".fl-compound-field-setting").length),s=!!n.closest(".fl-field-responsive-setting").length,r=null;return r=o?n.closest(".fl-compound-field-setting").find(".fl-field-unit-select"):s?n.closest(".fl-field-responsive-setting").find(".fl-field-unit-select"):i.find(".fl-field-unit-select"),r&&r.length?"SELECT"===r.prop("tagName")?r.val():r.text():t.unit?t.unit:""},_initFieldUnitSelect:function(t){t.find(".fl-field-unit-select").on("change",function(){var t=e(this),i=t.closest(".fl-field-responsive-setting"),l=t.closest(".fl-field");i.length?i.find("input").trigger("input"):l.find("input").trigger("input")})},_previewGradientCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=i.find(".fl-gradient-picker-type-select").val(),s=i.find(".fl-gradient-picker-angle").val(),r=i.find(".fl-gradient-picker-position").val(),a=i.find(".fl-color-picker-value"),d=i.find(".fl-gradient-picker-stop input"),u=[],c="",f="";a.each(function(t){var i=e(this).val(),l=d.eq(t).val();""===i&&(i="rgba(255,255,255,0)"),i.indexOf("rgb")<0&&(i="#"+i),isNaN(l)&&(l=0),u.push(i+" "+l+"%")}),u=u.join(", "),"linear"===o?(isNaN(s)&&(s=0),c="linear-gradient("+s+"deg, "+u+")"):c="radial-gradient(at "+r+", "+u+")",f=t.important&&""!==c?" !important":"",this.updateCSSRule(n,t.property,c+f)},_previewShadowCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=i.find(".fl-shadow-field-color input").val(),s=i.find(".fl-shadow-field-horizontal input").val(),r=i.find(".fl-shadow-field-vertical input").val(),a=i.find(".fl-shadow-field-blur input").val(),d=i.find(".fl-shadow-field-spread input").val(),u=!!i.find(".fl-shadow-field-spread input").length,c=!!e(l.target).closest(".fl-field-responsive-setting").length,f="",h="";""!==o&&(""===s&&(s=0),""===r&&(r=0),""===a&&(a=0),""===d&&(d=0),o.indexOf("rgb")<0&&(o="#"+o),f=s+"px ",f+=r+"px ",f+=a+"px ",u&&(f+=d+"px "),f+=o,f+=h),h=t.important&&""!==f?" !important":"",this.updateCSSRule(n,t.property,f,c)},_previewTypographyCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target),i=o.closest(".fl-field"),s=o.closest(".fl-compound-field-setting"),r=s.data("property"),a=o.val(),d=s.find(".fl-field-unit-select"),u=!!o.closest(".fl-field-responsive-setting").length,c=t.important&&""!==a?" !important":"";"font-family"===r?(t.id=i.attr("id"),this._previewFont(t,{delegateTarget:s
8
+ })):"text-shadow"===r?(t.property="text-shadow",this._previewShadowCSS(t,s,l)):(d.length&&""!==a&&("vw"===d.val()?a="calc("+FLBuilderConfig.global.responsive_base_fontsize+"px + "+a+"vw)":a+="SELECT"===d.prop("tagName")?d.val():"px"),this.updateCSSRule(n,r,a+c,u))},_initFieldAttributePreview:function(t){var i=t.data("preview"),l=i.attribute,n=t.find("input"),o=(t.val(),window[i.format_callback]),s=this._getPreviewSelector(this.classes.node,i.selector),r=e(s),a=this._previewAttribute.bind(this,n,r,l,o);n.on("change",a),n.on("keyup",a),n.on("input",a)},_previewAttribute:function(e,t,l,n){var o=e.val();for("function"==typeof n&&(o=n(o)),i=0;i<t.length;i++)t[i].setAttribute(l,o)},_initFieldWidgetPreview:function(t){var i=e.proxy(this.delayPreview,this);t.find("input").on("keyup",i),t.find("input[type=checkbox]").on("click",i),t.find("textarea").on("keyup",i),t.find("select").on("change",i)},_initFieldAnimationPreview:function(t,i){i.find(".fl-animation-field-style select").on("change",e.proxy(this._previewAnimationField,this,t,i)),i.find(".fl-animation-field-duration input").on("input",e.proxy(this._previewAnimationField,this,t,i))},_previewAnimationField:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),o=e(n),s=i.find(".fl-animation-field-style select"),r=i.find(".fl-animation-field-duration input"),a=s[0].options;o.removeClass("fl-animated"),o.removeClass("fl-animation"),o.css("animation-duration","");for(var d=0;d<a.length;d++)o.removeClass("fl-"+a[d].value);""!==s.val()&&(o.addClass("fl-animation"),o.addClass("fl-"+s.val()),o.data("animation-delay",0),o.data("animation-duration",r.val())),FLBuilderLayout._doModuleAnimation.apply(o)},_getPreviewSelector:function(e,t){return FLBuilderPreview.getFormattedSelector.call(this,e,t)},toUpperCaseWords:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},FLBuilderPreview.formatColor=function(e){return""!==e&&e.indexOf("rgb")<0&&e.indexOf("url")<0&&(e="#"+e),e},FLBuilderPreviewCallbacks={previewShape:function(e,t){var i=e.preview.position,l=e.preview.prefix,n=e.form,o=l+"transform[][scaleYSign]";yOrientation=n.find('input[name="'+o+'"]'),"bottom"===i?yOrientation.val("invert"):yOrientation.val(""),yOrientation.trigger("change"),this.delayPreview()},previewShapeLayerSize:function(e,t){var i=e.getValues(),l=i.unit,n=i.props.width,o=i.props.height,s=i.props.top,r=e.preview.prefix,a=e.preview.position,d=this._getPreviewSelector(this.classes.node,".fl-builder-"+a+"-edge-layer"),u=d+" > *",c=e.form.find('[name="'+r+'align"]'),f=c.val(),h=f.split(" "),p=h[0],g=h[1],m=e.form.find('[name="'+r+'shape"]'),b=m.val(),v=FLBuilderConfig.presets.shape[b];if(shapeProps={},shapeProps.width="100%",shapeProps.left="auto",shapeProps.right="auto",shapeProps.height="auto",shapeProps.top="auto",shapeProps.bottom="auto",n){shapeProps.width=n+l;var _=n/2+l;switch(g){case"left":shapeProps.left="0",shapeProps.right="auto";break;case"right":shapeProps.left="auto",shapeProps.right="0";break;case"center":shapeProps.left="calc( 50% - "+_+")",shapeProps.right="auto"}}this.updateCSSRule(u,"width",shapeProps.width),this.updateCSSRule(u,"left",shapeProps.left),this.updateCSSRule(u,"right",shapeProps.right);var L;if(o)L=o/2+l;else if(n){var F=v.data.viewBox.width,w=n/F*100;L=w/2+l}else L="";switch(o&&(shapeProps.height=o+l),p){case"top":shapeProps.top="0",shapeProps.bottom="auto";break;case"bottom":shapeProps.top="auto",shapeProps.bottom="0";break;case"center":shapeProps.top="calc( 50% - "+L+")",shapeProps.bottom="auto"}this.updateCSSRule(u,"height",shapeProps.height),this.updateCSSRule(u,"top",shapeProps.top),this.updateCSSRule(u,"bottom",shapeProps.bottom),""===s?this.updateCSSRule(d,a,"0"):this.updateCSSRule(d,a,s+l)},previewShapeAlign:function(e,t){var i=e.preview.prefix,l=e.form.find('[name="'+i+'size_width"]');l.trigger("input")},previewShapeFillStyle:function(e,t){var i=e.input.val(),l=e.preview,n=e.preview.prefix,o="fl-row-"+e.nodeID+"-"+n+"-linear-gradient",s="fl-row-"+e.nodeID+"-"+n+"-radial-gradient",r="fl-row-"+e.nodeID+"-"+n+"-pattern",a=e.form;if("undefined"!=typeof i){var d=this._getPreviewSelector(this.classes.node,l.selector);switch(i){case"color":var u=a.find("[name="+n+"fill_color]").val();this.updateCSSRule(d,"fill",FLBuilderPreview.formatColor(u));break;case"gradient":var c=a.find("#fl-field-"+n+"fill_gradient"),f=c.find('select[name$="[type]"]').val(),h="radial"===f?s:o;this.updateCSSRule(d,"fill","url(#"+h+")");break;case"pattern":var p="url(#"+r+")";this.updateCSSRule(d,"fill",p)}}},previewShapeGradientFill:function(e,t){var i=e.getValues(),l=e.node,n=e.preview,o=".fl-builder-"+n.position+"-edge-layer",s=l.find(o+" "+i.type+"Gradient"),r="url(#"+s.attr("id")+")",a=this._getPreviewSelector(this.classes.node,o+" .fl-shape");this.updateCSSRule(a,"fill",r);var d=s.find("stop");for(var u in i.stops){var c=i.stops[u],f=d.eq(u),h=c.color,p=c.stop,g=1;if(0===h.indexOf("rgba")){var m=h.substring(h.indexOf("(")+1,h.lastIndexOf(")")).split(/,\s*/);g=m.pop(),h="rgb("+m.join(",")+")"}f.attr("stop-color",FLBuilderPreview.formatColor(h)),f.attr("stop-opacity",g),f.attr("offset",p+"%")}if("linear"===i.type&&"undefined"!=typeof s[0]&&s[0].setAttribute("gradientTransform","rotate("+i.angle+" .5 .5 )"),"radial"===i.type){parts=i.position.split(" ");var b,v,_,L=parts[0],F=parts[1];switch(L){case"top":case"left":b=0;break;case"center":b=.5;break;case"bottom":case"right":b=1}switch(F){case"top":case"left":v=0;break;case"center":v=.5;break;case"bottom":case"right":v=1}_=.5,.5===b&&.5===v||(_=1),s.attr("cx",b),s.attr("cy",v),s.attr("r",_)}},previewShapeTransform:function(e,t){var i=(e.form,e.preview),l=(i.prefix,this._getPreviewSelector(this.classes.node,i.selector)),n=l+" > *",o=e.getValues(),s=[];Object.keys(o).map(function(e){var t=o[e],i="",l="";switch(e){case"scaleXSign":case"scaleYSign":return;case"scaleX":case"scaleY":t&&""!==t&&0!==t||(t="1"),l="scaleX"===e?o.scaleXSign:o.scaleYSign,t="invert"===l?-Math.abs(t):Math.abs(t),s.push(e+"("+t+")");break;case"translateX":case"translateY":t&&(i="px",s.push(e+"("+t+i+")"));break;case"skewX":case"skewY":t&&(i="deg",s.push(e+"("+t+i+")"));break;case"rotate":i="deg",""!==t&&"0"!==t&&s.push("rotate("+t+i+")")}}),this.updateCSSRule(n,"transform",s.join(" "))}}}(jQuery),function(e){var t={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^{]*{([\s\S]+?})\s*}/gi,empty:/@media[^{]*{([^{}]*?)}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,i.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var t=null,i=null,l=null,n=null,o=null,s=null,r=null,a=!1,d=0,u=0;d<document.styleSheets.length;d++)if(element=document.styleSheets[d].ownerNode,t=element.href,i=element.id,l=element.tagName.toLowerCase(),n=element.rel,o=element.media,s=t?t.split("?").shift():i?i:"style-"+d,r=!0,a=!1,"style"===l||t&&n&&"stylesheet"===n.toLowerCase()){for(u=0;u<this.ignored.length;u++)if(s.indexOf(this.ignored[u])>-1){a=!0;break}if(a)continue;for(u=0;u<this.reparsed.length;u++)if(s.indexOf(this.reparsed[u])>-1){this.sheets[s]=null;break}void 0!==this.sheets[s]&&this.sheets[s]||this.queue.push({docSheet:document.styleSheets[d],element:e(element),key:s,tagName:l,href:t,id:i,media:o})}return this.queue.length},runQueue:function(){var t;this.queue.length?(t=this.queue.shift(),"style"===t.tagName?(this.parse(t.element.html(),t),this.runQueue()):e.get(t.href,e.proxy(function(e){this.parse(e,t),this.runQueue()},this)).fail(this.runQueue.bind(this))):this.applyStyles()},parse:function(e,t){var i=this.regex,l=this.cleanStyles(e),n=l.match(i.media),o=n&&n.length||0,s=!o&&t.media,r=null,a=null,d=null,u="",c=0,f=0;for(n?u=l.replace(i.media,""):s&&"all"!=t.media?o=1:u=l,this.sheets[t.key]={docSheet:t.docSheet,element:t.element,key:t.key,tagName:t.tagName,href:t.href,id:t.id,all:u,queries:[]},c=0;c<o;c++)for(s?(r=t.media,l=this.convertURLs(l,t.href)):(r=n[c].match(i.findStyles)&&RegExp.$1,l=RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),a=r.split(","),f=0;f<a.length;f++)r=a[f],d=r.split("(")[0].match(i.only)&&RegExp.$2,"print"!=d&&(r.replace(i.minmaxwh,"").match(i.other)||this.sheets[t.key].queries.push({minw:r.match(i.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(i.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:l}))},applyStyles:function(){var t=e("head"),i={all:"",queries:[]},l=null,n=null,o=null,s=null,r=null,a=null,d=null,u=!1;this.clearStyles();for(o in this.sheets)if(n=this.sheets[o],n.queries.length&&this.width){for(i.all+=n.all,r=0;r<n.queries.length;r++)s=n.queries[r],a=s.minw,d=s.maxw,u=!1,a&&(a=parseFloat(a)*(a.indexOf("em")>-1?this.getEmPxValue():1),this.width>=a&&(i.queries.push({media:"min",width:a,styles:s.styles}),u=!0)),d&&!u&&(d=parseFloat(d)*(d.indexOf("em")>-1?this.getEmPxValue():1),this.width<=d&&i.queries.push({media:"max",width:d,styles:s.styles}));n.docSheet.disabled=!0}for(""!==i.all&&(l=e('<style class="fl-builder-media-query" data-query="all"></style>'),this.styles.push(l),t.append(l),l.html(i.all)),r=0;r<i.queries.length;r++)s=i.queries[r],l=e('<style class="fl-builder-media-query" data-query="'+s.media+'" data-value="'+s.width+'"></style>'),this.styles.push(l),t.append(l),l.html(s.styles);this.callback&&(this.callback(),this.callback=null)},clearStyles:function(){var e=null,t=this.styles.slice(0);this.styles=[];for(e in this.sheets)this.sheets[e].docSheet.disabled=!1;for(var i=0;i<t.length;i++)t[i].empty(),t[i].remove()},disableStyles:function(e){for(var t,i,l,n=0;n<this.styles.length;n++)t=this.styles[n],i=t.attr("data-query"),l=parseInt(t.attr("data-value")),"max"===i&&!isNaN(l)&&l<=e&&(this.styles[n][0].sheet.disabled=!0)},enableStyles:function(){for(var e=0;e<this.styles.length;e++)this.styles[e][0].sheet.disabled=!1,this.styles[e][0].sheet.disabled=!0,this.styles[e][0].sheet.disabled=!1},cleanStyles:function(e){var t=this.regex;return e.replace(t.comments,"").replace(t.keyframes,"").replace(t.empty,"")},convertURLs:function(e,t){return t?(t=t.substring(0,t.lastIndexOf("/")),t.length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")):e},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=null,t=window.document,i=t.documentElement,l=t.body,n=t.createElement("div"),o=i.style.fontSize,s=l&&l.style.fontSize,r=!1;return n.style.cssText="position:absolute;font-size:1em;width:1em",l||(l=r=t.createElement("body"),l.style.background="none"),i.style.fontSize="100%",l.style.fontSize="100%",l.appendChild(n),r&&i.insertBefore(l,i.firstChild),e=parseFloat(n.offsetWidth),r?i.removeChild(l):l.removeChild(n),i.style.fontSize=o,s?l.style.fontSize=s:l.style.fontSize="",this.emPxValue=e,e}},i={_functions:null,update:function(){var e;if(!this._functions){this._functions={};for(e in l)this._functions[e]=jQuery.fn[e]}if(t.width)for(e in l)jQuery.fn[e]=l[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},l={width:function(l){return void 0!=l?i._functions.width.call(this,l):e.isWindow(this[0])?t.width:i._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){t.ignore(e)},reparse:function(e){t.reparse(e)},update:function(e,i){t.update(e,i)},disableStyles:function(e){t.disableStyles(e)},enableStyles:function(){t.enableStyles()}}}(jQuery),function(e){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(t){var i;e(".fl-responsive-preview").length&&"default"!==this._mode?("responsive"==this._mode?(i=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)):"medium"==this._mode&&(i=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)),FLBuilder._resizeLayout()):t&&t()},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("endEditingSession",this._clearPreview),FLBuilder.addHook("didEnterRevisionPreview",this._clearPreview),FLBuilder.addHook("responsiveEditing",this._menuToggleClicked),FLBuilder.addHook("preview-init",this._switchAllSettingsToCurrentMode),FLBuilder.addHook("responsive-editing-switched",this._showSize),e("body").delegate(".fl-field-responsive-toggle","click",this._settingToggleClicked),e("body").delegate(".fl-responsive-preview-message button","click",this._previewToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,FLBuilderConfig.relativePluginUrl]),FLBuilderSimulateMediaQuery.ignore(FLBuilderConfig.responsiveIgnore),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css",FLBuilderConfig.postId+"-layout-draft-partial.css",FLBuilderConfig.postId+"-layout-preview.css",FLBuilderConfig.postId+"-layout-preview-partial.css",FLBuilderConfig.postId+"-inline-css","fl-builder-global-css","fl-builder-layout-css"])},_showSize:function(){var t=e(".fl-responsive-preview-message .size"),i="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,l="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,n="";e(".fl-responsive-preview").hasClass("fl-preview-responsive")?n=FLBuilderStrings.mobile+" "+l+"px":e(".fl-responsive-preview").hasClass("fl-preview-medium")&&(n=FLBuilderStrings.medium+" "+i+"px"),t.html("").html(n)},_switchTo:function(t,i){var l=e("html"),n=e("body"),o=e(FLBuilder._contentClass),s=e(".fl-responsive-preview"),r=e(".fl-responsive-preview-mask"),a=e(".fl-content-placeholder"),d=null;if(FLBuilderResponsiveEditing._mode=t,"default"==t){if(0===a.length)return;l.removeClass("fl-responsive-preview-enabled"),a.after(o),a.remove(),s.remove(),r.remove()}else 0===s.length?(l.addClass("fl-responsive-preview-enabled"),o.after('<div class="fl-content-placeholder"></div>'),n.prepend(wp.template("fl-responsive-preview")()),e(".fl-responsive-preview").addClass("fl-preview-"+t),e(".fl-responsive-preview-content").append(o)):(s.removeClass("fl-preview-responsive fl-preview-medium"),s.addClass("fl-preview-"+t));"responsive"==t?(d="1"!==FLBuilderConfig.global.responsive_preview&&FLBuilderConfig.global.responsive_breakpoint>=360?360:FLBuilderConfig.global.responsive_breakpoint,o.width(d),FLBuilderSimulateMediaQuery.update(d,i),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):"medium"==t?(d="1"!==FLBuilderConfig.global.responsive_preview&&FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,o.width(d),FLBuilderSimulateMediaQuery.update(d,i),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):(o.width(""),FLBuilderSimulateMediaQuery.update(null,i)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),this._previewFields(),FLBuilder.triggerHook("responsive-editing-switched",t)},_setContentBackgroundColor:function(){var t=e(FLBuilder._contentClass),i=e(".fl-responsive-preview"),l=e(".fl-content-placeholder"),n=l.parents(),o="#fff",s=0;if(0===i.length)t.css("background-color","");else{for(;s<n.length&&(o=n.eq(s).css("background-color"),"rgba(0, 0, 0, 0)"==o);s++);t.css("background-color",o)}},_switchToAndScroll:function(t){var i=e(".fl-builder-settings").data("node"),l=void 0===i?void 0:e(".fl-node-"+i);FLBuilderResponsiveEditing._switchTo(t,function(){if(void 0!==l&&l){var t=(e(window),e(".fl-responsive-preview-content"));t.length?(t.scrollTop(0),t.scrollTop(l.offset().top-150)):e("html, body").scrollTop(l.offset().top-100)}})},_switchAllSettingsTo:function(t){var i="dashicons-desktop dashicons-tablet dashicons-smartphone";e(".fl-field-responsive-toggle").removeClass(i),e(".fl-field-responsive-setting").hide(),i="default"==t?"dashicons-desktop":"medium"==t?"dashicons-tablet":"dashicons-smartphone",e(".fl-field-responsive-toggle").addClass(i).data("mode",t),e(".fl-field-responsive-setting-"+t).css("display","inline-block")},_switchAllSettingsToCurrentMode:function(){var e=FLBuilderResponsiveEditing;e._switchAllSettingsTo(e._mode),FLBuilder.triggerHook("responsive-editing-switched",e._mode)},_setMarginPaddingPlaceholders:function(){var t="#fl-field-padding .fl-field-responsive-setting-default",i={values:{top:e(t+' input[ name="padding_top" ]').val(),right:e(t+' input[ name="padding_right" ]').val(),bottom:e(t+' input[ name="padding_bottom" ]').val(),left:e(t+' input[ name="padding_left" ]').val()},placeholders:{top:e(t+' input[ name="padding_top" ]').attr("placeholder"),right:e(t+' input[ name="padding_right" ]').attr("placeholder"),bottom:e(t+' input[ name="padding_bottom" ]').attr("placeholder"),left:e(t+' input[ name="padding_left" ]').attr("placeholder")}},l="#fl-field-padding .fl-field-responsive-setting-medium",n={values:{top:e(l+' input[ name="padding_top_medium" ]').val(),right:e(l+' input[ name="padding_right_medium" ]').val(),bottom:e(l+' input[ name="padding_bottom_medium" ]').val(),left:e(l+' input[ name="padding_left_medium" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}},o="#fl-field-padding .fl-field-responsive-setting-responsive",s=({values:{top:e(l+' input[ name="padding_top_responsive" ]').val(),right:e(l+' input[ name="padding_right_responsive" ]').val(),bottom:e(l+' input[ name="padding_bottom_responsive" ]').val(),left:e(l+' input[ name="padding_left_responsive" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}},"#fl-field-margin .fl-field-responsive-setting-default"),r={values:{top:e(s+' input[ name="margin_top" ]').val(),right:e(s+' input[ name="margin_right" ]').val(),bottom:e(s+' input[ name="margin_bottom" ]').val(),left:e(s+' input[ name="margin_left" ]').val()},placeholders:{top:e(s+' input[ name="margin_top" ]').attr("placeholder"),right:e(s+' input[ name="margin_right" ]').attr("placeholder"),bottom:e(s+' input[ name="margin_bottom" ]').attr("placeholder"),left:e(s+' input[ name="margin_left" ]').attr("placeholder")}},a="#fl-field-margin .fl-field-responsive-setting-medium",d={values:{top:e(a+' input[ name="margin_top_medium" ]').val(),right:e(a+' input[ name="margin_right_medium" ]').val(),bottom:e(a+' input[ name="margin_bottom_medium" ]').val(),left:e(a+' input[ name="margin_left_medium" ]').val()},placeholders:{top:r.values.top?r.values.top:r.placeholders.top,right:r.values.right?r.values.right:r.placeholders.right,bottom:r.values.bottom?r.values.bottom:r.placeholders.bottom,left:r.values.left?r.values.left:r.placeholders.left}},u="#fl-field-margin .fl-field-responsive-setting-responsive";({values:{top:e(u+' input[ name="margin_top_responsive" ]').val(),right:e(u+' input[ name="margin_right_responsive" ]').val(),bottom:e(u+' input[ name="margin_bottom_responsive" ]').val(),left:e(u+' input[ name="margin_left_responsive" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}});""!=i.values.top?e(l+' input[ name="padding_top_medium"] ').attr("placeholder",i.values.top):e(l+' input[ name="padding_top_medium"] ').attr("placeholder",i.placeholders.top),""!=i.values.right?e(l+' input[ name="padding_right_medium"] ').attr("placeholder",i.values.right):e(l+' input[ name="padding_right_medium"] ').attr("placeholder",i.placeholders.right),""!=i.values.bottom?e(l+' input[ name="padding_bottom_medium"] ').attr("placeholder",i.values.bottom):e(l+' input[ name="padding_bottom_medium"] ').attr("placeholder",i.placeholders.bottom),""!=i.values.left?e(l+' input[ name="padding_left_medium"] ').attr("placeholder",i.values.left):e(l+' input[ name="padding_left_medium"] ').attr("placeholder",i.placeholders.left),""!=n.values.top?e(o+' input[ name="padding_top_responsive"] ').attr("placeholder",n.values.top):""!=i.values.top?e(o+' input[ name="padding_top_responsive"] ').attr("placeholder",i.values.top):e(o+' input[ name="padding_top_responsive"] ').attr("placeholder",i.placeholders.top),""!=n.values.right?e(o+' input[ name="padding_right_responsive"] ').attr("placeholder",n.values.right):""!=i.values.right?e(o+' input[ name="padding_right_responsive"] ').attr("placeholder",i.values.right):e(o+' input[ name="padding_right_responsive"] ').attr("placeholder",i.placeholders.right),""!=n.values.bottom?e(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",n.values.bottom):""!=i.values.bottom?e(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",i.values.bottom):e(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",i.placeholders.bottom),""!=n.values.left?e(o+' input[ name="padding_left_responsive"] ').attr("placeholder",n.values.left):""!=i.values.left?e(o+' input[ name="padding_left_responsive"] ').attr("placeholder",i.values.left):e(o+' input[ name="padding_left_responsive"] ').attr("placeholder",i.placeholders.left),""!=r.values.top?e(a+' input[ name="margin_top_medium" ]').attr("placeholder",r.values.top):e(a+' input[ name="margin_top_medium" ]').attr("placeholder",r.placeholders.top),""!=r.values.right?e(a+' input[ name="margin_right_medium" ]').attr("placeholder",r.values.right):e(a+' input[ name="margin_right_medium" ]').attr("placeholder",r.placeholders.right),""!=r.values.bottom?e(a+' input[ name="margin_bottom_medium" ]').attr("placeholder",r.values.bottom):e(a+' input[ name="margin_bottom_medium" ]').attr("placeholder",r.placeholders.bottom),""!=r.values.left?e(a+' input[ name="margin_left_medium" ]').attr("placeholder",r.values.left):e(a+' input[ name="margin_left_medium" ]').attr("placeholder",r.placeholders.left),""!=d.values.top?e(u+' input[ name="margin_top_responsive" ]').attr("placeholder",d.values.top):""!=r.values.top?e(u+' input[ name="margin_top_responsive" ]').attr("placeholder",r.values.top):e(u+' input[ name="margin_top_responsive" ]').attr("placeholder",r.placeholders.top),""!=d.values.right?e(u+' input[ name="margin_right_responsive" ]').attr("placeholder",d.values.right):""!=r.values.right?e(u+' input[ name="margin_right_responsive" ]').attr("placeholder",r.values.right):e(u+' input[ name="margin_right_responsive" ]').attr("placeholder",r.placeholders.right),""!=d.values.bottom?e(u+' input[ name="margin_bottom_responsive" ]').attr("placeholder",d.values.bottom):""!=r.values.bottom?e(u+' input[ name="margin_bottom_responsive" ]').attr("placeholder",r.values.bottom):e(u+' input[ name="margin_bottom_responsive" ]').attr("placeholder",r.placeholders.bottom),""!=d.values.left?e(u+' input[ name="margin_left_responsive" ]').attr("placeholder",d.values.left):""!=r.values.left?e(u+' input[ name="margin_left_responsive" ]').attr("placeholder",r.values.left):e(u+' input[ name="margin_left_responsive" ]').attr("placeholder",r.placeholders.left)},_settingToggleClicked:function(){var t=e(this),i=t.data("mode");i="default"==i?"medium":"medium"==i?"responsive":"default",FLBuilderResponsiveEditing._switchAllSettingsTo(i),FLBuilderResponsiveEditing._switchToAndScroll(i),t.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_menuToggleClicked:function(){var e=FLBuilderResponsiveEditing._mode;e="default"==e?"medium":"medium"==e?"responsive":"default",FLBuilder.MainMenu.hide(),FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_previewToggleClicked:function(){var t=e(this).data("mode");FLBuilderResponsiveEditing._switchAllSettingsTo(t),FLBuilderResponsiveEditing._switchToAndScroll(t)},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_previewFields:function(){var t=FLBuilderResponsiveEditing._mode,i=e(".fl-builder-settings:visible");0!==i.length&&void 0!==i.attr("data-node")&&(FLBuilder.triggerHook("responsive-editing-before-preview-fields",t),i.find(".fl-builder-settings-tab").each(function(){var i=e(this);i.css("display","block"),i.find(".fl-field-responsive-setting-"+t+":visible").each(function(){var i=e(this),l=i.closest(".fl-field"),n=l.data("type"),o=l.data("preview"),s=l.find(".fl-field-connection-visible").length;"refresh"!=o.type&&(s?"photo"===n&&"default"!==t&&i.find(".fl-photo-remove").trigger("click"):(i.find("input").trigger("keyup"),i.find("select").trigger("change")))}),i.css("display","")}),FLBuilder.triggerHook("responsive-editing-after-preview-fields",t))}},e(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(e){FLBuilderResponsivePreview={enter:function(){this.render()},exit:function(){this.destroy()},switchTo:function(t){var i=FLBuilderConfig.global,l=e("#fl-builder-preview-frame"),n="100%";"responsive"==t?(n="1"!==i.responsive_preview&&i.responsive_breakpoint>=360?360:i.responsive_breakpoint,l.width(n)):"medium"==t&&(n="1"!==i.responsive_preview&&i.medium_breakpoint>=769?769:i.medium_breakpoint,l.width(n)),l.width(n)},render:function(){var t=e("body"),i=FLBuilderConfig.previewUrl,l=e("#fl-builder-preview-mask, #fl-builder-preview-frame"),n=e('<div id="fl-builder-preview-mask"></div>'),o=e('<iframe id="fl-builder-preview-frame" src="'+i+'"></iframe>');l.remove(),t.append(n),t.append(o),t.css("overflow","hidden")},_showSize:function(t){var i=e(".fl-builder--preview-actions .size"),l="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,n="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,o="";"responsive"===t?o=FLBuilderStrings.mobile+" "+n+"px":"medium"===t&&(o=FLBuilderStrings.medium+" "+l+"px"),i.html("").html(o)},destroy:function(){e("#fl-builder-preview-mask, #fl-builder-preview-frame").remove(),e("body").css("overflow","visible"),e(".fl-builder--preview-actions .size").html("")}}}(jQuery),function(e){var t={init:function(){var t=e("body");t.delegate(".fl-builder-service-select","change",this._serviceChange),t.delegate(".fl-builder-service-connect-button","click",this._connectClicked),t.delegate(".fl-builder-service-account-select","change",this._accountChange),t.delegate(".fl-builder-service-account-delete","click",this._accountDeleteClicked),t.delegate(".fl-builder-campaign-monitor-client-select","change",this._campaignMonitorClientChange),t.delegate(".fl-builder-mailchimp-list-select","change",this._mailChimpListChange),t.delegate(".fl-builder-activecampaign-list_type-select","change",this._activeCampaignChange)},_startSettingsLoading:function(t){var i=e(".fl-builder-settings"),l=t.closest(".fl-builder-service-settings"),n=e(".fl-builder-service-error");i.append('<div class="fl-builder-loading"></div>'),l.addClass("fl-builder-service-settings-loading"),n.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),i=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),i.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this),n=l.closest("tr"),o=l.val();n.siblings("tr.fl-builder-service-account-row").remove(),n.siblings("tr.fl-builder-service-connect-row").remove(),n.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==o&&(t._startSettingsLoading(l),FLBuilder.ajax({action:"render_service_settings",node_id:i,service:o},t._serviceChangeComplete))},_serviceChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-select-row");o.after(l.html),t._addAccountDelete(n),t._finishSettingsLoading()},_connectClicked:function(){for(var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-connect-row"),s=l.find(".fl-builder-service-connect-input"),r=null,a=null,d=0,u={action:"connect_service",node_id:i,service:n.val(),fields:{}};d<s.length;d++)r=s.eq(d),a=r.attr("name"),u.fields[a]=r.val();o.hide(),t._startSettingsLoading(n),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-select-row"),s=n.find(".fl-builder-service-select"),r=n.find(".fl-builder-service-account-row"),a=n.find(".fl-builder-service-account-select"),d=n.find(".fl-builder-service-connect-row");l.error?(d.show(),0===a.length?s.after('<div class="fl-builder-service-error">'+l.error+"</div>"):a.after('<div class="fl-builder-service-error">'+l.error+"</div>")):(d.remove(),r.remove(),o.after(l.html)),t._addAccountDelete(n),t._finishSettingsLoading()},_accountChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=l.find(".fl-builder-service-connect-row"),r=l.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=o.val(),u=null;s.remove(),r.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:i,service:n.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:i,service:n.val(),account:d}),u&&(t._startSettingsLoading(n),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(l)},_accountChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-account-row");o.after(l.html),t._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");t.length>0&&(e.find(".fl-builder-service-account-delete").remove(),""!==t.val()&&"add_new_account"!=t.val()&&t.after('<a href="javascript:void(0);" class="fl-builder-service-account-delete">'+FLBuilderStrings.deleteAccount+"</a>"))},_accountDeleteClicked:function(){var i=e(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),n=i.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:l.val(),account:n.val()},t._accountDeleteComplete),t._startSettingsLoading(n))},_accountDeleteComplete:function(){var i=e(".fl-builder-service-settings-loading"),l=i.find(".fl-builder-service-select");t._finishSettingsLoading(),l.trigger("change")},_campaignMonitorClientChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=e(this),r=l.find(".fl-builder-service-list-select"),a=s.val();0!==r.length&&r.closest("tr").remove(),""!==a&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:o.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-campaign-monitor-client-select");o.closest("tr").after(l.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=l.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==s.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:o.val(),list_id:s.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-list-select");o.closest("tr").after(l.html),t._finishSettingsLoading();
9
+ },_activeCampaignChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),s=l.find(".fl-builder-service-list-select");list_type=l.find('select[name="list_type"]'),0!==s.length&&s.closest("tr").remove(),""!==list_type.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:o.val(),list_type:list_type.val()},t._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),o=n.find(".fl-builder-service-field-row");o.after(l.html),t._finishSettingsLoading()}};e(function(){t.init()})}(jQuery),function(e){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var t={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fas fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),e(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),e(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-bar-title",placement:"bottom",title:FLBuilderStrings.tourToolsButtonTitle,content:FLBuilderStrings.tourToolsButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-done-button",placement:"bottom",title:FLBuilderStrings.tourDoneButtonTitle,content:FLBuilderStrings.tourDoneButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,orphan:!0,backdrop:!0,title:FLBuilderStrings.tourFinishedTitle,content:FLBuilderStrings.tourFinished,template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <i class="fas fa-times" data-role="end"></i> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="end">'+FLBuilderStrings.tourEnd+"</button> </div> </div>"}]};return"disabled"==FLBuilderConfig.enabledTemplates?t.steps.shift():"fl-builder-template"==FLBuilderConfig.postType&&t.steps.shift(),t},_onStart:function(){var t=e("body");t.scrollTop(0),t.append('<div class="fl-builder-tour-mask"></div>'),"module"!=FLBuilderConfig.userTemplateType&&(0===e(".fl-row").length?(e(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-builder-tour-placeholder-content fl-row fl-row-full-width fl-row-bg-none"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-fixed-width fl-node-content"> <div class="fl-col-group"> <div class="fl-col" style="width: 100%;"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text" data-type="rich-text" data-name="Text Editor"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque ut lorem non cursus. Sed mauris nunc, porttitor iaculis lorem a, sollicitudin lacinia sapien. Proin euismod orci lacus, et sollicitudin leo posuere ac. In hac habitasse platea dictumst. Maecenas elit magna, consequat in turpis suscipit, ultrices rhoncus arcu. Phasellus finibus sapien nec elit tempus venenatis. Maecenas tincidunt sapien non libero maximus, in aliquam felis tincidunt. Mauris mollis ultricies facilisis. Duis condimentum dignissim tortor sit amet facilisis. Aenean gravida lacus eu risus molestie egestas. Donec ut dolor dictum, fringilla metus malesuada, viverra nunc. Maecenas ut purus ac justo aliquet lacinia. Cras vestibulum elementum tincidunt. Maecenas mattis tortor neque, consectetur dignissim neque tempor nec.</p> </div> </div> </div> </div> </div> </div> </div> </div></div>'),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols()):e(".fl-row").eq(0).addClass("fl-builder-tour-demo-content"))},_onPrev:function(){e(".fl-builder-tour-dimmed").remove()},_onNext:function(){e(".fl-builder-tour-dimmed").remove()},_onEnd:function(){e("body").off("fl-builder.template-selector-loaded"),e(".fl-builder-tour-mask").remove(),e(".fl-builder-tour-dimmed").remove(),e(".fl-builder-tour-placeholder-content").remove(),e(".fl-builder-tour-demo-content").removeClass("fl-builder-tour-demo-content"),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(t){e(t).find(".fl-builder-tour-dimmed").remove(),e(t).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(e,t){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;var l=i.indexOf(e,t);return l!==-1&&l===t}),e.fn.textWidth=function(t,i){return e.fn.textWidth.fakeEl||(e.fn.textWidth.fakeEl=e("<span>").hide().appendTo(document.body)),e.fn.textWidth.fakeEl.text(t||this.val()||this.text()).css("font",i||this.css("font")),e.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(t){var i=Object.create(this);return i=e.extend(i,t),e(this).trigger("onCreate"),i}},e.fn.switchClass=function(t,i){return this.each(function(){return e(this).removeClass(function(e,i){var l=[],n=i.split(" ");for(var e in n)n[e].startsWith(t)&&l.push(n[e]);return l.join(" ")}),e(this).addClass(t+i)})};var i={init:function(){t.addHook("cancelTask",this.onCancelTask.bind(this)),t.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),t.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),t.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),t.addHook("endEditingSession",this.onEndEditingSession.bind(this)),t.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(t,i,l){var n=e.proxy(this,"onTriggerKey",t);l?Mousetrap.bindGlobal(i,n):Mousetrap.bind(i,n)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){this.reset();for(var e in FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,i){t.triggerHook(e),i.preventDefault?i.preventDefault():i.returnValue=!1},onCancelTask:function(){return n.isPreviewing?void n.endPreview():l.isShowing?void l.hide():t.ContentPanel.isShowing?void t.ContentPanel.hide():void 0},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){if("Builder"in FL&&"data"in FL.Builder){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!1)}document.documentElement.classList.remove("fl-builder-assistant-visible"),this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){if("Builder"in FL&&"data"in FL.Builder){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!0)}const t=FL.Builder.data.getSystemState().currentPanel;"assistant"===t&&document.documentElement.classList.add("fl-builder-assistant-visible"),this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){if(t.SaveManager.layoutNeedsPublish()){var e=FLBuilderStrings.savedStatus.hasAlreadySaved;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}else{var e=FLBuilderStrings.savedStatus.nothingToSave;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}},onNextPrevTabShortcut:function(i,l){var n,o,s=e(".fl-lightbox:visible"),r=s.find(".fl-builder-settings-tabs a");s.length>0&&(n=r.filter("a.fl-active"),o="next"==i?n.is(r.last())?r.first():n.next("a"):n.is(r.first())?r.last():n.prev("a"),o.trigger("click")),t._calculateSettingsTabsOverflow(),l.preventDefault()}},l=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=e(".fl-builder-publish-actions"),this.$defaultBarButtons=e(".fl-builder-bar-actions"),this.$clickAwayMask=e(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click touchend",this.onActionClicked.bind(this)),t.addHook("triggerDone",this.onDoneTriggered.bind(this));var i=this.hide.bind(this);t.addHook("cancelPublishActions",i),t.addHook("endEditingSession",i),this.$clickAwayMask.on("click",i)},onDoneTriggered:function(){t.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?t._exit():t._exitWithoutRefresh()},show:function(){this.isShowing||t._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,t.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(i){var l=e(i.currentTarget).data("action");switch(l){case"dismiss":this.hide();break;case"discard":this.hide(),n.muteToolbar(),t._discardButtonClicked();break;case"publish":this.hide(),n.muteToolbar(),t._publishButtonClicked(),t._destroyOverlayEvents();break;case"draft":this.hide(),n.muteToolbar(),t._draftButtonClicked();break;default:this.hide(),n.muteToolbar(),t._draftButtonClicked()}t.triggerHook(l+"ButtonClicked")}}),n={isPreviewing:!1,init:function(){this.$el=e("body"),this.$mainToolbar=e(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=e("#wpadminbar"),this.$endPreviewBtn=e(".fl-builder--preview-actions .end-preview-btn"),t.addHook("endEditingSession",this.endEditingSession.bind(this)),t.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=e(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this));var i=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a");i.on("click",this.onClickPageBuilderToolbarLink.bind(this)),e("#wpadminbar a").attr("tabindex","-1");var l=this.restartEditingSession.bind(this);t.addHook("restartEditingSession",l),t.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),t.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),t.addHook("didEnterRevisionPreview",this.hide.bind(this)),t.addHook("didExitRevisionPreview",this.show.bind(this)),t.addHook("didPublishLayout",this.onPublish.bind(this))},endEditingSession:function(){t._destroyOverlayEvents(),t._removeAllOverlays(),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t._unbindEvents(),e("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),e("body").removeClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex",null),e(t._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(i){t._initTemplateSelector(),t._bindOverlayEvents(),t._highlightEmptyCols(),t._rebindEvents(),e("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),e("body").addClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex","-1"),e(t._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),i.preventDefault()},onClickPageBuilderToolbarLink:function(e){t.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){var e=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span");e.css("color","#6bc373")},hide:function(){e("html").hasClass("fl-builder-edit")&&(t._unbindEvents(),t._destroyOverlayEvents(),t._removeAllOverlays(),e("html").removeClass("fl-builder-edit"),e("body").removeClass("admin-bar"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init(),t.triggerHook("didHideEditingUI"))},show:function(){e("html").hasClass("fl-builder-edit")||(t._rebindEvents(),t._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),e("html").addClass("fl-builder-edit"),e("body").addClass("admin-bar"),t.triggerHook("didShowEditingUI"))},beginPreview:function(){t._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),e("html").addClass("fl-builder-preview"),e("html, body").removeClass("fl-builder-edit"),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t.triggerHook("didBeginPreview"),FLBuilderResponsivePreview.enter())},endPreview:function(){this.isPreviewing=!1,this.show(),t._highlightEmptyCols(),FLBuilderResponsivePreview.exit(),e("html").removeClass("fl-builder-preview"),e("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),e("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),e("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(t){var i=e(t.target).data("mode");FLBuilderResponsivePreview.switchTo(i),FLBuilderResponsivePreview._showSize(i)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),t._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},o={isEditing:!0,init:function(){history.pushState&&(t.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),t.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url),this.isEditing=!1}},s={$row:null,$rowContent:null,row:null,drag:{},init:function(){if(this.userCanResize()){var i=e(t._contentClass);i.delegate(".fl-row","mouseenter touchstart",this.onDragHandleHover.bind(this)),i.delegate(".fl-block-row-resize","mousedown touchstart",this.onDragHandleDown.bind(this))}},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(t){if(!this.drag.isDragging){var i=this,l=e(t.target),n=l.closest(".fl-row"),o=n.data("node"),s=e(".fl-builder-row-settings[data-node="+o+"]"),r=s.find("[name=max_content_width_unit]"),a="px";i.onSettingsReady(o,function(t){r.length?a=r.length:"undefined"!=typeof t&&(a=t.max_content_width_unit),i.$row=n,i.$rowContent=i.$row.find(".fl-row-content"),i.row={node:o,form:s,unit:a,isFixedWidth:i.$row.hasClass("fl-row-fixed-width"),parentWidth:"vw"===a?e(window).width():i.$row.parent().width()},i.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},i.row.isFixedWidth?i.drag.originalWidth=i.$row.width():i.drag.originalWidth=i.$rowContent.width(),i.dragInit()})}},onSettingsReady:function(e,t){var i="undefined"!=typeof FLBuilderSettingsConfig.nodes?FLBuilderSettingsConfig.nodes:null;null!==i&&"undefined"!=typeof i[e]?(t(i[e]),null!=s._mouseEnterTimeout&&(clearTimeout(s._mouseEnterTimeout),s._mouseEnterTimeout=null)):(clearTimeout(s._mouseEnterTimeout),s._mouseEnterTimeout=setTimeout(this.onSettingsReady.bind(this),350,e,t))},onDragHandleDown:function(){e("body").addClass("fl-builder-row-resizing"),null!=s._mouseEnterTimeout&&(clearTimeout(s._mouseEnterTimeout),s._mouseEnterTimeout=null)},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(i,l){var n=e("body"),o=e(l.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),o.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=o.find(".fl-block-col-resize-feedback-left")),o.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=o.find(".fl-block-col-resize-feedback-right")),n.addClass("fl-builder-row-resizing"),t._colResizing=!0,t._destroyOverlayEvents(),t._closePanel()},dragging:function(e,t){var i=t.position.left,l=t.originalPosition.left,n=this.drag.originalWidth,o=0,s=this.drag.edge,r=FLBuilderConfig.rowResize.minAllowedWidth,a=FLBuilderConfig.rowResize.maxAllowedWidth;l!==i&&(FLBuilderConfig.isRtl&&(s="w"==s?"e":"w"),l>i?"w"===s?this.drag.operation="+":this.drag.operation="-":"e"===s?this.drag.operation="+":this.drag.operation="-",o=Math.abs(l-i),"+"===this.drag.operation?this.drag.calculatedWidth=n+2*o:this.drag.calculatedWidth=n-2*o,!1!==r&&this.drag.calculatedWidth<r&&(this.drag.calculatedWidth=r),!1!==a&&this.drag.calculatedWidth>a&&(this.drag.calculatedWidth=a),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),"px"!==this.row.unit&&(this.drag.calculatedWidth=Math.round(this.drag.calculatedWidth/this.row.parentWidth*100)),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+this.row.unit).show(),this.row.form.length&&this.row.form.find("[name=max_content_width]").val(this.drag.calculatedWidth))},dragStop:function(i,l){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();var n={action:"resize_row_content",node:this.row.node,width:this.drag.calculatedWidth},o=e("body");t.ajax(n),t._bindOverlayEvents(),o.removeClass("fl-builder-row-resizing"),e(".fl-block-overlay").each(function(){t._buildOverlayOverflowMenu(e(this))}),setTimeout(function(){t._colResizing=!1},50),t.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},r={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips();var e=this.$el.find(".fl-builder-content-panel-button");e.on("click",t._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",t._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",t._upgradeClicked),this.$el.find("#fl-builder-toggle-notifications").on("click",this.onNotificationsButtonClicked.bind(this)),t.addHook("notificationsLoaded",this.onNotificationsLoaded.bind(this))},render:function(t){var i=e(this.template(t));this.$el=i,this.el=i.get(0),n.$mainToolbar=this.$el,e("body").prepend(i),e("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),e(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})},onNotificationsButtonClicked:function(){t.triggerHook("toggleNotifications")},onNotificationsLoaded:function(){e("body").removeClass("fl-builder-has-new-notifications");var i={action:"fl_builder_notifications",read:!0};t.ajax(i)}};e(function(){t.ContentPanel.init(),FLBuilderConfig.simpleUi||t.MainMenu.init(),FLBuilderConfig.showToolbar?(r.init(),t.ContentPanel.alignPanelArrow()):e("html").addClass("fl-builder-no-toolbar"),i.init(),n.init(),o.init(),s.init(),l.init(),t.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing"),this.isShowing=!0},hide:function(){this.$el.removeClass("is-showing"),this.isShowing=!1},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),l=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){this.template=wp.template(this.templateName),e("body").prepend(this.template(this)),this.$el=e(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html("");for(var i in FLBuilderConfig.mainMenu)this.renderPanel(i);e("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=e(".fl-builder-bar-title"),e("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var l=this.hide.bind(this);t.addHook("didShowPublishActions",l),t.addHook("didBeginSearch",l),t.addHook("didBeginPreview",l),t.addHook("didShowContentPanel",l),t.addHook("endEditingSession",l),t.addHook("didFocusSearchBox",l),t.addHook("didEnterRevisionPreview",l),t.addHook("didFailSettingsSave",l),t.addHook("showKeyboardShortcuts",l),this.$mask=e(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",l),n.init(),o.init()},renderPanel:function(t){var l,n,o,s=this.views[t];l=FLBuilderConfig.mainMenu[t],l.handle=t,n=i.create(l),n.init(),o=e(n.render()),n.$el=o,e(".fl-builder--main-menu-panel-views").append(o),n.bindEvents(),n.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),"undefined"!=typeof s&&(s.$el.remove(),s.isShowing&&(this.currentView=n,n.show())),n.isRootView&&(this.rootView=n,this.currentView=n),this.views[t]=n},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),t.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(i){var l=e(i.currentTarget),n=l.data("type");switch(n){case"view":var o=l.data("view");this.goToView(o);break;case"event":var s=l.data("event");t.triggerHook(s,l);break;case"link":}},goToView:function(e){var t=this.currentView,i=this.views[e];t.transitionOut(),i.transitionIn(),this.currentView=i,this.viewNavigationStack.push(t)},goToPreviousView:function(){var t=this.currentView,i=this.viewNavigationStack.pop();t.transitionOut(!0),i.transitionIn(!0),this.currentView=i,e(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}});t.MainMenu=l;var n={init:function(){if(t.addHook("saveTemplate",this.saveTemplate.bind(this)),t.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),t.addHook("duplicateLayout",this.duplicateLayout.bind(this)),t.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),t.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),t.addHook("toggleUISkin",this.toggleUISkin.bind(this)),t.addHook("clearLayoutCache",this.clearLayoutCache.bind(this)),t.addHook("launchThemerLayouts",this.launchThemerLayouts.bind(this)),"FL"in window&&"Builder"in FL){var e=FL.Builder.data.getSystemActions();t.addHook("showKeyboardShortcuts",function(){e.setShouldShowShortcuts(!0)})}},saveTemplate:function(){t._saveUserTemplateClicked(),l.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),l.hide()},duplicateLayout:function(){t._duplicateLayoutClicked(),l.hide()},showGlobalSettings:function(){t._globalSettingsClicked(),l.hide()},showLayoutSettings:function(){t._layoutSettingsClicked(),l.hide()},clearLayoutCache:function(){t.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),t.showAjaxLoader(),l.hide()},toggleUISkin:function(i){e('a[data-event="toggleUISkin"]');if(e("body").hasClass("fl-builder-ui-skin--light"))var l="light",n="dark";if(e("body").hasClass("fl-builder-ui-skin--dark"))var l="dark",n="light";if(e("body").removeClass("fl-builder-ui-skin--"+l).addClass("fl-builder-ui-skin--"+n),"Builder"in FL&&"data"in FL.Builder){var o=FL.Builder.data.getSystemActions();o.setColorScheme(n)}t.ajax({action:"save_ui_skin",skin_name:n})},launchThemerLayouts:function(){FLBuilderConfig.lite?t._showProMessage("Themer Layouts"):window.open(FLBuilderConfig.themerLayoutsUrl),l.hide()}},o={init:function(){t.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),l.hide()}}}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(i){this.categorySelector=a.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),e(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));i.views;if(this.initViews(i.views),0===Object.keys(this.views).length){var l={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"};this.addView(l)}if(!this.activeView){var n=Object.keys(this.views)[0],l=this.views[n];this.activeView=l}this.defaultView=this.activeView,e(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),e(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),t.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){var i=e[t];this.categorySelector.addItem(i),"separator"!==i.type&&this.addView(i)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=n;break;case"rows":t=o;break;case"templates":t=s;break;case"saved":t=r;break;default:t=l}_.isNull(this.viewController)||_.isUndefined(this.viewController)||(t=window[this.viewController]);var i=t.create(e),a=i.handle;i.init(),this.views[a]=i,i.isShowing&&(this.activeView=i)},renderView:function(e){if(this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),_.isObject(e))var i=e;else var i=this.views[e];if(_.isObject(i)&&_.isFunction(i.render)){var l=i.render();this.$el.find(".fl-nanoscroller-content").html(l),this.activeView=i,t._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0)}},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){e(this.activeView).trigger("onBeforeShow"),this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e=this.panel.$groupSelect,t=this.panel.$el.find(".fl-builder-panel-search");if(this.isSearchEnabled?t.show():t.hide(),Object.keys(this.views).length>1&&!_.isUndefined(this.categorySelector)){var i=this.categorySelector.render();this.panel.$el.find(".fl-builder-content-group-select");e.html(i),e.show(),this.panel.$el.removeClass("single-view")}else e.hide(),t.hide(),this.panel.$el.addClass("single-view")},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=t.Search.byQuery(this.query)),e},render:function(){e(this).trigger("beforeRender");var t=this;t=this.filterTemplateData(t);var i=e(this.template(t));return this.$el=i,e(this).trigger("afterRender"),i},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),n=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),o=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),s=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=e(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(t){var i=e(t.currentTarget),l=i.val(),n=i.siblings("button");""!==l?n.show():n.hide()},onSaveButtonClick:function(i){var l=e(i.currentTarget),n=l.siblings('input[name="template-name"]').val(),o=l.siblings('input[name="template-category"]').val(),s={
10
  name:n,category:o};""!==n&&t.ajax({action:"save_user_template",settings:s},t._saveUserTemplateSettingsComplete)},onTemplateClick:function(i){var l=e(i.currentTarget),n=l.data("id"),o=l.data("type"),s=l.data("premium");FLBuilderConfig.lite&&s?t._showProMessage(l.find(".fl-builder--template-name").text()):t._requestTemplateInsert(n,o)}}),r=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=t.Search.byQuery({kind:"template",type:"user",content:["module","column","row"]}),e}}),a=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var t=e(this.template(this));return this.$el=t,e(this).trigger("afterRender"),t},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t;t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle,this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(t){var i=e(t.target),l=i.data("view");if(i.hasClass("fl-has-children")){var n=e('[data-parent="'+l+'"]');n.is(":visible")?(this.items[l].hasChildrenOpen=!1,i.removeClass("fl-has-children-showing"),n.hide()):(this.items[l].hasChildrenOpen=!0,i.addClass("fl-has-children-showing"),n.show()),i.blur()}else e(this).trigger("categorySelected",l)}});t.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e=FLBuilderConfig.panelData.tabs;for(var l in e){var n=e[l];if(s=i.create(n),s.panel=this,s.views={},s.init(n),this.tabs[l]=s,s.isShowing&&(this.activeTab=s),!this.activeTab){var o=Object.keys(this.tabs)[0],s=this.tabs[o];s.isShowing=!0,this.activeTab=s}}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),t.triggerHook("contentPanelDidInit")}},render:function(){e("body").prepend(this.template(this)),this.$el=e(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),e(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),t.addHook("showContentPanel",this.show.bind(this)),t.addHook("showModules",this.show.bind(this,"modules")),t.addHook("showRows",this.show.bind(this,"rows")),t.addHook("showTemplates",this.show.bind(this,"templates")),t.addHook("showSaved",this.show.bind(this,"saved")),t.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this);t.addHook("hideContentPanel",e),t.addHook("didShowLightbox",e),t.addHook("didShowPublishActions",e),t.addHook("didBeginSearch",e),t.addHook("didInitDrag",e),t.addHook("didOpenMainMenu",e),t.addHook("didApplyTemplate",e);var i=this.toggleShowHide.bind(this);t.addHook("toggleContentPanel",i),t.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var t,i,l=this.$el,n=null,o=this.$el.find(".fl-builder--panel-arrow"),s=e(".fl-builder-content-panel-button"),r=this.$el.css("animation-duration");if(0!=s.length){this.$el.css("animation-duration","0s"),this.show(),n=l[0].getBoundingClientRect(),t=o[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",r);var a=s[0].getBoundingClientRect(),d=a.x+a.width/2;i=d<n.x?20:d-n.x-t.width/2,o.css({right:"auto",left:i+"px"})}},show:function(i){if("module"!==FLBuilderConfig.userTemplateType&&!FLBuilderConfig.simpleUi&&(t.triggerHook("willShowContentPanel"),"undefined"!=typeof i&&this.showTab(i),!this.isShowing&&t._triggerSettingsSave(!1,!0)&&(e("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,e(this).trigger("onShow"),t.triggerHook("didShowContentPanel"),"Builder"in FL&&"data"in FL.Builder))){const l=FL.Builder.data.getSystemActions();l.hideCurrentPanel()}},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(e("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,e(this).trigger("onHide"),t.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(t){var i=this.tabs[t];_.isObject(i)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),i.show(),this.$tabs.filter('[data-tab="'+i.handle+'"]').addClass("is-showing"),this.activeTab=i,e(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(t){e(t.currentTarget).blur()},onTabItemClick:function(t){var i=e(t.target),l=i.data("tab");this.showTab(l)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),e(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),e(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),e(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var i=this.$searchInput.val();if(""!==i){var l=t.Search.byTerm(i);""!=l.term?this.showSearchResults(l):this.hideSearchResults()}else this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(i){if(i.total>0){var l=e(this.renderSearchResults(i));this.$searchPanel.html(l),t._initSortables()}else{var l=e(this.renderNoResults(i));this.$searchPanel.html(l)}e("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){e("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(e){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(t,i){var l=FLBuilderSettingsConfig.forms,n=FLBuilderSettingsConfig.modules,o={type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],activeTab:null,buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null,messages:null};if(t.nodeId&&!t.settings)return void this.loadNodeSettings(t,i);if(t=e.extend(o,t),i=void 0===i?function(){}:i,t.id){if("general"===t.type&&void 0!==l[t.id])t=e.extend(!0,t,l[t.id]);else{if("module"!==t.type||void 0===n[t.id])return;t=e.extend(!0,t,n[t.id])}if(this.config=t,this.renderLightbox(t)&&(t.legacy||!this.renderLegacySettings(t,i)?this.renderComplete(t,i):this.showLightboxLoader()),"Builder"in FL&&"data"in FL.Builder){const s=FL.Builder.data.getSystemActions();s.hideCurrentPanel()}}},loadNodeSettings:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"get_node_settings",node_id:e.nodeId},function(i){e.settings=FLBuilder._jsonParse(i),FLBuilderSettingsConfig.nodes[e.nodeId]=e.settings,FLBuilderSettingsForms.render(e,t),FLBuilder.hideAjaxLoader()})},renderLightbox:function(t){var i=wp.template("fl-builder-settings"),l=FLBuilder._lightbox._node.find("form.fl-builder-settings"),n=(e(".fl-lightbox-wrap[data-parent]"),localStorage.getItem("fl-builder-settings-tab"));if(t.nodeId&&t.nodeId===l.data("node")&&!t.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(t.hide)return!0;if(n)for(var o in t.tabs)o===n.replace("fl-builder-settings-tab-","")&&(t.activeTab=o);if(t.activeTab||(t.activeTab=Object.keys(t.tabs).shift()),t.lightbox)t.lightbox.setContent(i(t));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(i(t))}return!0},renderComplete:function(t,i){var l=e(".fl-builder-settings:visible");setTimeout(function(){t.legacy&&this.renderLegacySettingsComplete(t.legacy),i(),FLBuilder._initSettingsForms(),t.rules&&FLBuilder._initSettingsValidation(t.rules,t.messages),t.preview&&(FLBuilder.preview=new FLBuilderPreview(t.preview)),t.helper&&t.helper.init(),l.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,l))}.bind(this),1)},renderFields:function(t,i){var l=wp.template("fl-builder-settings-row"),n="",o=null,s=null,r=null,a=!1,d=null,u=["align","border","dimension","unit","photo","select","typography"],i=i?i:this.config.settings,c=FLBuilderConfig.global;for(s in t)o=t[s],a=!!o.multiple,supportsResponsive=e.inArray(o.type,u)>-1,r=_.isUndefined(i[s])?"":i[s],o.type&&(_.isUndefined(i[s])&&o["default"]&&(r=o["default"]),d=o.responsive&&c.responsive_enabled&&!a&&supportsResponsive?o.responsive:null,n+=l({field:o,name:s,rootName:s,value:r,preview:JSON.stringify(o.preview?o.preview:{type:"refresh"}),responsive:d,rowClass:o.row_class?" "+o.row_class:"",isMultiple:a,supportsMultiple:"editor"!==o.type&&"service"!==o.type,settings:i,globalSettings:c,template:e("#tmpl-fl-builder-field-"+o.type)}));return n},renderField:function(e){var t=wp.template("fl-builder-field");return t(e)},renderSectionTemplate:function(e,t){var i=wp.template(e.template.id);return i({section:e,settings:t})},renderTabTemplate:function(e,t){var i=wp.template(e.template.id);return i({tab:e,settings:t})},renderLegacySettings:function(t,i){var l=e(".fl-builder-settings:visible"),n=null,o=!1,s={tabs:[],sections:[],fields:[],settings:null,node_id:null};return l.find(".fl-legacy-field").each(function(){n=e(this),s.fields.push(n.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(n),o=!0}),l.find(".fl-legacy-settings-section").each(function(){n=e(this),s.sections.push({tab:n.attr("data-tab"),section:n.attr("data-section")}),o=!0}),l.find(".fl-legacy-settings-tab").each(function(){n=e(this),s.tabs.push(n.attr("data-tab")),o=!0}),l.attr("data-node")?s.node_id=l.attr("data-node"):s.settings=FLBuilder._getOriginalSettings(l,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(e.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:s,form:l.attr("data-form-id"),group:l.attr("data-form-group"),lightbox:l.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),o&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),o},renderLegacySettingsComplete:function(t){var i="object"==typeof t?t:FLBuilder._jsonParse(t),l=null,n=null,o="",s=null,r=null,a=null;if(i.lightbox?(l=e(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]"),n=l.length?l.find(".fl-builder-settings"):null):(n=e(".fl-builder-settings:visible"),l=n.closest(".fl-builder-lightbox")),n&&n.length){for(o in i.fields)s=e("#fl-field-"+o).attr("id",""),s.after(i.fields[o]).remove();for(o in i.extras)s=e("#fl-field-"+o).find(".fl-field-control-wrapper"),i.extras[o].multiple?s.each(function(t,l){t in i.extras[o].before&&""!=i.extras[o].before[t]&&e(this).prepend('<div class="fl-form-field-before">'+i.extras[o].before[t]+"</div>"),t in i.extras[o].after&&""!=i.extras[o].after[t]&&e(this).append('<div class="fl-form-field-after">'+i.extras[o].after[t]+"</div>")}):(""!=i.extras[o].before&&s.prepend('<div class="fl-form-field-before">'+i.extras[o].before+"</div>"),""!=i.extras[o].after&&s.append('<div class="fl-form-field-after">'+i.extras[o].after+"</div>"));for(a in i.sections)for(o in i.sections[a])r=e("#fl-builder-settings-section-"+o),r.html(i.sections[a][o]);for(o in i.tabs)a=e("#fl-builder-settings-tab-"+o),a.html(i.tabs[o]);l.data("parent")||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,n),FLBuilder.preview&&(this.settings=e.extend(this.settings,FLBuilder.preview._savedSettings),FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var t=e(".fl-builder-settings:visible"),i=t.closest(".fl-builder-lightbox"),l=i.attr("data-parent"),n=null,o=null,s={};return l&&(l=e(".fl-builder-lightbox[data-instance-id="+l+"]"),t=l.find("form.fl-builder-settings"),n=FLBuilder._getSettings(t),o=t.attr("data-node"),o&&(s.node_id=o,s.node_settings=n)),s},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),i=!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(t);return i},closeOnDeleteNode:function(t){var i=e(".fl-builder-settings[data-node]"),l=FLBuilder._contentClass+" .fl-node-"+i.data("node");i.length&&!e(l).length&&FLLightbox.closeAll()},showLightboxLoader:function(){e(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(t){e(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){var t=e.closest(".fl-field-control").find(".fl-field-control-wrapper");t.hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field"),i=e.closest(".fl-field-control").find(".fl-field-control-wrapper");i.show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,e.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.reload),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyColTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreHistoryComplete",this.updateOnHistoryRestored.bind(this))},reload:function(){var t=FLBuilderConfig.editUrl+"&fl_builder_load_settings_config=core";e('script[src*="fl_builder_load_settings_config=core"]').remove(),e("head").append('<script src="'+t+'"></script>')},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t,FLBuilderConfig.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];e.namespace.indexOf("didAdd")>-1?this.addNode("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didSaveNodeSettings")>-1?this.updateNode(arguments[1].nodeId,arguments[1].settings):e.namespace.indexOf("didDelete")>-1?this.deleteNodes("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didDuplicate")>-1&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(t,i){var l=this;i.cols.each(function(){var t=e(this),i=t.attr("data-node");l.nodes[i]&&(l.nodes[i].size=parseFloat(t[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},updateOnHistoryRestored:function(e,t){this.nodes=t.config.nodes,this.attachments=t.config.attachments,this.settings.layout=t.settings.layout,this.settings.global=t.settings.global,FLBuilderConfig.global=t.settings.global},addNode:function(t,i){var l=e(".fl-node-"+t),n=l.hasClass("fl-row"),o=l.hasClass("fl-col"),s=l.hasClass("fl-col-group"),r=l.hasClass("fl-module"),a=this;this.nodes[t]||(i||(n?i=e.extend({},this.defaults.row):o?i=e.extend({},this.defaults.column):r&&(i=e.extend({},this.defaults.modules[l.attr("data-type")])),n||s?l.find(".fl-col").each(function(){var t=e(this),i=e.extend({},a.defaults.column);i.size=parseFloat(t[0].style.width),a.addNode(t.attr("data-node"),i)}):r&&(a.addNode(l.closest(".fl-row").attr("data-node")),a.addNode(l.closest(".fl-col").attr("data-node")),a.updateOnResetColumnWidths(null,{cols:l.closest(".fl-col-group").find("> .fl-col")}))),i&&(this.nodes[t]=i))},updateNode:function(t,i){var l=e(".fl-node-"+t),n=this;l.hasClass("fl-col")&&l.closest(".fl-col-group").find("> .fl-col").each(function(){var t=e(this),l=t.attr("data-node");n.nodes[l].size=parseFloat(t[0].style.width),n.nodes[l].equal_height=i.equal_height,n.nodes[l].content_alignment=i.content_alignment,n.nodes[l].responsive_order=i.responsive_order}),this.nodes[t]=i},duplicateNode:function(t,i){var l=e(".fl-node-"+i),n=l.find("[data-node]"),o=e(".fl-node-"+t),s=o.find("[data-node]"),r=this;this.nodes[i]=this.nodes[t],n.each(function(l){t=s.eq(l).attr("data-node"),i=e(this).attr("data-node"),r.nodes[t]&&(r.nodes[i]=r.nodes[t])})},deleteNodes:function(){var t="",i=e(FLBuilder._contentClass).html();for(t in this.nodes)i.indexOf(t)===-1&&(this.nodes[t]=null,delete this.nodes[t])}}),e(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(e){FLBuilderSettingsCopyPaste={init:function(){FLBuilder.addHook("settings-form-init",this.initExportButton),FLBuilder.addHook("settings-form-init",this.initImportButton)},initExportButton:function(){new ClipboardJS("button.module-export-all",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),o=FLBuilder._getSettings(l),s=new Date,r=s.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-all"),u=d.attr("title");return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(o)}}),new ClipboardJS("button.module-export-style",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),o=FLBuilder._getSettings(l),s=new Date,r=s.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-style"),u=d.attr("title"),c={};for(var f in o){var h=l.find('[name="'+f+'"]'),p=l.find('[name*="'+f+'["]'),g=!1;h.length?g=h.closest(".fl-field").data("is-style"):p.length&&(g=p.closest(".fl-field").data("is-style")),g&&(c[f]=o[f])}return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(c)}})},initImportButton:function(){e("button.module-import-apply").click(function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=e(".module-import-input").val(),l=i.match(/\/\/\/\s\{type:([_a-z0-9-]+)/),n=!1,o=e(".fl-builder-module-settings").data("type"),s=e(".fl-builder-settings-lightbox .module-import-error");if(s.hide(),l&&"undefined"!=typeof l[1]&&(n=l[1]),!n||n!==o)return s.html(FLBuilderStrings.module_import.type).show(),!1;var r=i.replace(/\/\/\/.+\/\/\//,"");try{var a=JSON.parse(r)}catch(d){var a=!1;return s.html(FLBuilderStrings.module_import.error).show(),!1}if(a){var u=t.attr("data-node"),c=e.extend({},FLBuilderSettingsConfig.nodes[u],a);FLBuilderSettingsConfig.nodes[u]=c,FLBuilder.ajax({action:"save_settings",node_id:u,settings:c},FLBuilder._saveSettingsComplete.bind(this,!0,null)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:u,settings:c}),FLBuilder._lightbox.close()}})}},e(function(){FLBuilderSettingsCopyPaste.init()})}(jQuery),function(e){var t={minWidth:320,maxWidth:600,minHeight:400,init:function(){this.initPanel(),this.pinOrUnpin(),this.bind()},bind:function(){var t=e(window),i=e("body");t.on("resize",_.throttle(this.windowResize.bind(this),250)),i.delegate(".fl-builder-ui-pinned-collapse","click",this.collapse),i.delegate(".fl-builder--content-library-panel .fl-builder--tabs","click",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return e(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didPinContentPanel")},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didUnpinContentPanel")},pinOrUnpin:function(){var t=e(".fl-builder--content-library-panel"),i=this.isPinned();t.hasClass("fl-builder-ui-pinned-hidden")||(window.innerWidth<=this.maxWidth?(i&&this.unpin(!1),this.disableDragAndResize()):(i||this.restorePosition(),this.enableDragAndResize()))},show:function(){var t=e(".fl-builder--content-library-panel");t.hasClass("fl-builder-ui-pinned-hidden")&&(t.removeClass("fl-builder-ui-pinned-hidden"),t.show(),this.restorePosition())},hide:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),i.addClass("fl-builder-ui-pinned-hidden"),i.hide(),t.css("margin",""),FLBuilder._resizeLayout())},collapse:function(){var t=e(this).find("i:visible"),i=e("body"),l=t.data("toggle"),n=t.data("position"),o=e(".fl-builder--content-library-panel"),s=o.outerWidth();"hide"===l?(o.css(n,"-"+s+"px"),i.css("margin-"+n,""),i.addClass("fl-builder-ui-pinned-is-collapsed")):(o.css(n,"0px"),i.css("margin-"+n,s+"px"),i.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&e(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return e("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var t=e(".fl-builder--content-library-panel");t.draggable({cursor:"move",handle:".fl-builder--tabs",cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:this.minHeight,minWidth:this.minWidth,maxWidth:this.maxWidth,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),t.addClass("fl-builder-ui-pinned-container"),t.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(t){var i=e(".fl-builder--content-library-panel"),l=i.outerWidth(),n=e("body"),o=e(".fl-responsive-preview, .fl-responsive-preview-mask"),s=e(FLBuilder._contentClass).parentsUntil("body").last();n.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+t),n.addClass("fl-builder-content-panel-is-showing"),n.css("margin-"+t,l+"px"),o.css("margin-"+t,l+"px"),s.addClass("fl-builder-ui-pinned-content-transform"),i.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+t),i.find(".ui-resizable-"+("left"===t?"e":"w")).show(),i.on("resize",_.throttle(this.resize.bind(this),250)),i.attr("style",""),FLBuilder.ContentPanel.isShowing=!0},unpinPanel:function(){var t=e(".fl-builder--content-library-panel"),i=t.find(".fl-builder--panel-content .is-showing").data("tab"),l=e("body"),n=e(".fl-responsive-preview, .fl-responsive-preview-mask"),o=e(FLBuilder._contentClass).parentsUntil("body").last();l.css("margin-left",""),l.css("margin-right",""),l.removeClass("fl-builder-ui-is-pinned"),l.removeClass("fl-builder-ui-is-pinned-left"),l.removeClass("fl-builder-ui-is-pinned-right"),n.css("margin-left",""),n.css("margin-right",""),o.removeClass("fl-lightbox-content-transform"),t.removeClass("fl-builder-ui-pinned"),t.removeClass("fl-builder-ui-pinned-left"),t.removeClass("fl-builder-ui-pinned-right"),t.find(".ui-resizable-handle").hide(),t.off("resize"),t.attr("style",""),t.find(".fl-builder--tabs [data-tab="+i+"]").addClass("is-showing")},pinLightboxes:function(){var t=this;e(".fl-lightbox-resizable").each(function(){t.pinLightbox(e(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(t){var i=e(".fl-builder--content-library-panel"),l=t.closest(".fl-lightbox-wrap");l.closest(".fl-builder-ui-pinned").length||(i.append(l),t.attr("style",""),t.draggable("disable"),t.resizable("disable")),t.is(":visible")&&i.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){var i=t._node.find(".fl-lightbox-resizable");i.length&&(i.hasClass("fl-builder-ui-pinning-initialized")||(i.draggable("option","start",this.dragStart.bind(this)),i.draggable("option","drag",this.drag.bind(this)),i.draggable("option","stop",this.dragStop.bind(this)),i.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(i),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var t=e(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=t.find(".fl-builder--panel-content .is-showing").data("tab"),t.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),e(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");i.find(".fl-lightbox-wrap").each(function(){var l=e(this),n=l.find(".fl-lightbox"),o=0,s=0,r=0;n.draggable("enable"),n.resizable("enable"),n.find(".ui-resizable-handle").show(),t.append(l),n.is(":visible")?(o=parseInt(i.css("top"))-parseInt(l.css("top"))-parseInt(l.css("padding-top")),s=parseInt(i.css("left"))-parseInt(l.css("padding-left")),r=parseInt(i.css("right"))-parseInt(l.css("padding-right")),n.css("top",(o<0?0:o)+"px"),n.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?r:s)+"px"),n.addClass("fl-lightbox-prevent-animation"),t.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):n.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var t=e("body"),i=e(".fl-responsive-preview, .fl-responsive-preview-mask"),l=e(".fl-builder--content-library-panel"),n=l.outerWidth();l.is(":visible")?l.hasClass("fl-builder-ui-pinned-left")?(t.css("margin-left",n+"px"),i.css("margin-left",n+"px")):l.hasClass("fl-builder-ui-pinned-right")&&(t.css("margin-right",n+"px"),i.css("margin-right",n+"px")):t.css("margin","")},resizeStop:function(){e("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(t,i){var l=e("body"),n=(e(t.target),e(".fl-builder-bar-actions"));e(".fl-lightbox-resizable:visible").length||n.addClass("fl-builder-content-panel-pin-zone"),l.addClass("fl-builder-draggable-is-dragging"),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(t,i){var l=e("body"),n=e(".fl-responsive-preview"),o=e(window),s=n.length?n.width():o.width(),r=o.scrollTop(),a=e(".fl-builder--content-library-panel"),d=a.offset().top,u=e(".fl-builder-bar-actions"),c=e(t.target);c.hasClass("fl-builder--content-library-panel")&&(t.clientX<s-75&&d-r<46?u.addClass("fl-builder-content-panel-pin-zone-hover"):u.removeClass("fl-builder-content-panel-pin-zone-hover")),c.hasClass("fl-builder-ui-pinned")?this.unpinPanel():t.clientX<75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):t.clientX>s-75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(t,i){var l=(e(window),e("body")),n=e(".fl-builder-bar-actions"),o=e(".fl-builder-ui-pin-zone"),s=e(".fl-builder--content-library-panel"),r=e(".fl-lightbox-resizable:visible");e(t.target);l.removeClass("fl-builder-draggable-is-dragging"),n.removeClass("fl-builder-content-panel-pin-zone"),n.removeClass("fl-builder-content-panel-pin-zone-hover"),o.remove(),r.length&&parseInt(r.css("top"))<0&&r.css("top","0"),l.hasClass("fl-builder-ui-show-pin-zone")?(l.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right")):s.find(".fl-lightbox").length?(this.unpin(!0),("module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi)&&s.hide()):(s.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable");
11
  t.draggable("disable"),t.resizable("disable"),i.draggable("disable"),i.resizable("disable")},enableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");t.draggable("enable"),t.resizable("enable"),this.isPinned()||(i.draggable("enable"),i.resizable("enable"))},savePosition:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:visible"),l={pinned:{width:t.outerWidth(),position:null}};t.hasClass("fl-builder-ui-pinned-left")?l.pinned.position="left":t.hasClass("fl-builder-ui-pinned-right")?l.pinned.position="right":i.length&&(l.lightbox={width:i.width(),height:i.height(),top:parseInt(i.css("top"))<0?"0px":i.css("top"),left:i.css("left")}),FLBuilderConfig.userSettings.pinned=l.pinned,l.lightbox&&(FLBuilderConfig.userSettings.lightbox=l.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:l})},restorePosition:function(){var t=e(".fl-builder--content-library-panel"),i=FLBuilderConfig.userSettings.pinned;i&&i.position&&(t.css("width",i.width+"px"),this.pin(i.position,!1),t.css("width",i.width+"px"))}};e(function(){t.init()})}(jQuery),function(e){var t={init:function(){this.setupMainMenuData(),e(".fl-builder--revision-actions select").on("change",this.selectChanged),e(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),e(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var t=FLBuilderConfig.revisions.posts,i=FLBuilderConfig.revisions.authors,l=wp.template("fl-revision-list-item"),n=e(".fl-builder--revision-actions select"),o="",s="",r=0;if(FLBuilderConfig.mainMenu.revisions.items=[],n.html(""),0===t.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()});else for(;r<t.length;r++)o=FLBuilderStrings.revisionDate.replace("%s",t[r].date.diff),o+=" ("+t[r].date.published+")",s=FLBuilderStrings.revisionAuthor.replace("%s",i[t[r].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:l({id:t[r].id,date:o,author:s,avatar:i[t[r].author].avatar})}),n.append('<option value="'+t[r].id+'">'+o+"</option>");void 0!==FLBuilder.MainMenu&&FLBuilder.MainMenu.renderPanel("revisions")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=FLBuilder._jsonParse(e),this.setupMainMenuData()},itemClicked:function(t,i){var l=e(i).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(e(".fl-builder--revision-actions select").val(l),this.preview(l))},selectChanged:function(i){t.preview(e(this).val())},applyClicked:function(i){var l=e(".fl-builder--revision-actions select").val();t.restore(l)},preview:function(t){e(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:t},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(i){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:i},t.restoreComplete)},restoreComplete:function(e){var t=FLBuilder._jsonParse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",t.config),settings=t.settings,"undefined"!=typeof settings.css&&null!==settings.css&&(FLBuilderSettingsConfig.settings.layout.css=settings.css),"undefined"!=typeof settings.js&&null!==settings.js&&(FLBuilderSettingsConfig.settings.layout.js=settings.js)}};e(function(){t.init()})}(jQuery),function(e){var t={query:function(e){var t={},i=null,l={library:{}},n=null;if(e=this.normalizeQuery(e),_.isNull(e.kind))t=FLBuilderConfig.contentItems;else for(var o in e.kind)i=e.kind[o],t[i]=FLBuilderConfig.contentItems[i];return n=this.findMatches(e,t),l.library=this.formatResults(n,e),l},normalizeQuery:function(e){var t={kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1};return e=_.extend(t,e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i={},l=null,n=null,o=null,s=null,r=null,a=null;for(l in t){n=t[l],i[l]={items:[]};for(a in n)if(o=n[a],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(o.category,e.category)){switch(l){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(s=_.includes(e.content,o.content),r=e.content===o.content,s||r)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==o.type)continue;if(!_.isNull(e.group)){var d=e.group,u=o.group;if(_.isString(d)&&(d=[d]),_.isString(u)&&(u=[u]),_.isEmpty(d)||_.isEmpty(u))continue;var c=!1;for(a in d){var f=d[a];_.includes(u,f)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(e.group===!1&&o.group.length>0)continue;if(e.group!==!1&&!_.includes(o.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(o,e.searchTerm))&&i[l].items.push(o)}}return i},matchesCategory:function(e,t){var i,l,n,o,s,r;if(e===t)return!0;_.isString(t)&&(t=[t]);for(l in t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(n in e)if(o=e[n],o===i)return!0;if(_.isObject(e))for(s in e)if(r=e[s],r===i||s===i)return!0}return!1},matchesSearchTerm:function(e,t){var i,l,n=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(n))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(n))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(n))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(n))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||(i="widget",!i.includes(n)))||!(_.isUndefined(e.editor_export)||(l="module",!l.includes(n))))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,t){var i,l,n={};return _.forEach(e,function(e,o,s){i=e[t],_.isNull(i)||_.isUndefined(i)||_.isString(i)&&""===e[i]||(_.isString(i)&&(n[i]=n[i]||[],n[i].push(e)),_.isArray(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})),_.isObject(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})))}),n},search:function(e){var t={searchTerm:e},i=this.query(t),l={total:0,term:e,sections:{}};if(!_.isUndefined(i.library.module.items)){var n={};for(var o in i.library.module.items){var s=i.library.module.items[o],r=s.group[0],a=s.category;s.name;_.isUndefined(n[r])&&(n[r]={}),_.isUndefined(n[r][a])&&(n[r][a]=[]),n[r][a].push(s)}l.grouped=n}for(var o in i.library){var d=i.library[o];!_.isUndefined(d.items)&&d.items.length>0&&(l.sections[o]={name:FLBuilderStrings.typeLabels[o],handle:o,type:"",items:d.items},l.total+=d.items.length)}return l}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){var i=t.search(e);return i}}}(jQuery),function(e,t){var i={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=e(".fl-builder--saving-indicator"),t.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),t.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),t.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),t.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),t.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabled||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,e("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&("save_pinned_ui_position"!=e&&("fl_builder_notifications"!=e&&!(e.indexOf("history")>-1)))))))},onLayoutSaved:function(e,t){if(this.isUpdatingLayout(t.fl_builder_data.action)){this.showStatusMessage(this.messages.saved,this.messages.savedTooltip);var i=this;setTimeout(function(){i.resetStatusMessage()},2e3)}},onLayoutPublished:function(){this.layoutNeedsPublish=!1,e("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(i,l){this.$savingIndicator.html(i),t.isUndefined(l)||(this.$savingIndicator.attr("title",l),e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fas fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){if(t.MainMenu.hide(),this.layoutNeedsPublish)t._publishLayout(!1,!0);else{this.showStatusMessage(this.messages.noChanges);var e=this;setTimeout(function(){e.resetStatusMessage()},2e3)}}};t.SaveManager={layoutNeedsPublish:function(){return i.layoutNeedsPublish},showStatusMessage:function(e,t){i.showStatusMessage(e,t)},resetStatusMessage:function(){i.resetStatusMessage()}},e(function(){i.init()})}(jQuery,FLBuilder),function(e){FLBuilderHistoryManager={states:[],position:0,rendering:!1,init:function(){var t=FLBuilderConfig.history,i=this;this.states=t.states,this.position=parseInt(t.position),this.setupMainMenuData(),e.each(t.hooks,function(e,t){FLBuilder.addHook(e,function(e,l){i.saveCurrentState(t,l)})}),FLBuilder.addHook("didPublishLayout",this.clearStatesOnPublish.bind(this)),FLBuilder.addHook("restartEditingSession",this.saveCurrentStateOnRestartSession.bind(this)),FLBuilder.addHook("historyItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("undo",this.onUndo.bind(this)),FLBuilder.addHook("redo",this.onRedo.bind(this))},saveCurrentState:function(e,t){var i=this,t="undefined"==typeof t?{}:t,l=null;"undefined"!=typeof t.moduleType&&t.moduleType&&(l=t.moduleType),FLBuilder.ajax({action:"save_history_state",label:e,module_type:l},function(e){var t=JSON.parse(e);i.states=t.states,i.position=parseInt(t.position),i.setupMainMenuData()})},saveCurrentStateOnRestartSession:function(e){this.states.length||this.saveCurrentState("draft_created")},clearStatesOnPublish:function(e,t){var i=this;this.states=[],this.position=0,this.setupMainMenuData(),FLBuilder.ajax({action:"clear_history_states",post_id:FLBuilderConfig.postId},function(){t.shouldExit||i.saveCurrentState("draft_created")})},renderState:function(t){var i=this;if(!this.rendering&&this.states.length&&!e(".fl-builder-settings:visible").length){var l=setTimeout(FLBuilder.showAjaxLoader,2e3);this.rendering=!0,FLBuilder.ajax({action:"render_history_state",position:t},function(e){var t=JSON.parse(e);t.error||(i.position=parseInt(t.position),FLBuilder.triggerHook("didRestoreHistoryComplete",t),FLBuilder._renderLayout(t.layout),i.setupMainMenuData()),clearTimeout(l),i.rendering=!1})}},onUndo:function(){this.renderState("prev")},onRedo:function(){this.renderState("next")},setupMainMenuData:function(){var e=FLBuilderConfig.history.labels,t="";FLBuilderConfig.mainMenu.history.items=[];for(var i=this.states.length-1;i>=0;i--)"string"==typeof this.states[i]?t=e[this.states[i]]?e[this.states[i]]:this.states[i]:(t=e[this.states[i].label]?e[this.states[i].label]:this.states[i].label,(this.states[i].moduleType||this.states[i].label.indexOf("module")>-1)&&(t=t.replace("%s",this.getModuleName(this.states[i].moduleType)))),FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:t,current:i===this.position?1:0,position:i})});FLBuilderConfig.history.enabled||FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:FLBuilderConfig.history.labels.history_disabled,current:0,position:0})}),void 0!==FLBuilder.MainMenu&&FLBuilder.MainMenu.renderPanel("history")},getModuleName:function(e){var t=FLBuilderConfig.contentItems.module,i=0;if("widget"===e)return FLBuilderStrings.widget;for(;i<t.length;i++)if("undefined"!=typeof t[i].slug&&e===t[i].slug)return t[i].name;return FLBuilderStrings.module},itemClicked:function(t,i){var l=e(i).find(".fl-history-list-item"),n=l.attr("data-position"),o=e(".fl-history-list-item[data-current=1]");e(".fl-builder-settings:visible").length&&(FLBuilder._closeNestedSettings(),FLBuilder._lightbox.close()),o.attr("data-current",0),l.attr("data-current",1),this.renderState(n)}},e(function(){FLBuilderHistoryManager.init()})}(jQuery),function(exports){"use strict";exports.stringify=function(e){return JSON.stringify(e,function(e,t){var i;return t instanceof Function||"function"==typeof t?(i=t.toString(),i.length<8||"function"!==i.substring(0,8)?"_NuFrRa_"+i:i):t instanceof RegExp?"_PxEgEr_"+t:t})},exports.parse=function(str,date2obj){var iso8061=!!date2obj&&/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/;return JSON.parse(str,function(key,value){var prefix;return"string"!=typeof value?value:value.length<8?value:(prefix=value.substring(0,8),iso8061&&value.match(iso8061)?new Date(value):"function"===prefix?eval("("+value+")"):"_PxEgEr_"===prefix?eval(value.slice(8)):"_NuFrRa_"===prefix?eval(value.slice(8)):value)})},exports.clone=function(e,t){return exports.parse(exports.stringify(e),t)}}("undefined"==typeof exports?window.JSONfn={}:exports);
json/fonts.json CHANGED
@@ -48,6 +48,16 @@
48
  "variants": ["regular"],
49
  "fallback": "cursive"
50
  }
 
 
 
 
 
 
 
 
 
 
51
  }, {
52
  "Akronim": {
53
  "variants": ["regular"],
@@ -80,7 +90,7 @@
80
  }
81
  }, {
82
  "Alegreya": {
83
- "variants": ["regular", "italic", "500", "500italic", "700", "700italic", "800", "800italic", "900", "900italic"],
84
  "fallback": "serif"
85
  }
86
  }, {
@@ -258,6 +268,11 @@
258
  "variants": ["regular"],
259
  "fallback": "sans-serif"
260
  }
 
 
 
 
 
261
  }, {
262
  "Arapey": {
263
  "variants": ["regular", "italic"],
@@ -280,7 +295,7 @@
280
  }
281
  }, {
282
  "Archivo": {
283
- "variants": ["regular", "italic", "500", "500italic", "600", "600italic", "700", "700italic"],
284
  "fallback": "sans-serif"
285
  }
286
  }, {
@@ -340,7 +355,7 @@
340
  }
341
  }, {
342
  "Asap": {
343
- "variants": ["regular", "italic", "500", "500italic", "600", "600italic", "700", "700italic"],
344
  "fallback": "sans-serif"
345
  }
346
  }, {
@@ -463,6 +478,11 @@
463
  "variants": ["200", "200italic", "300", "300italic", "regular", "italic", "500", "500italic", "600", "600italic", "700", "700italic"],
464
  "fallback": "sans-serif"
465
  }
 
 
 
 
 
466
  }, {
467
  "Baloo 2": {
468
  "variants": ["regular", "500", "600", "700", "800"],
@@ -768,6 +788,11 @@
768
  "variants": ["regular"],
769
  "fallback": "serif"
770
  }
 
 
 
 
 
771
  }, {
772
  "Bubblegum Sans": {
773
  "variants": ["regular"],
@@ -1323,6 +1348,11 @@
1323
  "variants": ["regular"],
1324
  "fallback": "cursive"
1325
  }
 
 
 
 
 
1326
  }, {
1327
  "Delius": {
1328
  "variants": ["regular"],
@@ -1408,6 +1438,11 @@
1408
  "variants": ["200", "300", "regular", "500", "600", "700", "800"],
1409
  "fallback": "sans-serif"
1410
  }
 
 
 
 
 
1411
  }, {
1412
  "Dr Sugiyama": {
1413
  "variants": ["regular"],
@@ -2388,6 +2423,11 @@
2388
  "variants": ["300", "regular", "700"],
2389
  "fallback": "sans-serif"
2390
  }
 
 
 
 
 
2391
  }, {
2392
  "Karla": {
2393
  "variants": ["200", "300", "regular", "500", "600", "700", "800", "200italic", "300italic", "italic", "500italic", "600italic", "700italic", "800italic"],
@@ -2463,6 +2503,11 @@
2463
  "variants": ["regular"],
2464
  "fallback": "sans-serif"
2465
  }
 
 
 
 
 
2466
  }, {
2467
  "Knewave": {
2468
  "variants": ["regular"],
@@ -2628,6 +2673,11 @@
2628
  "variants": ["300", "regular", "500", "600", "700"],
2629
  "fallback": "sans-serif"
2630
  }
 
 
 
 
 
2631
  }, {
2632
  "Lexend Deca": {
2633
  "variants": ["regular"],
@@ -3308,11 +3358,21 @@
3308
  "variants": ["regular"],
3309
  "fallback": "sans-serif"
3310
  }
 
 
 
 
 
3311
  }, {
3312
  "News Cycle": {
3313
  "variants": ["regular", "700"],
3314
  "fallback": "sans-serif"
3315
  }
 
 
 
 
 
3316
  }, {
3317
  "Niconne": {
3318
  "variants": ["regular"],
@@ -3488,6 +3548,11 @@
3488
  "variants": ["regular"],
3489
  "fallback": "sans-serif"
3490
  }
 
 
 
 
 
3491
  }, {
3492
  "Old Standard TT": {
3493
  "variants": ["regular", "italic", "700"],
@@ -3533,6 +3598,11 @@
3533
  "variants": ["regular", "italic"],
3534
  "fallback": "sans-serif"
3535
  }
 
 
 
 
 
3536
  }, {
3537
  "Orienta": {
3538
  "variants": ["regular"],
@@ -4053,6 +4123,11 @@
4053
  "variants": ["regular"],
4054
  "fallback": "cursive"
4055
  }
 
 
 
 
 
4056
  }, {
4057
  "Revalia": {
4058
  "variants": ["regular"],
@@ -4113,6 +4188,11 @@
4113
  "variants": ["regular"],
4114
  "fallback": "cursive"
4115
  }
 
 
 
 
 
4116
  }, {
4117
  "Rokkitt": {
4118
  "variants": ["100", "200", "300", "regular", "500", "600", "700", "800", "900"],
@@ -4393,6 +4473,16 @@
4393
  "variants": ["regular"],
4394
  "fallback": "monospace"
4395
  }
 
 
 
 
 
 
 
 
 
 
4396
  }, {
4397
  "Shojumaru": {
4398
  "variants": ["regular"],
@@ -4633,6 +4723,11 @@
4633
  "variants": ["regular", "700"],
4634
  "fallback": "sans-serif"
4635
  }
 
 
 
 
 
4636
  }, {
4637
  "Stint Ultra Condensed": {
4638
  "variants": ["regular"],
@@ -4843,6 +4938,11 @@
4843
  "variants": ["regular"],
4844
  "fallback": "sans-serif"
4845
  }
 
 
 
 
 
4846
  }, {
4847
  "Trirong": {
4848
  "variants": ["100", "100italic", "200", "200italic", "300", "300italic", "regular", "italic", "500", "500italic", "600", "600italic", "700", "700italic", "800", "800italic", "900", "900italic"],
@@ -4863,6 +4963,11 @@
4863
  "variants": ["regular", "italic", "700"],
4864
  "fallback": "sans-serif"
4865
  }
 
 
 
 
 
4866
  }, {
4867
  "Trykker": {
4868
  "variants": ["regular"],
@@ -5128,6 +5233,11 @@
5128
  "variants": ["regular"],
5129
  "fallback": "serif"
5130
  }
 
 
 
 
 
5131
  }, {
5132
  "Zeyada": {
5133
  "variants": ["regular"],
48
  "variants": ["regular"],
49
  "fallback": "cursive"
50
  }
51
+ }, {
52
+ "Akaya Kanadaka": {
53
+ "variants": ["regular"],
54
+ "fallback": "sans-serif"
55
+ }
56
+ }, {
57
+ "Akaya Telivigala": {
58
+ "variants": ["regular"],
59
+ "fallback": "sans-serif"
60
+ }
61
  }, {
62
  "Akronim": {
63
  "variants": ["regular"],
90
  }
91
  }, {
92
  "Alegreya": {
93
+ "variants": ["regular", "500", "600", "700", "800", "900", "italic", "500italic", "600italic", "700italic", "800italic", "900italic"],
94
  "fallback": "serif"
95
  }
96
  }, {
268
  "variants": ["regular"],
269
  "fallback": "sans-serif"
270
  }
271
+ }, {
272
+ "Antonio": {
273
+ "variants": ["100", "200", "300", "regular", "500", "600", "700"],
274
+ "fallback": "sans-serif"
275
+ }
276
  }, {
277
  "Arapey": {
278
  "variants": ["regular", "italic"],
295
  }
296
  }, {
297
  "Archivo": {
298
+ "variants": ["100", "200", "300", "regular", "500", "600", "700", "800", "900", "100italic", "200italic", "300italic", "italic", "500italic", "600italic", "700italic", "800italic", "900italic"],
299
  "fallback": "sans-serif"
300
  }
301
  }, {
355
  }
356
  }, {
357
  "Asap": {
358
+ "variants": ["regular", "500", "600", "700", "italic", "500italic", "600italic", "700italic"],
359
  "fallback": "sans-serif"
360
  }
361
  }, {
478
  "variants": ["200", "200italic", "300", "300italic", "regular", "italic", "500", "500italic", "600", "600italic", "700", "700italic"],
479
  "fallback": "sans-serif"
480
  }
481
+ }, {
482
+ "Ballet": {
483
+ "variants": ["regular"],
484
+ "fallback": "cursive"
485
+ }
486
  }, {
487
  "Baloo 2": {
488
  "variants": ["regular", "500", "600", "700", "800"],
788
  "variants": ["regular"],
789
  "fallback": "serif"
790
  }
791
+ }, {
792
+ "Brygada 1918": {
793
+ "variants": ["regular", "500", "600", "700", "italic", "500italic", "600italic", "700italic"],
794
+ "fallback": "serif"
795
+ }
796
  }, {
797
  "Bubblegum Sans": {
798
  "variants": ["regular"],
1348
  "variants": ["regular"],
1349
  "fallback": "cursive"
1350
  }
1351
+ }, {
1352
+ "Dela Gothic One": {
1353
+ "variants": ["regular"],
1354
+ "fallback": "sans-serif"
1355
+ }
1356
  }, {
1357
  "Delius": {
1358
  "variants": ["regular"],
1438
  "variants": ["200", "300", "regular", "500", "600", "700", "800"],
1439
  "fallback": "sans-serif"
1440
  }
1441
+ }, {
1442
+ "DotGothic16": {
1443
+ "variants": ["regular"],
1444
+ "fallback": "sans-serif"
1445
+ }
1446
  }, {
1447
  "Dr Sugiyama": {
1448
  "variants": ["regular"],
2423
  "variants": ["300", "regular", "700"],
2424
  "fallback": "sans-serif"
2425
  }
2426
+ }, {
2427
+ "Karantina": {
2428
+ "variants": ["300", "regular", "700"],
2429
+ "fallback": "sans-serif"
2430
+ }
2431
  }, {
2432
  "Karla": {
2433
  "variants": ["200", "300", "regular", "500", "600", "700", "800", "200italic", "300italic", "italic", "500italic", "600italic", "700italic", "800italic"],
2503
  "variants": ["regular"],
2504
  "fallback": "sans-serif"
2505
  }
2506
+ }, {
2507
+ "Kiwi Maru": {
2508
+ "variants": ["300", "regular", "500"],
2509
+ "fallback": "serif"
2510
+ }
2511
  }, {
2512
  "Knewave": {
2513
  "variants": ["regular"],
2673
  "variants": ["300", "regular", "500", "600", "700"],
2674
  "fallback": "sans-serif"
2675
  }
2676
+ }, {
2677
+ "Lexend": {
2678
+ "variants": ["100", "300", "regular", "500", "600", "700", "800"],
2679
+ "fallback": "sans-serif"
2680
+ }
2681
  }, {
2682
  "Lexend Deca": {
2683
  "variants": ["regular"],
3358
  "variants": ["regular"],
3359
  "fallback": "sans-serif"
3360
  }
3361
+ }, {
3362
+ "New Tegomin": {
3363
+ "variants": ["regular"],
3364
+ "fallback": "serif"
3365
+ }
3366
  }, {
3367
  "News Cycle": {
3368
  "variants": ["regular", "700"],
3369
  "fallback": "sans-serif"
3370
  }
3371
+ }, {
3372
+ "Newsreader": {
3373
+ "variants": ["200", "300", "regular", "500", "600", "700", "800", "200italic", "300italic", "italic", "500italic", "600italic", "700italic", "800italic"],
3374
+ "fallback": "serif"
3375
+ }
3376
  }, {
3377
  "Niconne": {
3378
  "variants": ["regular"],
3548
  "variants": ["regular"],
3549
  "fallback": "sans-serif"
3550
  }
3551
+ }, {
3552
+ "Oi": {
3553
+ "variants": ["regular"],
3554
+ "fallback": "sans-serif"
3555
+ }
3556
  }, {
3557
  "Old Standard TT": {
3558
  "variants": ["regular", "italic", "700"],
3598
  "variants": ["regular", "italic"],
3599
  "fallback": "sans-serif"
3600
  }
3601
+ }, {
3602
+ "Orelega One": {
3603
+ "variants": ["regular"],
3604
+ "fallback": "sans-serif"
3605
+ }
3606
  }, {
3607
  "Orienta": {
3608
  "variants": ["regular"],
4123
  "variants": ["regular"],
4124
  "fallback": "cursive"
4125
  }
4126
+ }, {
4127
+ "Reggae One": {
4128
+ "variants": ["regular"],
4129
+ "fallback": "sans-serif"
4130
+ }
4131
  }, {
4132
  "Revalia": {
4133
  "variants": ["regular"],
4188
  "variants": ["regular"],
4189
  "fallback": "cursive"
4190
  }
4191
+ }, {
4192
+ "RocknRoll One": {
4193
+ "variants": ["regular"],
4194
+ "fallback": "sans-serif"
4195
+ }
4196
  }, {
4197
  "Rokkitt": {
4198
  "variants": ["100", "200", "300", "regular", "500", "600", "700", "800", "900"],
4473
  "variants": ["regular"],
4474
  "fallback": "monospace"
4475
  }
4476
+ }, {
4477
+ "Shippori Mincho": {
4478
+ "variants": ["regular", "500", "600", "700", "800"],
4479
+ "fallback": "serif"
4480
+ }
4481
+ }, {
4482
+ "Shippori Mincho B1": {
4483
+ "variants": ["regular", "500", "600", "700", "800"],
4484
+ "fallback": "serif"
4485
+ }
4486
  }, {
4487
  "Shojumaru": {
4488
  "variants": ["regular"],
4723
  "variants": ["regular", "700"],
4724
  "fallback": "sans-serif"
4725
  }
4726
+ }, {
4727
+ "Stick": {
4728
+ "variants": ["regular"],
4729
+ "fallback": "sans-serif"
4730
+ }
4731
  }, {
4732
  "Stint Ultra Condensed": {
4733
  "variants": ["regular"],
4938
  "variants": ["regular"],
4939
  "fallback": "sans-serif"
4940
  }
4941
+ }, {
4942
+ "Train One": {
4943
+ "variants": ["regular"],
4944
+ "fallback": "sans-serif"
4945
+ }
4946
  }, {
4947
  "Trirong": {
4948
  "variants": ["100", "100italic", "200", "200italic", "300", "300italic", "regular", "italic", "500", "500italic", "600", "600italic", "700", "700italic", "800", "800italic", "900", "900italic"],
4963
  "variants": ["regular", "italic", "700"],
4964
  "fallback": "sans-serif"
4965
  }
4966
+ }, {
4967
+ "Truculenta": {
4968
+ "variants": ["100", "200", "300", "regular", "500", "600", "700", "800", "900"],
4969
+ "fallback": "sans-serif"
4970
+ }
4971
  }, {
4972
  "Trykker": {
4973
  "variants": ["regular"],
5233
  "variants": ["regular"],
5234
  "fallback": "serif"
5235
  }
5236
+ }, {
5237
+ "Zen Dots": {
5238
+ "variants": ["regular"],
5239
+ "fallback": "sans-serif"
5240
+ }
5241
  }, {
5242
  "Zeyada": {
5243
  "variants": ["regular"],