WP Table Builder – WordPress Table Plugin - Version 1.1.6

Version Description

  • ADD: Option to Import Tables from CSV Files.
  • ADD: Option to Import Tables from TablePress.
  • ADD: Option to Choose Which User Roles Have Access to Add, Edit, Manage tables.
  • ADD: 'Close' Button in Cell Management Mode.
  • ADD: Table item in 'Add New' Menu on Admin bar.
  • FIX: Builder Freezing When Table Has Lots of Columns and Rows.
Download this release

Release Info

Developer imtiazrayhan
Plugin Icon 128x128 WP Table Builder – WordPress Table Plugin
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.5 to 1.1.6

assets/images/wptb-logo.png ADDED
Binary file
inc/admin/class-admin-menu.php CHANGED
@@ -1,8 +1,10 @@
1
  <?php
2
 
3
  namespace WP_Table_Builder\Inc\Admin;
 
4
  use WP_Table_Builder as NS;
5
- Use WP_Table_Builder\Inc\Common\Helpers;
 
6
 
7
  /**
8
  * Register menu elements and do other global tasks.
@@ -22,72 +24,93 @@ class Admin_Menu {
22
  public function __construct() {
23
  // Let's make some menus.
24
  add_action( 'admin_menu', array( $this, 'register_menus' ), 9 );
25
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
26
  add_action( 'wp_ajax_create_table', array( $this, 'create_table' ) );
27
  add_action( 'wp_ajax_save_table', array( $this, 'save_table' ) );
28
  add_action( 'wp_ajax_nopriv_save_table', array( $this, 'save_table' ) );
29
  add_action( 'wp_ajax_get_table', array( $this, 'get_table' ) );
30
  add_action( 'wp_ajax_nopriv_get_table', array( $this, 'get_table' ) );
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
-
33
- public function create_table() {
34
- $id = wp_insert_post([
35
- 'post_title' => '',
36
- 'post_content' => '',
37
- 'post_type' => 'wptb-tables',
38
- 'post_status' => 'draft'
39
- ]);
40
- wp_die( json_encode( ['created',$id] ) );
41
- }
42
 
43
  public function save_table() {
44
-
45
- $params = json_decode( file_get_contents( 'php://input' ) );
46
-
47
- if( wp_verify_nonce( $params->security_code, 'wptb-security-nonce' ) ) {
48
-
49
- if( ! property_exists( $params, 'id') || ! absint( $params->id ) || get_post_status( absint( $params->id ) ) != 'draft' ) {
50
- $id = wp_insert_post([
51
- 'post_title' => sanitize_text_field( $params->title ),
52
- 'post_content' => '',
53
- 'post_type' => 'wptb-tables',
54
- 'post_status' => 'draft'
55
- ]);
56
-
57
- add_post_meta( $id, '_wptb_content_', $params->content );
58
-
59
- wp_die( json_encode( ['saved', $id] ) );
60
- } else {
61
- wp_update_post([
62
- 'ID' => absint( $params->id ),
63
- 'post_title' => sanitize_text_field( $params->title ),
64
- 'post_content' => '',
65
- 'post_type' => 'wptb-tables',
66
- 'post_status' => 'draft'
67
- ]);
68
-
69
- if( isset( $params->preview_saving ) && ! empty( (int)$params->preview_saving ) ) {
70
- update_post_meta( absint( $params->id ), '_wptb_preview_id_', $params->preview_saving );
71
- update_post_meta( absint( $params->id ), '_wptb_content_preview_', $params->content );
72
-
73
- wp_die( json_encode( ['preview_edited'] ) );
74
- } else {
75
- update_post_meta( absint( $params->id ), '_wptb_content_', $params->content );
76
-
77
- wp_die( json_encode( ['edited', absint( $params->id )] ) );
78
- }
79
- }
80
- } else {
81
- wp_die( json_encode( ['security_problem', ''] ) );
82
- }
 
83
  }
84
 
85
- public function get_table() {
86
- $post = get_post( absint( $_REQUEST['id'] ) );
87
- $table_html = get_post_meta( absint( $_REQUEST['id'] ) , '_wptb_content_', true );
88
- $name = $post->post_title;
89
- //$html = json_decode( $html );
90
- die( json_encode( [$name, $table_html] ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  }
92
 
93
 
@@ -98,7 +121,7 @@ class Admin_Menu {
98
  */
99
  public function register_menus() {
100
 
101
- global $builder_page, $tables_overview, $table_list;
102
  $menu_cap = Helpers::wptb_get_capability_manage_options();
103
 
104
  // Default Tables top level menu item.
@@ -112,6 +135,16 @@ class Admin_Menu {
112
  apply_filters( 'wptb_menu_position', '50' )
113
  );
114
 
 
 
 
 
 
 
 
 
 
 
115
  // All Tables sub menu item.
116
  $table_list = add_submenu_page(
117
  'wptb-overview',
@@ -125,27 +158,55 @@ class Admin_Menu {
125
  // Add New Table sub menu item.
126
  $builder_page = add_submenu_page(
127
  'wptb-overview',
128
- esc_html__( 'Table Builder', 'wp-table-builder' ),
129
  esc_html__( 'Add New', 'wp-table-builder' ),
130
  $menu_cap,
131
  'wptb-builder',
132
  array( $this, 'table_builder' )
133
  );
134
 
135
- // Add Welcome sub menu item.
136
- $builder_page = add_submenu_page(
137
- null,
138
- esc_html__( 'Table Builder', 'wp-table-builder' ),
139
- esc_html__( 'Add New', 'wp-table-builder' ),
140
- $menu_cap,
141
- 'wp-table-builder-welcome',
142
- array( $this, 'welcome' )
143
- );
144
-
 
 
145
  do_action( 'wptb_admin_menu', $this );
146
 
147
  }
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  public function enqueue_scripts( $hook ) {
150
  /*
151
  * This function is provided for demonstration purposes only.
@@ -157,8 +218,8 @@ class Admin_Menu {
157
  * The Loader will then create the relationship
158
  * between the defined hooks and the functions defined in this
159
  * class.
160
- */
161
- global $builder_page, $tables_overview, $table_list;
162
 
163
  wp_enqueue_media();
164
 
@@ -167,40 +228,108 @@ class Admin_Menu {
167
  }
168
 
169
 
170
- if ( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == 'wp-table-builder-welcome' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
 
172
- //wp_enqueue_script( 'wptb-admin-welcome-js', plugin_dir_url( __FILE__ ) . 'js/admin-welcome.js', array( 'jquery' ), NS\PLUGIN_VERSION, true );
173
- wp_enqueue_style( 'wptb-admin-welcome-css', plugin_dir_url( __FILE__ ) . 'css/admin-welcome.css', array(), NS\PLUGIN_VERSION, 'all' );
174
 
175
- } elseif ( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == 'wptb-builder' ) {
 
176
 
177
- wp_register_script( 'wptb-admin-builder-js', plugin_dir_url( __FILE__ ) . 'js/admin.js', array( 'jquery', 'wptb-admin-builder-tinymce-js', 'wp-color-picker' ), NS\PLUGIN_VERSION, true );
178
- wp_register_script( 'wptb-admin-builder-tinymce-js', plugin_dir_url( __FILE__ ) . 'js/tinymce/tinymce.min.js', array(), NS\PLUGIN_VERSION, false );
179
- wp_register_script( 'wptb-admin-builder-tinymce-jquery-js', plugin_dir_url( __FILE__ ) . 'js/tinymce/jquery.tinymce.min.js', array(), NS\PLUGIN_VERSION, false );
 
 
180
 
181
- wp_enqueue_style( 'wp-color-picker' );
182
-
183
- wp_enqueue_style( 'wptb-builder-css', plugin_dir_url( __FILE__ ) . 'css/admin.css', array(), NS\PLUGIN_VERSION, 'all' );
184
- wp_enqueue_script( 'wptb-admin-builder-tinymce-js' );
185
- wp_enqueue_script( 'wptb-admin-builder-tinymce-jquery-js' );
186
- wp_enqueue_script( 'wptb-admin-builder-js' );
187
-
188
- wp_localize_script(
189
- 'wptb-admin-builder-js',
190
- 'wptb_admin_object',
191
- [
192
- 'ajaxurl' => admin_url( 'admin-ajax.php' ),
193
- 'security_code' => wp_create_nonce( 'wptb-security-nonce' ),
194
- ]
195
- );
196
 
197
- } elseif( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == 'wptb-overview' ) {
 
 
 
 
198
 
199
- wp_enqueue_script( 'wptb-overview-js', plugin_dir_url( __FILE__ ) . 'js/wptb-overview.js', array( 'jquery' ), NS\PLUGIN_VERSION, true );
200
- wp_enqueue_style( 'wptb-admin-common-css', plugin_dir_url( __FILE__ ) . 'css/admin-common.css', array(), NS\PLUGIN_VERSION, 'all' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
- }
203
-
204
  }
205
 
206
  /**
@@ -208,46 +337,58 @@ class Admin_Menu {
208
  *
209
  * @since 1.0.0
210
  */
211
- public function tables_list() {
212
  $table_list = new WPTB_Listing();
213
  ?>
214
- <div class="wrap">
215
- <div style="margin-bottom: 30px;">
216
- <h1 class="wp-heading-inline">
217
- <?php esc_html_e( 'All Tables', 'wp-table-builder' ); ?>
218
- </h1>
219
- <span class="wptb-split-page-title-action">
220
- <a href="<?php echo esc_url( admin_url( 'admin.php?page=wptb-builder' ) ); ?>" class="page-title-action">
 
221
  <?php esc_html_e( 'Add New', 'wp-table-builder' ); ?>
222
  </a>
223
  </span>
224
- </div>
225
- </div>
226
-
227
  <?php
228
  $table_list->prepare_items();
229
  ?>
230
- <form method="post"><?php
231
- $table_list->display();?>
232
- </form><?php
233
- }
234
-
235
- /**
236
  * Wrapper for the hook to render our tables builder.
237
  *
238
  * @since 1.0.0
239
  */
240
  public function table_builder() {
241
- require_once NS\WP_TABLE_BUILDER_DIR . 'inc/admin/views/wptb-builder-ui.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  }
243
 
244
- /**
245
- * Wrapper for the hook to render our plugin welcome page.
246
- *
247
- * @since 1.1.5
248
- */
249
- public function welcome() {
250
- require_once NS\WP_TABLE_BUILDER_DIR . 'inc/admin/views/wptb-welcome.php';
251
- }
252
 
253
- };
1
  <?php
2
 
3
  namespace WP_Table_Builder\Inc\Admin;
4
+
5
  use WP_Table_Builder as NS;
6
+ use WP_Table_Builder\Inc\Common\Helpers;
7
+ use function wp_localize_script;
8
 
9
  /**
10
  * Register menu elements and do other global tasks.
24
  public function __construct() {
25
  // Let's make some menus.
26
  add_action( 'admin_menu', array( $this, 'register_menus' ), 9 );
27
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
28
  add_action( 'wp_ajax_create_table', array( $this, 'create_table' ) );
29
  add_action( 'wp_ajax_save_table', array( $this, 'save_table' ) );
30
  add_action( 'wp_ajax_nopriv_save_table', array( $this, 'save_table' ) );
31
  add_action( 'wp_ajax_get_table', array( $this, 'get_table' ) );
32
  add_action( 'wp_ajax_nopriv_get_table', array( $this, 'get_table' ) );
33
+ add_action( 'admin_bar_menu', array( $this, 'add_wp_admin_bar_new_table_create_page' ), 500 );
34
+ }
35
+
36
+ public function create_table() {
37
+ $id = wp_insert_post( [
38
+ 'post_title' => '',
39
+ 'post_content' => '',
40
+ 'post_type' => 'wptb-tables',
41
+ 'post_status' => 'draft'
42
+ ] );
43
+ wp_die( json_encode( [ 'created', $id ] ) );
44
  }
 
 
 
 
 
 
 
 
 
 
45
 
46
  public function save_table() {
47
+
48
+ $params = json_decode( file_get_contents( 'php://input' ) );
49
+
50
+ if ( wp_verify_nonce( $params->security_code, 'wptb-security-nonce' ) ||
51
+ wp_verify_nonce( $params->security_code, 'wptb-import-security-nonce' ) ) {
52
+
53
+ if ( ! property_exists( $params, 'id' ) || ! absint( $params->id ) || get_post_status( absint( $params->id ) ) != 'draft' ) {
54
+ $id = wp_insert_post( [
55
+ 'post_title' => sanitize_text_field( $params->title ),
56
+ 'post_content' => '',
57
+ 'post_type' => 'wptb-tables',
58
+ 'post_status' => 'draft'
59
+ ] );
60
+
61
+ add_post_meta( $id, '_wptb_content_', $params->content );
62
+
63
+ wp_die( json_encode( [ 'saved', $id ] ) );
64
+ } else {
65
+ wp_update_post( [
66
+ 'ID' => absint( $params->id ),
67
+ 'post_title' => sanitize_text_field( $params->title ),
68
+ 'post_content' => '',
69
+ 'post_type' => 'wptb-tables',
70
+ 'post_status' => 'draft'
71
+ ] );
72
+
73
+ if ( isset( $params->preview_saving ) && ! empty( (int) $params->preview_saving ) ) {
74
+ update_post_meta( absint( $params->id ), '_wptb_preview_id_', $params->preview_saving );
75
+ update_post_meta( absint( $params->id ), '_wptb_content_preview_', $params->content );
76
+
77
+ wp_die( json_encode( [ 'preview_edited' ] ) );
78
+ } else {
79
+ update_post_meta( absint( $params->id ), '_wptb_content_', $params->content );
80
+
81
+ wp_die( json_encode( [ 'edited', absint( $params->id ) ] ) );
82
+ }
83
+ }
84
+ } else {
85
+ wp_die( json_encode( [ 'security_problem', '' ] ) );
86
+ }
87
  }
88
 
89
+ public function get_table() {
90
+ $post = get_post( absint( $_REQUEST['id'] ) );
91
+ $table_html = get_post_meta( absint( $_REQUEST['id'] ), '_wptb_content_', true );
92
+ $name = $post->post_title;
93
+ //$html = json_decode( $html );
94
+ die( json_encode( [ $name, $table_html ] ) );
95
+ }
96
+
97
+ /**
98
+ * Add "WPTB Add New" sub menu to "New" dropdown menu in the WP Admin Bar.
99
+ *
100
+ * @param WP_Admin_Bar $wp_admin_bar object.
101
+ *
102
+ * @since 1.1.5
103
+ *
104
+ */
105
+ public function add_wp_admin_bar_new_table_create_page( $wp_admin_bar ) {
106
+ if ( current_user_can( 'manage_options' ) ) {
107
+ $wp_admin_bar->add_menu( array(
108
+ 'parent' => 'new-content',
109
+ 'id' => 'wptb-add-new',
110
+ 'title' => __( 'Table', 'wp_table_builder' ),
111
+ 'href' => esc_url( admin_url( 'admin.php?page=wptb-builder' ) ),
112
+ ) );
113
+ }
114
  }
115
 
116
 
121
  */
122
  public function register_menus() {
123
 
124
+ global $builder_page, $tables_overview, $table_list;
125
  $menu_cap = Helpers::wptb_get_capability_manage_options();
126
 
127
  // Default Tables top level menu item.
135
  apply_filters( 'wptb_menu_position', '50' )
136
  );
137
 
138
+ // Add Welcome sub menu item.
139
+ $builder_page = add_submenu_page(
140
+ null,
141
+ esc_html__( 'Table Builder', 'wp-table-builder' ),
142
+ esc_html__( 'Welcome Page', 'wp-table-builder' ),
143
+ $menu_cap,
144
+ 'wp-table-builder-welcome',
145
+ array( $this, 'welcome' )
146
+ );
147
+
148
  // All Tables sub menu item.
149
  $table_list = add_submenu_page(
150
  'wptb-overview',
158
  // Add New Table sub menu item.
159
  $builder_page = add_submenu_page(
160
  'wptb-overview',
161
+ esc_html__( 'WP Table Builder', 'wp-table-builder' ),
162
  esc_html__( 'Add New', 'wp-table-builder' ),
163
  $menu_cap,
164
  'wptb-builder',
165
  array( $this, 'table_builder' )
166
  );
167
 
168
+ // Add Import sub menu item.
169
+ $builder_page = add_submenu_page(
170
+ 'wptb-overview',
171
+ esc_html__( 'Table Builder', 'wp-table-builder' ),
172
+ esc_html__( 'Import', 'wp-table-builder' ),
173
+ $menu_cap,
174
+ 'wptb-import',
175
+ array( $this, 'import' )
176
+ );
177
+
178
+ add_action( 'load-' . $builder_page, [ $this, 'load_assets' ] );
179
+
180
  do_action( 'wptb_admin_menu', $this );
181
 
182
  }
183
 
184
+
185
+ /**
186
+ * Load assets
187
+ *
188
+ * @since 1.1.5
189
+ */
190
+ public function load_assets() {
191
+
192
+ add_action( 'in_admin_header', [ $this, 'remove_admin_notices' ] );
193
+
194
+ }
195
+
196
+ /**
197
+ * Remove all kinds of admin notices
198
+ *
199
+ * @since 1.1.5
200
+ */
201
+ public function remove_admin_notices() {
202
+
203
+ remove_all_actions( 'network_admin_notices' );
204
+ remove_all_actions( 'user_admin_notices' );
205
+ remove_all_actions( 'admin_notices' );
206
+ remove_all_actions( 'all_admin_notices' );
207
+
208
+ }
209
+
210
  public function enqueue_scripts( $hook ) {
211
  /*
212
  * This function is provided for demonstration purposes only.
218
  * The Loader will then create the relationship
219
  * between the defined hooks and the functions defined in this
220
  * class.
221
+ */
222
+ global $builder_page, $tables_overview, $table_list;
223
 
224
  wp_enqueue_media();
225
 
228
  }
229
 
230
 
231
+ if ( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == 'wp-table-builder-welcome' ) {
232
+
233
+ //wp_enqueue_script( 'wptb-admin-welcome-js', plugin_dir_url( __FILE__ ) . 'js/admin-welcome.js', array( 'jquery' ), NS\PLUGIN_VERSION, true );
234
+ wp_enqueue_style( 'wptb-admin-welcome-css', plugin_dir_url( __FILE__ ) . 'css/admin-welcome.css', array(), NS\PLUGIN_VERSION, 'all' );
235
+
236
+ } elseif ( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == 'wptb-builder' ) {
237
+
238
+ wp_register_script( 'wptb-admin-builder-js', plugin_dir_url( __FILE__ ) . 'js/admin.js', array(
239
+ 'jquery',
240
+ 'wptb-admin-builder-tinymce-js',
241
+ 'wp-color-picker'
242
+ ), NS\PLUGIN_VERSION, true );
243
+ wp_register_script( 'wptb-admin-builder-tinymce-js', plugin_dir_url( __FILE__ ) . 'js/tinymce/tinymce.min.js', array(), NS\PLUGIN_VERSION, false );
244
+ wp_register_script( 'wptb-admin-builder-tinymce-jquery-js', plugin_dir_url( __FILE__ ) . 'js/tinymce/jquery.tinymce.min.js', array(), NS\PLUGIN_VERSION, false );
245
+
246
+ wp_enqueue_style( 'wp-color-picker' );
247
+
248
+ wp_enqueue_style( 'wptb-builder-css', plugin_dir_url( __FILE__ ) . 'css/admin.css', array(), NS\PLUGIN_VERSION, 'all' );
249
+ wp_enqueue_script( 'wptb-admin-builder-tinymce-js' );
250
+ wp_enqueue_script( 'wptb-admin-builder-tinymce-jquery-js' );
251
+ wp_enqueue_script( 'wptb-admin-builder-js' );
252
+
253
+ wp_localize_script(
254
+ 'wptb-admin-builder-js',
255
+ 'wptb_admin_object',
256
+ [
257
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
258
+ 'security_code' => wp_create_nonce( 'wptb-security-nonce' ),
259
+ ]
260
+ );
261
+
262
+ } elseif ( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == 'wptb-overview' ) {
263
+
264
+ wp_enqueue_script( 'wptb-overview-js', plugin_dir_url( __FILE__ ) . 'js/wptb-overview.js', array( 'jquery' ), NS\PLUGIN_VERSION, true );
265
+ wp_enqueue_style( 'wptb-admin-common-css', plugin_dir_url( __FILE__ ) . 'css/admin-common.css', array(), NS\PLUGIN_VERSION, 'all' );
266
+
267
+ } else if ( isset( $_GET['page'] ) && sanitize_text_field( $_GET['page'] ) == 'wptb-import' ) {
268
+
269
+ $script_url = NS\WP_TABLE_BUILDER_URL . 'inc/admin/js/WPTB_Import_Menu.min.js';
270
+ $script_path = NS\WP_TABLE_BUILDER_DIR . 'inc/admin/js/WPTB_Import_Menu.min.js';
271
+
272
+ $style_url = NS\WP_TABLE_BUILDER_URL . 'inc/admin/css/admin.css';
273
 
 
 
274
 
275
+ $handler = 'wptb-import-menu';
276
+ $plugin_version = NS\PLUGIN_VERSION;
277
 
278
+ // script and style enqueue
279
+ wp_enqueue_script( $handler, $script_url, [], $plugin_version, true );
280
+ wp_register_script( 'wptb-admin-builder-js', plugin_dir_url( __FILE__ ) . 'js/admin.js', array( 'jquery' ), $plugin_version, true );
281
+ wp_enqueue_script( 'wptb-admin-builder-js' );
282
+ wp_enqueue_style( 'wptb-settings-manager-style', $style_url, [], $plugin_version );
283
 
284
+ $wptb_text_domain = NS\PLUGIN_TEXT_DOMAIN;
285
+ $plugin_homepage = get_plugin_data( NS\PLUGIN__FILE__ )['PluginURI'];
286
+ $plugin_name = get_plugin_data( NS\PLUGIN__FILE__ )['Name'];
 
 
 
 
 
 
 
 
 
 
 
 
287
 
288
+ $plugin_info = [
289
+ 'pluginHomepage' => esc_attr( $plugin_homepage ),
290
+ 'pluginName' => esc_html( $plugin_name ),
291
+ 'logo' => esc_attr( NS\WP_TABLE_BUILDER_URL . 'assets/images/wptb-logo.png' ),
292
+ ];
293
 
294
+ $strings = [
295
+ 'logoAlt' => esc_attr__( 'WPTB plugin logo', $wptb_text_domain ),
296
+ 'importSection' => esc_html__( 'Import', $wptb_text_domain ),
297
+ 'plugins' => esc_html__( 'Plugins', $wptb_text_domain ),
298
+ 'tableResponsive' => esc_html__( 'Make Table Responsive', $wptb_text_domain ),
299
+ 'topRowHeader' => esc_html__( 'Top Row as Header', $wptb_text_domain ),
300
+ 'csvDelimiter' => esc_html__( 'CSV Delimiter', $wptb_text_domain ),
301
+ 'fileDropHint' => esc_html__( 'Drag and Drop Files', $wptb_text_domain ),
302
+ 'browse' => esc_html__( 'Browse', $wptb_text_domain ),
303
+ 'clear' => esc_html__( 'Blear', $wptb_text_domain ),
304
+ 'tableImported' => esc_html__( 'Table Imported', $wptb_text_domain ),
305
+ 'errorOccured' => esc_html__( 'An Error Occured', $wptb_text_domain ),
306
+ 'operationSuccess' => esc_html__( 'Tables Imported', $wptb_text_domain ),
307
+ 'replacedShortcodes' => esc_html__( 'Shortcodes Replaced', $wptb_text_domain ),
308
+ ];
309
+
310
+ $import_iframe_url = add_query_arg(
311
+ array(
312
+ 'post_type' => 'wptb-tables-import'
313
+ ),
314
+ home_url()
315
+ );
316
+
317
+ $options = [
318
+ 'security_code' => wp_create_nonce( 'wptb-import-security-nonce' ),
319
+ 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
320
+ 'import_iframe_url' => $import_iframe_url,
321
+ 'textDomain' => $wptb_text_domain
322
+ ];
323
+
324
+ $data = [
325
+ 'pluginInfo' => $plugin_info,
326
+ 'strings' => $strings,
327
+ 'options' => $options,
328
+ ];
329
+
330
+ wp_localize_script( $handler, 'wptbImportMenuData', $data );
331
+ }
332
 
 
 
333
  }
334
 
335
  /**
337
  *
338
  * @since 1.0.0
339
  */
340
+ public function tables_list() {
341
  $table_list = new WPTB_Listing();
342
  ?>
343
+ <div class="wrap">
344
+ <div style="margin-bottom: 30px;">
345
+ <h1 class="wp-heading-inline">
346
+ <?php esc_html_e( 'All Tables', 'wp-table-builder' ); ?>
347
+ </h1>
348
+ <span class="wptb-split-page-title-action">
349
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=wptb-builder' ) ); ?>"
350
+ class="page-title-action">
351
  <?php esc_html_e( 'Add New', 'wp-table-builder' ); ?>
352
  </a>
353
  </span>
354
+ </div>
355
+ </div>
356
+
357
  <?php
358
  $table_list->prepare_items();
359
  ?>
360
+ <form method="post"><?php
361
+ $table_list->display(); ?>
362
+ </form><?php
363
+ }
364
+
365
+ /**
366
  * Wrapper for the hook to render our tables builder.
367
  *
368
  * @since 1.0.0
369
  */
370
  public function table_builder() {
371
+ require_once NS\WP_TABLE_BUILDER_DIR . 'inc/admin/views/wptb-builder-ui.php';
372
+ }
373
+
374
+ /**
375
+ * Wrapper for the hook to render our plugin table import page.
376
+ *
377
+ * @since 1.1.5
378
+ */
379
+ public function import() {
380
+ require_once NS\WP_TABLE_BUILDER_DIR . 'inc/admin/views/wptb-import.php';
381
+ }
382
+
383
+ /**
384
+ * Wrapper for the hook to render our plugin welcome page.
385
+ *
386
+ * @since 1.1.5
387
+ */
388
+ public function welcome() {
389
+ require_once NS\WP_TABLE_BUILDER_DIR . 'inc/admin/views/wptb-welcome.php';
390
  }
391
 
392
+ }
 
 
 
 
 
 
 
393
 
394
+ ;
inc/admin/class-import.php ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WP_Table_Builder\Inc\Admin;
4
+ use WP_Table_Builder\Inc\Common\Helpers;
5
+ use WP_Table_Builder as NS;
6
+
7
+ // If this file is called directly, abort.
8
+ if ( ! defined( 'WPINC' ) ) {
9
+ die;
10
+ }
11
+
12
+ /**
13
+ * Imports tables from other table plugins and from CSV files.
14
+ *
15
+ * @link http://wptablebuilder.com/
16
+ * @since 1.1.6
17
+ *
18
+ * @author Imtiaz Rayhan
19
+ */
20
+
21
+ class Import {
22
+
23
+ /**
24
+ * Shortcode data.
25
+ *
26
+ * @since 1.1.6
27
+ *
28
+ * @var string
29
+ */
30
+ protected $shortcode_data;
31
+
32
+ /**
33
+ * Instance to instantiate object.
34
+ *
35
+ * @since 1.1.6
36
+ *
37
+ * @var $instance
38
+ */
39
+ protected static $instance;
40
+
41
+ /**
42
+ * Singleton pattern, making only one instance of the class.
43
+ *
44
+ * @since 1.1.6
45
+ */
46
+ public static function instance() {
47
+ if ( ! isset( self::$instance ) ) {
48
+ $className = __CLASS__;
49
+ self::$instance = new $className;
50
+ }
51
+
52
+ return self::$instance;
53
+ }
54
+
55
+ /**
56
+ * Primary class constructor.
57
+ *
58
+ * @since 1.1.6
59
+ */
60
+ public function __construct() {
61
+ add_action( 'wp_ajax_import_tables', array( $this, 'import_tables' ) );
62
+ add_action( 'wp_ajax_nopriv_import_tables', array( $this, 'import_tables' ) );
63
+
64
+ add_action( 'wp_ajax_shortcodes_replace', array( $this, 'shortcodes_replace' ) );
65
+ add_action( 'wp_ajax_nopriv_shortcodes_replace', array( $this, 'shortcodes_replace' ) );
66
+
67
+ add_action( 'wp_ajax_zip_unpacker', array( $this, 'zip_unpacker' ) );
68
+ add_action( 'wp_ajax_nopriv_zip_unpacker', array( $this, 'zip_unpacker' ) );
69
+
70
+ if ( ! $this->is_import_iframe_page() ) {
71
+ return;
72
+ }
73
+
74
+ $this->hooks();
75
+ }
76
+
77
+ /**
78
+ * function for shortcodes replace
79
+ */
80
+ public function shortcodes_replace() {
81
+ $params = json_decode( file_get_contents( 'php://input' ) );
82
+
83
+ if( property_exists( $params, 'security_code' ) && wp_verify_nonce( $params->security_code, 'wptb-import-security-nonce' ) &&
84
+ property_exists( $params, 'replacing_shortcodes' ) ) {
85
+
86
+ $this->permission_check();
87
+
88
+ if( $params->replacing_shortcodes && is_object( $params->replacing_shortcodes )) {
89
+ if( property_exists( $params->replacing_shortcodes,'search' ) ) {
90
+ $shortcode_search = $params->replacing_shortcodes->search;
91
+ } else {
92
+ $shortcode_search = '';
93
+ }
94
+
95
+
96
+ $shortcode_search_name = explode( ' ', $shortcode_search );
97
+ if( $shortcode_search_name && is_array( $shortcode_search_name ) ) {
98
+ $shortcode_search_name = $shortcode_search_name[0];
99
+ $shortcode_search_name = str_replace( '[', '', $shortcode_search_name );
100
+ } else {
101
+ $shortcode_search_name = '';
102
+ }
103
+
104
+ if( $shortcode_search_name ) {
105
+ $post_query = new \WP_Query( [
106
+ 'posts_per_page' => -1,
107
+ 's' => '[' . $shortcode_search_name,
108
+ ] );
109
+
110
+ if ( ! $post_query->found_posts ) {
111
+ wp_send_json_error( __( 'No pages found with necessary shortcodes ' . $shortcode_search_name, 'wp_table_builder' ) );
112
+ }
113
+
114
+ $count = 0;
115
+ $posts = $post_query->get_posts();
116
+
117
+ $message = '';
118
+
119
+ foreach ( $posts as $post ) {
120
+ preg_match_all( '/\[(\[?)(' . $shortcode_search_name . '|)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)/s', $post->post_content, $matches, PREG_SET_ORDER );
121
+
122
+ if ( empty( $matches ) ) {
123
+ continue;
124
+ }
125
+
126
+ foreach ( $matches as $shortcode ) {
127
+ $atts = shortcode_parse_atts( $shortcode[0] );
128
+
129
+ if( $atts ) {
130
+ $shortcode_search = $params->replacing_shortcodes->search;
131
+
132
+ $atts2 = shortcode_parse_atts( $shortcode_search );
133
+
134
+ if( isset( $atts['id'] ) && isset( $atts2['id'] ) && $atts['id'] === $atts2['id'] ) {
135
+ $shortcode_replace = $params->replacing_shortcodes->replace;
136
+ $post_content = str_replace( $shortcode[0], $shortcode_replace, $post->post_content );
137
+
138
+ wp_update_post( [
139
+ 'ID' => $post->ID,
140
+ 'post_content' => $post_content,
141
+ ] );
142
+
143
+ $count++;
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ wp_die( json_encode( ["success", $count] ) );
150
+ }
151
+ }
152
+ }
153
+ }
154
+
155
+ public function import_tables() {
156
+ $params = json_decode( file_get_contents( 'php://input' ) );
157
+
158
+ if( wp_verify_nonce( $params->security_code, 'wptb-import-security-nonce' ) ) {
159
+ $plugin_name = $params->import_plugin_name;
160
+
161
+ if( $plugin_name === 'table-press' ) {
162
+ $this->import_from_table_press();
163
+ }
164
+ } else {
165
+ wp_die( json_encode( 'Import Problem' ) );
166
+ }
167
+ }
168
+
169
+ public function zip_unpacker() {
170
+ if ( isset( $_POST ) && isset( $_POST['security_code'] ) &&
171
+ wp_verify_nonce( $_POST['security_code'], 'wptb-import-security-nonce' ) ) {
172
+ if( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) {
173
+
174
+ $zip_file = new \ZipArchive();
175
+
176
+ $uploaddir = NS\WP_TABLE_BUILDER_DIR . '/uploads'; // . - текущая папка где находится submit.php
177
+
178
+ // creating a folder if it doesn't exist
179
+ if( ! is_dir( $uploaddir ) ) mkdir( $uploaddir, 0777 );
180
+
181
+ $files = $_FILES; // getting files
182
+
183
+ /**
184
+ * move files from the temporary directory to the specified
185
+ * and also unzip the archive and put the contents in an array
186
+ */
187
+ $data = array();
188
+ foreach( $files as $file ){
189
+ $file_name = $file['name'];
190
+ if( move_uploaded_file( $file['tmp_name'], "$uploaddir/$file_name" ) ){
191
+ if ( true === $zip_file->open( "$uploaddir/$file_name" ) ) {
192
+ for ( $file_idx = 0; $file_idx < $zip_file->numFiles; $file_idx++ ) {
193
+ $file_name = $zip_file->getNameIndex( $file_idx );
194
+ // Skip directories.
195
+ if ( '/' === substr( $file_name, -1 ) ) {
196
+ continue;
197
+ }
198
+ // Skip the __MACOSX directory.
199
+ if ( '__MACOSX/' === substr( $file_name, 0, 9 ) ) {
200
+ continue;
201
+ }
202
+ $data_one = $zip_file->getFromIndex( $file_idx );
203
+ if ( false === $data_one ) {
204
+ continue;
205
+ }
206
+ $extension = '';
207
+ if( class_exists( 'SplFileInfo', false ) ) {
208
+ $info = new \SplFileInfo( $file_name );
209
+ $extension = $info->getExtension();
210
+ }
211
+
212
+ $data[$file_idx] = [$extension, $data_one];
213
+ };
214
+ $zip_file->close();
215
+ } else {
216
+ @unlink( $uploaddir. '/' . $file['name'] );
217
+ }
218
+ }
219
+ @unlink( $uploaddir. '/' . $file['name'] );
220
+ }
221
+
222
+ rmdir( $uploaddir );
223
+
224
+ $data = $data && is_array( $data ) && count( $data ) > 0 ? ['success', $data] : ['unsuccess', 'failed to process file'];
225
+
226
+ die( json_encode( $data ) );
227
+ } else {
228
+ die( json_encode( ['unsuccess', 'PHP Zip Archive Parser is unavailable'] ) );
229
+ }
230
+ } else {
231
+ die( json_encode( ['unsuccess', 'Security problem'] ) );
232
+ }
233
+ }
234
+
235
+
236
+ /**
237
+ * Check permission if able to process
238
+ *
239
+ * @since 1.1.6
240
+ *
241
+ * @return void
242
+ */
243
+ public function permission_check() {
244
+ if ( ! current_user_can( 'manage_options' ) ) {
245
+ wp_send_json_error( __( 'Missing permission for you.', 'wp_table_builder' ) );
246
+ }
247
+ }
248
+
249
+ /**
250
+ * Adds functions to event handlers and filtering functionsc
251
+ * for displaying necessary content.
252
+ *
253
+ * @since 1.1.6
254
+ */
255
+ public function import_from_table_press() {
256
+
257
+ if( ! class_exists( 'TablePress' ) ) {
258
+ wp_die( json_encode( ["unsuccess", "TablePress is not installed"] ) );
259
+ }
260
+
261
+ $table_press_option = get_option( 'tablepress_tables' );
262
+
263
+ if( $table_press_option === false ) {
264
+ wp_die( json_encode( ["unsuccess", "There are no tables created in TablePress"] ) );
265
+ } else {
266
+ $table_press_option = json_decode( $table_press_option, true );
267
+
268
+ if( ! is_array( $table_press_option ) ||
269
+ ! array_key_exists( 'table_post', $table_press_option ) ||
270
+ ! is_array( $table_press_option['table_post'] )) {
271
+
272
+ wp_die( json_encode( ["unsuccess", "Import Problems"] ) );
273
+
274
+ }
275
+
276
+ $table_post = $table_press_option['table_post'];
277
+
278
+ if( count( $table_post ) == 0 ) {
279
+ wp_die( json_encode( ["unsuccess", "There are no tables created in TablePress"] ) );
280
+ }
281
+
282
+ $data = array();
283
+ foreach ( $table_post as $table_id => $post_id ) {
284
+ $table_id = ( string ) $table_id;
285
+
286
+ $post_id = ( string ) $post_id;
287
+ $post = get_post( $post_id );
288
+ $table_content = '';
289
+ if( $post && is_object( $post ) && property_exists( $post, 'post_content' ) ) {
290
+ $table_content = $post->post_content;
291
+ $table_content = json_decode( $table_content );
292
+ if( ! $table_content ) $table_content = '';
293
+
294
+ if( $table_content && is_array( $table_content ) ) {
295
+ $pattern = get_shortcode_regex();
296
+ for( $i = 0; $i < count( $table_content ); $i++ ) {
297
+ $row_content = $table_content[$i];
298
+ if( $row_content && is_array( $row_content ) ) {
299
+ for ( $j = 0; $j < count( $row_content ); $j++ ) {
300
+ $td_content = $row_content[$j];
301
+
302
+ if ( $td_content && preg_match_all( '/'. $pattern .'/s', $td_content, $matches ) ) {
303
+
304
+ for( $k = 0; $k < count( $matches[0] ); $k++ ) {
305
+ $td_content = str_replace( $matches[0][$k] ,
306
+ '<wptb_shortcode_container_element>' . $matches[0][$k] . '</wptb_shortcode_container_element>' ,
307
+ $td_content );
308
+ }
309
+
310
+ $table_content[$i][$j] = $td_content;
311
+ }
312
+ }
313
+ }
314
+ }
315
+ }
316
+ }
317
+
318
+ $data[] = ['[table id=' . $table_id . ' /]', $table_content];
319
+ }
320
+
321
+
322
+ wp_die( json_encode( ["success", $data] ) );
323
+ }
324
+ }
325
+
326
+ /**
327
+ * Check if the current page request meets the requirements for the table preview page.
328
+ *
329
+ * @since 1.0.1
330
+ *
331
+ * @return bool
332
+ */
333
+ public function is_import_iframe_page() {
334
+
335
+ // if this is a preview page, then continue
336
+ if ( ( ! isset( $_GET['post_type'] ) || empty( $_GET['post_type'] ) ) ||
337
+ ( ! isset( $_GET['shortcode'] ) || empty( $_GET['shortcode'] ) ) ) {
338
+ return false;
339
+ } elseif ( sanitize_text_field( $_GET['post_type'] ) !== 'wptb-tables-import' ) {
340
+ return false;
341
+ }
342
+
343
+ // if the user is authorized and if user rights are valid
344
+ if ( ! is_user_logged_in() || ! Helpers::wptb_current_user_can() ) {
345
+ return false;
346
+ }
347
+
348
+ // Check nonce
349
+ if ( ! isset( $_GET['_wpnonce'] ) || empty( $_GET['_wpnonce'] ) ) {
350
+ return false;
351
+ }
352
+ $nonce = sanitize_text_field( $_GET['_wpnonce'] );
353
+ if ( ! $nonce || ! wp_verify_nonce( $nonce, 'wptb-import-security-nonce' ) ) {
354
+ return false;
355
+ }
356
+
357
+ return true;
358
+
359
+ }
360
+
361
+ /**
362
+ * Adds functions to event handlers and filtering functions
363
+ * for displaying necessary content.
364
+ *
365
+ * @since 1.1.6
366
+ */
367
+ public function hooks() {
368
+
369
+ add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
370
+
371
+ //add_filter( 'the_title', array( $this, 'the_title' ), 100 );
372
+
373
+ add_filter( 'the_content', array( $this, 'the_content' ), 999 );
374
+
375
+ add_filter( 'get_the_excerpt', array( $this, 'the_content' ), 999 );
376
+
377
+ add_filter( 'template_include', array( $this, 'template_include' ) );
378
+
379
+ add_filter( 'post_thumbnail_html', '__return_empty_string' );
380
+
381
+ }
382
+
383
+ /**
384
+ * Modify query, limit for one post.
385
+ *
386
+ * @since 1.0.1
387
+ *
388
+ * @param $query The WP_Query instance.
389
+ */
390
+ public function pre_get_posts( $query ) {
391
+
392
+ if ( $_GET['post_type'] && $query->is_main_query() ) {
393
+ $query->set( 'posts_per_page', 1 );
394
+ }
395
+ }
396
+
397
+ /**
398
+ * Change page title for table preview
399
+ *
400
+ * @since 1.0.1
401
+ *
402
+ * @param string $title Page title.
403
+ *
404
+ * @return string
405
+ */
406
+ public function the_title( $title ) {
407
+
408
+ if( ( is_singular( 'post' ) || is_singular( 'page' ) ) && in_the_loop() ) {
409
+ $title = sprintf(
410
+ esc_html__( '%s Preview', 'wp-table-builder' ),
411
+ ! empty( $this->table_data->post_title ) ? sanitize_text_field( $this->table_data->post_title ) : esc_html__( 'Table', 'wp-table-builder' )
412
+ );
413
+ }
414
+
415
+ return $title;
416
+
417
+ }
418
+
419
+ /**
420
+ * Change page content for table preview.
421
+ *
422
+ * @since 1.1.6
423
+ *
424
+ * @return string
425
+ */
426
+ public function the_content() {
427
+
428
+ return do_shortcode( sanitize_text_field( $_GET['shortcode'] ) );
429
+
430
+ }
431
+
432
+ /**
433
+ * Forced inclusion of page templates.
434
+ *
435
+ * @since 1.1.6
436
+ *
437
+ * @return array
438
+ */
439
+ public function template_include() {
440
+
441
+ return locate_template( array( 'single.php', 'singular.php', 'index.php' ) );
442
+
443
+ }
444
+ }
inc/admin/class-preview.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WP_Table_Builder\Inc\Admin;
4
+ use WP_Table_Builder\Inc\Common\Helpers;
5
+ use WP_Table_Builder\Inc\Admin\Tables as Tables;
6
+ use WP_Table_Builder as NS;
7
+
8
+ /**
9
+ * Show preview table
10
+ *
11
+ * @link http://wptablebuilder.com/
12
+ * @since 1.0.1
13
+ *
14
+ * @author Imtiaz Rayhan
15
+ */
16
+
17
+
18
+ class Preview {
19
+
20
+ /**
21
+ * Instance to instantiate object.
22
+ *
23
+ * @since 1.0.1
24
+ *
25
+ * @var $instance
26
+ */
27
+ protected static $instance;
28
+
29
+ /**
30
+ * Table data.
31
+ *
32
+ * @since 1.0.1
33
+ *
34
+ * @var array
35
+ */
36
+ public $table_data;
37
+
38
+ /**
39
+ * Singleton pattern, making only one instance of the class.
40
+ *
41
+ * @since 1.0.1
42
+ */
43
+ public static function instance() {
44
+ if ( ! isset( self::$instance ) ) {
45
+ $className = __CLASS__;
46
+ self::$instance = new $className;
47
+ }
48
+
49
+ return self::$instance;
50
+ }
51
+
52
+ /**
53
+ * Constructor.
54
+ *
55
+ * @since 1.0.1
56
+ */
57
+ private function __construct() {
58
+
59
+ if ( ! $this->is_preview_page() ) {
60
+ return;
61
+ }
62
+
63
+ $this->hooks();
64
+
65
+ }
66
+
67
+ /**
68
+ * Check if the current page request meets the requirements for the table preview page.
69
+ *
70
+ * @since 1.0.1
71
+ *
72
+ * @return bool
73
+ */
74
+ public function is_preview_page() {
75
+
76
+ // if this is a preview page, then continue
77
+ if ( ( ! isset( $_GET['post_type'] ) || empty( $_GET['post_type'] ) ) || ( ! isset( $_GET['p'] ) || empty( $_GET['p'] ) ) ) {
78
+ return false;
79
+ } elseif ( sanitize_text_field( $_GET['post_type'] ) !== 'wptb-tables' ) {
80
+ return false;
81
+ }
82
+
83
+ // if the user is authorized and if user rights are valid
84
+ if ( ! is_user_logged_in() || ! Helpers::wptb_current_user_can() ) {
85
+ return false;
86
+ }
87
+
88
+ $this->table_data = $this->get_table_data( absint( $_GET['p'] ) );
89
+
90
+ // Check if the form is available
91
+ if ( empty( $this->table_data ) ) {
92
+ return false;
93
+ }
94
+
95
+ return true;
96
+
97
+ }
98
+
99
+ public function get_table_data( $id ) {
100
+
101
+ if ( false === $id ) {
102
+ return false;
103
+ }
104
+
105
+ if ( ! empty( $id ) ) {
106
+ $post = get_post( $id );
107
+ // Check nonce
108
+ if ( ! isset( $_GET['_wpnonce'] ) || empty( $_GET['_wpnonce'] ) ) {
109
+ return false;
110
+ }
111
+ $nonce = sanitize_text_field( $_GET['_wpnonce'] );
112
+ if( $nonce && wp_verify_nonce( $nonce, 'wptb_nonce_table' ) ) {
113
+ $post = ! empty( $post ) && 'wptb-tables' === $post->post_type && get_post_meta( $id, '_wptb_content_', true ) ? $post : false;
114
+ } else if( $nonce && wp_verify_nonce( $nonce, 'wptb_nonce_table_preview' ) ) {
115
+ $time_over = false;
116
+ if ( ! isset( $_GET['preview_id'] ) || empty( $_GET['preview_id'] ) ) {
117
+ return false;
118
+ }
119
+ $preview_id = absint( $_GET['preview_id'] );
120
+ $preview_id_meta = get_post_meta( $id, '_wptb_preview_id_', true );
121
+ $ts = isset( $_GET['ts'] ) && ! empty( $_GET['ts'] ) ? absint( $_GET['ts'] ) : '';
122
+ if( ! $ts ) {
123
+ $ts = 1;
124
+ } else {
125
+ if( $ts < 10 ) {
126
+ $ts += 1;
127
+ } else {
128
+ $time_over = true;
129
+ }
130
+ }
131
+
132
+ if( $preview_id_meta != $preview_id && ! $time_over ) {
133
+ echo '<div style="display:table; width:100%; height:100%;">'
134
+ . '<div style="display:table-cell; width:100%; vertical-align:middle; text-align:center;"><img src="' . wp_normalize_path( NS\WP_TABLE_BUILDER_URL . 'inc/admin/views/builder/icons/icon-128x128.png' ) . '">'
135
+ . '<p>' . __( 'Generating preview...', 'wp-table-builder' ) . '</p></div>'
136
+ . '</div>';
137
+ echo '<script>setTimeout( function() {'
138
+ . 'let newHref = new URL( "' . get_site_url() . $_SERVER['REQUEST_URI'] . '" );'
139
+ . 'newHref.searchParams.set( "ts", ' . $ts . ' );'
140
+ . 'window.location.href=newHref.toString();'
141
+ . '} , 1000 );</script>';
142
+ die();
143
+ }
144
+
145
+ $post = ! empty( $post ) && 'wptb-tables' === $post->post_type && get_post_meta( $id, '_wptb_content_preview_', true ) ? $post : false;
146
+ }
147
+
148
+ }
149
+
150
+ if ( empty( $post ) ) {
151
+ return false;
152
+ }
153
+
154
+ return $post;
155
+
156
+ }
157
+
158
+ /**
159
+ * Adds functions to event handlers and filtering functions
160
+ * for displaying necessary content.
161
+ *
162
+ * @since 1.0.1
163
+ */
164
+ public function hooks() {
165
+
166
+ add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
167
+
168
+ add_filter( 'the_title', array( $this, 'the_title' ), 100 );
169
+
170
+ add_filter( 'the_content', array( $this, 'the_content' ), 999 );
171
+
172
+ add_filter( 'get_the_excerpt', array( $this, 'the_content' ), 999 );
173
+
174
+ //add_filter( 'template_include', array( $this, 'template_include' ) );
175
+
176
+ add_filter( 'post_thumbnail_html', '__return_empty_string' );
177
+
178
+ }
179
+
180
+ /**
181
+ * Modify query, limit for one post.
182
+ *
183
+ * @since 1.0.1
184
+ *
185
+ * @param $query The WP_Query instance.
186
+ */
187
+ public function pre_get_posts( $query ) {
188
+
189
+ if ( ! is_admin() && $query->is_main_query() ) {
190
+ $query->set( 'posts_per_page', 1 );
191
+ }
192
+
193
+ }
194
+
195
+ /**
196
+ * Change page title for table preview
197
+ *
198
+ * @since 1.0.1
199
+ *
200
+ * @param string $title Page title.
201
+ *
202
+ * @return string
203
+ */
204
+ public function the_title( $title ) {
205
+
206
+ if( ( is_singular( 'post' ) || is_singular( 'page' ) ) && in_the_loop() ) {
207
+ $title = sprintf(
208
+ esc_html__( '%s Preview', 'wp-table-builder' ),
209
+ ! empty( $this->table_data->post_title ) ? sanitize_text_field( $this->table_data->post_title ) : esc_html__( 'Table', 'wp-table-builder' )
210
+ );
211
+ }
212
+
213
+ return $title;
214
+
215
+ }
216
+
217
+ /**
218
+ * Change page content for table preview.
219
+ *
220
+ * @since 1.0.1
221
+ *
222
+ * @return string
223
+ */
224
+ public function the_content() {
225
+
226
+ $message = esc_html__( 'This is a preview of your table. This page is not publicly accessible.', 'wp-table-builder' );
227
+
228
+ do_action( 'wptb_frontend_enqueue_style' );
229
+ do_action( 'wptb_frontend_enqueue_script' );
230
+
231
+ // Check nonce
232
+ $nonce = sanitize_text_field( $_GET['_wpnonce'] );
233
+ if( $nonce && wp_verify_nonce( $nonce, 'wptb_nonce_table' ) ) {
234
+ $html = get_post_meta( absint( $this->table_data->ID ) , '_wptb_content_', true );
235
+ } else if( $nonce && wp_verify_nonce( $nonce, 'wptb_nonce_table_preview' ) ) {
236
+ $html = get_post_meta( absint( $this->table_data->ID ) , '_wptb_content_preview_', true );
237
+ }
238
+
239
+ if ( preg_match_all( '|<wptb_shortcode_container_element(.+)</wptb_shortcode_container_element>|isU', $html, $arr ) ) {
240
+ foreach ( $arr[1] as $value ) {
241
+ if( ! isset( $args['internal_shortcodes_stop'] ) && $value ) {
242
+ $pattern = get_shortcode_regex();
243
+
244
+ if ( preg_match_all( '/'. $pattern .'/s', $value, $matches ) ) {
245
+
246
+ for( $i = 0; $i < count( $matches[0] ); $i++ ) {
247
+ $shortcode = $matches[0][$i];
248
+ if( isset( $matches[2][$i] ) && $matches[2][$i] == 'wptb' ) {
249
+
250
+ $shortcode = str_replace( ']' , ' internal_shortcodes_stop="1"]' , $matches[0][$i] );
251
+
252
+ $div_outer_html_new = str_replace( $matches[0][$i] , $shortcode , $value );
253
+
254
+ $html = str_replace( $value, $div_outer_html_new, $html );
255
+
256
+ $html = str_replace( $div_outer_html_new, do_shortcode( $div_outer_html_new ), $html );
257
+ } else {
258
+ $html = str_replace( $value, do_shortcode( $value ), $html );
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+
266
+ //$content = do_shortcode( $content );
267
+ $html = '<div class="wptb-table-container wptb-table-' . absint( $this->table_data->ID ) . '">'
268
+ . '<div style="text-align:center;">' . $message . '</div>'
269
+ . '<div class="wptb-table-container-matrix">' . $html . '</div>'
270
+ . '</div>';
271
+
272
+ return $html;
273
+
274
+ }
275
+
276
+ /**
277
+ * Forced inclusion of page templates.
278
+ *
279
+ * @since 1.0.1
280
+ *
281
+ * @return array
282
+ */
283
+ public function template_include() {
284
+
285
+ return locate_template( array( 'single.php', 'singular.php', 'index.php' ) );
286
+
287
+ }
288
+
289
+ }
inc/admin/class-tables.php CHANGED
@@ -67,6 +67,11 @@ class Tables {
67
 
68
  }
69
  }
 
 
 
 
 
70
 
71
  /**
72
  * Registers the custom post type to be used for table.
@@ -96,7 +101,11 @@ class Tables {
96
  add_shortcode( 'wptb', array( $this, 'get_table' ) );
97
  }
98
 
99
- public function get_table( $args ) {
 
 
 
 
100
  do_action( 'wptb_frontend_enqueue_style' );
101
  do_action( 'wptb_frontend_enqueue_script' );
102
  $html = get_post_meta( $args['id'] , '_wptb_content_', true );
@@ -127,7 +136,7 @@ class Tables {
127
  }
128
  }
129
  }
130
-
131
  $post_edit_link = '';
132
  if( current_user_can( 'manage_options' ) ){
133
  $post_edit_link = '<div class="wptb-frontend-table-edit-link">'
67
 
68
  }
69
  }
70
+
71
+ public function table_exists ( $table_id ) {
72
+ $table_content = get_post_meta( $table_id , '_wptb_content_', true );
73
+ return ! empty( $table_content );
74
+ }
75
 
76
  /**
77
  * Registers the custom post type to be used for table.
101
  add_shortcode( 'wptb', array( $this, 'get_table' ) );
102
  }
103
 
104
+ public function get_table( $args ) {
105
+ if( ! $this->table_exists( $args['id'] ) ) {
106
+ return '[wptb id="' . $args['id'] . '" not found ]';
107
+ }
108
+
109
  do_action( 'wptb_frontend_enqueue_style' );
110
  do_action( 'wptb_frontend_enqueue_script' );
111
  $html = get_post_meta( $args['id'] , '_wptb_content_', true );
136
  }
137
  }
138
  }
139
+
140
  $post_edit_link = '';
141
  if( current_user_can( 'manage_options' ) ){
142
  $post_edit_link = '<div class="wptb-frontend-table-edit-link">'
inc/admin/controls/control-alignment.php CHANGED
@@ -247,7 +247,6 @@ class Control_Alignment extends Base_Control {
247
  getSetElementValue( selectors, this.dataset.alignmentValue );
248
 
249
  let details = {value: this.dataset.alignmentValue};
250
- console.log( '{{{targetAddClass}}}' );
251
  WPTB_Helper.wptbDocumentEventGenerate( 'wptb-control:{{{targetAddClass}}}', selectorElement, details );
252
  }
253
 
247
  getSetElementValue( selectors, this.dataset.alignmentValue );
248
 
249
  let details = {value: this.dataset.alignmentValue};
 
250
  WPTB_Helper.wptbDocumentEventGenerate( 'wptb-control:{{{targetAddClass}}}', selectorElement, details );
251
  }
252
 
inc/admin/controls/control-color.php CHANGED
@@ -122,7 +122,7 @@ class Control_Color extends Base_Control {
122
  if( '{{{selectorsJson}}}' ) {
123
  let selectors = JSON.parse( '{{{selectorsJson}}}' );
124
 
125
- let thisColorCss;
126
  for( let i = 0; i < selectors.length; i++ ) {
127
  if( selectors[i] && Array.isArray( selectors[i] ) && selectors[i][0] && selectors[i][1] ) {
128
  let selectorElements = document.querySelectorAll( selectors[i][0] );
@@ -140,6 +140,7 @@ class Control_Color extends Base_Control {
140
  if( ! WPTB_Helper.isHex( thisColorCss ) ) {
141
  thisColorCss = '';
142
  }
 
143
  selectorElements[j].style[selectors[i][1][k]] = thisColorCss;
144
  }
145
  }
@@ -165,7 +166,28 @@ class Control_Color extends Base_Control {
165
  }
166
  }
167
  }
168
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  jQuery( '.{{{targetInputAddClass}}}' ).wpColorPicker({
170
  change: function ( event, ui ) {
171
  let uiColor;
@@ -175,57 +197,32 @@ class Control_Color extends Base_Control {
175
  uiColor = '';
176
  }
177
 
178
- for( let i = 0; i < selectors.length; i++ ) {
179
- if( selectors[i] && Array.isArray( selectors[i] ) && selectors[i][0] && selectors[i][1] ) {
180
- let selectorElements = document.querySelectorAll( selectors[i][0] );
181
- if( selectorElements.length > 0 ) {
182
- for( let j = 0; j < selectorElements.length; j++ ) {
183
- if( selectors[i][1] ) {
184
- if( Array.isArray( selectors[i][1] ) ) {
185
- for( let k = 0; k < selectors[i][1].length; k++ ) {
186
- selectorElements[j].style[selectors[i][1][k]] = uiColor;
187
- }
188
- } else {
189
- selectorElements[j].style[selectors[i][1]] = uiColor;
190
- }
191
- }
192
- }
193
- }
194
- }
195
- }
196
 
197
  let targetInput = document.getElementsByClassName( '{{{targetInputAddClass}}}' );
198
  if( targetInput.length > 0 ) {
199
  targetInput = targetInput[0];
200
  targetInput.value = uiColor;
201
  }
 
202
  WPTB_Helper.wptbDocumentEventGenerate( 'wptb-control:{{{targetInputAddClass}}}', selectorElement );
203
  wpColorPickerCheckChangeForTableStateSaving( event );
204
  },
205
  clear: function( event ) {
206
- for( let i = 0; i < selectors.length; i++ ) {
207
- if( selectors[i] && Array.isArray( selectors[i] ) && selectors[i][0] && selectors[i][1] ) {
208
- let selectorElements = document.querySelectorAll( selectors[i][0] );
209
- if( selectorElements.length > 0 ) {
210
- for( let j = 0; j < selectorElements.length; j++ ) {
211
- if( selectors[i][1] ) {
212
- if( Array.isArray( selectors[i][1] ) ) {
213
- for( let k = 0; k < selectors[i][1].length; k++ ) {
214
- selectorElements[j].style[selectors[i][1][k]] = '';
215
- }
216
- } else {
217
- selectorElements[j].style[selectors[i][1]] = '';
218
- }
219
- }
220
- }
221
- }
222
- }
223
- }
224
-
225
  WPTB_Helper.wptbDocumentEventGenerate( 'wptb-control:{{{targetInputAddClass}}}', selectorElement );
226
  wpColorPickerCheckChangeForTableStateSaving( event );
227
  }
228
  });
 
 
 
 
 
 
 
 
229
  }
230
  }
231
  } )();
122
  if( '{{{selectorsJson}}}' ) {
123
  let selectors = JSON.parse( '{{{selectorsJson}}}' );
124
 
125
+ let thisColorCss, thisColorCssHex;
126
  for( let i = 0; i < selectors.length; i++ ) {
127
  if( selectors[i] && Array.isArray( selectors[i] ) && selectors[i][0] && selectors[i][1] ) {
128
  let selectorElements = document.querySelectorAll( selectors[i][0] );
140
  if( ! WPTB_Helper.isHex( thisColorCss ) ) {
141
  thisColorCss = '';
142
  }
143
+
144
  selectorElements[j].style[selectors[i][1][k]] = thisColorCss;
145
  }
146
  }
166
  }
167
  }
168
  }
169
+
170
+ function elementColorSet( selectors, color ) {
171
+ for( let i = 0; i < selectors.length; i++ ) {
172
+ if( selectors[i] && Array.isArray( selectors[i] ) && selectors[i][0] && selectors[i][1] ) {
173
+ let selectorElements = document.querySelectorAll( selectors[i][0] );
174
+ if( selectorElements.length > 0 ) {
175
+ for( let j = 0; j < selectorElements.length; j++ ) {
176
+ if( selectors[i][1] ) {
177
+ if( Array.isArray( selectors[i][1] ) ) {
178
+ for( let k = 0; k < selectors[i][1].length; k++ ) {
179
+ selectorElements[j].style[selectors[i][1][k]] = color;
180
+ }
181
+ } else {
182
+ selectorElements[j].style[selectors[i][1]] = color;
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ }
190
+
191
  jQuery( '.{{{targetInputAddClass}}}' ).wpColorPicker({
192
  change: function ( event, ui ) {
193
  let uiColor;
197
  uiColor = '';
198
  }
199
 
200
+ elementColorSet( selectors, uiColor );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
  let targetInput = document.getElementsByClassName( '{{{targetInputAddClass}}}' );
203
  if( targetInput.length > 0 ) {
204
  targetInput = targetInput[0];
205
  targetInput.value = uiColor;
206
  }
207
+
208
  WPTB_Helper.wptbDocumentEventGenerate( 'wptb-control:{{{targetInputAddClass}}}', selectorElement );
209
  wpColorPickerCheckChangeForTableStateSaving( event );
210
  },
211
  clear: function( event ) {
212
+ elementColorSet( selectors, '' );
213
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  WPTB_Helper.wptbDocumentEventGenerate( 'wptb-control:{{{targetInputAddClass}}}', selectorElement );
215
  wpColorPickerCheckChangeForTableStateSaving( event );
216
  }
217
  });
218
+
219
+ let targetInputAddClass = document.querySelector( '.{{{targetInputAddClass}}}' );
220
+ if( targetInputAddClass ) {
221
+ targetInputAddClass.addEventListener( 'controlColor:change', function( e ) {
222
+ let color = e.detail.value;
223
+ elementColorSet( selectors, color );
224
+ } );
225
+ }
226
  }
227
  }
228
  } )();
inc/admin/controls/control-number.php CHANGED
@@ -147,7 +147,6 @@ class Control_Number extends Base_Control {
147
 
148
  let selectorElementSettingValue;
149
  if( '{{{selectorsJson}}}' ) {
150
- console.log( "Hello" );
151
  let selectors = JSON.parse( '{{{selectorsJson}}}' );
152
 
153
  selectorElementSettingValue = getSetElementValue( selectors );
147
 
148
  let selectorElementSettingValue;
149
  if( '{{{selectorsJson}}}' ) {
 
150
  let selectors = JSON.parse( '{{{selectorsJson}}}' );
151
 
152
  selectorElementSettingValue = getSetElementValue( selectors );
inc/admin/controls/control-size.php CHANGED
@@ -180,7 +180,6 @@ class Control_Size extends Base_Control {
180
  }
181
 
182
  function getSetElementValue(selectors, value) {
183
- console.log( "Hello 123" );
184
  if (selectors && Array.isArray(selectors)) {
185
  for (let i = 0; i < selectors.length; i++) {
186
  if (selectors[i] && Array.isArray(selectors[i]) && typeof selectors[i][0] != 'undefined' && selectors[i][1] != 'undefined') {
180
  }
181
 
182
  function getSetElementValue(selectors, value) {
 
183
  if (selectors && Array.isArray(selectors)) {
184
  for (let i = 0; i < selectors.length; i++) {
185
  if (selectors[i] && Array.isArray(selectors[i]) && typeof selectors[i][0] != 'undefined' && selectors[i][1] != 'undefined') {
inc/admin/css/admin-import.css ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wptb-importWrap {
2
+ margin-top: 50px;
3
+ }
4
+
5
+ .wptb-importCommonOptions table {
6
+ border: 2px solid black;
7
+ }
8
+
9
+ .wptb-importCommonOptions table td {
10
+ padding: 10px;
11
+ vertical-align: middle;
12
+ }
13
+ #wptb-importFormWrap table td {
14
+ padding: 7px 0px;
15
+ vertical-align: middle;
16
+ }
17
+ .wptb-importFromPluginsContainer table td {
18
+ padding: 10px 25px 10px 0px;
19
+ vertical-align: middle;
20
+ }
21
+
22
+ #wptb-importIframeSection {
23
+ width: 1px;
24
+ height: 1px;
25
+ overflow: auto;
26
+ }
27
+ .wptb-importPBarContainer {
28
+ background-color: rgba(255, 255, 255, 0.85);
29
+ height: 100%;
30
+ text-align: center;
31
+ position: fixed;
32
+ top: 0;
33
+ left: 0;
34
+ right: 0;
35
+ bottom: 0;
36
+ visibility: hidden;
37
+ opacity: 0;
38
+ transition: visibility 0s linear 0.5s,opacity 0.5s linear;
39
+ display: none;
40
+ }
41
+
42
+ .wptb-importPBarContainer.wptb-importPBarContainerActive {
43
+ display: block;
44
+ visibility:visible;
45
+ opacity:1;
46
+ transition-delay:0s;
47
+ }
48
+
49
+ .wptb-importPBarProgress {
50
+ width: 400px;
51
+ padding: 4px;
52
+ background: rgba(0, 0, 0, 0.25);
53
+ border-radius: 2px;
54
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25), 0 1px rgba(255, 255, 255, 0.08);
55
+ position: absolute;
56
+ top: 50%;
57
+ left: calc(50% - 200px);
58
+ }
59
+
60
+ .wptb-nameProcessInBarProgress {
61
+ position: absolute;
62
+ left: 0;
63
+ top: 0;
64
+ right: 0;
65
+ bottom: 0;
66
+ line-height: 25px;
67
+ color: #fff;
68
+ letter-spacing: 5px;
69
+ }
70
+
71
+ #wptb-pBarPercent {
72
+ height: 20px;
73
+ border-radius: 1px;
74
+ background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
75
+ transition: 0.4s linear;
76
+ transition-property: width, background-color;
77
+ box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.1);
78
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
79
+ -webkit-background-size: 40px 40px;
80
+ background-size: 40px 40px;
81
+ background-color: #188fd1;
82
+ position: relative;
83
+ z-index: 1;
84
+ }
85
+
86
+ .wptb-importedTablesSetting,
87
+ .wptb-importedTablesShortcodesReplaced {
88
+ display: none;
89
+ }
90
+
91
+ .wptb-importMessage.wptb-importedTablesCount,
92
+ .wptb-importMessage.wptb-importedShortcodesReplaceCount {
93
+ margin-top: 15px;
94
+ margin-bottom: 15px;
95
+ font-size: 20px;
96
+ }
97
+ .wptb-importedTablesShortcodesList {
98
+ margin-top: 15px;
99
+ margin-bottom: 15px;
100
+ overflow: auto;
101
+ max-width: 500px;
102
+ }
103
+
104
+ .wptb-importedTablesShortcodesList table {
105
+ border-collapse: collapse;
106
+ width: 100%;
107
+ }
108
+
109
+ .wptb-importedTablesShortcodesList th,
110
+ .wptb-importedTablesShortcodesList td {
111
+ border: 3px solid #188fd1;
112
+ padding: 10px 30px;
113
+ text-align: center;
114
+ vertical-align: middle;
115
+ }
116
+
117
+ .wptb-importedTablesShortcodesList th h3 {
118
+ margin: 0px;
119
+
120
+ }
121
+
122
+ .wpcd-pbar-radio {
123
+ display: none;
124
+ }
125
+
126
+ .wpcd-pbar-label {
127
+ display: inline-block;
128
+ margin: 0 5px 20px;
129
+ padding: 3px 8px;
130
+ color: #aaa;
131
+ text-shadow: 0 1px black;
132
+ border-radius: 3px;
133
+ cursor: pointer;
134
+ }
135
+
136
+ .wpcd-pbar-radio+.wpcd-pbar-label {
137
+ color: white;
138
+ background: rgba(0, 0, 0, 0.25);
139
+ }
140
+
141
+ #wpcd-pbar-percent {
142
+ color: white;
143
+ width: 1px;
144
+ }
145
+
inc/admin/css/admin.css CHANGED
@@ -8,7 +8,7 @@ html {
8
  overflow-y: hidden;
9
  }
10
 
11
- body>img {
12
  position: absolute;
13
  z-index: 1000001;
14
  }
@@ -117,7 +117,8 @@ body>img {
117
  }
118
 
119
  .wptb-undo:hover,
120
- .wptb-redo:hover {}
 
121
 
122
  .wptb-undoredo-disabled {
123
  cursor: default;
@@ -233,7 +234,7 @@ body>img {
233
  transition: all 0.3s;
234
  }
235
 
236
- .wptb-popup-window-modal.wptb-popup-show~.wptb-popup-dark-area {
237
  visibility: visible;
238
  opacity: .6;
239
  }
@@ -382,10 +383,14 @@ body>img {
382
  background-color: #eb4c63;
383
  }
384
 
385
- #wptb-table-edit-mode-close {
 
 
 
 
 
386
  background: #329d3f;
387
  color: #fff;
388
- float: right;
389
  }
390
 
391
  .wptb-edit-bar svg {
@@ -451,13 +456,6 @@ body>img {
451
  display: block;
452
  }
453
 
454
- #wptb-left-scroll-panel-curtain-close {
455
- margin: auto;
456
- display: block;
457
- background: #329d3f;
458
- color: #fff;
459
- }
460
-
461
  .wptb-panel-left {
462
  position: relative;
463
  height: 100%;
@@ -699,8 +697,7 @@ input[type="range"]::-webkit-slider-thumb {
699
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #ffffff));
700
  /* android <= 2.2 */
701
  background-image: -webkit-linear-gradient(top, #ffffff 0, #ffffff 100%);
702
- /* older mobile safari and android > 2.2 */
703
- ;
704
  background-image: linear-gradient(to bottom, #ffffff 0, #ffffff 100%);
705
  /* W3C */
706
  }
@@ -733,12 +730,12 @@ input[type="range"]::-ms-thumb {
733
  display: none;
734
  }
735
 
736
- .wptb-toggle input:checked+i::after {
737
  -webkit-transform: translateX(20px);
738
  transform: translateX(20px);
739
  }
740
 
741
- .wptb-toggle input:checked+i {
742
  background: #3B7EC0;
743
  }
744
 
@@ -767,14 +764,14 @@ input[type="range"]::-ms-thumb {
767
  transition: .25s;
768
  }
769
 
770
- .wptb-toggle.wptb-column-width-fix-auto input:checked+i::after,
771
- .wptb-toggle.wptb-size-fixed-auto input:checked+i::after{
772
  -webkit-transform: translateX(50px);
773
  transform: translateX(50px);
774
  }
775
 
776
  .wptb-toggle.wptb-column-width-fix-auto i,
777
- .wptb-toggle.wptb-size-fixed-auto i{
778
  float: left;
779
  width: 100px;
780
  border-radius: 5px;
@@ -782,7 +779,7 @@ input[type="range"]::-ms-thumb {
782
  }
783
 
784
  .wptb-toggle.wptb-column-width-fix-auto i:after,
785
- .wptb-toggle.wptb-size-fixed-auto i:after{
786
  width: 50px;
787
  height: 25px;
788
  border-radius: 5px;
@@ -971,13 +968,13 @@ ul.wptb-tabs {
971
  width: 47.5%;
972
  float: left;
973
  margin: 6px 0 -4px 6px;
974
- }
975
 
976
  .wptb-element:nth-child(even) {
977
  width: 47.5%;
978
  float: right;
979
  margin: 6px 5px -4px 0;
980
- }
981
 
982
  .wptb-element p {
983
  margin: 0;
@@ -1068,7 +1065,7 @@ ul.wptb-tabs {
1068
  background: -moz-linear-gradient(45deg, #4caf50 0%, #8bc34a 100%);
1069
  background: -webkit-linear-gradient(45deg, #4caf50 0%, #8bc34a 100%);
1070
  background: linear-gradient(45deg, #4caf50 0%, #8bc34a 100%);
1071
- filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#4caf50', endColorstr='#8bc34a', GradientType=1);
1072
  height: auto;
1073
  }
1074
 
@@ -1077,7 +1074,7 @@ ul.wptb-tabs {
1077
  background: -moz-linear-gradient(45deg, #f44336 0%, #ff5722 100%);
1078
  background: -webkit-linear-gradient(45deg, #f44336 0%, #ff5722 100%);
1079
  background: linear-gradient(45deg, #f44336 0%, #ff5722 100%);
1080
- filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#f44336', endColorstr='#ff5722', GradientType=1);
1081
  height: auto;
1082
  }
1083
 
@@ -1177,16 +1174,20 @@ table.wptb-table {
1177
  padding: 14px 0 7px;
1178
  display: block;
1179
  }
 
1180
  .wptb-row.wptb-table-header {
1181
  padding: 0;
1182
  height: 6px;
1183
  }
 
1184
  .wptb-row.wptb-table-header .wptb-cell {
1185
  display: none;
1186
  }
 
1187
  .wptb-row .wptb-cell {
1188
  margin-bottom: 10px;
1189
  }
 
1190
  .wptb-row .wptb-cell:before {
1191
  margin-bottom: 3px;
1192
  content: attr(data-title);
@@ -1225,7 +1226,7 @@ table.wptb-table {
1225
  width: auto;
1226
  }
1227
 
1228
- .wptb-preview-table-manage-cells tbody>tr>td::after {
1229
  content: '';
1230
  display: block;
1231
  position: absolute;
@@ -1416,7 +1417,7 @@ table.wptb-table {
1416
  justify-content: center;
1417
  }
1418
 
1419
- .wptb-button-wrapper>a {
1420
  text-decoration: none;
1421
  max-width: 100%;
1422
  }
@@ -1510,7 +1511,7 @@ table.wptb-table {
1510
  display: inline-block;
1511
  }
1512
 
1513
- #wpcd_fixed_toolbar>div.toolbar-active {
1514
  display: block !important;
1515
  }
1516
 
@@ -1599,7 +1600,7 @@ table.wptb-table {
1599
  }
1600
 
1601
  br[data-mce-bogus="1"] {
1602
- display:none;
1603
  }
1604
 
1605
  .wptb-droppable.wptb-cell ul,
@@ -1638,7 +1639,7 @@ br[data-mce-bogus="1"] {
1638
  line-height: 30px;
1639
  }
1640
 
1641
- .wptb-list-container ul li>div>p::before {
1642
  content: attr(data-list-style-type-index);
1643
  display: inline-block;
1644
  line-height: 30px;
@@ -1648,23 +1649,23 @@ br[data-mce-bogus="1"] {
1648
  cursor: text;
1649
  }
1650
 
1651
- .wptb-list-container ul li>div>p::before {
1652
  padding-right: 10px;
1653
  }
1654
 
1655
- .wptb-list-container ul li>div>p.wptb-list-style-type-disc::before {
1656
  content: '\25CF';
1657
  }
1658
 
1659
- .wptb-list-container ul li>div>p.wptb-list-style-type-circle::before {
1660
  content: '\25CB';
1661
  }
1662
 
1663
- .wptb-list-container ul li>div>p.wptb-list-style-type-square::before {
1664
  content: '\25A0';
1665
  }
1666
 
1667
- .wptb-list-container ul li>div>p.wptb-list-style-type-none::before {
1668
  content: '';
1669
  padding-right: 0px;
1670
  }
@@ -1822,7 +1823,7 @@ br[data-mce-bogus="1"] {
1822
  visibility: hidden;
1823
  }
1824
 
1825
- .wptb-drop-border-marker>div {
1826
  position: absolute;
1827
  background: #1ea9eb;
1828
  }
@@ -2041,7 +2042,7 @@ td[class*="wptb-fused-cell"] {
2041
  display: inline-block;
2042
  }
2043
 
2044
- .wptb-rating-stars-box ul>li.wptb-rating-star {
2045
  color: #ccc;
2046
  cursor: pointer;
2047
  margin: 0px;
@@ -2050,7 +2051,7 @@ td[class*="wptb-fused-cell"] {
2050
  height: 20px;
2051
  }
2052
 
2053
- .wptb-rating-stars-box ul>li.wptb-rating-star span {
2054
  position: absolute;
2055
  height: 100%;
2056
  width: 100%;
@@ -2059,18 +2060,18 @@ td[class*="wptb-fused-cell"] {
2059
  z-index: 10;
2060
  }
2061
 
2062
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-rating-star-left-signal-part,
2063
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-rating-star-right-signal-part {
2064
  height: 100%;
2065
  width: 50%;
2066
  z-index: 20;
2067
  }
2068
 
2069
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-rating-star-left-signal-part {
2070
  left: 0px;
2071
  }
2072
 
2073
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-rating-star-left-signal-part span.wptb-rating-star-zero-set {
2074
  left: 0px;
2075
  width: 40%;
2076
  height: 100%;
@@ -2078,91 +2079,91 @@ td[class*="wptb-fused-cell"] {
2078
  z-index: 30px;
2079
  }
2080
 
2081
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-rating-star-right-signal-part {
2082
  right: 0px;
2083
  left: auto;
2084
  }
2085
 
2086
- .wptb-rating-stars-box ul>li.wptb-rating-star span {
2087
  display: block;
2088
  }
2089
 
2090
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-filled-rating-star {
2091
  display: none;
2092
  }
2093
 
2094
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-half-filled-rating-star {
2095
  display: none;
2096
  }
2097
 
2098
- .wptb-rating-stars-box ul>li.wptb-rating-star span.wptb-not-filled-rating-star {
2099
  fill: #ccc;
2100
  }
2101
 
2102
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-hover-half span.wptb-not-filled-rating-star {
2103
  display: none;
2104
  }
2105
 
2106
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-hover-half span.wptb-half-filled-rating-star {
2107
  display: block;
2108
  fill: #FF912C;
2109
  opacity: 0.5;
2110
  }
2111
 
2112
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-hover-half span.wptb-filled-rating-star {
2113
  display: none;
2114
  }
2115
 
2116
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-hover-full span.wptb-not-filled-rating-star {
2117
  display: none;
2118
  }
2119
 
2120
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-hover-full span.wptb-half-filled-rating-star {
2121
  display: none;
2122
  }
2123
 
2124
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-hover-full span.wptb-filled-rating-star {
2125
  display: block;
2126
  fill: #FF912C;
2127
  opacity: 0.5;
2128
  }
2129
 
2130
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-half.wptb-rating-star-hover-half span,
2131
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-half.wptb-rating-star-hover-full span,
2132
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-full.wptb-rating-star-hover-half span,
2133
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-full.wptb-rating-star-hover-full span {
2134
  opacity: 1;
2135
  }
2136
 
2137
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-half span.wptb-filled-rating-star {
2138
  display: none;
2139
  }
2140
 
2141
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-half.wptb-rating-star-hover-full span.wptb-filled-rating-star {
2142
  display: block;
2143
  fill: #FF912C;
2144
  opacity: 0.5;
2145
  }
2146
 
2147
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-half span.wptb-not-filled-rating-star {
2148
  display: none;
2149
  }
2150
 
2151
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-half span.wptb-half-filled-rating-star {
2152
  display: block;
2153
  fill: #FF912C;
2154
  }
2155
 
2156
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-full span.wptb-filled-rating-star {
2157
  display: block;
2158
  fill: #FF912C;
2159
  }
2160
 
2161
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-full span.wptb-not-filled-rating-star {
2162
  display: none;
2163
  }
2164
 
2165
- .wptb-rating-stars-box ul>li.wptb-rating-star.wptb-rating-star-selected-full span.wptb-half-filled-rating-star {
2166
  display: none;
2167
  }
2168
 
@@ -2210,7 +2211,7 @@ td[class*="wptb-fused-cell"] {
2210
  font-size: 20px;
2211
  }
2212
 
2213
- .wptb-number-rating-box>div {
2214
  vertical-align: top;
2215
  display: inline-block;
2216
  color: #888;
@@ -2230,6 +2231,7 @@ wptb_shortcode_container_element {
2230
  #wptb-messaging-area {
2231
  position: relative;
2232
  }
 
2233
  #wptb-messaging-area .wptb-message {
2234
  max-width: 400px;
2235
  padding: 20px 5px;
@@ -2245,6 +2247,7 @@ wptb_shortcode_container_element {
2245
  right: 30px;
2246
  margin: auto;
2247
  }
 
2248
  #wptb-messaging-area .wptb-message {
2249
  padding: 50px 20px;
2250
  }
@@ -2263,6 +2266,7 @@ wptb_shortcode_container_element {
2263
  width: 100%;
2264
  text-align: justify;
2265
  }
 
2266
  .wptb-embed,
2267
  .wptb-preview,
2268
  .wptb-save {
@@ -2270,17 +2274,20 @@ wptb_shortcode_container_element {
2270
  float: none;
2271
  margin: 20px 20px auto;
2272
  }
 
2273
  .wptb-close {
2274
  margin-top: 10px;
2275
  margin-right: 10px;
2276
  padding: 20px;
2277
  border: none;
2278
  }
 
2279
  .wptb-right::after {
2280
  content: "";
2281
  width: 100%;
2282
  display: inline-block;
2283
  }
 
2284
  .wptb-container {
2285
  top: 172px;
2286
  }
@@ -2295,6 +2302,7 @@ wptb_shortcode_container_element {
2295
  padding: 0px 15px;
2296
  box-sizing: border-box;
2297
  }
 
2298
  .wptb-embed a,
2299
  .wptb-preview a,
2300
  .wptb-save a {
@@ -2302,9 +2310,11 @@ wptb_shortcode_container_element {
2302
  text-align: center;
2303
  box-sizing: border-box;
2304
  }
 
2305
  #wptb-messaging-area {
2306
  top: 310px;
2307
  }
 
2308
  .wptb-container {
2309
  top: 300px;
2310
  }
@@ -2511,7 +2521,6 @@ wptb_shortcode_container_element {
2511
  }
2512
 
2513
 
2514
-
2515
  /*
2516
  ** classes with justify-content styles
2517
  */
@@ -2519,9 +2528,11 @@ wptb_shortcode_container_element {
2519
  .wptb-justify-content-left {
2520
  justify-content: left;
2521
  }
 
2522
  .wptb-justify-content-center {
2523
  justify-content: center;
2524
  }
 
2525
  .wptb-justify-content-right {
2526
  justify-content: right;
2527
  }
@@ -2534,9 +2545,11 @@ wptb_shortcode_container_element {
2534
  .wptb-float-left {
2535
  float: left;
2536
  }
 
2537
  .wptb-float-center {
2538
  float: none;
2539
  }
 
2540
  .wptb-float-right {
2541
  float: right;
2542
  }
@@ -2548,9 +2561,363 @@ wptb_shortcode_container_element {
2548
  .wptb-text-align-left {
2549
  text-align: left;
2550
  }
 
2551
  .wptb-text-align-center {
2552
  text-align: center;
2553
  }
 
2554
  .wptb-text-align-right {
2555
  text-align: right;
2556
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  overflow-y: hidden;
9
  }
10
 
11
+ body > img {
12
  position: absolute;
13
  z-index: 1000001;
14
  }
117
  }
118
 
119
  .wptb-undo:hover,
120
+ .wptb-redo:hover {
121
+ }
122
 
123
  .wptb-undoredo-disabled {
124
  cursor: default;
234
  transition: all 0.3s;
235
  }
236
 
237
+ .wptb-popup-window-modal.wptb-popup-show ~ .wptb-popup-dark-area {
238
  visibility: visible;
239
  opacity: .6;
240
  }
383
  background-color: #eb4c63;
384
  }
385
 
386
+ #wptb-left-scroll-panel-curtain .wptb-table-edit-mode-close {
387
+ margin: auto;
388
+ display: block;
389
+ }
390
+
391
+ .wptb-table-edit-mode-close {
392
  background: #329d3f;
393
  color: #fff;
 
394
  }
395
 
396
  .wptb-edit-bar svg {
456
  display: block;
457
  }
458
 
 
 
 
 
 
 
 
459
  .wptb-panel-left {
460
  position: relative;
461
  height: 100%;
697
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #ffffff));
698
  /* android <= 2.2 */
699
  background-image: -webkit-linear-gradient(top, #ffffff 0, #ffffff 100%);
700
+ /* older mobile safari and android > 2.2 */;
 
701
  background-image: linear-gradient(to bottom, #ffffff 0, #ffffff 100%);
702
  /* W3C */
703
  }
730
  display: none;
731
  }
732
 
733
+ .wptb-toggle input:checked + i::after {
734
  -webkit-transform: translateX(20px);
735
  transform: translateX(20px);
736
  }
737
 
738
+ .wptb-toggle input:checked + i {
739
  background: #3B7EC0;
740
  }
741
 
764
  transition: .25s;
765
  }
766
 
767
+ .wptb-toggle.wptb-column-width-fix-auto input:checked + i::after,
768
+ .wptb-toggle.wptb-size-fixed-auto input:checked + i::after {
769
  -webkit-transform: translateX(50px);
770
  transform: translateX(50px);
771
  }
772
 
773
  .wptb-toggle.wptb-column-width-fix-auto i,
774
+ .wptb-toggle.wptb-size-fixed-auto i {
775
  float: left;
776
  width: 100px;
777
  border-radius: 5px;
779
  }
780
 
781
  .wptb-toggle.wptb-column-width-fix-auto i:after,
782
+ .wptb-toggle.wptb-size-fixed-auto i:after {
783
  width: 50px;
784
  height: 25px;
785
  border-radius: 5px;
968
  width: 47.5%;
969
  float: left;
970
  margin: 6px 0 -4px 6px;
971
+ }
972
 
973
  .wptb-element:nth-child(even) {
974
  width: 47.5%;
975
  float: right;
976
  margin: 6px 5px -4px 0;
977
+ }
978
 
979
  .wptb-element p {
980
  margin: 0;
1065
  background: -moz-linear-gradient(45deg, #4caf50 0%, #8bc34a 100%);
1066
  background: -webkit-linear-gradient(45deg, #4caf50 0%, #8bc34a 100%);
1067
  background: linear-gradient(45deg, #4caf50 0%, #8bc34a 100%);
1068
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4caf50', endColorstr='#8bc34a', GradientType=1);
1069
  height: auto;
1070
  }
1071
 
1074
  background: -moz-linear-gradient(45deg, #f44336 0%, #ff5722 100%);
1075
  background: -webkit-linear-gradient(45deg, #f44336 0%, #ff5722 100%);
1076
  background: linear-gradient(45deg, #f44336 0%, #ff5722 100%);
1077
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f44336', endColorstr='#ff5722', GradientType=1);
1078
  height: auto;
1079
  }
1080
 
1174
  padding: 14px 0 7px;
1175
  display: block;
1176
  }
1177
+
1178
  .wptb-row.wptb-table-header {
1179
  padding: 0;
1180
  height: 6px;
1181
  }
1182
+
1183
  .wptb-row.wptb-table-header .wptb-cell {
1184
  display: none;
1185
  }
1186
+
1187
  .wptb-row .wptb-cell {
1188
  margin-bottom: 10px;
1189
  }
1190
+
1191
  .wptb-row .wptb-cell:before {
1192
  margin-bottom: 3px;
1193
  content: attr(data-title);
1226
  width: auto;
1227
  }
1228
 
1229
+ .wptb-preview-table-manage-cells tbody > tr > td::after {
1230
  content: '';
1231
  display: block;
1232
  position: absolute;
1417
  justify-content: center;
1418
  }
1419
 
1420
+ .wptb-button-wrapper > a {
1421
  text-decoration: none;
1422
  max-width: 100%;
1423
  }
1511
  display: inline-block;
1512
  }
1513
 
1514
+ #wpcd_fixed_toolbar > div.toolbar-active {
1515
  display: block !important;
1516
  }
1517
 
1600
  }
1601
 
1602
  br[data-mce-bogus="1"] {
1603
+ display: none;
1604
  }
1605
 
1606
  .wptb-droppable.wptb-cell ul,
1639
  line-height: 30px;
1640
  }
1641
 
1642
+ .wptb-list-container ul li > div > p::before {
1643
  content: attr(data-list-style-type-index);
1644
  display: inline-block;
1645
  line-height: 30px;
1649
  cursor: text;
1650
  }
1651
 
1652
+ .wptb-list-container ul li > div > p::before {
1653
  padding-right: 10px;
1654
  }
1655
 
1656
+ .wptb-list-container ul li > div > p.wptb-list-style-type-disc::before {
1657
  content: '\25CF';
1658
  }
1659
 
1660
+ .wptb-list-container ul li > div > p.wptb-list-style-type-circle::before {
1661
  content: '\25CB';
1662
  }
1663
 
1664
+ .wptb-list-container ul li > div > p.wptb-list-style-type-square::before {
1665
  content: '\25A0';
1666
  }
1667
 
1668
+ .wptb-list-container ul li > div > p.wptb-list-style-type-none::before {
1669
  content: '';
1670
  padding-right: 0px;
1671
  }
1823
  visibility: hidden;
1824
  }
1825
 
1826
+ .wptb-drop-border-marker > div {
1827
  position: absolute;
1828
  background: #1ea9eb;
1829
  }
2042
  display: inline-block;
2043
  }
2044
 
2045
+ .wptb-rating-stars-box ul > li.wptb-rating-star {
2046
  color: #ccc;
2047
  cursor: pointer;
2048
  margin: 0px;
2051
  height: 20px;
2052
  }
2053
 
2054
+ .wptb-rating-stars-box ul > li.wptb-rating-star span {
2055
  position: absolute;
2056
  height: 100%;
2057
  width: 100%;
2060
  z-index: 10;
2061
  }
2062
 
2063
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-rating-star-left-signal-part,
2064
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-rating-star-right-signal-part {
2065
  height: 100%;
2066
  width: 50%;
2067
  z-index: 20;
2068
  }
2069
 
2070
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-rating-star-left-signal-part {
2071
  left: 0px;
2072
  }
2073
 
2074
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-rating-star-left-signal-part span.wptb-rating-star-zero-set {
2075
  left: 0px;
2076
  width: 40%;
2077
  height: 100%;
2079
  z-index: 30px;
2080
  }
2081
 
2082
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-rating-star-right-signal-part {
2083
  right: 0px;
2084
  left: auto;
2085
  }
2086
 
2087
+ .wptb-rating-stars-box ul > li.wptb-rating-star span {
2088
  display: block;
2089
  }
2090
 
2091
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-filled-rating-star {
2092
  display: none;
2093
  }
2094
 
2095
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-half-filled-rating-star {
2096
  display: none;
2097
  }
2098
 
2099
+ .wptb-rating-stars-box ul > li.wptb-rating-star span.wptb-not-filled-rating-star {
2100
  fill: #ccc;
2101
  }
2102
 
2103
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-hover-half span.wptb-not-filled-rating-star {
2104
  display: none;
2105
  }
2106
 
2107
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-hover-half span.wptb-half-filled-rating-star {
2108
  display: block;
2109
  fill: #FF912C;
2110
  opacity: 0.5;
2111
  }
2112
 
2113
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-hover-half span.wptb-filled-rating-star {
2114
  display: none;
2115
  }
2116
 
2117
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-hover-full span.wptb-not-filled-rating-star {
2118
  display: none;
2119
  }
2120
 
2121
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-hover-full span.wptb-half-filled-rating-star {
2122
  display: none;
2123
  }
2124
 
2125
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-hover-full span.wptb-filled-rating-star {
2126
  display: block;
2127
  fill: #FF912C;
2128
  opacity: 0.5;
2129
  }
2130
 
2131
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-half.wptb-rating-star-hover-half span,
2132
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-half.wptb-rating-star-hover-full span,
2133
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-full.wptb-rating-star-hover-half span,
2134
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-full.wptb-rating-star-hover-full span {
2135
  opacity: 1;
2136
  }
2137
 
2138
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-half span.wptb-filled-rating-star {
2139
  display: none;
2140
  }
2141
 
2142
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-half.wptb-rating-star-hover-full span.wptb-filled-rating-star {
2143
  display: block;
2144
  fill: #FF912C;
2145
  opacity: 0.5;
2146
  }
2147
 
2148
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-half span.wptb-not-filled-rating-star {
2149
  display: none;
2150
  }
2151
 
2152
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-half span.wptb-half-filled-rating-star {
2153
  display: block;
2154
  fill: #FF912C;
2155
  }
2156
 
2157
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-full span.wptb-filled-rating-star {
2158
  display: block;
2159
  fill: #FF912C;
2160
  }
2161
 
2162
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-full span.wptb-not-filled-rating-star {
2163
  display: none;
2164
  }
2165
 
2166
+ .wptb-rating-stars-box ul > li.wptb-rating-star.wptb-rating-star-selected-full span.wptb-half-filled-rating-star {
2167
  display: none;
2168
  }
2169
 
2211
  font-size: 20px;
2212
  }
2213
 
2214
+ .wptb-number-rating-box > div {
2215
  vertical-align: top;
2216
  display: inline-block;
2217
  color: #888;
2231
  #wptb-messaging-area {
2232
  position: relative;
2233
  }
2234
+
2235
  #wptb-messaging-area .wptb-message {
2236
  max-width: 400px;
2237
  padding: 20px 5px;
2247
  right: 30px;
2248
  margin: auto;
2249
  }
2250
+
2251
  #wptb-messaging-area .wptb-message {
2252
  padding: 50px 20px;
2253
  }
2266
  width: 100%;
2267
  text-align: justify;
2268
  }
2269
+
2270
  .wptb-embed,
2271
  .wptb-preview,
2272
  .wptb-save {
2274
  float: none;
2275
  margin: 20px 20px auto;
2276
  }
2277
+
2278
  .wptb-close {
2279
  margin-top: 10px;
2280
  margin-right: 10px;
2281
  padding: 20px;
2282
  border: none;
2283
  }
2284
+
2285
  .wptb-right::after {
2286
  content: "";
2287
  width: 100%;
2288
  display: inline-block;
2289
  }
2290
+
2291
  .wptb-container {
2292
  top: 172px;
2293
  }
2302
  padding: 0px 15px;
2303
  box-sizing: border-box;
2304
  }
2305
+
2306
  .wptb-embed a,
2307
  .wptb-preview a,
2308
  .wptb-save a {
2310
  text-align: center;
2311
  box-sizing: border-box;
2312
  }
2313
+
2314
  #wptb-messaging-area {
2315
  top: 310px;
2316
  }
2317
+
2318
  .wptb-container {
2319
  top: 300px;
2320
  }
2521
  }
2522
 
2523
 
 
2524
  /*
2525
  ** classes with justify-content styles
2526
  */
2528
  .wptb-justify-content-left {
2529
  justify-content: left;
2530
  }
2531
+
2532
  .wptb-justify-content-center {
2533
  justify-content: center;
2534
  }
2535
+
2536
  .wptb-justify-content-right {
2537
  justify-content: right;
2538
  }
2545
  .wptb-float-left {
2546
  float: left;
2547
  }
2548
+
2549
  .wptb-float-center {
2550
  float: none;
2551
  }
2552
+
2553
  .wptb-float-right {
2554
  float: right;
2555
  }
2561
  .wptb-text-align-left {
2562
  text-align: left;
2563
  }
2564
+
2565
  .wptb-text-align-center {
2566
  text-align: center;
2567
  }
2568
+
2569
  .wptb-text-align-right {
2570
  text-align: right;
2571
+ }
2572
+
2573
+ /*settings page related styles*/
2574
+ .wptb-menu-page-wrapper {
2575
+ display: flex;
2576
+ justify-content: center;
2577
+ align-items: center;
2578
+ width: 100%;
2579
+ height: 90vh;
2580
+ color: #4A5568;
2581
+ line-height: normal;
2582
+ }
2583
+
2584
+ .wptb-settings-wrapper {
2585
+ background-color: white;
2586
+ min-width: 90%;
2587
+ height: 90%;
2588
+ display: grid;
2589
+ grid-template-columns: 1fr;
2590
+ grid-template-rows: minmax(min-content, max-content) minmax(min-content, max-content) 1fr minmax(min-content, max-content);
2591
+ border-radius: 5px;
2592
+ overflow: hidden;
2593
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
2594
+ }
2595
+
2596
+ .wptb-settings-header {
2597
+ display: flex;
2598
+ justify-content: space-between;
2599
+ align-items: center;
2600
+ background-color: #3299D1;
2601
+ padding: 10px;
2602
+ }
2603
+
2604
+ .wptb-settings-header * {
2605
+ color: #ffffff;
2606
+ }
2607
+
2608
+ .wptb-settings-header a {
2609
+ text-decoration: none;
2610
+ font-size: 1rem;
2611
+ margin: 0 10px;
2612
+ text-transform: capitalize;
2613
+ }
2614
+
2615
+ .wptb-settings-header a:hover {
2616
+ color: #CBD5E0;
2617
+ }
2618
+
2619
+ .wptb-settings-brand {
2620
+ font-size: 2.5rem;
2621
+ display: flex;
2622
+ align-items: center;
2623
+ cursor: default;
2624
+ }
2625
+
2626
+ .wptb-settings-header-name {
2627
+ margin-left: 1rem;
2628
+ }
2629
+
2630
+ .wptb-settings-sections-wrapper {
2631
+ display: flex;
2632
+ flex-direction: row;
2633
+ margin-bottom: 10px;
2634
+ background-color: #ffffff;
2635
+ border-bottom: 1px solid #cbd5e0;
2636
+ }
2637
+
2638
+ .wptb-settings-sections-wrapper.child {
2639
+ display: flex;
2640
+ flex-direction: row;
2641
+ justify-content: center;
2642
+ margin-top: -10px;
2643
+ }
2644
+
2645
+ .wptb-settings-section-item {
2646
+ text-transform: uppercase;
2647
+ font-size: 1rem;
2648
+ padding: 20px;
2649
+ border-bottom: 2px solid #1A202C;
2650
+ margin: 0 10px;
2651
+ cursor: pointer;
2652
+ transition: background-color 0.5s ease-out;
2653
+ }
2654
+
2655
+ .child .wptb-settings-section-item {
2656
+ font-size: 0.8rem;
2657
+ padding: 10px;
2658
+ }
2659
+
2660
+ .wptb-settings-section-item:hover {
2661
+ background-color: #EDF2F7;
2662
+ }
2663
+
2664
+ .wptb-settings-section-item.disabled {
2665
+ color: #CBD5E0 !important;
2666
+ border-bottom: none;
2667
+ }
2668
+
2669
+ .wptb-settings-controls-wrapper {
2670
+ padding: 20px 40px;
2671
+ overflow: auto;
2672
+ }
2673
+
2674
+ .wptb-settings-controls-wrapper.grid {
2675
+ display: grid;
2676
+ grid-gap: 10px;
2677
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
2678
+ grid-auto-rows: minmax(min-content, max-content);
2679
+ grid-auto-flow: row;
2680
+ }
2681
+
2682
+ .wptb-settings-controls-wrapper.center {
2683
+ display: flex;
2684
+ justify-content: center;
2685
+ align-items: flex-start;
2686
+ }
2687
+
2688
+ .wptb-setting-control {
2689
+ padding: 20px;
2690
+ transition: all 0.2s ease-out;
2691
+ border: 1px solid transparent;
2692
+ }
2693
+
2694
+ .wptb-setting-control:hover {
2695
+ border: 1px solid #cbd5e0;
2696
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
2697
+ transform: translateY(-5px);
2698
+ }
2699
+
2700
+ .wptb-setting-control .title {
2701
+ font-weight: bold;
2702
+ font-size: 1rem;
2703
+ text-transform: capitalize;
2704
+ margin-bottom: 30px;
2705
+ }
2706
+
2707
+ .wptb-setting-control-row {
2708
+ margin: 20px 0;
2709
+ }
2710
+
2711
+ .wptb-setting-control-row label {
2712
+ text-transform: capitalize;
2713
+ }
2714
+
2715
+ .wptb-setting-control-row input {
2716
+ margin-right: 20px;
2717
+ }
2718
+
2719
+ .wptb-setting-control-row select {
2720
+ margin-right: 20px;
2721
+ }
2722
+
2723
+ .wptb-settings-footer {
2724
+ background-color: #ffffff;
2725
+ display: flex;
2726
+ justify-content: space-between;
2727
+ width: 100%;
2728
+ border-top: 1px solid #cbd5e0;
2729
+ padding: 20px 0;
2730
+ }
2731
+
2732
+ .wptb-settings-messages {
2733
+ margin: 0 20px;
2734
+ display: flex;
2735
+ align-items: center;
2736
+ }
2737
+
2738
+ .wptb-settings-message {
2739
+ font-style: italic;
2740
+ font-weight: bold;
2741
+ text-transform: uppercase;
2742
+ }
2743
+
2744
+ .wptb-settings-message.ok {
2745
+ color: #3299D1;
2746
+ }
2747
+
2748
+ .wptb-settings-message.error {
2749
+ color: #E53E3E;
2750
+ }
2751
+
2752
+ .wptb-settings-fetching {
2753
+ animation: wptb-settings-rotate 1s linear infinite reverse;
2754
+
2755
+ }
2756
+
2757
+ .wptb-settings-button-container {
2758
+ display: flex;
2759
+ justify-content: center;
2760
+ align-items: center;
2761
+ }
2762
+
2763
+ .wptb-settings-button {
2764
+ width: fit-content;
2765
+ margin: 0 20px;
2766
+ color: #ffffff;
2767
+ font-size: 1.0rem;
2768
+ padding: 10px 20px;
2769
+ border-radius: 5px;
2770
+ text-transform: uppercase;
2771
+ cursor: pointer;
2772
+ transition: all .2s ease-out;
2773
+ }
2774
+
2775
+ .wptb-settings-button:hover {
2776
+ color: #CBD5E0;
2777
+ }
2778
+
2779
+ .wptb-settings-button.primary {
2780
+ background-color: #3299D1;
2781
+ }
2782
+
2783
+ .wptb-settings-button.danger {
2784
+ background-color: #E53E3E;
2785
+ }
2786
+
2787
+ .wptb-settings-button.disabled {
2788
+ background-color: #CBD5E0 !important;
2789
+ }
2790
+
2791
+ .wptb-settings-button.small {
2792
+ font-size: inherit;
2793
+ }
2794
+
2795
+ .wptb-settings-button.disabled:hover {
2796
+ color: #ffffff !important;
2797
+ cursor: not-allowed;
2798
+ }
2799
+
2800
+ .wptb-fade-enter-active, .wptb-fade-leave-active {
2801
+ transition: opacity 0.2s ease-out;
2802
+ }
2803
+
2804
+ .wptb-fade-enter, .wptb-fade-leave-to {
2805
+ opacity: 0;
2806
+ }
2807
+
2808
+ .wptb-menu-file-drop {
2809
+ border: 2px dashed #cbd5e0;
2810
+ width: 500px;
2811
+ height: 200px;
2812
+ margin: 20px 0;
2813
+ display: flex;
2814
+ flex-direction: column;
2815
+ justify-content: center;
2816
+ align-items: center;
2817
+ text-transform: capitalize;
2818
+ transition: all 0.2s ease-out;
2819
+ border-radius: 5px;
2820
+ }
2821
+
2822
+ .wptb-menu-file-drop.dragenter {
2823
+ background-color: #EDF2F7;
2824
+ }
2825
+
2826
+ .wptb-menu-file-drop div {
2827
+ margin: 10px 0;
2828
+ }
2829
+
2830
+ .wptb-menu-file-drop .hint {
2831
+ font-style: italic;
2832
+ color: #cbd5e0;
2833
+ font-size: 1.3rem;
2834
+ }
2835
+
2836
+ .wptb-menu-file-drop .supported {
2837
+ font-style: italic;
2838
+ color: #cbd5e0;
2839
+ font-size: 1rem;
2840
+ }
2841
+
2842
+ .wptb-menu-file-drop .file {
2843
+ text-transform: none;
2844
+ font-size: 1.3rem;
2845
+ color: inherit;
2846
+ }
2847
+
2848
+ .wptb-menu-file-drop a {
2849
+ text-decoration: underline;
2850
+ cursor: pointer;
2851
+ }
2852
+
2853
+ .wptb-menu-file-drop .file-icon {
2854
+ color: #cbd5e0;
2855
+ transform: scale(4);
2856
+ }
2857
+
2858
+ .wptb-flex {
2859
+ display: flex;
2860
+ }
2861
+
2862
+ .wptb-flex-col {
2863
+ flex-direction: column;
2864
+ }
2865
+
2866
+ .wptb-flex-align-center {
2867
+ align-items: center;
2868
+ }
2869
+
2870
+ .wptb-flex-justify-center {
2871
+ justify-content: center;
2872
+ }
2873
+
2874
+ .wptb-import-tables-wrapper {
2875
+ margin-top: 50px;
2876
+ margin-bottom: 30px;
2877
+ display: flex;
2878
+ justify-content: center;
2879
+ }
2880
+
2881
+ .wptb-import-table {
2882
+ text-align: center;
2883
+ border-collapse: collapse;
2884
+ }
2885
+
2886
+ .wptb-import-table th, td {
2887
+ padding: 15px 10px;
2888
+ }
2889
+
2890
+ .wptb-import-table th {
2891
+ border-bottom: 1px solid #cbd5e0;
2892
+ }
2893
+
2894
+ .wptb-import-table tbody tr:hover {
2895
+ background-color: #edf2f7;
2896
+ }
2897
+
2898
+ .wptb-menu-overflow-auto {
2899
+ overflow: auto;
2900
+ }
2901
+
2902
+ .wptb-text-transform-cap {
2903
+ text-transform: capitalize !important;
2904
+ }
2905
+
2906
+ .wptb-text-transform-none {
2907
+ text-transform: none !important;
2908
+ }
2909
+
2910
+ .wptb-import-table-count-info {
2911
+ margin-bottom: 20px;
2912
+ font-weight: bold;
2913
+ font-style: italic;
2914
+ }
2915
+
2916
+ @keyframes wptb-settings-rotate {
2917
+ 0% {
2918
+ transform: rotateZ(0deg);
2919
+ }
2920
+ 100% {
2921
+ transform: rotateZ(360deg);
2922
+ }
2923
+ }
inc/admin/element-classes/element-scripts/button-element.js CHANGED
@@ -4,65 +4,71 @@ a.onclick = function( e ) {
4
  e.preventDefault();
5
  };
6
  if( target ) {
7
- tinyMCE.init({
8
- target: target,
9
- inline: true,
10
- plugins: "link",
11
- dialog_type: "modal",
12
- theme: 'modern',
13
- menubar: false,
14
- fixed_toolbar_container: '#wpcd_fixed_toolbar',
15
- toolbar: 'bold italic strikethrough',
16
- setup : function(ed) {
17
- ed.on( 'keydown', function(e) {
18
- if (e.keyCode == 13) {
19
- e.preventDefault();
20
- }
21
-
22
- let p = e.target.querySelector( 'p' );
23
- let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
24
- pText = pText.replace( /&nbsp;/g, '').trim();
 
25
 
26
- if( ! window.buttonElemPTextKeyDown ) {
27
- window.buttonElemPTextKeyDown = pText;
28
- }
29
- });
30
 
31
- ed.on( 'keyup', function(e) {
32
- let p = e.target.querySelector( 'p' );
33
- let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
34
- pText = pText.replace( /&nbsp;/g, '').trim();
35
- if( pText !== window.buttonElemPTextKeyDown ) {
36
- e.target.onblur = function() {
37
- let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
38
- wptbTableStateSaveManager.tableStateSet();
39
 
40
- window.buttonElemPTextKeyDown = '';
 
 
 
41
  e.target.onblur = '';
42
  }
43
- } else {
44
- e.target.onblur = '';
45
- }
46
- });
47
- },
48
- init_instance_callback: function (editor) {
49
- window.currentEditor = editor;
50
- editor.on( 'focus', function (e) {
51
- var totalWidth = document.getElementsByClassName('wptb-builder-panel')[0].offsetWidth;
52
- if (window.currentEditor &&
53
- document.getElementById('wptb_builder').scrollTop >= 55 &&
54
- window.currentEditor.bodyElement.style.display != 'none') {
55
- document.getElementById('wpcd_fixed_toolbar').style.position = 'fixed';
56
- document.getElementById('wpcd_fixed_toolbar').style.right = (totalWidth / 2 - document.getElementById('wpcd_fixed_toolbar').offsetWidth / 2) + 'px';
57
- document.getElementById('wpcd_fixed_toolbar').style.top = '100px';
58
- } else {
59
- document.getElementById('wpcd_fixed_toolbar').style.position = 'static';
60
- delete document.getElementById('wpcd_fixed_toolbar').style.right;
61
- delete document.getElementById('wpcd_fixed_toolbar').style.top;
62
- }
63
- });
64
- }
65
- });
 
 
66
  }
67
 
68
  //function textControlsChange( inputs, element ) {
4
  e.preventDefault();
5
  };
6
  if( target ) {
7
+ let tinyMceInitStart = function() {
8
+ tinyMCE.init({
9
+ target: target,
10
+ inline: true,
11
+ plugins: "link",
12
+ dialog_type: "modal",
13
+ theme: 'modern',
14
+ menubar: false,
15
+ fixed_toolbar_container: '#wpcd_fixed_toolbar',
16
+ toolbar: 'bold italic strikethrough',
17
+ setup : function(ed) {
18
+ ed.on( 'keydown', function(e) {
19
+ if (e.keyCode == 13) {
20
+ e.preventDefault();
21
+ }
22
+
23
+ let p = e.target.querySelector( 'p' );
24
+ let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
25
+ pText = pText.replace( /&nbsp;/g, '').trim();
26
 
27
+ if( ! window.buttonElemPTextKeyDown ) {
28
+ window.buttonElemPTextKeyDown = pText;
29
+ }
30
+ });
31
 
32
+ ed.on( 'keyup', function(e) {
33
+ let p = e.target.querySelector( 'p' );
34
+ let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
35
+ pText = pText.replace( /&nbsp;/g, '').trim();
36
+ if( pText !== window.buttonElemPTextKeyDown ) {
37
+ e.target.onblur = function() {
38
+ let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
39
+ wptbTableStateSaveManager.tableStateSet();
40
 
41
+ window.buttonElemPTextKeyDown = '';
42
+ e.target.onblur = '';
43
+ }
44
+ } else {
45
  e.target.onblur = '';
46
  }
47
+ });
48
+ },
49
+ init_instance_callback: function (editor) {
50
+ window.currentEditor = editor;
51
+ editor.on( 'focus', function (e) {
52
+ var totalWidth = document.getElementsByClassName('wptb-builder-panel')[0].offsetWidth;
53
+ if (window.currentEditor &&
54
+ document.getElementById('wptb_builder').scrollTop >= 55 &&
55
+ window.currentEditor.bodyElement.style.display != 'none') {
56
+ document.getElementById('wpcd_fixed_toolbar').style.position = 'fixed';
57
+ document.getElementById('wpcd_fixed_toolbar').style.right = (totalWidth / 2 - document.getElementById('wpcd_fixed_toolbar').offsetWidth / 2) + 'px';
58
+ document.getElementById('wpcd_fixed_toolbar').style.top = '100px';
59
+ } else {
60
+ document.getElementById('wpcd_fixed_toolbar').style.position = 'static';
61
+ delete document.getElementById('wpcd_fixed_toolbar').style.right;
62
+ delete document.getElementById('wpcd_fixed_toolbar').style.top;
63
+ }
64
+ });
65
+ }
66
+ });
67
+
68
+ element.removeEventListener( 'mouseover', tinyMceInitStart, false );
69
+ }
70
+
71
+ element.addEventListener( 'mouseover', tinyMceInitStart, false );
72
  }
73
 
74
  //function textControlsChange( inputs, element ) {
inc/admin/element-classes/element-scripts/custom-html-element.js CHANGED
@@ -2,73 +2,79 @@ let infArr = element.className.match( /wptb-element-((.+-)\d+)/i );
2
  let controlKey = 'textarea';
3
  let elementControlTargetUnicClass = 'wptb-el-' + infArr[1] + '-' + controlKey;
4
 
5
- tinyMCE.init({
6
- target: element.childNodes[0],
7
- inline: true,
8
- plugins: "code",
9
- //dialog_type: "modal",
10
- //theme: 'modern',
11
- menubar: false,
12
- force_br_newlines : false,
13
- force_p_newlines : false,
14
- forced_root_block : '',
15
- paste_as_text: false,
16
- toolbar: false,
17
- extended_valid_elements: "svg[*],defs[*],pattern[*],desc[*],metadata[*],g[*],\n\
 
18
  mask[*],path[*],line[*],marker[*],rect[*],circle[*],\n\
19
  ellipse[*],polygon[*],polyline[*],linearGradient[*],\n\
20
  radialGradient[*],stop[*],image[*],view[*],text[*],\n\
21
  textPath[*],title[*],tspan[*],glyph[*],symbol[*],switch[*],use[*]",
22
- setup: function ( ed ) {
23
-
24
- ed.on( 'input', function( e ) {
25
- let elementControlTextarea = document.getElementsByClassName( elementControlTargetUnicClass );
26
- if( elementControlTextarea.length > 0 ) {
27
- elementControlTextarea = elementControlTextarea[0];
28
- elementControlTextarea.value = ed.targetElm.textContent;
29
- }
30
- });
31
-
32
- ed.on( 'focus', function( ) {
33
- ed.targetElm.innerText = ed.targetElm.innerHTML;
34
-
35
- WPTB_Helper.wptbDocumentEventGenerate( 'click', ed.targetElm );
36
- WPTB_Helper.wptbDocumentEventGenerate( 'input', ed.targetElm );
37
- });
38
-
39
- ed.on( 'blur', function( ) {
40
- ed.targetElm.innerHTML = ed.targetElm.innerText;
41
- });
42
-
43
- ed.on( 'click', function( ) {
44
- WPTB_Helper.wptbDocumentEventGenerate( 'input', ed.targetElm );
45
- });
46
-
47
- ed.on( 'keydown', function( e ) {
48
- let div = e.target;
49
- let divText = div.innerHTML.replace( /\s+/g, ' ' ).trim();
50
- divText = divText.replace( /&nbsp;/g, '').trim();
51
-
52
- if( ! window.htmlElemKeyDown ) {
53
- window.htmlElemKeyDown = divText;
54
- }
55
- });
56
-
57
- ed.on( 'keyup', function(e) {
58
- let div = e.target;
59
- let divText = div.innerHTML.replace( /\s+/g, ' ' ).trim();
60
- divText = divText.replace( /&nbsp;/g, '').trim();
61
- if( divText !== window.htmlElemKeyDown ) {
62
- e.target.onblur = function() {
63
- let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
64
- wptbTableStateSaveManager.tableStateSet();
65
 
66
- window.htmlElemKeyDown = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  e.target.onblur = '';
68
  }
69
- } else {
70
- e.target.onblur = '';
71
- }
72
- });
73
- }
74
- });
 
 
2
  let controlKey = 'textarea';
3
  let elementControlTargetUnicClass = 'wptb-el-' + infArr[1] + '-' + controlKey;
4
 
5
+ let tinyMceInitStart = function() {
6
+ tinyMCE.init({
7
+ target: element.childNodes[0],
8
+ inline: true,
9
+ plugins: "code",
10
+ //dialog_type: "modal",
11
+ //theme: 'modern',
12
+ menubar: false,
13
+ force_br_newlines: false,
14
+ force_p_newlines: false,
15
+ forced_root_block: '',
16
+ paste_as_text: false,
17
+ toolbar: false,
18
+ extended_valid_elements: "svg[*],defs[*],pattern[*],desc[*],metadata[*],g[*],\n\
19
  mask[*],path[*],line[*],marker[*],rect[*],circle[*],\n\
20
  ellipse[*],polygon[*],polyline[*],linearGradient[*],\n\
21
  radialGradient[*],stop[*],image[*],view[*],text[*],\n\
22
  textPath[*],title[*],tspan[*],glyph[*],symbol[*],switch[*],use[*]",
23
+ setup: function (ed) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
+ ed.on('input', function (e) {
26
+ let elementControlTextarea = document.getElementsByClassName(elementControlTargetUnicClass);
27
+ if (elementControlTextarea.length > 0) {
28
+ elementControlTextarea = elementControlTextarea[0];
29
+ elementControlTextarea.value = ed.targetElm.textContent;
30
+ }
31
+ });
32
+
33
+ ed.on('focus', function () {
34
+ ed.targetElm.innerText = ed.targetElm.innerHTML;
35
+
36
+ WPTB_Helper.wptbDocumentEventGenerate('click', ed.targetElm);
37
+ WPTB_Helper.wptbDocumentEventGenerate('input', ed.targetElm);
38
+ });
39
+
40
+ ed.on('blur', function () {
41
+ ed.targetElm.innerHTML = ed.targetElm.innerText;
42
+ });
43
+
44
+ ed.on('click', function () {
45
+ WPTB_Helper.wptbDocumentEventGenerate('input', ed.targetElm);
46
+ });
47
+
48
+ ed.on('keydown', function (e) {
49
+ let div = e.target;
50
+ let divText = div.innerHTML.replace(/\s+/g, ' ').trim();
51
+ divText = divText.replace(/&nbsp;/g, '').trim();
52
+
53
+ if (!window.htmlElemKeyDown) {
54
+ window.htmlElemKeyDown = divText;
55
+ }
56
+ });
57
+
58
+ ed.on('keyup', function (e) {
59
+ let div = e.target;
60
+ let divText = div.innerHTML.replace(/\s+/g, ' ').trim();
61
+ divText = divText.replace(/&nbsp;/g, '').trim();
62
+ if (divText !== window.htmlElemKeyDown) {
63
+ e.target.onblur = function () {
64
+ let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
65
+ wptbTableStateSaveManager.tableStateSet();
66
+
67
+ window.htmlElemKeyDown = '';
68
+ e.target.onblur = '';
69
+ }
70
+ } else {
71
  e.target.onblur = '';
72
  }
73
+ });
74
+ }
75
+ });
76
+
77
+ element.removeEventListener( 'mouseover', tinyMceInitStart, false );
78
+ }
79
+
80
+ element.addEventListener( 'mouseover', tinyMceInitStart, false );
inc/admin/element-classes/element-scripts/list-element.js CHANGED
@@ -3,14 +3,21 @@ if( lis.length > 0 ) {
3
  for( let i = 0; i < lis.length; i++ ) {
4
  lis[i].classList.add( 'wptb-in-element' );
5
 
6
- let listItemContent = lis[i].getElementsByClassName( 'wptb-list-item-content' );
7
- if( listItemContent.length > 0 ) {
8
- listItemsTinyMceInit( listItemContent[0] );
 
 
 
 
9
  }
 
 
10
  }
11
  }
12
 
13
 
 
14
  function listItemsRecalculateIndex ( ulElem ) {
15
  let par = ulElem.querySelectorAll( 'p' );
16
  if ( par.length > 0 ) {
@@ -183,7 +190,6 @@ function selectControlsChange( selects, element ) {
183
  function controlsChange( inputs, element ) {
184
  if( inputs && typeof inputs === 'object' ) {
185
  if( inputs.hasOwnProperty( 'select1' ) ) {
186
- console.log(inputs);
187
  let infArr = element.className.match( /wptb-element-((.+-)\d+)/i );
188
 
189
  if( infArr ) {
3
  for( let i = 0; i < lis.length; i++ ) {
4
  lis[i].classList.add( 'wptb-in-element' );
5
 
6
+ let tinyMceInitStart = function() {
7
+ let listItemContent = lis[i].getElementsByClassName( 'wptb-list-item-content' );
8
+ if( listItemContent.length > 0 ) {
9
+ listItemsTinyMceInit( listItemContent[0] );
10
+ }
11
+
12
+ lis[i].removeEventListener( 'mouseover', tinyMceInitStart, false );
13
  }
14
+
15
+ lis[i].addEventListener( 'mouseover', tinyMceInitStart, false );
16
  }
17
  }
18
 
19
 
20
+
21
  function listItemsRecalculateIndex ( ulElem ) {
22
  let par = ulElem.querySelectorAll( 'p' );
23
  if ( par.length > 0 ) {
190
  function controlsChange( inputs, element ) {
191
  if( inputs && typeof inputs === 'object' ) {
192
  if( inputs.hasOwnProperty( 'select1' ) ) {
 
193
  let infArr = element.className.match( /wptb-element-((.+-)\d+)/i );
194
 
195
  if( infArr ) {
inc/admin/element-classes/element-scripts/shortcode-element.js CHANGED
@@ -5,72 +5,78 @@ let elementControlTargetUnicClass = 'wptb-el-' + infArr[1] + '-' + controlKey;
5
  let tinyMceTarget = element.getElementsByTagName( 'div' );
6
  if( tinyMceTarget.length > 0 ) {
7
  tinyMceTarget = tinyMceTarget[0];
8
-
9
- tinyMCE.init({
10
- target: tinyMceTarget,
11
- inline: true,
12
- plugins: "link",
13
- dialog_type: "modal",
14
- theme: 'modern',
15
- menubar: false,
16
- force_br_newlines : false,
17
- force_p_newlines : false,
18
- forced_root_block : '',
19
- paste_as_text: true,
20
- toolbar: false,
21
- setup : function( ed ) {
22
 
23
- ed.on( 'input', function( e ) {
24
- let elementControlTextarea = document.getElementsByClassName( elementControlTargetUnicClass );
25
- if( elementControlTextarea.length > 0 ) {
26
- elementControlTextarea = elementControlTextarea[0];
27
- elementControlTextarea.value = ed.targetElm.textContent;
28
- }
29
- });
30
-
31
- ed.on( 'focus', function( ) {
32
- ed.targetElm.innerText = ed.targetElm.innerHTML;
 
 
 
 
33
 
34
- WPTB_Helper.wptbDocumentEventGenerate( 'click', ed.targetElm );
35
- WPTB_Helper.wptbDocumentEventGenerate( 'input', ed.targetElm );
36
- });
 
 
 
 
 
 
 
37
 
38
- ed.on( 'blur', function( ) {
39
- ed.targetElm.innerHTML = ed.targetElm.innerText;
40
- });
41
 
42
- ed.on( 'click', function( ) {
43
- WPTB_Helper.wptbDocumentEventGenerate( 'input', ed.targetElm );
44
- });
45
 
46
- ed.on( 'keydown', function( e ) {
47
- let div = e.target;
48
- let divText = div.innerHTML.replace( /\s+/g, ' ' ).trim();
49
- divText = divText.replace( /&nbsp;/g, '').trim();
50
 
51
- if( ! window.shortcodeElemKeyDown ) {
52
- window.shortcodeElemKeyDown = divText;
53
- }
54
- });
 
 
 
 
 
55
 
56
- ed.on( 'keyup', function(e) {
57
- let div = e.target;
58
- let divText = div.innerHTML.replace( /\s+/g, ' ' ).trim();
59
- divText = divText.replace( /&nbsp;/g, '').trim();
60
- if( divText !== window.shortcodeElemKeyDown ) {
61
- e.target.onblur = function() {
62
- let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
63
- wptbTableStateSaveManager.tableStateSet();
64
 
65
- window.shortcodeElemKeyDown = '';
 
 
 
66
  e.target.onblur = '';
67
  }
68
- } else {
69
- e.target.onblur = '';
70
- }
71
- });
72
- }
73
- });
 
 
74
 
75
  element.addEventListener( 'wptb-control:' + elementControlTargetUnicClass, function( event ) {
76
  let targetElm = element.getElementsByClassName( 'mce-content-body' );
5
  let tinyMceTarget = element.getElementsByTagName( 'div' );
6
  if( tinyMceTarget.length > 0 ) {
7
  tinyMceTarget = tinyMceTarget[0];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
+ let tinyMceInitStart = function() {
10
+ tinyMCE.init({
11
+ target: tinyMceTarget,
12
+ inline: true,
13
+ plugins: "link",
14
+ dialog_type: "modal",
15
+ theme: 'modern',
16
+ menubar: false,
17
+ force_br_newlines : false,
18
+ force_p_newlines : false,
19
+ forced_root_block : '',
20
+ paste_as_text: true,
21
+ toolbar: false,
22
+ setup : function( ed ) {
23
 
24
+ ed.on( 'input', function( e ) {
25
+ let elementControlTextarea = document.getElementsByClassName( elementControlTargetUnicClass );
26
+ if( elementControlTextarea.length > 0 ) {
27
+ elementControlTextarea = elementControlTextarea[0];
28
+ elementControlTextarea.value = ed.targetElm.textContent;
29
+ }
30
+ });
31
+
32
+ ed.on( 'focus', function( ) {
33
+ ed.targetElm.innerText = ed.targetElm.innerHTML;
34
 
35
+ WPTB_Helper.wptbDocumentEventGenerate( 'click', ed.targetElm );
36
+ WPTB_Helper.wptbDocumentEventGenerate( 'input', ed.targetElm );
37
+ });
38
 
39
+ ed.on( 'blur', function( ) {
40
+ ed.targetElm.innerHTML = ed.targetElm.innerText;
41
+ });
42
 
43
+ ed.on( 'click', function( ) {
44
+ WPTB_Helper.wptbDocumentEventGenerate( 'input', ed.targetElm );
45
+ });
 
46
 
47
+ ed.on( 'keydown', function( e ) {
48
+ let div = e.target;
49
+ let divText = div.innerHTML.replace( /\s+/g, ' ' ).trim();
50
+ divText = divText.replace( /&nbsp;/g, '').trim();
51
+
52
+ if( ! window.shortcodeElemKeyDown ) {
53
+ window.shortcodeElemKeyDown = divText;
54
+ }
55
+ });
56
 
57
+ ed.on( 'keyup', function(e) {
58
+ let div = e.target;
59
+ let divText = div.innerHTML.replace( /\s+/g, ' ' ).trim();
60
+ divText = divText.replace( /&nbsp;/g, '').trim();
61
+ if( divText !== window.shortcodeElemKeyDown ) {
62
+ e.target.onblur = function() {
63
+ let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
64
+ wptbTableStateSaveManager.tableStateSet();
65
 
66
+ window.shortcodeElemKeyDown = '';
67
+ e.target.onblur = '';
68
+ }
69
+ } else {
70
  e.target.onblur = '';
71
  }
72
+ });
73
+ }
74
+ });
75
+
76
+ element.removeEventListener( 'mouseover', tinyMceInitStart, false );
77
+ }
78
+
79
+ element.addEventListener( 'mouseover', tinyMceInitStart, false );
80
 
81
  element.addEventListener( 'wptb-control:' + elementControlTargetUnicClass, function( event ) {
82
  let targetElm = element.getElementsByClassName( 'mce-content-body' );
inc/admin/element-classes/element-scripts/text-element.js CHANGED
@@ -1,73 +1,79 @@
1
- tinyMCE.init({
2
- target: element.childNodes[0],
3
- inline: true,
4
- plugins: "link, paste",
5
- dialog_type: "modal",
6
- theme: 'modern',
7
- menubar: false,
8
- force_br_newlines : false,
9
- force_p_newlines : false,
10
- forced_root_block : '',
11
- fixed_toolbar_container: '#wpcd_fixed_toolbar',
12
- paste_as_text: true,
13
- toolbar: 'bold italic strikethrough link unlink | alignleft aligncenter alignright alignjustify',
14
- setup : function( ed ) {
15
- ed.on( 'change', function(e) {
16
- let row = WPTB_Helper.findAncestor( element, 'wptb-row' );
17
- if( WPTB_Helper.rowIsTop( row ) ) {
18
- let table = WPTB_Helper.findAncestor( row, 'wptb-preview-table' );
19
-
20
- if( table.classList.contains( 'wptb-table-preview-head' ) ) {
21
- WPTB_Helper.dataTitleColumnSet( table );
 
 
22
  }
23
- }
24
- });
25
-
26
- ed.on( 'keydown', function( e ) {
27
- let p = e.target.querySelector( 'p' );
28
- let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
29
- pText = pText.replace( /&nbsp;/g, '').trim();
30
-
31
- if( ! window.textElemPTextKeyDown ) {
32
- window.textElemPTextKeyDown = pText;
33
- }
34
- });
35
-
36
- ed.on( 'keyup', function(e) {
37
- let p = e.target.querySelector( 'p' );
38
- let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
39
- pText = pText.replace( /&nbsp;/g, '').trim();
40
- if( pText !== window.textElemPTextKeyDown ) {
41
- e.target.onblur = function() {
42
- let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
43
- wptbTableStateSaveManager.tableStateSet();
44
 
45
- window.textElemPTextKeyDown = '';
 
 
 
46
  e.target.onblur = '';
47
  }
48
- } else {
49
- e.target.onblur = '';
50
- }
51
- });
52
- },
53
- init_instance_callback: function (editor) {
54
- window.currentEditor = editor;
55
- editor.on('focus', function (e) {
56
- var totalWidth = document.getElementsByClassName('wptb-builder-panel')[0].offsetWidth;
57
- if (window.currentEditor &&
58
- document.getElementById('wptb_builder').scrollTop >= 55 &&
59
- window.currentEditor.bodyElement.style.display != 'none') {
60
- document.getElementById('wpcd_fixed_toolbar').style.position = 'fixed';
61
- document.getElementById('wpcd_fixed_toolbar').style.right = (totalWidth / 2 - document.getElementById('wpcd_fixed_toolbar').offsetWidth / 2) + 'px';
62
- document.getElementById('wpcd_fixed_toolbar').style.top = '100px';
63
- } else {
64
- document.getElementById('wpcd_fixed_toolbar').style.position = 'static';
65
- delete document.getElementById('wpcd_fixed_toolbar').style.right;
66
- delete document.getElementById('wpcd_fixed_toolbar').style.top;
67
- }
68
- });
69
- }
70
- });
 
 
71
 
72
  var observer = new MutationObserver( function( mutations ) {
73
  let row = WPTB_Helper.findAncestor( element, 'wptb-row' );
1
+ let tinyMceInitStart = function() {
2
+ tinyMCE.init({
3
+ target: element.childNodes[0],
4
+ inline: true,
5
+ plugins: "link, paste",
6
+ dialog_type: "modal",
7
+ theme: 'modern',
8
+ menubar: false,
9
+ force_br_newlines : false,
10
+ force_p_newlines : false,
11
+ forced_root_block : '',
12
+ fixed_toolbar_container: '#wpcd_fixed_toolbar',
13
+ paste_as_text: true,
14
+ toolbar: 'bold italic strikethrough link unlink | alignleft aligncenter alignright alignjustify',
15
+ setup : function( ed ) {
16
+ ed.on( 'change', function(e) {
17
+ let row = WPTB_Helper.findAncestor( element, 'wptb-row' );
18
+ if( WPTB_Helper.rowIsTop( row ) ) {
19
+ let table = WPTB_Helper.findAncestor( row, 'wptb-preview-table' );
20
+
21
+ if( table.classList.contains( 'wptb-table-preview-head' ) ) {
22
+ WPTB_Helper.dataTitleColumnSet( table );
23
+ }
24
  }
25
+ });
26
+
27
+ ed.on( 'keydown', function( e ) {
28
+ let p = e.target.querySelector( 'p' );
29
+ let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
30
+ pText = pText.replace( /&nbsp;/g, '').trim();
31
+
32
+ if( ! window.textElemPTextKeyDown ) {
33
+ window.textElemPTextKeyDown = pText;
34
+ }
35
+ });
36
+
37
+ ed.on( 'keyup', function(e) {
38
+ let p = e.target.querySelector( 'p' );
39
+ let pText = p.innerHTML.replace( /\s+/g, ' ' ).trim();
40
+ pText = pText.replace( /&nbsp;/g, '').trim();
41
+ if( pText !== window.textElemPTextKeyDown ) {
42
+ e.target.onblur = function() {
43
+ let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
44
+ wptbTableStateSaveManager.tableStateSet();
 
45
 
46
+ window.textElemPTextKeyDown = '';
47
+ e.target.onblur = '';
48
+ }
49
+ } else {
50
  e.target.onblur = '';
51
  }
52
+ });
53
+ },
54
+ init_instance_callback: function (editor) {
55
+ window.currentEditor = editor;
56
+ editor.on('focus', function (e) {
57
+ var totalWidth = document.getElementsByClassName('wptb-builder-panel')[0].offsetWidth;
58
+ if (window.currentEditor &&
59
+ document.getElementById('wptb_builder').scrollTop >= 55 &&
60
+ window.currentEditor.bodyElement.style.display != 'none') {
61
+ document.getElementById('wpcd_fixed_toolbar').style.position = 'fixed';
62
+ document.getElementById('wpcd_fixed_toolbar').style.right = (totalWidth / 2 - document.getElementById('wpcd_fixed_toolbar').offsetWidth / 2) + 'px';
63
+ document.getElementById('wpcd_fixed_toolbar').style.top = '100px';
64
+ } else {
65
+ document.getElementById('wpcd_fixed_toolbar').style.position = 'static';
66
+ delete document.getElementById('wpcd_fixed_toolbar').style.right;
67
+ delete document.getElementById('wpcd_fixed_toolbar').style.top;
68
+ }
69
+ });
70
+ }
71
+ });
72
+
73
+ element.removeEventListener( 'mouseover', tinyMceInitStart, false );
74
+ }
75
+
76
+ element.addEventListener( 'mouseover', tinyMceInitStart, false );
77
 
78
  var observer = new MutationObserver( function( mutations ) {
79
  let row = WPTB_Helper.findAncestor( element, 'wptb-row' );
inc/admin/js/WPTB_Admin_Settings.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}
2
+ /*!
3
+ * Vue.js v2.6.11
4
+ * (c) 2014-2019 Evan You
5
+ * Released under the MIT License.
6
+ */var r=Object.freeze({});function i(e){return null==e}function o(e){return null!=e}function a(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function c(e){return null!==e&&"object"==typeof e}var l=Object.prototype.toString;function u(e){return"[object Object]"===l.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function d(e){return o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||u(e)&&e.toString===l?JSON.stringify(e,null,2):String(e)}function v(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var m=h("slot,component",!0),g=h("key,ref,slot,slot-scope,is");function y(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(e,t){return _.call(e,t)}function $(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var w=/-(\w)/g,C=$((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),k=$((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),A=/\B([A-Z])/g,x=$((function(e){return e.replace(A,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function O(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function T(e,t){for(var n in t)e[n]=t[n];return e}function D(e){for(var t={},n=0;n<e.length;n++)e[n]&&T(t,e[n]);return t}function E(e,t,n){}var j=function(e,t,n){return!1},N=function(e){return e};function M(e,t){if(e===t)return!0;var n=c(e),r=c(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),o=Array.isArray(t);if(i&&o)return e.length===t.length&&e.every((function(e,n){return M(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||o)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every((function(n){return M(e[n],t[n])}))}catch(e){return!1}}function I(e,t){for(var n=0;n<e.length;n++)if(M(e[n],t))return n;return-1}function F(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var P=["component","directive","filter"],L=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],R={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:j,isReservedAttr:j,isUnknownElement:j,getTagNamespace:E,parsePlatformTagName:N,mustUseProp:j,async:!0,_lifecycleHooks:L},B=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function H(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function U(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var z=new RegExp("[^"+B.source+".$_\\d]");var V,K="__proto__"in{},J="undefined"!=typeof window,q="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,W=q&&WXEnvironment.platform.toLowerCase(),Z=J&&window.navigator.userAgent.toLowerCase(),G=Z&&/msie|trident/.test(Z),X=Z&&Z.indexOf("msie 9.0")>0,Y=Z&&Z.indexOf("edge/")>0,Q=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===W),ee=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),te={}.watch,ne=!1;if(J)try{var re={};Object.defineProperty(re,"passive",{get:function(){ne=!0}}),window.addEventListener("test-passive",null,re)}catch(e){}var ie=function(){return void 0===V&&(V=!J&&!q&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),V},oe=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var se,ce="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys);se="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var le=E,ue=0,fe=function(){this.id=ue++,this.subs=[]};fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){y(this.subs,e)},fe.prototype.depend=function(){fe.target&&fe.target.addDep(this)},fe.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},fe.target=null;var de=[];function pe(e){de.push(e),fe.target=e}function ve(){de.pop(),fe.target=de[de.length-1]}var he=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},me={child:{configurable:!0}};me.child.get=function(){return this.componentInstance},Object.defineProperties(he.prototype,me);var ge=function(e){void 0===e&&(e="");var t=new he;return t.text=e,t.isComment=!0,t};function ye(e){return new he(void 0,void 0,void 0,String(e))}function _e(e){var t=new he(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var be=Array.prototype,$e=Object.create(be);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=be[e];U($e,e,(function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o}))}));var we=Object.getOwnPropertyNames($e),Ce=!0;function ke(e){Ce=e}var Ae=function(e){this.value=e,this.dep=new fe,this.vmCount=0,U(e,"__ob__",this),Array.isArray(e)?(K?function(e,t){e.__proto__=t}(e,$e):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];U(e,o,t[o])}}(e,$e,we),this.observeArray(e)):this.walk(e)};function xe(e,t){var n;if(c(e)&&!(e instanceof he))return b(e,"__ob__")&&e.__ob__ instanceof Ae?n=e.__ob__:Ce&&!ie()&&(Array.isArray(e)||u(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Ae(e)),t&&n&&n.vmCount++,n}function Se(e,t,n,r,i){var o=new fe,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=e[t]);var l=!i&&xe(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return fe.target&&(o.depend(),l&&(l.dep.depend(),Array.isArray(t)&&De(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||s&&!c||(c?c.call(e,t):n=t,l=!i&&xe(t),o.notify())}})}}function Oe(e,t,n){if(Array.isArray(e)&&f(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(Se(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Te(e,t){if(Array.isArray(e)&&f(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||b(e,t)&&(delete e[t],n&&n.dep.notify())}}function De(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&De(t)}Ae.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Se(e,t[n])},Ae.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)xe(e[t])};var Ee=R.optionMergeStrategies;function je(e,t){if(!t)return e;for(var n,r,i,o=ce?Reflect.ownKeys(t):Object.keys(t),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(r=e[n],i=t[n],b(e,n)?r!==i&&u(r)&&u(i)&&je(r,i):Oe(e,n,i));return e}function Ne(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?je(r,i):i}:t?e?function(){return je("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Me(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Ie(e,t,n,r){var i=Object.create(e||null);return t?T(i,t):i}Ee.data=function(e,t,n){return n?Ne(e,t,n):t&&"function"!=typeof t?e:Ne(e,t)},L.forEach((function(e){Ee[e]=Me})),P.forEach((function(e){Ee[e+"s"]=Ie})),Ee.watch=function(e,t,n,r){if(e===te&&(e=void 0),t===te&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in T(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ee.props=Ee.methods=Ee.inject=Ee.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return T(i,e),t&&T(i,t),i},Ee.provide=Ne;var Fe=function(e,t){return void 0===t?e:t};function Pe(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[C(i)]={type:null});else if(u(n))for(var a in n)i=n[a],o[C(a)]=u(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(u(n))for(var o in n){var a=n[o];r[o]=u(a)?T({from:o},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=Pe(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=Pe(e,t.mixins[r],n);var o,a={};for(o in e)s(o);for(o in t)b(e,o)||s(o);function s(r){var i=Ee[r]||Fe;a[r]=i(e[r],t[r],n,r)}return a}function Le(e,t,n,r){if("string"==typeof n){var i=e[t];if(b(i,n))return i[n];var o=C(n);if(b(i,o))return i[o];var a=k(o);return b(i,a)?i[a]:i[n]||i[o]||i[a]}}function Re(e,t,n,r){var i=t[e],o=!b(n,e),a=n[e],s=Ue(Boolean,i.type);if(s>-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===x(e)){var c=Ue(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!b(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Be(t.type)?r.call(e):r}(r,i,e);var l=Ce;ke(!0),xe(a),ke(l)}return a}function Be(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function He(e,t){return Be(e)===Be(t)}function Ue(e,t){if(!Array.isArray(t))return He(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(He(t[n],e))return n;return-1}function ze(e,t,n){pe();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Ke(e,r,"errorCaptured hook")}}Ke(e,t,n)}finally{ve()}}function Ve(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&d(o)&&!o._handled&&(o.catch((function(e){return ze(e,r,i+" (Promise/async)")})),o._handled=!0)}catch(e){ze(e,r,i)}return o}function Ke(e,t,n){if(R.errorHandler)try{return R.errorHandler.call(null,e,t,n)}catch(t){t!==e&&Je(t)}Je(e)}function Je(e,t,n){if(!J&&!q||"undefined"==typeof console)throw e;console.error(e)}var qe,We=!1,Ze=[],Ge=!1;function Xe(){Ge=!1;var e=Ze.slice(0);Ze.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&ae(Promise)){var Ye=Promise.resolve();qe=function(){Ye.then(Xe),Q&&setTimeout(E)},We=!0}else if(G||"undefined"==typeof MutationObserver||!ae(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())qe="undefined"!=typeof setImmediate&&ae(setImmediate)?function(){setImmediate(Xe)}:function(){setTimeout(Xe,0)};else{var Qe=1,et=new MutationObserver(Xe),tt=document.createTextNode(String(Qe));et.observe(tt,{characterData:!0}),qe=function(){Qe=(Qe+1)%2,tt.data=String(Qe)},We=!0}function nt(e,t){var n;if(Ze.push((function(){if(e)try{e.call(t)}catch(e){ze(e,t,"nextTick")}else n&&n(t)})),Ge||(Ge=!0,qe()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}var rt=new se;function it(e){!function e(t,n){var r,i,o=Array.isArray(t);if(!o&&!c(t)||Object.isFrozen(t)||t instanceof he)return;if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(o)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,rt),rt.clear()}var ot=$((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function at(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return Ve(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)Ve(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function st(e,t,n,r,o,s){var c,l,u,f;for(c in e)l=e[c],u=t[c],f=ot(c),i(l)||(i(u)?(i(l.fns)&&(l=e[c]=at(l,s)),a(f.once)&&(l=e[c]=o(f.name,l,f.capture)),n(f.name,l,f.capture,f.passive,f.params)):l!==u&&(u.fns=l,e[c]=u));for(c in t)i(e[c])&&r((f=ot(c)).name,t[c],f.capture)}function ct(e,t,n){var r;e instanceof he&&(e=e.data.hook||(e.data.hook={}));var s=e[t];function c(){n.apply(this,arguments),y(r.fns,c)}i(s)?r=at([c]):o(s.fns)&&a(s.merged)?(r=s).fns.push(c):r=at([s,c]),r.merged=!0,e[t]=r}function lt(e,t,n,r,i){if(o(t)){if(b(t,n))return e[n]=t[n],i||delete t[n],!0;if(b(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function ut(e){return s(e)?[ye(e)]:Array.isArray(e)?function e(t,n){var r,c,l,u,f=[];for(r=0;r<t.length;r++)i(c=t[r])||"boolean"==typeof c||(l=f.length-1,u=f[l],Array.isArray(c)?c.length>0&&(ft((c=e(c,(n||"")+"_"+r))[0])&&ft(u)&&(f[l]=ye(u.text+c[0].text),c.shift()),f.push.apply(f,c)):s(c)?ft(u)?f[l]=ye(u.text+c):""!==c&&f.push(ye(c)):ft(c)&&ft(u)?f[l]=ye(u.text+c.text):(a(t._isVList)&&o(c.tag)&&i(c.key)&&o(n)&&(c.key="__vlist"+n+"_"+r+"__"),f.push(c)));return f}(e):void 0}function ft(e){return o(e)&&o(e.text)&&!1===e.isComment}function dt(e,t){if(e){for(var n=Object.create(null),r=ce?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var a=e[o].from,s=t;s;){if(s._provided&&b(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var c=e[o].default;n[o]="function"==typeof c?c.call(t):c}}}return n}}function pt(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var l in n)n[l].every(vt)&&delete n[l];return n}function vt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function ht(e,t,n){var i,o=Object.keys(t).length>0,a=e?!!e.$stable:!o,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==r&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var c in i={},e)e[c]&&"$"!==c[0]&&(i[c]=mt(t,c,e[c]))}else i={};for(var l in t)l in i||(i[l]=gt(t,l));return e&&Object.isExtensible(e)&&(e._normalized=i),U(i,"$stable",a),U(i,"$key",s),U(i,"$hasNormal",o),i}function mt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ut(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function gt(e,t){return function(){return e[t]}}function yt(e,t){var n,r,i,a,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(c(e))if(ce&&e[Symbol.iterator]){n=[];for(var l=e[Symbol.iterator](),u=l.next();!u.done;)n.push(t(u.value,n.length)),u=l.next()}else for(a=Object.keys(e),n=new Array(a.length),r=0,i=a.length;r<i;r++)s=a[r],n[r]=t(e[s],s,r);return o(n)||(n=[]),n._isVList=!0,n}function _t(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=T(T({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function bt(e){return Le(this.$options,"filters",e)||N}function $t(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function wt(e,t,n,r,i){var o=R.keyCodes[t]||n;return i&&r&&!R.keyCodes[t]?$t(i,r):o?$t(o,e):r?x(r)!==t:void 0}function Ct(e,t,n,r,i){if(n)if(c(n)){var o;Array.isArray(n)&&(n=D(n));var a=function(a){if("class"===a||"style"===a||g(a))o=e;else{var s=e.attrs&&e.attrs.type;o=r||R.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var c=C(a),l=x(a);c in o||l in o||(o[a]=n[a],i&&((e.on||(e.on={}))["update:"+a]=function(e){n[a]=e}))};for(var s in n)a(s)}else;return e}function kt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||xt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function At(e,t,n){return xt(e,"__once__"+t+(n?"_"+n:""),!0),e}function xt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&St(e[r],t+"_"+r,n);else St(e,t,n)}function St(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Ot(e,t){if(t)if(u(t)){var n=e.on=e.on?T({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function Tt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?Tt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function Dt(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Et(e,t){return"string"==typeof e?t+e:e}function jt(e){e._o=At,e._n=v,e._s=p,e._l=yt,e._t=_t,e._q=M,e._i=I,e._m=kt,e._f=bt,e._k=wt,e._b=Ct,e._v=ye,e._e=ge,e._u=Tt,e._g=Ot,e._d=Dt,e._p=Et}function Nt(e,t,n,i,o){var s,c=this,l=o.options;b(i,"_uid")?(s=Object.create(i))._original=i:(s=i,i=i._original);var u=a(l._compiled),f=!u;this.data=e,this.props=t,this.children=n,this.parent=i,this.listeners=e.on||r,this.injections=dt(l.inject,i),this.slots=function(){return c.$slots||ht(e.scopedSlots,c.$slots=pt(n,i)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ht(e.scopedSlots,this.slots())}}),u&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=ht(e.scopedSlots,this.$slots)),l._scopeId?this._c=function(e,t,n,r){var o=Bt(s,e,t,n,r,f);return o&&!Array.isArray(o)&&(o.fnScopeId=l._scopeId,o.fnContext=i),o}:this._c=function(e,t,n,r){return Bt(s,e,t,n,r,f)}}function Mt(e,t,n,r,i){var o=_e(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function It(e,t){for(var n in t)e[C(n)]=t[n]}jt(Nt.prototype);var Ft={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;Ft.prepatch(n,n)}else{(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new e.componentOptions.Ctor(n)}(e,Gt)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,i,o){var a=i.data.scopedSlots,s=e.$scopedSlots,c=!!(a&&!a.$stable||s!==r&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key),l=!!(o||e.$options._renderChildren||c);e.$options._parentVnode=i,e.$vnode=i,e._vnode&&(e._vnode.parent=i);if(e.$options._renderChildren=o,e.$attrs=i.data.attrs||r,e.$listeners=n||r,t&&e.$options.props){ke(!1);for(var u=e._props,f=e.$options._propKeys||[],d=0;d<f.length;d++){var p=f[d],v=e.$options.props;u[p]=Re(p,v,t,e)}ke(!0),e.$options.propsData=t}n=n||r;var h=e.$options._parentListeners;e.$options._parentListeners=n,Zt(e,n,h),l&&(e.$slots=pt(o,i.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,en(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,nn.push(t)):Qt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,Yt(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);en(t,"deactivated")}}(t,!0):t.$destroy())}},Pt=Object.keys(Ft);function Lt(e,t,n,s,l){if(!i(e)){var u=n.$options._base;if(c(e)&&(e=u.extend(e)),"function"==typeof e){var f;if(i(e.cid)&&void 0===(e=function(e,t){if(a(e.error)&&o(e.errorComp))return e.errorComp;if(o(e.resolved))return e.resolved;var n=Ut;n&&o(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n);if(a(e.loading)&&o(e.loadingComp))return e.loadingComp;if(n&&!o(e.owners)){var r=e.owners=[n],s=!0,l=null,u=null;n.$on("hook:destroyed",(function(){return y(r,n)}));var f=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==l&&(clearTimeout(l),l=null),null!==u&&(clearTimeout(u),u=null))},p=F((function(n){e.resolved=zt(n,t),s?r.length=0:f(!0)})),v=F((function(t){o(e.errorComp)&&(e.error=!0,f(!0))})),h=e(p,v);return c(h)&&(d(h)?i(e.resolved)&&h.then(p,v):d(h.component)&&(h.component.then(p,v),o(h.error)&&(e.errorComp=zt(h.error,t)),o(h.loading)&&(e.loadingComp=zt(h.loading,t),0===h.delay?e.loading=!0:l=setTimeout((function(){l=null,i(e.resolved)&&i(e.error)&&(e.loading=!0,f(!1))}),h.delay||200)),o(h.timeout)&&(u=setTimeout((function(){u=null,i(e.resolved)&&v(null)}),h.timeout)))),s=!1,e.loading?e.loadingComp:e.resolved}}(f=e,u)))return function(e,t,n,r,i){var o=ge();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(f,t,n,s,l);t=t||{},Cn(e),o(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var i=t.on||(t.on={}),a=i[r],s=t.model.callback;o(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(i[r]=[s].concat(a)):i[r]=s}(e.options,t);var p=function(e,t,n){var r=t.options.props;if(!i(r)){var a={},s=e.attrs,c=e.props;if(o(s)||o(c))for(var l in r){var u=x(l);lt(a,c,l,u,!0)||lt(a,s,l,u,!1)}return a}}(t,e);if(a(e.options.functional))return function(e,t,n,i,a){var s=e.options,c={},l=s.props;if(o(l))for(var u in l)c[u]=Re(u,l,t||r);else o(n.attrs)&&It(c,n.attrs),o(n.props)&&It(c,n.props);var f=new Nt(n,c,a,i,e),d=s.render.call(null,f._c,f);if(d instanceof he)return Mt(d,n,f.parent,s);if(Array.isArray(d)){for(var p=ut(d)||[],v=new Array(p.length),h=0;h<p.length;h++)v[h]=Mt(p[h],n,f.parent,s);return v}}(e,p,t,n,s);var v=t.on;if(t.on=t.nativeOn,a(e.options.abstract)){var h=t.slot;t={},h&&(t.slot=h)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Pt.length;n++){var r=Pt[n],i=t[r],o=Ft[r];i===o||i&&i._merged||(t[r]=i?Rt(o,i):o)}}(t);var m=e.options.name||l;return new he("vue-component-"+e.cid+(m?"-"+m:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:p,listeners:v,tag:l,children:s},f)}}}function Rt(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}function Bt(e,t,n,r,l,u){return(Array.isArray(n)||s(n))&&(l=r,r=n,n=void 0),a(u)&&(l=2),function(e,t,n,r,s){if(o(n)&&o(n.__ob__))return ge();o(n)&&o(n.is)&&(t=n.is);if(!t)return ge();Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);2===s?r=ut(r):1===s&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var l,u;if("string"==typeof t){var f;u=e.$vnode&&e.$vnode.ns||R.getTagNamespace(t),l=R.isReservedTag(t)?new he(R.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!o(f=Le(e.$options,"components",t))?new he(t,n,r,void 0,void 0,e):Lt(f,n,e,r,t)}else l=Lt(t,n,e,r);return Array.isArray(l)?l:o(l)?(o(u)&&function e(t,n,r){t.ns=n,"foreignObject"===t.tag&&(n=void 0,r=!0);if(o(t.children))for(var s=0,c=t.children.length;s<c;s++){var l=t.children[s];o(l.tag)&&(i(l.ns)||a(r)&&"svg"!==l.tag)&&e(l,n,r)}}(l,u),o(n)&&function(e){c(e.style)&&it(e.style);c(e.class)&&it(e.class)}(n),l):ge()}(e,t,n,r,l)}var Ht,Ut=null;function zt(e,t){return(e.__esModule||ce&&"Module"===e[Symbol.toStringTag])&&(e=e.default),c(e)?t.extend(e):e}function Vt(e){return e.isComment&&e.asyncFactory}function Kt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(o(n)&&(o(n.componentOptions)||Vt(n)))return n}}function Jt(e,t){Ht.$on(e,t)}function qt(e,t){Ht.$off(e,t)}function Wt(e,t){var n=Ht;return function r(){var i=t.apply(null,arguments);null!==i&&n.$off(e,r)}}function Zt(e,t,n){Ht=e,st(t,n||{},Jt,qt,Wt,e),Ht=void 0}var Gt=null;function Xt(e){var t=Gt;return Gt=e,function(){Gt=t}}function Yt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Qt(e,t){if(t){if(e._directInactive=!1,Yt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Qt(e.$children[n]);en(e,"activated")}}function en(e,t){pe();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)Ve(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),ve()}var tn=[],nn=[],rn={},on=!1,an=!1,sn=0;var cn=0,ln=Date.now;if(J&&!G){var un=window.performance;un&&"function"==typeof un.now&&ln()>document.createEvent("Event").timeStamp&&(ln=function(){return un.now()})}function fn(){var e,t;for(cn=ln(),an=!0,tn.sort((function(e,t){return e.id-t.id})),sn=0;sn<tn.length;sn++)(e=tn[sn]).before&&e.before(),t=e.id,rn[t]=null,e.run();var n=nn.slice(),r=tn.slice();sn=tn.length=nn.length=0,rn={},on=an=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Qt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&en(r,"updated")}}(r),oe&&R.devtools&&oe.emit("flush")}var dn=0,pn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++dn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new se,this.newDepIds=new se,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!z.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=E)),this.value=this.lazy?void 0:this.get()};pn.prototype.get=function(){var e;pe(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;ze(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&it(e),ve(),this.cleanupDeps()}return e},pn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},pn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},pn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==rn[t]){if(rn[t]=!0,an){for(var n=tn.length-1;n>sn&&tn[n].id>e.id;)n--;tn.splice(n+1,0,e)}else tn.push(e);on||(on=!0,nt(fn))}}(this)},pn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){ze(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},pn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},pn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},pn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var vn={enumerable:!0,configurable:!0,get:E,set:E};function hn(e,t,n){vn.get=function(){return this[t][n]},vn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,vn)}function mn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&ke(!1);var o=function(o){i.push(o);var a=Re(o,t,n,e);Se(r,o,a),o in e||hn(e,"_props",o)};for(var a in t)o(a);ke(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?E:S(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;u(t=e._data="function"==typeof t?function(e,t){pe();try{return e.call(t,t)}catch(e){return ze(e,t,"data()"),{}}finally{ve()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&b(r,o)||H(o)||hn(e,"_data",o)}xe(t,!0)}(e):xe(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ie();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new pn(e,a||E,E,gn)),i in e||yn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)$n(e,n,r[i]);else $n(e,n,r)}}(e,t.watch)}var gn={lazy:!0};function yn(e,t,n){var r=!ie();"function"==typeof n?(vn.get=r?_n(t):bn(n),vn.set=E):(vn.get=n.get?r&&!1!==n.cache?_n(t):bn(n.get):E,vn.set=n.set||E),Object.defineProperty(e,t,vn)}function _n(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),fe.target&&t.depend(),t.value}}function bn(e){return function(){return e.call(this,this)}}function $n(e,t,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var wn=0;function Cn(e){var t=e.options;if(e.super){var n=Cn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&T(e.extendOptions,r),(t=e.options=Pe(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function kn(e){this._init(e)}function An(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=Pe(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)hn(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)yn(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,P.forEach((function(e){a[e]=n[e]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=T({},a.options),i[r]=a,a}}function xn(e){return e&&(e.Ctor.options.name||e.tag)}function Sn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===l.call(n)&&e.test(t));var n}function On(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&Tn(n,o,r,i)}}}function Tn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,y(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=wn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Pe(Cn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Zt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,i=n&&n.context;e.$slots=pt(t._renderChildren,i),e.$scopedSlots=r,e._c=function(t,n,r,i){return Bt(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Bt(e,t,n,r,i,!0)};var o=n&&n.data;Se(e,"$attrs",o&&o.attrs||r,null,!0),Se(e,"$listeners",t._parentListeners||r,null,!0)}(t),en(t,"beforeCreate"),function(e){var t=dt(e.$options.inject,e);t&&(ke(!1),Object.keys(t).forEach((function(n){Se(e,n,t[n])})),ke(!0))}(t),mn(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),en(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(kn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Oe,e.prototype.$delete=Te,e.prototype.$watch=function(e,t,n){if(u(t))return $n(this,e,t,n);(n=n||{}).user=!0;var r=new pn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){ze(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(kn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((o=a[s])===t||o.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?O(n):n;for(var r=O(arguments,1),i='event handler for "'+e+'"',o=0,a=n.length;o<a;o++)Ve(n[o],t,r,t,i)}return t}}(kn),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Xt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){en(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||y(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),en(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(kn),function(e){jt(e.prototype),e.prototype.$nextTick=function(e){return nt(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=ht(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{Ut=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){ze(n,t,"render"),e=t._vnode}finally{Ut=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof he||(e=ge()),e.parent=i,e}}(kn);var Dn=[String,RegExp,Array],En={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Dn,exclude:Dn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Tn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){On(e,(function(e){return Sn(t,e)}))})),this.$watch("exclude",(function(t){On(e,(function(e){return!Sn(t,e)}))}))},render:function(){var e=this.$slots.default,t=Kt(e),n=t&&t.componentOptions;if(n){var r=xn(n),i=this.include,o=this.exclude;if(i&&(!r||!Sn(i,r))||o&&r&&Sn(o,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,y(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&Tn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return R}};Object.defineProperty(e,"config",t),e.util={warn:le,extend:T,mergeOptions:Pe,defineReactive:Se},e.set=Oe,e.delete=Te,e.nextTick=nt,e.observable=function(e){return xe(e),e},e.options=Object.create(null),P.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,T(e.options.components,En),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Pe(this.options,e),this}}(e),An(e),function(e){P.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(kn),Object.defineProperty(kn.prototype,"$isServer",{get:ie}),Object.defineProperty(kn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(kn,"FunctionalRenderContext",{value:Nt}),kn.version="2.6.11";var jn=h("style,class"),Nn=h("input,textarea,option,select,progress"),Mn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},In=h("contenteditable,draggable,spellcheck"),Fn=h("events,caret,typing,plaintext-only"),Pn=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ln="http://www.w3.org/1999/xlink",Rn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Bn=function(e){return Rn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Un(e){for(var t=e.data,n=e,r=e;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=zn(r.data,t));for(;o(n=n.parent);)n&&n.data&&(t=zn(t,n.data));return function(e,t){if(o(e)||o(t))return Vn(e,Kn(t));return""}(t.staticClass,t.class)}function zn(e,t){return{staticClass:Vn(e.staticClass,t.staticClass),class:o(e.class)?[e.class,t.class]:t.class}}function Vn(e,t){return e?t?e+" "+t:e:t||""}function Kn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)o(t=Kn(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):c(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Jn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},qn=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Wn=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Zn=function(e){return qn(e)||Wn(e)};function Gn(e){return Wn(e)?"svg":"math"===e?"math":void 0}var Xn=Object.create(null);var Yn=h("text,number,password,search,email,tel,url");function Qn(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var er=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Jn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),tr={create:function(e,t){nr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(nr(e,!0),nr(t))},destroy:function(e){nr(e,!0)}};function nr(e,t){var n=e.data.ref;if(o(n)){var r=e.context,i=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?y(a[n],i):a[n]===i&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var rr=new he("",{},[]),ir=["create","activate","update","remove","destroy"];function or(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&o(e.data)===o(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=o(n=e.data)&&o(n=n.attrs)&&n.type,i=o(n=t.data)&&o(n=n.attrs)&&n.type;return r===i||Yn(r)&&Yn(i)}(e,t)||a(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&i(t.asyncFactory.error))}function ar(e,t,n){var r,i,a={};for(r=t;r<=n;++r)o(i=e[r].key)&&(a[i]=r);return a}var sr={create:cr,update:cr,destroy:function(e){cr(e,rr)}};function cr(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===rr,a=t===rr,s=ur(e.data.directives,e.context),c=ur(t.data.directives,t.context),l=[],u=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,dr(i,"update",t,e),i.def&&i.def.componentUpdated&&u.push(i)):(dr(i,"bind",t,e),i.def&&i.def.inserted&&l.push(i));if(l.length){var f=function(){for(var n=0;n<l.length;n++)dr(l[n],"inserted",t,e)};o?ct(t,"insert",f):f()}u.length&&ct(t,"postpatch",(function(){for(var n=0;n<u.length;n++)dr(u[n],"componentUpdated",t,e)}));if(!o)for(n in s)c[n]||dr(s[n],"unbind",e,e,a)}(e,t)}var lr=Object.create(null);function ur(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=lr),i[fr(r)]=r,r.def=Le(t.$options,"directives",r.name);return i}function fr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function dr(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){ze(r,n.context,"directive "+e.name+" "+t+" hook")}}var pr=[tr,sr];function vr(e,t){var n=t.componentOptions;if(!(o(n)&&!1===n.Ctor.options.inheritAttrs||i(e.data.attrs)&&i(t.data.attrs))){var r,a,s=t.elm,c=e.data.attrs||{},l=t.data.attrs||{};for(r in o(l.__ob__)&&(l=t.data.attrs=T({},l)),l)a=l[r],c[r]!==a&&hr(s,r,a);for(r in(G||Y)&&l.value!==c.value&&hr(s,"value",l.value),c)i(l[r])&&(Rn(r)?s.removeAttributeNS(Ln,Bn(r)):In(r)||s.removeAttribute(r))}}function hr(e,t,n){e.tagName.indexOf("-")>-1?mr(e,t,n):Pn(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):In(t)?e.setAttribute(t,function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Fn(t)?t:"true"}(t,n)):Rn(t)?Hn(n)?e.removeAttributeNS(Ln,Bn(t)):e.setAttributeNS(Ln,t,n):mr(e,t,n)}function mr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(G&&!X&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var gr={create:vr,update:vr};function yr(e,t){var n=t.elm,r=t.data,a=e.data;if(!(i(r.staticClass)&&i(r.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=Un(t),c=n._transitionClasses;o(c)&&(s=Vn(s,Kn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var _r,br,$r,wr,Cr,kr,Ar={create:yr,update:yr},xr=/[\w).+\-_$\]]/;function Sr(e){var t,n,r,i,o,a=!1,s=!1,c=!1,l=!1,u=0,f=0,d=0,p=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(l)47===t&&92!==n&&(l=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||u||f||d){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:u++;break;case 125:u--}if(47===t){for(var v=r-1,h=void 0;v>=0&&" "===(h=e.charAt(v));v--);h&&xr.test(h)||(l=!0)}}else void 0===i?(p=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(p,r).trim()),p=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==p&&m(),o)for(r=0;r<o.length;r++)i=Or(i,o[r]);return i}function Or(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function Tr(e,t){console.error("[Vue compiler]: "+e)}function Dr(e,t){return e?e.map((function(e){return e[t]})).filter((function(e){return e})):[]}function Er(e,t,n,r,i){(e.props||(e.props=[])).push(Br({name:t,value:n,dynamic:i},r)),e.plain=!1}function jr(e,t,n,r,i){(i?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(Br({name:t,value:n,dynamic:i},r)),e.plain=!1}function Nr(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(Br({name:t,value:n},r))}function Mr(e,t,n,r,i,o,a,s){(e.directives||(e.directives=[])).push(Br({name:t,rawName:n,value:r,arg:i,isDynamicArg:o,modifiers:a},s)),e.plain=!1}function Ir(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function Fr(e,t,n,i,o,a,s,c){var l;(i=i||r).right?c?t="("+t+")==='click'?'contextmenu':("+t+")":"click"===t&&(t="contextmenu",delete i.right):i.middle&&(c?t="("+t+")==='click'?'mouseup':("+t+")":"click"===t&&(t="mouseup")),i.capture&&(delete i.capture,t=Ir("!",t,c)),i.once&&(delete i.once,t=Ir("~",t,c)),i.passive&&(delete i.passive,t=Ir("&",t,c)),i.native?(delete i.native,l=e.nativeEvents||(e.nativeEvents={})):l=e.events||(e.events={});var u=Br({value:n.trim(),dynamic:c},s);i!==r&&(u.modifiers=i);var f=l[t];Array.isArray(f)?o?f.unshift(u):f.push(u):l[t]=f?o?[u,f]:[f,u]:u,e.plain=!1}function Pr(e,t,n){var r=Lr(e,":"+t)||Lr(e,"v-bind:"+t);if(null!=r)return Sr(r);if(!1!==n){var i=Lr(e,t);if(null!=i)return JSON.stringify(i)}}function Lr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Rr(e,t){for(var n=e.attrsList,r=0,i=n.length;r<i;r++){var o=n[r];if(t.test(o.name))return n.splice(r,1),o}}function Br(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function Hr(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=Ur(t,o);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+a+"}"}}function Ur(e,t){var n=function(e){if(e=e.trim(),_r=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<_r-1)return(wr=e.lastIndexOf("."))>-1?{exp:e.slice(0,wr),key:'"'+e.slice(wr+1)+'"'}:{exp:e,key:null};br=e,wr=Cr=kr=0;for(;!Vr();)Kr($r=zr())?qr($r):91===$r&&Jr($r);return{exp:e.slice(0,Cr),key:e.slice(Cr+1,kr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function zr(){return br.charCodeAt(++wr)}function Vr(){return wr>=_r}function Kr(e){return 34===e||39===e}function Jr(e){var t=1;for(Cr=wr;!Vr();)if(Kr(e=zr()))qr(e);else if(91===e&&t++,93===e&&t--,0===t){kr=wr;break}}function qr(e){for(var t=e;!Vr()&&(e=zr())!==t;);}var Wr;function Zr(e,t,n){var r=Wr;return function i(){var o=t.apply(null,arguments);null!==o&&Yr(e,i,n,r)}}var Gr=We&&!(ee&&Number(ee[1])<=53);function Xr(e,t,n,r){if(Gr){var i=cn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}Wr.addEventListener(e,t,ne?{capture:n,passive:r}:n)}function Yr(e,t,n,r){(r||Wr).removeEventListener(e,t._wrapper||t,n)}function Qr(e,t){if(!i(e.data.on)||!i(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Wr=t.elm,function(e){if(o(e.__r)){var t=G?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}o(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),st(n,r,Xr,Yr,Zr,t.context),Wr=void 0}}var ei,ti={create:Qr,update:Qr};function ni(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var n,r,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in o(c.__ob__)&&(c=t.data.domProps=T({},c)),s)n in c||(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var l=i(r)?"":String(r);ri(a,l)&&(a.value=l)}else if("innerHTML"===n&&Wn(a.tagName)&&i(a.innerHTML)){(ei=ei||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var u=ei.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}function ri(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(o(r)){if(r.number)return v(n)!==v(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ii={create:ni,update:ni},oi=$((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function ai(e){var t=si(e.style);return e.staticStyle?T(e.staticStyle,t):t}function si(e){return Array.isArray(e)?D(e):"string"==typeof e?oi(e):e}var ci,li=/^--/,ui=/\s*!important$/,fi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(ui.test(n))e.style.setProperty(x(t),n.replace(ui,""),"important");else{var r=pi(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},di=["Webkit","Moz","ms"],pi=$((function(e){if(ci=ci||document.createElement("div").style,"filter"!==(e=C(e))&&e in ci)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<di.length;n++){var r=di[n]+t;if(r in ci)return r}}));function vi(e,t){var n=t.data,r=e.data;if(!(i(n.staticStyle)&&i(n.style)&&i(r.staticStyle)&&i(r.style))){var a,s,c=t.elm,l=r.staticStyle,u=r.normalizedStyle||r.style||{},f=l||u,d=si(t.data.style)||{};t.data.normalizedStyle=o(d.__ob__)?T({},d):d;var p=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ai(i.data))&&T(r,n);(n=ai(e.data))&&T(r,n);for(var o=e;o=o.parent;)o.data&&(n=ai(o.data))&&T(r,n);return r}(t,!0);for(s in f)i(p[s])&&fi(c,s,"");for(s in p)(a=p[s])!==f[s]&&fi(c,s,null==a?"":a)}}var hi={create:vi,update:vi},mi=/\s+/;function gi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(mi).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function yi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(mi).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function _i(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&T(t,bi(e.name||"v")),T(t,e),t}return"string"==typeof e?bi(e):void 0}}var bi=$((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),$i=J&&!X,wi="transition",Ci="transitionend",ki="animation",Ai="animationend";$i&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(wi="WebkitTransition",Ci="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ki="WebkitAnimation",Ai="webkitAnimationEnd"));var xi=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Si(e){xi((function(){xi(e)}))}function Oi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function Ti(e,t){e._transitionClasses&&y(e._transitionClasses,t),yi(e,t)}function Di(e,t,n){var r=ji(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s="transition"===i?Ci:Ai,c=0,l=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++c>=a&&l()};setTimeout((function(){c<a&&l()}),o+1),e.addEventListener(s,u)}var Ei=/\b(transform|all)(,|$)/;function ji(e,t){var n,r=window.getComputedStyle(e),i=(r[wi+"Delay"]||"").split(", "),o=(r[wi+"Duration"]||"").split(", "),a=Ni(i,o),s=(r[ki+"Delay"]||"").split(", "),c=(r[ki+"Duration"]||"").split(", "),l=Ni(s,c),u=0,f=0;return"transition"===t?a>0&&(n="transition",u=a,f=o.length):"animation"===t?l>0&&(n="animation",u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?"transition":"animation":null)?"transition"===n?o.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:"transition"===n&&Ei.test(r[wi+"Property"])}}function Ni(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return Mi(t)+Mi(e[n])})))}function Mi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Ii(e,t){var n=e.elm;o(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=_i(e.data.transition);if(!i(r)&&!o(n._enterCb)&&1===n.nodeType){for(var a=r.css,s=r.type,l=r.enterClass,u=r.enterToClass,f=r.enterActiveClass,d=r.appearClass,p=r.appearToClass,h=r.appearActiveClass,m=r.beforeEnter,g=r.enter,y=r.afterEnter,_=r.enterCancelled,b=r.beforeAppear,$=r.appear,w=r.afterAppear,C=r.appearCancelled,k=r.duration,A=Gt,x=Gt.$vnode;x&&x.parent;)A=x.context,x=x.parent;var S=!A._isMounted||!e.isRootInsert;if(!S||$||""===$){var O=S&&d?d:l,T=S&&h?h:f,D=S&&p?p:u,E=S&&b||m,j=S&&"function"==typeof $?$:g,N=S&&w||y,M=S&&C||_,I=v(c(k)?k.enter:k),P=!1!==a&&!X,L=Li(j),R=n._enterCb=F((function(){P&&(Ti(n,D),Ti(n,T)),R.cancelled?(P&&Ti(n,O),M&&M(n)):N&&N(n),n._enterCb=null}));e.data.show||ct(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),j&&j(n,R)})),E&&E(n),P&&(Oi(n,O),Oi(n,T),Si((function(){Ti(n,O),R.cancelled||(Oi(n,D),L||(Pi(I)?setTimeout(R,I):Di(n,s,R)))}))),e.data.show&&(t&&t(),j&&j(n,R)),P||L||R()}}}function Fi(e,t){var n=e.elm;o(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=_i(e.data.transition);if(i(r)||1!==n.nodeType)return t();if(!o(n._leaveCb)){var a=r.css,s=r.type,l=r.leaveClass,u=r.leaveToClass,f=r.leaveActiveClass,d=r.beforeLeave,p=r.leave,h=r.afterLeave,m=r.leaveCancelled,g=r.delayLeave,y=r.duration,_=!1!==a&&!X,b=Li(p),$=v(c(y)?y.leave:y),w=n._leaveCb=F((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),_&&(Ti(n,u),Ti(n,f)),w.cancelled?(_&&Ti(n,l),m&&m(n)):(t(),h&&h(n)),n._leaveCb=null}));g?g(C):C()}function C(){w.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),d&&d(n),_&&(Oi(n,l),Oi(n,f),Si((function(){Ti(n,l),w.cancelled||(Oi(n,u),b||(Pi($)?setTimeout(w,$):Di(n,s,w)))}))),p&&p(n,w),_||b||w())}}function Pi(e){return"number"==typeof e&&!isNaN(e)}function Li(e){if(i(e))return!1;var t=e.fns;return o(t)?Li(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Ri(e,t){!0!==t.data.show&&Ii(t)}var Bi=function(e){var t,n,r={},c=e.modules,l=e.nodeOps;for(t=0;t<ir.length;++t)for(r[ir[t]]=[],n=0;n<c.length;++n)o(c[n][ir[t]])&&r[ir[t]].push(c[n][ir[t]]);function u(e){var t=l.parentNode(e);o(t)&&l.removeChild(t,e)}function f(e,t,n,i,s,c,u){if(o(e.elm)&&o(c)&&(e=c[u]=_e(e)),e.isRootInsert=!s,!function(e,t,n,i){var s=e.data;if(o(s)){var c=o(e.componentInstance)&&s.keepAlive;if(o(s=s.hook)&&o(s=s.init)&&s(e,!1),o(e.componentInstance))return d(e,t),p(n,e.elm,i),a(c)&&function(e,t,n,i){var a,s=e;for(;s.componentInstance;)if(s=s.componentInstance._vnode,o(a=s.data)&&o(a=a.transition)){for(a=0;a<r.activate.length;++a)r.activate[a](rr,s);t.push(s);break}p(n,e.elm,i)}(e,t,n,i),!0}}(e,t,n,i)){var f=e.data,h=e.children,m=e.tag;o(m)?(e.elm=e.ns?l.createElementNS(e.ns,m):l.createElement(m,e),y(e),v(e,h,t),o(f)&&g(e,t),p(n,e.elm,i)):a(e.isComment)?(e.elm=l.createComment(e.text),p(n,e.elm,i)):(e.elm=l.createTextNode(e.text),p(n,e.elm,i))}}function d(e,t){o(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,m(e)?(g(e,t),y(e)):(nr(e),t.push(e))}function p(e,t,n){o(e)&&(o(n)?l.parentNode(n)===e&&l.insertBefore(e,t,n):l.appendChild(e,t))}function v(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)f(t[r],n,e.elm,null,!0,t,r);else s(e.text)&&l.appendChild(e.elm,l.createTextNode(String(e.text)))}function m(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return o(e.tag)}function g(e,n){for(var i=0;i<r.create.length;++i)r.create[i](rr,e);o(t=e.data.hook)&&(o(t.create)&&t.create(rr,e),o(t.insert)&&n.push(e))}function y(e){var t;if(o(t=e.fnScopeId))l.setStyleScope(e.elm,t);else for(var n=e;n;)o(t=n.context)&&o(t=t.$options._scopeId)&&l.setStyleScope(e.elm,t),n=n.parent;o(t=Gt)&&t!==e.context&&t!==e.fnContext&&o(t=t.$options._scopeId)&&l.setStyleScope(e.elm,t)}function _(e,t,n,r,i,o){for(;r<=i;++r)f(n[r],o,e,t,!1,n,r)}function b(e){var t,n,i=e.data;if(o(i))for(o(t=i.hook)&&o(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(o(t=e.children))for(n=0;n<e.children.length;++n)b(e.children[n])}function $(e,t,n){for(;t<=n;++t){var r=e[t];o(r)&&(o(r.tag)?(w(r),b(r)):u(r.elm))}}function w(e,t){if(o(t)||o(e.data)){var n,i=r.remove.length+1;for(o(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&u(e)}return n.listeners=t,n}(e.elm,i),o(n=e.componentInstance)&&o(n=n._vnode)&&o(n.data)&&w(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);o(n=e.data.hook)&&o(n=n.remove)?n(e,t):t()}else u(e.elm)}function C(e,t,n,r){for(var i=n;i<r;i++){var a=t[i];if(o(a)&&or(e,a))return i}}function k(e,t,n,s,c,u){if(e!==t){o(t.elm)&&o(s)&&(t=s[c]=_e(t));var d=t.elm=e.elm;if(a(e.isAsyncPlaceholder))o(t.asyncFactory.resolved)?S(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(a(t.isStatic)&&a(e.isStatic)&&t.key===e.key&&(a(t.isCloned)||a(t.isOnce)))t.componentInstance=e.componentInstance;else{var p,v=t.data;o(v)&&o(p=v.hook)&&o(p=p.prepatch)&&p(e,t);var h=e.children,g=t.children;if(o(v)&&m(t)){for(p=0;p<r.update.length;++p)r.update[p](e,t);o(p=v.hook)&&o(p=p.update)&&p(e,t)}i(t.text)?o(h)&&o(g)?h!==g&&function(e,t,n,r,a){for(var s,c,u,d=0,p=0,v=t.length-1,h=t[0],m=t[v],g=n.length-1,y=n[0],b=n[g],w=!a;d<=v&&p<=g;)i(h)?h=t[++d]:i(m)?m=t[--v]:or(h,y)?(k(h,y,r,n,p),h=t[++d],y=n[++p]):or(m,b)?(k(m,b,r,n,g),m=t[--v],b=n[--g]):or(h,b)?(k(h,b,r,n,g),w&&l.insertBefore(e,h.elm,l.nextSibling(m.elm)),h=t[++d],b=n[--g]):or(m,y)?(k(m,y,r,n,p),w&&l.insertBefore(e,m.elm,h.elm),m=t[--v],y=n[++p]):(i(s)&&(s=ar(t,d,v)),i(c=o(y.key)?s[y.key]:C(y,t,d,v))?f(y,r,e,h.elm,!1,n,p):or(u=t[c],y)?(k(u,y,r,n,p),t[c]=void 0,w&&l.insertBefore(e,u.elm,h.elm)):f(y,r,e,h.elm,!1,n,p),y=n[++p]);d>v?_(e,i(n[g+1])?null:n[g+1].elm,n,p,g,r):p>g&&$(t,d,v)}(d,h,g,n,u):o(g)?(o(e.text)&&l.setTextContent(d,""),_(d,null,g,0,g.length-1,n)):o(h)?$(h,0,h.length-1):o(e.text)&&l.setTextContent(d,""):e.text!==t.text&&l.setTextContent(d,t.text),o(v)&&o(p=v.hook)&&o(p=p.postpatch)&&p(e,t)}}}function A(e,t,n){if(a(n)&&o(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var x=h("attrs,class,staticClass,staticStyle,key");function S(e,t,n,r){var i,s=t.tag,c=t.data,l=t.children;if(r=r||c&&c.pre,t.elm=e,a(t.isComment)&&o(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(o(c)&&(o(i=c.hook)&&o(i=i.init)&&i(t,!0),o(i=t.componentInstance)))return d(t,n),!0;if(o(s)){if(o(l))if(e.hasChildNodes())if(o(i=c)&&o(i=i.domProps)&&o(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var u=!0,f=e.firstChild,p=0;p<l.length;p++){if(!f||!S(f,l[p],n,r)){u=!1;break}f=f.nextSibling}if(!u||f)return!1}else v(t,l,n);if(o(c)){var h=!1;for(var m in c)if(!x(m)){h=!0,g(t,n);break}!h&&c.class&&it(c.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,s){if(!i(t)){var c,u=!1,d=[];if(i(e))u=!0,f(t,d);else{var p=o(e.nodeType);if(!p&&or(e,t))k(e,t,d,null,null,s);else{if(p){if(1===e.nodeType&&e.hasAttribute("data-server-rendered")&&(e.removeAttribute("data-server-rendered"),n=!0),a(n)&&S(e,t,d))return A(t,d,!0),e;c=e,e=new he(l.tagName(c).toLowerCase(),{},[],void 0,c)}var v=e.elm,h=l.parentNode(v);if(f(t,d,v._leaveCb?null:h,l.nextSibling(v)),o(t.parent))for(var g=t.parent,y=m(t);g;){for(var _=0;_<r.destroy.length;++_)r.destroy[_](g);if(g.elm=t.elm,y){for(var w=0;w<r.create.length;++w)r.create[w](rr,g);var C=g.data.hook.insert;if(C.merged)for(var x=1;x<C.fns.length;x++)C.fns[x]()}else nr(g);g=g.parent}o(h)?$([e],0,0):o(e.tag)&&b(e)}}return A(t,d,u),t.elm}o(e)&&b(e)}}({nodeOps:er,modules:[gr,Ar,ti,ii,hi,J?{create:Ri,activate:Ri,remove:function(e,t){!0!==e.data.show?Fi(e,t):t()}}:{}].concat(pr)});X&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&Wi(e,"input")}));var Hi={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?ct(n,"postpatch",(function(){Hi.componentUpdated(e,t,n)})):Ui(e,t,n.context),e._vOptions=[].map.call(e.options,Ki)):("textarea"===n.tag||Yn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Ji),e.addEventListener("compositionend",qi),e.addEventListener("change",qi),X&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ui(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Ki);if(i.some((function(e,t){return!M(e,r[t])})))(e.multiple?t.value.some((function(e){return Vi(e,i)})):t.value!==t.oldValue&&Vi(t.value,i))&&Wi(e,"change")}}};function Ui(e,t,n){zi(e,t),(G||Y)&&setTimeout((function(){zi(e,t)}),0)}function zi(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=I(r,Ki(a))>-1,a.selected!==o&&(a.selected=o);else if(M(Ki(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Vi(e,t){return t.every((function(t){return!M(t,e)}))}function Ki(e){return"_value"in e?e._value:e.value}function Ji(e){e.target.composing=!0}function qi(e){e.target.composing&&(e.target.composing=!1,Wi(e.target,"input"))}function Wi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Zi(e){return!e.componentInstance||e.data&&e.data.transition?e:Zi(e.componentInstance._vnode)}var Gi={model:Hi,show:{bind:function(e,t,n){var r=t.value,i=(n=Zi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Ii(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Zi(n)).data&&n.data.transition?(n.data.show=!0,r?Ii(n,(function(){e.style.display=e.__vOriginalDisplay})):Fi(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},Xi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Yi(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Yi(Kt(t.children)):e}function Qi(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[C(o)]=i[o];return t}function eo(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var to=function(e){return e.tag||Vt(e)},no=function(e){return"show"===e.name},ro={name:"transition",props:Xi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(to)).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=Yi(i);if(!o)return i;if(this._leaving)return eo(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var c=(o.data||(o.data={})).transition=Qi(this),l=this._vnode,u=Yi(l);if(o.data.directives&&o.data.directives.some(no)&&(o.data.show=!0),u&&u.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(o,u)&&!Vt(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var f=u.data.transition=T({},c);if("out-in"===r)return this._leaving=!0,ct(f,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),eo(e,i);if("in-out"===r){if(Vt(o))return l;var d,p=function(){d()};ct(c,"afterEnter",p),ct(c,"enterCancelled",p),ct(f,"delayLeave",(function(e){d=e}))}}return i}}},io=T({tag:String,moveClass:String},Xi);function oo(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ao(e){e.data.newPos=e.elm.getBoundingClientRect()}function so(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete io.mode;var co={Transition:ro,TransitionGroup:{props:io,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Xt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Qi(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var l=[],u=[],f=0;f<r.length;f++){var d=r[f];d.data.transition=a,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?l.push(d):u.push(d)}this.kept=e(t,null,l),this.removed=u}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(oo),e.forEach(ao),e.forEach(so),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Oi(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ci,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ci,e),n._moveCb=null,Ti(n,t))})}})))},methods:{hasMove:function(e,t){if(!$i)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){yi(n,e)})),gi(n,t),n.style.display="none",this.$el.appendChild(n);var r=ji(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};kn.config.mustUseProp=Mn,kn.config.isReservedTag=Zn,kn.config.isReservedAttr=jn,kn.config.getTagNamespace=Gn,kn.config.isUnknownElement=function(e){if(!J)return!0;if(Zn(e))return!1;if(e=e.toLowerCase(),null!=Xn[e])return Xn[e];var t=document.createElement(e);return e.indexOf("-")>-1?Xn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Xn[e]=/HTMLUnknownElement/.test(t.toString())},T(kn.options.directives,Gi),T(kn.options.components,co),kn.prototype.__patch__=J?Bi:E,kn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ge),en(e,"beforeMount"),r=function(){e._update(e._render(),n)},new pn(e,r,E,{before:function(){e._isMounted&&!e._isDestroyed&&en(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,en(e,"mounted")),e}(this,e=e&&J?Qn(e):void 0,t)},J&&setTimeout((function(){R.devtools&&oe&&oe.emit("init",kn)}),0);var lo=/\{\{((?:.|\r?\n)+?)\}\}/g,uo=/[-.*+?^${}()|[\]\/\\]/g,fo=$((function(e){var t=e[0].replace(uo,"\\$&"),n=e[1].replace(uo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var po={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Lr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Pr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var vo,ho={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Lr(e,"style");n&&(e.staticStyle=JSON.stringify(oi(n)));var r=Pr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},mo=function(e){return(vo=vo||document.createElement("div")).innerHTML=e,vo.textContent},go=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),yo=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),_o=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),bo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,$o=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,wo="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+B.source+"]*",Co="((?:"+wo+"\\:)?"+wo+")",ko=new RegExp("^<"+Co),Ao=/^\s*(\/?)>/,xo=new RegExp("^<\\/"+Co+"[^>]*>"),So=/^<!DOCTYPE [^>]+>/i,Oo=/^<!\--/,To=/^<!\[/,Do=h("script,style,textarea",!0),Eo={},jo={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},No=/&(?:lt|gt|quot|amp|#39);/g,Mo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Io=h("pre,textarea",!0),Fo=function(e,t){return e&&Io(e)&&"\n"===t[0]};function Po(e,t){var n=t?Mo:No;return e.replace(n,(function(e){return jo[e]}))}var Lo,Ro,Bo,Ho,Uo,zo,Vo,Ko,Jo=/^@|^v-on:/,qo=/^v-|^@|^:|^#/,Wo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Zo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Go=/^\(|\)$/g,Xo=/^\[.*\]$/,Yo=/:(.*)$/,Qo=/^:|^\.|^v-bind:/,ea=/\.[^.\]]+(?=[^\]]*$)/g,ta=/^v-slot(:|$)|^#/,na=/[\r\n]/,ra=/\s+/g,ia=$(mo);function oa(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:da(t),rawAttrsMap:{},parent:n,children:[]}}function aa(e,t){Lo=t.warn||Tr,zo=t.isPreTag||j,Vo=t.mustUseProp||j,Ko=t.getTagNamespace||j;t.isReservedTag;Bo=Dr(t.modules,"transformNode"),Ho=Dr(t.modules,"preTransformNode"),Uo=Dr(t.modules,"postTransformNode"),Ro=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function l(e){if(u(e),s||e.processed||(e=sa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&la(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(l=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&l.if&&la(l,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,l;e.children=e.children.filter((function(e){return!e.slotScope})),u(e),e.pre&&(s=!1),zo(e.tag)&&(c=!1);for(var f=0;f<Uo.length;f++)Uo[f](e,t)}function u(e){if(!c)for(var t;(t=e.children[e.children.length-1])&&3===t.type&&" "===t.text;)e.children.pop()}return function(e,t){for(var n,r,i=[],o=t.expectHTML,a=t.isUnaryTag||j,s=t.canBeLeftOpenTag||j,c=0;e;){if(n=e,r&&Do(r)){var l=0,u=r.toLowerCase(),f=Eo[u]||(Eo[u]=new RegExp("([\\s\\S]*?)(</"+u+"[^>]*>)","i")),d=e.replace(f,(function(e,n,r){return l=r.length,Do(u)||"noscript"===u||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Fo(u,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));c+=e.length-d.length,e=d,x(u,c-l,c)}else{var p=e.indexOf("<");if(0===p){if(Oo.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(To.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(So);if(m){C(m[0].length);continue}var g=e.match(xo);if(g){var y=c;C(g[0].length),x(g[1],y,c);continue}var _=k();if(_){A(_),Fo(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(p>=0){for($=e.slice(p);!(xo.test($)||ko.test($)||Oo.test($)||To.test($)||(w=$.indexOf("<",1))<0);)p+=w,$=e.slice(p);b=e.substring(0,p)}p<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function k(){var t=e.match(ko);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(Ao))&&(r=e.match($o)||e.match(bo));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function A(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&_o(n)&&x(r),s(n)&&r===n&&x(n));for(var l=a(n)||!!c,u=e.attrs.length,f=new Array(u),d=0;d<u;d++){var p=e.attrs[d],v=p[3]||p[4]||p[5]||"",h="a"===n&&"href"===p[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;f[d]={name:p[1],value:Po(v,h)}}l||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f,start:e.start,end:e.end}),r=n),t.start&&t.start(n,f,l,e.start,e.end)}function x(e,n,o){var a,s;if(null==n&&(n=c),null==o&&(o=c),e)for(s=e.toLowerCase(),a=i.length-1;a>=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var l=i.length-1;l>=a;l--)t.end&&t.end(i[l].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}x()}(e,{warn:Lo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,u,f){var d=r&&r.ns||Ko(e);G&&"svg"===d&&(o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];pa.test(r.name)||(r.name=r.name.replace(va,""),t.push(r))}return t}(o));var p,v=oa(e,o,r);d&&(v.ns=d),"style"!==(p=v).tag&&("script"!==p.tag||p.attrsMap.type&&"text/javascript"!==p.attrsMap.type)||ie()||(v.forbidden=!0);for(var h=0;h<Ho.length;h++)v=Ho[h](v,t)||v;s||(!function(e){null!=Lr(e,"v-pre")&&(e.pre=!0)}(v),v.pre&&(s=!0)),zo(v.tag)&&(c=!0),s?function(e){var t=e.attrsList,n=t.length;if(n)for(var r=e.attrs=new Array(n),i=0;i<n;i++)r[i]={name:t[i].name,value:JSON.stringify(t[i].value)},null!=t[i].start&&(r[i].start=t[i].start,r[i].end=t[i].end);else e.pre||(e.plain=!0)}(v):v.processed||(ca(v),function(e){var t=Lr(e,"v-if");if(t)e.if=t,la(e,{exp:t,block:e});else{null!=Lr(e,"v-else")&&(e.else=!0);var n=Lr(e,"v-else-if");n&&(e.elseif=n)}}(v),function(e){null!=Lr(e,"v-once")&&(e.once=!0)}(v)),n||(n=v),a?l(v):(r=v,i.push(v))},end:function(e,t,n){var o=i[i.length-1];i.length-=1,r=i[i.length-1],l(o)},chars:function(e,t,n){if(r&&(!G||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var i,l,u,f=r.children;if(e=c||e.trim()?"script"===(i=r).tag||"style"===i.tag?e:ia(e):f.length?a?"condense"===a&&na.test(e)?"":" ":o?" ":"":"")c||"condense"!==a||(e=e.replace(ra," ")),!s&&" "!==e&&(l=function(e,t){var n=t?fo(t):lo;if(n.test(e)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){(i=r.index)>c&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var l=Sr(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),c=i+r[0].length}return c<e.length&&(s.push(o=e.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,Ro))?u={type:2,expression:l.expression,tokens:l.tokens,text:e}:" "===e&&f.length&&" "===f[f.length-1].text||(u={type:3,text:e}),u&&f.push(u)}},comment:function(e,t,n){if(r){var i={type:3,text:e,isComment:!0};r.children.push(i)}}}),n}function sa(e,t){var n,r;(r=Pr(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,function(e){var t=Pr(e,"ref");t&&(e.ref=t,e.refInFor=function(e){var t=e;for(;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){var t;"template"===e.tag?(t=Lr(e,"scope"),e.slotScope=t||Lr(e,"slot-scope")):(t=Lr(e,"slot-scope"))&&(e.slotScope=t);var n=Pr(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||jr(e,"slot",n,function(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}(e,"slot")));if("template"===e.tag){var r=Rr(e,ta);if(r){var i=ua(r),o=i.name,a=i.dynamic;e.slotTarget=o,e.slotTargetDynamic=a,e.slotScope=r.value||"_empty_"}}else{var s=Rr(e,ta);if(s){var c=e.scopedSlots||(e.scopedSlots={}),l=ua(s),u=l.name,f=l.dynamic,d=c[u]=oa("template",[],e);d.slotTarget=u,d.slotTargetDynamic=f,d.children=e.children.filter((function(e){if(!e.slotScope)return e.parent=d,!0})),d.slotScope=s.value||"_empty_",e.children=[],e.plain=!1}}}(e),function(e){"slot"===e.tag&&(e.slotName=Pr(e,"name"))}(e),function(e){var t;(t=Pr(e,"is"))&&(e.component=t);null!=Lr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var i=0;i<Bo.length;i++)e=Bo[i](e,t)||e;return function(e){var t,n,r,i,o,a,s,c,l=e.attrsList;for(t=0,n=l.length;t<n;t++)if(r=i=l[t].name,o=l[t].value,qo.test(r))if(e.hasBindings=!0,(a=fa(r.replace(qo,"")))&&(r=r.replace(ea,"")),Qo.test(r))r=r.replace(Qo,""),o=Sr(o),(c=Xo.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=C(r))&&(r="innerHTML"),a.camel&&!c&&(r=C(r)),a.sync&&(s=Ur(o,"$event"),c?Fr(e,'"update:"+('+r+")",s,null,!1,0,l[t],!0):(Fr(e,"update:"+C(r),s,null,!1,0,l[t]),x(r)!==C(r)&&Fr(e,"update:"+x(r),s,null,!1,0,l[t])))),a&&a.prop||!e.component&&Vo(e.tag,e.attrsMap.type,r)?Er(e,r,o,l[t],c):jr(e,r,o,l[t],c);else if(Jo.test(r))r=r.replace(Jo,""),(c=Xo.test(r))&&(r=r.slice(1,-1)),Fr(e,r,o,a,!1,0,l[t],c);else{var u=(r=r.replace(qo,"")).match(Yo),f=u&&u[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),Xo.test(f)&&(f=f.slice(1,-1),c=!0)),Mr(e,r,i,o,f,c,a,l[t])}else jr(e,r,JSON.stringify(o),l[t]),!e.component&&"muted"===r&&Vo(e.tag,e.attrsMap.type,r)&&Er(e,r,"true",l[t])}(e),e}function ca(e){var t;if(t=Lr(e,"v-for")){var n=function(e){var t=e.match(Wo);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Go,""),i=r.match(Zo);i?(n.alias=r.replace(Zo,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(t);n&&T(e,n)}}function la(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function ua(e){var t=e.name.replace(ta,"");return t||"#"!==e.name[0]&&(t="default"),Xo.test(t)?{name:t.slice(1,-1),dynamic:!0}:{name:'"'+t+'"',dynamic:!1}}function fa(e){var t=e.match(ea);if(t){var n={};return t.forEach((function(e){n[e.slice(1)]=!0})),n}}function da(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}var pa=/^xmlns:NS\d+/,va=/^NS\d+:/;function ha(e){return oa(e.tag,e.attrsList.slice(),e.parent)}var ma=[po,ho,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Pr(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Lr(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Lr(e,"v-else",!0),s=Lr(e,"v-else-if",!0),c=ha(e);ca(c),Nr(c,"type","checkbox"),sa(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+o,la(c,{exp:c.if,block:c});var l=ha(e);Lr(l,"v-for",!0),Nr(l,"type","radio"),sa(l,t),la(c,{exp:"("+n+")==='radio'"+o,block:l});var u=ha(e);return Lr(u,"v-for",!0),Nr(u,":type",n),sa(u,t),la(c,{exp:i,block:u}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var ga,ya,_a={expectHTML:!0,modules:ma,directives:{model:function(e,t,n){var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if(e.component)return Hr(e,r,i),!1;if("select"===o)!function(e,t,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+Ur(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Fr(e,"change",r,null,!0)}(e,r,i);else if("input"===o&&"checkbox"===a)!function(e,t,n){var r=n&&n.number,i=Pr(e,"value")||"null",o=Pr(e,"true-value")||"true",a=Pr(e,"false-value")||"false";Er(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Fr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Ur(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Ur(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Ur(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Pr(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Fr(e,"change",Ur(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,l=o?"change":"range"===r?"__r":"input",u="$event.target.value";s&&(u="$event.target.value.trim()");a&&(u="_n("+u+")");var f=Ur(t,u);c&&(f="if($event.target.composing)return;"+f);Er(e,"value","("+t+")"),Fr(e,l,f,null,!0),(s||a)&&Fr(e,"blur","$forceUpdate()")}(e,r,i);else if(!R.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:go,mustUseProp:Mn,canBeLeftOpenTag:yo,isReservedTag:Zn,getTagNamespace:Gn,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(ma)},ba=$((function(e){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function $a(e,t){e&&(ga=ba(t.staticKeys||""),ya=t.isReservedTag||j,function e(t){if(t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||m(e.tag)||!ya(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(ga)))}(t),1===t.type){if(!ya(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}var wa=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Ca=/\([^)]*?\);*$/,ka=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Aa={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},xa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Sa=function(e){return"if("+e+")return null;"},Oa={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Sa("$event.target !== $event.currentTarget"),ctrl:Sa("!$event.ctrlKey"),shift:Sa("!$event.shiftKey"),alt:Sa("!$event.altKey"),meta:Sa("!$event.metaKey"),left:Sa("'button' in $event && $event.button !== 0"),middle:Sa("'button' in $event && $event.button !== 1"),right:Sa("'button' in $event && $event.button !== 2")};function Ta(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=Da(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Da(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return Da(e)})).join(",")+"]";var t=ka.test(e.value),n=wa.test(e.value),r=ka.test(e.value.replace(Ca,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(Oa[s])o+=Oa[s],Aa[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Sa(["ctrl","shift","alt","meta"].filter((function(e){return!c[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ea).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ea(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Aa[e],r=xa[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var ja={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:E},Na=function(e){this.options=e,this.warn=e.warn||Tr,this.transforms=Dr(e.modules,"transformCode"),this.dataGenFns=Dr(e.modules,"genData"),this.directives=T(T({},ja),e.directives);var t=e.isReservedTag||j;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Ma(e,t){var n=new Na(t);return{render:"with(this){return "+(e?Ia(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ia(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Fa(e,t);if(e.once&&!e.onceProcessed)return Pa(e,t);if(e.for&&!e.forProcessed)return Ra(e,t);if(e.if&&!e.ifProcessed)return La(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=za(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ja((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:C(e.name),value:e.value,dynamic:e.dynamic}}))):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:za(t,n,!0);return"_c("+e+","+Ba(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Ba(e,t));var i=e.inlineTemplate?null:za(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return za(e,t)||"void 0"}function Fa(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+Ia(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function Pa(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return La(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ia(e,t)+","+t.onceId+++","+n+")":Ia(e,t)}return Fa(e,t)}function La(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?Pa(e,n):Ia(e,n)}}(e.ifConditions.slice(),t,n,r)}function Ra(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Ia)(e,t)+"})"}function Ba(e,t){var n="{",r=function(e,t){var n=e.directives;if(!n)return;var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var l=t.directives[o.name];l&&(a=!!l(e,o,t.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?",arg:"+(o.isDynamicArg?o.arg:'"'+o.arg+'"'):"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var i=0;i<t.dataGenFns.length;i++)n+=t.dataGenFns[i](e);if(e.attrs&&(n+="attrs:"+Ja(e.attrs)+","),e.props&&(n+="domProps:"+Ja(e.props)+","),e.events&&(n+=Ta(e.events,!1)+","),e.nativeEvents&&(n+=Ta(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t,n){var r=e.for||Object.keys(t).some((function(e){var n=t[e];return n.slotTargetDynamic||n.if||n.for||Ha(n)})),i=!!e.if;if(!r)for(var o=e.parent;o;){if(o.slotScope&&"_empty_"!==o.slotScope||o.for){r=!0;break}o.if&&(i=!0),o=o.parent}var a=Object.keys(t).map((function(e){return Ua(t[e],n)})).join(",");return"scopedSlots:_u(["+a+"]"+(r?",null,true":"")+(!r&&i?",null,false,"+function(e){var t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return t>>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Ma(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ja(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ha(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ha))}function Ua(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return La(e,t,Ua,"null");if(e.for&&!e.forProcessed)return Ra(e,t,Ua);var r="_empty_"===e.slotScope?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(za(e,t)||"undefined")+":undefined":za(e,t)||"undefined":Ia(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function za(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ia)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(Va(i)||i.ifConditions&&i.ifConditions.some((function(e){return Va(e.block)}))){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some((function(e){return t(e.block)})))&&(n=1)}}return n}(o,t.maybeComponent):0,l=i||Ka;return"["+o.map((function(e){return l(e,t)})).join(",")+"]"+(c?","+c:"")}}function Va(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function Ka(e,t){return 1===e.type?Ia(e,t):3===e.type&&e.isComment?function(e){return"_e("+JSON.stringify(e.text)+")"}(e):function(e){return"_v("+(2===e.type?e.expression:qa(JSON.stringify(e.text)))+")"}(e)}function Ja(e){for(var t="",n="",r=0;r<e.length;r++){var i=e[r],o=qa(i.value);i.dynamic?n+=i.name+","+o+",":t+='"'+i.name+'":'+o+","}return t="{"+t.slice(0,-1)+"}",n?"_d("+t+",["+n.slice(0,-1)+"])":t}function qa(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b");function Wa(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),E}}function Za(e){var t=Object.create(null);return function(n,r,i){(r=T({},r)).warn;delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(t[o])return t[o];var a=e(n,r),s={},c=[];return s.render=Wa(a.render,c),s.staticRenderFns=a.staticRenderFns.map((function(e){return Wa(e,c)})),t[o]=s}}var Ga,Xa,Ya=(Ga=function(e,t){var n=aa(e.trim(),t);!1!==t.optimize&&$a(n,t);var r=Ma(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(n)for(var a in n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=T(Object.create(e.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(e,t,n){(n?o:i).push(e)};var s=Ga(t.trim(),r);return s.errors=i,s.tips=o,s}return{compile:t,compileToFunctions:Za(t)}})(_a).compileToFunctions;function Qa(e){return(Xa=Xa||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',Xa.innerHTML.indexOf("&#10;")>0}var es=!!J&&Qa(!1),ts=!!J&&Qa(!0),ns=$((function(e){var t=Qn(e);return t&&t.innerHTML})),rs=kn.prototype.$mount;kn.prototype.$mount=function(e,t){if((e=e&&Qn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ns(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=Ya(r,{outputSourceRange:!1,shouldDecodeNewlines:es,shouldDecodeNewlinesForHref:ts,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return rs.call(this,e,t)},kn.compile=Ya;var is=n({},wptbAdminSettingsData.options),os=n({},wptbAdminSettingsData.options),as={data:function(){return{store:is,rawStore:os}},methods:{revertStore:function(){var e=this;Object.keys(this.store).map((function(t){Object.prototype.hasOwnProperty.call(e.store,t)&&(e.store[t]=e.rawStore[t])}))}}};function ss(e,t,n,r,i,o,a,s,c,l){"boolean"!=typeof a&&(c=s,s=a,a=!1);const u="function"==typeof n?n.options:n;let f;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),r&&(u._scopeId=r),o?(f=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=f):t&&(f=a?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),f)if(u.functional){const e=u.render;u.render=function(t,n){return f.call(n),e(t,n)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,f):[f]}return n}const cs=ss({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wptb-settings-header"},[n("div",{staticClass:"wptb-settings-brand"},[n("img",{attrs:{src:e.logoSrc,alt:e.logoAlt}}),e._v(" "),n("span",{staticClass:"wptb-settings-header-name"},[e._v("\n "+e._s(e.pluginName)+"\n ")])]),e._v(" "),n("div",{staticClass:"wptb-settings-links"},[e._t("default")],2)])},staticRenderFns:[]},void 0,{props:["logoSrc","logoAlt","pluginName"]},void 0,!1,void 0,!1,void 0,void 0,void 0);const ls=ss({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"wptb-settings-sections-wrapper",class:{child:this.child}},[this._t("default")],2)},staticRenderFns:[]},void 0,{props:{child:{type:Boolean,default:!1}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const us=ss({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"wptb-settings-section-item",class:{disabled:!e.isActive},on:{click:function(t){return e.$emit("sectionchange",e.name)}}},[e._v("\n "+e._s(e.name)+"\n")])},staticRenderFns:[]},void 0,{props:["name","current"],computed:{isActive:function(){return void 0===this.current||this.current===this.name}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const fs=ss({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"wptb-settings-controls-wrapper",class:[this.center?"center":"grid"]},[this._t("default")],2)},staticRenderFns:[]},void 0,{props:{center:{type:Boolean,default:!1}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const ds=ss({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"wptb-setting-control"},[this.title?t("div",{staticClass:"title"},[this._v(this._s(this.title))]):this._e(),this._v(" "),this._t("default")],2)},staticRenderFns:[]},void 0,{props:["title"]},void 0,!1,void 0,!1,void 0,void 0,void 0);const ps=ss({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.isType("multiCheckbox")?n("div",e._l(e.fieldData.options,(function(t,r){return n("div",{staticClass:"wptb-setting-control-row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.modelBind[e.fieldData.id],expression:"modelBind[fieldData.id]"}],attrs:{id:e.fieldData.id,type:"checkbox"},domProps:{value:r,checked:Array.isArray(e.modelBind[e.fieldData.id])?e._i(e.modelBind[e.fieldData.id],r)>-1:e.modelBind[e.fieldData.id]},on:{change:function(t){var n=e.modelBind[e.fieldData.id],i=t.target,o=!!i.checked;if(Array.isArray(n)){var a=r,s=e._i(n,a);i.checked?s<0&&e.$set(e.modelBind,e.fieldData.id,n.concat([a])):s>-1&&e.$set(e.modelBind,e.fieldData.id,n.slice(0,s).concat(n.slice(s+1)))}else e.$set(e.modelBind,e.fieldData.id,o)}}}),e._v(" "),n("label",{attrs:{for:e.fieldData.id}},[e._v(e._s(t))])])})),0):e.isType("checkbox")?n("div",[n("div",{staticClass:"wptb-setting-control-row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.modelBind[e.fieldData.id],expression:"modelBind[fieldData.id]"}],attrs:{id:e.fieldData.id,type:"checkbox"},domProps:{checked:Array.isArray(e.modelBind[e.fieldData.id])?e._i(e.modelBind[e.fieldData.id],null)>-1:e.modelBind[e.fieldData.id]},on:{change:function(t){var n=e.modelBind[e.fieldData.id],r=t.target,i=!!r.checked;if(Array.isArray(n)){var o=e._i(n,null);r.checked?o<0&&e.$set(e.modelBind,e.fieldData.id,n.concat([null])):o>-1&&e.$set(e.modelBind,e.fieldData.id,n.slice(0,o).concat(n.slice(o+1)))}else e.$set(e.modelBind,e.fieldData.id,i)}}}),e._v(" "),n("label",{attrs:{for:e.fieldData.id}},[e._v(e._s(e.fieldData.label))])])]):e.isType("dropdown")?n("div",[n("div",{staticClass:"wptb-setting-control-row"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.modelBind[e.fieldData.id],expression:"modelBind[fieldData.id]"}],attrs:{id:e.fieldData.id},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.modelBind,e.fieldData.id,t.target.multiple?n:n[0])}}},e._l(e.fieldData.options,(function(t){return n("option",{domProps:{value:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])})),0),e._v(" "),n("label",{attrs:{for:e.fieldData.id}},[e._v(e._s(e.fieldData.label))])])]):e._e()])},staticRenderFns:[]},void 0,{props:["fieldData","modelBind"],methods:{isType:function(e){return this.fieldData.type===e}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const vs=ss({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wptb-settings-messages"},[e.busy?n("span",{staticClass:"dashicons dashicons-image-rotate wptb-settings-fetching"}):e._e(),e._v(" "),n("transition",{attrs:{name:"wptb-fade"}},[e.show?n("span",{staticClass:"wptb-settings-message",class:[e.type]},[e._v(e._s(e.message))]):e._e()])],1)},staticRenderFns:[]},void 0,{props:["type","show","message","busy"]},void 0,!1,void 0,!1,void 0,void 0,void 0);const hs=ss({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"wptb-settings-footer"},[t("message-display",{attrs:{busy:this.messageBusy,message:this.messageBody,show:this.messageShow,type:this.messageType}}),this._v(" "),t("div",{staticClass:"wptb-settings-button-container"},[this._t("default")],2)],1)},staticRenderFns:[]},void 0,{props:["messageType","messageShow","messageBody","messageBusy"],components:{MessageDisplay:vs}},void 0,!1,void 0,!1,void 0,void 0,void 0);const ms=ss({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"wptb-settings-button",class:[{disabled:this.disabled},this.type,this.size],on:{click:this.handleClick}},[this._t("default")],2)},staticRenderFns:[]},void 0,{props:{disabled:Boolean,type:{type:String,default:"primary"},size:{type:String,default:"normal"}},methods:{handleClick:function(){this.$emit("click")}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const gs=ss({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wptb-settings-wrapper"},[n("menu-header",{attrs:{"logo-src":e.pluginInfo.logo,"logo-alt":e.strings.logoAlt,"plugin-name":e.pluginInfo.pluginName}},[n("a",{attrs:{href:e.pluginInfo.pluginHomepage}},[e._v(e._s(e.strings.homepage))])]),e._v(" "),n("sections",e._l(e.sections,(function(t){return n("section-item",{key:t,attrs:{name:t},on:{sectionchange:function(t){e.currentSection=t}}})})),1),e._v(" "),n("menu-content",e._l(e.currentFields,(function(t){return n("setting-card",{key:t.id,attrs:{title:t.label}},[n("control-item",{attrs:{"field-data":t,modelBind:e.store}})],1)})),1),e._v(" "),n("menu-footer",{attrs:{"message-show":e.fetchMessage.show,"message-body":e.fetchMessage.message,"message-busy":e.fetching,"message-type":e.fetchMessage.type}},[n("menu-button",{attrs:{type:"danger",disabled:!e.canSubmit},on:{click:e.resetStore}},[e._v(e._s(e.strings.revert))]),e._v(" "),n("menu-button",{attrs:{type:"primary",disabled:!e.canSubmit},on:{click:e.submitSettings}},[e._v(e._s(e.strings.submit))])],1)],1)},staticRenderFns:[]},void 0,{props:["fieldsData","settings","pluginInfo"],components:{MenuButton:ms,MenuHeader:cs,Sections:ls,SectionItem:us,MenuContent:fs,SettingCard:ds,ControlItem:ps,MenuFooter:hs},mixins:[as],data:function(){return{sections:[],currentSection:"",parsedFields:{},resetActive:!1,canSubmit:!1,fetching:!1,fetchMessage:{type:"ok",show:!1,message:"OK"},showIntervalId:-1}},watch:{store:{handler:function(){this.resetActive?(this.canSubmit=!1,this.resetActive=!1):this.canSubmit=!0},deep:!0}},beforeMount:function(){var e=this;Object.keys(this.fieldsData).map((function(t){if(Object.prototype.hasOwnProperty.call(e.fieldsData,t)){var r=e.fieldsData[t].section;void 0===e.parsedFields[r]&&(e.parsedFields[r]=[]),e.parsedFields[r].push(n({},e.fieldsData[t],{id:t})),e.sections.push(r)}})),this.currentSection=Object.keys(this.parsedFields).map((function(t){if(Object.prototype.hasOwnProperty.call(e.parsedFields,t))return t}))[0],this.sections=Array.from(new Set(this.sections))},computed:{currentFields:function(){return this.parsedFields[this.currentSection]}},methods:{resetStore:function(){this.canSubmit&&(this.revertStore(),this.resetActive=!0,this.setMessage("ok",this.strings.revertMessage))},submitSettings:function(){var e=this;if(this.canSubmit){var t=new FormData;t.append("nonce",this.settings.nonce),t.append("action",this.settings.action),t.append("options",JSON.stringify(this.store)),this.canSubmit=!1,this.fetching=!0,fetch(this.settings.ajaxUrl,{method:"POST",body:t}).then((function(e){if(e.ok)return e.json()})).then((function(t){if(t.error)throw new Error(t.error);e.setMessage("ok",t.message)})).catch((function(t){console.error(t),e.setMessage("error",t)})).finally((function(){e.fetching=!1}))}},setMessage:function(e,t){var n=this;this.fetchMessage.type=e,this.fetchMessage.message=t,this.fetchMessage.show=!0,clearInterval(this.showIntervalId),this.showIntervalId=setInterval((function(){n.fetchMessage.show=!1}),5e3)}}},void 0,!1,void 0,!1,void 0,void 0,void 0);var ys={install:function(e,t){e.mixin({data:function(){return{strings:t.strings}}})}},_s=n({},wptbAdminSettingsData);wptbAdminSettingsData=void 0,kn.config.productionTip=!1,kn.use(ys,{strings:_s.strings}),new kn({components:{SettingsApp:gs},data:{fieldsData:_s.fields,settings:_s.data,pluginInfo:_s.pluginInfo}}).$mount(_s.data.mountId)}();
inc/admin/js/WPTB_Import_Menu.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
2
+ /*!
3
+ * Vue.js v2.6.11
4
+ * (c) 2014-2019 Evan You
5
+ * Released under the MIT License.
6
+ */()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=Object.freeze({});function a(e){return null==e}function s(e){return null!=e}function l(e){return!0===e}function c(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function u(e){return null!==e&&"object"==typeof e}var d=Object.prototype.toString;function p(e){return"[object Object]"===d.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function v(e){return s(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||p(e)&&e.toString===d?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function g(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var y=g("slot,component",!0),b=g("key,ref,slot,slot-scope,is");function _(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var w=Object.prototype.hasOwnProperty;function x(e,t){return w.call(e,t)}function S(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var C=/-(\w)/g,$=S((function(e){return e.replace(C,(function(e,t){return t?t.toUpperCase():""}))})),A=S((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),k=/\B([A-Z])/g,T=S((function(e){return e.replace(k,"-$1").toLowerCase()}));var O=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function P(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function D(e,t){for(var n in t)e[n]=t[n];return e}function I(e){for(var t={},n=0;n<e.length;n++)e[n]&&D(t,e[n]);return t}function E(e,t,n){}var j=function(e,t,n){return!1},L=function(e){return e};function F(e,t){if(e===t)return!0;var n=u(e),r=u(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),o=Array.isArray(t);if(i&&o)return e.length===t.length&&e.every((function(e,n){return F(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||o)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every((function(n){return F(e[n],t[n])}))}catch(e){return!1}}function B(e,t){for(var n=0;n<e.length;n++)if(F(e[n],t))return n;return-1}function M(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var N=["component","directive","filter"],R=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],H={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:j,isReservedAttr:j,isUnknownElement:j,getTagNamespace:E,parsePlatformTagName:L,mustUseProp:j,async:!0,_lifecycleHooks:R},W=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function z(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function U(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var q=new RegExp("[^"+W.source+".$_\\d]");var V,J="__proto__"in{},G="undefined"!=typeof window,K="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,X=K&&WXEnvironment.platform.toLowerCase(),Z=G&&window.navigator.userAgent.toLowerCase(),Y=Z&&/msie|trident/.test(Z),Q=Z&&Z.indexOf("msie 9.0")>0,ee=Z&&Z.indexOf("edge/")>0,te=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===X),ne=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),re={}.watch,ie=!1;if(G)try{var oe={};Object.defineProperty(oe,"passive",{get:function(){ie=!0}}),window.addEventListener("test-passive",null,oe)}catch(e){}var ae=function(){return void 0===V&&(V=!G&&!K&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),V},se=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function le(e){return"function"==typeof e&&/native code/.test(e.toString())}var ce,ue="undefined"!=typeof Symbol&&le(Symbol)&&"undefined"!=typeof Reflect&&le(Reflect.ownKeys);ce="undefined"!=typeof Set&&le(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var de=E,pe=0,fe=function(){this.id=pe++,this.subs=[]};fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){_(this.subs,e)},fe.prototype.depend=function(){fe.target&&fe.target.addDep(this)},fe.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},fe.target=null;var ve=[];function he(e){ve.push(e),fe.target=e}function me(){ve.pop(),fe.target=ve[ve.length-1]}var ge=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},ye={child:{configurable:!0}};ye.child.get=function(){return this.componentInstance},Object.defineProperties(ge.prototype,ye);var be=function(e){void 0===e&&(e="");var t=new ge;return t.text=e,t.isComment=!0,t};function _e(e){return new ge(void 0,void 0,void 0,String(e))}function we(e){var t=new ge(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var xe=Array.prototype,Se=Object.create(xe);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=xe[e];U(Se,e,(function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o}))}));var Ce=Object.getOwnPropertyNames(Se),$e=!0;function Ae(e){$e=e}var ke=function(e){this.value=e,this.dep=new fe,this.vmCount=0,U(e,"__ob__",this),Array.isArray(e)?(J?function(e,t){e.__proto__=t}(e,Se):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];U(e,o,t[o])}}(e,Se,Ce),this.observeArray(e)):this.walk(e)};function Te(e,t){var n;if(u(e)&&!(e instanceof ge))return x(e,"__ob__")&&e.__ob__ instanceof ke?n=e.__ob__:$e&&!ae()&&(Array.isArray(e)||p(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new ke(e)),t&&n&&n.vmCount++,n}function Oe(e,t,n,r,i){var o=new fe,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,l=a&&a.set;s&&!l||2!==arguments.length||(n=e[t]);var c=!i&&Te(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return fe.target&&(o.depend(),c&&(c.dep.depend(),Array.isArray(t)&&Ie(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||s&&!l||(l?l.call(e,t):n=t,c=!i&&Te(t),o.notify())}})}}function Pe(e,t,n){if(Array.isArray(e)&&f(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(Oe(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function De(e,t){if(Array.isArray(e)&&f(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||x(e,t)&&(delete e[t],n&&n.dep.notify())}}function Ie(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&Ie(t)}ke.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Oe(e,t[n])},ke.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Te(e[t])};var Ee=H.optionMergeStrategies;function je(e,t){if(!t)return e;for(var n,r,i,o=ue?Reflect.ownKeys(t):Object.keys(t),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(r=e[n],i=t[n],x(e,n)?r!==i&&p(r)&&p(i)&&je(r,i):Pe(e,n,i));return e}function Le(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?je(r,i):i}:t?e?function(){return je("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Fe(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Be(e,t,n,r){var i=Object.create(e||null);return t?D(i,t):i}Ee.data=function(e,t,n){return n?Le(e,t,n):t&&"function"!=typeof t?e:Le(e,t)},R.forEach((function(e){Ee[e]=Fe})),N.forEach((function(e){Ee[e+"s"]=Be})),Ee.watch=function(e,t,n,r){if(e===re&&(e=void 0),t===re&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in D(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ee.props=Ee.methods=Ee.inject=Ee.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return D(i,e),t&&D(i,t),i},Ee.provide=Le;var Me=function(e,t){return void 0===t?e:t};function Ne(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[$(i)]={type:null});else if(p(n))for(var a in n)i=n[a],o[$(a)]=p(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(p(n))for(var o in n){var a=n[o];r[o]=p(a)?D({from:o},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=Ne(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=Ne(e,t.mixins[r],n);var o,a={};for(o in e)s(o);for(o in t)x(e,o)||s(o);function s(r){var i=Ee[r]||Me;a[r]=i(e[r],t[r],n,r)}return a}function Re(e,t,n,r){if("string"==typeof n){var i=e[t];if(x(i,n))return i[n];var o=$(n);if(x(i,o))return i[o];var a=A(o);return x(i,a)?i[a]:i[n]||i[o]||i[a]}}function He(e,t,n,r){var i=t[e],o=!x(n,e),a=n[e],s=Ue(Boolean,i.type);if(s>-1)if(o&&!x(i,"default"))a=!1;else if(""===a||a===T(e)){var l=Ue(String,i.type);(l<0||s<l)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!x(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==We(t.type)?r.call(e):r}(r,i,e);var c=$e;Ae(!0),Te(a),Ae(c)}return a}function We(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function ze(e,t){return We(e)===We(t)}function Ue(e,t){if(!Array.isArray(t))return ze(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(ze(t[n],e))return n;return-1}function qe(e,t,n){he();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Je(e,r,"errorCaptured hook")}}Je(e,t,n)}finally{me()}}function Ve(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&v(o)&&!o._handled&&(o.catch((function(e){return qe(e,r,i+" (Promise/async)")})),o._handled=!0)}catch(e){qe(e,r,i)}return o}function Je(e,t,n){if(H.errorHandler)try{return H.errorHandler.call(null,e,t,n)}catch(t){t!==e&&Ge(t)}Ge(e)}function Ge(e,t,n){if(!G&&!K||"undefined"==typeof console)throw e;console.error(e)}var Ke,Xe=!1,Ze=[],Ye=!1;function Qe(){Ye=!1;var e=Ze.slice(0);Ze.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&le(Promise)){var et=Promise.resolve();Ke=function(){et.then(Qe),te&&setTimeout(E)},Xe=!0}else if(Y||"undefined"==typeof MutationObserver||!le(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Ke="undefined"!=typeof setImmediate&&le(setImmediate)?function(){setImmediate(Qe)}:function(){setTimeout(Qe,0)};else{var tt=1,nt=new MutationObserver(Qe),rt=document.createTextNode(String(tt));nt.observe(rt,{characterData:!0}),Ke=function(){tt=(tt+1)%2,rt.data=String(tt)},Xe=!0}function it(e,t){var n;if(Ze.push((function(){if(e)try{e.call(t)}catch(e){qe(e,t,"nextTick")}else n&&n(t)})),Ye||(Ye=!0,Ke()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}var ot=new ce;function at(e){!function e(t,n){var r,i,o=Array.isArray(t);if(!o&&!u(t)||Object.isFrozen(t)||t instanceof ge)return;if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(o)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,ot),ot.clear()}var st=S((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function lt(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return Ve(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)Ve(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function ct(e,t,n,r,i,o){var s,c,u,d;for(s in e)c=e[s],u=t[s],d=st(s),a(c)||(a(u)?(a(c.fns)&&(c=e[s]=lt(c,o)),l(d.once)&&(c=e[s]=i(d.name,c,d.capture)),n(d.name,c,d.capture,d.passive,d.params)):c!==u&&(u.fns=c,e[s]=u));for(s in t)a(e[s])&&r((d=st(s)).name,t[s],d.capture)}function ut(e,t,n){var r;e instanceof ge&&(e=e.data.hook||(e.data.hook={}));var i=e[t];function o(){n.apply(this,arguments),_(r.fns,o)}a(i)?r=lt([o]):s(i.fns)&&l(i.merged)?(r=i).fns.push(o):r=lt([i,o]),r.merged=!0,e[t]=r}function dt(e,t,n,r,i){if(s(t)){if(x(t,n))return e[n]=t[n],i||delete t[n],!0;if(x(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function pt(e){return c(e)?[_e(e)]:Array.isArray(e)?function e(t,n){var r,i,o,u,d=[];for(r=0;r<t.length;r++)a(i=t[r])||"boolean"==typeof i||(o=d.length-1,u=d[o],Array.isArray(i)?i.length>0&&(ft((i=e(i,(n||"")+"_"+r))[0])&&ft(u)&&(d[o]=_e(u.text+i[0].text),i.shift()),d.push.apply(d,i)):c(i)?ft(u)?d[o]=_e(u.text+i):""!==i&&d.push(_e(i)):ft(i)&&ft(u)?d[o]=_e(u.text+i.text):(l(t._isVList)&&s(i.tag)&&a(i.key)&&s(n)&&(i.key="__vlist"+n+"_"+r+"__"),d.push(i)));return d}(e):void 0}function ft(e){return s(e)&&s(e.text)&&!1===e.isComment}function vt(e,t){if(e){for(var n=Object.create(null),r=ue?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var a=e[o].from,s=t;s;){if(s._provided&&x(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var l=e[o].default;n[o]="function"==typeof l?l.call(t):l}}}return n}}function ht(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,l=n[s]||(n[s]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var c in n)n[c].every(mt)&&delete n[c];return n}function mt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function gt(e,t,n){var r,i=Object.keys(t).length>0,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==o&&s===n.$key&&!i&&!n.$hasNormal)return n;for(var l in r={},e)e[l]&&"$"!==l[0]&&(r[l]=yt(t,l,e[l]))}else r={};for(var c in t)c in r||(r[c]=bt(t,c));return e&&Object.isExtensible(e)&&(e._normalized=r),U(r,"$stable",a),U(r,"$key",s),U(r,"$hasNormal",i),r}function yt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:pt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function bt(e,t){return function(){return e[t]}}function _t(e,t){var n,r,i,o,a;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(u(e))if(ue&&e[Symbol.iterator]){n=[];for(var l=e[Symbol.iterator](),c=l.next();!c.done;)n.push(t(c.value,n.length)),c=l.next()}else for(o=Object.keys(e),n=new Array(o.length),r=0,i=o.length;r<i;r++)a=o[r],n[r]=t(e[a],a,r);return s(n)||(n=[]),n._isVList=!0,n}function wt(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=D(D({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function xt(e){return Re(this.$options,"filters",e)||L}function St(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Ct(e,t,n,r,i){var o=H.keyCodes[t]||n;return i&&r&&!H.keyCodes[t]?St(i,r):o?St(o,e):r?T(r)!==t:void 0}function $t(e,t,n,r,i){if(n)if(u(n)){var o;Array.isArray(n)&&(n=I(n));var a=function(a){if("class"===a||"style"===a||b(a))o=e;else{var s=e.attrs&&e.attrs.type;o=r||H.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var l=$(a),c=T(a);l in o||c in o||(o[a]=n[a],i&&((e.on||(e.on={}))["update:"+a]=function(e){n[a]=e}))};for(var s in n)a(s)}else;return e}function At(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Tt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function kt(e,t,n){return Tt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Tt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Ot(e[r],t+"_"+r,n);else Ot(e,t,n)}function Ot(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Pt(e,t){if(t)if(p(t)){var n=e.on=e.on?D({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function Dt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?Dt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function It(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Et(e,t){return"string"==typeof e?t+e:e}function jt(e){e._o=kt,e._n=m,e._s=h,e._l=_t,e._t=wt,e._q=F,e._i=B,e._m=At,e._f=xt,e._k=Ct,e._b=$t,e._v=_e,e._e=be,e._u=Dt,e._g=Pt,e._d=It,e._p=Et}function Lt(e,t,n,r,i){var a,s=this,c=i.options;x(r,"_uid")?(a=Object.create(r))._original=r:(a=r,r=r._original);var u=l(c._compiled),d=!u;this.data=e,this.props=t,this.children=n,this.parent=r,this.listeners=e.on||o,this.injections=vt(c.inject,r),this.slots=function(){return s.$slots||gt(e.scopedSlots,s.$slots=ht(n,r)),s.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return gt(e.scopedSlots,this.slots())}}),u&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=gt(e.scopedSlots,this.$slots)),c._scopeId?this._c=function(e,t,n,i){var o=Wt(a,e,t,n,i,d);return o&&!Array.isArray(o)&&(o.fnScopeId=c._scopeId,o.fnContext=r),o}:this._c=function(e,t,n,r){return Wt(a,e,t,n,r,d)}}function Ft(e,t,n,r,i){var o=we(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function Bt(e,t){for(var n in t)e[$(n)]=t[n]}jt(Lt.prototype);var Mt={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;Mt.prepatch(n,n)}else{(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;s(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new e.componentOptions.Ctor(n)}(e,Yt)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,i){var a=r.data.scopedSlots,s=e.$scopedSlots,l=!!(a&&!a.$stable||s!==o&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key),c=!!(i||e.$options._renderChildren||l);e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r);if(e.$options._renderChildren=i,e.$attrs=r.data.attrs||o,e.$listeners=n||o,t&&e.$options.props){Ae(!1);for(var u=e._props,d=e.$options._propKeys||[],p=0;p<d.length;p++){var f=d[p],v=e.$options.props;u[f]=He(f,v,t,e)}Ae(!0),e.$options.propsData=t}n=n||o;var h=e.$options._parentListeners;e.$options._parentListeners=n,Zt(e,n,h),c&&(e.$slots=ht(i,r.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,nn(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,on.push(t)):tn(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,en(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);nn(t,"deactivated")}}(t,!0):t.$destroy())}},Nt=Object.keys(Mt);function Rt(e,t,n,r,i){if(!a(e)){var c=n.$options._base;if(u(e)&&(e=c.extend(e)),"function"==typeof e){var d;if(a(e.cid)&&void 0===(e=function(e,t){if(l(e.error)&&s(e.errorComp))return e.errorComp;if(s(e.resolved))return e.resolved;var n=Ut;n&&s(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n);if(l(e.loading)&&s(e.loadingComp))return e.loadingComp;if(n&&!s(e.owners)){var r=e.owners=[n],i=!0,o=null,c=null;n.$on("hook:destroyed",(function(){return _(r,n)}));var d=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==o&&(clearTimeout(o),o=null),null!==c&&(clearTimeout(c),c=null))},p=M((function(n){e.resolved=qt(n,t),i?r.length=0:d(!0)})),f=M((function(t){s(e.errorComp)&&(e.error=!0,d(!0))})),h=e(p,f);return u(h)&&(v(h)?a(e.resolved)&&h.then(p,f):v(h.component)&&(h.component.then(p,f),s(h.error)&&(e.errorComp=qt(h.error,t)),s(h.loading)&&(e.loadingComp=qt(h.loading,t),0===h.delay?e.loading=!0:o=setTimeout((function(){o=null,a(e.resolved)&&a(e.error)&&(e.loading=!0,d(!1))}),h.delay||200)),s(h.timeout)&&(c=setTimeout((function(){c=null,a(e.resolved)&&f(null)}),h.timeout)))),i=!1,e.loading?e.loadingComp:e.resolved}}(d=e,c)))return function(e,t,n,r,i){var o=be();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(d,t,n,r,i);t=t||{},$n(e),s(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var i=t.on||(t.on={}),o=i[r],a=t.model.callback;s(o)?(Array.isArray(o)?-1===o.indexOf(a):o!==a)&&(i[r]=[a].concat(o)):i[r]=a}(e.options,t);var p=function(e,t,n){var r=t.options.props;if(!a(r)){var i={},o=e.attrs,l=e.props;if(s(o)||s(l))for(var c in r){var u=T(c);dt(i,l,c,u,!0)||dt(i,o,c,u,!1)}return i}}(t,e);if(l(e.options.functional))return function(e,t,n,r,i){var a=e.options,l={},c=a.props;if(s(c))for(var u in c)l[u]=He(u,c,t||o);else s(n.attrs)&&Bt(l,n.attrs),s(n.props)&&Bt(l,n.props);var d=new Lt(n,l,i,r,e),p=a.render.call(null,d._c,d);if(p instanceof ge)return Ft(p,n,d.parent,a);if(Array.isArray(p)){for(var f=pt(p)||[],v=new Array(f.length),h=0;h<f.length;h++)v[h]=Ft(f[h],n,d.parent,a);return v}}(e,p,t,n,r);var f=t.on;if(t.on=t.nativeOn,l(e.options.abstract)){var h=t.slot;t={},h&&(t.slot=h)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Nt.length;n++){var r=Nt[n],i=t[r],o=Mt[r];i===o||i&&i._merged||(t[r]=i?Ht(o,i):o)}}(t);var m=e.options.name||i;return new ge("vue-component-"+e.cid+(m?"-"+m:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:p,listeners:f,tag:i,children:r},d)}}}function Ht(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}function Wt(e,t,n,r,i,o){return(Array.isArray(n)||c(n))&&(i=r,r=n,n=void 0),l(o)&&(i=2),function(e,t,n,r,i){if(s(n)&&s(n.__ob__))return be();s(n)&&s(n.is)&&(t=n.is);if(!t)return be();Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);2===i?r=pt(r):1===i&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var o,c;if("string"==typeof t){var d;c=e.$vnode&&e.$vnode.ns||H.getTagNamespace(t),o=H.isReservedTag(t)?new ge(H.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!s(d=Re(e.$options,"components",t))?new ge(t,n,r,void 0,void 0,e):Rt(d,n,e,r,t)}else o=Rt(t,n,e,r);return Array.isArray(o)?o:s(o)?(s(c)&&function e(t,n,r){t.ns=n,"foreignObject"===t.tag&&(n=void 0,r=!0);if(s(t.children))for(var i=0,o=t.children.length;i<o;i++){var c=t.children[i];s(c.tag)&&(a(c.ns)||l(r)&&"svg"!==c.tag)&&e(c,n,r)}}(o,c),s(n)&&function(e){u(e.style)&&at(e.style);u(e.class)&&at(e.class)}(n),o):be()}(e,t,n,r,i)}var zt,Ut=null;function qt(e,t){return(e.__esModule||ue&&"Module"===e[Symbol.toStringTag])&&(e=e.default),u(e)?t.extend(e):e}function Vt(e){return e.isComment&&e.asyncFactory}function Jt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(s(n)&&(s(n.componentOptions)||Vt(n)))return n}}function Gt(e,t){zt.$on(e,t)}function Kt(e,t){zt.$off(e,t)}function Xt(e,t){var n=zt;return function r(){var i=t.apply(null,arguments);null!==i&&n.$off(e,r)}}function Zt(e,t,n){zt=e,ct(t,n||{},Gt,Kt,Xt,e),zt=void 0}var Yt=null;function Qt(e){var t=Yt;return Yt=e,function(){Yt=t}}function en(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function tn(e,t){if(t){if(e._directInactive=!1,en(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)tn(e.$children[n]);nn(e,"activated")}}function nn(e,t){he();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)Ve(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),me()}var rn=[],on=[],an={},sn=!1,ln=!1,cn=0;var un=0,dn=Date.now;if(G&&!Y){var pn=window.performance;pn&&"function"==typeof pn.now&&dn()>document.createEvent("Event").timeStamp&&(dn=function(){return pn.now()})}function fn(){var e,t;for(un=dn(),ln=!0,rn.sort((function(e,t){return e.id-t.id})),cn=0;cn<rn.length;cn++)(e=rn[cn]).before&&e.before(),t=e.id,an[t]=null,e.run();var n=on.slice(),r=rn.slice();cn=rn.length=on.length=0,an={},sn=ln=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,tn(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&nn(r,"updated")}}(r),se&&H.devtools&&se.emit("flush")}var vn=0,hn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++vn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ce,this.newDepIds=new ce,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!q.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=E)),this.value=this.lazy?void 0:this.get()};hn.prototype.get=function(){var e;he(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;qe(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&at(e),me(),this.cleanupDeps()}return e},hn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},hn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},hn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==an[t]){if(an[t]=!0,ln){for(var n=rn.length-1;n>cn&&rn[n].id>e.id;)n--;rn.splice(n+1,0,e)}else rn.push(e);sn||(sn=!0,it(fn))}}(this)},hn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||u(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){qe(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},hn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},hn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},hn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:E,set:E};function gn(e,t,n){mn.get=function(){return this[t][n]},mn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,mn)}function yn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&Ae(!1);var o=function(o){i.push(o);var a=He(o,t,n,e);Oe(r,o,a),o in e||gn(e,"_props",o)};for(var a in t)o(a);Ae(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?E:O(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;p(t=e._data="function"==typeof t?function(e,t){he();try{return e.call(t,t)}catch(e){return qe(e,t,"data()"),{}}finally{me()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&x(r,o)||z(o)||gn(e,"_data",o)}Te(t,!0)}(e):Te(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ae();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new hn(e,a||E,E,bn)),i in e||_n(e,i,o)}}(e,t.computed),t.watch&&t.watch!==re&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Sn(e,n,r[i]);else Sn(e,n,r)}}(e,t.watch)}var bn={lazy:!0};function _n(e,t,n){var r=!ae();"function"==typeof n?(mn.get=r?wn(t):xn(n),mn.set=E):(mn.get=n.get?r&&!1!==n.cache?wn(t):xn(n.get):E,mn.set=n.set||E),Object.defineProperty(e,t,mn)}function wn(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),fe.target&&t.depend(),t.value}}function xn(e){return function(){return e.call(this,this)}}function Sn(e,t,n,r){return p(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var Cn=0;function $n(e){var t=e.options;if(e.super){var n=$n(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&D(e.extendOptions,r),(t=e.options=Ne(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function An(e){this._init(e)}function kn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=Ne(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)gn(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)_n(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,N.forEach((function(e){a[e]=n[e]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=D({},a.options),i[r]=a,a}}function Tn(e){return e&&(e.Ctor.options.name||e.tag)}function On(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===d.call(n)&&e.test(t));var n}function Pn(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=Tn(a.componentOptions);s&&!t(s)&&Dn(n,o,r,i)}}}function Dn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,_(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=Cn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Ne($n(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Zt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=ht(t._renderChildren,r),e.$scopedSlots=o,e._c=function(t,n,r,i){return Wt(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Wt(e,t,n,r,i,!0)};var i=n&&n.data;Oe(e,"$attrs",i&&i.attrs||o,null,!0),Oe(e,"$listeners",t._parentListeners||o,null,!0)}(t),nn(t,"beforeCreate"),function(e){var t=vt(e.$options.inject,e);t&&(Ae(!1),Object.keys(t).forEach((function(n){Oe(e,n,t[n])})),Ae(!0))}(t),yn(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),nn(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(An),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Pe,e.prototype.$delete=De,e.prototype.$watch=function(e,t,n){if(p(t))return Sn(this,e,t,n);(n=n||{}).user=!0;var r=new hn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){qe(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(An),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((o=a[s])===t||o.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?P(n):n;for(var r=P(arguments,1),i='event handler for "'+e+'"',o=0,a=n.length;o<a;o++)Ve(n[o],t,r,t,i)}return t}}(An),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Qt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){nn(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||_(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),nn(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(An),function(e){jt(e.prototype),e.prototype.$nextTick=function(e){return it(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=gt(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{Ut=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){qe(n,t,"render"),e=t._vnode}finally{Ut=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof ge||(e=be()),e.parent=i,e}}(An);var In=[String,RegExp,Array],En={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:In,exclude:In,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Dn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){Pn(e,(function(e){return On(t,e)}))})),this.$watch("exclude",(function(t){Pn(e,(function(e){return!On(t,e)}))}))},render:function(){var e=this.$slots.default,t=Jt(e),n=t&&t.componentOptions;if(n){var r=Tn(n),i=this.include,o=this.exclude;if(i&&(!r||!On(i,r))||o&&r&&On(o,r))return t;var a=this.cache,s=this.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[l]?(t.componentInstance=a[l].componentInstance,_(s,l),s.push(l)):(a[l]=t,s.push(l),this.max&&s.length>parseInt(this.max)&&Dn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return H}};Object.defineProperty(e,"config",t),e.util={warn:de,extend:D,mergeOptions:Ne,defineReactive:Oe},e.set=Pe,e.delete=De,e.nextTick=it,e.observable=function(e){return Te(e),e},e.options=Object.create(null),N.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,D(e.options.components,En),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=P(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Ne(this.options,e),this}}(e),kn(e),function(e){N.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&p(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(An),Object.defineProperty(An.prototype,"$isServer",{get:ae}),Object.defineProperty(An.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(An,"FunctionalRenderContext",{value:Lt}),An.version="2.6.11";var jn=g("style,class"),Ln=g("input,textarea,option,select,progress"),Fn=function(e,t,n){return"value"===n&&Ln(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Bn=g("contenteditable,draggable,spellcheck"),Mn=g("events,caret,typing,plaintext-only"),Nn=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Rn="http://www.w3.org/1999/xlink",Hn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Wn=function(e){return Hn(e)?e.slice(6,e.length):""},zn=function(e){return null==e||!1===e};function Un(e){for(var t=e.data,n=e,r=e;s(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=qn(r.data,t));for(;s(n=n.parent);)n&&n.data&&(t=qn(t,n.data));return function(e,t){if(s(e)||s(t))return Vn(e,Jn(t));return""}(t.staticClass,t.class)}function qn(e,t){return{staticClass:Vn(e.staticClass,t.staticClass),class:s(e.class)?[e.class,t.class]:t.class}}function Vn(e,t){return e?t?e+" "+t:e:t||""}function Jn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)s(t=Jn(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):u(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Gn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Kn=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Xn=g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Zn=function(e){return Kn(e)||Xn(e)};function Yn(e){return Xn(e)?"svg":"math"===e?"math":void 0}var Qn=Object.create(null);var er=g("text,number,password,search,email,tel,url");function tr(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var nr=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Gn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),rr={create:function(e,t){ir(t)},update:function(e,t){e.data.ref!==t.data.ref&&(ir(e,!0),ir(t))},destroy:function(e){ir(e,!0)}};function ir(e,t){var n=e.data.ref;if(s(n)){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?_(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}var or=new ge("",{},[]),ar=["create","activate","update","remove","destroy"];function sr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&s(e.data)===s(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=s(n=e.data)&&s(n=n.attrs)&&n.type,i=s(n=t.data)&&s(n=n.attrs)&&n.type;return r===i||er(r)&&er(i)}(e,t)||l(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&a(t.asyncFactory.error))}function lr(e,t,n){var r,i,o={};for(r=t;r<=n;++r)s(i=e[r].key)&&(o[i]=r);return o}var cr={create:ur,update:ur,destroy:function(e){ur(e,or)}};function ur(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===or,a=t===or,s=pr(e.data.directives,e.context),l=pr(t.data.directives,t.context),c=[],u=[];for(n in l)r=s[n],i=l[n],r?(i.oldValue=r.value,i.oldArg=r.arg,vr(i,"update",t,e),i.def&&i.def.componentUpdated&&u.push(i)):(vr(i,"bind",t,e),i.def&&i.def.inserted&&c.push(i));if(c.length){var d=function(){for(var n=0;n<c.length;n++)vr(c[n],"inserted",t,e)};o?ut(t,"insert",d):d()}u.length&&ut(t,"postpatch",(function(){for(var n=0;n<u.length;n++)vr(u[n],"componentUpdated",t,e)}));if(!o)for(n in s)l[n]||vr(s[n],"unbind",e,e,a)}(e,t)}var dr=Object.create(null);function pr(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=dr),i[fr(r)]=r,r.def=Re(t.$options,"directives",r.name);return i}function fr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function vr(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){qe(r,n.context,"directive "+e.name+" "+t+" hook")}}var hr=[rr,cr];function mr(e,t){var n=t.componentOptions;if(!(s(n)&&!1===n.Ctor.options.inheritAttrs||a(e.data.attrs)&&a(t.data.attrs))){var r,i,o=t.elm,l=e.data.attrs||{},c=t.data.attrs||{};for(r in s(c.__ob__)&&(c=t.data.attrs=D({},c)),c)i=c[r],l[r]!==i&&gr(o,r,i);for(r in(Y||ee)&&c.value!==l.value&&gr(o,"value",c.value),l)a(c[r])&&(Hn(r)?o.removeAttributeNS(Rn,Wn(r)):Bn(r)||o.removeAttribute(r))}}function gr(e,t,n){e.tagName.indexOf("-")>-1?yr(e,t,n):Nn(t)?zn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Bn(t)?e.setAttribute(t,function(e,t){return zn(t)||"false"===t?"false":"contenteditable"===e&&Mn(t)?t:"true"}(t,n)):Hn(t)?zn(n)?e.removeAttributeNS(Rn,Wn(t)):e.setAttributeNS(Rn,t,n):yr(e,t,n)}function yr(e,t,n){if(zn(n))e.removeAttribute(t);else{if(Y&&!Q&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var br={create:mr,update:mr};function _r(e,t){var n=t.elm,r=t.data,i=e.data;if(!(a(r.staticClass)&&a(r.class)&&(a(i)||a(i.staticClass)&&a(i.class)))){var o=Un(t),l=n._transitionClasses;s(l)&&(o=Vn(o,Jn(l))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var wr,xr,Sr,Cr,$r,Ar,kr={create:_r,update:_r},Tr=/[\w).+\-_$\]]/;function Or(e){var t,n,r,i,o,a=!1,s=!1,l=!1,c=!1,u=0,d=0,p=0,f=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(l)96===t&&92!==n&&(l=!1);else if(c)47===t&&92!==n&&(c=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||u||d||p){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:d++;break;case 93:d--;break;case 123:u++;break;case 125:u--}if(47===t){for(var v=r-1,h=void 0;v>=0&&" "===(h=e.charAt(v));v--);h&&Tr.test(h)||(c=!0)}}else void 0===i?(f=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(f,r).trim()),f=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==f&&m(),o)for(r=0;r<o.length;r++)i=Pr(i,o[r]);return i}function Pr(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function Dr(e,t){console.error("[Vue compiler]: "+e)}function Ir(e,t){return e?e.map((function(e){return e[t]})).filter((function(e){return e})):[]}function Er(e,t,n,r,i){(e.props||(e.props=[])).push(Wr({name:t,value:n,dynamic:i},r)),e.plain=!1}function jr(e,t,n,r,i){(i?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(Wr({name:t,value:n,dynamic:i},r)),e.plain=!1}function Lr(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(Wr({name:t,value:n},r))}function Fr(e,t,n,r,i,o,a,s){(e.directives||(e.directives=[])).push(Wr({name:t,rawName:n,value:r,arg:i,isDynamicArg:o,modifiers:a},s)),e.plain=!1}function Br(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function Mr(e,t,n,r,i,a,s,l){var c;(r=r||o).right?l?t="("+t+")==='click'?'contextmenu':("+t+")":"click"===t&&(t="contextmenu",delete r.right):r.middle&&(l?t="("+t+")==='click'?'mouseup':("+t+")":"click"===t&&(t="mouseup")),r.capture&&(delete r.capture,t=Br("!",t,l)),r.once&&(delete r.once,t=Br("~",t,l)),r.passive&&(delete r.passive,t=Br("&",t,l)),r.native?(delete r.native,c=e.nativeEvents||(e.nativeEvents={})):c=e.events||(e.events={});var u=Wr({value:n.trim(),dynamic:l},s);r!==o&&(u.modifiers=r);var d=c[t];Array.isArray(d)?i?d.unshift(u):d.push(u):c[t]=d?i?[u,d]:[d,u]:u,e.plain=!1}function Nr(e,t,n){var r=Rr(e,":"+t)||Rr(e,"v-bind:"+t);if(null!=r)return Or(r);if(!1!==n){var i=Rr(e,t);if(null!=i)return JSON.stringify(i)}}function Rr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Hr(e,t){for(var n=e.attrsList,r=0,i=n.length;r<i;r++){var o=n[r];if(t.test(o.name))return n.splice(r,1),o}}function Wr(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function zr(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=Ur(t,o);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+a+"}"}}function Ur(e,t){var n=function(e){if(e=e.trim(),wr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<wr-1)return(Cr=e.lastIndexOf("."))>-1?{exp:e.slice(0,Cr),key:'"'+e.slice(Cr+1)+'"'}:{exp:e,key:null};xr=e,Cr=$r=Ar=0;for(;!Vr();)Jr(Sr=qr())?Kr(Sr):91===Sr&&Gr(Sr);return{exp:e.slice(0,$r),key:e.slice($r+1,Ar)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function qr(){return xr.charCodeAt(++Cr)}function Vr(){return Cr>=wr}function Jr(e){return 34===e||39===e}function Gr(e){var t=1;for($r=Cr;!Vr();)if(Jr(e=qr()))Kr(e);else if(91===e&&t++,93===e&&t--,0===t){Ar=Cr;break}}function Kr(e){for(var t=e;!Vr()&&(e=qr())!==t;);}var Xr;function Zr(e,t,n){var r=Xr;return function i(){var o=t.apply(null,arguments);null!==o&&ei(e,i,n,r)}}var Yr=Xe&&!(ne&&Number(ne[1])<=53);function Qr(e,t,n,r){if(Yr){var i=un,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}Xr.addEventListener(e,t,ie?{capture:n,passive:r}:n)}function ei(e,t,n,r){(r||Xr).removeEventListener(e,t._wrapper||t,n)}function ti(e,t){if(!a(e.data.on)||!a(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Xr=t.elm,function(e){if(s(e.__r)){var t=Y?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}s(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),ct(n,r,Qr,ei,Zr,t.context),Xr=void 0}}var ni,ri={create:ti,update:ti};function ii(e,t){if(!a(e.data.domProps)||!a(t.data.domProps)){var n,r,i=t.elm,o=e.data.domProps||{},l=t.data.domProps||{};for(n in s(l.__ob__)&&(l=t.data.domProps=D({},l)),o)n in l||(i[n]="");for(n in l){if(r=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===o[n])continue;1===i.childNodes.length&&i.removeChild(i.childNodes[0])}if("value"===n&&"PROGRESS"!==i.tagName){i._value=r;var c=a(r)?"":String(r);oi(i,c)&&(i.value=c)}else if("innerHTML"===n&&Xn(i.tagName)&&a(i.innerHTML)){(ni=ni||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var u=ni.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;u.firstChild;)i.appendChild(u.firstChild)}else if(r!==o[n])try{i[n]=r}catch(e){}}}}function oi(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(s(r)){if(r.number)return m(n)!==m(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ai={create:ii,update:ii},si=S((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function li(e){var t=ci(e.style);return e.staticStyle?D(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?I(e):"string"==typeof e?si(e):e}var ui,di=/^--/,pi=/\s*!important$/,fi=function(e,t,n){if(di.test(t))e.style.setProperty(t,n);else if(pi.test(n))e.style.setProperty(T(t),n.replace(pi,""),"important");else{var r=hi(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},vi=["Webkit","Moz","ms"],hi=S((function(e){if(ui=ui||document.createElement("div").style,"filter"!==(e=$(e))&&e in ui)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<vi.length;n++){var r=vi[n]+t;if(r in ui)return r}}));function mi(e,t){var n=t.data,r=e.data;if(!(a(n.staticStyle)&&a(n.style)&&a(r.staticStyle)&&a(r.style))){var i,o,l=t.elm,c=r.staticStyle,u=r.normalizedStyle||r.style||{},d=c||u,p=ci(t.data.style)||{};t.data.normalizedStyle=s(p.__ob__)?D({},p):p;var f=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=li(i.data))&&D(r,n);(n=li(e.data))&&D(r,n);for(var o=e;o=o.parent;)o.data&&(n=li(o.data))&&D(r,n);return r}(t,!0);for(o in d)a(f[o])&&fi(l,o,"");for(o in f)(i=f[o])!==d[o]&&fi(l,o,null==i?"":i)}}var gi={create:mi,update:mi},yi=/\s+/;function bi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function wi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&D(t,xi(e.name||"v")),D(t,e),t}return"string"==typeof e?xi(e):void 0}}var xi=S((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),Si=G&&!Q,Ci="transition",$i="transitionend",Ai="animation",ki="animationend";Si&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ci="WebkitTransition",$i="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ai="WebkitAnimation",ki="webkitAnimationEnd"));var Ti=G?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Oi(e){Ti((function(){Ti(e)}))}function Pi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),bi(e,t))}function Di(e,t){e._transitionClasses&&_(e._transitionClasses,t),_i(e,t)}function Ii(e,t,n){var r=ji(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s="transition"===i?$i:ki,l=0,c=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++l>=a&&c()};setTimeout((function(){l<a&&c()}),o+1),e.addEventListener(s,u)}var Ei=/\b(transform|all)(,|$)/;function ji(e,t){var n,r=window.getComputedStyle(e),i=(r[Ci+"Delay"]||"").split(", "),o=(r[Ci+"Duration"]||"").split(", "),a=Li(i,o),s=(r[Ai+"Delay"]||"").split(", "),l=(r[Ai+"Duration"]||"").split(", "),c=Li(s,l),u=0,d=0;return"transition"===t?a>0&&(n="transition",u=a,d=o.length):"animation"===t?c>0&&(n="animation",u=c,d=l.length):d=(n=(u=Math.max(a,c))>0?a>c?"transition":"animation":null)?"transition"===n?o.length:l.length:0,{type:n,timeout:u,propCount:d,hasTransform:"transition"===n&&Ei.test(r[Ci+"Property"])}}function Li(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return Fi(t)+Fi(e[n])})))}function Fi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Bi(e,t){var n=e.elm;s(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=wi(e.data.transition);if(!a(r)&&!s(n._enterCb)&&1===n.nodeType){for(var i=r.css,o=r.type,l=r.enterClass,c=r.enterToClass,d=r.enterActiveClass,p=r.appearClass,f=r.appearToClass,v=r.appearActiveClass,h=r.beforeEnter,g=r.enter,y=r.afterEnter,b=r.enterCancelled,_=r.beforeAppear,w=r.appear,x=r.afterAppear,S=r.appearCancelled,C=r.duration,$=Yt,A=Yt.$vnode;A&&A.parent;)$=A.context,A=A.parent;var k=!$._isMounted||!e.isRootInsert;if(!k||w||""===w){var T=k&&p?p:l,O=k&&v?v:d,P=k&&f?f:c,D=k&&_||h,I=k&&"function"==typeof w?w:g,E=k&&x||y,j=k&&S||b,L=m(u(C)?C.enter:C),F=!1!==i&&!Q,B=Ri(I),N=n._enterCb=M((function(){F&&(Di(n,P),Di(n,O)),N.cancelled?(F&&Di(n,T),j&&j(n)):E&&E(n),n._enterCb=null}));e.data.show||ut(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),I&&I(n,N)})),D&&D(n),F&&(Pi(n,T),Pi(n,O),Oi((function(){Di(n,T),N.cancelled||(Pi(n,P),B||(Ni(L)?setTimeout(N,L):Ii(n,o,N)))}))),e.data.show&&(t&&t(),I&&I(n,N)),F||B||N()}}}function Mi(e,t){var n=e.elm;s(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=wi(e.data.transition);if(a(r)||1!==n.nodeType)return t();if(!s(n._leaveCb)){var i=r.css,o=r.type,l=r.leaveClass,c=r.leaveToClass,d=r.leaveActiveClass,p=r.beforeLeave,f=r.leave,v=r.afterLeave,h=r.leaveCancelled,g=r.delayLeave,y=r.duration,b=!1!==i&&!Q,_=Ri(f),w=m(u(y)?y.leave:y),x=n._leaveCb=M((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),b&&(Di(n,c),Di(n,d)),x.cancelled?(b&&Di(n,l),h&&h(n)):(t(),v&&v(n)),n._leaveCb=null}));g?g(S):S()}function S(){x.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),p&&p(n),b&&(Pi(n,l),Pi(n,d),Oi((function(){Di(n,l),x.cancelled||(Pi(n,c),_||(Ni(w)?setTimeout(x,w):Ii(n,o,x)))}))),f&&f(n,x),b||_||x())}}function Ni(e){return"number"==typeof e&&!isNaN(e)}function Ri(e){if(a(e))return!1;var t=e.fns;return s(t)?Ri(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Hi(e,t){!0!==t.data.show&&Bi(t)}var Wi=function(e){var t,n,r={},i=e.modules,o=e.nodeOps;for(t=0;t<ar.length;++t)for(r[ar[t]]=[],n=0;n<i.length;++n)s(i[n][ar[t]])&&r[ar[t]].push(i[n][ar[t]]);function u(e){var t=o.parentNode(e);s(t)&&o.removeChild(t,e)}function d(e,t,n,i,a,c,u){if(s(e.elm)&&s(c)&&(e=c[u]=we(e)),e.isRootInsert=!a,!function(e,t,n,i){var o=e.data;if(s(o)){var a=s(e.componentInstance)&&o.keepAlive;if(s(o=o.hook)&&s(o=o.init)&&o(e,!1),s(e.componentInstance))return p(e,t),f(n,e.elm,i),l(a)&&function(e,t,n,i){var o,a=e;for(;a.componentInstance;)if(a=a.componentInstance._vnode,s(o=a.data)&&s(o=o.transition)){for(o=0;o<r.activate.length;++o)r.activate[o](or,a);t.push(a);break}f(n,e.elm,i)}(e,t,n,i),!0}}(e,t,n,i)){var d=e.data,h=e.children,g=e.tag;s(g)?(e.elm=e.ns?o.createElementNS(e.ns,g):o.createElement(g,e),y(e),v(e,h,t),s(d)&&m(e,t),f(n,e.elm,i)):l(e.isComment)?(e.elm=o.createComment(e.text),f(n,e.elm,i)):(e.elm=o.createTextNode(e.text),f(n,e.elm,i))}}function p(e,t){s(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,h(e)?(m(e,t),y(e)):(ir(e),t.push(e))}function f(e,t,n){s(e)&&(s(n)?o.parentNode(n)===e&&o.insertBefore(e,t,n):o.appendChild(e,t))}function v(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)d(t[r],n,e.elm,null,!0,t,r);else c(e.text)&&o.appendChild(e.elm,o.createTextNode(String(e.text)))}function h(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return s(e.tag)}function m(e,n){for(var i=0;i<r.create.length;++i)r.create[i](or,e);s(t=e.data.hook)&&(s(t.create)&&t.create(or,e),s(t.insert)&&n.push(e))}function y(e){var t;if(s(t=e.fnScopeId))o.setStyleScope(e.elm,t);else for(var n=e;n;)s(t=n.context)&&s(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t),n=n.parent;s(t=Yt)&&t!==e.context&&t!==e.fnContext&&s(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t)}function b(e,t,n,r,i,o){for(;r<=i;++r)d(n[r],o,e,t,!1,n,r)}function _(e){var t,n,i=e.data;if(s(i))for(s(t=i.hook)&&s(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(s(t=e.children))for(n=0;n<e.children.length;++n)_(e.children[n])}function w(e,t,n){for(;t<=n;++t){var r=e[t];s(r)&&(s(r.tag)?(x(r),_(r)):u(r.elm))}}function x(e,t){if(s(t)||s(e.data)){var n,i=r.remove.length+1;for(s(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&u(e)}return n.listeners=t,n}(e.elm,i),s(n=e.componentInstance)&&s(n=n._vnode)&&s(n.data)&&x(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);s(n=e.data.hook)&&s(n=n.remove)?n(e,t):t()}else u(e.elm)}function S(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];if(s(o)&&sr(e,o))return i}}function C(e,t,n,i,c,u){if(e!==t){s(t.elm)&&s(i)&&(t=i[c]=we(t));var p=t.elm=e.elm;if(l(e.isAsyncPlaceholder))s(t.asyncFactory.resolved)?k(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(l(t.isStatic)&&l(e.isStatic)&&t.key===e.key&&(l(t.isCloned)||l(t.isOnce)))t.componentInstance=e.componentInstance;else{var f,v=t.data;s(v)&&s(f=v.hook)&&s(f=f.prepatch)&&f(e,t);var m=e.children,g=t.children;if(s(v)&&h(t)){for(f=0;f<r.update.length;++f)r.update[f](e,t);s(f=v.hook)&&s(f=f.update)&&f(e,t)}a(t.text)?s(m)&&s(g)?m!==g&&function(e,t,n,r,i){for(var l,c,u,p=0,f=0,v=t.length-1,h=t[0],m=t[v],g=n.length-1,y=n[0],_=n[g],x=!i;p<=v&&f<=g;)a(h)?h=t[++p]:a(m)?m=t[--v]:sr(h,y)?(C(h,y,r,n,f),h=t[++p],y=n[++f]):sr(m,_)?(C(m,_,r,n,g),m=t[--v],_=n[--g]):sr(h,_)?(C(h,_,r,n,g),x&&o.insertBefore(e,h.elm,o.nextSibling(m.elm)),h=t[++p],_=n[--g]):sr(m,y)?(C(m,y,r,n,f),x&&o.insertBefore(e,m.elm,h.elm),m=t[--v],y=n[++f]):(a(l)&&(l=lr(t,p,v)),a(c=s(y.key)?l[y.key]:S(y,t,p,v))?d(y,r,e,h.elm,!1,n,f):sr(u=t[c],y)?(C(u,y,r,n,f),t[c]=void 0,x&&o.insertBefore(e,u.elm,h.elm)):d(y,r,e,h.elm,!1,n,f),y=n[++f]);p>v?b(e,a(n[g+1])?null:n[g+1].elm,n,f,g,r):f>g&&w(t,p,v)}(p,m,g,n,u):s(g)?(s(e.text)&&o.setTextContent(p,""),b(p,null,g,0,g.length-1,n)):s(m)?w(m,0,m.length-1):s(e.text)&&o.setTextContent(p,""):e.text!==t.text&&o.setTextContent(p,t.text),s(v)&&s(f=v.hook)&&s(f=f.postpatch)&&f(e,t)}}}function $(e,t,n){if(l(n)&&s(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var A=g("attrs,class,staticClass,staticStyle,key");function k(e,t,n,r){var i,o=t.tag,a=t.data,c=t.children;if(r=r||a&&a.pre,t.elm=e,l(t.isComment)&&s(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(s(a)&&(s(i=a.hook)&&s(i=i.init)&&i(t,!0),s(i=t.componentInstance)))return p(t,n),!0;if(s(o)){if(s(c))if(e.hasChildNodes())if(s(i=a)&&s(i=i.domProps)&&s(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var u=!0,d=e.firstChild,f=0;f<c.length;f++){if(!d||!k(d,c[f],n,r)){u=!1;break}d=d.nextSibling}if(!u||d)return!1}else v(t,c,n);if(s(a)){var h=!1;for(var g in a)if(!A(g)){h=!0,m(t,n);break}!h&&a.class&&at(a.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,i){if(!a(t)){var c,u=!1,p=[];if(a(e))u=!0,d(t,p);else{var f=s(e.nodeType);if(!f&&sr(e,t))C(e,t,p,null,null,i);else{if(f){if(1===e.nodeType&&e.hasAttribute("data-server-rendered")&&(e.removeAttribute("data-server-rendered"),n=!0),l(n)&&k(e,t,p))return $(t,p,!0),e;c=e,e=new ge(o.tagName(c).toLowerCase(),{},[],void 0,c)}var v=e.elm,m=o.parentNode(v);if(d(t,p,v._leaveCb?null:m,o.nextSibling(v)),s(t.parent))for(var g=t.parent,y=h(t);g;){for(var b=0;b<r.destroy.length;++b)r.destroy[b](g);if(g.elm=t.elm,y){for(var x=0;x<r.create.length;++x)r.create[x](or,g);var S=g.data.hook.insert;if(S.merged)for(var A=1;A<S.fns.length;A++)S.fns[A]()}else ir(g);g=g.parent}s(m)?w([e],0,0):s(e.tag)&&_(e)}}return $(t,p,u),t.elm}s(e)&&_(e)}}({nodeOps:nr,modules:[br,kr,ri,ai,gi,G?{create:Hi,activate:Hi,remove:function(e,t){!0!==e.data.show?Mi(e,t):t()}}:{}].concat(hr)});Q&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&Xi(e,"input")}));var zi={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?ut(n,"postpatch",(function(){zi.componentUpdated(e,t,n)})):Ui(e,t,n.context),e._vOptions=[].map.call(e.options,Ji)):("textarea"===n.tag||er(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Gi),e.addEventListener("compositionend",Ki),e.addEventListener("change",Ki),Q&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ui(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Ji);if(i.some((function(e,t){return!F(e,r[t])})))(e.multiple?t.value.some((function(e){return Vi(e,i)})):t.value!==t.oldValue&&Vi(t.value,i))&&Xi(e,"change")}}};function Ui(e,t,n){qi(e,t),(Y||ee)&&setTimeout((function(){qi(e,t)}),0)}function qi(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,l=e.options.length;s<l;s++)if(a=e.options[s],i)o=B(r,Ji(a))>-1,a.selected!==o&&(a.selected=o);else if(F(Ji(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Vi(e,t){return t.every((function(t){return!F(t,e)}))}function Ji(e){return"_value"in e?e._value:e.value}function Gi(e){e.target.composing=!0}function Ki(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Zi(e){return!e.componentInstance||e.data&&e.data.transition?e:Zi(e.componentInstance._vnode)}var Yi={model:zi,show:{bind:function(e,t,n){var r=t.value,i=(n=Zi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Bi(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Zi(n)).data&&n.data.transition?(n.data.show=!0,r?Bi(n,(function(){e.style.display=e.__vOriginalDisplay})):Mi(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},Qi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function eo(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?eo(Jt(t.children)):e}function to(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[$(o)]=i[o];return t}function no(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var ro=function(e){return e.tag||Vt(e)},io=function(e){return"show"===e.name},oo={name:"transition",props:Qi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(ro)).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=eo(i);if(!o)return i;if(this._leaving)return no(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:c(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var s=(o.data||(o.data={})).transition=to(this),l=this._vnode,u=eo(l);if(o.data.directives&&o.data.directives.some(io)&&(o.data.show=!0),u&&u.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(o,u)&&!Vt(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var d=u.data.transition=D({},s);if("out-in"===r)return this._leaving=!0,ut(d,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),no(e,i);if("in-out"===r){if(Vt(o))return l;var p,f=function(){p()};ut(s,"afterEnter",f),ut(s,"enterCancelled",f),ut(d,"delayLeave",(function(e){p=e}))}}return i}}},ao=D({tag:String,moveClass:String},Qi);function so(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function lo(e){e.data.newPos=e.elm.getBoundingClientRect()}function co(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete ao.mode;var uo={Transition:oo,TransitionGroup:{props:ao,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Qt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=to(this),s=0;s<i.length;s++){var l=i[s];l.tag&&null!=l.key&&0!==String(l.key).indexOf("__vlist")&&(o.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a)}if(r){for(var c=[],u=[],d=0;d<r.length;d++){var p=r[d];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?c.push(p):u.push(p)}this.kept=e(t,null,c),this.removed=u}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(so),e.forEach(lo),e.forEach(co),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Pi(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener($i,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener($i,e),n._moveCb=null,Di(n,t))})}})))},methods:{hasMove:function(e,t){if(!Si)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){_i(n,e)})),bi(n,t),n.style.display="none",this.$el.appendChild(n);var r=ji(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};An.config.mustUseProp=Fn,An.config.isReservedTag=Zn,An.config.isReservedAttr=jn,An.config.getTagNamespace=Yn,An.config.isUnknownElement=function(e){if(!G)return!0;if(Zn(e))return!1;if(e=e.toLowerCase(),null!=Qn[e])return Qn[e];var t=document.createElement(e);return e.indexOf("-")>-1?Qn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Qn[e]=/HTMLUnknownElement/.test(t.toString())},D(An.options.directives,Yi),D(An.options.components,uo),An.prototype.__patch__=G?Wi:E,An.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=be),nn(e,"beforeMount"),r=function(){e._update(e._render(),n)},new hn(e,r,E,{before:function(){e._isMounted&&!e._isDestroyed&&nn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,nn(e,"mounted")),e}(this,e=e&&G?tr(e):void 0,t)},G&&setTimeout((function(){H.devtools&&se&&se.emit("init",An)}),0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,fo=/[-.*+?^${}()|[\]\/\\]/g,vo=S((function(e){var t=e[0].replace(fo,"\\$&"),n=e[1].replace(fo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var ho={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Rr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Nr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var mo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Rr(e,"style");n&&(e.staticStyle=JSON.stringify(si(n)));var r=Nr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},yo=function(e){return(mo=mo||document.createElement("div")).innerHTML=e,mo.textContent},bo=g("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),_o=g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=g("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),xo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,So=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Co="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+W.source+"]*",$o="((?:"+Co+"\\:)?"+Co+")",Ao=new RegExp("^<"+$o),ko=/^\s*(\/?)>/,To=new RegExp("^<\\/"+$o+"[^>]*>"),Oo=/^<!DOCTYPE [^>]+>/i,Po=/^<!\--/,Do=/^<!\[/,Io=g("script,style,textarea",!0),Eo={},jo={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Lo=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Bo=g("pre,textarea",!0),Mo=function(e,t){return e&&Bo(e)&&"\n"===t[0]};function No(e,t){var n=t?Fo:Lo;return e.replace(n,(function(e){return jo[e]}))}var Ro,Ho,Wo,zo,Uo,qo,Vo,Jo,Go=/^@|^v-on:/,Ko=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Zo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Yo=/^\(|\)$/g,Qo=/^\[.*\]$/,ea=/:(.*)$/,ta=/^:|^\.|^v-bind:/,na=/\.[^.\]]+(?=[^\]]*$)/g,ra=/^v-slot(:|$)|^#/,ia=/[\r\n]/,oa=/\s+/g,aa=S(yo);function sa(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:va(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Ro=t.warn||Dr,qo=t.isPreTag||j,Vo=t.mustUseProp||j,Jo=t.getTagNamespace||j;t.isReservedTag;Wo=Ir(t.modules,"transformNode"),zo=Ir(t.modules,"preTransformNode"),Uo=Ir(t.modules,"postTransformNode"),Ho=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,l=!1;function c(e){if(u(e),s||e.processed||(e=ca(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(c=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&c.if&&da(c,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,c;e.children=e.children.filter((function(e){return!e.slotScope})),u(e),e.pre&&(s=!1),qo(e.tag)&&(l=!1);for(var d=0;d<Uo.length;d++)Uo[d](e,t)}function u(e){if(!l)for(var t;(t=e.children[e.children.length-1])&&3===t.type&&" "===t.text;)e.children.pop()}return function(e,t){for(var n,r,i=[],o=t.expectHTML,a=t.isUnaryTag||j,s=t.canBeLeftOpenTag||j,l=0;e;){if(n=e,r&&Io(r)){var c=0,u=r.toLowerCase(),d=Eo[u]||(Eo[u]=new RegExp("([\\s\\S]*?)(</"+u+"[^>]*>)","i")),p=e.replace(d,(function(e,n,r){return c=r.length,Io(u)||"noscript"===u||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Mo(u,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));l+=e.length-p.length,e=p,A(u,l-c,l)}else{var f=e.indexOf("<");if(0===f){if(Po.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),l,l+v+3),S(v+3);continue}}if(Do.test(e)){var h=e.indexOf("]>");if(h>=0){S(h+2);continue}}var m=e.match(Oo);if(m){S(m[0].length);continue}var g=e.match(To);if(g){var y=l;S(g[0].length),A(g[1],y,l);continue}var b=C();if(b){$(b),Mo(b.tagName,e)&&S(1);continue}}var _=void 0,w=void 0,x=void 0;if(f>=0){for(w=e.slice(f);!(To.test(w)||Ao.test(w)||Po.test(w)||Do.test(w)||(x=w.indexOf("<",1))<0);)f+=x,w=e.slice(f);_=e.substring(0,f)}f<0&&(_=e),_&&S(_.length),t.chars&&_&&t.chars(_,l-_.length,l)}if(e===n){t.chars&&t.chars(e);break}}function S(t){l+=t,e=e.substring(t)}function C(){var t=e.match(Ao);if(t){var n,r,i={tagName:t[1],attrs:[],start:l};for(S(t[0].length);!(n=e.match(ko))&&(r=e.match(So)||e.match(xo));)r.start=l,S(r[0].length),r.end=l,i.attrs.push(r);if(n)return i.unarySlash=n[1],S(n[0].length),i.end=l,i}}function $(e){var n=e.tagName,l=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var c=a(n)||!!l,u=e.attrs.length,d=new Array(u),p=0;p<u;p++){var f=e.attrs[p],v=f[3]||f[4]||f[5]||"",h="a"===n&&"href"===f[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;d[p]={name:f[1],value:No(v,h)}}c||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d,start:e.start,end:e.end}),r=n),t.start&&t.start(n,d,c,e.start,e.end)}function A(e,n,o){var a,s;if(null==n&&(n=l),null==o&&(o=l),e)for(s=e.toLowerCase(),a=i.length-1;a>=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var c=i.length-1;c>=a;c--)t.end&&t.end(i[c].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Ro,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,u,d){var p=r&&r.ns||Jo(e);Y&&"svg"===p&&(o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];ha.test(r.name)||(r.name=r.name.replace(ma,""),t.push(r))}return t}(o));var f,v=sa(e,o,r);p&&(v.ns=p),"style"!==(f=v).tag&&("script"!==f.tag||f.attrsMap.type&&"text/javascript"!==f.attrsMap.type)||ae()||(v.forbidden=!0);for(var h=0;h<zo.length;h++)v=zo[h](v,t)||v;s||(!function(e){null!=Rr(e,"v-pre")&&(e.pre=!0)}(v),v.pre&&(s=!0)),qo(v.tag)&&(l=!0),s?function(e){var t=e.attrsList,n=t.length;if(n)for(var r=e.attrs=new Array(n),i=0;i<n;i++)r[i]={name:t[i].name,value:JSON.stringify(t[i].value)},null!=t[i].start&&(r[i].start=t[i].start,r[i].end=t[i].end);else e.pre||(e.plain=!0)}(v):v.processed||(ua(v),function(e){var t=Rr(e,"v-if");if(t)e.if=t,da(e,{exp:t,block:e});else{null!=Rr(e,"v-else")&&(e.else=!0);var n=Rr(e,"v-else-if");n&&(e.elseif=n)}}(v),function(e){null!=Rr(e,"v-once")&&(e.once=!0)}(v)),n||(n=v),a?c(v):(r=v,i.push(v))},end:function(e,t,n){var o=i[i.length-1];i.length-=1,r=i[i.length-1],c(o)},chars:function(e,t,n){if(r&&(!Y||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var i,c,u,d=r.children;if(e=l||e.trim()?"script"===(i=r).tag||"style"===i.tag?e:aa(e):d.length?a?"condense"===a&&ia.test(e)?"":" ":o?" ":"":"")l||"condense"!==a||(e=e.replace(oa," ")),!s&&" "!==e&&(c=function(e,t){var n=t?vo(t):po;if(n.test(e)){for(var r,i,o,a=[],s=[],l=n.lastIndex=0;r=n.exec(e);){(i=r.index)>l&&(s.push(o=e.slice(l,i)),a.push(JSON.stringify(o)));var c=Or(r[1].trim());a.push("_s("+c+")"),s.push({"@binding":c}),l=i+r[0].length}return l<e.length&&(s.push(o=e.slice(l)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,Ho))?u={type:2,expression:c.expression,tokens:c.tokens,text:e}:" "===e&&d.length&&" "===d[d.length-1].text||(u={type:3,text:e}),u&&d.push(u)}},comment:function(e,t,n){if(r){var i={type:3,text:e,isComment:!0};r.children.push(i)}}}),n}function ca(e,t){var n,r;(r=Nr(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,function(e){var t=Nr(e,"ref");t&&(e.ref=t,e.refInFor=function(e){var t=e;for(;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){var t;"template"===e.tag?(t=Rr(e,"scope"),e.slotScope=t||Rr(e,"slot-scope")):(t=Rr(e,"slot-scope"))&&(e.slotScope=t);var n=Nr(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||jr(e,"slot",n,function(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}(e,"slot")));if("template"===e.tag){var r=Hr(e,ra);if(r){var i=pa(r),o=i.name,a=i.dynamic;e.slotTarget=o,e.slotTargetDynamic=a,e.slotScope=r.value||"_empty_"}}else{var s=Hr(e,ra);if(s){var l=e.scopedSlots||(e.scopedSlots={}),c=pa(s),u=c.name,d=c.dynamic,p=l[u]=sa("template",[],e);p.slotTarget=u,p.slotTargetDynamic=d,p.children=e.children.filter((function(e){if(!e.slotScope)return e.parent=p,!0})),p.slotScope=s.value||"_empty_",e.children=[],e.plain=!1}}}(e),function(e){"slot"===e.tag&&(e.slotName=Nr(e,"name"))}(e),function(e){var t;(t=Nr(e,"is"))&&(e.component=t);null!=Rr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var i=0;i<Wo.length;i++)e=Wo[i](e,t)||e;return function(e){var t,n,r,i,o,a,s,l,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,Ko.test(r))if(e.hasBindings=!0,(a=fa(r.replace(Ko,"")))&&(r=r.replace(na,"")),ta.test(r))r=r.replace(ta,""),o=Or(o),(l=Qo.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!l&&"innerHtml"===(r=$(r))&&(r="innerHTML"),a.camel&&!l&&(r=$(r)),a.sync&&(s=Ur(o,"$event"),l?Mr(e,'"update:"+('+r+")",s,null,!1,0,c[t],!0):(Mr(e,"update:"+$(r),s,null,!1,0,c[t]),T(r)!==$(r)&&Mr(e,"update:"+T(r),s,null,!1,0,c[t])))),a&&a.prop||!e.component&&Vo(e.tag,e.attrsMap.type,r)?Er(e,r,o,c[t],l):jr(e,r,o,c[t],l);else if(Go.test(r))r=r.replace(Go,""),(l=Qo.test(r))&&(r=r.slice(1,-1)),Mr(e,r,o,a,!1,0,c[t],l);else{var u=(r=r.replace(Ko,"")).match(ea),d=u&&u[1];l=!1,d&&(r=r.slice(0,-(d.length+1)),Qo.test(d)&&(d=d.slice(1,-1),l=!0)),Fr(e,r,i,o,d,l,a,c[t])}else jr(e,r,JSON.stringify(o),c[t]),!e.component&&"muted"===r&&Vo(e.tag,e.attrsMap.type,r)&&Er(e,r,"true",c[t])}(e),e}function ua(e){var t;if(t=Rr(e,"v-for")){var n=function(e){var t=e.match(Xo);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Yo,""),i=r.match(Zo);i?(n.alias=r.replace(Zo,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(t);n&&D(e,n)}}function da(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function pa(e){var t=e.name.replace(ra,"");return t||"#"!==e.name[0]&&(t="default"),Qo.test(t)?{name:t.slice(1,-1),dynamic:!0}:{name:'"'+t+'"',dynamic:!1}}function fa(e){var t=e.match(na);if(t){var n={};return t.forEach((function(e){n[e.slice(1)]=!0})),n}}function va(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}var ha=/^xmlns:NS\d+/,ma=/^NS\d+:/;function ga(e){return sa(e.tag,e.attrsList.slice(),e.parent)}var ya=[ho,go,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Nr(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Rr(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Rr(e,"v-else",!0),s=Rr(e,"v-else-if",!0),l=ga(e);ua(l),Lr(l,"type","checkbox"),ca(l,t),l.processed=!0,l.if="("+n+")==='checkbox'"+o,da(l,{exp:l.if,block:l});var c=ga(e);Rr(c,"v-for",!0),Lr(c,"type","radio"),ca(c,t),da(l,{exp:"("+n+")==='radio'"+o,block:c});var u=ga(e);return Rr(u,"v-for",!0),Lr(u,":type",n),ca(u,t),da(l,{exp:i,block:u}),a?l.else=!0:s&&(l.elseif=s),l}}}}];var ba,_a,wa={expectHTML:!0,modules:ya,directives:{model:function(e,t,n){var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if(e.component)return zr(e,r,i),!1;if("select"===o)!function(e,t,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+Ur(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Mr(e,"change",r,null,!0)}(e,r,i);else if("input"===o&&"checkbox"===a)!function(e,t,n){var r=n&&n.number,i=Nr(e,"value")||"null",o=Nr(e,"true-value")||"true",a=Nr(e,"false-value")||"false";Er(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Ur(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Ur(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Ur(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Nr(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Ur(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,l=!o&&"range"!==r,c=o?"change":"range"===r?"__r":"input",u="$event.target.value";s&&(u="$event.target.value.trim()");a&&(u="_n("+u+")");var d=Ur(t,u);l&&(d="if($event.target.composing)return;"+d);Er(e,"value","("+t+")"),Mr(e,c,d,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!H.isReservedTag(o))return zr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:Fn,canBeLeftOpenTag:_o,isReservedTag:Zn,getTagNamespace:Yn,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(ya)},xa=S((function(e){return g("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function Sa(e,t){e&&(ba=xa(t.staticKeys||""),_a=t.isReservedTag||j,function e(t){if(t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||y(e.tag)||!_a(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(ba)))}(t),1===t.type){if(!_a(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}var Ca=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,$a=/\([^)]*?\);*$/,Aa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ka={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ta={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Oa=function(e){return"if("+e+")return null;"},Pa={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Oa("$event.target !== $event.currentTarget"),ctrl:Oa("!$event.ctrlKey"),shift:Oa("!$event.shiftKey"),alt:Oa("!$event.altKey"),meta:Oa("!$event.metaKey"),left:Oa("'button' in $event && $event.button !== 0"),middle:Oa("'button' in $event && $event.button !== 1"),right:Oa("'button' in $event && $event.button !== 2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=Ia(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Ia(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return Ia(e)})).join(",")+"]";var t=Aa.test(e.value),n=Ca.test(e.value),r=Aa.test(e.value.replace($a,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(Pa[s])o+=Pa[s],ka[s]&&a.push(s);else if("exact"===s){var l=e.modifiers;o+=Oa(["ctrl","shift","alt","meta"].filter((function(e){return!l[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ea).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ea(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=ka[e],r=Ta[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var ja={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:E},La=function(e){this.options=e,this.warn=e.warn||Dr,this.transforms=Ir(e.modules,"transformCode"),this.dataGenFns=Ir(e.modules,"genData"),this.directives=D(D({},ja),e.directives);var t=e.isReservedTag||j;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Fa(e,t){var n=new La(t);return{render:"with(this){return "+(e?Ba(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ba(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ma(e,t);if(e.once&&!e.onceProcessed)return Na(e,t);if(e.for&&!e.forProcessed)return Ha(e,t);if(e.if&&!e.ifProcessed)return Ra(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:$(e.name),value:e.value,dynamic:e.dynamic}}))):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Wa(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Wa(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return qa(e,t)||"void 0"}function Ma(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+Ba(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function Na(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Ra(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ba(e,t)+","+t.onceId+++","+n+")":Ba(e,t)}return Ma(e,t)}function Ra(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?Na(e,n):Ba(e,n)}}(e.ifConditions.slice(),t,n,r)}function Ha(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Ba)(e,t)+"})"}function Wa(e,t){var n="{",r=function(e,t){var n=e.directives;if(!n)return;var r,i,o,a,s="directives:[",l=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var c=t.directives[o.name];c&&(a=!!c(e,o,t.warn)),a&&(l=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?",arg:"+(o.isDynamicArg?o.arg:'"'+o.arg+'"'):"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(l)return s.slice(0,-1)+"]"}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var i=0;i<t.dataGenFns.length;i++)n+=t.dataGenFns[i](e);if(e.attrs&&(n+="attrs:"+Ga(e.attrs)+","),e.props&&(n+="domProps:"+Ga(e.props)+","),e.events&&(n+=Da(e.events,!1)+","),e.nativeEvents&&(n+=Da(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t,n){var r=e.for||Object.keys(t).some((function(e){var n=t[e];return n.slotTargetDynamic||n.if||n.for||za(n)})),i=!!e.if;if(!r)for(var o=e.parent;o;){if(o.slotScope&&"_empty_"!==o.slotScope||o.for){r=!0;break}o.if&&(i=!0),o=o.parent}var a=Object.keys(t).map((function(e){return Ua(t[e],n)})).join(",");return"scopedSlots:_u(["+a+"]"+(r?",null,true":"")+(!r&&i?",null,false,"+function(e){var t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return t>>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Fa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function za(e){return 1===e.type&&("slot"===e.tag||e.children.some(za))}function Ua(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ra(e,t,Ua,"null");if(e.for&&!e.forProcessed)return Ha(e,t,Ua);var r="_empty_"===e.slotScope?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ba(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ba)(a,t)+s}var l=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(Va(i)||i.ifConditions&&i.ifConditions.some((function(e){return Va(e.block)}))){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some((function(e){return t(e.block)})))&&(n=1)}}return n}(o,t.maybeComponent):0,c=i||Ja;return"["+o.map((function(e){return c(e,t)})).join(",")+"]"+(l?","+l:"")}}function Va(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function Ja(e,t){return 1===e.type?Ba(e,t):3===e.type&&e.isComment?function(e){return"_e("+JSON.stringify(e.text)+")"}(e):function(e){return"_v("+(2===e.type?e.expression:Ka(JSON.stringify(e.text)))+")"}(e)}function Ga(e){for(var t="",n="",r=0;r<e.length;r++){var i=e[r],o=Ka(i.value);i.dynamic?n+=i.name+","+o+",":t+='"'+i.name+'":'+o+","}return t="{"+t.slice(0,-1)+"}",n?"_d("+t+",["+n.slice(0,-1)+"])":t}function Ka(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b");function Xa(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),E}}function Za(e){var t=Object.create(null);return function(n,r,i){(r=D({},r)).warn;delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(t[o])return t[o];var a=e(n,r),s={},l=[];return s.render=Xa(a.render,l),s.staticRenderFns=a.staticRenderFns.map((function(e){return Xa(e,l)})),t[o]=s}}var Ya,Qa,es=(Ya=function(e,t){var n=la(e.trim(),t);!1!==t.optimize&&Sa(n,t);var r=Fa(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(n)for(var a in n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=D(Object.create(e.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(e,t,n){(n?o:i).push(e)};var s=Ya(t.trim(),r);return s.errors=i,s.tips=o,s}return{compile:t,compileToFunctions:Za(t)}})(wa).compileToFunctions;function ts(e){return(Qa=Qa||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',Qa.innerHTML.indexOf("&#10;")>0}var ns=!!G&&ts(!1),rs=!!G&&ts(!0),is=S((function(e){var t=tr(e);return t&&t.innerHTML})),os=An.prototype.$mount;function as(e,t){return e(t={exports:{}},t.exports),t.exports}An.prototype.$mount=function(e,t){if((e=e&&tr(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=is(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=es(r,{outputSourceRange:!1,shouldDecodeNewlines:ns,shouldDecodeNewlinesForHref:rs,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return os.call(this,e,t)},An.compile=es;var ss,ls=as((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n,r=(n=An)&&"object"==typeof n&&"default"in n?n.default:n;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var a="undefined"!=typeof window;function s(e,t){return t.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}var l={},c={},u={},d=new(r.extend({data:function(){return{transports:l,targets:c,sources:u,trackInstances:a}},methods:{open:function(e){if(a){var t=e.to,n=e.from,o=e.passengers,s=e.order,l=void 0===s?1/0:s;if(t&&n&&o){var c,u={to:t,from:n,passengers:(c=o,Array.isArray(c)||"object"===i(c)?Object.freeze(c):c),order:l};-1===Object.keys(this.transports).indexOf(t)&&r.set(this.transports,t,[]);var d,p=this.$_getTransportIndex(u),f=this.transports[t].slice(0);-1===p?f.push(u):f[p]=u,this.transports[t]=(d=function(e,t){return e.order-t.order},f.map((function(e,t){return[t,e]})).sort((function(e,t){return d(e[1],t[1])||e[0]-t[0]})).map((function(e){return e[1]})))}}},close:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.to,r=e.from;if(n&&(r||!1!==t)&&this.transports[n])if(t)this.transports[n]=[];else{var i=this.$_getTransportIndex(e);if(i>=0){var o=this.transports[n].slice(0);o.splice(i,1),this.transports[n]=o}}},registerTarget:function(e,t,n){a&&(this.trackInstances&&!n&&this.targets[e]&&console.warn("[portal-vue]: Target ".concat(e," already exists")),this.$set(this.targets,e,Object.freeze([t])))},unregisterTarget:function(e){this.$delete(this.targets,e)},registerSource:function(e,t,n){a&&(this.trackInstances&&!n&&this.sources[e]&&console.warn("[portal-vue]: source ".concat(e," already exists")),this.$set(this.sources,e,Object.freeze([t])))},unregisterSource:function(e){this.$delete(this.sources,e)},hasTarget:function(e){return!(!this.targets[e]||!this.targets[e][0])},hasSource:function(e){return!(!this.sources[e]||!this.sources[e][0])},hasContentFor:function(e){return!!this.transports[e]&&!!this.transports[e].length},$_getTransportIndex:function(e){var t=e.to,n=e.from;for(var r in this.transports[t])if(this.transports[t][r].from===n)return+r;return-1}}}))(l),p=1,f=r.extend({name:"portal",props:{disabled:{type:Boolean},name:{type:String,default:function(){return String(p++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},created:function(){var e=this;this.$nextTick((function(){d.registerSource(e.name,e)}))},mounted:function(){this.disabled||this.sendUpdate()},updated:function(){this.disabled?this.clear():this.sendUpdate()},beforeDestroy:function(){d.unregisterSource(this.name),this.clear()},watch:{to:function(e,t){t&&t!==e&&this.clear(t),this.sendUpdate()}},methods:{clear:function(e){var t={from:this.name,to:e||this.to};d.close(t)},normalizeSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},normalizeOwnChildren:function(e){return"function"==typeof e?e(this.slotProps):e},sendUpdate:function(){var e=this.normalizeSlots();if(e){var t={from:this.name,to:this.to,passengers:o(e),order:this.order};d.open(t)}else this.clear()}},render:function(e){var t=this.$slots.default||this.$scopedSlots.default||[],n=this.tag;return t&&this.disabled?t.length<=1&&this.slim?this.normalizeOwnChildren(t)[0]:e(n,[this.normalizeOwnChildren(t)]):this.slim?e():e(n,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),v=r.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:d.transports,firstRender:!0}},created:function(){var e=this;this.$nextTick((function(){d.registerTarget(e.name,e)}))},watch:{ownTransports:function(){this.$emit("change",this.children().length>0)},name:function(e,t){d.unregisterTarget(t),d.registerTarget(e,this)}},mounted:function(){var e=this;this.transition&&this.$nextTick((function(){e.firstRender=!1}))},beforeDestroy:function(){d.unregisterTarget(this.name)},computed:{ownTransports:function(){var e=this.transports[this.name]||[];return this.multiple?e:0===e.length?[]:[e[e.length-1]]},passengers:function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.reduce((function(e,n){var r=n.passengers[0],i="function"==typeof r?r(t):n.passengers;return e.concat(i)}),[])}(this.ownTransports,this.slotProps)}},methods:{children:function(){return 0!==this.passengers.length?this.passengers:this.$scopedSlots.default?this.$scopedSlots.default(this.slotProps):this.$slots.default||[]},noWrapper:function(){var e=this.slim&&!this.transition;return e&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),e}},render:function(e){var t=this.noWrapper(),n=this.children(),r=this.transition||this.tag;return t?n[0]:this.slim&&!r?e():e(r,{props:{tag:this.transition&&this.tag?this.tag:void 0},class:{"vue-portal-target":!0}},n)}}),h=0,m=["disabled","name","order","slim","slotProps","tag","to"],g=["multiple","transition"],y=r.extend({name:"MountingPortal",inheritAttrs:!1,props:{append:{type:[Boolean,String]},bail:{type:Boolean},mountTo:{type:String,required:!0},disabled:{type:Boolean},name:{type:String,default:function(){return"mounted_"+String(h++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}},multiple:{type:Boolean,default:!1},targetSlim:{type:Boolean},targetSlotProps:{type:Object,default:function(){return{}}},targetTag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},created:function(){if("undefined"!=typeof document){var e=document.querySelector(this.mountTo);if(e){var t=this.$props;if(d.targets[t.name])t.bail?console.warn("[portal-vue]: Target ".concat(t.name," is already mounted.\n Aborting because 'bail: true' is set")):this.portalTarget=d.targets[t.name];else{var n=t.append;if(n){var r="string"==typeof n?n:"DIV",i=document.createElement(r);e.appendChild(i),e=i}var o=s(this.$props,g);o.slim=this.targetSlim,o.tag=this.targetTag,o.slotProps=this.targetSlotProps,o.name=this.to,this.portalTarget=new v({el:e,parent:this.$parent||this,propsData:o})}}else console.error("[portal-vue]: Mount Point '".concat(this.mountTo,"' not found in document"))}},beforeDestroy:function(){var e=this.portalTarget;if(this.append){var t=e.$el;t.parentNode.removeChild(t)}e.$destroy()},render:function(e){if(!this.portalTarget)return console.warn("[portal-vue] Target wasn't mounted"),e();if(!this.$scopedSlots.manual){var t=s(this.$props,m);return e(f,{props:t,attrs:this.$attrs,on:this.$listeners,scopedSlots:this.$scopedSlots},this.$slots.default)}var n=this.$scopedSlots.manual({to:this.to});return Array.isArray(n)&&(n=n[0]),n||e()}});var b={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(t.portalName||"Portal",f),e.component(t.portalTargetName||"PortalTarget",v),e.component(t.MountingPortalName||"MountingPortal",y)}};t.default=b,t.Portal=f,t.PortalTarget=v,t.MountingPortal=y,t.Wormhole=d})),cs=(ss=ls)&&ss.__esModule&&Object.prototype.hasOwnProperty.call(ss,"default")?ss.default:ss;ls.Portal,ls.PortalTarget,ls.MountingPortal,ls.Wormhole;function us(e,t,n,r,i,o,a,s,l,c){"boolean"!=typeof a&&(l=s,s=a,a=!1);const u="function"==typeof n?n.options:n;let d;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),r&&(u._scopeId=r),o?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):t&&(d=a?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),d)if(u.functional){const e=u.render;u.render=function(t,n){return d.call(n),e(t,n)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,d):[d]}return n}const ds=us({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wptb-settings-header"},[n("div",{staticClass:"wptb-settings-brand"},[n("img",{attrs:{src:e.logoSrc,alt:e.logoAlt}}),e._v(" "),n("span",{staticClass:"wptb-settings-header-name"},[e._v("\n "+e._s(e.pluginName)+"\n ")])]),e._v(" "),n("div",{staticClass:"wptb-settings-links"},[e._t("default")],2)])},staticRenderFns:[]},void 0,{props:["logoSrc","logoAlt","pluginName"]},void 0,!1,void 0,!1,void 0,void 0,void 0);const ps=us({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"wptb-settings-sections-wrapper",class:{child:this.child}},[this._t("default")],2)},staticRenderFns:[]},void 0,{props:{child:{type:Boolean,default:!1}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const fs=us({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"wptb-settings-section-item",class:{disabled:!e.isActive},on:{click:function(t){return e.$emit("sectionchange",e.name)}}},[e._v("\n "+e._s(e.name)+"\n")])},staticRenderFns:[]},void 0,{props:["name","current"],computed:{isActive:function(){return void 0===this.current||this.current===this.name}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const vs=us({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"wptb-settings-controls-wrapper",class:[this.center?"center":"grid"]},[this._t("default")],2)},staticRenderFns:[]},void 0,{props:{center:{type:Boolean,default:!1}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const hs=us({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wptb-settings-messages"},[e.busy?n("span",{staticClass:"dashicons dashicons-image-rotate wptb-settings-fetching"}):e._e(),e._v(" "),n("transition",{attrs:{name:"wptb-fade"}},[e.show?n("span",{staticClass:"wptb-settings-message",class:[e.type]},[e._v(e._s(e.message))]):e._e()])],1)},staticRenderFns:[]},void 0,{props:["type","show","message","busy"]},void 0,!1,void 0,!1,void 0,void 0,void 0);const ms=us({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"wptb-settings-footer"},[t("message-display",{attrs:{busy:this.messageBusy,message:this.messageBody,show:this.messageShow,type:this.messageType}}),this._v(" "),t("div",{staticClass:"wptb-settings-button-container"},[this._t("default")],2)],1)},staticRenderFns:[]},void 0,{props:["messageType","messageShow","messageBody","messageBusy"],components:{MessageDisplay:hs}},void 0,!1,void 0,!1,void 0,void 0,void 0);const gs=us({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"wptb-settings-button",class:[{disabled:this.disabled},this.type,this.size],on:{click:this.handleClick}},[this._t("default")],2)},staticRenderFns:[]},void 0,{props:{disabled:Boolean,type:{type:String,default:"primary"},size:{type:String,default:"normal"}},methods:{handleClick:function(){this.$emit("click")}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const ys=us({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wptb-menu-file-drop",class:e.eventClass,on:{dragenter:function(t){t.stopPropagation(),t.preventDefault(),e.dragActive=!0},dragleave:function(t){t.stopPropagation(),t.preventDefault(),e.dragActive=!1},drop:function(t){return t.stopPropagation(),t.preventDefault(),e.handleDrop(t)},dragover:function(t){t.stopPropagation(),t.preventDefault(),e.dragActive=!0}}},[n("transition",{attrs:{name:"wptb-fade",mode:"out-in"}},[e.dragActive?n("div",{key:"fileLogo",staticClass:"file-icon"},[n("span",{staticClass:"dashicons dashicons-media-spreadsheet"})]):n("div",{key:"controls"},[n("transition",{attrs:{name:"wptb-fade",mode:"out-in"}},[null===e.currentFile?n("div",{key:"selection",staticClass:"wptb-flex wptb-flex-col wptb-flex-align-center"},[n("div",{staticClass:"hint"},[e._v(e._s(e.texts.hint))]),e._v(" "),n("div",{staticClass:"supported wptb-text-transform-none"},[e._v("("+e._s(e.allowedFormats.join(", "))+")")]),e._v(" "),n("div",[n("a",{on:{click:function(t){return t.preventDefault(),e.openFileSelect(t)}}},[e._v(e._s(e.texts.browse))]),e._v(" "),n("input",{ref:"fileSelect",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:e.handleFileSelect}})])]):n("div",{key:"selected",staticClass:"wptb-flex wptb-flex-col wptb-flex-align-center"},[n("div",{staticClass:"file"},[e._v(e._s(e.currentFile.name))]),e._v(" "),n("div",[n("a",{on:{click:function(t){return t.preventDefault(),e.clearCurrentFile(t)}}},[e._v(e._s(e.texts.clear))])])])])],1)])],1)},staticRenderFns:[]},void 0,{props:["texts","file","allowedFormats"],model:{prop:"file",event:"fileChanged"},data:function(){return{dragActive:!1,currentFile:null}},mounted:function(){this.currentFile=this.file},watch:{currentFile:function(e){this.$emit("fileChanged",e)},file:function(e){this.currentFile=e}},computed:{eventClass:function(){return this.dragActive?"dragenter":""}},methods:{handleDrop:function(e){this.dragActive=!0;var t=e.dataTransfer;t.files[0]&&this.isTypeAllowed(t.files[0])&&(this.currentFile=t.files[0]),this.dragActive=!1},isTypeAllowed:function(e){var t=e.name.split(".").pop();return this.allowedFormats.includes(t)},openFileSelect:function(){this.$refs.fileSelect.click()},handleFileSelect:function(e){e.target.files.length>0&&this.isTypeAllowed(e.target.files[0])&&(this.currentFile=e.target.files[0])},clearCurrentFile:function(){this.currentFile=null}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const bs=us({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.isType("multiCheckbox")?n("div",e._l(e.fieldData.options,(function(t,r){return n("div",{staticClass:"wptb-setting-control-row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.modelBind[e.fieldData.id],expression:"modelBind[fieldData.id]"}],attrs:{id:e.fieldData.id,type:"checkbox"},domProps:{value:r,checked:Array.isArray(e.modelBind[e.fieldData.id])?e._i(e.modelBind[e.fieldData.id],r)>-1:e.modelBind[e.fieldData.id]},on:{change:function(t){var n=e.modelBind[e.fieldData.id],i=t.target,o=!!i.checked;if(Array.isArray(n)){var a=r,s=e._i(n,a);i.checked?s<0&&e.$set(e.modelBind,e.fieldData.id,n.concat([a])):s>-1&&e.$set(e.modelBind,e.fieldData.id,n.slice(0,s).concat(n.slice(s+1)))}else e.$set(e.modelBind,e.fieldData.id,o)}}}),e._v(" "),n("label",{attrs:{for:e.fieldData.id}},[e._v(e._s(t))])])})),0):e.isType("checkbox")?n("div",[n("div",{staticClass:"wptb-setting-control-row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.modelBind[e.fieldData.id],expression:"modelBind[fieldData.id]"}],attrs:{id:e.fieldData.id,type:"checkbox"},domProps:{checked:Array.isArray(e.modelBind[e.fieldData.id])?e._i(e.modelBind[e.fieldData.id],null)>-1:e.modelBind[e.fieldData.id]},on:{change:function(t){var n=e.modelBind[e.fieldData.id],r=t.target,i=!!r.checked;if(Array.isArray(n)){var o=e._i(n,null);r.checked?o<0&&e.$set(e.modelBind,e.fieldData.id,n.concat([null])):o>-1&&e.$set(e.modelBind,e.fieldData.id,n.slice(0,o).concat(n.slice(o+1)))}else e.$set(e.modelBind,e.fieldData.id,i)}}}),e._v(" "),n("label",{attrs:{for:e.fieldData.id}},[e._v(e._s(e.fieldData.label))])])]):e.isType("dropdown")?n("div",[n("div",{staticClass:"wptb-setting-control-row"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.modelBind[e.fieldData.id],expression:"modelBind[fieldData.id]"}],attrs:{id:e.fieldData.id},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.modelBind,e.fieldData.id,t.target.multiple?n:n[0])}}},e._l(e.fieldData.options,(function(t){return n("option",{domProps:{value:t.value}},[e._v("\n "+e._s(t.label)+"\n ")])})),0),e._v(" "),n("label",{attrs:{for:e.fieldData.id}},[e._v(e._s(e.fieldData.label))])])]):e._e()])},staticRenderFns:[]},void 0,{props:["fieldData","modelBind"],methods:{isType:function(e){return this.fieldData.type===e}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function _s(t){function n(e,o){if(e&&Array.isArray(e)){var a=t.delimiter;if("tab"==a&&(a="\t"),!a&&!(a=function(e){for(var t={},n=!1,r=0,i=e.length,o=0;o<i;o++){var a=o-1>=0?e[o-1]:"",s=e[o],l=o+1<i?e[o+1]:"";if('"'===s)n&&'"'===l?n&&o++:n=!n;else if(("\n"!==s||"\r"===a)&&"\r"!==s||n)n||-1!==";,\t".indexOf(s)&&(void 0===t[s]&&(t[s]={}),void 0===t[s][r]&&(t[s][r]=0),t[s][r]++);else if(++r>=15)break}var c="";for(var u in t){var d=t[u],p=0;for(var f in d)p++;if(p===r){var v=!1,h=void 0;for(var m in d)v?h=!(d[m]!==v||!h&&void 0!==h):v=d[m];if(!(r>1)||h){if(c){c=!1;break}c=u}}}return c}(e[o])))return void alert("The delimiter could not be determined");document.addEventListener("table:imported:saved",(function t(){e.length-o>1&&n(e,o+1),document.removeEventListener("table:imported:saved",t)})),function e(n,r){var i=new XMLHttpRequest,o=t.ajaxUrl+"?action=save_table";r&&n.classList.contains("wptb-element-main-table_setting-startedid-0")&&(n.classList.remove("wptb-element-main-table_setting-startedid-0"),n.classList.add("wptb-element-main-table_setting-"+r));var a={content:WPTB_Stringifier(n).outerHTML,security_code:t.nonce};r&&(a.id=r);a=JSON.stringify(a),i.open("POST",o,!0),i.setRequestHeader("Content-type","application/json; charset=utf-8"),i.onreadystatechange=function(t){if(4==this.readyState&&200==this.status){if("security_problem"===JSON.parse(i.responseText)[0])return void WPTB_Helper.wptbDocumentEventGenerate("table:imported:error",document);var r=JSON.parse(i.responseText);"saved"==r[0]?e(n,r[1]):"edited"==r[0]&&WPTB_Helper.wptbDocumentEventGenerate("table:imported:saved",document)}},i.send(a)}(function(e){if(e&&Array.isArray(e)&&e.length>0){var t=e.length,n=t>0&&e[0]&&Array.isArray(e[0])?e[0].length:0;if(0===t&&0===n)return!1;var o={imageElemIndex:1,textElemIndex:1,customHtmlElemIndex:1},a=new Array(t);a.fill(1);var s=new Array(n);s.fill(1);for(var c=document.createElement("tbody"),u=n-1,d=t-1;d>=0;d--){var p=document.createElement("tr");p.classList.add("wptb-row");for(var f=u;f>=0;f--){var v=e[d][f];if("#rowspan#"===v){if(d>0){a[f]||(a[f]=1),a[f]++,s[d]=1;continue}v=""}else if("#colspan#"===v){if(f>0){s[d]||(s[d]=1),s[d]++,a[f]=1;continue}v=""}var h=document.createElement("td");h.classList.add("wptb-droppable","wptb-cell"),h.dataset.wptbCssTdAutoWidth="true",h.style.padding="15px",h.style.width=null,h.style.height=null,h.style.borderStyle="solid",h.style.borderWidth="1px",h.innerHTML=v,s[d]>1&&(h.colSpan=s[d]),a[f]>1&&(h.rowSpan=a[f]),p.insertBefore(h,p.firstChild),s[d]=1,a[f]=1}c.insertBefore(p,c.firstChild)}var m=document.createElement("table");m.classList.add("wptb-preview-table","wptb-element-main-table_setting-startedid-0"),m.style.borderStyle="solid",m.style.borderWidth="1px",m.appendChild(c);for(var g=m.querySelectorAll("td"),y=0;y<g.length;y++){var b=l(r(g[y].childNodes),o),_=void 0;if(b&&Array.isArray(b)&&(_=b[0],o=b[1]),g[y].innerHTML="",_&&Array.isArray(_))for(var w=0;w<_.length;w++)g[y].appendChild(_[w])}return WPTB_Helper.recalculateIndexes(m),i(m),m}return!1}(function(e,t){for(var n=[],r=!1,i=0,o=0,a=0;a<e.length;a++){var s=e[a],l=e[a+1];n[i]=n[i]||[],n[i][o]=n[i][o]||"",'"'==s&&r&&'"'==l?(n[i][o]+=s,++a):'"'!=s?s!=t||r?"\n"!=s||r?n[i][o]+=s:(++i,o=0):++o:r=!r}return n}(e[o],a)))}}function i(e){t.tableResponsive?e.dataset.wptbAdaptiveTable="1":e.dataset.wptbAdaptiveTable="0",t.topRowAsHeader&&e.classList.add("wptb-table-preview-head"),e.dataset.wptbFixedWidthSize="0",e.dataset.wptbCellsWidthAutoCount=e.maxCols;var n=e.querySelector("td"),r=n&&n.style.paddingTop?n.style.paddingTop:15;e.dataset.wptbTableTdsSumMaxWidth=String(parseInt(e.maxCols)*(101+2*parseInt(r))+1)}function o(e,n){if(n&&Array.isArray(n)&&n.length>0){var r=n.shift();if(r&&Array.isArray(r)&&r.length>0){var i=r[0];window.wptbImportConvertationShortcodes||(window.wptbImportConvertationShortcodes=[]);var o=[];o.push(i),window.wptbImportConvertationShortcodes.push(o);var s=r[1],l=t.import_iframe_url+"&_wpnonce="+t.security_code+"&shortcode="+i;e.src=l,e.onload=a.bind(this,e,s,n)}}}function a(n,a,c){var u=n.contentDocument||n.contentWindow.document,d=u.querySelector(".dataTables_length select");if(d){var p=r(d.options);if(Array.isArray(p)){var f=p.reduce((function(e,t){return(e?Number(e.value):"")<(t?Number(t.value):"")&&(e=t),e}));f&&(d.value=f.value,WPTB_Helper.wptbDocumentEventGenerate("change",d))}}!function(n,a,c,u){if(n){n.style.borderStyle="solid",n.style.borderWidth="1px",WPTB_Helper.checkSetGetStyleColorValue(n,"border-color","border-top-color",!0);var d=WPTB_Helper.checkSetGetStyleValue(n,"float","float");d&&"none"!=d&&(n.dataset.wptbTableAlignment=d);var p=n.querySelector("caption");p&&n.removeChild(p);var f=n.querySelector("tbody");f&&f.removeAttribute("class");var v=n.querySelector("thead");if(v){var h=v.innerHTML;if(h&&(h=WPTB_Helper.replaceAll(h,"<th","<td"),h=WPTB_Helper.replaceAll(h,"th>","td>"),f)){var m=f.innerHTML;m=h+m,f.innerHTML=m}n.removeChild(v)}var g=n.querySelector("tfoot");if(g){var y=g.innerHTML;if(y&&f){var b=f.innerHTML;b+=y,f.innerHTML=b}n.removeChild(g)}WPTB_Helper.recalculateIndexes(n);var _=n.querySelectorAll("tr");if(_.length>0)for(var w={imageElemIndex:1,textElemIndex:1,customHtmlElemIndex:1},x=0;x<_.length;x++){_[x].removeAttribute("class"),_[x].removeAttribute("role"),_[x].classList.add("wptb-row");var S=!0,C=WPTB_Helper.checkSetGetStyleColorValue(_[x],"background-color","background-color");C&&(WPTB_Helper.isHex(C)||(C=WPTB_Helper.rgbToHex(C)),_[x].style.tdsBackgroundColor=C,S=!1);for(var $=r(_[x].children),A=void 0,k="",T=0;T<$.length;T++){S&&(T>0&&A!=WPTB_Helper.checkSetGetStyleColorValue(trChildNodes[x],"background-color","background-color")?(A="",S=!1):A=WPTB_Helper.checkSetGetStyleColorValue(trChildNodes[x],"background-color","background-color")),$[T].style.width=null,$[T].style.height=null,$[T].style.borderStyle="solid",$[T].style.borderWidth="1px";var O=WPTB_Helper.checkSetGetStyleColorValue($[T],"border-color","border-top-color"),P=WPTB_Helper.checkSetGetStyleColorValue($[T],"border-color","border-left-color"),D=WPTB_Helper.checkSetGetStyleColorValue($[T],"border-color","border-right-color"),I=WPTB_Helper.checkSetGetStyleColorValue($[T],"border-color","border-bottom-color"),E=WPTB_Helper.getValueMaxCountSameElementsInArray([O,P,D,I]);E&&(WPTB_Helper.isHex(E)||(E=WPTB_Helper.rgbToHex(E)),$[T].style.borderColor=E),WPTB_Helper.checkSetGetStyleSizeValue($[T],"padding","padding-top","px"),$[T].dataset.wptbCssTdAutoWidth="true",$[T].removeAttribute("class"),$[T].removeAttribute("role"),$[T].classList.add("wptb-droppable","wptb-cell");var j=$[T].dataset.xIndex,L=$[T].dataset.yIndex;if(j&&L&&Array.isArray(a)&&a[L]&&Array.isArray(a[L])&&a[L][j]){$[T].innerHTML=a[L][j];var F=l(r($[T].childNodes),w),B=void 0;F&&Array.isArray(F)&&(B=F[0],w=F[1]),$[T].innerHTML="";for(var M=0;M<B.length;M++)$[T].appendChild(B[M])}k+=$[T].outerHTML}_[x].innerHTML=k,_[x].style.backgroundColor=WPTB_Helper.rgbToHex(A)}n.removeAttribute("class"),n.removeAttribute("role"),n.removeAttribute("id"),n.removeAttribute("aria-describedby"),n.classList.add("wptb-preview-table","wptb-element-main-table_setting-startedid-0"),i(n),function n(r,i,a,l){var c,u,d=new XMLHttpRequest,p=t.ajaxUrl+"?action=save_table",f=(i.contentDocument||i.contentWindow.document).querySelector(".tablepress-table-name");c=f?f.innerText:"";l&&r.classList.contains("wptb-element-main-table_setting-startedid-0")&&(r.classList.remove("wptb-element-main-table_setting-startedid-0"),r.classList.add("wptb-element-main-table_setting-"+l));u=(u=WPTB_Stringifier(r)).outerHTML;var v={title:c,content:u,security_code:t.security_code};l&&(v.id=l);v=JSON.stringify(v),d.open("POST",p,!0),d.setRequestHeader("Content-type","application/json; charset=utf-8"),d.onreadystatechange=function(l){if(4==this.readyState&&200==this.status){var c=JSON.parse(d.responseText);if("saved"==c[0])n(r,i,a,c[1]);else if("edited"==c[0]){if(c[1]&&window.wptbImportConvertationShortcodes&&Array.isArray(window.wptbImportConvertationShortcodes)&&window.wptbImportConvertationShortcodes.length>0&&window.wptbImportConvertationShortcodes[window.wptbImportConvertationShortcodes.length-1].push("[wptb id="+c[1]+"]"),window.wptbImportCommonCountTables){var u=window.wptbImportCommonCountTables;if(100==s(window.wptbImportCommonCountTables-a.length,u,"import")){var p=document.querySelector(".wptb-importPBarContainer");p&&p.addEventListener("wptb-import:progressBar:full:import",(function(){WPTB_Helper.wptbDocumentEventGenerate("table:imported:saved",document),WPTB_Helper.wptbDocumentEventGenerate("table:imported:list",document,e({},t.type,window.wptbImportConvertationShortcodes))}),!1)}}else s(100,100,"import");o(i,a)}}},d.send(v)}(n,c,u)}}(u.querySelector("table.tablepress"),a,n,c)}function s(e,t,n){var r=document.querySelector(".wptb-importPBarContainer"),i=document.querySelector("#wptb-pBarPercent"),o=document.querySelector("#wptb-pBarPercent span");if(r&&i&&o&&(e||0===e)&&t&&(e=Number(e),(t=Number(t))>0)){r.classList.add("wptb-importPBarContainerActive");var a=r.querySelector(".wptb-nameProcessInBarProgress");if(a){var s,l="";"import"==n?s=document.querySelector(".wptb-importFromPlugin"):"replace"==n&&(s=document.querySelector(".wptb-importTableReplaceShortcodes")),s&&(l=s.dataset.name)&&(a.innerHTML=l),l||(a.innerHTML="")}var c=(e/t*100).toFixed(2);return c>100&&(c=100),o.innerHTML=c+"%",i.style.width=c<3?"3%":c+"%",100==c&&setTimeout((function(){r.classList.remove("wptb-importPBarContainerActive"),n=n?":"+n:"",WPTB_Helper.wptbDocumentEventGenerate("wptb-import:progressBar:full"+n,r)}),2e3),c}}function l(e,t){for(var n=[],r=0;r<e.length;r++)if(1==e[r].nodeType||3==e[r].nodeType){var i=document.createElement("div");if(1==e[r].nodeType)if("img"===e[r].nodeName.toLowerCase()){e[r].style.width="100%",e[r].removeAttribute("class"),i.classList.add("wptb-image-container","wptb-ph-element","wptb-element-image-"+t.imageElemIndex),i.innerHTML='<div class="wptb-image-wrapper"><a style="display: block;" target="_blank" rel="nofollow">'+e[r].outerHTML+"</a></div>";var o=i.querySelector("img");o&&(o.style.width="100%"),t.imageElemIndex++}else"wptb_shortcode_container_element"===e[r].nodeName.toLowerCase()?(i.classList.add("wptb-shortcode-container","wptb-ph-element","wptb-element-shortcode-"+t.customHtmlElemIndex),i.innerHTML="<wptb_shortcode_container_element><div>"+e[r].innerHTML+"</div></wptb_shortcode_container_element>",t.customHtmlElemIndex++):(i.classList.add("wptb-html-container","wptb-ph-element","wptb-element-custom_html-"+t.customHtmlElemIndex),i.innerHTML='<div class="wptb-custom-html-wrapper" data-wptb-new-element="1">'+e[r].outerHTML+"</div>",t.customHtmlElemIndex++);else if(3==e[r].nodeType){i.classList.add("wptb-text-container","wptb-ph-element","wptb-element-text-"+t.textElemIndex),i.innerHTML="<div><p>"+e[r].nodeValue+"</p></div>";var a=i.querySelector("p");if(a){var s=WPTB_Helper.checkSetGetStyleSizeValue(a,"font-size","font-size");s&&WPTB_Helper.checkingDimensionValue(s,"px")&&(a.style.fontSize=null,i.style.fontSize=s);var l=WPTB_Helper.checkSetGetStyleColorValue(a,"color","color");l&&(WPTB_Helper.isHex(l)?(a.style.color=null,i.style.color=l):WPTB_Helper.rgbToHex(l)&&(a.style.color=null,l=WPTB_Helper.rgbToHex(l),i.style.color=l))}t.textElemIndex++}n.push(i)}return[n,t]}return{importFromFile:function(){if(t.file){var e=/^([a-zA-Z0-9()\s_\\.\-:])+(.csv)$/.test(t.file.name.toLowerCase()),r=/^([a-zA-Z0-9()\s_\\.\-:])+(.xml)$/.test(t.file.name.toLowerCase()),i=/^([a-zA-Z0-9()\s_\\.\-:])+(.html)$/.test(t.file.name.toLowerCase()),o=/^([a-zA-Z0-9()\s_\\.\-:])+(.zip)$/.test(t.file.name.toLowerCase()),a=t.file;if(o){var s=new XMLHttpRequest,l=t.ajaxUrl+"?action=zip_unpacker",c=new FormData;c.append("file",a,"csv_zip.zip"),c.append("security_code",t.nonce),s.open("POST",l,!0),s.onreadystatechange=function(e){if(4==this.readyState&&200==this.status){var t=s.responseText;if("unsuccess"===JSON.parse(t)[0])return void WPTB_Helper.wptbDocumentEventGenerate("table:imported:error",document);if(t&&(t=JSON.parse(t)),t&&Array.isArray(t)&&"success"==t[0]&&t[1]&&Array.isArray(t[1])){for(var r=[],i=0;i<t[1].length;i++)"csv"===t[1][i][0]&&r.push(t[1][i][1]);r.length>0&&n(r,0)}}},s.send(c)}else if(e||r||i)if("undefined"!=typeof FileReader){var u,d=new FileReader;d.onload=function(t){u=t.target.result,e&&n([u],0)},d.readAsText(a)}else alert("This browser does not support HTML5.");else alert("Please upload a valid file.")}},importFromPlugin:function(e){var n,r,i;e&&"table-press"===e&&(n=new XMLHttpRequest,r=t.ajaxUrl+"?action=import_tables",i={import_plugin_name:"table-press",security_code:t.security_code},i=JSON.stringify(i),n.open("POST",r,!0),n.setRequestHeader("Content-type","application/json; charset=utf-8"),n.onreadystatechange=function(e){if(4==this.readyState&&200==this.status){var t=JSON.parse(n.responseText);if(t&&Array.isArray(t))if("success"==t[0]){if(t[1]&&Array.isArray(t[1])){var r=document.getElementById("wptb-importIframeSection");if(r){var i=document.createElement("iframe");r.innerHTML="",r.appendChild(i),window.wptbImportCommonCountTables=t[1].length,window.wptbImportConvertationShortcodes&&delete window.wptbImportConvertationShortcodes,o(i,t[1])}}}else t[1]&&WPTB_Helper.wptbDocumentEventGenerate("table:imported:error",document,t[1])}},n.send(i))},replaceShortcodesAjax:function e(n,r){if(n&&Array.isArray(n)&&n.length>0){r&&(window.wptbImportShortcodesNecessaryReplace=n.length,window.wptbImportShortcodesReplacedCount=0,s(0,window.wptbImportShortcodesNecessaryReplace,"replace"));var i=new XMLHttpRequest,o=t.ajaxUrl+"?action=shortcodes_replace",a={replacing_shortcodes:n.shift(),security_code:t.security_code};a=JSON.stringify(a),i.open("POST",o,!0),i.setRequestHeader("Content-type","application/json; charset=utf-8"),i.onreadystatechange=function(t){if(4==this.readyState&&200==this.status){var r=JSON.parse(i.responseText),o=window.wptbImportShortcodesNecessaryReplace,a=window.wptbImportShortcodesNecessaryReplace-n.length,l=0;if(r&&Array.isArray(r)&&"success"==r[0]?(l=s(a,o,"replace"),window.wptbImportShortcodesReplacedCount?window.wptbImportShortcodesReplacedCount+=r[1]:window.wptbImportShortcodesReplacedCount=r[1]):l=s(o,o,"replace"),100==l){WPTB_Helper.wptbDocumentEventGenerate("table:shortcode:replace",document,window.wptbImportShortcodesReplacedCount);var c=document.querySelector(".wptb-importPBarContainer");c&&c.addEventListener("wptb-import:progressBar:full:replace",(function(){var e=document.querySelector(".wptb-importedTablesShortcodesReplaced");if(e){e.style.display="block";var t=document.querySelector(".wptb-importedShortcodesReplaceCount span");t&&(window.wptbImportShortcodesReplacedCount?t.innerHTML=window.wptbImportShortcodesReplacedCount:t.innerHTML="0")}}),!1)}else e(n)}},i.send(a)}}}}const ws=us({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("drag-drop",{attrs:{texts:{hint:e.strings.fileDropHint,browse:e.strings.browse,clear:e.strings.clear},"allowed-formats":["csv","zip"]},model:{value:e.currentFile,callback:function(t){e.currentFile=t},expression:"currentFile"}}),e._v(" "),n("div",e._l(e.fieldsData,(function(e){return n("control-item",{key:e.id,attrs:{"field-data":e,"model-bind":e.modelBind}})})),1),e._v(" "),n("portal",{attrs:{to:"footerButtons"}},[n("menu-button",{attrs:{disabled:e.isImportDisabled},on:{click:e.importFromFile}},[e._v(e._s(e.strings.importSection)+"\n ")])],1)],1)},staticRenderFns:[]},void 0,{props:["options"],components:{DragDrop:ys,ControlItem:bs,MenuButton:gs},data:function(){return{settings:{responsiveTables:!1,topRowAsHeader:!1,csvDelimiter:","},fieldsData:[],currentFile:null,fetching:!1}},mounted:function(){var e=this;document.addEventListener("table:imported:saved",(function(){e.currentFile=null,e.$emit("messageUp",{type:"ok",body:e.strings.tableImported}),e.fetching=!1})),document.addEventListener("table:imported:error",(function(){e.currentFile=null,e.$emit("messageUp",{type:"error",body:e.strings.errorOccured}),e.fetching=!1})),this.fieldsData.push({type:"dropdown",id:"csvDelimiter",modelBind:this.settings,label:this.strings.csvDelimiter,options:[{value:",",label:", (comma)"},{value:";",label:"; (semicolon)"},{value:"tab",label:"\\t (tabular)"}]},{type:"checkbox",id:"responsiveTables",modelBind:this.settings,label:this.strings.tableResponsive},{type:"checkbox",id:"topRowAsHeader",modelBind:this.settings,label:this.strings.topRowHeader})},watch:{fetching:function(e){this.$emit("fetching",e)}},computed:{isImportDisabled:function(){return null===this.currentFile||this.fetching}},methods:{importFromFile:function(){if(null!==this.currentFile){var e=_s({file:this.currentFile,ajaxUrl:this.options.ajaxUrl,nonce:this.options.security_code,delimiter:this.settings.csvDelimiter,tableResponsive:this.settings.responsiveTables,topRowAsHeader:this.settings.topRowAsHeader});this.fetching=!0,e.importFromFile()}}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ss(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xs(e,t,n[t])}))}return e}var Cs=function(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n},set:function(e){console.warn("tried to set frozen property ".concat(t," with ").concat(e))}})},$s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n})},As={abstract:!0,name:"Fragment",props:{name:{type:String,default:function(){return Math.floor(Date.now()*Math.random()).toString(16)}}},mounted:function(){var e=this.$el,t=e.parentNode,n=document.createComment("fragment#".concat(this.name,"#head")),r=document.createComment("fragment#".concat(this.name,"#tail"));t.insertBefore(n,e),t.insertBefore(r,e),e.appendChild=function(n){t.insertBefore(n,r),Cs(n,"parentNode",e)},e.insertBefore=function(n,r){t.insertBefore(n,r),Cs(n,"parentNode",e)},e.removeChild=function(e){t.removeChild(e),$s(e,"parentNode")},Array.from(e.childNodes).forEach((function(t){return e.appendChild(t)})),t.removeChild(e),Cs(e,"parentNode",t),Cs(e,"nextSibling",r.nextSibling);var i=t.insertBefore;t.insertBefore=function(r,o){i.call(t,r,o!==e?o:n)};var o=t.removeChild;t.removeChild=function(a){if(a===e){for(;n.nextSibling!==r;)e.removeChild(n.nextSibling);t.removeChild(n),t.removeChild(r),$s(e,"parentNode"),t.insertBefore=i,t.removeChild=o}else o.call(t,a)}},render:function(e){var t=this,n=this.$slots.default;return n&&n.length&&n.forEach((function(e){return e.data=Ss({},e.data,{attrs:Ss({fragment:t.name},(e.data||{}).attrs)})})),e("div",{attrs:{fragment:this.name}},n)}};var ks,Ts,Os,Ps,Ds=function(e,t){var n,r,i=0;function o(){var o,a,s=n,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a<l;a++)if(s.args[a]!==arguments[a]){s=s.next;continue e}return s!==n&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(o=new Array(l),a=0;a<l;a++)o[a]=arguments[a];return s={args:o,val:e.apply(null,o)},n?(n.prev=s,s.next=n):r=s,i===t.maxSize?(r=r.prev).next=null:i++,n=s,s.val}return t=t||{},o.clear=function(){n=null,r=null,i=0},o},Is=as((function(e,t){!function(){var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(e){return i(a(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}function i(t,r){var i,o,a,s,l,c,u,d,p,f=1,v=t.length,h="";for(o=0;o<v;o++)if("string"==typeof t[o])h+=t[o];else if("object"==typeof t[o]){if((s=t[o]).keys)for(i=r[f],a=0;a<s.keys.length;a++){if(null==i)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));i=i[s.keys[a]]}else i=s.param_no?r[s.param_no]:r[f++];if(e.not_type.test(s.type)&&e.not_primitive.test(s.type)&&i instanceof Function&&(i=i()),e.numeric_arg.test(s.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(n("[sprintf] expecting number but found %T",i));switch(e.number.test(s.type)&&(d=i>=0),s.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,s.width?parseInt(s.width):0);break;case"e":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case"f":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case"g":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case"t":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}e.json.test(s.type)?h+=i:(!e.number.test(s.type)||d&&!s.sign?p="":(p=d?"+":"-",i=i.toString().replace(e.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(p+i).length,l=s.width&&u>0?c.repeat(u):"",h+=s.align?p+i+l:"0"===c?p+l+i:l+p+i)}return h}var o=Object.create(null);function a(t){if(o[t])return o[t];for(var n,r=t,i=[],a=0;r;){if(null!==(n=e.text.exec(r)))i.push(n[0]);else if(null!==(n=e.modulo.exec(r)))i.push("%");else{if(null===(n=e.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){a|=1;var s=[],l=n[2],c=[];if(null===(c=e.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=e.key_access.exec(l)))s.push(c[1]);else{if(null===(c=e.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}n[2]=s}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}r=r.substring(n[0].length)}return o[t]=i}t.sprintf=n,t.vsprintf=r,"undefined"!=typeof window&&(window.sprintf=n,window.vsprintf=r)}()})),Es=Ds(console.error);function js(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Is.sprintf.apply(Is,[e].concat(n))}catch(t){return Es("sprintf error: \n\n"+t.toString()),e}}function Ls(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ks={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},Ts=["(","?"],Os={")":["("],":":["?","?:"]},Ps=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var Fs={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function Bs(e){var t=function(e){for(var t,n,r,i,o=[],a=[];t=e.match(Ps);){for(n=t[0],(r=e.substr(0,t.index).trim())&&o.push(r);i=a.pop();){if(Os[n]){if(Os[n][0]===i){n=Os[n][1]||n;break}}else if(Ts.indexOf(i)>=0||ks[i]<ks[n]){a.push(i);break}o.push(i)}Os[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&o.push(e),o.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,i,o,a,s,l=[];for(n=0;n<e.length;n++){if(a=e[n],o=Fs[a]){for(r=o.length,i=Array(r);r--;)i[r]=l.pop();try{s=o.apply(null,i)}catch(e){return e}}else s=t.hasOwnProperty(a)?t[a]:+a;l.push(s)}return l[0]}(t,e)}}var Ms={contextDelimiter:"",onMissingKey:null};function Ns(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},Ms)this.options[n]=void 0!==t&&n in t?t[n]:Ms[n]}function Rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rs(Object(n),!0).forEach((function(t){Ls(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ns.prototype.getPluralForm=function(e,t){var n,r,i,o=this.pluralForms[e];return o||("function"!=typeof(i=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(e){var t=Bs(e);return function(e){return+t({n:e})}}(r)),o=this.pluralForms[e]=i),o(t)},Ns.prototype.dcnpgettext=function(e,t,n,r,i){var o,a,s;return o=void 0===i?0:this.getPluralForm(e,i),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)};var Ws={"":{plural_forms:function(e){return 1===e?0:1}}},zs=function(e,t){var n=new Ns({}),r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[t]=Hs({},Ws,{},n.data[t],{},e),n.data[t][""]=Hs({},Ws[""],{},n.data[t][""])},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;return n.data[e]||r(void 0,e),n.dcnpgettext(e,t,i,o,a)},o=function(e,t,n){return i(n,t,e)};return e&&r(e,t),{setLocaleData:r,__:function(e,t){return i(t,void 0,e)},_x:o,_n:function(e,t,n,r){return i(r,void 0,e,t,n)},_nx:function(e,t,n,r,o){return i(o,r,e,t,n)},isRTL:function(){return"rtl"===o("ltr","text direction")}}}(),Us=(zs.setLocaleData.bind(zs),zs.__.bind(zs)),qs=zs._x.bind(zs),Vs=(zs._n.bind(zs),zs._nx.bind(zs));zs.isRTL.bind(zs);const Js=us({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._l(e.supportedPlugins,(function(t,r){return n("menu-button",{key:r,staticClass:"wptb-text-transform-cap",attrs:{disabled:e.busy},on:{click:function(t){return e.handleImportFromPlugin(r)}}},[e._v("\n "+e._s(e.importButtonText(t))+"\n ")])})),e._v(" "),n("div",{staticStyle:{display:"none"},attrs:{id:"wptb-importIframeSection"}}),e._v(" "),n("transition",{attrs:{name:"wptb-fade",mode:"out-in"}},[e.showImportedTables?n("div",{staticClass:"wptb-flex wptb-flex-align-center wptb-flex-col"},[n("div",{staticClass:"wptb-import-tables-wrapper"},e._l(e.importedTables,(function(t,r){return n("div",{key:r,staticClass:"wptb-import-tables-list"},[n("div",{staticClass:"wptb-import-table-count-info"},[e._v(e._s(e.importedTablesCountInfo(r)))]),e._v(" "),n("table",{staticClass:"wptb-import-table"},[n("thead",[n("tr",[n("th",[n("input",{attrs:{type:"checkbox"},on:{click:function(t){return e.selectAllCheckbox(r)}}})]),e._v(" "),n("th",{staticClass:"wptb-text-transform-cap"},[e._v("\n "+e._s(e.supportedPlugins[r])+"\n ")]),e._v(" "),n("th",{staticClass:"wptb-text-transform-cap"},[e._v("\n wp table builder\n ")])])]),e._v(" "),n("tbody",e._l(t,(function(t){return n("fragment",{key:t[0]},[n("tr",[n("td",[n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedReplaceRows,expression:"selectedReplaceRows"}],attrs:{type:"checkbox"},domProps:{value:t,checked:Array.isArray(e.selectedReplaceRows)?e._i(e.selectedReplaceRows,t)>-1:e.selectedReplaceRows},on:{change:function(n){var r=e.selectedReplaceRows,i=n.target,o=!!i.checked;if(Array.isArray(r)){var a=t,s=e._i(r,a);i.checked?s<0&&(e.selectedReplaceRows=r.concat([a])):s>-1&&(e.selectedReplaceRows=r.slice(0,s).concat(r.slice(s+1)))}else e.selectedReplaceRows=o}}})]),e._v(" "),n("td",[e._v("\n "+e._s(t[0])+"\n ")]),e._v(" "),n("td",[e._v("\n "+e._s(t[1])+"\n ")])])])})),1)])])})),0),e._v(" "),n("menu-button",{staticClass:"wptb-text-transform-cap",attrs:{disabled:0===e.selectedReplaceRows.length,size:"small"},on:{click:e.replaceShortcodes}},[e._v("\n "+e._s(e.__("replace short codes",e.options.textDomain))+"\n ")])],1):e._e()]),e._v(" "),e._m(0)],2)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"wptb-importPBarContainer",staticStyle:{visibility:"hidden"}},[t("div",{staticClass:"wptb-importPBarProgress"},[t("div",{staticClass:"wptb-nameProcessInBarProgress"}),this._v(" "),t("div",{attrs:{id:"wptb-pBarPercent"}},[t("span",[this._v("0%")])])])])}]},void 0,{props:["options"],components:{MenuButton:gs,Fragment:As},data:function(){return{supportedPlugins:{"table-press":"TablePress"},fetching:!1,busy:!1,importedTables:{},selectedReplaceRows:[]}},watch:{fetching:function(e){this.$emit("fetching",e)}},mounted:function(){var e=this;document.addEventListener("table:imported:saved",(function(t){var n=t.detail;e.$emit("messageUp",{type:"ok",body:e.isDocumentEventPoorlyImplemented(n)?e.strings.operationSuccess:n}),e.setBusy(!1)})),document.addEventListener("table:imported:error",(function(t){var n=t.detail;e.$emit("messageUp",{type:"error",body:e.isDocumentEventPoorlyImplemented(n)?e.strings.errorOccured:n}),e.setBusy(!1)})),document.addEventListener("table:imported:list",(function(t){var n=t.detail;e.setBusy(!1),e.importedTables=n})),document.addEventListener("table:shortcode:replace",(function(t){var n=t.detail;e.$emit("messageUp",{type:"ok",body:"".concat(e.strings.replacedShortcodes,": ").concat(!0===n?0:n)}),e.setBusy(!1)}))},methods:{isDocumentEventPoorlyImplemented:function(e){return"boolean"==typeof e},handleImportFromPlugin:function(e){var t=_s(n({},this.options,{type:e}));this.setBusy(),t.importFromPlugin(e)},setBusy:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.busy=e,this.fetching=e},selectAllCheckbox:function(e){this.selectedReplaceRows===this.importedTables[e]?this.selectedReplaceRows=[]:this.selectedReplaceRows=this.importedTables[e]},replaceShortcodes:function(){if(0!==this.selectedReplaceRows.length){var e=this.selectedReplaceRows.map((function(e){return{search:e[0],replace:e[1]}})),t=_s(this.options);this.setBusy(),t.replaceShortcodesAjax(e,!0)}},importButtonText:function(e){return js(qs("import from %s","%s is a format variable for a name of WordPress plugin",this.options.textDomain),e)},importedTablesCountInfo:function(e){return js(Vs("%u table imported","%u tables imported","number of tables imported",this.options.textDomain),this.importedTables[e].length)},__:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.textDomain;return Us(e,t)}},computed:{showImportedTables:function(){var e=this,t=Object.keys(this.importedTables).map((function(t){if(Object.prototype.hasOwnProperty.call(e.importedTables,t))return t}));return!!Array.isArray(t)&&t.length>0}}},void 0,!1,void 0,!1,void 0,void 0,void 0);const Gs=us({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wptb-settings-wrapper"},[n("menu-header",{attrs:{"logo-src":e.pluginInfo.logo,"logo-alt":e.strings.logoAlt,"plugin-name":e.pluginInfo.pluginName}},[n("a",{attrs:{href:e.pluginInfo.pluginHomepage}},[e._v(e._s(e.strings.homepage))])]),e._v(" "),n("sections",[n("section-item",{attrs:{name:e.strings.importSection}})],1),e._v(" "),n("div",{staticClass:"wptb-menu-overflow-auto",staticStyle:{"margin-top":"-10px"}},[n("sections",{staticStyle:{"margin-top":"0 !important"},attrs:{child:!0}},[n("section-item",{attrs:{current:e.currentSection,name:"csv"},on:{sectionchange:e.setSection}}),e._v(" "),n("section-item",{attrs:{current:e.currentSection,name:e.strings.plugins},on:{sectionchange:e.setSection}})],1),e._v(" "),n("menu-content",{attrs:{center:!0}},[n("transition",{attrs:{name:"wptb-fade",mode:"out-in"}},[n(e.currentTemplate,{tag:"component",staticClass:"wptb-flex wptb-flex-col wptb-flex-align-center",attrs:{options:e.options},on:{messageUp:e.setMessage,fetching:e.handleFetch}})],1)],1)],1),e._v(" "),n("menu-footer",{attrs:{"message-busy":e.message.busy,"message-body":e.message.body,"message-show":e.message.show,"message-type":e.message.type}},[n("menu-button",{staticStyle:{visibility:"hidden"}},[e._v("dummy")]),e._v(" "),n("portal-target",{attrs:{name:"footerButtons"}})],1)],1)},staticRenderFns:[]},void 0,{props:["pluginInfo","options"],components:{MenuHeader:ds,Sections:ps,SectionItem:fs,MenuContent:vs,MenuFooter:ms,MenuButton:gs},data:function(){return{currentSection:"csv",message:{show:!1,busy:!1,body:"",type:"ok",intId:-1}}},methods:{setSection:function(e){this.currentSection!==e&&(this.currentSection=e)},setMessage:function(e){var t=this;this.message.body=e.body,this.message.type=e.type,this.message.show=!0,clearInterval(this.message.intId),this.message.intId=setInterval((function(){t.message.show=!1}),5e3)},handleFetch:function(e){this.message.busy=e}},computed:{currentTemplate:function(){return"csv"===this.currentSection?ws:Js}}},void 0,!1,void 0,!1,void 0,void 0,void 0);var Ks={install:function(e,t){e.mixin({data:function(){return{strings:t.strings}}})}},Xs=n({},wptbImportMenuData);wptbImportMenuData=void 0,An.config.productionTip=!1,An.use(Ks,{strings:Xs.strings}),An.use(cs),new An({components:{ImportApp:Gs},data:{pluginInfo:Xs.pluginInfo,options:Xs.options}}).$mount("#wptb-import-menu")}();
inc/admin/js/admin.js CHANGED
@@ -351,6 +351,9 @@ var WPTB_ActionsField = function WPTB_ActionsField() {
351
  http.send(null);
352
  } else {
353
  document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';
 
 
 
354
  }
355
  document.counter = new ElementCounters();
356
  document.select = new MultipleSelect();
@@ -359,7 +362,12 @@ var WPTB_ActionsField = function WPTB_ActionsField() {
359
  settings = WPTB_Settings();
360
  };
361
 
362
- document.addEventListener('DOMContentLoaded', WPTB_Builder);
 
 
 
 
 
363
  })();
364
  var WPTB_Cell = function WPTB_Cell(callback, DOMElement) {
365
 
@@ -789,7 +797,7 @@ var WPTB_ElementObject = function WPTB_ElementObject(data) {
789
  copy = void 0;
790
  if (!data.elemProt) {
791
  DOMElement = document.createElement('div'), kindIndexProt = undefined, copy = false;
792
- DOMElement.classList.add('wptb-' + data.kind + '-container', 'wptb-ph-element', 'wptb-item-javascript-indic');
793
 
794
  var wpTemplateId = 'wptb-' + data.kind + '-content';
795
  var template = wp.template(wpTemplateId);
@@ -857,9 +865,23 @@ var WPTB_Helper = {
857
  return result ? 'rgb(' + parseInt(result[1], 16) + ',' + parseInt(result[2], 16) + ',' + parseInt(result[3], 16) + ')' : null;
858
  },
859
  rgbToHex: function rgbToHex(rgb) {
860
- var rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
 
861
 
862
- return rgb && rgb.length === 4 ? "#" + ("0" + parseInt(rgb[1], 10).toString(16)).slice(-2) + ("0" + parseInt(rgb[2], 10).toString(16)).slice(-2) + ("0" + parseInt(rgb[3], 10).toString(16)).slice(-2) : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
863
  },
864
  isHex: function isHex(hex) {
865
  var regex = new RegExp('^#(?:[A-Fa-f0-9]{3}){1,2}$');
@@ -2135,7 +2157,10 @@ var WPTB_Helper = {
2135
  WPTB_Helper.elementOptionsSet('table_setting', element);
2136
  }
2137
  },
2138
- // function for sending of element ajax request
 
 
 
2139
  elementAjax: function elementAjax(dataAjaxData, element) {
2140
  var http = new XMLHttpRequest(),
2141
  url = (wptb_admin_object ? wptb_admin_object.ajaxurl : ajaxurl) + "?action=wptb_element_ajax";
@@ -2174,7 +2199,6 @@ var WPTB_Helper = {
2174
  * This just toggles visibility of cell edit bar, and toggles
2175
  * cell selecting mode.
2176
  */
2177
-
2178
  toggleTableEditMode: function toggleTableEditMode() {
2179
  var close = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2180
 
@@ -2211,6 +2235,252 @@ var WPTB_Helper = {
2211
  }
2212
  }
2213
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2214
  }
2215
  };
2216
  var WPTB_Initializer = function WPTB_Initializer() {
@@ -2251,13 +2521,11 @@ var WPTB_Initializer = function WPTB_Initializer() {
2251
  var columns = document.getElementById('wptb-columns-number').value,
2252
  rows = document.getElementById('wptb-rows-number').value;
2253
 
2254
- var wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
2255
  //wptbTableStateSaveManager.tableStateClear();
2256
 
2257
- wptbTableStateSaveManager.tableStateSet(true);
2258
-
2259
  WPTB_Table(columns, rows);
2260
 
 
2261
  wptbTableStateSaveManager.tableStateSet();
2262
  };
2263
  };
@@ -2367,11 +2635,26 @@ var WPTB_LeftPanel = function WPTB_LeftPanel() {
2367
  // }
2368
  // }
2369
  } else if (inputs.hasOwnProperty('makeTableResponsive')) {
2370
- // if( inputs.makeTableResponsive == 'checked' ) {
2371
- // table.dataset.wptbAdaptiveTable = 1;
2372
- // } else if( inputs.makeTableResponsive == 'unchecked' ) {
2373
- // table.dataset.wptbAdaptiveTable = 0;
2374
- // }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2375
  } else if (inputs.hasOwnProperty('applyTableContainerMaxWidth')) {
2376
  var wptbTableSetup = document.querySelector('.wptb-table-setup');
2377
  if (inputs.applyTableContainerMaxWidth == 'checked') {
@@ -2423,8 +2706,10 @@ var WPTB_LeftPanel = function WPTB_LeftPanel() {
2423
  };
2424
 
2425
  if (table) {
2426
- document.getElementById('wptb-table-edit-mode-close').onclick = WPTB_Helper.toggleTableEditMode;
2427
- document.getElementById('wptb-left-scroll-panel-curtain-close').onclick = WPTB_Helper.toggleTableEditMode;
 
 
2428
  document.getElementById('wptb-add-end-row').onclick = table.addRowToTheEnd;
2429
  document.getElementById('wptb-add-start-row').onclick = table.addRowToTheStart;
2430
  document.getElementById('wptb-add-row-before').onclick = table.addRowBefore;
@@ -2695,13 +2980,20 @@ var WPTB_Settings = function WPTB_Settings() {
2695
  WPTB_Helper.saveTable(event);
2696
  }
2697
  };
 
 
 
 
 
 
 
 
2698
  };
2699
  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
2700
 
2701
  var WPTB_Stringifier = function WPTB_Stringifier(codeMain) {
2702
  if (codeMain) {
2703
  var code = codeMain.cloneNode(true);
2704
- code.classList.add('wptb-table-preview-static-indic');
2705
  code.dataset.tableColumns = codeMain.columns;
2706
  code.style.width = null;
2707
  code.style.minWidth = null;
@@ -2804,7 +3096,7 @@ var WPTB_Stringifier = function WPTB_Stringifier(codeMain) {
2804
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2805
 
2806
  var array = [],
2807
- WPTB_Table = function WPTB_Table(columns, rows) {
2808
 
2809
  /* The members of the class */
2810
  var settings = document.getElementsByClassName('wptb-settings-items'),
@@ -3199,7 +3491,7 @@ var array = [],
3199
  table.classList.add('wptb-preview-table', 'wptb-element-main-table_setting-startedid-0');
3200
  table.style.border = '0px solid';
3201
  table.dataset.reconstraction = 1;
3202
- table.dataset.wptbAdaptiveTable = 1;
3203
  //Add the data rows.
3204
  for (var i = 0; i < rows; i++) {
3205
 
@@ -3214,10 +3506,10 @@ var array = [],
3214
  }
3215
  }
3216
  } else {
3217
- var wptb_preview_table = document.getElementsByClassName('wptb-preview-table');
3218
 
3219
- if (wptb_preview_table.length > 0) {
3220
- table = wptb_preview_table[0];
3221
 
3222
  var cells = table.getElementsByTagName('td');
3223
 
@@ -3236,95 +3528,15 @@ var array = [],
3236
  * these are the column number and row number of cell in table.
3237
  */
3238
 
3239
- table.recalculateIndexes = function (start) {
3240
- var trs = this.getElementsByTagName('tr'),
3241
- tds = void 0,
3242
- maxCols = 0,
3243
- maxColsFull = 0,
3244
- tdsArr = [];
3245
- //let wptbTopRowAsHeader = document.getElementById( 'wptb-top-row-as-header' );
3246
-
3247
- for (var i = 0; i < trs.length; i++) {
3248
- if (i == 0) {
3249
- // if( wptbTopRowAsHeader.checked ) {
3250
- // if( start == undefined ) {
3251
- // this.classList.add( 'wptb-table-preview-head' );
3252
- // trs[i].classList.add( 'wptb-table-head' )
3253
- // } ;
3254
- // } else {
3255
- // if( start == undefined ) {
3256
- // this.classList.remove( 'wptb-table-preview-head' );
3257
- // trs[i].classList.remove( 'wptb-table-head' );
3258
- // }
3259
- // }
3260
- } else {
3261
- // if (i % 2 == 0) {
3262
- // trs[i].classList.remove( 'wptb-table-head' );
3263
- // } else {
3264
- // trs[i].classList.remove( 'wptb-table-head' );
3265
- // }
3266
- }
3267
-
3268
- tdsArr[i];
3269
- tds = trs[i].getElementsByTagName('td');
3270
-
3271
- if (tdsArr[i] == undefined) {
3272
- tdsArr[i] = [];
3273
- }
3274
-
3275
- var jMainIter = 0;
3276
- for (var j = 0; j < tds.length; j++) {
3277
- if (tdsArr[i][j] != undefined) {
3278
- for (var y = 0; y < 100; y++) {
3279
- if (tdsArr[i][jMainIter] != undefined) {
3280
- jMainIter++;
3281
- continue;
3282
- }
3283
- tdsArr[i][jMainIter] = tds[j];
3284
- tds[j].dataset.xIndex = jMainIter;
3285
- break;
3286
- }
3287
- } else {
3288
- tdsArr[i][j] = tds[j];
3289
- tds[j].dataset.xIndex = jMainIter;
3290
- }
3291
- tds[j].dataset.yIndex = i;
3292
-
3293
- if (tds[j].colSpan > 1) {
3294
- for (var _k2 = 1; _k2 < tds[j].colSpan; _k2++) {
3295
- jMainIter++;
3296
- tdsArr[i][jMainIter] = 'tdDummy';
3297
- }
3298
- }
3299
-
3300
- if (tds[j].rowSpan > 1) {
3301
- for (var x = 1; x < tds[j].rowSpan; x++) {
3302
- if (tdsArr[i + x] == undefined) {
3303
- tdsArr[i + x] = [];
3304
- }
3305
- for (var z = 0; z < tds[j].colSpan; z++) {
3306
- tdsArr[i + x][jMainIter - tds[j].colSpan + 1 + z] = 'tdDummy';
3307
- }
3308
- }
3309
- }
3310
- jMainIter++;
3311
- if (i == 0) {
3312
- maxColsFull = jMainIter;
3313
- }
3314
- }
3315
- if (j > maxCols) {
3316
- maxCols = j;
3317
- }
3318
- }
3319
- this.columns = maxCols;
3320
- this.maxCols = maxColsFull;
3321
  };
3322
 
3323
  table.addColumnWidth = function (value, cleaner) {
3324
  var highlighted = table.getElementsByClassName('wptb-highlighted');
3325
  if (highlighted.length > 0) {
3326
- for (var _k3 = 0; _k3 < highlighted.length; _k3++) {
3327
- var dataXIndex = highlighted[_k3].dataset.xIndex;
3328
  if (dataXIndex) {
3329
  (function () {
3330
  var tableTdsFor = function tableTdsFor(dataXIndex, colspan) {
@@ -3580,8 +3792,8 @@ var array = [],
3580
  table.addRowHeight = function (value, cleaner) {
3581
  var highlighted = table.getElementsByClassName('wptb-highlighted');
3582
  if (highlighted.length > 0) {
3583
- for (var _k4 = 0; _k4 < highlighted.length; _k4++) {
3584
- var dataYIndex = highlighted[_k4].dataset.yIndex;
3585
  if (dataYIndex) {
3586
  (function () {
3587
  var tableTdsFor = function tableTdsFor(dataYIndex, rowspan) {
@@ -3899,6 +4111,7 @@ var array = [],
3899
  array.push(aux);
3900
  drawTable(array);
3901
  table.recalculateIndexes();
 
3902
  table.addColumnWidth();
3903
  WPTB_Helper.dataTitleColumnSet(table);
3904
  undoSelect();
@@ -3939,6 +4152,7 @@ var array = [],
3939
  array.push(aux);
3940
  drawTable(array);
3941
  table.recalculateIndexes();
 
3942
  table.addColumnWidth();
3943
  WPTB_Helper.dataTitleColumnSet(table);
3944
  undoSelect();
@@ -4048,6 +4262,7 @@ var array = [],
4048
  array.push(aux);
4049
  drawTable(array);
4050
  table.recalculateIndexes();
 
4051
  table.addColumnWidth();
4052
  WPTB_Helper.dataTitleColumnSet(table);
4053
  undoSelect();
@@ -4223,9 +4438,9 @@ var array = [],
4223
  rowChildrenLength = rowChildren.length;
4224
 
4225
  if (rowChildrenLength > 0) {
4226
- for (var _k5 = 0; _k5 < rowChildrenLength; _k5++) {
4227
- if (Number(rowChildren[_k5].dataset.xIndex) > Number(cellXIndex)) {
4228
- rowChildInsertBefore = rowChildren[_k5];
4229
  break;
4230
  }
4231
  }
@@ -4352,9 +4567,9 @@ var array = [],
4352
  td.getDOMElement().rowSpan = thisRowChildren[_j8].rowSpan - 1;
4353
 
4354
  var nextRowChildrenK = undefined;
4355
- for (var _k6 = 0; _k6 < nextRowChildrenLength; _k6++) {
4356
- if (Number(nextRowChildren[_k6].dataset.xIndex) > Number(thisRowChildren[_j8].dataset.xIndex)) {
4357
- nextRowChildrenK = nextRowChildren[_k6];
4358
  break;
4359
  }
4360
  }
@@ -4368,11 +4583,11 @@ var array = [],
4368
  }
4369
 
4370
  if (tdArr.length > 0) {
4371
- for (var _k7 = 0; _k7 < tdArr.length; _k7++) {
4372
- if (tdArr[_k7][1] != undefined) {
4373
- nextRow.insertBefore(tdArr[_k7][0].getDOMElement(), tdArr[_k7][1]);
4374
  } else {
4375
- nextRow.appendChild(tdArr[_k7][0].getDOMElement());
4376
  }
4377
  }
4378
  }
@@ -4408,6 +4623,7 @@ var array = [],
4408
  }
4409
  } else {
4410
  table.recalculateIndexes();
 
4411
  WPTB_Helper.dataTitleColumnSet(table);
4412
  }
4413
  }
@@ -4433,17 +4649,17 @@ var array = [],
4433
  var rowChildren = table.rows[_j10].children;
4434
  var rowChildrenLength = rowChildren.length;
4435
  if (rowChildrenLength > 0) {
4436
- for (var _k8 = rowChildrenLength - 1; _k8 >= 0; _k8--) {
4437
- if (Number(rowChildren[_k8].dataset.xIndex) == Number(cellXIndex)) {
4438
- if (rowChildren[_k8].colSpan > 1) {
4439
- rowChildren[_k8].colSpan--;
4440
  } else {
4441
- table.rows[_j10].removeChild(rowChildren[_k8]);
4442
  }
4443
  break;
4444
- } else if (Number(rowChildren[_k8].dataset.xIndex) < Number(cellXIndex) && Number(rowChildren[_k8].dataset.xIndex) + Number(rowChildren[_k8].colSpan - 1) >= cellXIndex) {
4445
- if (rowChildren[_k8].colSpan > 1) {
4446
- rowChildren[_k8].colSpan--;
4447
  }
4448
  break;
4449
  }
@@ -4542,12 +4758,15 @@ var WPTB_TableStateSaveManager = function WPTB_TableStateSaveManager() {
4542
  return;
4543
  }
4544
 
4545
- // get preview table
4546
- var wptbPreviewTable = document.getElementsByClassName('wptb-preview-table');
4547
- if (wptbPreviewTable.length > 0) {
4548
- wptbPreviewTable = wptbPreviewTable[0];
 
 
 
4549
  } else {
4550
- wptbPreviewTable = '';
4551
  }
4552
 
4553
  // check if a global array doesn't exist with saved versions of the table
@@ -4563,30 +4782,30 @@ var WPTB_TableStateSaveManager = function WPTB_TableStateSaveManager() {
4563
  }
4564
 
4565
  //add new state of table
4566
- var wptbNewPreviewTable = '';
4567
- if (wptbPreviewTable) {
4568
- wptbNewPreviewTable = wptbPreviewTable.cloneNode(true);
4569
- var wptbHighlighted = wptbNewPreviewTable.getElementsByClassName('wptb-highlighted');
4570
  for (var i = 0; i < wptbHighlighted.length; i++) {
4571
  wptbHighlighted[i].classList.remove('wptb-highlighted');
4572
  }
4573
- var wptbDirectlyhovered = wptbNewPreviewTable.getElementsByClassName('wptb-directlyhovered');
4574
  for (var _i = 0; _i < wptbDirectlyhovered.length; _i++) {
4575
  wptbDirectlyhovered[_i].classList.remove('wptb-directlyhovered');
4576
  }
4577
- var mceContentBodys = wptbNewPreviewTable.querySelectorAll('.mce-content-body');
4578
  if (mceContentBodys.length > 0) {
4579
  for (var k = 0; k < mceContentBodys.length; k++) {
4580
  mceContentBodys[k].classList.remove('mce-content-body');
4581
  }
4582
  }
4583
- var dataMceStyle = wptbNewPreviewTable.querySelectorAll('[data-mce-style]');
4584
  if (dataMceStyle.length > 0) {
4585
  for (var _k = 0; _k < dataMceStyle.length; _k++) {
4586
  dataMceStyle[_k].removeAttribute('data-mce-style');
4587
  }
4588
  }
4589
- var mceIds = wptbNewPreviewTable.querySelectorAll('[id^=mce_]');
4590
  if (mceIds.length > 0) {
4591
  for (var _k2 = 0; _k2 < mceIds.length; _k2++) {
4592
  mceIds[_k2].removeAttribute('id');
@@ -4603,7 +4822,11 @@ var WPTB_TableStateSaveManager = function WPTB_TableStateSaveManager() {
4603
  }
4604
  }
4605
 
4606
- window.wptbTableStateSaving.push([wptbNewPreviewTable, cssForTdsWidthAutoValue]);
 
 
 
 
4607
 
4608
  // set new number of state which is showed now
4609
  window.wptbTableStateNumberShow = window.wptbTableStateSaving.length - 1;
@@ -4703,23 +4926,23 @@ var WPTB_TableStateSaveManager = function WPTB_TableStateSaveManager() {
4703
  if (wptbTableSetup.length > 0) {
4704
  wptbTableSetup = wptbTableSetup[0];
4705
 
4706
- wptbTableSetup.innerHTML = '';
4707
  if (window.wptbTableStateSaving[window.wptbTableStateNumberShow]) {
4708
  if (window.wptbTableStateSaving[window.wptbTableStateNumberShow][0] && _typeof(window.wptbTableStateSaving[window.wptbTableStateNumberShow][0]) === 'object') {
4709
  if ('outerHTML' in window.wptbTableStateSaving[window.wptbTableStateNumberShow][0]) {
4710
- wptbTableSetup.innerHTML = window.wptbTableStateSaving[window.wptbTableStateNumberShow][0].outerHTML;
4711
  }
4712
  }
4713
 
4714
- if (!wptbTableSetup.innerHTML) {
 
4715
  document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';
4716
  wptbSaveBtn.classList.add('wptb-save-disabled');
4717
  } else {
4718
  document.getElementsByClassName('wptb-table-generator')[0].style.display = 'none';
4719
  }
4720
- }
4721
- // add or change or delete style element in the head for table cells who have auto width
4722
- if (window.wptbTableStateSaving[window.wptbTableStateNumberShow]) {
4723
  var head = document.head;
4724
  if (head) {
4725
  var cssForTdsWidthAutoOld = head.querySelector('style[data-wptb-td-auto-width="true"]');
@@ -4734,6 +4957,12 @@ var WPTB_TableStateSaveManager = function WPTB_TableStateSaveManager() {
4734
  head.appendChild(cssForTdsWidthAuto);
4735
  }
4736
  }
 
 
 
 
 
 
4737
  }
4738
 
4739
  var body = document.getElementsByTagName('body');
@@ -4886,7 +5115,7 @@ var applyGenericItemSettings = function applyGenericItemSettings(element, kindIn
4886
  copy;
4887
  if (node.classList.contains('wptb-ph-element')) {
4888
  if (kindIndexProt == undefined || copy == true) {
4889
- index = document.counter.nextIndex(element.kind);
4890
  var wptbElements = document.getElementsByClassName('wptb-ph-element');
4891
  var elementIndexesArr = [];
4892
  for (var i = 0; i < wptbElements.length; i++) {
351
  http.send(null);
352
  } else {
353
  document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';
354
+
355
+ var wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
356
+ wptbTableStateSaveManager.tableStateSet();
357
  }
358
  document.counter = new ElementCounters();
359
  document.select = new MultipleSelect();
362
  settings = WPTB_Settings();
363
  };
364
 
365
+ var url = window.location.href,
366
+ regex = new RegExp('[?&]page=wptb-builder'),
367
+ results = regex.exec(url);
368
+ if (results) {
369
+ document.addEventListener('DOMContentLoaded', WPTB_Builder);
370
+ }
371
  })();
372
  var WPTB_Cell = function WPTB_Cell(callback, DOMElement) {
373
 
797
  copy = void 0;
798
  if (!data.elemProt) {
799
  DOMElement = document.createElement('div'), kindIndexProt = undefined, copy = false;
800
+ DOMElement.classList.add('wptb-' + data.kind + '-container', 'wptb-ph-element');
801
 
802
  var wpTemplateId = 'wptb-' + data.kind + '-content';
803
  var template = wp.template(wpTemplateId);
865
  return result ? 'rgb(' + parseInt(result[1], 16) + ',' + parseInt(result[2], 16) + ',' + parseInt(result[3], 16) + ')' : null;
866
  },
867
  rgbToHex: function rgbToHex(rgb) {
868
+ if (rgb) {
869
+ if (WPTB_Helper.isHex(rgb)) return rgb;
870
 
871
+ var rgbm = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?((?:[0-9]*[.])?[0-9]+)[\s+]?\)/i);
872
+ if (rgbm && rgbm.length === 5) {
873
+ return "#" + ('0' + Math.round(parseFloat(rgbm[4], 10) * 255).toString(16).toUpperCase()).slice(-2) + ("0" + parseInt(rgbm[1], 10).toString(16).toUpperCase()).slice(-2) + ("0" + parseInt(rgbm[2], 10).toString(16).toUpperCase()).slice(-2) + ("0" + parseInt(rgbm[3], 10).toString(16).toUpperCase()).slice(-2);
874
+ } else {
875
+ rgbm = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
876
+ if (rgbm && rgbm.length === 4) {
877
+ return "#" + ("0" + parseInt(rgbm[1], 10).toString(16).toUpperCase()).slice(-2) + ("0" + parseInt(rgbm[2], 10).toString(16).toUpperCase()).slice(-2) + ("0" + parseInt(rgbm[3], 10).toString(16).toUpperCase()).slice(-2);
878
+ } else {
879
+ return '';
880
+ }
881
+ }
882
+ } else {
883
+ return '';
884
+ }
885
  },
886
  isHex: function isHex(hex) {
887
  var regex = new RegExp('^#(?:[A-Fa-f0-9]{3}){1,2}$');
2157
  WPTB_Helper.elementOptionsSet('table_setting', element);
2158
  }
2159
  },
2160
+
2161
+ /*
2162
+ * function for sending of element ajax request
2163
+ */
2164
  elementAjax: function elementAjax(dataAjaxData, element) {
2165
  var http = new XMLHttpRequest(),
2166
  url = (wptb_admin_object ? wptb_admin_object.ajaxurl : ajaxurl) + "?action=wptb_element_ajax";
2199
  * This just toggles visibility of cell edit bar, and toggles
2200
  * cell selecting mode.
2201
  */
 
2202
  toggleTableEditMode: function toggleTableEditMode() {
2203
  var close = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2204
 
2235
  }
2236
  }
2237
  }
2238
+ },
2239
+
2240
+ /*
2241
+ * checking of dimension of value
2242
+ */
2243
+ checkingDimensionValue: function checkingDimensionValue(value, dimension) {
2244
+ value = String(value);
2245
+ dimension = String(dimension);
2246
+ if (value && dimension) {
2247
+ var searchIndex = value.indexOf(dimension);
2248
+ if (searchIndex != -1 && searchIndex == value.length - dimension.length) {
2249
+ return true;
2250
+ } else {
2251
+ return false;
2252
+ }
2253
+ } else {
2254
+ return false;
2255
+ }
2256
+ },
2257
+
2258
+ /*
2259
+ * if dimension is included - checking and if it necessary setting value
2260
+ * without dimension - return value
2261
+ */
2262
+ checkSetGetStyleSizeValue: function checkSetGetStyleSizeValue(element, styleName, computedStyleName, dimension) {
2263
+ var elemStyleValue = element.style[styleName];
2264
+ elemStyleValue = String(elemStyleValue);
2265
+
2266
+ if (!elemStyleValue || dimension ? !WPTB_Helper.checkingDimensionValue(elemStyleValue, dimension) : false) {
2267
+ var elementStyles = window.getComputedStyle(element);
2268
+ if (computedStyleName && elementStyles.getPropertyValue(computedStyleName) && dimension ? WPTB_Helper.checkingDimensionValue(elementStyles.getPropertyValue(computedStyleName), dimension) : true) {
2269
+ if (!dimension) {
2270
+ return elementStyles.getPropertyValue(computedStyleName);
2271
+ } else {
2272
+ element.style[styleName] = elementStyles.getPropertyValue(computedStyleName);
2273
+ }
2274
+ } else {
2275
+ if (!dimension) {
2276
+ return false;
2277
+ } else {
2278
+ element.style[styleName] = null;
2279
+ }
2280
+ }
2281
+ } else if (!dimension) {
2282
+ return elemStyleValue;
2283
+ }
2284
+
2285
+ return element.style[styleName];
2286
+ },
2287
+
2288
+ /*
2289
+ * function checking that element has the style
2290
+ * if this style is present - checking the format color
2291
+ * if param set is true - setting style for element (consider hex format of color)
2292
+ * if param set is false - getting style from element
2293
+ */
2294
+ checkSetGetStyleColorValue: function checkSetGetStyleColorValue(element, styleName, computedStyleName) {
2295
+ var set = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
2296
+
2297
+ var elemStyleColorValue = element.style[styleName];
2298
+
2299
+ if (!elemStyleColorValue) {
2300
+ var elementStyles = window.getComputedStyle(element, null);
2301
+
2302
+ if (elementStyles && elementStyles.getPropertyValue(computedStyleName)) {
2303
+
2304
+ if (set) {
2305
+ elemStyleColorValue = WPTB_Helper.rgbToHex(elementStyles.getPropertyValue(computedStyleName));
2306
+ if (WPTB_Helper.isHex(elemStyleColorValue)) {
2307
+ element.style[styleName] = elemStyleColorValue;
2308
+ } else {
2309
+ element.style[styleName] = '';
2310
+ }
2311
+ } else {
2312
+ return elementStyles.getPropertyValue(computedStyleName);
2313
+ }
2314
+ } else {
2315
+ if (set) {
2316
+ element.style[styleName] = '';
2317
+ } else {
2318
+ return '';
2319
+ }
2320
+ }
2321
+ } else if (!set) {
2322
+ return elemStyleColorValue;
2323
+ }
2324
+ },
2325
+
2326
+ /*
2327
+ * function checking that element has the style
2328
+ * if this style is present - checking the format color
2329
+ * if param set is true - setting style for element (consider hex format of color)
2330
+ * if param set is false - getting style from element
2331
+ */
2332
+ checkSetGetStyleValue: function checkSetGetStyleValue(element, styleName, computedStyleName) {
2333
+ var set = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
2334
+
2335
+ var elemStyleColorValue = element.style[styleName];
2336
+
2337
+ if (!elemStyleColorValue) {
2338
+ var elementStyles = window.getComputedStyle(element, null);
2339
+
2340
+ if (elementStyles && elementStyles.getPropertyValue(computedStyleName)) {
2341
+
2342
+ if (set) {
2343
+ element.style[styleName] = elementStyles.getPropertyValue(computedStyleName);
2344
+ } else {
2345
+ return elementStyles.getPropertyValue(computedStyleName);
2346
+ }
2347
+ } else if (!set) {
2348
+ return '';
2349
+ }
2350
+ } else if (!set) {
2351
+ return elemStyleColorValue;
2352
+ }
2353
+ },
2354
+
2355
+ /*
2356
+ * get the value of the same elements that have the most count
2357
+ */
2358
+ getValueMaxCountSameElementsInArray: function getValueMaxCountSameElementsInArray(arr) {
2359
+ if (arr && Array.isArray(arr)) {
2360
+ var check = {};
2361
+ for (var i = 0; i < arr.length; i++) {
2362
+ if (check[arr[i]]) {
2363
+ check[arr[i]]++;
2364
+ } else {
2365
+ check[arr[i]] = 1;
2366
+ }
2367
+ }
2368
+
2369
+ var maxPropName = void 0;
2370
+ for (var key in check) {
2371
+ if (!maxPropName) {
2372
+ maxPropName = key;
2373
+ continue;
2374
+ } else {
2375
+ if (check[maxPropName] < check[key]) {
2376
+ maxPropName = key;
2377
+ }
2378
+ }
2379
+ }
2380
+
2381
+ return maxPropName;
2382
+ }
2383
+ },
2384
+
2385
+ /*
2386
+ * For assigning to each cell xIndex and y Index attributes,
2387
+ * these are the column number and row number of cell in table.
2388
+ */
2389
+ recalculateIndexes: function recalculateIndexes(table) {
2390
+ var trs = table.getElementsByTagName('tr'),
2391
+ tds = void 0,
2392
+ maxCols = 0,
2393
+ maxColsFull = 0,
2394
+ tdsArr = [];
2395
+
2396
+ for (var i = 0; i < trs.length; i++) {
2397
+ tds = trs[i].getElementsByTagName('td');
2398
+
2399
+ if (tdsArr[i] == undefined) {
2400
+ tdsArr[i] = [];
2401
+ }
2402
+
2403
+ var jMainIter = 0;
2404
+ for (var j = 0; j < tds.length; j++) {
2405
+ if (tdsArr[i][j] != undefined) {
2406
+ for (var y = 0; y < 100; y++) {
2407
+ if (tdsArr[i][jMainIter] != undefined) {
2408
+ jMainIter++;
2409
+ continue;
2410
+ }
2411
+ tdsArr[i][jMainIter] = tds[j];
2412
+ tds[j].dataset.xIndex = jMainIter;
2413
+ break;
2414
+ }
2415
+ } else {
2416
+ tdsArr[i][j] = tds[j];
2417
+ tds[j].dataset.xIndex = jMainIter;
2418
+ }
2419
+ tds[j].dataset.yIndex = i;
2420
+
2421
+ if (tds[j].colSpan > 1) {
2422
+ for (var k = 1; k < tds[j].colSpan; k++) {
2423
+ jMainIter++;
2424
+ tdsArr[i][jMainIter] = 'tdDummy';
2425
+ }
2426
+ }
2427
+
2428
+ if (tds[j].rowSpan > 1) {
2429
+ for (var x = 1; x < tds[j].rowSpan; x++) {
2430
+ if (tdsArr[i + x] == undefined) {
2431
+ tdsArr[i + x] = [];
2432
+ }
2433
+ for (var z = 0; z < tds[j].colSpan; z++) {
2434
+ tdsArr[i + x][jMainIter - tds[j].colSpan + 1 + z] = 'tdDummy';
2435
+ }
2436
+ }
2437
+ }
2438
+ jMainIter++;
2439
+
2440
+ if (j > maxCols) {
2441
+ maxCols = j;
2442
+ }
2443
+ }
2444
+
2445
+ if (i == 0) {
2446
+ maxColsFull = jMainIter;
2447
+ }
2448
+ }
2449
+ table.columns = maxCols;
2450
+ table.maxCols = maxColsFull;
2451
+ },
2452
+
2453
+ /**
2454
+ * Table Rows colors reinstall
2455
+ */
2456
+ tableRowsColorsReinstall: function tableRowsColorsReinstall(table) {
2457
+ var infArr = table.className.match(/wptb-element-main(.+)-(\d+)/i);
2458
+ if (infArr && Array.isArray(infArr)) {
2459
+ var tableIndex = '';
2460
+ if (infArr[infArr.length - 1] == '0') {
2461
+ tableIndex = 'startedid-0';
2462
+ } else {
2463
+ tableIndex = infArr[infArr.length - 1];
2464
+ }
2465
+
2466
+ var tableHeaderBackground = document.querySelector('.wptb-el-main-table_setting-' + tableIndex + '-tableHeaderBackground');
2467
+ if (tableHeaderBackground) {
2468
+ var details = { value: tableHeaderBackground.value };
2469
+ WPTB_Helper.wptbDocumentEventGenerate('controlColor:change', tableHeaderBackground, details);
2470
+ }
2471
+
2472
+ var tableEvenRowBackground = document.querySelector('.wptb-el-main-table_setting-' + tableIndex + '-tableEvenRowBackground');
2473
+ if (tableEvenRowBackground) {
2474
+ var _details = { value: tableEvenRowBackground.value };
2475
+ WPTB_Helper.wptbDocumentEventGenerate('controlColor:change', tableEvenRowBackground, _details);
2476
+ }
2477
+
2478
+ var tableOddRowBackground = document.querySelector('.wptb-el-main-table_setting-' + tableIndex + '-tableOddRowBackground');
2479
+ if (tableOddRowBackground) {
2480
+ var _details2 = { value: tableOddRowBackground.value };
2481
+ WPTB_Helper.wptbDocumentEventGenerate('controlColor:change', tableOddRowBackground, _details2);
2482
+ }
2483
+ }
2484
  }
2485
  };
2486
  var WPTB_Initializer = function WPTB_Initializer() {
2521
  var columns = document.getElementById('wptb-columns-number').value,
2522
  rows = document.getElementById('wptb-rows-number').value;
2523
 
 
2524
  //wptbTableStateSaveManager.tableStateClear();
2525
 
 
 
2526
  WPTB_Table(columns, rows);
2527
 
2528
+ var wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
2529
  wptbTableStateSaveManager.tableStateSet();
2530
  };
2531
  };
2635
  // }
2636
  // }
2637
  } else if (inputs.hasOwnProperty('makeTableResponsive')) {
2638
+ var infArr = table.className.match(/wptb-element-main(.+)-(\d+)/i);
2639
+ if (infArr && Array.isArray(infArr) && typeof infArr[2] != 'undefined') {
2640
+ var inputSelector = void 0;
2641
+ if (infArr[2] == '0') {
2642
+ inputSelector = 'wptb-el-main-table_setting-startedid-0-tableTopRowsAsHeader';
2643
+ } else {
2644
+ inputSelector = 'wptb-el-main-table_setting-' + infArr[2] + '-tableTopRowsAsHeader';
2645
+ }
2646
+
2647
+ var inputTopAsHeader = document.querySelector('.' + inputSelector);
2648
+ if (inputTopAsHeader) {
2649
+ if (inputs.makeTableResponsive == 'checked') {
2650
+ table.classList.add('wptb-table-preview-head');
2651
+ inputTopAsHeader.checked = true;
2652
+ } else if (inputs.makeTableResponsive == 'unchecked') {
2653
+ table.classList.remove('wptb-table-preview-head');
2654
+ inputTopAsHeader.checked = false;
2655
+ }
2656
+ }
2657
+ }
2658
  } else if (inputs.hasOwnProperty('applyTableContainerMaxWidth')) {
2659
  var wptbTableSetup = document.querySelector('.wptb-table-setup');
2660
  if (inputs.applyTableContainerMaxWidth == 'checked') {
2706
  };
2707
 
2708
  if (table) {
2709
+ var wptbTablesEditModeCloseButton = document.getElementsByClassName('wptb-table-edit-mode-close');
2710
+ for (var _i = 0; _i < wptbTablesEditModeCloseButton.length; _i++) {
2711
+ wptbTablesEditModeCloseButton[_i].onclick = WPTB_Helper.toggleTableEditMode;
2712
+ }
2713
  document.getElementById('wptb-add-end-row').onclick = table.addRowToTheEnd;
2714
  document.getElementById('wptb-add-start-row').onclick = table.addRowToTheStart;
2715
  document.getElementById('wptb-add-row-before').onclick = table.addRowBefore;
2980
  WPTB_Helper.saveTable(event);
2981
  }
2982
  };
2983
+
2984
+ var tableTitleField = document.querySelector('#wptb-setup-name');
2985
+ if (tableTitleField) {
2986
+ tableTitleField.onchange = function () {
2987
+ var wptbTableStateSaveManager = new WPTB_TableStateSaveManager();
2988
+ wptbTableStateSaveManager.tableStateSet();
2989
+ };
2990
+ }
2991
  };
2992
  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
2993
 
2994
  var WPTB_Stringifier = function WPTB_Stringifier(codeMain) {
2995
  if (codeMain) {
2996
  var code = codeMain.cloneNode(true);
 
2997
  code.dataset.tableColumns = codeMain.columns;
2998
  code.style.width = null;
2999
  code.style.minWidth = null;
3096
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3097
 
3098
  var array = [],
3099
+ WPTB_Table = function WPTB_Table(columns, rows, wptb_preview_table) {
3100
 
3101
  /* The members of the class */
3102
  var settings = document.getElementsByClassName('wptb-settings-items'),
3491
  table.classList.add('wptb-preview-table', 'wptb-element-main-table_setting-startedid-0');
3492
  table.style.border = '0px solid';
3493
  table.dataset.reconstraction = 1;
3494
+ //table.dataset.wptbAdaptiveTable = 1;
3495
  //Add the data rows.
3496
  for (var i = 0; i < rows; i++) {
3497
 
3506
  }
3507
  }
3508
  } else {
3509
+ if (!wptb_preview_table) wptb_preview_table = document.querySelector('.wptb-preview-table');
3510
 
3511
+ if (wptb_preview_table) {
3512
+ table = wptb_preview_table;
3513
 
3514
  var cells = table.getElementsByTagName('td');
3515
 
3528
  * these are the column number and row number of cell in table.
3529
  */
3530
 
3531
+ table.recalculateIndexes = function () {
3532
+ WPTB_Helper.recalculateIndexes(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3533
  };
3534
 
3535
  table.addColumnWidth = function (value, cleaner) {
3536
  var highlighted = table.getElementsByClassName('wptb-highlighted');
3537
  if (highlighted.length > 0) {
3538
+ for (var _k2 = 0; _k2 < highlighted.length; _k2++) {
3539
+ var dataXIndex = highlighted[_k2].dataset.xIndex;
3540
  if (dataXIndex) {
3541
  (function () {
3542
  var tableTdsFor = function tableTdsFor(dataXIndex, colspan) {
3792
  table.addRowHeight = function (value, cleaner) {
3793
  var highlighted = table.getElementsByClassName('wptb-highlighted');
3794
  if (highlighted.length > 0) {
3795
+ for (var _k3 = 0; _k3 < highlighted.length; _k3++) {
3796
+ var dataYIndex = highlighted[_k3].dataset.yIndex;
3797
  if (dataYIndex) {
3798
  (function () {
3799
  var tableTdsFor = function tableTdsFor(dataYIndex, rowspan) {
4111
  array.push(aux);
4112
  drawTable(array);
4113
  table.recalculateIndexes();
4114
+ WPTB_Helper.tableRowsColorsReinstall(table);
4115
  table.addColumnWidth();
4116
  WPTB_Helper.dataTitleColumnSet(table);
4117
  undoSelect();
4152
  array.push(aux);
4153
  drawTable(array);
4154
  table.recalculateIndexes();
4155
+ WPTB_Helper.tableRowsColorsReinstall(table);
4156
  table.addColumnWidth();
4157
  WPTB_Helper.dataTitleColumnSet(table);
4158
  undoSelect();
4262
  array.push(aux);
4263
  drawTable(array);
4264
  table.recalculateIndexes();
4265
+ WPTB_Helper.tableRowsColorsReinstall(table);
4266
  table.addColumnWidth();
4267
  WPTB_Helper.dataTitleColumnSet(table);
4268
  undoSelect();
4438
  rowChildrenLength = rowChildren.length;
4439
 
4440
  if (rowChildrenLength > 0) {
4441
+ for (var _k4 = 0; _k4 < rowChildrenLength; _k4++) {
4442
+ if (Number(rowChildren[_k4].dataset.xIndex) > Number(cellXIndex)) {
4443
+ rowChildInsertBefore = rowChildren[_k4];
4444
  break;
4445
  }
4446
  }
4567
  td.getDOMElement().rowSpan = thisRowChildren[_j8].rowSpan - 1;
4568
 
4569
  var nextRowChildrenK = undefined;
4570
+ for (var _k5 = 0; _k5 < nextRowChildrenLength; _k5++) {
4571
+ if (Number(nextRowChildren[_k5].dataset.xIndex) > Number(thisRowChildren[_j8].dataset.xIndex)) {
4572
+ nextRowChildrenK = nextRowChildren[_k5];
4573
  break;
4574
  }
4575
  }
4583
  }
4584
 
4585
  if (tdArr.length > 0) {
4586
+ for (var _k6 = 0; _k6 < tdArr.length; _k6++) {
4587
+ if (tdArr[_k6][1] != undefined) {
4588
+ nextRow.insertBefore(tdArr[_k6][0].getDOMElement(), tdArr[_k6][1]);
4589
  } else {
4590
+ nextRow.appendChild(tdArr[_k6][0].getDOMElement());
4591
  }
4592
  }
4593
  }
4623
  }
4624
  } else {
4625
  table.recalculateIndexes();
4626
+ WPTB_Helper.tableRowsColorsReinstall(table);
4627
  WPTB_Helper.dataTitleColumnSet(table);
4628
  }
4629
  }
4649
  var rowChildren = table.rows[_j10].children;
4650
  var rowChildrenLength = rowChildren.length;
4651
  if (rowChildrenLength > 0) {
4652
+ for (var _k7 = rowChildrenLength - 1; _k7 >= 0; _k7--) {
4653
+ if (Number(rowChildren[_k7].dataset.xIndex) == Number(cellXIndex)) {
4654
+ if (rowChildren[_k7].colSpan > 1) {
4655
+ rowChildren[_k7].colSpan--;
4656
  } else {
4657
+ table.rows[_j10].removeChild(rowChildren[_k7]);
4658
  }
4659
  break;
4660
+ } else if (Number(rowChildren[_k7].dataset.xIndex) < Number(cellXIndex) && Number(rowChildren[_k7].dataset.xIndex) + Number(rowChildren[_k7].colSpan - 1) >= cellXIndex) {
4661
+ if (rowChildren[_k7].colSpan > 1) {
4662
+ rowChildren[_k7].colSpan--;
4663
  }
4664
  break;
4665
  }
4758
  return;
4759
  }
4760
 
4761
+ // get table setup
4762
+ var wptbTableSetup = document.getElementsByClassName('wptb-table-setup');
4763
+ var wptbPreviewTable = '';
4764
+ if (wptbTableSetup.length > 0) {
4765
+ wptbTableSetup = wptbTableSetup[0];
4766
+
4767
+ wptbPreviewTable = wptbTableSetup.querySelector('.wptb-preview-table');
4768
  } else {
4769
+ wptbTableSetup = '';
4770
  }
4771
 
4772
  // check if a global array doesn't exist with saved versions of the table
4782
  }
4783
 
4784
  //add new state of table
4785
+ var wptbNewTableSetup = '';
4786
+ if (wptbTableSetup) {
4787
+ wptbNewTableSetup = wptbTableSetup.cloneNode(true);
4788
+ var wptbHighlighted = wptbNewTableSetup.getElementsByClassName('wptb-highlighted');
4789
  for (var i = 0; i < wptbHighlighted.length; i++) {
4790
  wptbHighlighted[i].classList.remove('wptb-highlighted');
4791
  }
4792
+ var wptbDirectlyhovered = wptbNewTableSetup.getElementsByClassName('wptb-directlyhovered');
4793
  for (var _i = 0; _i < wptbDirectlyhovered.length; _i++) {
4794
  wptbDirectlyhovered[_i].classList.remove('wptb-directlyhovered');
4795
  }
4796
+ var mceContentBodys = wptbNewTableSetup.querySelectorAll('.mce-content-body');
4797
  if (mceContentBodys.length > 0) {
4798
  for (var k = 0; k < mceContentBodys.length; k++) {
4799
  mceContentBodys[k].classList.remove('mce-content-body');
4800
  }
4801
  }
4802
+ var dataMceStyle = wptbNewTableSetup.querySelectorAll('[data-mce-style]');
4803
  if (dataMceStyle.length > 0) {
4804
  for (var _k = 0; _k < dataMceStyle.length; _k++) {
4805
  dataMceStyle[_k].removeAttribute('data-mce-style');
4806
  }
4807
  }
4808
+ var mceIds = wptbNewTableSetup.querySelectorAll('[id^=mce_]');
4809
  if (mceIds.length > 0) {
4810
  for (var _k2 = 0; _k2 < mceIds.length; _k2++) {
4811
  mceIds[_k2].removeAttribute('id');
4822
  }
4823
  }
4824
 
4825
+ var wptbTableTitle = '';
4826
+ var wptbSetupName = document.getElementById('wptb-setup-name');
4827
+ if (wptbSetupName) wptbTableTitle = wptbSetupName.value;
4828
+
4829
+ window.wptbTableStateSaving.push([wptbNewTableSetup, cssForTdsWidthAutoValue, wptbTableTitle]);
4830
 
4831
  // set new number of state which is showed now
4832
  window.wptbTableStateNumberShow = window.wptbTableStateSaving.length - 1;
4926
  if (wptbTableSetup.length > 0) {
4927
  wptbTableSetup = wptbTableSetup[0];
4928
 
4929
+ //wptbTableSetup.outerHTML = '';
4930
  if (window.wptbTableStateSaving[window.wptbTableStateNumberShow]) {
4931
  if (window.wptbTableStateSaving[window.wptbTableStateNumberShow][0] && _typeof(window.wptbTableStateSaving[window.wptbTableStateNumberShow][0]) === 'object') {
4932
  if ('outerHTML' in window.wptbTableStateSaving[window.wptbTableStateNumberShow][0]) {
4933
+ wptbTableSetup.outerHTML = window.wptbTableStateSaving[window.wptbTableStateNumberShow][0].outerHTML;
4934
  }
4935
  }
4936
 
4937
+ var wptbTableSetupNew = document.querySelector('.wptb-table-setup');
4938
+ if (wptbTableSetupNew && wptbTableSetupNew.children.length == 0) {
4939
  document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';
4940
  wptbSaveBtn.classList.add('wptb-save-disabled');
4941
  } else {
4942
  document.getElementsByClassName('wptb-table-generator')[0].style.display = 'none';
4943
  }
4944
+
4945
+ // add or change or delete style element in the head for table cells who have auto width
 
4946
  var head = document.head;
4947
  if (head) {
4948
  var cssForTdsWidthAutoOld = head.querySelector('style[data-wptb-td-auto-width="true"]');
4957
  head.appendChild(cssForTdsWidthAuto);
4958
  }
4959
  }
4960
+
4961
+ // change value of table title field
4962
+ var wptbSetupName = document.getElementById('wptb-setup-name');
4963
+ if (typeof window.wptbTableStateSaving[window.wptbTableStateNumberShow][2] != 'undefined') {
4964
+ if (wptbSetupName) wptbSetupName.value = window.wptbTableStateSaving[window.wptbTableStateNumberShow][2];
4965
+ }
4966
  }
4967
 
4968
  var body = document.getElementsByTagName('body');
5115
  copy;
5116
  if (node.classList.contains('wptb-ph-element')) {
5117
  if (kindIndexProt == undefined || copy == true) {
5118
+ //index = document.counter.nextIndex( element.kind );
5119
  var wptbElements = document.getElementsByClassName('wptb-ph-element');
5120
  var elementIndexesArr = [];
5121
  for (var i = 0; i < wptbElements.length; i++) {
inc/admin/js/admin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["WPTB_ActionsField.js","WPTB_Builder.js","WPTB_Cell.js","WPTB_DropHandle.js","WPTB_ElementCounters.js","WPTB_ElementObject.js","WPTB_ElementOptions.js","WPTB_Helper.js","WPTB_Initializer.js","WPTB_LeftPanel.js","WPTB_MultipleSelect.js","WPTB_Parser.js","WPTB_Polyfills.js","WPTB_Settings.js","WPTB_Stringifier.js","WPTB_Table.js","WPTB_TableStateSaveManager.js","WPTB_innerElementSet.js","applyGenericItemSettings.js"],"names":["WPTB_ActionsField","wptbActions","document","getElementsByClassName","length","addActionField","actionType","thisNode","body","getElementsByTagName","actions","previousNode","activeElem","classList","remove","parentNode","removeChild","btnDelete","btnCopy","createElement","add","appendChild","type","onclick","event","act","target","el","infArr","className","match","hasOwnProperty","kind","thisRow","WPTB_Helper","rowIsTop","table","findAncestor","contains","dataTitleColumnSet","wptbActionsField","actionsRemove","wptbTableStateSaveManager","WPTB_TableStateSaveManager","tableStateSet","copy","activeElement","activeElemParent","Array","isArray","data","elemProt","tinyMceClear","WPTB_ElementObject","insertBefore","getDOMElement","nextSibling","elementCopy","cloneNode","applyGenericItemSettings","wptbDocumentEventGenerate","WPTB_innerElementSet","setParameters","btnMove","draggable","ondragstart","wptbElementIconsDirectories","tmplIconsDirectories","wp","template","jsonIconsDirectories","IconsDirectories","JSON","parse","dragImages","getElementIcon","dataTransfer","effectAllowed","setDragImage","setData","style","display","actionsHide","ondragend","elementDragEndClear","coordinatesElement","getBoundingClientRect","wptbContainer","correctTop","top","parseFloat","removeEventListener","left","right","clientWidth","addEventListener","leaveFromField","node","relatedTarget","onmouseleave","opacity","WPTB_Builder","table_id","detectMode","http","XMLHttpRequest","urlSet","ajaxurl","open","setRequestHeader","onreadystatechange","d","readyState","status","ans","responseText","getElementById","value","wptbTableSetupEl","WPTB_Parser","WPTB_Table","element","querySelector","dataset","wptbTableContainerMaxWidth","maxWidth","tdDefaultWidth","WPTB_Settings","elementOptionsSet","send","counter","ElementCounters","select","MultipleSelect","initializer","WPTB_Initializer","settings","WPTB_Cell","callback","DOMElement","highlightRow","td","parentRow","columnCount","parseInt","tds","i","classToAdd","ttd","highlightColumn","index","rowCount","tr","padding","jQuery","val","innerBorderWidth","border","ondblclick","stopPropagation","currentTarget","newElementProxy","wptbPhElement","wptbElementTypeClass","wptbTypeElementArr","split","wptbInternalActiveElement","j","wptbInternalActiveElementObj","setCoords","y","x","yIndex","xIndex","getCoords","coords","appendElement","getCellDimensions","tdStyleObj","window","getComputedStyle","tdPaddingLeft","getPropertyValue","tdPaddingRight","tdBorderLeftWidth","tdBorderRightWidth","tdPaddingTop","tdPaddingBottom","tdBorderTopWidth","tdBorderBottomWidth","width","offsetWidth","height","offsetHeight","tableFullStyleObj","tableBorderLeft","tableBorderRight","tableBorderTop","tableBorderBottom","nodeName","toLowerCase","firstChild","lastChild","WPTB_DropHandle","thisElem","e","wptbDropHandle","wptbDropBorderMarker","wptbDropBorderMarkerTop","wptbDropBorderMarkerRight","wptbDropBorderMarkerBottom","wptbDropBorderMarkerLeft","ondragenter","ondragover","preventDefault","ondragleave","ondrop","getData","wptbMovingMode","text","getDOMParentElement","innerElement","innerElementNext","elemKind","undefined","onscroll","localName","indics","types","notDragEnter","indexOf","elementDrag","offsetY","layerY","bottom","priv","increment","key","nextIndex","kindIndexProt","wpTemplateId","itemHtml","replace","trim","innerHTML","wptbElementMutch","elementClearFromTinyMce","inElems","querySelectorAll","inElemObj","WPTB_ElementOptions","capture","hexToRgb","hex","result","exec","rgbToHex","rgb","toString","slice","isHex","regex","RegExp","test","icon_directory","hostName","location","protocol","hostname","img","src","wptbDropHandles","wptbDropBorderMarkers","linkHttpCheckChange","link","linkArr","linkClean","rows","rowHead","computedStyleRowHead","rowHeadChildren","children","contentsForHeader","tdElements","p","textContent","textAlign","fontSize","color","backgroundColor","thisRowChildren","wptbTitleColumn","wptbTitleColumnFontSize","wptbTitleColumnColor","wptbTitleBackgroundColor","wptbTitleAlign","cls","parentElement","row","parent","getSelectionText","txt","getSelection","selection","createRange","elementOptionsPanelClear","elementOptionsGroup","wpColorPickerCheckChangeForTableStateSaving","originalEvent","wpPickerContainer","irisStripMouseUpStateSaveManager","wpColorPickerClear","attribute","isId","input","newInput","setAttribute","url","href","results","decodeURIComponent","getColumnWidth","cell","xIndexes","cellWidth","getRowHeight","yIndexes","cellHeight","wpColorPickerChange","ui","uiColor","classe","ps","number","affectedEl","ratingStar","span","fill","wptbTextMessageSize","numberImputSize","wptbNumberInputs","maxCount","maxValue","onkeydown","thisValue","String","substring","onkeyup","ucfirst","str","charAt","toUpperCase","eventName","details","CustomEvent","detail","bubbles","dispatchEvent","elementStartScript","WPTB_ElementsScriptsLauncher","deleteEventHandlers","off","elementChildren","replaceAll","string","search","join","mceContentBodys","k","dataMceStyle","removeAttribute","mceEditFocus","contentEditable","spellCheck","mceIds","elementOptionContainerCustomClassSet","targetInput","customClassForContainer","containerElement","elementOptionContainerAdditionalStyles","containerAdditionalStyles","containerStylesArrOne","containerStylesSet","containerStyleStr","containerStyleStrArr","controlsInclude","functionHandler","сontrolsConnectIndic","elementKind","elementOptionsContainer","elementOptions","controlActiveElement","regularText","controlInfArr","controlUnicClassName","controls","controlName","control","targetControlValue","targetControlValueGet","oneControlInclude","wptbContrlStacksConfigId","tmplControlsConfig","container","jsonControlsConfigJson","jsonControlsConfig","controlClassName","innerElementCopyIncludeHandler","appearDependOnControl","dependOn","targetControlElementClass","dependOnControlName","dependOnControlElementClass","dependOnControlElement","targetControlElement","controlContainerElem","showHideDependOnControlElement","dependOnControlElements","controlsStateManager","targetControlClass","controlChangeIndic","targetControls","selectorElement","elementsSettingsTemplatesJs","elementSettings","elementsSettings","stringify","name","checked","alignmentValue","elementControlsStateCopy","elementProt","copyElem","infArrProt","infArrCopy","elemProtKind","elemCopyKind","elementsSettingsTemplateJs","elementSettingsProt","elementSettingsCopy","Object","keys","forEach","elementSettingValue","elementSettingKeyCopy","elementControlsStateDelete","nameControl","wptbElementDatas","elementContainerClass","elementOptionClassIndic","elementOptionsGroupId","wptbelementOptionClass","wptbelementOptionsContainer","wptbelementOptionsScriptsContainer","childNodes","elementOptionsGroupChildren","controlScriptsArr","controlappearDependOnControl","controlKey","tmplControlTemplate","elemContainer","elementControlTargetUnicClass","controlTemplate","push","wptbElementOptionContainer","helperJavascriptElem","helperJavascriptCode","innerText","script","managerExternalCssStyles","elementContainer","selector","cssName","cssValue","head","cssForThisElement","cssText","cssTextArrFirst","pop","selectorExists","cssTextArrSecond","cssTextArrThird","cssNameExists","cssTextArrFourth","splice","externalCssStylesDelete","externalCssStylesCopy","copyElement","activeElemClass","cssForActiveElement","cssForNewElement","infArrCopyEl","cssForActiveElementInnerHTML","cssForNewElementInnerHTML","elementsStylesConvertToObject","stylesElements","stylesObj","styleElemId","getAttribute","elementsStylesSetFromObject","jsonObject","styleCss","saveTable","startSaving","previewSaving","wptbTableStateNumberSave","wptbTableStateNumberShow","bar","toggleTableEditMode","wptb_admin_object","t","messagingArea","code","datas","postId","rs","wptbId","paramIdsNecessaryChange","codeClone","columns","WPTB_Stringifier","outerHTML","datas_containers","styleObjJson","messagingAreaText","setTimeout","params","title","content","elements_datas","elements_styles","security_code","preview_saving","id","action","builderPageUrl","history","pushState","wptbPreviewTable","wptbPreviewBtn","wptbPreviewBtnHref","previewHref","wptbSaveBtn","clickOnFreeSpace","wpcdFixedToolbar","hasAttribute","elementAjax","dataAjaxData","element_name","element_ajax_data","close","cellModeBackground","leftScrollPanelCurtain","leftScrollPanelCellSettings","deactivateMultipleSelectMode","wptbPreviewTableTds","activateMultipleSelectMode","MIN_COLUMNS","MIN_ROWS","MAX_COLUMNS","MAX_ROWS","tableGenerator","columnsDecrementButton","columnsIncrementButton","rowsDecrementButton","rowsIncrementButton","columnsInput","rowsInput","WPTB_LeftPanel","wptbElementButtons","wptbTableColumnWidthNumber","wptbTableRowHeightNumber","oninput","addColumnWidth","onchange","highlighted","addRowHeight","controlsChange","inputs","wptbTableSetup","applyTableContainerMaxWidth","tableContainerMaxWidthInput","tableContainerMaxWidthInputValue","tableContainerMaxWidth","wptbElement","addRowToTheEnd","addRowToTheStart","addRowBefore","addRowAfter","addColumnEnd","addColumnStart","addColumnBefore","addColumnAfter","deleteColumn","deleteRow","mergeCells","splitCell","wptbBuilderPanel","wptbHeader","selectedCells","multipleCellMode","isActivated","pushSelectedCell","flushSelectedCells","getFirst","minXIndex","minYIndex","first","getLast","maxXIndex","maxYIndex","last","removeAllButFirst","div","columnTitleMobile","prototype","hasDontEnumBug","propertyIsEnumerable","dontEnums","dontEnumsLength","obj","TypeError","prop","call","elems","wptbUndo","tableStateGet","wptbUndoredo","wptbUndoRedoContainer","wptbRedo","shortcodePopupWindow","onbeforeunload","wptbSaveDisabled","previewId","Math","floor","random","newHref","URL","searchParams","set","codeMain","tableColumns","minWidth","innerElements","wptbActionsLength","dataMceBogus","columnNameDivContainer","columnNameDiv","array","maxAmountOfCells","maxAmountOfRows","mark","rowSpan","cs","colSpan","markedCells","noCells","singleCells","multipleCells","cellSettings","position","column","cellHighlighted","wptbTableColumnWidthSlider","tableColumnWidthAutoFixedCheckbox","wptbFixedWidth","wptbTableRowHeightSlider","tableRowHeightAutoFixedCheckbox","wptbFixedHeight","isSquare","realTimeArray","carried","cols","matriz","items","justAssigned","amount","carriedRowspans","cellsBuffer","cellPointer","xPosition","stepsToMove","celda","drawTable","a","undoSelect","fillTableArray","colspansSums","cells","colspanSumInRow","max","apply","getActualPointsInRow","points","skipInCols","reconstraction","wptbAdaptiveTable","insertRow","borderWidth","wptb_preview_table","recalculateIndexes","start","trs","maxCols","maxColsFull","tdsArr","jMainIter","z","cleaner","dataXIndex","tableTdsFor","colspan","tableRows","widthIsSet","arrayTdsFromPreviousRow","tableTdsSumMaxWidth","tableTdsSumMaxWidthFixed","tableTdsSumMaxWidthAuto","wptbTableSetupWidth","arrayCellsWidthFixedHelper","arrayCellsWidthAutoHelper","tdPaddingCommon","tableTdBorderCommonWidth","cssForTdsWidthAuto","borderLeftWidth","borderRightWidth","tableBorderCommon","wptbCssTdAutoWidth","tableTdBorderLeftWidth","tableTdBorderRightWidth","CellsWidthAutoCount","wptbTableTdsSumMaxWidth","wptbCellsWidthAutoCount","mergingСellsHorizontally","wptbFixedWidthSize","styleElementCreate","tableTdWidthAuto","tableTdsWidthAutoCommon","cssForTdsWidthAutoOld","wptbTableAlignment","float","dataYIndex","rowspan","heightIsSet","arrayTdsPrevious","tableColumnHeightAutoFixedCheckbox","mergingCellsVertically","forBreak","currentTable","currentTableTd","currentTdStyle","firstCell","c_pos","cellStyle","pos","pendingInsertion","bro","currentCell","l","r","aux","from","cellNew","rowChildren","rowChildrenLength","cellRowSpan","rowAfter","cellsColSpan","tableRowsIChildren","tableRIChildrenLength","rowIRowSpan","rNext","rNextChildren","rNextChildrenLength","rowStart","columnStart","rowEnd","columnEnd","itemsEstimate","dimensions","tdsChildrenNew","tdsInternalElements","tdsIntElemLength","firstWidth","firstDataFixedWidth","firstHeight","firstDataFixedHeight","cellStyles","cellXIndex","rowChildInsertBefore","rowNext","Number","findRowspannedCells","difference","actualPoints","addLackingCells","sumRows","totalColspan","nextRow","nextRowChildren","nextRowChildrenLength","tdArr","nextRowChildrenK","jRowChildren","onresize","generate","wptbTableStateSaving","wptbNewPreviewTable","wptbHighlighted","wptbDirectlyhovered","cssForTdsWidthAutoValue","datawptbUndoredo","wptbLeftScrollPanelCellSetting","tableStateClear","classId","onmouseover","wptbElements","elementIndexesArr","elementIndexMax","wptbNodeattributes","attributes","attr","newDataAttributeName","newDataAttributeValue","nodeValue","kindIndexProtArr","node_wptb_element_kind_num","onmouseenter"],"mappings":";;AAAA,IAAIA,oBAAoB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EAA,aAAKpF,SAAL,CAAeC,MAAf,CAAuB,kBAAvB;AACH,KAZD;;AAcAmF,SAAKE,YAAL,GAAoB,UAAW3E,KAAX,EAAmB;AACnC,YAAIgB,mBAAmB,IAAIxC,iBAAJ,EAAvB;;AAEAwC,yBAAiBwD,cAAjB,CAAiCxE,KAAjC,EAAwCyE,IAAxC;AACH,KAJD;AAKH,CApFD","file":"admin.js","sourcesContent":["var WPTB_ActionsField = function() {\n //this.wptbBorderMarker;\n this.wptbActions;\n if( document.getElementsByClassName( 'wptb-actions' ).length != 0 ) {\n this.wptbActions = document.getElementsByClassName( 'wptb-actions' )[0];\n }\n \n this.addActionField = ( actionType, thisNode ) => {\n let body = document.getElementsByTagName( 'body' )[0];\n \n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length != 0 ) {\n let previousNode = actions[0].activeElem;\n if( previousNode ) {\n previousNode.classList.remove( 'wptb-directlyhovered' );\n }\n \n while( actions.length != 0 ) {\n actions[0].parentNode.removeChild( actions[0] );\n }\n }\n \n if( actionType == 1 ) {\n \n let btnDelete, btnCopy;\n\n btnDelete = document.createElement( 'span' ),\n btnCopy = document.createElement( 'span' ),\n actions = document.createElement( 'div' );\n\n actions.classList.add( 'wptb-actions' );\n btnDelete.classList.add( 'dashicons', 'dashicons-trash', 'wptb-delete-action' );\n btnCopy.classList.add( 'dashicons', 'dashicons-admin-page', 'wptb-duplicate-action' );\n \n actions.appendChild( btnCopy );\n actions.appendChild( btnDelete );\n \n body.appendChild( actions );\n\n actions.activeElem = thisNode;\n\n actions.type = 1;\n\n btnDelete.onclick = function( event ) {\n let act = event.target.parentNode.activeElem,\n el = act.parentNode;\n let infArr = act.className.match( /wptb-element-(.+)-(\\d+)/i );\n// if( act && infArr && Array.isArray( infArr ) ) {\n// WPTB_Helper.elementControlsStateDelete( act );\n// WPTB_Helper.externalCssStylesDelete( infArr[0] );\n// }\n \n if( act ) {\n el.removeChild( act );\n }\n\n if( act && typeof act === 'object' && act.hasOwnProperty( 'kind' ) && act.kind == 'text' ) {\n let thisRow = el.parentNode;\n \n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n\n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n }\n\n let wptbActionsField = new WPTB_ActionsField();\n wptbActionsField.actionsRemove();\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n btnCopy.onclick = ( event ) => {\n let copy,\n infArr,\n type;\n let activeElement = event.target.parentNode.activeElem;\n let activeElemParent = activeElement.parentNode;\n infArr = activeElement.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr && Array.isArray( infArr ) ) {\n type = infArr[1];\n let data = {};\n data.kind = type;\n data.elemProt = activeElement;\n data.tinyMceClear = true;\n copy = new WPTB_ElementObject( data );\n //WPTB_Helper.elementControlsStateCopy( activeElement, copy.getDOMElement() );\n //WPTB_Helper.externalCssStylesCopy( activeElement, copy.getDOMElement() );\n //WPTB_Helper.elementStartScript( copy.getDOMElement() );\n \n activeElemParent.insertBefore( copy.getDOMElement(), activeElement.nextSibling );\n } else {\n copy = {};\n let elementCopy = activeElement.cloneNode( true );\n elementCopy.classList.remove( 'wptb-directlyhovered' );\n \n copy.getDOMElement = function() {\n return elementCopy;\n }\n \n applyGenericItemSettings( copy );\n \n activeElemParent.insertBefore( copy.getDOMElement(), activeElement.nextSibling );\n \n WPTB_Helper.wptbDocumentEventGenerate( 'wptb-inner-element:copy', activeElement, copy.getDOMElement() );\n }\n \n WPTB_innerElementSet( copy.getDOMElement() );\n\n let wptbActionsField = new WPTB_ActionsField( 1, activeElement );\n wptbActionsField.setParameters( activeElement );\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n \n \n if( thisNode.classList.contains( 'wptb-ph-element' ) ) {\n let btnMove;\n btnMove = document.createElement( 'span' );\n btnMove.classList.add( \"dashicons\", \"dashicons-move\", 'wptb-move-action' );\n btnMove.draggable = true;\n actions.appendChild( btnMove );\n \n btnMove.ondragstart = ( event ) => {\n let wptbElementIconsDirectories = 'wptb-element-icons-directories';\n let tmplIconsDirectories = wp.template( wptbElementIconsDirectories );\n let data = {};\n let jsonIconsDirectories = tmplIconsDirectories( data );\n let IconsDirectories = JSON.parse( jsonIconsDirectories );\n\n let dragImages,\n actions = event.target.parentNode,\n activeElem = actions.activeElem,\n infArr,\n type;\n infArr = activeElem.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr && Array.isArray( infArr ) ) {\n type = infArr[1];\n activeElem.classList.add( 'wptb-moving-mode' );\n\n if( IconsDirectories && typeof IconsDirectories === 'object' && IconsDirectories[type] ) {\n dragImages = WPTB_Helper.getElementIcon( IconsDirectories[type] );\n }\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setDragImage( dragImages, 0, 0 );\n event.dataTransfer.setData( 'node', 'wptb-element-' + infArr[1] + '-' + infArr[2] );\n event.dataTransfer.setData( 'wptb-moving-mode', 'wptb-element-' + infArr[1] + '-' + infArr[2] );\n event.dataTransfer.setData( 'wptbElIndic-' + infArr[1], 'wptbElIndic-' + infArr[1] );\n let act = event.target.parentNode.activeElem;\n if( act.kind == 'text' ) {\n let thisRow = act.parentNode.parentNode;\n \n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n\n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n }\n } else {\n this.style.display = 'none';\n }\n\n this.actionsHide();\n };\n\n btnMove.ondragend = ( event ) => {\n WPTB_Helper.elementDragEndClear();\n }\n }\n\n actions.style.display = 'block';\n\n this.wptbActions = actions;\n } \n }\n \n this.setParameters = ( thisNode ) => {\n \n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n } else {\n this.wptbActions = false;\n }\n }\n \n if( this.wptbActions && this.wptbActions.classList.contains( 'wptb-actions' ) ) {\n this.wptbActions.style.display = 'block';\n } else {\n return;\n }\n \n let coordinatesElement = thisNode.getBoundingClientRect();\n \n let wptbContainer = document.getElementsByClassName( 'wptb-container' )[0];\n let correctTop = () => {\n let coordinatesElement = thisNode.getBoundingClientRect();\n this.wptbActions.style.top = parseFloat( coordinatesElement.top ) - 15 + 'px';\n }\n wptbContainer.removeEventListener( 'scroll', correctTop, false );\n \n this.wptbActions.style.top = parseFloat( coordinatesElement.top ) - 15 + 'px';\n this.wptbActions.style.left = ( parseFloat( coordinatesElement.right ) - parseFloat( this.wptbActions.clientWidth ) ) + 1 + 'px';\n \n this.wptbActions.style.display = 'block';\n thisNode.classList.add( 'wptb-directlyhovered' );\n \n wptbContainer.addEventListener( 'scroll', correctTop, false );\n }\n \n this.leaveFromField = ( event, node, actionType ) => {\n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n } else {\n this.wptbActions = false;\n }\n }\n \n if( ! this.wptbActions ) {\n return;\n }\n \n if( event.relatedTarget ) {\n if ( event.relatedTarget.classList.contains( 'wptb-actions' ) ||\n event.relatedTarget.classList.contains( 'wptb-move-action' ) ||\n event.relatedTarget.classList.contains( 'wptb-duplicate-action' ) ||\n event.relatedTarget.classList.contains( 'wptb-delete-action' ) ) {\n if( ! this.wptbActions ) {\n this.wptbActions = document.getElementsByClassName( 'wptb-actions' )[0];\n }\n this.wptbActions.onmouseleave = ( event ) => {\n if( event.relatedTarget != null && ( event.relatedTarget.classList.contains( 'wptb-ph-element' ) || \n WPTB_Helper.findAncestor( event.relatedTarget, 'wptb-ph-element') ) && event.relatedTarget != this.wptbActions.activeElem &&\n WPTB_Helper.findAncestor( event.relatedTarget, 'wptb-directlyhovered' ) != this.wptbActions.activeElem ) {\n \n// this.wptbActions.style.display = 'none';\n// event.relatedTarget.parentNode.parentNode.classList.remove( 'wptb-directlyhovered' );\n//\n// let wptbActionsField = new WPTB_ActionsField();\n//\n// wptbActionsField.addActionField( 1, event.relatedTarget.parentNode.parentNode );\n//\n// wptbActionsField.setParameters( event.relatedTarget.parentNode.parentNode );\n } else {\n \n }\n \n let wptbActionsField = new WPTB_ActionsField();\n\n wptbActionsField.leaveFromField( event, event.relatedTarget.parentNode.parentNode );\n \n event.target.activeElem.classList.remove( 'wptb-directlyhovered' );\n }\n\n return;\n } \n }\n \n node.classList.remove( 'wptb-directlyhovered' );\n this.wptbActions.style.display = 'none';\n \n if( event.relatedTarget ) {\n if( event.relatedTarget.classList.contains( 'wptb-ph-element' ) || WPTB_Helper.findAncestor( event.relatedTarget, 'wptb-ph-element' ) ) {\n this.addActionField( 1, event.relatedTarget.parentNode );\n\n this.setParameters( event.relatedTarget.parentNode );\n }\n }\n }\n \n this.actionsRemove = () => {\n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n }\n }\n \n if( this.wptbActions ) {\n this.wptbActions.parentNode.removeChild( this.wptbActions );\n }\n }\n \n this.actionsHide = () => {\n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n }\n }\n \n if( this.wptbActions ) {\n this.wptbActions.style.opacity = 0;\n }\n }\n}","(function () {\n var WPTB_Builder = function () {\n var table_id = WPTB_Helper.detectMode();\n if ( table_id ) {\n var http = new XMLHttpRequest(),\n urlSet = ajaxurl + \"?action=get_table\" + '&id=' + table_id;\n http.open('GET', urlSet, true);\n http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n http.onreadystatechange = function (d) {\n if (this.readyState == 4 && this.status == 200) {\n var ans = JSON.parse( http.responseText );\n document.getElementById('wptb-setup-name').value = ans[0];\n \n if( ans[1] ) {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'none';\n let wptbTableSetupEl = document.getElementsByClassName('wptb-table-setup')[0];\n wptbTableSetupEl.appendChild( WPTB_Parser( ans[1] ) );\n \n let body = document.getElementsByTagName('body')[0];\n \n WPTB_Table();\n let element = document.querySelector( '.wptb-preview-table' );\n if( element ) {\n let infArr = element.className.match( /wptb-element-((.+-)\\d+)/i );\n if( ! infArr ) {\n element.classList.add( 'wptb-element-main-table_setting-' + table_id );\n }\n \n if( element.dataset.wptbTableContainerMaxWidth ) {\n wptbTableSetupEl.style.maxWidth = element.dataset.wptbTableContainerMaxWidth + 'px';\n \n element.tdDefaultWidth();\n }\n }\n \n //WPTB_LeftPanel();\n WPTB_Settings();\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n \n WPTB_Helper.elementOptionsSet( 'table_setting', element );\n } else {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';\n }\n \n return;\n }\n };\n http.send(null);\n } else {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';\n }\n document.counter = new ElementCounters();\n document.select = new MultipleSelect();\n\n var initializer = WPTB_Initializer();\n settings = WPTB_Settings();\n };\n\n document.addEventListener('DOMContentLoaded', WPTB_Builder);\n})();","var WPTB_Cell = function ( callback, DOMElement ) {\n\n function highlightRow(td) {\n var parentRow = td.parentNode,\n columnCount = parseInt(document.getElementById('wptb-columns-number').value),\n tds = document.getElementsByClassName('wptb-preview-table')[0].getElementsByTagName('td');\n for (var i = 0; i < tds.length; i++) {\n tds[i].classList.remove('wptb-highlighted-row-first', 'wptb-highlighted-row-last', 'wptb-highlighted-row-inner', 'wptb-highlighted-column-first', 'wptb-highlighted-column-last', 'wptb-highlighted-column-inner');\n }\n for (var i = 0; i < columnCount; i++) {\n\n var classToAdd = i == 0 ? 'wptb-highlighted-row-first' : i == columnCount - 1 ? 'wptb-highlighted-row-last' : 'wptb-highlighted-row-inner';\n var ttd = parentRow.getElementsByTagName('td')[i];\n if (ttd !== td) {\n ttd.classList.add(classToAdd);\n }\n }\n }\n\n function highlightColumn(td) {\n\n var index,\n parentRow = td.parentNode;\n columnCount = parseInt(document.getElementById('wptb-columns-number').value), rowCount = parseInt(document.getElementById('wptb-rows-number').value), table = document.getElementsByClassName('wptb-preview-table')[0];\n for (var i = 0; i < columnCount; i++) {\n if (parentRow.getElementsByTagName('td')[i] === td) {\n index = i;\n break;\n }\n }\n\n for (var i = 0; i < rowCount; i++) {\n var classToAdd = i == 0 ? 'wptb-highlighted-column-first' : i == rowCount - 1 ? 'wptb-highlighted-column-last' : 'wptb-highlighted-column-inner';\n var tr = table.getElementsByTagName('tr')[i];\n if (tr.getElementsByTagName('td')[index] !== td) {\n tr.getElementsByTagName('td')[index].classList.add(classToAdd);\n }\n }\n }\n \n if( ! DOMElement ) {\n DOMElement = document.createElement(\"td\");\n\n DOMElement.style.padding = jQuery('#wptb-table-padding-number').val() + 'px';\n\n var innerBorderWidth = jQuery('#wptb-table-inner-border-number').val();\n\n if (innerBorderWidth != '' && parseInt(innerBorderWidth) != 0) {\n DOMElement.style.border = innerBorderWidth + 'px solid ' + jQuery('#wptb-table-border-color').val();\n } \n\n DOMElement.classList.add('wptb-droppable', 'wptb-cell');\n }\n\n DOMElement.draggable = false;\n if ( callback ) {\n DOMElement.onclick = callback;\n }\n \n // Cell double click handler\n DOMElement.ondblclick = function( event ) {\n event.stopPropagation();\n if( ! WPTB_Helper.findAncestor( DOMElement, 'wptb-preview-table-manage-cells' ) && event.target == event.currentTarget ) {\n \n WPTB_Helper.wptbDocumentEventGenerate( 'table:cell:dblclick', event.target );\n \n let element = WPTB_Helper.newElementProxy( 'text' );\n element = element.getDOMElement();\n \n DOMElement.appendChild( element );\n \n WPTB_innerElementSet( element );\n }\n }\n \n WPTB_innerElementSet( DOMElement );\n \n let wptbPhElement = DOMElement.getElementsByClassName( 'wptb-ph-element' );\n \n if ( wptbPhElement.length > 0 ) {\n for( let i = 0; i < wptbPhElement.length; i++ ) {\n wptbPhElement[i].getDOMElement = function() {\n return wptbPhElement[i];\n }\n \n WPTB_innerElementSet( wptbPhElement[i] );\n \n let wptbElementTypeClass = wptbPhElement[i].className.match( /wptb-element-((.+-)\\d+)/i );\n if( wptbElementTypeClass && Array.isArray( wptbElementTypeClass ) ) {\n let wptbTypeElementArr = wptbElementTypeClass[1].split( '-' );\n wptbPhElement[i].kind = wptbTypeElementArr[0];\n applyGenericItemSettings( wptbPhElement[i], wptbElementTypeClass[1] );\n let wptbInternalActiveElement = wptbPhElement[i].getElementsByClassName( 'wptb-in-element' );\n if ( wptbInternalActiveElement.length > 0 ) {\n for ( let j = 0; j < wptbInternalActiveElement.length; j++ ) {\n let wptbInternalActiveElementObj = {};\n wptbInternalActiveElementObj.getDOMElement = function() {\n return wptbInternalActiveElement[j];\n }\n \n applyGenericItemSettings( wptbInternalActiveElementObj );\n }\n }\n }\n }\n }\n\n this.getDOMElement = function () {\n return DOMElement;\n };\n\n this.setCoords = function (y, x) {\n var el = this.getDOMElement();\n el.dataset.yIndex = y;\n el.dataset.xIndex = x;\n };\n\n this.getCoords = function () {\n var coords,\n el = this.getDOMElement();\n coords.x = el.dataset.xIndex;\n coords.y = el.dataset.yIndex;\n return coords;\n };\n\n this.appendElement = function (node) {\n getDOMElement().appendChild(node);\n };\n \n DOMElement.getCellDimensions = function() {\n \n let tdStyleObj = window.getComputedStyle( this, null );\n \n let tdPaddingLeft = tdStyleObj.getPropertyValue( 'padding-left' );\n let tdPaddingRight = tdStyleObj.getPropertyValue( 'padding-right' );\n \n let tdBorderLeftWidth = tdStyleObj.getPropertyValue( 'border-left-width' );\n let tdBorderRightWidth = tdStyleObj.getPropertyValue( 'border-right-width' );\n \n let tdPaddingTop = tdStyleObj.getPropertyValue( 'padding-top' );\n let tdPaddingBottom = tdStyleObj.getPropertyValue( 'padding-bottom' );\n \n let tdBorderTopWidth = tdStyleObj.getPropertyValue( 'border-top-width' );\n let tdBorderBottomWidth = tdStyleObj.getPropertyValue( 'border-bottom-width' );\n \n let width = parseInt( this.offsetWidth, 10 ) - \n parseInt( tdPaddingLeft, 10 ) - \n parseInt( tdPaddingRight, 10 ) -\n ( parseInt( tdBorderLeftWidth, 10 ) / 2 ) -\n ( parseInt( tdBorderRightWidth, 10 ) / 2 );\n \n let height = parseInt( this.offsetHeight, 10 ) - \n parseInt( tdPaddingTop, 10 ) - \n parseInt( tdPaddingBottom, 10 ) -\n ( parseInt( tdBorderTopWidth, 10 ) / 2 ) -\n ( parseInt( tdBorderBottomWidth, 10 ) / 2 ); \n \n \n let table = WPTB_Helper.findAncestor( this, 'wptb-preview-table' );\n if( table ) {\n let tableFullStyleObj = window.getComputedStyle( table, null );\n let tableBorderLeft = tableFullStyleObj.getPropertyValue( 'border-left-width' );\n let tableBorderRight = tableFullStyleObj.getPropertyValue( 'border-right-width' );\n let tableBorderTop = tableFullStyleObj.getPropertyValue( 'border-top-width' );\n let tableBorderBottom = tableFullStyleObj.getPropertyValue( 'border-bottom-width' );\n \n let tr = this.parentNode;\n if( tr && tr.nodeName.toLowerCase() === 'tr' ) {\n if( tr.firstChild && tr.firstChild.dataset.xIndex === this.dataset.xIndex ) {\n if( parseInt( tableBorderLeft, 10 ) > parseInt( tdBorderLeftWidth, 10 ) ) {\n width += -( parseInt( tableBorderLeft, 10 ) - parseInt( tdBorderLeftWidth, 10 ) ) / 2;\n }\n }\n\n if( tr.lastChild && tr.lastChild.dataset.xIndex === this.dataset.xIndex ) {\n if( parseInt( tableBorderRight, 10 ) > parseInt( tdBorderRightWidth, 10 ) ) {\n width += -( parseInt( tableBorderRight, 10 ) - parseInt( tdBorderRightWidth, 10 ) ) / 2;\n }\n }\n \n let body = tr.parentNode;\n if( body && body.nodeName.toLowerCase() === 'body' ) {\n if( body.firstChild && body.firstChild.firstChild.dataset.yIndex === this.dataset.yIndex ) {\n if( parseInt( tableBorderTop, 10 ) > parseInt( tdBorderTopWidth, 10 ) ) {\n height += ( parseInt( tableBorderTop, 10 ) - parseInt( tdBorderTopWidth, 10 ) ) / 2;\n }\n }\n \n if( body.lastChild && body.lastChild.firstChild.dataset.yIndex === this.dataset.yIndex ) {\n if( parseInt( tableBorderBottom, 10 ) > parseInt( tdBorderBottomWidth, 10 ) ) {\n height += ( parseInt( tableBorderBottom, 10 ) - parseInt( tdBorderBottomWidth, 10 ) ) / 2;\n }\n }\n }\n }\n }\n \n return {\n width: parseInt( width ), \n height: parseInt( height )\n };\n }\n\n return this;\n};","var WPTB_DropHandle = function (thisElem, e) {\n \n let wptbDropHandle,\n wptbDropBorderMarker;\n if ( document.getElementsByClassName( 'wptb-drop-handle' ).length == 0 ) {\n wptbDropHandle = document.createElement( 'div' );\n wptbDropHandle.classList.add( 'wptb-drop-handle' );\n \n wptbDropBorderMarker = document.createElement( 'div' );\n wptbDropBorderMarker.classList.add( 'wptb-drop-border-marker' );\n \n let wptbDropBorderMarkerTop = document.createElement( 'div' ),\n wptbDropBorderMarkerRight = document.createElement( 'div' ),\n wptbDropBorderMarkerBottom = document.createElement( 'div' ),\n wptbDropBorderMarkerLeft = document.createElement( 'div' );\n \n wptbDropBorderMarkerTop.classList.add( 'wptb-drop-border-marker-top' );\n wptbDropBorderMarkerRight.classList.add( 'wptb-drop-border-marker-right' );\n wptbDropBorderMarkerBottom.classList.add( 'wptb-drop-border-marker-bottom' );\n wptbDropBorderMarkerLeft.classList.add( 'wptb-drop-border-marker-left' );\n \n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerTop );\n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerRight );\n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerBottom );\n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerLeft );\n \n let body = document.getElementsByTagName( 'body' );\n if ( body.length > 0 ) {\n body[0].appendChild( wptbDropHandle );\n body[0].appendChild( wptbDropBorderMarker );\n }\n \n wptbDropHandle.ondragenter = function () {\n\n }\n\n wptbDropHandle.ondragover = function (e) {\n e.preventDefault();\n }\n\n wptbDropHandle.ondragleave = function () {\n\n }\n wptbDropHandle.ondrop = function (e) {\n e.preventDefault();\n let element;\n \n if ( e.dataTransfer.getData('wptbElement') ) {\n element = WPTB_Helper.newElementProxy( e.dataTransfer.getData('wptbElement') );\n element = element.getDOMElement();\n } else {\n element = document.getElementsByClassName( e.dataTransfer.getData('node') )[0];\n element.classList.remove( 'wptb-moving-mode' );\n element.classList.remove( 'wptb-moving-into-same-elem' );\n element.wptbMovingMode = 1;\n }\n \n let td;\n if( wptbDropHandle.dataset.text == 'Drop Here' ) {\n thisElem = wptbDropHandle.getDOMParentElement();\n if ( thisElem.nodeName.toLowerCase() == 'td' ) {\n td = wptbDropHandle.getDOMParentElement();\n td.appendChild( element );\n }\n } else {\n let innerElement = wptbDropHandle.getDOMParentElement();\n td = innerElement.parentNode;\n \n if( wptbDropHandle.dataset.text == 'Above Element' ) {\n td.insertBefore( element, innerElement );\n } else if( wptbDropHandle.dataset.text == 'Below Element' ) {\n let innerElementNext = innerElement.nextSibling;\n td.insertBefore( element, innerElementNext );\n }\n }\n \n let thisRow = td.parentNode;\n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n\n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n \n // start item javascript if item is new\n let infArr = element.className.match(/wptb-element-(.+)-(\\d+)/i);\n let elemKind = infArr[1];\n if ( e.dataTransfer.getData( 'wptbElement' ) && ( elemKind == 'text' || elemKind == 'button' || elemKind == 'image' || elemKind == 'star_rating' || elemKind == 'list' ) ) {\n //WPTB_Helper.elementStartScript( element );\n }\n \n wptbDropHandle.style.display = 'none';\n wptbDropBorderMarker.style.display = 'none';\n \n WPTB_innerElementSet( element );\n if( ! element.classList.contains( 'wptb-image-container' ) || element.wptbMovingMode == 1 ) {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n element.wptbMovingMode == undefined;\n }\n }\n let wptbContainer = document.querySelector( '.wptb-container' );\n wptbContainer.onscroll = function() {\n wptbDropHandle.style.display = 'none';\n wptbDropBorderMarker.style.display = 'none';\n }\n } else {\n wptbDropHandle = document.getElementsByClassName( 'wptb-drop-handle' )[0];\n wptbDropBorderMarker = document.getElementsByClassName( 'wptb-drop-border-marker' )[0];\n }\n if( thisElem && thisElem.nodeName.toLowerCase() == 'td' && \n thisElem.getElementsByClassName( 'wptb-ph-element' ).length != 0 ) {\n return;\n }\n \n let thisRow;\n if ( thisElem.localName == 'td' ) {\n thisRow = thisElem.parentNode;\n } else if ( thisElem.localName == 'div' && thisElem.classList.contains( 'wptb-ph-element' ) ) {\n thisRow = thisElem.parentNode.parentNode;\n }\n \n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n \n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n let indics = e.dataTransfer.types;\n let notDragEnter = false;\n for ( let i = 0; i < indics.length; i++ ) {\n let infArr = indics[i].match( /wptbelindic-([a-z]+)/i );\n if ( infArr && infArr[1] != 'text' ) {\n notDragEnter = true;\n break;\n }\n }\n if( notDragEnter ) {\n return;\n }\n }\n }\n \n wptbDropHandle.style.width = thisElem.offsetWidth + 'px';\n let height = thisElem.offsetHeight,\n coordinatesElement = thisElem.getBoundingClientRect(),\n left = parseFloat( coordinatesElement.left ),\n top;\n wptbDropHandle.style.left = left + 'px';\n \n if( e.dataTransfer.types.indexOf( 'wptb-moving-mode' ) != -1 ) {\n let elementDrag = document.getElementsByClassName( 'wptb-moving-mode' )[0];\n if( thisElem == elementDrag ) {\n wptbDropHandle.classList.add('wptb-moving-into-same-elem');\n wptbDropBorderMarker.classList.add('wptb-moving-into-same-elem');\n } else {\n wptbDropHandle.classList.remove('wptb-moving-into-same-elem');\n wptbDropBorderMarker.classList.remove('wptb-moving-into-same-elem');\n }\n }\n \n wptbDropHandle.getDOMParentElement = function() {\n return thisElem;\n }\n \n wptbDropHandle.style.display = 'block';\n wptbDropBorderMarker.style.display = 'block';\n if( thisElem.nodeName.toLowerCase() != 'td' ) {\n let y = e.offsetY==undefined?e.layerY:e.offsetY;\n top = parseFloat( coordinatesElement.top ) - parseFloat( 11 );\n wptbDropHandle.dataset.text = 'Above Element';\n if ( y > height/2 ) {\n top = parseFloat( coordinatesElement.top ) + height - 1;\n wptbDropHandle.dataset.text = 'Below Element';\n }\n } else {\n wptbDropHandle.dataset.text = 'Drop Here';\n top = parseFloat( coordinatesElement.top ) + height/2 - 5;\n }\n wptbDropHandle.style.top = top + 'px';\n\n wptbDropBorderMarker.style.top = coordinatesElement.top + 'px';\n wptbDropBorderMarker.style.left = coordinatesElement.left + 'px';\n\n wptbDropBorderMarkerTop = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-top' );\n wptbDropBorderMarkerTop.style.width = ( parseFloat( thisElem.offsetWidth ) - parseFloat( 1 ) ) + 'px';\n\n wptbDropBorderMarkerRight = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-right' );\n wptbDropBorderMarkerRight.style.height = ( parseFloat( coordinatesElement.bottom ) - parseFloat( coordinatesElement.top ) - 1 ) + 'px';\n wptbDropBorderMarkerRight.style.left = wptbDropBorderMarkerTop.style.width;\n\n wptbDropBorderMarkerBottom = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-bottom' );\n wptbDropBorderMarkerBottom.style.width = wptbDropBorderMarkerTop.style.width;\n wptbDropBorderMarkerBottom.style.top = wptbDropBorderMarkerRight.style.height;\n\n wptbDropBorderMarkerLeft = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-left' );\n wptbDropBorderMarkerLeft.style.height = wptbDropBorderMarkerRight.style.height;\n}","var ElementCounters = function () {\n\n\tvar priv = [];\n\tpriv['text'] = 0;\n\tpriv['image'] = 0;\n\tpriv['list'] = 0;\n\tpriv['button'] = 0;\n\n\tthis.increment = function (key) {\n\t\tif (!(key in priv)) {\n\t\t\treturn;\n\t\t}\n\t\tpriv[key]++;\n\t}\n\n\tthis.nextIndex = function (key) {\n\t\tif (!(key in priv)) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn priv[key] + 1;\n\t}\n\n\treturn this;\n\n};","var WPTB_ElementObject = function ( data ) {\n let DOMElement, kindIndexProt, copy;\n if( ! data.elemProt ) {\n DOMElement = document.createElement('div'),\n kindIndexProt = undefined,\n copy = false;\n DOMElement.classList.add( 'wptb-' + data.kind + '-container', 'wptb-ph-element', 'wptb-item-javascript-indic' );\n \n let wpTemplateId = 'wptb-' + data.kind + '-content';\n let template = wp.template( wpTemplateId );\n data.node = DOMElement;\n let itemHtml = template( data );\n\n itemHtml = itemHtml.replace(/\\r|\\n|\\t/g, '').trim();\n DOMElement.innerHTML = itemHtml;\n } else {\n DOMElement = data.elemProt.cloneNode( true );\n DOMElement.classList.remove( 'wptb-directlyhovered' );\n let wptbElementMutch = data.elemProt.className.match( /wptb-element-((.+-)\\d+)/i );\n if ( wptbElementMutch && Array.isArray( wptbElementMutch ) ) {\n kindIndexProt = wptbElementMutch[1];\n };\n copy = true;\n \n if( data.tinyMceClear ) {\n DOMElement = WPTB_Helper.elementClearFromTinyMce( DOMElement );\n }\n }\n \n let inElems = DOMElement.querySelectorAll( '.wptb-in-element' );\n if( inElems.length > 0 ) {\n for ( let i = 0; i < inElems.length; i++ ) {\n let inElemObj = {};\n inElemObj.getDOMElement = function() {\n return inElems[i];\n }\n \n applyGenericItemSettings( inElemObj );\n }\n }\n \n window.addEventListener( 'item:onmouseenter', function( event ) {\n //console.log( event );\n }, false);\n \n \n this.kind = data.kind;\n this.getDOMElement = function () {\n return DOMElement;\n };\n \n applyGenericItemSettings( this, kindIndexProt, copy );\n return this;\n}\n\n\n","var WPTB_ElementOptions = function ( element, index, kindIndexProt ) {\n\n var node = element.getDOMElement();\n node.addEventListener( 'click', function() {\n WPTB_Helper.elementOptionsSet( element.kind, this );\n }, {capture: true} );\n};","var WPTB_Helper = {\n hexToRgb: function( hex ) {\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec( hex );\n return result ? 'rgb(' + parseInt( result[1], 16 ) + ',' + parseInt( result[2], 16 ) + ',' + parseInt( result[3], 16 ) + ')' : null;\n },\n rgbToHex: function ( rgb ) {\n var rgb = rgb.match( /^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i );\n\n return ( rgb && rgb.length === 4 ) ? \"#\" +\n ( \"0\" + parseInt( rgb[1],10 ).toString( 16 )).slice( -2 ) +\n ( \"0\" + parseInt( rgb[2],10 ).toString( 16 )).slice( -2 ) +\n ( \"0\" + parseInt( rgb[3],10 ).toString( 16 )).slice( -2 ) : '';\n },\n isHex: function( hex ) {\n let regex = new RegExp('^#(?:[A-Fa-f0-9]{3}){1,2}$');\n return regex.test( hex );\n },\n getElementIcon: function ( icon_directory ) {\n let hostName = location.protocol + '//' + location.hostname;\n let img = document.createElement( 'img' );\n img.src = icon_directory;\n return img;\n },\n elementDragEndClear: function() {\n let wptbMovingMode = document.getElementsByClassName( 'wptb-moving-mode' );\n if ( wptbMovingMode.length > 0 ) {\n for( let i = 0; i < wptbMovingMode.length; i++ ) {\n wptbMovingMode[i].classList.remove( 'wptb-moving-mode' );\n }\n }\n\n let wptbDropHandles = document.getElementsByClassName( 'wptb-drop-handle' );\n if ( wptbDropHandles.length > 0 ) {\n for( let i = 0; i < wptbDropHandles.length; i++ ) {\n wptbDropHandles[i].style.display = 'none';\n }\n }\n\n let wptbDropBorderMarkers = document.getElementsByClassName( 'wptb-drop-border-marker' );\n if ( wptbDropBorderMarkers.length > 0 ) {\n for( let i = 0; i < wptbDropBorderMarkers.length; i++ ) {\n wptbDropBorderMarkers[i].style.display = 'none';\n }\n }\n },\n linkHttpCheckChange: function( link ) {\n if ( link ) {\n if ( link.indexOf( 'http://' ) == -1 && link.indexOf( 'https://' ) == -1 ) {\n let linkArr = link.split( '/' ),\n linkClean;\n if ( Array.isArray( linkArr ) && linkArr.length > 0 ) {\n linkClean = linkArr[linkArr.length - 1];\n }\n return document.location.protocol + '//' + linkClean;\n } else { \n return link;\n }\n } else {\n return '';\n }\n },\n dataTitleColumnSet: function( table ) {\n let rows = table.rows,\n rowHead = rows[0];\n let computedStyleRowHead = getComputedStyle( rowHead );\n \n let rowHeadChildren = rowHead.children;\n let contentsForHeader = {};\n for( let i = 0; i < rowHeadChildren.length; i++ ) {\n let tdElements = rowHeadChildren[i].children;\n \n for( let j = 0; j < tdElements.length; j++ ) {\n let element = tdElements[j];\n if( element.classList.contains( 'wptb-ph-element' ) ) {\n let infArr = element.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr[1] == 'text' ) {\n let p = element.querySelector( 'p' ),\n textContent = p.textContent,\n textAlign = p.style.textAlign;\n contentsForHeader[rowHeadChildren[i].dataset.xIndex] = [textContent, element.style.fontSize, \n element.style.color, computedStyleRowHead.backgroundColor, textAlign];\n break;\n }\n }\n }\n if( ! contentsForHeader[rowHeadChildren[i].dataset.xIndex] ) {\n contentsForHeader[rowHeadChildren[i].dataset.xIndex] = ['', '', \n '', computedStyleRowHead.backgroundColor, ''];\n }\n }\n for ( let i = 1; i < rows.length; i++ ) {\n let thisRow = rows[i],\n thisRowChildren = thisRow.children;\n for( let j = 0; j < thisRowChildren.length; j++ ) {\n if ( contentsForHeader[thisRowChildren[j].dataset.xIndex] ) {\n thisRowChildren[j].dataset.wptbTitleColumn = contentsForHeader[thisRowChildren[j].dataset.xIndex][0];\n thisRowChildren[j].dataset.wptbTitleColumnFontSize = contentsForHeader[thisRowChildren[j].dataset.xIndex][1];\n thisRowChildren[j].dataset.wptbTitleColumnColor = contentsForHeader[thisRowChildren[j].dataset.xIndex][2];\n thisRowChildren[j].dataset.wptbTitleBackgroundColor = contentsForHeader[thisRowChildren[j].dataset.xIndex][3];\n thisRowChildren[j].dataset.wptbTitleAlign = contentsForHeader[thisRowChildren[j].dataset.xIndex][4];\n } else {\n thisRowChildren[j].dataset.wptbTitleColumn = '';\n thisRowChildren[j].dataset.wptbTitleColumnFontSize = '';\n thisRowChildren[j].dataset.wptbTitleColumnColor = '';\n thisRowChildren[j].dataset.wptbTitleBackgroundColor = '';\n thisRowChildren[j].dataset.wptbTitleAlign = '';\n }\n }\n }\n },\n findAncestor: function( el, cls ) {\n while ( ( el = el.parentElement ) && !el.classList.contains( cls ) );\n return el;\n },\n rowIsTop: function( row ) {\n var parent = row.parentNode;\n if( parent.children[0] == row ) {\n return true;\n } else {\n return false;\n }\n },\n getSelectionText: function() {\n var txt = '';\n if (txt = window.getSelection) {\n txt = window.getSelection().toString();\n } else {\n txt = document.selection.createRange().text;\n }\n return txt;\n },\n elementOptionsPanelClear: function() {\n let elementOptionsGroup = document.getElementById( 'element-options-group' );\n if( elementOptionsGroup ) {\n elementOptionsGroup.innerHTML = '';\n }\n },\n wpColorPickerCheckChangeForTableStateSaving: function( event ) {\n if( event.originalEvent.type == 'external' ) {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n } else {\n let wpPickerContainer = WPTB_Helper.findAncestor( event.target, 'wp-picker-container' );\n if( wpPickerContainer ) {\n if( event.originalEvent.type == 'square' || event.originalEvent.type == 'strip' ) {\n let body = document.getElementsByTagName( 'body' )[0];\n body.removeEventListener( 'mouseup', WPTB_Helper.irisStripMouseUpStateSaveManager, false );\n body.addEventListener( 'mouseup', WPTB_Helper.irisStripMouseUpStateSaveManager, false );\n }\n }\n }\n },\n irisStripMouseUpStateSaveManager: function() {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n \n let body = document.getElementsByTagName( 'body' )[0];\n body.removeEventListener( 'mouseup', WPTB_Helper.irisStripMouseUpStateSaveManager, false );\n },\n wpColorPickerClear: function( attribute, isId ) {\n let input;\n if( isId ) {\n input = [document.getElementById( attribute )];\n input.length = 1;\n } else {\n input = document.getElementsByClassName( attribute );\n }\n for( let i = 0; i < input.length; i++ ) {\n let wpPickerContainer = WPTB_Helper.findAncestor( input[i], 'wp-picker-container' );\n if( wpPickerContainer ) {\n let parent = wpPickerContainer.parentNode;\n parent.removeChild( wpPickerContainer );\n let newInput = document.createElement( 'input' );\n if( isId ) {\n newInput.setAttribute( 'id', attribute );\n } else {\n newInput.classList.add( 'wptb-element-property', attribute );\n }\n newInput.value = \"\";\n parent.appendChild( newInput );\n }\n }\n },\n detectMode: function() {\n var url = window.location.href,\n regex = new RegExp('[?&]table(=([^&#]*)|&|#|$)'),\n results = regex.exec(url);\n if (!results) return false;\n if (!results[2]) return '';\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n },\n getColumnWidth: function( table, cell ) {\n let xIndex = cell.dataset.xIndex;\n let xIndexes = table.querySelectorAll( '[data-x-index=\"' + xIndex + '\"]' );\n let cellWidth = cell.getCellDimensions().width;\n for( let i = 0; i < xIndexes.length; i++ ) {\n if( cellWidth > xIndexes[i].getCellDimensions().width ) {\n cellWidth = xIndexes[i].getCellDimensions().width;\n }\n }\n return cellWidth;\n },\n getRowHeight: function( table, cell ) {\n let yIndex = cell.dataset.yIndex;\n let yIndexes = table.querySelectorAll( '[data-y-index=\"' + yIndex + '\"]' );\n let cellHeight = cell.getCellDimensions().height;\n for( let i = 0; i < yIndexes.length; i++ ) {\n if( cellHeight > yIndexes[i].getCellDimensions().height ) {\n cellHeight = yIndexes[i].getCellDimensions().height;\n }\n }\n return cellHeight;\n },\n newElementProxy: function( el ) {\n if( el ) {\n let data = {kind: el};\n return new WPTB_ElementObject( data );\n }\n },\n wpColorPickerChange: function( event, ui ) {\n let uiColor;\n if( ui ) {\n uiColor = ui.color.toString();\n } else {\n uiColor = '';\n }\n \n let parent = WPTB_Helper.findAncestor( event.target, 'wp-picker-input-wrap' ).getElementsByClassName( 'wptb-color-picker' )[0], classe, type, ps, number;\n classe = parent.dataset.element.match(/wptb-options-(.+)-(\\d+)/i);\n type = classe[1];\n number = classe[2];\n let affectedEl = document.getElementsByClassName( 'wptb-element-' + type + '-' + number )[0];\n if ( type == 'button' ) {\n if ( parent.dataset.type == 'button-text-color' ) {\n affectedEl.getElementsByClassName( 'wptb-button' )[0].style.color = uiColor;\n } else {\n affectedEl.getElementsByClassName( 'wptb-button' )[0].style.backgroundColor = uiColor;\n }\n } else if( type == 'list' ) {\n let ps = affectedEl.querySelectorAll( 'p' );\n if( ps.length > 0 ) {\n for ( let i = 0; i < ps.length; i++ ) {\n ps[i].style.color = uiColor;\n }\n }\n } else if( type == 'star_rating' ) {\n if ( parent.dataset.type == 'star-color' ) {\n let ratingStar = affectedEl.querySelectorAll('li');\n for( let i = 0; i < ratingStar.length; i++ ) {\n let span = ratingStar[i].getElementsByTagName( 'span' );\n for( let j = 0; j < span.length; j++ ) {\n span[j].style.fill = uiColor;\n }\n }\n } else if( parent.dataset.type == 'numeral-rating-color' ) {\n let wptbTextMessageSize = affectedEl.querySelector('.wptb-number-rating');\n wptbTextMessageSize.style.color = uiColor;\n }\n\n } else {\n affectedEl.style.color = uiColor;\n }\n },\n numberImputSize: function ( wptbNumberInputs, maxCount, maxValue ) {\n wptbNumberInputs.onkeydown = function() {\n let thisValue = this.value;\n thisValue = String( thisValue );\n if ( thisValue[0] == 0 ) {\n this.value = \"\";\n } else {\n thisValue = thisValue.substring( 0, maxCount );\n this.value = thisValue;\n }\n }\n wptbNumberInputs.onkeyup = function( ) {\n let thisValue = this.value;\n if ( parseInt( thisValue, 10 ) > parseInt( maxValue, 10 ) ) {\n this.value = maxValue;\n }\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n }\n },\n ucfirst: function( str ) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n },\n wptbDocumentEventGenerate: function( eventName, element, details ) {\n if( eventName && element ) {\n if( ! details ) {\n details = true;\n }\n let event = new CustomEvent( eventName, { detail: details, bubbles: true } );\n element.dispatchEvent( event );\n }\n },\n // run script for the pointed element\n elementStartScript: function( element ) {\n //let script = element.getElementsByTagName( 'script' );\n let infArr = element.className.match(/wptb-element-(.+)-(\\d+)/i);\n if( infArr && Array.isArray( infArr ) ) {\n let kind = infArr[1];\n if( kind ) {\n// let wpTemplateId = 'wptb-' + kind + '-script';\n// let template = wp.template( wpTemplateId );\n// let data = {elemClass: infArr[0]};\n// let elementScriptText = template( data );\n// elementScriptText = elementScriptText.replace(/\\r|\\n|\\t/g, '').trim();\n//\n// let scriptNew = document.createElement( 'script' );\n// scriptNew.setAttribute( 'type', 'text/javascript' );\n// scriptNew.innerHTML = elementScriptText;\n// element.parentNode.appendChild( scriptNew );\n \n// element.parentNode.removeChild( scriptNew );\n if( kind in WPTB_ElementsScriptsLauncher ) {\n WPTB_ElementsScriptsLauncher[kind]( element );\n }\n }\n }\n },\n // deletes event handlers from the pointed option element and from all his daughter elements\n deleteEventHandlers: function( element ) {\n if( element ) {\n jQuery( element ).off();\n let elementChildren = element.children;\n if( elementChildren ) {\n for ( let i = 0; i < elementChildren.length; i++ ) {\n WPTB_Helper.deleteEventHandlers( elementChildren[i] );\n }\n }\n } else {\n return;\n }\n },\n // replace all occurrences in a string\n replaceAll: function( string, search, replace ){\n return string.split( search ).join( replace );\n },\n // clears code from TinyMCE attributes\n elementClearFromTinyMce: function( element ) {\n let mceContentBodys = element.querySelectorAll( '.mce-content-body' );\n if( mceContentBodys.length > 0 ) {\n for ( let k = 0; k < mceContentBodys.length; k++ ) {\n mceContentBodys[k].classList.remove( 'mce-content-body' );\n }\n }\n\n let dataMceStyle = element.querySelectorAll( '[data-mce-style]' );\n if ( dataMceStyle.length > 0 ) {\n for ( let k = 0; k < dataMceStyle.length; k++ ) {\n dataMceStyle[k].removeAttribute( 'data-mce-style' );\n }\n }\n \n let mceEditFocus = element.querySelectorAll( '.mce-edit-focus' );\n if( mceEditFocus.length > 0 ) {\n for ( let k = 0; k < mceEditFocus.length; k++ ) {\n mceEditFocus[k].classList.remove( 'mce-edit-focus' );\n }\n }\n\n let contentEditable = element.querySelectorAll( '[contenteditable]' );\n if ( contentEditable.length > 0 ) {\n for ( let k = 0; k < contentEditable.length; k++ ) {\n contentEditable[k].removeAttribute( 'contenteditable' );\n }\n }\n\n let spellCheck = element.querySelectorAll( '[spellcheck]' );\n if ( spellCheck.length > 0 ) {\n for ( let k = 0; k < spellCheck.length; k++ ) {\n spellCheck[k].removeAttribute( 'spellcheck' );\n }\n }\n\n let mceIds = element.querySelectorAll( '[id^=mce_]' );\n if ( mceIds.length > 0 ) {\n for ( let k = 0; k < mceIds.length; k++ ) {\n mceIds[k].removeAttribute( 'id' );\n }\n }\n \n return element;\n },\n elementOptionContainerCustomClassSet: function( targetInput, customClassForContainer ) {\n if( targetInput && customClassForContainer ) {\n let containerElement = WPTB_Helper.findAncestor( targetInput, 'wptb-element-option' );\n if( containerElement ) {\n containerElement.classList.add( customClassForContainer );\n }\n }\n },\n elementOptionContainerAdditionalStyles: function( targetInput, containerAdditionalStyles ) {\n if( targetInput && containerAdditionalStyles ) {\n let containerElement = WPTB_Helper.findAncestor( targetInput, 'wptb-element-option' );\n let containerStylesArrOne = containerAdditionalStyles.split( ';' );\n\n if( containerElement && containerStylesArrOne ) {\n function containerStylesSet( containerStyleStr, containerElement ) {\n if( containerStyleStr ) {\n containerStyleStrArr = containerStyleStr.split( ':' );\n\n if( containerStyleStrArr && Array.isArray( containerStyleStrArr ) ) {\n containerElement.style[containerStyleStrArr[0]] = containerStyleStrArr[1];\n }\n }\n }\n if( containerStylesArrOne && Array.isArray( containerStylesArrOne ) ) {\n for( let i = 0; i < containerStylesArrOne.length; i++ ) {\n if( containerStylesArrOne[i] ) {\n containerStylesSet( containerStylesArrOne[i], containerElement );\n }\n }\n } else {\n containerStylesSet( containerStylesArrOne, containerElement );\n }\n }\n }\n },\n // function which set handler for event of changes of control\n controlsInclude: function( element, functionHandler ) {\n if( element && typeof element === 'object' && typeof functionHandler === 'function' ) {\n element.addEventListener( 'element:controls:active', function() {\n if( ! element.hasOwnProperty( 'сontrolsConnectIndic' ) || element.сontrolsConnectIndic !== true ) {\n let infArr = element.className.match( /wptb-element-(.+)-(\\d+)/i ),\n elementKind;\n\n if( infArr && Array.isArray( infArr ) ) {\n elementKind = infArr[1];\n }\n\n// if( ! element.hasOwnProperty( 'сontrolsConnectIndic' ) || element.сontrolsConnectIndic !== true && elementKind ) {\n// let elementsSettingsTemplateJs = document.getElementsByClassName( 'wptb-element-datas' );\n// if( elementsSettingsTemplateJs.length > 0 ) {\n// elementsSettingsTemplateJs = elementsSettingsTemplateJs[0];\n//\n// let elementsSettings = elementsSettingsTemplateJs.innerHTML;\n// let controlClassesNames = [];\n// if( elementsSettings ) {\n// elementsSettings = elementsSettings.trim();\n// elementsSettings = JSON.parse( elementsSettings );\n// if( elementsSettings && typeof elementsSettings === 'object' ) {\n// if( 'tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2] in elementsSettings ) {\n// let elementSettings = elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]];\n// if( elementSettings && typeof elementSettings === 'object' ) {\n// Object.keys( elementSettings ).forEach( function( key ) {\n// let regularText = new RegExp( 'data-wptb-el-' + elementKind + '-(\\\\d+)-([a-zA-Z0-9_-]+)', \"i\" );\n// let keyInfArr = key.match( regularText );\n// if( keyInfArr && Array.isArray( keyInfArr ) ) {\n// let controlClass = key.replace( 'data-', '' );\n// controlClassesNames.push( [controlClass, keyInfArr[2]] );\n// }\n// });\n// }\n// }\n// }\n// }\n// }\n// }\n if( elementKind ){\n let elementOptionsContainer = document.querySelector( '.wptb-element-options.wptb-options-' + infArr[1] + '-' + infArr[2] );\n\n let elementOptions = elementOptionsContainer.querySelectorAll( '.wptb-element-option' );\n\n for( let i = 0; i < elementOptions.length; i++ ) {\n let controlActiveElement = elementOptions[i].querySelector( '.wptb-element-property' );\n if( controlActiveElement ) {\n let regularText = new RegExp( 'wptb-el-' + elementKind + '-(\\\\d+)-([a-zA-Z0-9_-]+)', \"i\" );\n let controlInfArr = controlActiveElement.className.match( regularText );\n if( controlInfArr && Array.isArray( controlInfArr ) ) {\n let controlUnicClassName = controlInfArr[0];\n\n element.addEventListener( 'wptb-control:' + controlUnicClassName, function() {\n let controls = {};\n let controlName = controlInfArr[2];\n let control = document.getElementsByClassName( controlUnicClassName );\n if( control.length > 0 && controlName ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( control );\n\n controls[controlName] = targetControlValue;\n }\n\n functionHandler( controls, element );\n }, false );\n }\n\n element.сontrolsConnectIndic = true;\n }\n }\n }\n }\n }, false );\n }\n },\n oneControlInclude: function( element, functionHandler, controlName ) {\n if( element && typeof element === 'object' && typeof functionHandler === 'function' && typeof controlName === 'string' ) {\n let infArr = element.className.match( /wptb-element-((.+-)\\d+)/i ),\n elementKind;\n \n if( infArr && Array.isArray( infArr ) ) {\n elementKind = infArr[1].split( '-' )[0];\n \n let wptbContrlStacksConfigId = 'wptb-' + elementKind + '-control-stack';\n let tmplControlsConfig = wp.template( wptbContrlStacksConfigId );\n let data = {\n container: '.' + infArr[0]\n };\n let jsonControlsConfigJson = tmplControlsConfig( data );\n let jsonControlsConfig = JSON.parse( jsonControlsConfigJson );\n \n if( jsonControlsConfig && typeof jsonControlsConfig === 'object' && jsonControlsConfig.hasOwnProperty( controlName ) ) {\n let controlClassName = 'wptb-el-' + infArr[1] + '-' + controlName;\n \n element.addEventListener( 'wptb-control:' + controlClassName, function( event ) {\n let control = document.getElementsByClassName( controlClassName );\n if( control.length > 0 ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( control );\n\n functionHandler( targetControlValue, element );\n }\n }, false );\n }\n }\n } else {\n return false;\n }\n },\n //\n innerElementCopyIncludeHandler: function( element, functionHandler ) {\n if( element && typeof element === 'object' && typeof functionHandler === 'function' ) {\n element.addEventListener( 'wptb-inner-element:copy', function( event ) {\n let innerElement = event.detail;\n if( innerElement ) {\n WPTB_Helper.elementClearFromTinyMce( innerElement );\n functionHandler( innerElement, element );\n }\n }, false );\n }\n },\n //\n appearDependOnControl: function( dependOn, targetControlElementClass ) {\n if( Array.isArray( dependOn ) ) {\n let dependOnControlName = dependOn[0];\n let infArr = targetControlElementClass.match( /wptb-el-((.+-)\\d+)-(.+)/i );\n \n if( infArr && Array.isArray( infArr ) ) {\n let controlName = infArr[3];\n\n let dependOnControlElementClass = targetControlElementClass.replace( controlName, dependOnControlName );\n\n let dependOnControlElement = document.getElementsByClassName( dependOnControlElementClass );\n\n if( dependOnControlElement.length > 0 ) {\n dependOnControlElement = dependOnControlElement[0];\n let targetControlElement = document.getElementsByClassName( targetControlElementClass );\n if( targetControlElement.length > 0 ) {\n targetControlElement = targetControlElement[0];\n let controlContainerElem = WPTB_Helper.findAncestor( targetControlElement, 'wptb-element-option' );\n\n if( controlContainerElem ) {\n function showHideDependOnControlElement( dependOnControlElementClass, dependOn ) {\n \n// let elementsSettingsTemplateJs = document.getElementsByClassName( 'wptb-element-datas' );\n// if( elementsSettingsTemplateJs.length > 0 ) {\n// elementsSettingsTemplateJs = elementsSettingsTemplateJs[0];\n//\n// let elementsSettings = elementsSettingsTemplateJs.innerHTML;\n// if( elementsSettings ) {\n// elementsSettings = elementsSettings.trim();\n// elementsSettings = JSON.parse( elementsSettings );\n// if( elementsSettings && typeof elementsSettings === 'object' && \n// ( 'tmpl-wptb-el-datas-' + dependOnControlElementKind ) in elementsSettings ) {\n// let elementSettings = elementsSettings['tmpl-wptb-el-datas-' + dependOnControlElementKind];\n// if( elementSettings && typeof elementSettings === 'object' && \n// ( 'data-wptb-el-' + dependOnControlElementKind + '-' + dependOnControlName ) in elementSettings ) {\n// let elementSettingValue = elementSettings['data-wptb-el-' + dependOnControlElementKind + '-' + dependOnControlName];\n// \n// if( elementSettingValue ) {\n// if( dependOn[1] && Array.isArray( dependOn[1] ) && \n// ( dependOn[1].indexOf( elementSettingValue ) !== -1 ) ) {\n// controlContainerElem.style.display = 'block';\n// } else if( dependOn[2] && Array.isArray( dependOn[2] ) && \n// ( dependOn[2].indexOf( elementSettingValue ) !== -1 ) ) {\n// controlContainerElem.style.display = 'none';\n// }\n// }\n// }\n// }\n// }\n// }\n if( dependOnControlElementClass ) {\n let dependOnControlElements = document.getElementsByClassName( dependOnControlElementClass );\n if( dependOnControlElements.length > 0 ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( dependOnControlElements );\n \n if( dependOn[1] && Array.isArray( dependOn[1] ) && \n ( dependOn[1].indexOf( targetControlValue ) !== -1 ) ) {\n controlContainerElem.style.display = 'block';\n } else if( dependOn[2] && Array.isArray( dependOn[2] ) && \n ( dependOn[2].indexOf( targetControlValue ) !== -1 ) ) {\n controlContainerElem.style.display = 'none';\n }\n }\n }\n }\n\n showHideDependOnControlElement( dependOnControlElementClass, dependOn );\n\n dependOnControlElement.addEventListener( 'change', function( event ) {\n showHideDependOnControlElement( dependOnControlElementClass, dependOn );\n }, false );\n }\n }\n }\n }\n }\n },\n //\n controlsStateManager: function ( targetControlClass, controlChangeIndic ) {\n let targetControls = document.getElementsByClassName( targetControlClass );\n if( targetControls.length > 0 ) {\n //targetControls = targetControls[0];\n \n let infArr = targetControlClass.match( /wptb-el-((.+-)\\d+)-(.+)/i );\n \n if( infArr && Array.isArray( infArr ) ) {\n let selectorElement;\n selectorElement = document.querySelector( '.wptb-element-' + infArr[1] );\n \n if( selectorElement ) {\n let elementsSettingsTemplatesJs;\n let elementSettings = {};\n let elementsSettings;\n elementsSettingsTemplatesJs = document.getElementsByClassName( 'wptb-element-datas' );\n if( elementsSettingsTemplatesJs.length == 0 || elementsSettingsTemplatesJs[0].innerHTML == '' ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( targetControls );\n elementSettings['data-' + targetControlClass] = targetControlValue;\n\n elementsSettings = {};\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] = elementSettings;\n elementsSettings = JSON.stringify( elementsSettings );\n\n if( elementsSettingsTemplatesJs.length == 0 ) {\n elementsSettingsTemplatesJs = document.createElement( 'script' );\n elementsSettingsTemplatesJs.setAttribute( 'type', 'text/html' );\n elementsSettingsTemplatesJs.setAttribute( 'class', 'wptb-element-datas' );\n } else {\n elementsSettingsTemplatesJs = elementsSettingsTemplatesJs[0];\n }\n\n elementsSettingsTemplatesJs.innerHTML = elementsSettings;\n\n let body = document.getElementsByTagName('body')[0];\n body.appendChild( elementsSettingsTemplatesJs );\n } else {\n elementsSettingsTemplatesJs = elementsSettingsTemplatesJs[0];\n elementsSettings = elementsSettingsTemplatesJs.innerHTML;\n if( elementsSettings ) {\n elementsSettings = elementsSettings.trim();\n elementsSettings = JSON.parse( elementsSettings );\n\n if( elementsSettings && typeof elementsSettings === 'object' ) {\n \n \n if( controlChangeIndic ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( targetControls );\n if( ! ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) || \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] !== 'object') {\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] = {};\n }\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass] = targetControlValue;\n elementsSettingsTemplatesJs.innerHTML = JSON.stringify( elementsSettings );\n } else if( ! ( ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) && \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] === 'object' && \n ( 'data-' + targetControlClass ) in elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] ) ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( targetControls );\n if( ! ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) || \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] !== 'object') {\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] = {};\n }\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass] = targetControlValue;\n elementsSettingsTemplatesJs.innerHTML = JSON.stringify( elementsSettings );\n } else if( ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) && \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] === 'object' && \n ( 'data-' + targetControlClass ) in elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] ) {\n for( let i = 0; i < targetControls.length; i++ ) {\n if( targetControls[i].type == 'checkbox' ) {\n let targetControlValue;\n if( targetControls[i].name ) {\n targetControlValue = elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass][targetControls[i].name];\n } else {\n targetControlValue = elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass];\n }\n \n if( targetControlValue == 'checked' ) {\n targetControls[i].checked = true;\n } else if( targetControlValue == 'unchecked' ) {\n targetControls[i].checked = false;\n }\n } else {\n targetControls[i].value = elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass];\n }\n }\n }\n }\n }\n }\n }\n }\n }\n },\n //\n targetControlValueGet: function( targetControls ) {\n let targetControlValue;\n for( let i = 0; i < targetControls.length; i++ ) {\n if( targetControls[i].type == 'checkbox' && targetControls[i].name ) {\n if( ! targetControlValue ) targetControlValue = {};\n if( targetControls[i].checked == true ) {\n targetControlValue[targetControls[i].name] = 'checked';\n } else {\n targetControlValue[targetControls[i].name] = 'unchecked';\n }\n } else if( targetControls[i].type == 'checkbox' ) {\n if( targetControls[i].checked == true ) {\n targetControlValue = 'checked';\n } else {\n targetControlValue = 'unchecked';\n }\n } else if( targetControls[i].type ) {\n targetControlValue = targetControls[i].value;\n } else if( targetControls[i].dataset.alignmentValue && targetControls[i].classList.contains( 'selected' ) ){\n targetControlValue = targetControls[i].dataset.alignmentValue;\n }\n }\n return targetControlValue;\n },\n //\n elementControlsStateCopy: function( elementProt, copyElem ) {\n if( elementProt && copyElem ) {\n let infArrProt = elementProt.className.match( /wptb-element-((.+-)\\d+)/i );\n let infArrCopy = copyElem.className.match( /wptb-element-((.+-)\\d+)/i );\n if( infArrProt && Array.isArray( infArrProt ) &&\n infArrCopy && Array.isArray( infArrCopy )) {\n let elemProtKind = infArrProt[1];\n let elemCopyKind = infArrCopy[1];\n let elementsSettingsTemplateJs = document.getElementsByClassName( 'wptb-element-datas' );\n if( elementsSettingsTemplateJs.length > 0 ) {\n elementsSettingsTemplateJs = elementsSettingsTemplateJs[0];\n \n let elementsSettings = elementsSettingsTemplateJs.innerHTML;\n if( elementsSettings ) {\n elementsSettings = elementsSettings.trim();\n elementsSettings = JSON.parse( elementsSettings );\n \n if( elementsSettings && typeof elementsSettings === 'object' ) {\n let elementSettingsProt = elementsSettings['tmpl-wptb-el-datas-' + elemProtKind];\n if( elementSettingsProt && typeof elementSettingsProt === 'object' ) {\n let elementSettingsCopy = {};\n \n Object.keys( elementSettingsProt ).forEach( function( key ) {\n let elementSettingValue = elementSettingsProt[key];\n let elementSettingKeyCopy = key.replace( elemProtKind, elemCopyKind );\n elementSettingsCopy[elementSettingKeyCopy] = elementSettingValue;\n });\n \n if( Object.keys( elementSettingsCopy ).length > 0 ) {\n elementsSettings['tmpl-wptb-el-datas-' + elemCopyKind] = elementSettingsCopy;\n \n elementsSettings = JSON.stringify( elementsSettings );\n elementsSettingsTemplateJs.innerHTML = elementsSettings;\n }\n }\n }\n }\n }\n }\n }\n },\n //\n elementControlsStateDelete: function( element, nameControl ) {\n let infArr = element.className.match( /wptb-element-(.+)-(\\d+)/i );\n let body = document.getElementsByTagName( 'body' )[0];\n let wptbElementDatas = body.getElementsByClassName( 'wptb-element-datas' );\n if( infArr && Array.isArray( infArr ) && wptbElementDatas.length > 0 ) {\n wptbElementDatas = wptbElementDatas[0];\n let elementsSettings = wptbElementDatas.innerHTML;\n if( elementsSettings ) {\n elementsSettings = elementsSettings.trim();\n elementsSettings = JSON.parse( elementsSettings );\n if( elementsSettings && typeof elementsSettings === 'object' &&\n ( ( 'tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2] ) in elementsSettings ) ) {\n if( ! nameControl ) {\n delete elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]];\n } else {\n if( elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]] && \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]] === 'object' &&\n ( 'data-wptb-el-' + infArr[1] + '-' + infArr[2] + '-' + nameControl ) in elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]] ) {\n delete elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]]['data-wptb-el-' + infArr[1] + '-' + infArr[2] + '-' + nameControl];\n }\n }\n\n if( Object.keys( elementsSettings ).length == 0 ) {\n body.removeChild( wptbElementDatas );\n } else {\n elementsSettings = JSON.stringify( elementsSettings );\n wptbElementDatas.innerHTML = elementsSettings;\n }\n }\n }\n }\n },\n // \n elementOptionsSet: function( kind, element ) {\n // get controls config for this element\n let wptbContrlStacksConfigId = 'wptb-' + kind + '-control-stack';\n let tmplControlsConfig = wp.template( wptbContrlStacksConfigId );\n let data;\n let elementContainerClass;\n let elementOptionClassIndic;\n let elementOptionsGroup;\n let elementOptionsGroupId;\n let wptbelementOptionClass;\n \n // create containers for inserting controls of this item and their scripts\n let wptbelementOptionsContainer = document.createElement( 'div' );\n let wptbelementOptionsScriptsContainer = document.createElement( 'div' );\n \n let infArr = element.className.match( /wptb-element-((.+-)\\d+)/i );\n if( ! infArr && element.classList.contains( 'wptb-preview-table' ) ) {\n let table_id = WPTB_Helper.detectMode();\n element.classList.add( 'wptb-element-main-table_setting-' + table_id );\n infArr = element.className.match( /wptb-element-((.+-)\\d+)/i );\n }\n data = {\n container: '.' + infArr[0]\n };\n\n elementContainerClass = infArr[0];\n elementOptionClassIndic = infArr[1];\n \n if( ! element.classList.contains( 'wptb-preview-table' ) ) {\n let children = document.getElementById( 'element-options-group' ).childNodes;\n for ( let i = 0; i < children.length; i++) {\n if ( children[i].style )\n children[i].style.display = 'none';\n }\n \n // hide wptb-elements-container and wptb-settings-section\n document.getElementsByClassName( 'wptb-elements-container' )[0].style.display = 'none';\n document.getElementsByClassName( 'wptb-settings-section' )[0].style.display = 'none';\n\n // show element-options-group \n document.getElementById( 'element-options-group' ).style.display = 'block';\n \n elementOptionsGroupId = 'element-options-group';\n wptbelementOptionClass = 'wptb-element-option';\n } else {\n elementOptionsGroupId = 'table-settings-group';\n wptbelementOptionClass = 'wptb-element-option';\n }\n \n wptbelementOptionsContainer.classList.add( 'wptb-element-options', 'wptb-options-' + infArr[1] );\n wptbelementOptionsScriptsContainer.classList.add( 'wptb-element-options-scripts', 'wptb-options-' + infArr[1] );\n\n let jsonControlsConfigJson = tmplControlsConfig( data );\n let jsonControlsConfig = JSON.parse( jsonControlsConfigJson );\n\n // clear elements from options group\n //document.getElementById( 'element-options-group' ).innerHTML = '';\n elementOptionsGroup = document.getElementById( elementOptionsGroupId );\n let elementOptionsGroupChildren = [...elementOptionsGroup.children];\n for( let i = 0; i < elementOptionsGroupChildren.length; i++ ) {\n elementOptionsGroup.removeChild( elementOptionsGroupChildren[i] );\n }\n\n \n // insert created container into element-option-group tag\n document.getElementById( elementOptionsGroupId ).appendChild( wptbelementOptionsContainer );\n document.getElementById( elementOptionsGroupId ).appendChild( wptbelementOptionsScriptsContainer );\n\n // show created container\n wptbelementOptionsContainer.style.display = 'block';\n \n // array for save all scrips for each controls\n let controlScriptsArr = [];\n\n // array for keep \"appear depend on\" parametrs\n let controlappearDependOnControl = [];\n\n // create controls\n let i = 0;\n Object.keys( jsonControlsConfig ).forEach( function( key ) {\n let data = jsonControlsConfig[key];\n data.controlKey = key;\n\n // get necessary wp js template\n let tmplControlTemplate = wp.template( 'wptb-' + data.type + '-control' );\n\n data.elemContainer = elementContainerClass;\n data.elementControlTargetUnicClass = 'wptb-el-' + elementOptionClassIndic + '-' + data.controlKey;\n let controlTemplate = tmplControlTemplate( data );\n\n if( 'appearDependOnControl' in data ) {\n if( Array.isArray( data.appearDependOnControl ) ) {\n controlappearDependOnControl.push( [data.appearDependOnControl, data.elementControlTargetUnicClass] );\n }\n }\n\n let wptbElementOptionContainer = document.createElement( 'div' );\n wptbElementOptionContainer.classList.add( wptbelementOptionClass, 'wptb-settings-items' );\n\n if( data.customClassForContainer ) {\n wptbElementOptionContainer.classList.add( data.customClassForContainer );\n }\n\n if( data.containerAdditionalStyles ) {\n wptbElementOptionContainer.setAttribute( 'style', data.containerAdditionalStyles );\n }\n\n wptbElementOptionContainer.innerHTML = controlTemplate;\n\n wptbelementOptionsContainer.appendChild( wptbElementOptionContainer );\n\n let helperJavascriptElem = wptbElementOptionContainer.getElementsByTagName( 'wptb-template-script' );\n if( helperJavascriptElem.length > 0 ) {\n helperJavascriptElem = helperJavascriptElem[0];\n let helperJavascriptCode = helperJavascriptElem.innerText;\n wptbElementOptionContainer.removeChild( helperJavascriptElem );\n let script = document.createElement( 'script' );\n script.setAttribute( 'type', 'text/javascript' );\n script.innerHTML = helperJavascriptCode.replace(/\\r|\\n|\\t/g, '').trim();\n controlScriptsArr.push( script );\n }\n\n i++;\n });\n\n // run the scripts of controls\n if( controlScriptsArr.length > 0 ) {\n for( let i = 0; i < controlScriptsArr.length; i++ ) {\n wptbelementOptionsScriptsContainer.appendChild( controlScriptsArr[i] );\n }\n }\n\n // run appearDependOnControl function\n for ( let i = 0; i < controlappearDependOnControl.length; i++ ) {\n WPTB_Helper.appearDependOnControl( controlappearDependOnControl[i][0], controlappearDependOnControl[i][1] );\n }\n\n WPTB_Helper.wptbDocumentEventGenerate( 'element:controls:active', element );\n },\n // function for create, update css for element\n managerExternalCssStyles: function( elementContainer, selector, cssName, cssValue ) {\n let infArr = elementContainer.match( /wptb-element-main(.+)-(\\d+)/i );\n if( ! infArr || ! Array.isArray( infArr ) ) {\n let table = document.getElementsByClassName( 'wptb-preview-table' );\n \n if( table.length > 0 ) {\n table = table[0];\n \n let infArr = table.className.match( /wptb-element-main(.+)-(\\d+)/i );\n if( infArr && Array.isArray( infArr ) ) {\n selector = '.' + infArr[0] + ' ' + selector;\n }\n }\n }\n \n let head = document.head;\n if( head ) {\n let cssForThisElement = head.querySelector( '#styles-' + elementContainer );\n if( cssForThisElement ) {\n let cssText = cssForThisElement.innerHTML;\n if( cssText ) {\n let cssTextArrFirst = cssText.split( '}' );\n cssTextArrFirst.pop();\n let selectorExists = false;\n for( let i = 0; i < cssTextArrFirst.length; i++ ) {\n let cssTextArrSecond = cssTextArrFirst[i].split( '{' );\n if( cssTextArrSecond[0] === selector ) {\n let cssTextArrThird = cssTextArrSecond[1].split( ';' );\n cssTextArrThird.pop();\n let cssNameExists = false;\n for( let j = 0; j < cssTextArrThird.length; j++ ) {\n let cssTextArrFourth = cssTextArrThird[j].split( ':' );\n if( cssTextArrFourth[0] === cssName ) {\n if( cssValue ) {\n cssTextArrThird[j] = cssName + ':' + cssValue;\n } else {\n cssTextArrThird.splice( j, 1 );\n }\n \n cssTextArrSecond[1] = cssTextArrThird.join( ';' ) ? cssTextArrThird.join( ';' ) + ';' : '';\n cssNameExists = true;\n break;\n }\n }\n if( ! cssNameExists ) {\n if( cssValue ) {\n cssTextArrSecond[1] += cssName + ':' + cssValue + ';';\n }\n }\n if( cssTextArrSecond[1] ) {\n cssTextArrFirst[i] = cssTextArrSecond[0] + '{' + cssTextArrSecond[1]\n } else {\n cssTextArrFirst.splice( i, 1 );\n }\n if( cssTextArrFirst.join( '}' ) ) {\n cssForThisElement.innerHTML = cssTextArrFirst.join( '}' ) + '}';\n } else {\n head.removeChild( cssForThisElement );\n }\n \n selectorExists = true;\n break;\n }\n }\n\n if( ! selectorExists ) {\n if( cssValue ) {\n cssForThisElement.innerHTML = cssText + selector + '{' + cssName + ':' + cssValue + ';}';\n } else {\n cssForThisElement.innerHTML = cssText;\n }\n }\n } else {\n if( cssValue ) {\n cssForThisElement.innerHTML = selector + '{' + cssName + ':' + cssValue + ';}';\n } else {\n head.removeChild( cssForThisElement );\n }\n }\n } else {\n if( cssValue ) {\n let cssForThisElement = document.createElement( 'style' );\n cssForThisElement.setAttribute( 'id', 'styles-' + elementContainer );\n cssForThisElement.classList.add( 'styles-wptb-elements' );\n cssForThisElement.innerHTML = selector + '{' + cssName + ':' + cssValue + ';}';\n head.appendChild( cssForThisElement );\n }\n }\n }\n },\n // function for deleting all external CSS for the element\n externalCssStylesDelete: function( elementContainerClass ) {\n let head = document.head;\n if( head ) {\n let cssForThisElement = head.querySelector( '#styles-' + elementContainerClass );\n \n if( cssForThisElement ) {\n head.removeChild( cssForThisElement );\n }\n }\n },\n // function for copy all external CSS for the element\n externalCssStylesCopy: function( activeElement, copyElement ) {\n if( activeElement ) {\n let infArr = activeElement.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr && Array.isArray( infArr ) ) {\n let activeElemClass = infArr[0];\n \n let head = document.head;\n if( head ) {\n let cssForActiveElement = head.querySelector( '#styles-' + activeElemClass );\n\n if( cssForActiveElement ) {\n let cssForNewElement = cssForActiveElement.cloneNode( true );\n \n cssForNewElement.removeAttribute( 'id', 'styles-' + activeElemClass );\n \n let infArrCopyEl = copyElement.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArrCopyEl && Array.isArray( infArrCopyEl ) ) {\n cssForNewElement.setAttribute( 'id', 'styles-' + infArrCopyEl[0] );\n let cssForActiveElementInnerHTML = cssForActiveElement.innerHTML;\n let cssForNewElementInnerHTML = WPTB_Helper.replaceAll( cssForActiveElementInnerHTML, activeElemClass, infArrCopyEl[0] );\n cssForNewElement.innerHTML = cssForNewElementInnerHTML;\n head.appendChild( cssForNewElement );\n }\n }\n }\n }\n }\n },\n // function for convertation elements stiles in json\n elementsStylesConvertToObject: function() {\n let head = document.head;\n let stylesElements = head.querySelectorAll( '.styles-wptb-elements' );\n let stylesObj = {};\n for( let i = 0; i < stylesElements.length; i++ ) {\n let styleElemId = stylesElements[i].getAttribute( 'id' );\n if( styleElemId && stylesElements[i].innerHTML ) {\n stylesObj[styleElemId] = stylesElements[i].innerHTML;\n }\n }\n \n if( Object.keys( stylesObj ).length != 0 ) {\n return JSON.stringify( stylesObj );\n }\n return '';\n },\n // function for set scc styles tags to head\n elementsStylesSetFromObject: function( jsonObject ) {\n let head = document.head;\n if( head ) {\n let stylesElements = head.querySelectorAll( '.styles-wptb-elements' );\n if( stylesElements.length > 0 ) {\n stylesElements = [...stylesElements];\n for( let i = 0; i < stylesElements.length; i++ ) {\n head.removeChild( stylesElements[i] );\n }\n }\n if( jsonObject ) {\n let stylesObj = JSON.parse( jsonObject );\n if( Object.keys( stylesObj ).length != 0 ) {\n Object.keys( stylesObj ).forEach( function( key ) {\n let cssText = stylesObj[key];\n let styleCss = document.createElement( 'style' );\n styleCss.setAttribute( 'id', key );\n styleCss.classList.add( 'styles-wptb-elements' );\n styleCss.innerHTML = cssText;\n head.appendChild( styleCss );\n });\n }\n }\n }\n },\n // function for table saving\n saveTable: function( event, startSaving, previewSaving ) {\n if( ! previewSaving && ! startSaving ) {\n if( ( ! event.target.dataset.wptbTableStateNumberSave && window.wptbTableStateNumberShow == 0 ) || \n window.wptbTableStateNumberShow == event.target.dataset.wptbTableStateNumberSave ) {\n //return;\n }\n }\n \n if( ! previewSaving ) {\n let bar = document.querySelector( '.wptb-edit-bar' );\n if ( bar && bar.classList.contains( 'visible' ) ) {\n let table = document.getElementsByClassName( 'wptb-preview-table' )[0];\n WPTB_Helper.toggleTableEditMode();\n }\n }\n\n let http = new XMLHttpRequest(),\n url = ( wptb_admin_object ? wptb_admin_object.ajaxurl : ajaxurl ) + \"?action=save_table\",\n t = document.getElementById( 'wptb-setup-name' ).value.trim(),\n messagingArea,\n code,\n datas;\n \n code = document.getElementsByClassName( 'wptb-preview-table' );\n \n let postId;\n if (( rs = WPTB_Helper.detectMode() ) || ( rs = document.wptbId )) {\n postId = rs;\n }\n let paramIdsNecessaryChange = false;\n if( code.length > 0 ) {\n code = code[0];\n let codeClone = code.cloneNode( true );\n if( postId ) {\n if( codeClone.classList.contains( 'wptb-element-main-table_setting-startedid-0' ) ) {\n codeClone.classList.remove( 'wptb-element-main-table_setting-startedid-0' );\n codeClone.classList.add( 'wptb-element-main-table_setting-' + postId );\n paramIdsNecessaryChange = true;\n }\n }\n codeClone.columns = code.columns;\n code = WPTB_Stringifier( codeClone );\n code = code.outerHTML;\n } else { \n code = '';\n }\n \n if( ! previewSaving ) {\n datas = '';\n let datas_containers = document.getElementsByClassName( 'wptb-element-datas' );\n\n if( datas_containers.length > 0 ) {\n if( datas_containers[0].innerHTML ) {\n datas = datas_containers[0].innerHTML;\n\n if( paramIdsNecessaryChange ) {\n datas = WPTB_Helper.replaceAll( datas, 'tmpl-wptb-el-datas-main-table_setting-startedid-0', \n 'tmpl-wptb-el-datas-main-table_setting-' + postId );\n\n datas = WPTB_Helper.replaceAll( datas, 'data-wptb-el-main-table_setting-startedid-0', \n 'data-wptb-el-main-table_setting-' + postId );\n }\n }\n }\n }\n\n let styleObjJson = WPTB_Helper.elementsStylesConvertToObject();\n if( paramIdsNecessaryChange ) {\n styleObjJson = WPTB_Helper.replaceAll( styleObjJson, '.wptb-element-main-table_setting-startedid-0', \n '.wptb-element-main-table_setting-' + postId );\n }\n \n if ( t === '' && code === '' ) {\n let messagingAreaText = '';\n if( t === '' ) messagingAreaText += 'You must assign a name to the table before saving it.</br>';\n if( code === '' ) messagingAreaText += 'Table wasn\\'t created';\n messagingArea = document.getElementById( 'wptb-messaging-area' );\n messagingArea.innerHTML = '<div class=\"wptb-error wptb-message\">Error: ' + messagingAreaText + '</div>';\n messagingArea.classList.add( 'wptb-warning' );\n setTimeout(function () {\n messagingArea.removeChild( messagingArea.firstChild );\n }, 4000 );\n return;\n }\n\n let params = {\n title: t,\n content: code,\n elements_datas: datas,\n elements_styles: styleObjJson,\n security_code: wptb_admin_object.security_code\n };\n \n \n if( previewSaving ) {\n params.preview_saving = previewSaving;\n }\n \n if ( postId ) {\n params.id = postId;\n }\n params = JSON.stringify( params );\n\n http.open('POST', url, true);\n http.setRequestHeader( 'Content-type', 'application/json; charset=utf-8' );\n\n http.onreadystatechange = function ( action ) {\n if ( this.readyState == 4 && this.status == 200 ) {\n var data = JSON.parse( http.responseText );\n messagingArea = document.getElementById( 'wptb-messaging-area' );\n\n if ( data[0] == 'saved' ) {\n let builderPageUrl = document.location.href.replace( '#', '' );\n let regex = new RegExp( '&table=(.+)', \"i\" );\n builderPageUrl = builderPageUrl.replace( regex, '' );\n window.history.pushState( null, null, builderPageUrl + '&table=' + data[1] );\n \n WPTB_Helper.saveTable( event, true );\n return;\n } else if( data[0] == 'edited' && startSaving ) {\n document.wptbId = data[1];\n messagingArea.innerHTML = '<div class=\"wptb-success wptb-message\">Table \"' + t + '\" was successfully saved.</div>';\n document.getElementsByClassName( 'wptb-embed-btn' )[0].classList.remove( 'wptb-button-disable' );\n document.getElementById( 'wptb-embed-shortcode' ).value = '[wptb id=' + data[1] + ']';\n let wptbPreviewTable = document.querySelector( '.wptb-preview-table' );\n let wptbPreviewBtn = document.getElementsByClassName( 'wptb-preview-btn' );\n if( wptbPreviewBtn.length > 0 ) {\n wptbPreviewBtn = wptbPreviewBtn[0];\n wptbPreviewBtn.classList.remove( 'wptb-button-disable' );\n let wptbPreviewBtnHref = wptbPreviewBtn.dataset.previewHref;\n wptbPreviewBtnHref = wptbPreviewBtnHref.replace( 'empty', data[1] );\n wptbPreviewBtn.setAttribute( 'href', wptbPreviewBtnHref );\n }\n \n event.target.dataset.wptbTableStateNumberSave = window.wptbTableStateNumberShow;\n let wptbSaveBtn = document.getElementsByClassName( 'wptb-save-btn' );\n if( wptbSaveBtn.length > 0 ) {\n wptbSaveBtn = wptbSaveBtn[0];\n wptbSaveBtn.classList.add( 'wptb-save-disabled' );\n }\n } else if( data[0] == 'edited' ) {\n messagingArea.innerHTML = '<div class=\"wptb-success wptb-message\">Table \"' + t + '\" was successfully updated.</div>';\n event.target.dataset.wptbTableStateNumberSave = window.wptbTableStateNumberShow;\n \n let wptbSaveBtn = document.getElementsByClassName( 'wptb-save-btn' );\n if( wptbSaveBtn.length > 0 ) {\n wptbSaveBtn = wptbSaveBtn[0];\n wptbSaveBtn.classList.add( 'wptb-save-disabled' );\n }\n } else if( data[0] == 'preview_edited' ) {\n return;\n } else {\n messagingArea.innerHTML = '<div class=\"wptb-error wptb-message\">Safety problems</div>';\n }\n messagingArea.classList.add( 'wptb-success' );\n setTimeout( function () {\n messagingArea.removeChild( messagingArea.firstChild );\n }, 4000 );\n }\n }\n http.send( params );\n },\n //\n clickOnFreeSpace: function() {\n document.getElementsByClassName( 'wptb-elements-container' )[0].style.display = 'table';\n document.getElementsByClassName( 'wptb-settings-section' )[0].style.display = 'block';\n document.getElementById( 'element-options-group' ).style.display = 'none';\n let wpcdFixedToolbar = document.getElementById( 'wpcd_fixed_toolbar' );\n if( wpcdFixedToolbar.hasAttribute( 'data-toolbar-active-id' ) ) {\n document.getElementById( wpcdFixedToolbar.getAttribute( 'data-toolbar-active-id' ) ).classList.remove( 'toolbar-active' );\n }\n let element = document.querySelector( '.wptb-preview-table' );\n if( element ) {\n WPTB_Helper.elementOptionsSet( 'table_setting', element );\n }\n },\n // function for sending of element ajax request\n elementAjax: function( dataAjaxData, element ) {\n let http = new XMLHttpRequest(),\n url = ( wptb_admin_object ? wptb_admin_object.ajaxurl : ajaxurl ) + \"?action=wptb_element_ajax\";\n let element_name;\n let infArr = element.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr && Array.isArray( infArr ) ) {\n element_name = infArr[1];\n }\n \n let params = {\n element_ajax_data: dataAjaxData,\n element_name: element_name,\n security_code: wptb_admin_object.security_code\n };\n params = JSON.stringify( params );\n\n http.open( 'POST', url, true );\n http.setRequestHeader( 'Content-type', 'application/json; charset=utf-8' );\n\n http.onreadystatechange = function ( action ) {\n if ( this.readyState == 4 && this.status == 200 ) {\n var data = JSON.parse( http.responseText );\n let detail;\n if ( data && Array.isArray( data ) && data[0] == 'element_ajax_responce' ) {\n detail = {value: data[1]};\n } else {\n detail = '';\n }\n WPTB_Helper.wptbDocumentEventGenerate( 'wptb-element:ajax-response', element, detail );\n }\n }\n http.send( params );\n },\n\n\n /*\n * This just toggles visibility of cell edit bar, and toggles\n * cell selecting mode.\n */\n\n toggleTableEditMode: function ( close = false ) {\n let bar = document.getElementsByClassName('wptb-edit-bar'),\n cellModeBackground = document.getElementById('wptb-cell_mode_background'),\n leftScrollPanelCurtain = document.getElementById('wptb-left-scroll-panel-curtain'),\n leftScrollPanelCellSettings = document.getElementById( 'wptb-left-scroll-panel-cell-settings' ),\n wptbPreviewTable = document.getElementsByClassName('wptb-preview-table');\n if (wptbPreviewTable.length > 0) {\n wptbPreviewTable = wptbPreviewTable[0];\n }\n\n if ( bar.length > 0 ) {\n for ( let i = 0; i < bar.length; i++ ) {\n if ( bar[i].classList.contains( 'visible' ) ) {\n document.select.deactivateMultipleSelectMode();\n bar[i].classList.remove( 'visible' );\n cellModeBackground.classList.remove( 'visible' );\n leftScrollPanelCurtain.classList.remove( 'visible' );\n leftScrollPanelCellSettings.classList.remove( 'visible' );\n wptbPreviewTable.parentNode.classList.remove( 'wptb-preview-table-manage-cells' );\n let wptbPreviewTableTds = wptbPreviewTable.getElementsByTagName( 'td' );\n if ( wptbPreviewTableTds.length > 0 ) {\n for ( let i = 0; i < wptbPreviewTableTds.length; i++ ) {\n wptbPreviewTableTds[i].classList.remove( 'wptb-highlighted' );\n }\n }\n } else if( ! close ) {\n document.select.activateMultipleSelectMode();\n bar[i].classList.add( 'visible' );\n cellModeBackground.classList.add( 'visible' );\n leftScrollPanelCurtain.classList.add( 'visible' );\n wptbPreviewTable.parentNode.classList.add( 'wptb-preview-table-manage-cells' );\n }\n }\n\n }\n }\n}\n","var WPTB_Initializer = function () {\n\n const MIN_COLUMNS = 1,\n MIN_ROWS = 1,\n MAX_COLUMNS = 30,\n MAX_ROWS = 30;\n\n var tableGenerator = document.body;\n columnsDecrementButton = tableGenerator.getElementsByClassName('wptb-input-number-decrement')[0],\n columnsIncrementButton = tableGenerator.getElementsByClassName('wptb-input-number-increment')[0],\n rowsDecrementButton = tableGenerator.getElementsByClassName('wptb-input-number-decrement')[1],\n rowsIncrementButton = tableGenerator.getElementsByClassName('wptb-input-number-increment')[1],\n columnsInput = document.getElementById('wptb-columns-number'),\n rowsInput = document.getElementById('wptb-rows-number');\n \n columnsDecrementButton.onclick = function () {\n if (columnsInput.value > MIN_COLUMNS) {\n columnsInput.value--;\n }\n };\n\n columnsIncrementButton.onclick = function () {\n if (columnsInput.value < MAX_COLUMNS) {\n columnsInput.value++;\n }\n };\n\n rowsDecrementButton.onclick = function () {\n if (rowsInput.value > MIN_ROWS) {\n rowsInput.value--;\n }\n };\n\n rowsIncrementButton.onclick = function () {\n if (rowsInput.value < MAX_ROWS) {\n rowsInput.value++;\n }\n };\n\n document.getElementById( 'wptb-generate-table' ).onclick = function ( ) {\n var columns = document.getElementById('wptb-columns-number').value,\n rows = document.getElementById('wptb-rows-number').value;\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n //wptbTableStateSaveManager.tableStateClear();\n \n wptbTableStateSaveManager.tableStateSet( true );\n \n WPTB_Table(columns, rows);\n \n wptbTableStateSaveManager.tableStateSet();\n }\n\n};\n","var WPTB_LeftPanel = function () {\n\n let table = document.getElementsByClassName('wptb-preview-table')[0],\n wptbElementButtons = document.getElementsByClassName('wptb-element');\n \n let wptbTableColumnWidthNumber = document.getElementById( 'wptb-table-column-width-number' );\n WPTB_Helper.numberImputSize( wptbTableColumnWidthNumber, 2, 500 );\n \n let wptbTableRowHeightNumber = document.getElementById( 'wptb-table-row-height-number' );\n WPTB_Helper.numberImputSize( wptbTableRowHeightNumber, 2, 200 );\n \n document.getElementById( 'wptb-table-column-width-slider' ).oninput = function () {\n document.getElementById( 'wptb-table-column-width-number' ).value = this.value;\n table.addColumnWidth( this.value );\n };\n \n document.getElementById( 'wptb-table-column-width-slider' ).onchange = function () {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n \n document.getElementById( 'wptb-table-column-width-number' ).onchange = function () {\n document.getElementById( 'wptb-table-column-width-slider' ).value = this.value;\n table.addColumnWidth( this.value );\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n \n document.getElementById( 'wptb-table-column-width-auto-fixed' ).onchange = function () {\n if( this.checked ) {\n let highlighted = table.querySelector( '.wptb-highlighted' );\n let width = WPTB_Helper.getColumnWidth( table, highlighted );\n table.addColumnWidth( width );\n } else {\n table.addColumnWidth( false, true );\n let highlighted = table.querySelector( '.wptb-highlighted' );\n let width = WPTB_Helper.getColumnWidth( table, highlighted );\n document.getElementById( 'wptb-table-column-width-number' ).value = width;\n document.getElementById( 'wptb-table-column-width-slider' ).value = width;\n }\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n document.getElementById( 'wptb-table-row-height-slider' ).oninput = function () {\n document.getElementById( 'wptb-table-row-height-number' ).value = this.value;\n table.addRowHeight( this.value );\n };\n \n document.getElementById( 'wptb-table-row-height-slider' ).onchange = function () {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n document.getElementById( 'wptb-table-row-height-number' ).onchange = function () {\n document.getElementById( 'wptb-table-row-height-slider' ).value = this.value;\n table.addRowHeight( this.value );\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n \n document.getElementById( 'wptb-table-row-height-auto-fixed' ).onchange = function () {\n if( this.checked ) {\n let highlighted = table.querySelector( '.wptb-highlighted' );\n let height = WPTB_Helper.getRowHeight( table, highlighted );\n table.addRowHeight( height );\n } else {\n table.addRowHeight( false, true );\n let highlighted = table.querySelector( '.wptb-highlighted' );\n let height = WPTB_Helper.getRowHeight( table, highlighted );\n document.getElementById( 'wptb-table-row-height-number' ).value = height;\n document.getElementById( 'wptb-table-row-height-slider' ).value = height;\n }\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n \n function controlsChange( inputs, table ) {\n if( inputs && typeof inputs === 'object' ) {\n if( inputs.hasOwnProperty( 'tableTopRowsAsHeader' ) ) {\n// if( inputs.tableTopRowsAsHeader == 'checked' ) {\n// let rows = table.rows;\n// table.classList.add( 'wptb-table-preview-head' );\n// } else if( inputs.tableTopRowsAsHeader == 'unchecked' ) {\n// let rows = table.rows;\n// table.classList.remove( 'wptb-table-preview-head' );\n//\n// for ( let i = 1; i < rows.length; i++ ) {\n// let thisRow = rows[i],\n// thisRowChildren = thisRow.children;\n// for( let j = 0; j < thisRowChildren.length; j++ ) {\n// thisRowChildren[j].removeAttribute( 'data-wptb-title-column' );\n// thisRowChildren[j].removeAttribute( 'data-wptb-title-column-font-size' );\n// thisRowChildren[j].removeAttribute( 'data-wptb-title-column-color' );\n// thisRowChildren[j].removeAttribute( 'data-wptb-title-background-color' );\n// thisRowChildren[j].removeAttribute( 'data-wptb-title-align' );\n// }\n// }\n// }\n } else if( inputs.hasOwnProperty( 'makeTableResponsive' ) ) {\n// if( inputs.makeTableResponsive == 'checked' ) {\n// table.dataset.wptbAdaptiveTable = 1;\n// } else if( inputs.makeTableResponsive == 'unchecked' ) {\n// table.dataset.wptbAdaptiveTable = 0;\n// }\n } else if( inputs.hasOwnProperty( 'applyTableContainerMaxWidth' ) ) {\n let wptbTableSetup = document.querySelector( '.wptb-table-setup' );\n if( inputs.applyTableContainerMaxWidth == 'checked' ) {\n let table_id = WPTB_Helper.detectMode();\n\n if( ! table_id ) {\n table_id = 'startedid-0';\n }\n\n let tableContainerMaxWidthInput = document.getElementsByClassName( 'wptb-el-main-table_setting-' + table_id + '-tableContainerMaxWidth' );\n let tableContainerMaxWidthInputValue = 850;\n if( tableContainerMaxWidthInput.length > 0 ) {\n tableContainerMaxWidthInput = tableContainerMaxWidthInput[0];\n if( tableContainerMaxWidthInput.value ) tableContainerMaxWidthInputValue = tableContainerMaxWidthInput.value;\n }\n\n table.dataset.wptbTableContainerMaxWidth = tableContainerMaxWidthInputValue;\n if( wptbTableSetup ) wptbTableSetup.style.maxWidth = tableContainerMaxWidthInputValue + 'px';\n } else if( inputs.applyTableContainerMaxWidth == 'unchecked' ) {\n table.removeAttribute( 'data-wptb-table-container-max-width' );\n if( wptbTableSetup ) wptbTableSetup.style.maxWidth = null;\n }\n \n table.tdDefaultWidth();\n } else if( inputs.hasOwnProperty( 'tableContainerMaxWidth' ) ) {\n if( inputs.tableContainerMaxWidth ) {\n table.dataset.wptbTableContainerMaxWidth = inputs.tableContainerMaxWidth;\n \n let wptbTableSetup = document.querySelector( '.wptb-table-setup' );\n if( wptbTableSetup ) wptbTableSetup.style.maxWidth = inputs.tableContainerMaxWidth + 'px';\n \n table.tdDefaultWidth();\n }\n } else if( inputs.hasOwnProperty( 'tableManageCells' ) ) {\n WPTB_Helper.toggleTableEditMode();\n } else if( inputs.hasOwnProperty( 'tableAlignmentCheckbox' ) ) {\n table.tdDefaultWidth();\n }\n } \n }\n\n WPTB_Helper.controlsInclude( table, controlsChange );\n\n for (var i = 0; i < wptbElementButtons.length; i++) {\n wptbElementButtons[i].ondragstart = function (e) {\n e.dataTransfer.setData('wptbElement', this.dataset.wptbElement);\n e.dataTransfer.setData( 'wptbElIndic-' + this.dataset.wptbElement, 'wptbElIndic-' + this.dataset.wptbElement );\n }\n };\n \n if( table ) {\n document.getElementById( 'wptb-table-edit-mode-close' ).onclick = WPTB_Helper.toggleTableEditMode;\n document.getElementById( 'wptb-left-scroll-panel-curtain-close' ).onclick = WPTB_Helper.toggleTableEditMode;\n document.getElementById('wptb-add-end-row').onclick = table.addRowToTheEnd;\n document.getElementById('wptb-add-start-row').onclick = table.addRowToTheStart;\n document.getElementById('wptb-add-row-before').onclick = table.addRowBefore;\n document.getElementById('wptb-add-row-after').onclick = table.addRowAfter;\n document.getElementById('wptb-add-end-column').onclick = table.addColumnEnd;\n document.getElementById('wptb-add-start-column').onclick = table.addColumnStart;\n document.getElementById('wptb-add-column-before').onclick = table.addColumnBefore;\n document.getElementById('wptb-add-column-after').onclick = table.addColumnAfter;\n document.getElementById('wptb-delete-column').onclick = table.deleteColumn;\n document.getElementById('wptb-delete-row').onclick = table.deleteRow;\n document.getElementById('wptb-merge-cells').onclick = table.mergeCells;\n document.getElementById('wptb-split-cell').onclick = table.splitCell;\n };\n \n document.querySelector( '.wptb-left-panel-extend' ).onclick = function() {\n let wptbContainer = document.querySelector( '.wptb-container' );\n if( wptbContainer ) {\n if ( wptbContainer.classList.contains( 'collapsed' ) ) {\n wptbContainer.classList.remove( 'collapsed' );\n } else {\n wptbContainer.classList.add( 'collapsed' );\n }\n }\n };\n \n // this code hides the \"element parameters\" area \n // when clicked outside this element and its \"tinymce\" toolbar \n let wptbBuilderPanel = document.getElementsByClassName( 'wptb-builder-panel' )[0];\n wptbBuilderPanel.onclick = function( e ) {\n if( ! e.target.classList.contains( 'wptb-ph-element' ) && ! WPTB_Helper.findAncestor( e.target, 'wptb-ph-element' ) && \n ! e.target.classList.contains( 'wptb-fixed-toolbar' ) && ! WPTB_Helper.findAncestor( e.target, 'wptb-fixed-toolbar' ) ) {\n WPTB_Helper.clickOnFreeSpace();\n } \n };\n \n let wptbHeader = document.getElementsByClassName( 'wptb-header' );\n if( wptbHeader.length > 0 ) wptbHeader = wptbHeader[0];\n wptbHeader.onclick = function() {\n WPTB_Helper.clickOnFreeSpace();\n };\n};","var MultipleSelect = function () {\n\n\tvar selectedCells = [],\n\t\tmultipleCellMode = false;\n\n\tthis.activateMultipleSelectMode = function () {\n\t\tselectedCells = [];\n\t\tvar tds = document.getElementsByClassName('wptb-preview-table')[0].getElementsByTagName('td');\n\t\tfor (var i = 0; i < tds.length; i++) {\n\t\t\ttds[i].classList.remove('wptb-highlighted');\n\t\t}\n\t\tmultipleCellMode = true;\n\t}\n\n\tthis.deactivateMultipleSelectMode = function () {\n\t\tmultipleCellMode = false;\n\t}\n\n\tthis.isActivated = function () {\n\t\treturn multipleCellMode;\n\t}\n\n\tthis.pushSelectedCell = function (cell) {\n\t\tif (!multipleCellMode) {\n\t\t\treturn;\n\t\t}\n\t\tselectedCells.push(cell);\n\t\tcell.classList.add('wptb-highlighted');\n\t};\n\n\tthis.selectedCells = function () {\n\t\treturn selectedCells;\n\t}\n\n\tthis.flushSelectedCells = function () {\n\t\tselectedCells = [];\n\t}\n\n\tthis.getFirst = function () {\n\t\tvar minXIndex = 1000, minYIndex = 1000, first;\n\t\tfor (var i = selectedCells.length - 1; i >= 0; i--) {\n\t\t\tif (minXIndex >= selectedCells[i].dataset.xIndex\n\t\t\t\t&& minYIndex >= selectedCells[i].dataset.yIndex) {\n\t\t\t\tfirst = selectedCells[i];\n\t\t\t\tminXIndex = selectedCells[i].dataset.xIndex;\n\t\t\t\tminYIndex = selectedCells[i].dataset.yIndex;\n\t\t\t}\n\t\t}\n\t\treturn first;\n\t}\n\n\tthis.getLast = function () {\n\t\tvar maxXIndex = -1, maxYIndex = -1, last;\n\t\tfor (var i = selectedCells.length - 1; i >= 0; i--) {\n\t\t\tif (maxXIndex <= selectedCells[i].dataset.xIndex\n\t\t\t\t&& maxYIndex <= selectedCells[i].dataset.yIndex) {\n\t\t\t\tlast = selectedCells[i];\n\t\t\t\tmaxXIndex = selectedCells[i].dataset.xIndex;\n\t\t\t\tmaxYIndex = selectedCells[i].dataset.yIndex;\n\t\t\t}\n\t\t}\n\t\treturn last;\n\t}\n\n\tthis.removeAllButFirst = function () {\n\t\tvar td = this.getFirst();\n\t\tfor (var i = 1; i < selectedCells.length; i++) {\n\t\t\tselectedCells[i].classList.add('wptb-fused-cell-' + td.dataset.xIndex + '-' + td.dataset.yIndex);\n\t\t}\n\t}\n\n\treturn this;\n\n};","var WPTB_Parser = function ( code ) {\n let div = document.createElement( 'div' );\n div.innerHTML = code;\n \n let table = div.children[0];\n let columnTitleMobile = [...table.querySelectorAll( '.wptb-column-title-mobile-container' )];\n \n for( let i = 0; i < columnTitleMobile.length; i++ ) {\n let parent = columnTitleMobile[i].parentNode;\n parent.removeChild( columnTitleMobile[i] );\n }\n \n let tds = table.querySelectorAll( 'td' );\n for ( let i = 0; i < tds.length; i++ ) {\n tds[i].classList.add( 'wptb-droppable' );\n tds[i].classList.remove( 'wptb-column-title-mobile-not-elements' );\n }\n \n return table;\n}","// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\nif (!Object.keys) {\n Object.keys = (function () {\n 'use strict';\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),\n dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n dontEnumsLength = dontEnums.length;\n\n return function (obj) {\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [], prop, i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n };\n }());\n}","var WPTB_Settings = function () {\n var elems = document.getElementsByClassName('wptb-element');\n\n for ( var i = 0; i < elems.length; i++ ) {\n elems[i].ondragstart = function ( event ) {\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData( 'wptbElement', event.target.dataset.wptbElement );\n event.dataTransfer.setData( 'wptbElIndic-' + event.target.dataset.wptbElement, 'wptbElIndic-' + event.target.dataset.wptbElement );\n }\n elems[i].ondragend = function () {\n WPTB_Helper.elementDragEndClear();\n }\n };\n let table = document.getElementsByClassName( 'wptb-preview-table' );\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n let wptbUndo = document.getElementsByClassName( 'wptb-undo' );\n if( wptbUndo.length > 0 ) {\n wptbUndo = wptbUndo[0];\n \n wptbUndo.onclick = function( event ) {\n if( ! this.classList.contains( 'wptb-undoredo-disabled' ) ) {\n wptbTableStateSaveManager.tableStateGet( this.dataset.wptbUndoredo );\n let wptbUndoRedoContainer = document.getElementsByClassName( 'wptb-undo-redo-container' );\n if( wptbUndoRedoContainer.length > 0 && table.length > 0 ) {\n wptbUndoRedoContainer = wptbUndoRedoContainer[0];\n wptbUndoRedoContainer.onmouseleave = function( event ) {\n event.target.onmouseleave = '';\n WPTB_Table();\n }\n }\n }\n \n }\n }\n \n let wptbRedo = document.getElementsByClassName( 'wptb-redo' );\n if( wptbRedo.length > 0 ) {\n wptbRedo = wptbRedo[0];\n \n wptbRedo.onclick = function( event ) {\n if( ! this.classList.contains( 'wptb-undoredo-disabled' ) ) {\n wptbTableStateSaveManager.tableStateGet( this.dataset.wptbUndoredo );\n let wptbUndoRedoContainer = document.getElementsByClassName( 'wptb-undo-redo-container' );\n if( wptbUndoRedoContainer.length > 0 && table.length > 0 ) {\n wptbUndoRedoContainer = wptbUndoRedoContainer[0];\n wptbUndoRedoContainer.onmouseleave = function( event ) {\n event.target.onmouseleave = '';\n WPTB_Table();\n }\n }\n }\n \n }\n }\n \n let shortcodePopupWindow = document.getElementsByClassName( 'wptb-popup-window-modal' )[0];\n document.getElementsByClassName( 'wptb-embed-btn' )[0].onclick = function () {\n if( ! this.classList.contains( 'wptb-button-disable' ) ) {\n shortcodePopupWindow.classList.add( 'wptb-popup-show' );\n }\n }\n \n window.onbeforeunload = function(e) {\n let wptbSaveDisabled = document.getElementsByClassName( 'wptb-save-disabled' );\n if( wptbSaveDisabled.length == 0 ) {\n return true;\n } else {\n return null;\n }\n };\n \n \n document.getElementsByClassName( 'wptb-popup-dark-area' )[0].onclick = function () {\n shortcodePopupWindow.classList.remove( 'wptb-popup-show' );\n }\n \n document.getElementsByClassName( 'wptb-popup-window-close-icon' )[0].onclick = function () {\n shortcodePopupWindow.classList.remove( 'wptb-popup-show' );\n }\n \n document.getElementsByClassName( 'wptb-preview-btn' )[0].onclick = function ( event ) {\n if( this.classList.contains( 'wptb-button-disable' ) ) {\n return;\n } \n \n let previewId = Math.floor( Math.random() * 10000 );\n \n var newHref = new URL( event.target.href );\n newHref.searchParams.set( 'preview_id', previewId );\n event.target.href = newHref.toString();\n WPTB_Helper.saveTable( event, false, previewId );\n }\n\n document.getElementsByClassName( 'wptb-save-btn' )[0].onclick = function ( event ) {\n if( ! this.classList.contains( 'wptb-save-disabled' ) ) {\n WPTB_Helper.saveTable( event );\n }\n }\n};\n","var WPTB_Stringifier = function ( codeMain ) {\n if ( codeMain ) {\n let code = codeMain.cloneNode( true );\n code.classList.add( 'wptb-table-preview-static-indic' );\n code.dataset.tableColumns = codeMain.columns;\n code.style.width = null;\n code.style.minWidth = null;\n code.style.maxWidth = null;\n \n let tds = code.getElementsByTagName( 'td' );\n if ( tds.length > 0 ) {\n for ( let i = 0; i < tds.length; i++ ) {\n \n if ( codeMain.querySelector( 'wptb-table-preview-head' ) ) {\n tds[i].removeAttribute( 'data-x-index' );\n }\n tds[i].removeAttribute( 'data-y-index' );\n tds[i].removeAttribute( 'draggable' );\n tds[i].classList.remove( 'wptb-droppable' );\n let innerElements = tds[i].getElementsByClassName( 'wptb-ph-element' );\n \n if ( innerElements.length > 0 ) {\n for ( let j = 0; j < innerElements.length; j++ ) {\n \n let mceContentBodys = innerElements[j].querySelectorAll( '.mce-content-body' );\n if( mceContentBodys.length > 0 ) {\n for ( let k = 0; k < mceContentBodys.length; k++ ) {\n mceContentBodys[k].classList.remove( 'mce-content-body' );\n }\n }\n \n let dataMceStyle = innerElements[j].querySelectorAll( '[data-mce-style]' );\n if ( dataMceStyle.length > 0 ) {\n for ( let k = 0; k < dataMceStyle.length; k++ ) {\n dataMceStyle[k].removeAttribute( 'data-mce-style' );\n }\n }\n \n let contentEditable = innerElements[j].querySelectorAll( '[contenteditable]' );\n if ( contentEditable.length > 0 ) {\n for ( let k = 0; k < contentEditable.length; k++ ) {\n contentEditable[k].removeAttribute( 'contenteditable' );\n }\n }\n \n let spellCheck = innerElements[j].querySelectorAll( '[spellcheck]' );\n if ( spellCheck.length > 0 ) {\n for ( let k = 0; k < spellCheck.length; k++ ) {\n spellCheck[k].removeAttribute( 'spellcheck' );\n }\n }\n \n let mceIds = innerElements[j].querySelectorAll( '[id^=mce_]' );\n if ( mceIds.length > 0 ) {\n for ( let k = 0; k < mceIds.length; k++ ) {\n mceIds[k].removeAttribute( 'id' );\n }\n }\n \n let wptbActions = innerElements[j].querySelectorAll( '.wptb-actions' );\n let wptbActionsLength = wptbActions.length;\n while ( wptbActionsLength > 0 ) {\n if( wptbActions[0] && wptbActions[0].parentNode ) {\n wptbActions[0].parentNode.removeChild( wptbActions[0] );\n wptbActionsLength--;\n } else {\n break;\n }\n \n } \n \n let dataMceBogus = innerElements[j].querySelectorAll( '[data-mce-bogus]' );\n if( dataMceBogus.length > 0 ) {\n dataMceBogus = [...dataMceBogus];\n for( let k = 0; k < dataMceBogus.length; k++ ) {\n if( dataMceBogus[k] && dataMceBogus[k].parentNode ) {\n dataMceBogus[k].parentNode.removeChild( dataMceBogus[k] );\n }\n }\n }\n }\n }\n \n if( tds[i].hasAttribute( 'data-wptb-title-column' ) ) {\n let columnNameDivContainer = document.createElement( 'div' ),\n columnNameDiv = document.createElement( 'div' );\n columnNameDivContainer.classList.add( 'wptb-column-title-mobile-container' );\n columnNameDiv.classList.add( 'wptb-column-title-mobile' );\n columnNameDiv.dataset.wptbTitleColumn = tds[i].dataset.wptbTitleColumn;\n columnNameDiv.setAttribute( 'style', 'font-size:' + tds[i].dataset.wptbTitleColumnFontSize + '; \\n\\\n color:' + tds[i].dataset.wptbTitleColumnColor + '; background-color:' + tds[i].dataset.wptbTitleBackgroundColor + '; text-align:' + tds[i].dataset.wptbTitleAlign + ';' );\n columnNameDiv.style.padding = tds[i].style.padding;\n if( tds[i].children.length == 0 ) {\n tds[i].classList.add( 'wptb-column-title-mobile-not-elements' );\n }\n columnNameDivContainer.appendChild( columnNameDiv );\n tds[i].insertBefore( columnNameDivContainer, tds[i].firstChild );\n }\n }\n }\n \n return code;\n }\n}","var array = [], WPTB_Table = function (columns, rows) {\n\n /* The members of the class */\n var settings = document.getElementsByClassName('wptb-settings-items'),\n wptbTableSetup = document.getElementsByClassName(\"wptb-table-setup\")[0],\n table, row, cell,\n maxAmountOfCells,\n maxAmountOfRows;\n\n //HERE ARE THE PRIVATE FUNCTIONS\n /*\n * This function toggles buttons visibility in cell edit mode\n * (according to the amount of currently selected cells), and\n * highlights visually the clicked cell if it is not highlighted, or\n * removes highlight if clicked cell is already highlighted. \n * It too toggles the bits of our abstract representation.\n * @param Event this is the event instance of the click performed over a cell.\n */\n var mark = function ( event ) {\n var rs = this.rowSpan,\n cs = this.colSpan,\n markedCells,\n noCells = document.getElementsByClassName('wptb-no-cell-action'),\n singleCells = document.getElementsByClassName('wptb-single-action'),\n multipleCells = document.getElementsByClassName('wptb-multiple-select-action'),\n cellSettings = document.getElementById( 'wptb-left-scroll-panel-cell-settings' ),\n position = getCoords(this),\n row = position[0],\n column = position[1];\n if ( ! document.select.isActivated() ) {\n return;\n }\n if (this.className.match(/wptb-highlighted/)) {\n this.classList.remove('wptb-highlighted');\n for (var i = 0; i < rs; i++) {\n for (var j = 0; j < cs; j++) {\n array[row + i][column + j] = 0;\n }\n }\n } else {\n this.classList.add('wptb-highlighted');\n for (var i = 0; i < rs; i++) {\n for (var j = 0; j < cs; j++) {\n array[row + i][column + j] = 1;\n }\n }\n }\n\n markedCells = document.getElementsByClassName('wptb-highlighted').length;\n if (markedCells === 0) {\n for (var i = 0; i < multipleCells.length; i++) {\n multipleCells[i].classList.remove('visible');\n multipleCells[i].setAttribute('disabled', 'disabled');\n }\n for (var i = 0; i < noCells.length; i++) {\n noCells[i].classList.add('visible');\n noCells[i].removeAttribute('disabled');\n }\n for (var i = 0; i < singleCells.length; i++) {\n singleCells[i].classList.remove('visible');\n singleCells[i].setAttribute('disabled', 'disabled');\n }\n cellSettings.classList.remove( 'visible' );\n } else if (markedCells === 1) {\n for (var i = 0; i < multipleCells.length; i++) {\n multipleCells[i].classList.remove('visible');\n multipleCells[i].setAttribute('disabled', 'disabled');\n }\n for (var i = 0; i < noCells.length; i++) {\n noCells[i].classList.remove('visible');\n noCells[i].setAttribute('disabled', 'disabled');\n }\n for (var i = 0; i < singleCells.length; i++) {\n singleCells[i].classList.add('visible');\n singleCells[i].removeAttribute('disabled');\n }\n let cellHighlighted = document.querySelector( '.wptb-highlighted' );\n if( cellHighlighted ) {\n let wptbTableColumnWidthSlider = document.getElementById( 'wptb-table-column-width-slider' );\n let wptbTableColumnWidthNumber = document.getElementById( 'wptb-table-column-width-number' );\n let tableColumnWidthAutoFixedCheckbox = document.getElementById( 'wptb-table-column-width-auto-fixed' );\n let width = cellHighlighted.style.width;\n if( width ) {\n wptbTableColumnWidthSlider.value = parseFloat( width, 10 );\n wptbTableColumnWidthNumber.value = parseFloat( width, 10 );\n tableColumnWidthAutoFixedCheckbox.checked = true;\n } else if( cellHighlighted.dataset.wptbFixedWidth ) {\n wptbTableColumnWidthSlider.value = cellHighlighted.dataset.wptbFixedWidth;\n wptbTableColumnWidthNumber.value = cellHighlighted.dataset.wptbFixedWidth;\n tableColumnWidthAutoFixedCheckbox.checked = true;\n } else {\n let cellWidth = WPTB_Helper.getColumnWidth( table, cellHighlighted );\n wptbTableColumnWidthSlider.value = cellWidth;\n wptbTableColumnWidthNumber.value = cellWidth;\n tableColumnWidthAutoFixedCheckbox.checked = false;\n }\n \n \n let wptbTableRowHeightSlider = document.getElementById( 'wptb-table-row-height-slider' );\n let wptbTableRowHeightNumber = document.getElementById( 'wptb-table-row-height-number' );\n let tableRowHeightAutoFixedCheckbox = document.getElementById( 'wptb-table-row-height-auto-fixed' );\n let height = cellHighlighted.style.height;\n if( height ) {\n wptbTableRowHeightSlider.value = parseFloat( height, 10 );\n wptbTableRowHeightNumber.value = parseFloat( height, 10 );\n tableRowHeightAutoFixedCheckbox.checked = true;\n } else if( cellHighlighted.dataset.wptbFixedHeight ) {\n wptbTableRowHeightSlider.value = cellHighlighted.dataset.wptbFixedHeight;\n wptbTableRowHeightNumber.value = cellHighlighted.dataset.wptbFixedHeight;\n tableRowHeightAutoFixedCheckbox.checked = true;\n } else {\n let cellHeight = WPTB_Helper.getRowHeight( table, cellHighlighted );\n wptbTableRowHeightSlider.value = cellHeight;\n wptbTableRowHeightNumber.value = cellHeight;\n tableRowHeightAutoFixedCheckbox.checked = false;\n }\n }\n cellSettings.classList.add( 'visible' );\n } else {\n for (var i = 0; i < multipleCells.length; i++) {\n if (table.isSquare(array)) {\n multipleCells[i].classList.add('visible');\n multipleCells[i].removeAttribute('disabled');\n } else {\n multipleCells[i].classList.remove('visible');\n multipleCells[i].setAttribute('disabled', 'disabled');\n }\n }\n for (var i = 0; i < noCells.length; i++) {\n noCells[i].classList.remove('visible');\n noCells[i].setAttribute('disabled', 'disabled');\n }\n for (var i = 0; i < singleCells.length; i++) {\n singleCells[i].classList.remove('visible');\n singleCells[i].setAttribute('disabled', 'disabled');\n }\n cellSettings.classList.remove( 'visible' );\n }\n };\n\n /* \n * This function fills an array with 1's according to the actual design\n * of HTML table.\n * @returns an array of arrays containing an abstract representation\n * of HTML table.\n * @deprecated\n * */\n\n var realTimeArray = function () {\n var carried = [], tds, cols, matriz = [];\n\n for (var i = 0; i < maxAmountOfCells; i++) {\n carried[i] = 0;\n }\n\n for (var i = 0; i < table.rows.length; i++) {\n cols = [];\n\n var tds = table.rows[i].getElementsByTagName('td');\n\n for (items = 0; items < tds.length; items++) {\n\n for (var k = 0; k < tds[items].colSpan; k++) {\n cols.push(1);\n }\n\n if (tds[items].rowSpan > 1) {\n for (var k = 0; k < tds[items].colSpan; k++) {\n carried[items + k] = {\n justAssigned: true,\n amount: tds[items].rowSpan\n };\n }\n }\n }\n\n for (var k = 0; k < maxAmountOfCells; k++) {\n if (typeof carried[k] == 'object' && carried[k].amount > 0) {\n carried[k].amount--;\n if (carried[k].justAssigned) {\n carried[k].justAssigned = false;\n } else {\n cols.push(1);\n }\n }\n }\n\n matriz.push(cols);\n\n }\n return matriz;\n };\n\n /*\n * This function gets the number and position of cell spaces in current row that are occuped \n * by upper rowspanned cells.\n * @param number the number of row where we wish to calculate the carried rowspans up to.\n * @return an array with the remaining rowspans in each column.\n */\n var carriedRowspans = function (row) {\n var carried = [], tds, cols;\n\n for (var i = 0; i < maxAmountOfCells; i++) {\n carried[i] = 0;\n }\n\n if (row == -1) {\n return carried;\n }\n\n for (var i = 0; i <= row; i++) {\n cellsBuffer = table.rows[i].getElementsByTagName('td');\n cellPointer = 0;\n\n for (var xPosition = 0; xPosition < maxAmountOfCells; xPosition += stepsToMove) {\n stepsToMove = 1;\n\n if (carried[xPosition]) {\n carried[xPosition]--;\n } else {\n celda = cellsBuffer[cellPointer++];\n if (celda.rowSpan > 1) {\n for (k = 0; k < celda.colSpan; k++) {\n carried[xPosition + k] = celda.rowSpan - 1;\n }\n stepsToMove = celda.colSpan;\n } else if (celda.colSpan > 1) {\n stepsToMove = celda.colSpan;\n }\n }\n }\n\n }\n return carried;\n };\n\n /*\n * A helpful function for showing\n * the abstract table in console.\n * @param Array our abstract table.\n */\n var drawTable = function (a) {\n var string = 'DRAWING TABLE:\\n';\n for (var i = 0; i < a.length; i++) {\n\n for (var j = 0; j < a[i].length; j++) {\n string += ' ' + a[i][j];\n }\n string += '\\n';\n }\n table.isSquare(a);\n };\n\n /*\n * It resets all the bits of our abstract representation\n * to 0 and removes the highlighting class of all cells.\n */\n\n var undoSelect = function () {\n var noCells = document.getElementsByClassName('wptb-no-cell-action'),\n singleCells = document.getElementsByClassName('wptb-single-action'),\n multipleCells = document.getElementsByClassName('wptb-multiple-select-action'),\n cellSettings = document.getElementById( 'wptb-left-scroll-panel-cell-settings' ),\n tds = table.getElementsByClassName('wptb-highlighted');\n while (tds.length) {\n tds[0].classList.remove('wptb-highlighted');\n }\n cellSettings.classList.remove( 'visible' );\n for (var i = 0; i < array.length; i++) {\n for (var j = 0; j < array[i].length; j++) {\n array[i][j] = 0;\n }\n }\n for (var i = 0; i < multipleCells.length; i++) {\n multipleCells[i].classList.remove('visible');\n multipleCells[i].setAttribute('disabled', 'disabled');\n }\n for (var i = 0; i < noCells.length; i++) {\n noCells[i].classList.add('visible');\n noCells[i].removeAttribute('disabled');\n }\n for (var i = 0; i < singleCells.length; i++) {\n singleCells[i].classList.remove('visible');\n singleCells[i].setAttribute('disabled', 'disabled');\n }\n };\n\n /*\n * This fills the abstract representation of our table with \n * zeros, at the start. the max amount of cells is the greatest sum\n * of all colspans for row.\n */\n\n var fillTableArray = function () {\n var colspansSums = [], a = [];\n\n //calculate max amount of cells inside a row\n for (var i = 0; i < table.rows.length; i++) {\n var cells = table.rows[i].getElementsByTagName('td'),\n colspanSumInRow = 0;\n for (var j = 0; j < cells.length; j++) {\n colspanSumInRow += cells[j].colSpan;\n }\n colspansSums.push(colspanSumInRow);\n }\n\n maxAmountOfCells = Math.max.apply(null, colspansSums);\n //calculate max rows\n var maxAmountOfRows = table.rows.length;\n\n // fill with zeros from both values\n for (var i = 0; i < maxAmountOfRows; i++) {\n a[i] = [];\n for (var j = 0; j < maxAmountOfCells; j++) {\n a[i].push(0);\n }\n }\n drawTable(a);\n return a;\n };\n\n /*\n * This function gets the sum of all colspans in a row.\n * @param number the number of row to be used as reference.\n */\n var getActualPointsInRow = function (row) {\n var tds = table.rows[row].getElementsByTagName('td'),\n points = 0;\n for (var i = 0; i < tds.length; i++) {\n points += tds[i].colSpan;\n }\n return points;\n }\n\n /*\n * This function gets us the exact coordinates of\n * an exact cell, in a more reliable way than xIndex and yIndex,\n * these last ones were meant to be used for getting the cell trough them.\n * @param DOMElement the cell to get the coordinates.\n */\n var getCoords = function (search) {\n var skipInCols = [], cell;\n\n for (var i = 0; i < maxAmountOfCells; i++) {\n skipInCols[i] = 0;\n }\n\n for (var i = 0; i < table.rows.length; i++) {\n var cellsBuffer = table.rows[i].getElementsByTagName('td');\n cellPointer = 0;\n for (var xPosition = 0; xPosition < maxAmountOfCells; xPosition += stepsToMove) {\n stepsToMove = 1;\n\n if (skipInCols[xPosition]) {\n skipInCols[xPosition]--;\n } else {\n var td = cellsBuffer[cellPointer++];\n if (td == search) {\n return [i, xPosition];\n }\n if (td.rowSpan > 1) {\n for ( let k = 0; k < td.colSpan; k++ ) {\n skipInCols[xPosition + k] = td.rowSpan - 1;\n }\n stepsToMove = td.colSpan;\n } else if (td.colSpan > 1) {\n stepsToMove = td.colSpan;\n }\n }\n }\n }\n };\n\n jQuery('#wptb-table-border-color').val('');\n jQuery('#wptb-table-padding-number,#wptb-table-padding-slider').val('15');\n\n if (columns || rows) {\n //END OF PRIVATE FUNCTIONS\n for (var i = 0; i < settings.length; i++) {\n if (settings[i].id !== 'wptb-apply-inner-border') {\n settings[i].classList.add('visible');\n }\n }\n\n //Create a HTML Table element.\n table = document.createElement( 'table' );\n table.classList.add( 'wptb-preview-table', 'wptb-element-main-table_setting-startedid-0' );\n table.style.border = '0px solid';\n table.dataset.reconstraction = 1;\n table.dataset.wptbAdaptiveTable = 1;\n //Add the data rows.\n for (var i = 0; i < rows; i++) {\n\n row = table.insertRow(-1);\n row.classList.add( 'wptb-row' );\n\n for (var j = 0; j < columns; j++) {\n cell = new WPTB_Cell(mark);\n cell.setCoords(i, j);\n cell.getDOMElement().style.borderWidth = '1px';\n row.appendChild(cell.getDOMElement());\n }\n }\n } else {\n let wptb_preview_table = document.getElementsByClassName( 'wptb-preview-table' );\n\n if (wptb_preview_table.length > 0) {\n table = wptb_preview_table[0];\n\n let cells = table.getElementsByTagName('td');\n\n if (cells.length > 0) {\n for (let i = 0; i < cells.length; i++) {\n WPTB_Cell(mark, cells[i]);\n }\n }\n } else {\n return;\n }\n }\n\n /*\n * For assigning to each cell xIndex and y Index attributes,\n * these are the column number and row number of cell in table. \n */\n\n table.recalculateIndexes = function ( start ) {\n let trs = this.getElementsByTagName('tr'), tds, maxCols = 0, maxColsFull = 0,\n tdsArr = [];\n //let wptbTopRowAsHeader = document.getElementById( 'wptb-top-row-as-header' );\n \n for (var i = 0; i < trs.length; i++) {\n if ( i == 0 ) {\n// if( wptbTopRowAsHeader.checked ) {\n// if( start == undefined ) {\n// this.classList.add( 'wptb-table-preview-head' ); \n// trs[i].classList.add( 'wptb-table-head' )\n// } ;\n// } else {\n// if( start == undefined ) {\n// this.classList.remove( 'wptb-table-preview-head' );\n// trs[i].classList.remove( 'wptb-table-head' );\n// }\n// }\n } else {\n// if (i % 2 == 0) {\n// trs[i].classList.remove( 'wptb-table-head' );\n// } else {\n// trs[i].classList.remove( 'wptb-table-head' );\n// }\n }\n\n tdsArr[i];\n tds = trs[i].getElementsByTagName('td');\n\n if (tdsArr[i] == undefined) {\n tdsArr[i] = [];\n }\n\n let jMainIter = 0;\n for (var j = 0; j < tds.length; j++) {\n if (tdsArr[i][j] != undefined) {\n for (let y = 0; y < 100; y++) {\n if (tdsArr[i][jMainIter] != undefined) {\n jMainIter++;\n continue;\n }\n tdsArr[i][jMainIter] = tds[j];\n tds[j].dataset.xIndex = jMainIter;\n break;\n }\n } else {\n tdsArr[i][j] = tds[j];\n tds[j].dataset.xIndex = jMainIter;\n }\n tds[j].dataset.yIndex = i;\n\n if (tds[j].colSpan > 1) {\n for (let k = 1; k < tds[j].colSpan; k++) {\n jMainIter++;\n tdsArr[i][jMainIter] = 'tdDummy';\n }\n }\n\n if (tds[j].rowSpan > 1) {\n for (let x = 1; x < tds[j].rowSpan; x++) {\n if (tdsArr[i + x] == undefined) {\n tdsArr[i + x] = [];\n }\n for (let z = 0; z < tds[j].colSpan; z++) {\n tdsArr[i + x][jMainIter - tds[j].colSpan + 1 + z ] = 'tdDummy';\n }\n }\n }\n jMainIter++;\n if( i == 0 ) {\n maxColsFull = jMainIter;\n }\n }\n if (j > maxCols) {\n maxCols = j;\n }\n }\n this.columns = maxCols;\n this.maxCols = maxColsFull;\n }\n \n table.addColumnWidth = function( value, cleaner ) {\n let highlighted = table.getElementsByClassName( 'wptb-highlighted' );\n if( highlighted.length > 0 ) {\n for( let k = 0; k < highlighted.length; k++ ) {\n let dataXIndex = highlighted[k].dataset.xIndex;\n if( dataXIndex ) {\n function tableTdsFor( dataXIndex, colspan ) {\n let tableRows = table.rows;\n let widthIsSet = false;\n let arrayTdsFromPreviousRow = [];\n for( let i = 0; i < tableRows.length; i++ ) {\n let row = tableRows[i];\n let tds = row.children;\n for( let j = 0; j < tds.length; j++ ) {\n let td = tds[j];\n if( td.dataset.xIndex == dataXIndex ) {\n if( value ) {\n if( td.colSpan == colspan ) {\n td.style.width = value + 'px';\n td.removeAttribute( 'data-wptb-fixed-width' );\n widthIsSet = true;\n let tableColumnWidthAutoFixedCheckbox = document.getElementById( 'wptb-table-column-width-auto-fixed' );\n if( ! tableColumnWidthAutoFixedCheckbox.checked ) {\n tableColumnWidthAutoFixedCheckbox.checked = true;\n }\n } else {\n td.style.width = null;\n td.dataset.wptbFixedWidth = value;\n if( i == tableRows.length - 1 && ! widthIsSet ) {\n tableTdsFor( dataXIndex, colspan + 1 );\n }\n }\n } else if( cleaner ) {\n td.style.width = null;\n td.removeAttribute( 'data-wptb-fixed-width' );\n } else {\n if( td.dataset.wptbFixedWidth ) {\n if( td.colSpan == colspan ) {\n td.style.width = td.dataset.wptbFixedWidth + 'px';\n td.removeAttribute( 'data-wptb-fixed-width' );\n } \n } else if( td.style.width ) {\n for( let z = 0; z < arrayTdsFromPreviousRow.length; z++ ) {\n arrayTdsFromPreviousRow[z].style.width = td.style.width;\n }\n arrayTdsFromPreviousRow = [];\n } else {\n arrayTdsFromPreviousRow.push( td );\n }\n }\n break;\n } \n }\n }\n }\n \n tableTdsFor( dataXIndex, 1 );\n }\n }\n \n table.tdDefaultWidth();\n }\n }\n \n table.tdDefaultWidth = function() {\n let rows = table.rows;\n \n let tableTdsSumMaxWidth = 0;\n let tableTdsSumMaxWidthFixed = 0;\n let tableTdsSumMaxWidthAuto = 0;\n \n let wptbTableSetup = document.getElementsByClassName( 'wptb-table-setup' )[0];\n let wptbTableSetupWidth = wptbTableSetup.offsetWidth;\n \n let arrayCellsWidthFixedHelper = [];\n let arrayCellsWidthAutoHelper = [];\n let tdPaddingCommon = 0;\n let tableTdBorderCommonWidth = 0;\n let cssForTdsWidthAuto = '';\n \n \n let tableFullStyleObj = window.getComputedStyle( table, null );\n let borderLeftWidth = tableFullStyleObj.getPropertyValue( 'border-left-width' );\n let borderRightWidth = tableFullStyleObj.getPropertyValue( 'border-right-width' );\n let tableBorderCommon = parseFloat( borderLeftWidth, 10 ) + parseFloat( borderRightWidth, 10 );\n \n for( let i = 0; i < rows.length; i++ ) {\n let tds = rows[i].children;\n for( let j = 0; j < tds.length; j++ ) {\n let td = tds[j];\n \n if( ! arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] && ! arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] ) {\n if( td.style.width ) {\n arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] = parseFloat( td.style.width );\n td.removeAttribute( 'data-wptb-css-td-auto-width' );\n } else {\n if( ! td.dataset.wptbFixedWidth ) {\n arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] = 100;\n td.dataset.wptbCssTdAutoWidth = true;\n }\n }\n \n if( window.getComputedStyle( td, null ) ) {\n let tdStyleObj = window.getComputedStyle( td, null );\n let tdPaddingLeft = tdStyleObj.getPropertyValue( 'padding-left' );\n let tdPaddingRight = tdStyleObj.getPropertyValue( 'padding-right' );\n tdPaddingCommon = parseFloat( tdPaddingLeft, 10 ) + parseFloat( tdPaddingRight, 10 );\n\n let tableTdBorderLeftWidth = tdStyleObj.getPropertyValue( 'border-left-width' );\n let tableTdBorderRightWidth = tdStyleObj.getPropertyValue( 'border-right-width' );\n tableTdBorderCommonWidth = parseFloat( tableTdBorderLeftWidth, 10 ) + parseFloat( tableTdBorderRightWidth, 10 );\n tableTdBorderCommonWidth = tableTdBorderCommonWidth / 2;\n \n if( arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] ) {\n arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] += tdPaddingCommon;\n arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] += tableTdBorderCommonWidth;\n \n if( j == 0 && ( tableBorderCommon / 2 ) <= parseFloat( tableTdBorderLeftWidth, 10 ) ) {\n arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] += parseFloat( tableTdBorderLeftWidth, 10 ) / 2;\n } else if( j == 0 && ( tableBorderCommon / 2 ) > parseFloat( tableTdBorderLeftWidth, 10 ) ) {\n arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] += ( ( tableBorderCommon / 2 ) - ( parseFloat( tableTdBorderRightWidth, 10 ) / 2 ) );\n }\n\n if( j == tds.length - 1 && ( tableBorderCommon / 2 ) <= parseFloat( tableTdBorderRightWidth, 10 ) ) {\n arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] += parseFloat( tableTdBorderRightWidth, 10 ) / 2;\n } else if( j == tds.length - 1 && ( tableBorderCommon / 2 ) > parseFloat( tableTdBorderRightWidth, 10 ) ) {\n arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] += ( ( tableBorderCommon / 2 ) - ( parseFloat( tableTdBorderRightWidth, 10 ) / 2 ) );\n }\n } else if( arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] ) {\n arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] += tdPaddingCommon;\n arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] += tableTdBorderCommonWidth;\n \n if( j == 0 && ( tableBorderCommon / 2 ) <= parseFloat( tableTdBorderLeftWidth, 10 ) ) {\n arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] += parseFloat( tableTdBorderLeftWidth, 10 ) / 2;\n } else if( j == 0 && ( tableBorderCommon / 2 ) > parseFloat( tableTdBorderLeftWidth, 10 ) ) {\n arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] += ( ( tableBorderCommon / 2 ) - ( parseFloat( tableTdBorderLeftWidth, 10 ) / 2 ) );\n }\n\n if( j == tds.length - 1 && ( tableBorderCommon / 2 ) <= parseFloat( tableTdBorderRightWidth, 10 ) ) {\n arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] += parseFloat( tableTdBorderRightWidth, 10 ) / 2;\n } else if( j == tds.length - 1 && ( tableBorderCommon / 2 ) > parseFloat( tableTdBorderRightWidth, 10 ) ) {\n arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] += ( ( tableBorderCommon / 2 ) - ( parseFloat( tableTdBorderLeftWidth, 10 ) / 2 ) );\n }\n }\n }\n } else if( arrayCellsWidthAutoHelper[parseFloat( td.dataset.xIndex )] ) {\n if( ! td.dataset.wptbFixedWidth ) {\n td.dataset.wptbCssTdAutoWidth = true;\n }\n } else if( arrayCellsWidthFixedHelper[parseFloat( td.dataset.xIndex )] ) {\n td.removeAttribute( 'data-wptb-css-td-auto-width' );\n }\n }\n }\n \n for( let i = 0; i < arrayCellsWidthFixedHelper.length; i++ ) {\n if( arrayCellsWidthFixedHelper[i] ) {\n tableTdsSumMaxWidthFixed += arrayCellsWidthFixedHelper[i];\n }\n }\n \n let CellsWidthAutoCount = 0;\n for( let i = 0; i < arrayCellsWidthAutoHelper.length; i++ ) {\n if( arrayCellsWidthAutoHelper[i] ) {\n tableTdsSumMaxWidthAuto += arrayCellsWidthAutoHelper[i];\n CellsWidthAutoCount++;\n }\n }\n \n tableTdsSumMaxWidth = tableTdsSumMaxWidthFixed + tableTdsSumMaxWidthAuto;\n \n table.dataset.wptbTableTdsSumMaxWidth = tableTdsSumMaxWidth;\n if( CellsWidthAutoCount ) {\n table.dataset.wptbCellsWidthAutoCount = CellsWidthAutoCount;\n if( table.mergingСellsHorizontally ) {\n table.dataset.wptbFixedWidthSize = tableTdsSumMaxWidthFixed;\n } else {\n table.removeAttribute( 'data-wptb-fixed-width-size' );\n }\n } else {\n table.removeAttribute( 'data-wptb-fixed-width-size' );\n table.removeAttribute( 'data-wptb-cells-width-auto-count' );\n }\n \n let styleElementCreate = false;\n let tableTdWidthAuto;\n if( tableTdsSumMaxWidth < wptbTableSetupWidth ) {\n if( CellsWidthAutoCount ) {\n table.style.minWidth = '100%';\n if( table.mergingСellsHorizontally ) {\n table.style.width = 'auto';\n let tableTdsWidthAutoCommon = wptbTableSetupWidth - tableTdsSumMaxWidthFixed;\n tableTdWidthAuto = tableTdsWidthAutoCommon / CellsWidthAutoCount;\n tableTdWidthAuto = tableTdWidthAuto - tdPaddingCommon - tableTdBorderCommonWidth;\n styleElementCreate = true;\n } else {\n table.style.width = '100%';\n }\n } else {\n table.style.width = 'auto';\n table.style.minWidth = null;\n table.style.maxWidth = null;\n }\n } else {\n table.style.maxWidth = null;\n table.style.minWidth = tableTdsSumMaxWidth + 'px';\n table.style.width = 'auto';\n tableTdWidthAuto = '100'\n styleElementCreate = true;\n }\n \n let head = document.head;\n if( head ) {\n let cssForTdsWidthAutoOld = head.querySelector( 'style[data-wptb-td-auto-width=\"true\"]' );\n if( cssForTdsWidthAutoOld ) {\n head.removeChild( cssForTdsWidthAutoOld );\n }\n }\n \n if( styleElementCreate ) {\n cssForTdsWidthAuto = document.createElement( 'style' );\n cssForTdsWidthAuto.setAttribute( 'data-wptb-td-auto-width', true );\n cssForTdsWidthAuto.innerHTML = '[data-wptb-css-td-auto-width=true]{width:' + tableTdWidthAuto + 'px}';\n if( head ) {\n head.appendChild( cssForTdsWidthAuto );\n }\n }\n \n if( table.dataset.wptbTableAlignment ) {\n let wptbTableAlignment = table.dataset.wptbTableAlignment;\n\n let wptbTableSetupWidth = wptbTableSetup.offsetWidth;\n if( wptbTableSetupWidth < table.offsetWidth ) {\n table.style.float = null;\n } else {\n if( wptbTableAlignment == 'center' ) {\n table.style.float = null;\n } else {\n table.style.float = wptbTableAlignment;\n }\n }\n\n if( wptbTableAlignment == 'center' ) {\n wptbTableSetup.style.float = null;\n } else {\n wptbTableSetup.style.float = wptbTableAlignment;\n }\n \n if( tableTdWidthAuto && table.dataset.wptbTableContainerMaxWidth && table.offsetWidth < table.dataset.wptbTableContainerMaxWidth ) {\n table.style.width = '100%';\n }\n } else {\n table.style.float = null;\n }\n }\n \n table.addRowHeight = function( value, cleaner ) {\n let highlighted = table.getElementsByClassName( 'wptb-highlighted' );\n if( highlighted.length > 0 ) {\n for( let k = 0; k < highlighted.length; k++ ) {\n let dataYIndex = highlighted[k].dataset.yIndex;\n if( dataYIndex ) {\n function tableTdsFor( dataYIndex, rowspan ) {\n let tableRows = table.rows;\n let heightIsSet = false;\n let arrayTdsPrevious = [];\n for( let i = 0; i < tableRows.length; i++ ) {\n let row = tableRows[i];\n let tds = row.children;\n for( let j = 0; j < tds.length; j++ ) {\n let td = tds[j];\n if( td.dataset.yIndex == dataYIndex ) {\n if( value ) {\n if( td.rowSpan == rowspan ) {\n td.style.height = value + 'px';\n td.removeAttribute( 'data-wptb-fixed-heidht' );\n heightIsSet = true;\n let tableColumnHeightAutoFixedCheckbox = document.getElementById( 'wptb-table-row-height-auto-fixed' );\n if( ! tableColumnHeightAutoFixedCheckbox.checked ) {\n tableColumnHeightAutoFixedCheckbox.checked = true;\n }\n continue;\n } else {\n td.style.height = null;\n td.dataset.wptbFixedHeight = value;\n if( j == tds.length - 1 && ! heightIsSet ) {\n tableTdsFor( dataYIndex , rowspan + 1 );\n }\n }\n } else if( cleaner ) {\n td.style.height = null;\n td.removeAttribute( 'data-wptb-fixed-heidht' );\n } else {\n if( td.dataset.wptbFixedHeight ) {\n if( td.rowSpan = rowspan ) {\n td.style.height = td.dataset.wptbFixedHeight + 'px';\n td.removeAttribute( 'data-wptb-fixed-width' );\n }\n } else if( td.style.height ) {\n for( let z = 0; z < arrayTdsPrevious.length; z++ ) {\n arrayTdsPrevious[z].style.height = td.style.height;\n }\n arrayTdsPrevious = [];\n } else {\n arrayTdsPrevious.push( td );\n }\n }\n } \n }\n }\n }\n \n tableTdsFor( dataYIndex, 1 );\n }\n }\n }\n }\n \n table.reconstraction = function() {\n let tds = table.getElementsByTagName( 'td' );\n table.mergingСellsHorizontally = false;\n table.mergingCellsVertically = false;\n table.dataset.reconstraction = 1;\n let forBreak = 0;\n for( let i = 0; i < tds.length; i++ ) {\n if( tds[i].colSpan > 1 ) {\n table.dataset.reconstraction = 0;\n table.mergingСellsHorizontally = true;\n forBreak++;\n }\n \n if( tds[i].rowSpan > 1 ) {\n table.dataset.reconstraction = 0;\n table.mergingCellsVertically = true;\n forBreak++;\n }\n \n if( forBreak == 2 ) {\n break;\n }\n }\n }\n\n /*\n * As simple as it is: adds a column to the end of table.\n */\n table.addColumnEnd = function () {\n let td,\n currentTable = document.getElementsByClassName('wptb-preview-table'),\n currentTableTd,\n currentTdStyle;\n if (currentTable.length > 0) {\n currentTableTd = currentTable[0].querySelector('td');\n }\n\n if (currentTableTd) {\n currentTdStyle = currentTableTd.getAttribute('style');\n }\n \n for (var i = 0; i < table.rows.length; i++) {\n td = new WPTB_Cell(mark);\n \n if (currentTdStyle) {\n td.getDOMElement().setAttribute('style', currentTdStyle);\n td.getDOMElement().style.width = null;\n td.getDOMElement().style.height = null;\n }\n \n table.rows[i].appendChild(td.getDOMElement());\n array[i].push(0);\n }\n \n maxAmountOfCells++;\n table.recalculateIndexes();\n table.tdDefaultWidth();\n table.addRowHeight();\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n /*\n * As simple as it looks: adds a column to the start of table.\n */\n\n table.addColumnStart = function () {\n let td,\n firstCell,\n currentTable = document.getElementsByClassName('wptb-preview-table'),\n currentTableTd,\n currentTdStyle;\n if ( currentTable.length > 0 ) {\n currentTableTd = currentTable[0].querySelector('td');\n }\n\n if ( currentTableTd ) {\n currentTdStyle = currentTableTd.getAttribute('style');\n }\n \n for (var i = 0; i < table.rows.length; i++) {\n td = new WPTB_Cell(mark);\n if (currentTdStyle) {\n td.getDOMElement().setAttribute('style', currentTdStyle);\n td.getDOMElement().style.width = null;\n td.getDOMElement().style.height = null;\n }\n firstCell = table.rows[i].getElementsByTagName('td')[0];\n if (firstCell) {\n table.rows[i].insertBefore(td.getDOMElement(), firstCell);\n } else {\n table.rows[i].appendChild(td.getDOMElement());\n }\n array[i].push(0);\n }\n\n maxAmountOfCells++;\n table.recalculateIndexes();\n table.tdDefaultWidth();\n table.addRowHeight();\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n /*\n * Well, not so simple as previous functions.\n * It adds a column after a certain column of reference.\n * @param integer the column number to be used as reference.\n *\tIf empty, then the first highlighted cell is used as reference.\n */\n\n table.addColumnAfter = function (c_pos) {\n let rows = table.rows,\n cellPointer,\n cellsBuffer,\n cell = document.querySelector('.wptb-highlighted'),\n cellStyle = cell.getAttribute('style'),\n pos = c_pos != undefined && typeof c_pos === 'number' ? c_pos : getCoords(cell)[1];\n \n \n \n if( maxAmountOfCells - pos - cell.colSpan + 1 == 1 ) {\n table.addColumnEnd();\n } else {\n let pendingInsertion = false,\n stepsToMove,\n td, bro,\n carriedRowspans = [],\n currentCell;\n\n for (var i = 0; i < maxAmountOfCells; i++) {\n carriedRowspans.push(0);\n }\n\n for (var i = 0; i < rows.length; i++) {\n cellPointer = 0;\n cellsBuffer = rows[i].getElementsByTagName('td');\n pendingInsertion = false;\n for (var xPosition = 0;\n xPosition < maxAmountOfCells;\n xPosition += stepsToMove) {\n stepsToMove = 1;\n\n if (pendingInsertion) {\n td = new WPTB_Cell(mark);\n if (cellStyle) {\n td.getDOMElement().setAttribute('style', cellStyle);\n td.getDOMElement().style.width = null;\n td.getDOMElement().style.height = null;\n }\n if (currentCell && rows[i].contains(currentCell)) {\n bro = currentCell.nextSibling;\n if (bro) {\n rows[i].insertBefore(td.getDOMElement(), bro);\n } else {\n rows[i].appendChild(td.getDOMElement());\n }\n } else {\n rows[i].insertBefore(td.getDOMElement(), cellsBuffer[0]);\n }\n break;\n } else if (carriedRowspans[xPosition] > 0) {\n // If no pending insertion, let's check if no rowspan from upper cells is pending in current position\n if (pos == xPosition) {\n pendingInsertion = true;\n }\n } else {\n currentCell = cellsBuffer[cellPointer++];\n if (currentCell.rowSpan > 1) {\n stepsToMove = currentCell.colSpan;\n for (var k = 0; k < currentCell.colSpan; k++) {\n carriedRowspans[xPosition + k] = currentCell.rowSpan;\n if (xPosition + k == pos) {\n pendingInsertion = true;\n }\n }\n } else if (currentCell.colSpan > 1) {\n stepsToMove = currentCell.colSpan;\n for (var k = 0; k < currentCell.colSpan; k++) {\n if (xPosition + k == pos) {\n pendingInsertion = true;\n }\n }\n } else if (xPosition == pos) {\n pendingInsertion = true;\n }\n }\n }\n\n for (var l = 0; l < maxAmountOfCells; l++) {\n if (carriedRowspans[l] > 0)\n carriedRowspans[l]--;\n }\n\n }\n\n for (var i = 0; i < array.length; i++) {\n array[i].push(0);\n }\n maxAmountOfCells++;\n drawTable(array);\n table.recalculateIndexes();\n table.addColumnWidth();\n table.addRowHeight();\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n }\n };\n\n /*\n * For preventing us to take a lot of time,\n * This is just calling the function addColumnAfter, but\n * using the previous column to current one as reference.\n * @see addColumnAfter\n */\n\n table.addColumnBefore = function () {\n var cell = document.querySelector('.wptb-highlighted'),\n pos = getCoords(cell)[1];\n\n if (pos === 0) {\n table.addColumnStart();\n } else {\n table.addColumnAfter(pos - 1);\n }\n };\n\n /*\n * Luckily, thisfunction is simple, \n * it just add a row to the end of table.\n */\n\n table.addRowToTheEnd = function () {\n let r = table.insertRow(-1),\n td,\n aux,\n currentTable = document.getElementsByClassName('wptb-preview-table');\n r.classList.add( 'wptb-row' );\n if (currentTable.length > 0) {\n currentTable = currentTable[0];\n \n for (var i = 0; i < maxAmountOfCells; i++) {\n td = new WPTB_Cell(mark);\n let currentTableTd = currentTable.querySelector('[data-x-index=\"' + i + '\"]');\n if( currentTableTd ) {\n let currentTdStyle = currentTableTd.getAttribute( 'style' );\n \n td.getDOMElement().setAttribute( 'style', currentTdStyle );\n td.getDOMElement().style.height = null;\n }\n r.appendChild(td.getDOMElement());\n }\n \n aux = Array.from(array[0]);\n array.push(aux);\n drawTable(array);\n table.recalculateIndexes();\n table.addColumnWidth();\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n }\n };\n\n /*\n * Yet another simple function, \n * it just add a row to the start of table.\n */\n\n table.addRowToTheStart = function () {\n let r = table.insertRow(0),\n td,\n aux,\n currentTable = document.getElementsByClassName('wptb-preview-table'),\n currentTableTd,\n currentTdStyle;\n r.classList.add( 'wptb-row' );\n if (currentTable.length > 0) {\n currentTable = currentTable[0];\n \n for (var i = 0; i < maxAmountOfCells; i++) {\n td = new WPTB_Cell(mark);\n let currentTableTd = currentTable.querySelector('[data-x-index=\"' + i + '\"]');\n if( currentTableTd ) {\n let currentTdStyle = currentTableTd.getAttribute( 'style' );\n \n td.getDOMElement().setAttribute( 'style', currentTdStyle );\n td.getDOMElement().style.height = null;\n }\n r.appendChild(td.getDOMElement());\n }\n \n aux = Array.from(array[0]);\n array.push(aux);\n drawTable(array);\n table.recalculateIndexes();\n table.addColumnWidth();\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n }\n };\n\n /* \n * This function adds a row before the current one.\n * Since the biggest factor of problem is a not-started but ongoing rowspan,\n * the most of the troubles is not here.\n */\n\n table.addRowBefore = function () {\n let cell = document.querySelector('.wptb-highlighted'),\n cellStyle = cell.getAttribute('style'),\n row = getCoords(cell)[0],\n cellNew;\n for( let i = row - 1; i >= 0; i-- ) {\n let rowChildren = table.rows[i].children;\n let rowChildrenLength = rowChildren.length;\n if( rowChildrenLength > 0 ) {\n for( let j = 0; j < rowChildrenLength; j++ ) {\n if( rowChildren[j].rowSpan == 1 ) {\n row = i;\n cellNew = true;\n break;\n }\n }\n }\n if ( cellNew ) {\n break;\n }\n }\n\n if (row === 0) {\n table.addRowToTheStart();\n } else {\n table.addRowAfter( row, cellStyle );\n }\n };\n\n /*\n * Well... by the name convention of the previous 3 functions,\n * it's pretty obvious that this functions attaches a new\n * row after highlighted cell row. The greatest obstacle it was\n * the possibility of a TR not having the exact amount of columns\n * occuped by actual node but rowspanned upper cells. For that purpose\n * it was created the function realTimeArray.\n * @see realTimeArray\n */\n\n table.addRowAfter = function ( row, cellStyle ) {\n let cellRowSpan,\n rowAfter,\n aux;\n \n if ( ( row == undefined || typeof row !== 'number' ) && cellStyle == undefined ) {\n let cell = document.querySelector('.wptb-highlighted');\n cellStyle = cell.getAttribute('style'),\n row = getCoords(cell)[0],\n cellRowSpan = cell.rowSpan,\n rowAfter = row + cellRowSpan - 1;\n } else {\n rowAfter = row;\n }\n \n \n let cellsColSpan = 0;\n if ( rowAfter < table.rows.length -1 ) {\n for( let i = 0; i <= rowAfter ; i++ ) {\n let tableRowsIChildren = table.rows[i].children,\n tableRIChildrenLength = tableRowsIChildren.length;\n if( tableRIChildrenLength > 0 ) {\n for( let j = 0; j < tableRIChildrenLength; j++ ) {\n let rowIRowSpan = tableRowsIChildren[j].rowSpan;\n\n if ( rowIRowSpan - 1 + i > rowAfter ) {\n tableRowsIChildren[j].rowSpan++;\n }\n }\n }\n }\n \n let rNext = table.rows[rowAfter + 1],\n rNextChildren = rNext.children,\n rNextChildrenLength = rNextChildren.length;\n \n if( rNextChildrenLength > 0 ) {\n for ( let i = 0; i < rNextChildrenLength; i++ ) {\n cellsColSpan += rNextChildren[i].colSpan;\n }\n }\n } else {\n cellsColSpan = array[0].length;\n }\n \n let r = table.insertRow( rowAfter + 1 );\n r.classList.add( 'wptb-row' );\n \n for ( j = 0; j < cellsColSpan; j++ ) {\n let td = new WPTB_Cell( mark );\n td.getDOMElement().setAttribute( 'style', cellStyle );\n td.getDOMElement().style.width = null;\n td.getDOMElement().style.height = null;\n r.appendChild( td.getDOMElement() );\n }\n\n aux = Array.from(array[0]);\n array.push(aux);\n drawTable(array);\n table.recalculateIndexes();\n table.addColumnWidth();\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n /*\n * This function checks the current selected cells\n * make a rectangular shape.\n * @param Array the abstract table.\n * @return false, if not making a rectangle, or\n *\tArray an array containing number of rows and columns, if selection makes a rectangle.\n */\n\n table.isSquare = function (a) {\n var rowStart = -1,\n columnStart = -1,\n rowEnd = -1,\n columnEnd = -1,\n height,\n width,\n itemsEstimate = 0,\n items = 0;\n\n for (var i = 0; i < a.length; i++) {\n for (var j = 0; j < a[i].length; j++) {\n if (a[i][j] == 1) {\n if ( j < columnStart || columnStart == -1 ) {\n columnStart = j;\n }\n if ( i < rowStart || rowStart == -1 ) {\n rowStart = i;\n }\n }\n }\n \n }\n\n for (var i = a.length - 1; i > -1; i--) {\n for (var j = a[i].length - 1; j > -1; j--) {\n if (a[i][j] == 1) {\n if ( j > columnEnd ) {\n columnEnd = j;\n }\n if ( i > rowEnd ) {\n rowEnd = i;\n }\n }\n }\n }\n\n for (var i = rowStart; i < rowEnd; i++) {\n for (var j = columnStart; j < columnEnd; j++) {\n if (a[i][j] == 0 || a[i][j] == undefined) {\n return false;\n }\n }\n }\n\n for (var i = 0; i < a.length; i++) {\n for (var j = 0; j < a[i].length; j++) {\n if (a[i][j] == 1) {\n items++;\n }\n }\n }\n\n height = rowEnd - rowStart + 1;\n width = columnEnd - columnStart + 1;\n itemsEstimate = height * width;\n\n if (itemsEstimate !== items) {\n return false;\n }\n return [height, width];\n };\n\n /*\n * This function merges all selected cells.\n * Well, actually sets the colspan and rowspan of first \n * upper left cell in selection and deletes the another selected cells.\n */\n\n table.mergeCells = function () {\n var dimensions = table.isSquare(array),\n rowspan = dimensions[0],\n colspan = dimensions[1],\n first = document.querySelector('.wptb-highlighted'),\n tds = [].slice.call(document.getElementsByClassName('wptb-highlighted'), 1),\n tdsChildrenNew = [];\n\n for (let i = 0; i < tds.length; i++) {\n let tdsInternalElements = tds[i].getElementsByClassName('wptb-ph-element');\n if (tdsInternalElements.length > 0) {\n let tdsIntElemLength = tdsInternalElements.length;\n for (let j = 0; j < tdsIntElemLength; j++) {\n tdsChildrenNew.push(tdsInternalElements[j]);\n }\n }\n let p = tds[i].parentNode;\n p.removeChild(tds[i]);\n }\n if (tdsChildrenNew.length > 0) {\n for (let i = 0; i < tdsChildrenNew.length; i++) {\n first.appendChild(tdsChildrenNew[i]);\n }\n }\n\n first.colSpan = colspan;\n first.rowSpan = rowspan;\n table.recalculateIndexes();\n table.reconstraction();\n let firstWidth = first.style.width;\n let firstDataFixedWidth = first.dataset.wptbFixedWidth;\n if( firstWidth ) {\n table.addColumnWidth( parseFloat( firstWidth, 10 ) );\n } else if( firstDataFixedWidth ) {\n table.addColumnWidth();\n } else {\n table.addColumnWidth( false, true );\n }\n \n let firstHeight = first.style.height;\n let firstDataFixedHeight = first.dataset.wptbFixedHeight;\n if( firstHeight ) {\n table.addRowHeight( parseFloat( firstHeight, 10 ) );\n } else if( firstDataFixedHeight ) {\n table.addRowHeight();\n } else {\n table.addRowHeight( false, true );\n }\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n /*\n * This functions makes the exact inverse as above.\n * It resets colspan and rowspan and appends \n * the same amount in cells to the table.\n * @bug\n */\n\n table.splitCell = function () {\n var cell = document.getElementsByClassName('wptb-highlighted')[0],\n rowspan = cell.rowSpan,\n colspan = cell.colSpan,\n cellStyles = cell.getAttribute('style'),\n row = getCoords(cell)[0],\n thisRow = table.rows[row],\n cellXIndex =cell.dataset.xIndex;\n \n cell.rowSpan = 1;\n cell.colSpan = 1;\n \n for (let i = 1; i < colspan; i++) {\n let td = new WPTB_Cell(mark);\n td.getDOMElement().setAttribute('style', cellStyles);\n td.getDOMElement().classList.add( 'wptb-highlighted' );\n if ( cell.nextSibling ) {\n thisRow.insertBefore( td.getDOMElement(), cell.nextSibling );\n } else {\n thisRow.appendChild( td.getDOMElement() );\n }\n \n }\n\n if (rowspan > 1) {\n for (let i = 1; i < rowspan; i++) {\n let rowChildInsertBefore = undefined,\n rowNext = table.rows[row + i],\n rowChildren = rowNext.children,\n rowChildrenLength = rowChildren.length;\n \n if ( rowChildrenLength > 0 ) {\n for ( let k = 0; k < rowChildrenLength; k++ ) {\n if ( Number( rowChildren[k].dataset.xIndex ) > Number( cellXIndex ) ) {\n rowChildInsertBefore = rowChildren[k];\n break;\n } \n }\n }\n for ( let j = 0; j < colspan; j++ ) {\n let td = new WPTB_Cell( mark );\n td.getDOMElement().setAttribute( 'style', cellStyles );\n if ( rowChildInsertBefore != undefined ) {\n rowNext.insertBefore( td.getDOMElement(), rowChildInsertBefore );\n } else {\n rowNext.appendChild( td.getDOMElement() );\n }\n }\n }\n }\n\n table.recalculateIndexes();\n table.reconstraction();\n table.addColumnWidth();\n table.addRowHeight();\n WPTB_Helper.dataTitleColumnSet( table );\n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n /*\n * Searches for rowspanned cells up to row number meeting it.\n * @param number the number of row where the function\n * must search up to.\n */\n\n table.findRowspannedCells = function (row) {\n var array = [],\n difference;\n actualPoints = getActualPointsInRow(row);\n if (actualPoints === maxAmountOfCells) {\n return [];\n }\n difference = maxAmountOfCells - actualPoints;\n\n for (var i = row - 1; i >= 0 && difference; i--) {\n var tds = table.rows[i].getElementsByTagName('td');\n for (var i = 0; i < tds.length; i++) {\n if (tds[i].rowSpan > 1) {\n array.push(tds[i]);\n difference -= tds[i].colSpan;\n }\n }\n }\n return array;\n\n }\n\n /*\n * This function explores the table and adds \n * a cell for each lacking one for each row\n * to meet an even amount of cells.\n */\n\n table.addLackingCells = function () {\n var sumRows = [];\n for (var i = 0; i < table.rows.length; i++) {\n sumRows.push(0);\n }\n\n for (var i = 0; i < table.rows.length; i++) {\n var tds = table.rows[i].getElementsByTagName('td');\n for (var j = 0; j < tds.length; j++) {\n if (tds[j].rowSpan > 1) {\n for (var k = 1; k < tds[j].rowSpan; k++) {\n sumRows[i + k]++;\n }\n }\n }\n }\n\n for (var i = 0; i < table.rows.length; i++) {\n var tds = table.rows[i].getElementsByTagName('td'),\n totalColspan = 0;\n for (var j = 0; j < tds.length; j++) {\n totalColspan += tds[j].colSpan;\n }\n totalColspan += sumRows[i];\n difference = maxAmountOfCells - totalColspan;\n for (var j = 0; j < difference; j++) {\n var td = new WPTB_Cell(mark);\n table.rows[i].appendChild(td.getDOMElement());\n //table.rows[i].insertBefore( td.getDOMElement(), rows[i].nextSibling );\n }\n }\n };\n\n /*\n * This function deletes the row of currently\n * selected cell. \n */\n\n table.deleteRow = function () {\n let cell = document.querySelector('.wptb-highlighted'),\n cellStyles = cell.getAttribute('style'),\n rowspan = cell.rowSpan,\n row = getCoords(cell)[0],\n thisRow,\n aux;\n \n if ( rowspan == undefined ) rowspan = 1;\n \n for ( let i = 0; i < rowspan; i++ ) {\n thisRow = table.rows[row];\n let thisRowChildren = thisRow.children,\n nextRow = table.rows[row + 1],\n nextRowChildren,\n nextRowChildrenLength,\n tdArr = [];\n\n if( nextRow != undefined ) {\n nextRowChildren = nextRow.children;\n nextRowChildrenLength = nextRowChildren.length;\n for (let j = 0; j < thisRowChildren.length; j++) {\n if ( thisRowChildren[j].rowSpan > 1 ) {\n let td = new WPTB_Cell(mark);\n td.getDOMElement().setAttribute('style', cellStyles);\n td.getDOMElement().colSpan = thisRowChildren[j].colSpan;\n td.getDOMElement().rowSpan = thisRowChildren[j].rowSpan - 1;\n\n let nextRowChildrenK = undefined;\n for ( let k = 0; k < nextRowChildrenLength; k++ ) {\n if ( Number( nextRowChildren[k].dataset.xIndex ) > Number( thisRowChildren[j].dataset.xIndex ) ) {\n nextRowChildrenK = nextRowChildren[k];\n break;\n } \n }\n\n if ( nextRowChildrenK ) {\n tdArr.push( [td, nextRowChildrenK] );\n } else {\n tdArr.push( [td] );\n }\n }\n }\n\n if ( tdArr.length > 0 ) {\n for ( let k = 0; k < tdArr.length; k++ ) {\n if ( tdArr[k][1] != undefined ) {\n nextRow.insertBefore( tdArr[k][0].getDOMElement(), tdArr[k][1] );\n } else {\n nextRow.appendChild( tdArr[k][0].getDOMElement() );\n }\n }\n }\n }\n \n let tableRows = table.rows;\n if ( tableRows.length > 0 ) {\n for ( let j = 0; j < row; j++ ) {\n let jRowChildren = tableRows[j].children;\n if ( jRowChildren.length > 0 ) {\n for ( let x = 0; x < jRowChildren.length; x++ ) {\n if ( jRowChildren[x].rowSpan - 1 >= row - j ) {\n jRowChildren[x].rowSpan--;\n }\n }\n }\n }\n }\n aux = Array.from(array[0]);\n array.pop(aux);\n drawTable(array);\n table.getElementsByTagName('tbody')[0].removeChild(table.rows[row]);\n \n if( table.rows.length == 0 ) {\n WPTB_Helper.toggleTableEditMode();\n wptbTableSetup.innerHTML = '';\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';\n let wptbSaveBtn = document.getElementsByClassName( 'wptb-save-btn' );\n if( wptbSaveBtn.length > 0 ) {\n wptbSaveBtn = wptbSaveBtn[0];\n \n wptbSaveBtn.classList.add( 'wptb-save-disabled' );\n }\n } else {\n table.recalculateIndexes();\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n \n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n }\n\n /*\n * This function deletes the column of currently\n * selected cell. Again, this is way more complicated than\n * delete row case.\n */\n\n table.deleteColumn = function () {\n let cell = document.querySelector('.wptb-highlighted'),\n cellXIndex = cell.dataset.xIndex,\n colspan = cell.colSpan;\n \n for ( let i = 0; i < colspan; i++ ) {\n for ( let j = 0; j < table.rows.length; j++ ) {\n let rowChildren = table.rows[j].children;\n let rowChildrenLength = rowChildren.length;\n if( rowChildrenLength > 0 ) {\n for ( let k = rowChildrenLength - 1; k >= 0; k-- ) {\n if ( Number( rowChildren[k].dataset.xIndex ) == Number( cellXIndex ) ) {\n if ( rowChildren[k].colSpan > 1 ) {\n rowChildren[k].colSpan--;\n } else {\n table.rows[j].removeChild( rowChildren[k] );\n }\n break;\n } else if( Number( rowChildren[k].dataset.xIndex ) < Number( cellXIndex ) && \n Number( rowChildren[k].dataset.xIndex ) + \n Number( rowChildren[k].colSpan -1 ) >= cellXIndex ) {\n if ( rowChildren[k].colSpan > 1 ) {\n rowChildren[k].colSpan--;\n }\n break;\n }\n }\n }\n }\n \n for ( let j = 0; j < table.rows.length; j++ ) {\n if (array[j] != undefined)\n array[j].pop();\n }\n \n maxAmountOfCells--;\n \n if( table.querySelectorAll( 'td' ).length == 0 ) {\n WPTB_Helper.toggleTableEditMode();\n wptbTableSetup.innerHTML = '';\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';\n let wptbSaveBtn = document.getElementsByClassName( 'wptb-save-btn' );\n if( wptbSaveBtn.length > 0 ) {\n wptbSaveBtn = wptbSaveBtn[0];\n \n wptbSaveBtn.classList.add( 'wptb-save-disabled' );\n }\n } else {\n table.recalculateIndexes();\n table.tdDefaultWidth();\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n \n undoSelect();\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'none';\n\n array = fillTableArray();\n\n undoSelect();\n drawTable(array);\n\n wptbTableSetup.appendChild(table);\n //if (columns || rows) {\n table.recalculateIndexes( true );\n //}\n table.reconstraction();\n table.tdDefaultWidth();\n \n wptbTableSetup.onresize = function() {\n table.tdDefaultWidth();\n };\n\n WPTB_LeftPanel();\n \n // this code gets the ID of the active element in the toolbar \n // and stores it in the data attribute of the common container element \"wpcd_fixed_toolbar\"\n// let wptbPhElement = document.getElementsByClassName( 'wptb-ph-element' );\n// let wpcdFixedToolbar = document.getElementById( 'wpcd_fixed_toolbar' );\n// for ( let i = 0; i < wptbPhElement.length; i++ ) {\n// wptbPhElement[i].addEventListener( 'click', function( e ) {\n// let wptbToolbar = document.getElementById( 'wpcd_fixed_toolbar' ).children;\n// for ( let j = 0; j < wptbToolbar.length; j++ ) {\n// let elementStyles = window.getComputedStyle( wptbToolbar[j], 'null' );\n// if( elementStyles.getPropertyValue( 'display' ) == 'block' ) {\n// wpcdFixedToolbar.dataset.toolbarActiveId = wptbToolbar[j].getAttribute( 'id' );\n// }\n// }\n// }, false );\n// }\n \n// let wptbPanelLeft = document.getElementsByClassName( 'wptb-panel-left' );\n// if( wptbPanelLeft.length > 0 ) {\n// wptbPanelLeft[0].addEventListener( 'click', function( e ) {\n// let toolbarActiveElementId = wpcdFixedToolbar.dataset.toolbarActiveId;\n// document.getElementById( toolbarActiveElementId ).style.display = '';\n// }, false );\n// }\n \n// let body = document.getElementsByTagName( 'body' );\n// if( body.length > 0 ) {\n// body[0].addEventListener( 'click', function( e ) {\n// if ( e.target.classList.contains( 'wptb-panel-left' ) || WPTB_Helper.findAncestor( e.target, 'wptb-panel-left' ) ) {\n// let toolbarActiveElementId = wpcdFixedToolbar.dataset.toolbarActiveId;\n// document.getElementById( toolbarActiveElementId ).style.display = '';\n// }\n// }, false );\n// }\n};","var WPTB_TableStateSaveManager = function() {\n this.tableStateSet = ( generate ) => {\n \n if( generate && window.wptbTableStateSaving && Array.isArray( window.wptbTableStateSaving ) ) {\n return;\n }\n \n // get preview table\n let wptbPreviewTable = document.getElementsByClassName( 'wptb-preview-table' );\n if( wptbPreviewTable.length > 0 ) {\n wptbPreviewTable = wptbPreviewTable[0];\n } else {\n wptbPreviewTable = '';\n }\n \n // check if a global array doesn't exist with saved versions of the table \n // them create it\n if( ! window.wptbTableStateSaving && ! Array.isArray( window.wptbTableStateSaving ) ) {\n window.wptbTableStateSaving = [];\n } \n\n // remove the extra part of the array after changing the table \n // when it is showed in the not last modified version\n if( window.wptbTableStateSaving.length > window.wptbTableStateNumberShow ) {\n window.wptbTableStateSaving = window.wptbTableStateSaving.slice( 0, window.wptbTableStateNumberShow + 1 );\n }\n\n //add new state of table\n let wptbNewPreviewTable = '';\n if( wptbPreviewTable ) {\n wptbNewPreviewTable = wptbPreviewTable.cloneNode( true );\n let wptbHighlighted = wptbNewPreviewTable.getElementsByClassName( 'wptb-highlighted' );\n for( let i = 0; i < wptbHighlighted.length; i++ ) {\n wptbHighlighted[i].classList.remove( 'wptb-highlighted' );\n }\n let wptbDirectlyhovered = wptbNewPreviewTable.getElementsByClassName( 'wptb-directlyhovered' );\n for( let i = 0; i < wptbDirectlyhovered.length; i++ ) {\n wptbDirectlyhovered[i].classList.remove( 'wptb-directlyhovered' );\n }\n let mceContentBodys = wptbNewPreviewTable.querySelectorAll( '.mce-content-body' );\n if( mceContentBodys.length > 0 ) {\n for ( let k = 0; k < mceContentBodys.length; k++ ) {\n mceContentBodys[k].classList.remove( 'mce-content-body' );\n }\n }\n let dataMceStyle = wptbNewPreviewTable.querySelectorAll( '[data-mce-style]' );\n if ( dataMceStyle.length > 0 ) {\n for ( let k = 0; k < dataMceStyle.length; k++ ) {\n dataMceStyle[k].removeAttribute( 'data-mce-style' );\n }\n }\n let mceIds = wptbNewPreviewTable.querySelectorAll( '[id^=mce_]' );\n if ( mceIds.length > 0 ) {\n for ( let k = 0; k < mceIds.length; k++ ) {\n mceIds[k].removeAttribute( 'id' );\n }\n }\n }\n\n let cssForTdsWidthAutoValue = '';\n let head = document.head;\n if( head ) {\n let cssForTdsWidthAuto = head.querySelector( 'style[data-wptb-td-auto-width=\"true\"]' );\n if( cssForTdsWidthAuto ) {\n cssForTdsWidthAutoValue = cssForTdsWidthAuto.innerHTML;\n }\n }\n\n window.wptbTableStateSaving.push( [wptbNewPreviewTable, cssForTdsWidthAutoValue] );\n\n // set new number of state which is showed now\n window.wptbTableStateNumberShow = window.wptbTableStateSaving.length - 1;\n\n // make undo arrow active when the table was changed\n if( window.wptbTableStateSaving.length - 1 > 0 ) {\n let wptbUndo = document.getElementsByClassName( 'wptb-undo' );\n if( wptbUndo.length > 0 ) {\n wptbUndo = wptbUndo[0];\n\n wptbUndo.classList.remove( 'wptb-undoredo-disabled' );\n }\n }\n\n // make redo arrow not active when the table was changed\n let wptbRedo = document.getElementsByClassName( 'wptb-redo' );\n if( wptbRedo.length > 0 ) {\n wptbRedo = wptbRedo[0];\n\n wptbRedo.classList.add( 'wptb-undoredo-disabled' );\n }\n\n let wptbSaveBtn = document.getElementsByClassName( 'wptb-save-btn' );\n if( wptbSaveBtn.length > 0 ) {\n wptbSaveBtn = wptbSaveBtn[0];\n if( ( ! wptbSaveBtn.dataset.wptbTableStateNumberSave && window.wptbTableStateNumberShow == 0 ) || \n window.wptbTableStateNumberShow == wptbSaveBtn.dataset.wptbTableStateNumberSave || ! wptbPreviewTable ) {\n wptbSaveBtn.classList.add( 'wptb-save-disabled' );\n } else {\n wptbSaveBtn.classList.remove( 'wptb-save-disabled' );\n }\n }\n }\n \n this.tableStateGet = ( datawptbUndoredo ) => {\n if( datawptbUndoredo && window.wptbTableStateSaving && window.wptbTableStateSaving.length > 0 ) {\n \n // changes the number of the state which displays now\n if( datawptbUndoredo == 'undo' ) {\n if( window.wptbTableStateNumberShow > 0 ) {\n window.wptbTableStateNumberShow--;\n } else {\n return false;\n }\n } else if( datawptbUndoredo == 'redo' ) {\n if( window.wptbTableStateNumberShow < window.wptbTableStateSaving.length ) {\n window.wptbTableStateNumberShow++;\n } else {\n return false;\n }\n }\n \n // add or delete class \"wptb-undoredo-disabled\" for undo button\n let wptbUndo = document.getElementsByClassName( 'wptb-undo' );\n if( wptbUndo.length > 0 ) {\n wptbUndo = wptbUndo[0];\n \n if( window.wptbTableStateNumberShow == 0 ) {\n if( wptbUndo ) {\n wptbUndo.classList.add( 'wptb-undoredo-disabled' );\n }\n } else if( window.wptbTableStateNumberShow > 0 ) {\n if( wptbUndo ) {\n wptbUndo.classList.remove( 'wptb-undoredo-disabled' );\n }\n }\n }\n \n // add or delete class \"wptb-undoredo-disabled\" for redo button\n let wptbRedo = document.getElementsByClassName( 'wptb-redo' );\n if( wptbRedo.length > 0 ) {\n wptbRedo = wptbRedo[0];\n \n if( window.wptbTableStateNumberShow == window.wptbTableStateSaving.length - 1 ) {\n if( wptbRedo ) {\n wptbRedo.classList.add( 'wptb-undoredo-disabled' );\n }\n } else if( window.wptbTableStateNumberShow < window.wptbTableStateSaving.length - 1 ) {\n if( wptbRedo ) {\n wptbRedo.classList.remove( 'wptb-undoredo-disabled' );\n }\n }\n }\n \n // add or delete class \"wptb-save-disabled\" for save button\n let wptbSaveBtn = document.getElementsByClassName( 'wptb-save-btn' );\n if( wptbSaveBtn.length > 0 ) {\n wptbSaveBtn = wptbSaveBtn[0];\n if( ( ! wptbSaveBtn.dataset.wptbTableStateNumberSave && window.wptbTableStateNumberShow == 0 ) || \n window.wptbTableStateNumberShow == wptbSaveBtn.dataset.wptbTableStateNumberSave ) {\n wptbSaveBtn.classList.add( 'wptb-save-disabled' );\n } else {\n wptbSaveBtn.classList.remove( 'wptb-save-disabled' );\n }\n }\n \n // load necessary saved table state\n let wptbTableSetup = document.getElementsByClassName( 'wptb-table-setup' );\n if( wptbTableSetup.length > 0 ) {\n wptbTableSetup = wptbTableSetup[0];\n\n wptbTableSetup.innerHTML = '';\n if( window.wptbTableStateSaving[window.wptbTableStateNumberShow] ) {\n if( window.wptbTableStateSaving[window.wptbTableStateNumberShow][0] && \n typeof window.wptbTableStateSaving[window.wptbTableStateNumberShow][0] === 'object' ) {\n if( 'outerHTML' in window.wptbTableStateSaving[window.wptbTableStateNumberShow][0] ) {\n wptbTableSetup.innerHTML = window.wptbTableStateSaving[window.wptbTableStateNumberShow][0].outerHTML;\n }\n }\n \n if( ! wptbTableSetup.innerHTML ) {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';\n wptbSaveBtn.classList.add( 'wptb-save-disabled' );\n } else {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'none';\n }\n }\n // add or change or delete style element in the head for table cells who have auto width\n if( window.wptbTableStateSaving[window.wptbTableStateNumberShow] ) {\n let head = document.head;\n if( head ) {\n let cssForTdsWidthAutoOld = head.querySelector( 'style[data-wptb-td-auto-width=\"true\"]' );\n if( cssForTdsWidthAutoOld ) {\n head.removeChild( cssForTdsWidthAutoOld );\n }\n \n if( window.wptbTableStateSaving[window.wptbTableStateNumberShow][1] ) {\n let cssForTdsWidthAuto = document.createElement( 'style' );\n cssForTdsWidthAuto.setAttribute( 'data-wptb-td-auto-width', true );\n cssForTdsWidthAuto.innerHTML = window.wptbTableStateSaving[window.wptbTableStateNumberShow][1];\n head.appendChild( cssForTdsWidthAuto );\n }\n }\n }\n \n \n let body = document.getElementsByTagName( 'body' );\n if( body.length > 0 ) {\n body = body[0];\n }\n\n WPTB_Helper.elementOptionsPanelClear();\n WPTB_LeftPanel();\n\n let wptbLeftScrollPanelCellSetting = document.getElementById( 'wptb-left-scroll-panel-cell-settings' ); \n if( wptbLeftScrollPanelCellSetting ) {\n wptbLeftScrollPanelCellSetting.classList.remove( 'visible' );\n }\n }\n }\n }\n \n this.tableStateClear = function() {\n delete window.wptbTableStateSaving;\n delete window.wptbTableStateNumberShow;\n \n let wptbSaveBtn = document.getElementsByClassName( 'wptb-save-btn' );\n if( wptbSaveBtn.length > 0 ) {\n wptbSaveBtn = wptbSaveBtn[0];\n \n wptbSaveBtn.removeAttribute( 'data-wptb-table-state-number-save' );\n }\n \n let wptbUndo = document.getElementsByClassName( 'wptb-undo' );\n if( wptbUndo.length > 0 ) {\n wptbUndo = wptbUndo[0];\n \n wptbUndo.classList.add( 'wptb-undoredo-disabled' );\n }\n \n let wptbRedo = document.getElementsByClassName( 'wptb-redo' );\n if( wptbRedo.length > 0 ) {\n wptbRedo = wptbRedo[0];\n\n wptbRedo.classList.add( 'wptb-undoredo-disabled' );\n }\n }\n}","var WPTB_innerElementSet = function ( element ) {\n \n element.ondragenter = function (e) {\n var div;\n if ( e.dataTransfer.types.indexOf( 'wptbelement' ) == -1 && e.dataTransfer.types.indexOf( 'wptb-moving-mode' ) == -1 ) {\n return;\n }\n WPTB_DropHandle(this, e);\n \n element.classList.add( 'wptb-ondragenter' );\n }\n element.ondragover = function (e) {\n e.preventDefault();\n WPTB_DropHandle(this, e);\n }\n element.ondragleave = function () {\n \n }\n element.ondrop = function(e) {\n this.classList.remove( 'wptb-ondragenter' );\n let element, classId;\n e.preventDefault();\n e.stopPropagation();\n\n if (!e.dataTransfer.getData('wptbElement') && !e.dataTransfer.getData('node')) {\n return;\n }\n let wptbDropHandle,\n wptbDropBorderMarker;\n if ( document.getElementsByClassName( 'wptb-drop-handle' ).length > 0 ) {\n wptbDropHandle = document.getElementsByClassName( 'wptb-drop-handle' )[0];\n }\n if( document.getElementsByClassName( 'wptb-drop-border-marker' ).length > 0 ) {\n wptbDropBorderMarker = document.getElementsByClassName( 'wptb-drop-border-marker' )[0];\n }\n\n if ( e.dataTransfer.getData( 'wptbElement' ) ) {\n element = WPTB_Helper.newElementProxy( e.dataTransfer.getData( 'wptbElement' ) );\n element = element.getDOMElement();\n } else {\n classId = e.dataTransfer.getData( 'node' );\n element = document.getElementsByClassName( classId )[0];\n //element.classList.remove( 'wptb-moving-mode' );\n }\n \n if( wptbDropHandle.style.display == 'block' ) {\n let td;\n if( wptbDropHandle.dataset.text == 'Drop Here' ) {\n td = wptbDropHandle.getDOMParentElement();\n td.appendChild( element );\n } else {\n let innerElement = wptbDropHandle.getDOMParentElement();\n td = innerElement.parentNode;\n\n if( wptbDropHandle.dataset.text == 'Above Element' ) {\n td.insertBefore( element, innerElement );\n } else if( wptbDropHandle.dataset.text == 'Below Element' ) {\n let innerElementNext = innerElement.nextSibling;\n td.insertBefore( element, innerElementNext );\n }\n }\n \n let thisRow = td.parentNode;\n if( WPTB_Helper.rowIsTop( thisRow ) ) { \n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n \n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n \n // start item javascript if item is new\n let infArr = element.className.match(/wptb-element-(.+)-(\\d+)/i);\n let elemKind = infArr[1];\n if ( e.dataTransfer.getData( 'wptbElement' ) && ( elemKind == 'text' || elemKind == 'button' || elemKind == 'image' || elemKind == 'star_rating' || elemKind == 'list' ) ) {\n //WPTB_Helper.elementStartScript( element );\n }\n } else {\n return;\n }\n \n wptbDropHandle.style.display = 'none';\n wptbDropBorderMarker.style.display = 'none';\n\n WPTB_innerElementSet( element );\n \n if( ! element.classList.contains( 'wptb-image-container' ) || element.classList.contains( 'wptb-moving-mode' ) ) {\n element.classList.remove( 'wptb-moving-mode' );\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n } \n return true;\n }\n element.onmouseover = function(e) {\n element.classList.remove( 'wptb-ondragenter' );\n }\n}","var applyGenericItemSettings = function ( element, kindIndexProt, copy = false ) {\n var node = element.getDOMElement(),\n index,\n copy;\n if( node.classList.contains( 'wptb-ph-element' ) ) {\n if ( kindIndexProt == undefined || copy == true ) {\n index = document.counter.nextIndex( element.kind );\n let wptbElements = document.getElementsByClassName( 'wptb-ph-element' );\n let elementIndexesArr = [];\n for( let i = 0; i < wptbElements.length; i++ ) {\n var regex = new RegExp( 'wptb-element-' + element.kind + '-(\\\\d+)', \"i\" );\n let infArr = wptbElements[i].className.match( regex );\n if( infArr ) {\n elementIndexesArr.push( infArr[1] );\n }\n }\n if( elementIndexesArr.length > 0 ) {\n let elementIndexMax = Math.max( ...elementIndexesArr );\n index = elementIndexMax + 1;\n } else { \n index = 1;\n }\n\n if( copy ) {\n // change all data-elements which save parameters for different controls\n let wptbNodeattributes = [...node.attributes];\n for( let i = 0; i < wptbNodeattributes.length; i++ ) {\n if( wptbNodeattributes[i] && typeof wptbNodeattributes[i] === 'object' && wptbNodeattributes[i].nodeName ) {\n let regularText = new RegExp( 'data-wptb-el-' + element.kind + '-(\\\\d+)-([a-zA-Z0-9_-]+)', \"i\" );\n let attr = wptbNodeattributes[i].nodeName.match( regularText );\n if( attr && Array.isArray( attr ) ) {\n let newDataAttributeName = wptbNodeattributes[i].nodeName.replace( element.kind + '-' + attr[1], element.kind + '-' + index );\n let newDataAttributeValue = wptbNodeattributes[i].nodeValue;\n node.removeAttribute( wptbNodeattributes[i].nodeName );\n node.setAttribute( newDataAttributeName, newDataAttributeValue );\n }\n }\n }\n }\n } else if ( kindIndexProt && ! copy ) {\n let kindIndexProtArr = kindIndexProt.split('-');\n index = kindIndexProtArr[kindIndexProtArr.length - 1];\n // start element javascript if element is new\n \n }\n\n let node_wptb_element_kind_num = node.className.match(/wptb-element-(.+)-(\\d+)/i);\n if ( node_wptb_element_kind_num ) {\n node.classList.remove( node_wptb_element_kind_num[0] );\n }\n if ( ! node.classList.contains( 'wptb-ph-element' ) ) {\n node.classList.add( 'wptb-ph-element' );\n if( ! node.classList.contains( 'wptb-element-' + element.kind + '-' + index ) ) {\n node.classList.add( 'wptb-element-' + element.kind + '-' + index );\n }\n } else {\n if( ! node.classList.contains( 'wptb-element-' + element.kind + '-' + index ) ) {\n node.classList.add( 'wptb-element-' + element.kind + '-' + index );\n }\n }\n new WPTB_ElementOptions( element, index, kindIndexProt );\n WPTB_Helper.elementStartScript( element.getDOMElement() );\n document.counter.increment(element.kind);\n }\n \n node.onmouseenter = function ( event ) {\n if( event.target.classList.contains( 'wptb-moving-mode' ) ) {\n return;\n }\n \n let wptbActionsField = new WPTB_ActionsField();\n \n wptbActionsField.addActionField( 1, node );\n \n wptbActionsField.setParameters( node );\n \n node.classList.remove( 'wptb-ondragenter' );\n };\n \n node.onmouseleave = function ( event ) {\n let wptbActionsField = new WPTB_ActionsField();\n \n wptbActionsField.leaveFromField( event, node );\n };\n};"]}
1
+ {"version":3,"sources":["WPTB_ActionsField.js","WPTB_Builder.js","WPTB_Cell.js","WPTB_DropHandle.js","WPTB_ElementCounters.js","WPTB_ElementObject.js","WPTB_ElementOptions.js","WPTB_Helper.js","WPTB_Initializer.js","WPTB_LeftPanel.js","WPTB_MultipleSelect.js","WPTB_Parser.js","WPTB_Polyfills.js","WPTB_Settings.js","WPTB_Stringifier.js","WPTB_Table.js","WPTB_TableStateSaveManager.js","WPTB_innerElementSet.js","applyGenericItemSettings.js"],"names":["WPTB_ActionsField","wptbActions","document","getElementsByClassName","length","addActionField","actionType","thisNode","body","getElementsByTagName","actions","previousNode","activeElem","classList","remove","parentNode","removeChild","btnDelete","btnCopy","createElement","add","appendChild","type","onclick","event","act","target","el","infArr","className","match","hasOwnProperty","kind","thisRow","WPTB_Helper","rowIsTop","table","findAncestor","contains","dataTitleColumnSet","wptbActionsField","actionsRemove","wptbTableStateSaveManager","WPTB_TableStateSaveManager","tableStateSet","copy","activeElement","activeElemParent","Array","isArray","data","elemProt","tinyMceClear","WPTB_ElementObject","insertBefore","getDOMElement","nextSibling","elementCopy","cloneNode","applyGenericItemSettings","wptbDocumentEventGenerate","WPTB_innerElementSet","setParameters","btnMove","draggable","ondragstart","wptbElementIconsDirectories","tmplIconsDirectories","wp","template","jsonIconsDirectories","IconsDirectories","JSON","parse","dragImages","getElementIcon","dataTransfer","effectAllowed","setDragImage","setData","style","display","actionsHide","ondragend","elementDragEndClear","coordinatesElement","getBoundingClientRect","wptbContainer","correctTop","top","parseFloat","removeEventListener","left","right","clientWidth","addEventListener","leaveFromField","node","relatedTarget","onmouseleave","opacity","WPTB_Builder","table_id","detectMode","http","XMLHttpRequest","urlSet","ajaxurl","open","setRequestHeader","onreadystatechange","d","readyState","status","ans","responseText","getElementById","value","wptbTableSetupEl","WPTB_Parser","WPTB_Table","element","querySelector","dataset","wptbTableContainerMaxWidth","maxWidth","tdDefaultWidth","WPTB_Settings","elementOptionsSet","send","counter","ElementCounters","select","MultipleSelect","initializer","WPTB_Initializer","settings","url","window","location","href","regex","RegExp","results","exec","WPTB_Cell","callback","DOMElement","highlightRow","td","parentRow","columnCount","parseInt","tds","i","classToAdd","ttd","highlightColumn","index","rowCount","tr","padding","jQuery","val","innerBorderWidth","border","ondblclick","stopPropagation","currentTarget","newElementProxy","wptbPhElement","wptbElementTypeClass","wptbTypeElementArr","split","wptbInternalActiveElement","j","wptbInternalActiveElementObj","setCoords","y","x","yIndex","xIndex","getCoords","coords","appendElement","getCellDimensions","tdStyleObj","getComputedStyle","tdPaddingLeft","getPropertyValue","tdPaddingRight","tdBorderLeftWidth","tdBorderRightWidth","tdPaddingTop","tdPaddingBottom","tdBorderTopWidth","tdBorderBottomWidth","width","offsetWidth","height","offsetHeight","tableFullStyleObj","tableBorderLeft","tableBorderRight","tableBorderTop","tableBorderBottom","nodeName","toLowerCase","firstChild","lastChild","WPTB_DropHandle","thisElem","e","wptbDropHandle","wptbDropBorderMarker","wptbDropBorderMarkerTop","wptbDropBorderMarkerRight","wptbDropBorderMarkerBottom","wptbDropBorderMarkerLeft","ondragenter","ondragover","preventDefault","ondragleave","ondrop","getData","wptbMovingMode","text","getDOMParentElement","innerElement","innerElementNext","elemKind","undefined","onscroll","localName","indics","types","notDragEnter","indexOf","elementDrag","offsetY","layerY","bottom","priv","increment","key","nextIndex","kindIndexProt","wpTemplateId","itemHtml","replace","trim","innerHTML","wptbElementMutch","elementClearFromTinyMce","inElems","querySelectorAll","inElemObj","WPTB_ElementOptions","capture","hexToRgb","hex","result","rgbToHex","rgb","isHex","rgbm","Math","round","toString","toUpperCase","slice","test","icon_directory","hostName","protocol","hostname","img","src","wptbDropHandles","wptbDropBorderMarkers","linkHttpCheckChange","link","linkArr","linkClean","rows","rowHead","computedStyleRowHead","rowHeadChildren","children","contentsForHeader","tdElements","p","textContent","textAlign","fontSize","color","backgroundColor","thisRowChildren","wptbTitleColumn","wptbTitleColumnFontSize","wptbTitleColumnColor","wptbTitleBackgroundColor","wptbTitleAlign","cls","parentElement","row","parent","getSelectionText","txt","getSelection","selection","createRange","elementOptionsPanelClear","elementOptionsGroup","wpColorPickerCheckChangeForTableStateSaving","originalEvent","wpPickerContainer","irisStripMouseUpStateSaveManager","wpColorPickerClear","attribute","isId","input","newInput","setAttribute","decodeURIComponent","getColumnWidth","cell","xIndexes","cellWidth","getRowHeight","yIndexes","cellHeight","wpColorPickerChange","ui","uiColor","classe","ps","number","affectedEl","ratingStar","span","fill","wptbTextMessageSize","numberImputSize","wptbNumberInputs","maxCount","maxValue","onkeydown","thisValue","String","substring","onkeyup","ucfirst","str","charAt","eventName","details","CustomEvent","detail","bubbles","dispatchEvent","elementStartScript","WPTB_ElementsScriptsLauncher","deleteEventHandlers","off","elementChildren","replaceAll","string","search","join","mceContentBodys","k","dataMceStyle","removeAttribute","mceEditFocus","contentEditable","spellCheck","mceIds","elementOptionContainerCustomClassSet","targetInput","customClassForContainer","containerElement","elementOptionContainerAdditionalStyles","containerAdditionalStyles","containerStylesArrOne","containerStylesSet","containerStyleStr","containerStyleStrArr","controlsInclude","functionHandler","сontrolsConnectIndic","elementKind","elementOptionsContainer","elementOptions","controlActiveElement","regularText","controlInfArr","controlUnicClassName","controls","controlName","control","targetControlValue","targetControlValueGet","oneControlInclude","wptbContrlStacksConfigId","tmplControlsConfig","container","jsonControlsConfigJson","jsonControlsConfig","controlClassName","innerElementCopyIncludeHandler","appearDependOnControl","dependOn","targetControlElementClass","dependOnControlName","dependOnControlElementClass","dependOnControlElement","targetControlElement","controlContainerElem","showHideDependOnControlElement","dependOnControlElements","controlsStateManager","targetControlClass","controlChangeIndic","targetControls","selectorElement","elementsSettingsTemplatesJs","elementSettings","elementsSettings","stringify","name","checked","alignmentValue","elementControlsStateCopy","elementProt","copyElem","infArrProt","infArrCopy","elemProtKind","elemCopyKind","elementsSettingsTemplateJs","elementSettingsProt","elementSettingsCopy","Object","keys","forEach","elementSettingValue","elementSettingKeyCopy","elementControlsStateDelete","nameControl","wptbElementDatas","elementContainerClass","elementOptionClassIndic","elementOptionsGroupId","wptbelementOptionClass","wptbelementOptionsContainer","wptbelementOptionsScriptsContainer","childNodes","elementOptionsGroupChildren","controlScriptsArr","controlappearDependOnControl","controlKey","tmplControlTemplate","elemContainer","elementControlTargetUnicClass","controlTemplate","push","wptbElementOptionContainer","helperJavascriptElem","helperJavascriptCode","innerText","script","managerExternalCssStyles","elementContainer","selector","cssName","cssValue","head","cssForThisElement","cssText","cssTextArrFirst","pop","selectorExists","cssTextArrSecond","cssTextArrThird","cssNameExists","cssTextArrFourth","splice","externalCssStylesDelete","externalCssStylesCopy","copyElement","activeElemClass","cssForActiveElement","cssForNewElement","infArrCopyEl","cssForActiveElementInnerHTML","cssForNewElementInnerHTML","elementsStylesConvertToObject","stylesElements","stylesObj","styleElemId","getAttribute","elementsStylesSetFromObject","jsonObject","styleCss","saveTable","startSaving","previewSaving","wptbTableStateNumberSave","wptbTableStateNumberShow","bar","toggleTableEditMode","wptb_admin_object","t","messagingArea","code","datas","postId","rs","wptbId","paramIdsNecessaryChange","codeClone","columns","WPTB_Stringifier","outerHTML","datas_containers","styleObjJson","messagingAreaText","setTimeout","params","title","content","elements_datas","elements_styles","security_code","preview_saving","id","action","builderPageUrl","history","pushState","wptbPreviewTable","wptbPreviewBtn","wptbPreviewBtnHref","previewHref","wptbSaveBtn","clickOnFreeSpace","wpcdFixedToolbar","hasAttribute","elementAjax","dataAjaxData","element_name","element_ajax_data","close","cellModeBackground","leftScrollPanelCurtain","leftScrollPanelCellSettings","deactivateMultipleSelectMode","wptbPreviewTableTds","activateMultipleSelectMode","checkingDimensionValue","dimension","searchIndex","checkSetGetStyleSizeValue","styleName","computedStyleName","elemStyleValue","elementStyles","checkSetGetStyleColorValue","set","elemStyleColorValue","checkSetGetStyleValue","getValueMaxCountSameElementsInArray","arr","check","maxPropName","recalculateIndexes","trs","maxCols","maxColsFull","tdsArr","jMainIter","colSpan","rowSpan","z","tableRowsColorsReinstall","tableIndex","tableHeaderBackground","tableEvenRowBackground","tableOddRowBackground","MIN_COLUMNS","MIN_ROWS","MAX_COLUMNS","MAX_ROWS","tableGenerator","columnsDecrementButton","columnsIncrementButton","rowsDecrementButton","rowsIncrementButton","columnsInput","rowsInput","WPTB_LeftPanel","wptbElementButtons","wptbTableColumnWidthNumber","wptbTableRowHeightNumber","oninput","addColumnWidth","onchange","highlighted","addRowHeight","controlsChange","inputs","inputSelector","inputTopAsHeader","makeTableResponsive","wptbTableSetup","applyTableContainerMaxWidth","tableContainerMaxWidthInput","tableContainerMaxWidthInputValue","tableContainerMaxWidth","wptbElement","wptbTablesEditModeCloseButton","addRowToTheEnd","addRowToTheStart","addRowBefore","addRowAfter","addColumnEnd","addColumnStart","addColumnBefore","addColumnAfter","deleteColumn","deleteRow","mergeCells","splitCell","wptbBuilderPanel","wptbHeader","selectedCells","multipleCellMode","isActivated","pushSelectedCell","flushSelectedCells","getFirst","minXIndex","minYIndex","first","getLast","maxXIndex","maxYIndex","last","removeAllButFirst","div","columnTitleMobile","prototype","hasDontEnumBug","propertyIsEnumerable","dontEnums","dontEnumsLength","obj","TypeError","prop","call","elems","wptbUndo","tableStateGet","wptbUndoredo","wptbUndoRedoContainer","wptbRedo","shortcodePopupWindow","onbeforeunload","wptbSaveDisabled","previewId","floor","random","newHref","URL","searchParams","tableTitleField","codeMain","tableColumns","minWidth","innerElements","wptbActionsLength","dataMceBogus","columnNameDivContainer","columnNameDiv","array","wptb_preview_table","maxAmountOfCells","maxAmountOfRows","mark","cs","markedCells","noCells","singleCells","multipleCells","cellSettings","position","column","cellHighlighted","wptbTableColumnWidthSlider","tableColumnWidthAutoFixedCheckbox","wptbFixedWidth","wptbTableRowHeightSlider","tableRowHeightAutoFixedCheckbox","wptbFixedHeight","isSquare","realTimeArray","carried","cols","matriz","items","justAssigned","amount","carriedRowspans","cellsBuffer","cellPointer","xPosition","stepsToMove","celda","drawTable","a","undoSelect","fillTableArray","colspansSums","cells","colspanSumInRow","max","apply","getActualPointsInRow","points","skipInCols","reconstraction","insertRow","borderWidth","cleaner","dataXIndex","tableTdsFor","colspan","tableRows","widthIsSet","arrayTdsFromPreviousRow","tableTdsSumMaxWidth","tableTdsSumMaxWidthFixed","tableTdsSumMaxWidthAuto","wptbTableSetupWidth","arrayCellsWidthFixedHelper","arrayCellsWidthAutoHelper","tdPaddingCommon","tableTdBorderCommonWidth","cssForTdsWidthAuto","borderLeftWidth","borderRightWidth","tableBorderCommon","wptbCssTdAutoWidth","tableTdBorderLeftWidth","tableTdBorderRightWidth","CellsWidthAutoCount","wptbTableTdsSumMaxWidth","wptbCellsWidthAutoCount","mergingСellsHorizontally","wptbFixedWidthSize","styleElementCreate","tableTdWidthAuto","tableTdsWidthAutoCommon","cssForTdsWidthAutoOld","wptbTableAlignment","float","dataYIndex","rowspan","heightIsSet","arrayTdsPrevious","tableColumnHeightAutoFixedCheckbox","mergingCellsVertically","forBreak","currentTable","currentTableTd","currentTdStyle","firstCell","c_pos","cellStyle","pos","pendingInsertion","bro","currentCell","l","r","aux","from","cellNew","rowChildren","rowChildrenLength","cellRowSpan","rowAfter","cellsColSpan","tableRowsIChildren","tableRIChildrenLength","rowIRowSpan","rNext","rNextChildren","rNextChildrenLength","rowStart","columnStart","rowEnd","columnEnd","itemsEstimate","dimensions","tdsChildrenNew","tdsInternalElements","tdsIntElemLength","firstWidth","firstDataFixedWidth","firstHeight","firstDataFixedHeight","cellStyles","cellXIndex","rowChildInsertBefore","rowNext","Number","findRowspannedCells","difference","actualPoints","addLackingCells","sumRows","totalColspan","nextRow","nextRowChildren","nextRowChildrenLength","tdArr","nextRowChildrenK","jRowChildren","onresize","generate","wptbTableStateSaving","wptbNewTableSetup","wptbHighlighted","wptbDirectlyhovered","cssForTdsWidthAutoValue","wptbTableTitle","wptbSetupName","datawptbUndoredo","wptbTableSetupNew","wptbLeftScrollPanelCellSetting","tableStateClear","classId","onmouseover","wptbElements","elementIndexesArr","elementIndexMax","wptbNodeattributes","attributes","attr","newDataAttributeName","newDataAttributeValue","nodeValue","kindIndexProtArr","node_wptb_element_kind_num","onmouseenter"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AAN,EAAgF;AAC5E7D,qBAAKpF,SAAL,CAAeO,GAAf,CAAoB,kBAAkBqG,QAAQzF,IAA1B,GAAiC,GAAjC,GAAuC8H,KAA3D;AACH;AACJ,SALD,MAKO;AACH,gBAAI,CAAE7D,KAAKpF,SAAL,CAAeyB,QAAf,CAAyB,kBAAkBmF,QAAQzF,IAA1B,GAAiC,GAAjC,GAAuC8H,KAAhE,CAAN,EAAgF;AAC5E7D,qBAAKpF,SAAL,CAAeO,GAAf,CAAoB,kBAAkBqG,QAAQzF,IAA1B,GAAiC,GAAjC,GAAuC8H,KAA3D;AACH;AACJ;AACD,YAAImG,mBAAJ,CAAyBxI,OAAzB,EAAkCqC,KAAlC,EAAyCwF,aAAzC;AACApN,oBAAYuU,kBAAZ,CAAgChP,QAAQlE,aAAR,EAAhC;AACArD,iBAASgI,OAAT,CAAiBiH,SAAjB,CAA2B1H,QAAQzF,IAAnC;AACH;;AAEDiE,SAAKuvB,YAAL,GAAoB,UAAWh0B,KAAX,EAAmB;AACnC,YAAIA,MAAME,MAAN,CAAab,SAAb,CAAuByB,QAAvB,CAAiC,kBAAjC,CAAJ,EAA4D;AACxD;AACH;;AAED,YAAIE,mBAAmB,IAAIxC,iBAAJ,EAAvB;;AAEAwC,yBAAiBnC,cAAjB,CAAiC,CAAjC,EAAoC4F,IAApC;;AAEAzD,yBAAiBsB,aAAjB,CAAgCmC,IAAhC;;AAEAA,aAAKpF,SAAL,CAAeC,MAAf,CAAuB,kBAAvB;AACH,KAZD;;AAcAmF,SAAKE,YAAL,GAAoB,UAAW3E,KAAX,EAAmB;AACnC,YAAIgB,mBAAmB,IAAIxC,iBAAJ,EAAvB;;AAEAwC,yBAAiBwD,cAAjB,CAAiCxE,KAAjC,EAAwCyE,IAAxC;AACH,KAJD;AAKH,CApFD","file":"admin.js","sourcesContent":["var WPTB_ActionsField = function() {\n //this.wptbBorderMarker;\n this.wptbActions;\n if( document.getElementsByClassName( 'wptb-actions' ).length != 0 ) {\n this.wptbActions = document.getElementsByClassName( 'wptb-actions' )[0];\n }\n \n this.addActionField = ( actionType, thisNode ) => {\n let body = document.getElementsByTagName( 'body' )[0];\n \n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length != 0 ) {\n let previousNode = actions[0].activeElem;\n if( previousNode ) {\n previousNode.classList.remove( 'wptb-directlyhovered' );\n }\n \n while( actions.length != 0 ) {\n actions[0].parentNode.removeChild( actions[0] );\n }\n }\n \n if( actionType == 1 ) {\n \n let btnDelete, btnCopy;\n\n btnDelete = document.createElement( 'span' ),\n btnCopy = document.createElement( 'span' ),\n actions = document.createElement( 'div' );\n\n actions.classList.add( 'wptb-actions' );\n btnDelete.classList.add( 'dashicons', 'dashicons-trash', 'wptb-delete-action' );\n btnCopy.classList.add( 'dashicons', 'dashicons-admin-page', 'wptb-duplicate-action' );\n \n actions.appendChild( btnCopy );\n actions.appendChild( btnDelete );\n \n body.appendChild( actions );\n\n actions.activeElem = thisNode;\n\n actions.type = 1;\n\n btnDelete.onclick = function( event ) {\n let act = event.target.parentNode.activeElem,\n el = act.parentNode;\n let infArr = act.className.match( /wptb-element-(.+)-(\\d+)/i );\n// if( act && infArr && Array.isArray( infArr ) ) {\n// WPTB_Helper.elementControlsStateDelete( act );\n// WPTB_Helper.externalCssStylesDelete( infArr[0] );\n// }\n \n if( act ) {\n el.removeChild( act );\n }\n\n if( act && typeof act === 'object' && act.hasOwnProperty( 'kind' ) && act.kind == 'text' ) {\n let thisRow = el.parentNode;\n \n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n\n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n }\n\n let wptbActionsField = new WPTB_ActionsField();\n wptbActionsField.actionsRemove();\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n\n btnCopy.onclick = ( event ) => {\n let copy,\n infArr,\n type;\n let activeElement = event.target.parentNode.activeElem;\n let activeElemParent = activeElement.parentNode;\n infArr = activeElement.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr && Array.isArray( infArr ) ) {\n type = infArr[1];\n let data = {};\n data.kind = type;\n data.elemProt = activeElement;\n data.tinyMceClear = true;\n copy = new WPTB_ElementObject( data );\n //WPTB_Helper.elementControlsStateCopy( activeElement, copy.getDOMElement() );\n //WPTB_Helper.externalCssStylesCopy( activeElement, copy.getDOMElement() );\n //WPTB_Helper.elementStartScript( copy.getDOMElement() );\n \n activeElemParent.insertBefore( copy.getDOMElement(), activeElement.nextSibling );\n } else {\n copy = {};\n let elementCopy = activeElement.cloneNode( true );\n elementCopy.classList.remove( 'wptb-directlyhovered' );\n \n copy.getDOMElement = function() {\n return elementCopy;\n }\n \n applyGenericItemSettings( copy );\n \n activeElemParent.insertBefore( copy.getDOMElement(), activeElement.nextSibling );\n \n WPTB_Helper.wptbDocumentEventGenerate( 'wptb-inner-element:copy', activeElement, copy.getDOMElement() );\n }\n \n WPTB_innerElementSet( copy.getDOMElement() );\n\n let wptbActionsField = new WPTB_ActionsField( 1, activeElement );\n wptbActionsField.setParameters( activeElement );\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n };\n \n \n if( thisNode.classList.contains( 'wptb-ph-element' ) ) {\n let btnMove;\n btnMove = document.createElement( 'span' );\n btnMove.classList.add( \"dashicons\", \"dashicons-move\", 'wptb-move-action' );\n btnMove.draggable = true;\n actions.appendChild( btnMove );\n \n btnMove.ondragstart = ( event ) => {\n let wptbElementIconsDirectories = 'wptb-element-icons-directories';\n let tmplIconsDirectories = wp.template( wptbElementIconsDirectories );\n let data = {};\n let jsonIconsDirectories = tmplIconsDirectories( data );\n let IconsDirectories = JSON.parse( jsonIconsDirectories );\n\n let dragImages,\n actions = event.target.parentNode,\n activeElem = actions.activeElem,\n infArr,\n type;\n infArr = activeElem.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr && Array.isArray( infArr ) ) {\n type = infArr[1];\n activeElem.classList.add( 'wptb-moving-mode' );\n\n if( IconsDirectories && typeof IconsDirectories === 'object' && IconsDirectories[type] ) {\n dragImages = WPTB_Helper.getElementIcon( IconsDirectories[type] );\n }\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setDragImage( dragImages, 0, 0 );\n event.dataTransfer.setData( 'node', 'wptb-element-' + infArr[1] + '-' + infArr[2] );\n event.dataTransfer.setData( 'wptb-moving-mode', 'wptb-element-' + infArr[1] + '-' + infArr[2] );\n event.dataTransfer.setData( 'wptbElIndic-' + infArr[1], 'wptbElIndic-' + infArr[1] );\n let act = event.target.parentNode.activeElem;\n if( act.kind == 'text' ) {\n let thisRow = act.parentNode.parentNode;\n \n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n\n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n }\n } else {\n this.style.display = 'none';\n }\n\n this.actionsHide();\n };\n\n btnMove.ondragend = ( event ) => {\n WPTB_Helper.elementDragEndClear();\n }\n }\n\n actions.style.display = 'block';\n\n this.wptbActions = actions;\n } \n }\n \n this.setParameters = ( thisNode ) => {\n \n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n } else {\n this.wptbActions = false;\n }\n }\n \n if( this.wptbActions && this.wptbActions.classList.contains( 'wptb-actions' ) ) {\n this.wptbActions.style.display = 'block';\n } else {\n return;\n }\n \n let coordinatesElement = thisNode.getBoundingClientRect();\n \n let wptbContainer = document.getElementsByClassName( 'wptb-container' )[0];\n let correctTop = () => {\n let coordinatesElement = thisNode.getBoundingClientRect();\n this.wptbActions.style.top = parseFloat( coordinatesElement.top ) - 15 + 'px';\n }\n wptbContainer.removeEventListener( 'scroll', correctTop, false );\n \n this.wptbActions.style.top = parseFloat( coordinatesElement.top ) - 15 + 'px';\n this.wptbActions.style.left = ( parseFloat( coordinatesElement.right ) - parseFloat( this.wptbActions.clientWidth ) ) + 1 + 'px';\n \n this.wptbActions.style.display = 'block';\n thisNode.classList.add( 'wptb-directlyhovered' );\n \n wptbContainer.addEventListener( 'scroll', correctTop, false );\n }\n \n this.leaveFromField = ( event, node, actionType ) => {\n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n } else {\n this.wptbActions = false;\n }\n }\n \n if( ! this.wptbActions ) {\n return;\n }\n \n if( event.relatedTarget ) {\n if ( event.relatedTarget.classList.contains( 'wptb-actions' ) ||\n event.relatedTarget.classList.contains( 'wptb-move-action' ) ||\n event.relatedTarget.classList.contains( 'wptb-duplicate-action' ) ||\n event.relatedTarget.classList.contains( 'wptb-delete-action' ) ) {\n if( ! this.wptbActions ) {\n this.wptbActions = document.getElementsByClassName( 'wptb-actions' )[0];\n }\n this.wptbActions.onmouseleave = ( event ) => {\n if( event.relatedTarget != null && ( event.relatedTarget.classList.contains( 'wptb-ph-element' ) || \n WPTB_Helper.findAncestor( event.relatedTarget, 'wptb-ph-element') ) && event.relatedTarget != this.wptbActions.activeElem &&\n WPTB_Helper.findAncestor( event.relatedTarget, 'wptb-directlyhovered' ) != this.wptbActions.activeElem ) {\n \n// this.wptbActions.style.display = 'none';\n// event.relatedTarget.parentNode.parentNode.classList.remove( 'wptb-directlyhovered' );\n//\n// let wptbActionsField = new WPTB_ActionsField();\n//\n// wptbActionsField.addActionField( 1, event.relatedTarget.parentNode.parentNode );\n//\n// wptbActionsField.setParameters( event.relatedTarget.parentNode.parentNode );\n } else {\n \n }\n \n let wptbActionsField = new WPTB_ActionsField();\n\n wptbActionsField.leaveFromField( event, event.relatedTarget.parentNode.parentNode );\n \n event.target.activeElem.classList.remove( 'wptb-directlyhovered' );\n }\n\n return;\n } \n }\n \n node.classList.remove( 'wptb-directlyhovered' );\n this.wptbActions.style.display = 'none';\n \n if( event.relatedTarget ) {\n if( event.relatedTarget.classList.contains( 'wptb-ph-element' ) || WPTB_Helper.findAncestor( event.relatedTarget, 'wptb-ph-element' ) ) {\n this.addActionField( 1, event.relatedTarget.parentNode );\n\n this.setParameters( event.relatedTarget.parentNode );\n }\n }\n }\n \n this.actionsRemove = () => {\n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n }\n }\n \n if( this.wptbActions ) {\n this.wptbActions.parentNode.removeChild( this.wptbActions );\n }\n }\n \n this.actionsHide = () => {\n if( ! this.wptbActions ) {\n let actions = document.getElementsByClassName( 'wptb-actions' );\n if( actions.length > 0 ) {\n this.wptbActions = actions[0];\n }\n }\n \n if( this.wptbActions ) {\n this.wptbActions.style.opacity = 0;\n }\n }\n}","(function () {\n var WPTB_Builder = function () {\n var table_id = WPTB_Helper.detectMode();\n if ( table_id ) {\n var http = new XMLHttpRequest(),\n urlSet = ajaxurl + \"?action=get_table\" + '&id=' + table_id;\n http.open('GET', urlSet, true);\n http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n http.onreadystatechange = function (d) {\n if (this.readyState == 4 && this.status == 200) {\n var ans = JSON.parse( http.responseText );\n document.getElementById('wptb-setup-name').value = ans[0];\n \n if( ans[1] ) {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'none';\n let wptbTableSetupEl = document.getElementsByClassName('wptb-table-setup')[0];\n wptbTableSetupEl.appendChild( WPTB_Parser( ans[1] ) );\n \n let body = document.getElementsByTagName('body')[0];\n \n WPTB_Table();\n let element = document.querySelector( '.wptb-preview-table' );\n if( element ) {\n let infArr = element.className.match( /wptb-element-((.+-)\\d+)/i );\n if( ! infArr ) {\n element.classList.add( 'wptb-element-main-table_setting-' + table_id );\n }\n \n if( element.dataset.wptbTableContainerMaxWidth ) {\n wptbTableSetupEl.style.maxWidth = element.dataset.wptbTableContainerMaxWidth + 'px';\n \n element.tdDefaultWidth();\n }\n }\n \n //WPTB_LeftPanel();\n WPTB_Settings();\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n \n WPTB_Helper.elementOptionsSet( 'table_setting', element );\n } else {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';\n }\n \n return;\n }\n };\n http.send(null);\n } else {\n document.getElementsByClassName('wptb-table-generator')[0].style.display = 'table';\n\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n }\n document.counter = new ElementCounters();\n document.select = new MultipleSelect();\n\n var initializer = WPTB_Initializer();\n settings = WPTB_Settings();\n };\n\n let url = window.location.href,\n regex = new RegExp('[?&]page=wptb-builder'),\n results = regex.exec( url );\n if ( results ) {\n document.addEventListener('DOMContentLoaded', WPTB_Builder);\n }\n})();","var WPTB_Cell = function ( callback, DOMElement ) {\n\n function highlightRow(td) {\n var parentRow = td.parentNode,\n columnCount = parseInt(document.getElementById('wptb-columns-number').value),\n tds = document.getElementsByClassName('wptb-preview-table')[0].getElementsByTagName('td');\n for (var i = 0; i < tds.length; i++) {\n tds[i].classList.remove('wptb-highlighted-row-first', 'wptb-highlighted-row-last', 'wptb-highlighted-row-inner', 'wptb-highlighted-column-first', 'wptb-highlighted-column-last', 'wptb-highlighted-column-inner');\n }\n for (var i = 0; i < columnCount; i++) {\n\n var classToAdd = i == 0 ? 'wptb-highlighted-row-first' : i == columnCount - 1 ? 'wptb-highlighted-row-last' : 'wptb-highlighted-row-inner';\n var ttd = parentRow.getElementsByTagName('td')[i];\n if (ttd !== td) {\n ttd.classList.add(classToAdd);\n }\n }\n }\n\n function highlightColumn(td) {\n\n var index,\n parentRow = td.parentNode;\n columnCount = parseInt(document.getElementById('wptb-columns-number').value), rowCount = parseInt(document.getElementById('wptb-rows-number').value), table = document.getElementsByClassName('wptb-preview-table')[0];\n for (var i = 0; i < columnCount; i++) {\n if (parentRow.getElementsByTagName('td')[i] === td) {\n index = i;\n break;\n }\n }\n\n for (var i = 0; i < rowCount; i++) {\n var classToAdd = i == 0 ? 'wptb-highlighted-column-first' : i == rowCount - 1 ? 'wptb-highlighted-column-last' : 'wptb-highlighted-column-inner';\n var tr = table.getElementsByTagName('tr')[i];\n if (tr.getElementsByTagName('td')[index] !== td) {\n tr.getElementsByTagName('td')[index].classList.add(classToAdd);\n }\n }\n }\n \n if( ! DOMElement ) {\n DOMElement = document.createElement(\"td\");\n\n DOMElement.style.padding = jQuery('#wptb-table-padding-number').val() + 'px';\n\n var innerBorderWidth = jQuery('#wptb-table-inner-border-number').val();\n\n if (innerBorderWidth != '' && parseInt(innerBorderWidth) != 0) {\n DOMElement.style.border = innerBorderWidth + 'px solid ' + jQuery('#wptb-table-border-color').val();\n } \n\n DOMElement.classList.add('wptb-droppable', 'wptb-cell');\n }\n\n DOMElement.draggable = false;\n if ( callback ) {\n DOMElement.onclick = callback;\n }\n \n // Cell double click handler\n DOMElement.ondblclick = function( event ) {\n event.stopPropagation();\n if( ! WPTB_Helper.findAncestor( DOMElement, 'wptb-preview-table-manage-cells' ) && event.target == event.currentTarget ) {\n \n WPTB_Helper.wptbDocumentEventGenerate( 'table:cell:dblclick', event.target );\n \n let element = WPTB_Helper.newElementProxy( 'text' );\n element = element.getDOMElement();\n \n DOMElement.appendChild( element );\n \n WPTB_innerElementSet( element );\n }\n }\n \n WPTB_innerElementSet( DOMElement );\n \n let wptbPhElement = DOMElement.getElementsByClassName( 'wptb-ph-element' );\n \n if ( wptbPhElement.length > 0 ) {\n for( let i = 0; i < wptbPhElement.length; i++ ) {\n wptbPhElement[i].getDOMElement = function() {\n return wptbPhElement[i];\n }\n \n WPTB_innerElementSet( wptbPhElement[i] );\n \n let wptbElementTypeClass = wptbPhElement[i].className.match( /wptb-element-((.+-)\\d+)/i );\n if( wptbElementTypeClass && Array.isArray( wptbElementTypeClass ) ) {\n let wptbTypeElementArr = wptbElementTypeClass[1].split( '-' );\n wptbPhElement[i].kind = wptbTypeElementArr[0];\n applyGenericItemSettings( wptbPhElement[i], wptbElementTypeClass[1] );\n let wptbInternalActiveElement = wptbPhElement[i].getElementsByClassName( 'wptb-in-element' );\n if ( wptbInternalActiveElement.length > 0 ) {\n for ( let j = 0; j < wptbInternalActiveElement.length; j++ ) {\n let wptbInternalActiveElementObj = {};\n wptbInternalActiveElementObj.getDOMElement = function() {\n return wptbInternalActiveElement[j];\n }\n \n applyGenericItemSettings( wptbInternalActiveElementObj );\n }\n }\n }\n }\n }\n\n this.getDOMElement = function () {\n return DOMElement;\n };\n\n this.setCoords = function (y, x) {\n var el = this.getDOMElement();\n el.dataset.yIndex = y;\n el.dataset.xIndex = x;\n };\n\n this.getCoords = function () {\n var coords,\n el = this.getDOMElement();\n coords.x = el.dataset.xIndex;\n coords.y = el.dataset.yIndex;\n return coords;\n };\n\n this.appendElement = function (node) {\n getDOMElement().appendChild(node);\n };\n \n DOMElement.getCellDimensions = function() {\n \n let tdStyleObj = window.getComputedStyle( this, null );\n \n let tdPaddingLeft = tdStyleObj.getPropertyValue( 'padding-left' );\n let tdPaddingRight = tdStyleObj.getPropertyValue( 'padding-right' );\n \n let tdBorderLeftWidth = tdStyleObj.getPropertyValue( 'border-left-width' );\n let tdBorderRightWidth = tdStyleObj.getPropertyValue( 'border-right-width' );\n \n let tdPaddingTop = tdStyleObj.getPropertyValue( 'padding-top' );\n let tdPaddingBottom = tdStyleObj.getPropertyValue( 'padding-bottom' );\n \n let tdBorderTopWidth = tdStyleObj.getPropertyValue( 'border-top-width' );\n let tdBorderBottomWidth = tdStyleObj.getPropertyValue( 'border-bottom-width' );\n \n let width = parseInt( this.offsetWidth, 10 ) - \n parseInt( tdPaddingLeft, 10 ) - \n parseInt( tdPaddingRight, 10 ) -\n ( parseInt( tdBorderLeftWidth, 10 ) / 2 ) -\n ( parseInt( tdBorderRightWidth, 10 ) / 2 );\n \n let height = parseInt( this.offsetHeight, 10 ) - \n parseInt( tdPaddingTop, 10 ) - \n parseInt( tdPaddingBottom, 10 ) -\n ( parseInt( tdBorderTopWidth, 10 ) / 2 ) -\n ( parseInt( tdBorderBottomWidth, 10 ) / 2 ); \n \n \n let table = WPTB_Helper.findAncestor( this, 'wptb-preview-table' );\n if( table ) {\n let tableFullStyleObj = window.getComputedStyle( table, null );\n let tableBorderLeft = tableFullStyleObj.getPropertyValue( 'border-left-width' );\n let tableBorderRight = tableFullStyleObj.getPropertyValue( 'border-right-width' );\n let tableBorderTop = tableFullStyleObj.getPropertyValue( 'border-top-width' );\n let tableBorderBottom = tableFullStyleObj.getPropertyValue( 'border-bottom-width' );\n \n let tr = this.parentNode;\n if( tr && tr.nodeName.toLowerCase() === 'tr' ) {\n if( tr.firstChild && tr.firstChild.dataset.xIndex === this.dataset.xIndex ) {\n if( parseInt( tableBorderLeft, 10 ) > parseInt( tdBorderLeftWidth, 10 ) ) {\n width += -( parseInt( tableBorderLeft, 10 ) - parseInt( tdBorderLeftWidth, 10 ) ) / 2;\n }\n }\n\n if( tr.lastChild && tr.lastChild.dataset.xIndex === this.dataset.xIndex ) {\n if( parseInt( tableBorderRight, 10 ) > parseInt( tdBorderRightWidth, 10 ) ) {\n width += -( parseInt( tableBorderRight, 10 ) - parseInt( tdBorderRightWidth, 10 ) ) / 2;\n }\n }\n \n let body = tr.parentNode;\n if( body && body.nodeName.toLowerCase() === 'body' ) {\n if( body.firstChild && body.firstChild.firstChild.dataset.yIndex === this.dataset.yIndex ) {\n if( parseInt( tableBorderTop, 10 ) > parseInt( tdBorderTopWidth, 10 ) ) {\n height += ( parseInt( tableBorderTop, 10 ) - parseInt( tdBorderTopWidth, 10 ) ) / 2;\n }\n }\n \n if( body.lastChild && body.lastChild.firstChild.dataset.yIndex === this.dataset.yIndex ) {\n if( parseInt( tableBorderBottom, 10 ) > parseInt( tdBorderBottomWidth, 10 ) ) {\n height += ( parseInt( tableBorderBottom, 10 ) - parseInt( tdBorderBottomWidth, 10 ) ) / 2;\n }\n }\n }\n }\n }\n \n return {\n width: parseInt( width ), \n height: parseInt( height )\n };\n }\n\n return this;\n};","var WPTB_DropHandle = function (thisElem, e) {\n \n let wptbDropHandle,\n wptbDropBorderMarker;\n if ( document.getElementsByClassName( 'wptb-drop-handle' ).length == 0 ) {\n wptbDropHandle = document.createElement( 'div' );\n wptbDropHandle.classList.add( 'wptb-drop-handle' );\n \n wptbDropBorderMarker = document.createElement( 'div' );\n wptbDropBorderMarker.classList.add( 'wptb-drop-border-marker' );\n \n let wptbDropBorderMarkerTop = document.createElement( 'div' ),\n wptbDropBorderMarkerRight = document.createElement( 'div' ),\n wptbDropBorderMarkerBottom = document.createElement( 'div' ),\n wptbDropBorderMarkerLeft = document.createElement( 'div' );\n \n wptbDropBorderMarkerTop.classList.add( 'wptb-drop-border-marker-top' );\n wptbDropBorderMarkerRight.classList.add( 'wptb-drop-border-marker-right' );\n wptbDropBorderMarkerBottom.classList.add( 'wptb-drop-border-marker-bottom' );\n wptbDropBorderMarkerLeft.classList.add( 'wptb-drop-border-marker-left' );\n \n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerTop );\n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerRight );\n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerBottom );\n wptbDropBorderMarker.appendChild( wptbDropBorderMarkerLeft );\n \n let body = document.getElementsByTagName( 'body' );\n if ( body.length > 0 ) {\n body[0].appendChild( wptbDropHandle );\n body[0].appendChild( wptbDropBorderMarker );\n }\n \n wptbDropHandle.ondragenter = function () {\n\n }\n\n wptbDropHandle.ondragover = function (e) {\n e.preventDefault();\n }\n\n wptbDropHandle.ondragleave = function () {\n\n }\n wptbDropHandle.ondrop = function (e) {\n e.preventDefault();\n let element;\n \n if ( e.dataTransfer.getData('wptbElement') ) {\n element = WPTB_Helper.newElementProxy( e.dataTransfer.getData('wptbElement') );\n element = element.getDOMElement();\n } else {\n element = document.getElementsByClassName( e.dataTransfer.getData('node') )[0];\n element.classList.remove( 'wptb-moving-mode' );\n element.classList.remove( 'wptb-moving-into-same-elem' );\n element.wptbMovingMode = 1;\n }\n \n let td;\n if( wptbDropHandle.dataset.text == 'Drop Here' ) {\n thisElem = wptbDropHandle.getDOMParentElement();\n if ( thisElem.nodeName.toLowerCase() == 'td' ) {\n td = wptbDropHandle.getDOMParentElement();\n td.appendChild( element );\n }\n } else {\n let innerElement = wptbDropHandle.getDOMParentElement();\n td = innerElement.parentNode;\n \n if( wptbDropHandle.dataset.text == 'Above Element' ) {\n td.insertBefore( element, innerElement );\n } else if( wptbDropHandle.dataset.text == 'Below Element' ) {\n let innerElementNext = innerElement.nextSibling;\n td.insertBefore( element, innerElementNext );\n }\n }\n \n let thisRow = td.parentNode;\n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n\n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n WPTB_Helper.dataTitleColumnSet( table );\n }\n }\n \n // start item javascript if item is new\n let infArr = element.className.match(/wptb-element-(.+)-(\\d+)/i);\n let elemKind = infArr[1];\n if ( e.dataTransfer.getData( 'wptbElement' ) && ( elemKind == 'text' || elemKind == 'button' || elemKind == 'image' || elemKind == 'star_rating' || elemKind == 'list' ) ) {\n //WPTB_Helper.elementStartScript( element );\n }\n \n wptbDropHandle.style.display = 'none';\n wptbDropBorderMarker.style.display = 'none';\n \n WPTB_innerElementSet( element );\n if( ! element.classList.contains( 'wptb-image-container' ) || element.wptbMovingMode == 1 ) {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n element.wptbMovingMode == undefined;\n }\n }\n let wptbContainer = document.querySelector( '.wptb-container' );\n wptbContainer.onscroll = function() {\n wptbDropHandle.style.display = 'none';\n wptbDropBorderMarker.style.display = 'none';\n }\n } else {\n wptbDropHandle = document.getElementsByClassName( 'wptb-drop-handle' )[0];\n wptbDropBorderMarker = document.getElementsByClassName( 'wptb-drop-border-marker' )[0];\n }\n if( thisElem && thisElem.nodeName.toLowerCase() == 'td' && \n thisElem.getElementsByClassName( 'wptb-ph-element' ).length != 0 ) {\n return;\n }\n \n let thisRow;\n if ( thisElem.localName == 'td' ) {\n thisRow = thisElem.parentNode;\n } else if ( thisElem.localName == 'div' && thisElem.classList.contains( 'wptb-ph-element' ) ) {\n thisRow = thisElem.parentNode.parentNode;\n }\n \n if( WPTB_Helper.rowIsTop( thisRow ) ) {\n let table = WPTB_Helper.findAncestor( thisRow, 'wptb-preview-table' );\n \n if( table.classList.contains( 'wptb-table-preview-head' ) ) {\n let indics = e.dataTransfer.types;\n let notDragEnter = false;\n for ( let i = 0; i < indics.length; i++ ) {\n let infArr = indics[i].match( /wptbelindic-([a-z]+)/i );\n if ( infArr && infArr[1] != 'text' ) {\n notDragEnter = true;\n break;\n }\n }\n if( notDragEnter ) {\n return;\n }\n }\n }\n \n wptbDropHandle.style.width = thisElem.offsetWidth + 'px';\n let height = thisElem.offsetHeight,\n coordinatesElement = thisElem.getBoundingClientRect(),\n left = parseFloat( coordinatesElement.left ),\n top;\n wptbDropHandle.style.left = left + 'px';\n \n if( e.dataTransfer.types.indexOf( 'wptb-moving-mode' ) != -1 ) {\n let elementDrag = document.getElementsByClassName( 'wptb-moving-mode' )[0];\n if( thisElem == elementDrag ) {\n wptbDropHandle.classList.add('wptb-moving-into-same-elem');\n wptbDropBorderMarker.classList.add('wptb-moving-into-same-elem');\n } else {\n wptbDropHandle.classList.remove('wptb-moving-into-same-elem');\n wptbDropBorderMarker.classList.remove('wptb-moving-into-same-elem');\n }\n }\n \n wptbDropHandle.getDOMParentElement = function() {\n return thisElem;\n }\n \n wptbDropHandle.style.display = 'block';\n wptbDropBorderMarker.style.display = 'block';\n if( thisElem.nodeName.toLowerCase() != 'td' ) {\n let y = e.offsetY==undefined?e.layerY:e.offsetY;\n top = parseFloat( coordinatesElement.top ) - parseFloat( 11 );\n wptbDropHandle.dataset.text = 'Above Element';\n if ( y > height/2 ) {\n top = parseFloat( coordinatesElement.top ) + height - 1;\n wptbDropHandle.dataset.text = 'Below Element';\n }\n } else {\n wptbDropHandle.dataset.text = 'Drop Here';\n top = parseFloat( coordinatesElement.top ) + height/2 - 5;\n }\n wptbDropHandle.style.top = top + 'px';\n\n wptbDropBorderMarker.style.top = coordinatesElement.top + 'px';\n wptbDropBorderMarker.style.left = coordinatesElement.left + 'px';\n\n wptbDropBorderMarkerTop = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-top' );\n wptbDropBorderMarkerTop.style.width = ( parseFloat( thisElem.offsetWidth ) - parseFloat( 1 ) ) + 'px';\n\n wptbDropBorderMarkerRight = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-right' );\n wptbDropBorderMarkerRight.style.height = ( parseFloat( coordinatesElement.bottom ) - parseFloat( coordinatesElement.top ) - 1 ) + 'px';\n wptbDropBorderMarkerRight.style.left = wptbDropBorderMarkerTop.style.width;\n\n wptbDropBorderMarkerBottom = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-bottom' );\n wptbDropBorderMarkerBottom.style.width = wptbDropBorderMarkerTop.style.width;\n wptbDropBorderMarkerBottom.style.top = wptbDropBorderMarkerRight.style.height;\n\n wptbDropBorderMarkerLeft = wptbDropBorderMarker.querySelector( '.wptb-drop-border-marker-left' );\n wptbDropBorderMarkerLeft.style.height = wptbDropBorderMarkerRight.style.height;\n}","var ElementCounters = function () {\n\n\tvar priv = [];\n\tpriv['text'] = 0;\n\tpriv['image'] = 0;\n\tpriv['list'] = 0;\n\tpriv['button'] = 0;\n\n\tthis.increment = function (key) {\n\t\tif (!(key in priv)) {\n\t\t\treturn;\n\t\t}\n\t\tpriv[key]++;\n\t}\n\n\tthis.nextIndex = function (key) {\n\t\tif (!(key in priv)) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn priv[key] + 1;\n\t}\n\n\treturn this;\n\n};","var WPTB_ElementObject = function ( data ) {\n let DOMElement, kindIndexProt, copy;\n if( ! data.elemProt ) {\n DOMElement = document.createElement('div'),\n kindIndexProt = undefined,\n copy = false;\n DOMElement.classList.add( 'wptb-' + data.kind + '-container', 'wptb-ph-element' );\n \n let wpTemplateId = 'wptb-' + data.kind + '-content';\n let template = wp.template( wpTemplateId );\n data.node = DOMElement;\n let itemHtml = template( data );\n\n itemHtml = itemHtml.replace(/\\r|\\n|\\t/g, '').trim();\n DOMElement.innerHTML = itemHtml;\n } else {\n DOMElement = data.elemProt.cloneNode( true );\n DOMElement.classList.remove( 'wptb-directlyhovered' );\n let wptbElementMutch = data.elemProt.className.match( /wptb-element-((.+-)\\d+)/i );\n if ( wptbElementMutch && Array.isArray( wptbElementMutch ) ) {\n kindIndexProt = wptbElementMutch[1];\n };\n copy = true;\n \n if( data.tinyMceClear ) {\n DOMElement = WPTB_Helper.elementClearFromTinyMce( DOMElement );\n }\n }\n \n let inElems = DOMElement.querySelectorAll( '.wptb-in-element' );\n if( inElems.length > 0 ) {\n for ( let i = 0; i < inElems.length; i++ ) {\n let inElemObj = {};\n inElemObj.getDOMElement = function() {\n return inElems[i];\n }\n \n applyGenericItemSettings( inElemObj );\n }\n }\n \n window.addEventListener( 'item:onmouseenter', function( event ) {\n //console.log( event );\n }, false);\n \n \n this.kind = data.kind;\n this.getDOMElement = function () {\n return DOMElement;\n };\n \n applyGenericItemSettings( this, kindIndexProt, copy );\n return this;\n}\n\n\n","var WPTB_ElementOptions = function ( element, index, kindIndexProt ) {\n\n var node = element.getDOMElement();\n node.addEventListener( 'click', function() {\n WPTB_Helper.elementOptionsSet( element.kind, this );\n }, {capture: true} );\n};","var WPTB_Helper = {\n hexToRgb: function( hex ) {\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec( hex );\n return result ? 'rgb(' + parseInt( result[1], 16 ) + ',' + parseInt( result[2], 16 ) + ',' + parseInt( result[3], 16 ) + ')' : null;\n },\n rgbToHex: function ( rgb ) {\n if( rgb ) {\n if( WPTB_Helper.isHex( rgb ) ) return rgb;\n\n let rgbm = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?((?:[0-9]*[.])?[0-9]+)[\\s+]?\\)/i);\n if ( rgbm && rgbm.length === 5) {\n return \"#\" +\n ('0' + Math.round(parseFloat(rgbm[4], 10) * 255).toString(16).toUpperCase()).slice(-2) +\n (\"0\" + parseInt(rgbm[1], 10).toString(16).toUpperCase()).slice(-2) +\n (\"0\" + parseInt(rgbm[2], 10).toString(16).toUpperCase()).slice(-2) +\n (\"0\" + parseInt(rgbm[3], 10).toString(16).toUpperCase()).slice(-2);\n } else {\n rgbm = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n if (rgbm && rgbm.length === 4) {\n return \"#\" +\n (\"0\" + parseInt(rgbm[1], 10).toString(16).toUpperCase()).slice(-2) +\n (\"0\" + parseInt(rgbm[2], 10).toString(16).toUpperCase()).slice(-2) +\n (\"0\" + parseInt(rgbm[3], 10).toString(16).toUpperCase()).slice(-2);\n } else {\n return '';\n }\n }\n } else {\n return '';\n }\n\n },\n isHex: function( hex ) {\n let regex = new RegExp('^#(?:[A-Fa-f0-9]{3}){1,2}$');\n return regex.test( hex );\n },\n getElementIcon: function ( icon_directory ) {\n let hostName = location.protocol + '//' + location.hostname;\n let img = document.createElement( 'img' );\n img.src = icon_directory;\n return img;\n },\n elementDragEndClear: function() {\n let wptbMovingMode = document.getElementsByClassName( 'wptb-moving-mode' );\n if ( wptbMovingMode.length > 0 ) {\n for( let i = 0; i < wptbMovingMode.length; i++ ) {\n wptbMovingMode[i].classList.remove( 'wptb-moving-mode' );\n }\n }\n\n let wptbDropHandles = document.getElementsByClassName( 'wptb-drop-handle' );\n if ( wptbDropHandles.length > 0 ) {\n for( let i = 0; i < wptbDropHandles.length; i++ ) {\n wptbDropHandles[i].style.display = 'none';\n }\n }\n\n let wptbDropBorderMarkers = document.getElementsByClassName( 'wptb-drop-border-marker' );\n if ( wptbDropBorderMarkers.length > 0 ) {\n for( let i = 0; i < wptbDropBorderMarkers.length; i++ ) {\n wptbDropBorderMarkers[i].style.display = 'none';\n }\n }\n },\n linkHttpCheckChange: function( link ) {\n if ( link ) {\n if ( link.indexOf( 'http://' ) == -1 && link.indexOf( 'https://' ) == -1 ) {\n let linkArr = link.split( '/' ),\n linkClean;\n if ( Array.isArray( linkArr ) && linkArr.length > 0 ) {\n linkClean = linkArr[linkArr.length - 1];\n }\n return document.location.protocol + '//' + linkClean;\n } else { \n return link;\n }\n } else {\n return '';\n }\n },\n dataTitleColumnSet: function( table ) {\n let rows = table.rows,\n rowHead = rows[0];\n let computedStyleRowHead = getComputedStyle( rowHead );\n \n let rowHeadChildren = rowHead.children;\n let contentsForHeader = {};\n for( let i = 0; i < rowHeadChildren.length; i++ ) {\n let tdElements = rowHeadChildren[i].children;\n \n for( let j = 0; j < tdElements.length; j++ ) {\n let element = tdElements[j];\n if( element.classList.contains( 'wptb-ph-element' ) ) {\n let infArr = element.className.match( /wptb-element-(.+)-(\\d+)/i );\n if( infArr[1] == 'text' ) {\n let p = element.querySelector( 'p' ),\n textContent = p.textContent,\n textAlign = p.style.textAlign;\n contentsForHeader[rowHeadChildren[i].dataset.xIndex] = [textContent, element.style.fontSize, \n element.style.color, computedStyleRowHead.backgroundColor, textAlign];\n break;\n }\n }\n }\n if( ! contentsForHeader[rowHeadChildren[i].dataset.xIndex] ) {\n contentsForHeader[rowHeadChildren[i].dataset.xIndex] = ['', '', \n '', computedStyleRowHead.backgroundColor, ''];\n }\n }\n for ( let i = 1; i < rows.length; i++ ) {\n let thisRow = rows[i],\n thisRowChildren = thisRow.children;\n for( let j = 0; j < thisRowChildren.length; j++ ) {\n if ( contentsForHeader[thisRowChildren[j].dataset.xIndex] ) {\n thisRowChildren[j].dataset.wptbTitleColumn = contentsForHeader[thisRowChildren[j].dataset.xIndex][0];\n thisRowChildren[j].dataset.wptbTitleColumnFontSize = contentsForHeader[thisRowChildren[j].dataset.xIndex][1];\n thisRowChildren[j].dataset.wptbTitleColumnColor = contentsForHeader[thisRowChildren[j].dataset.xIndex][2];\n thisRowChildren[j].dataset.wptbTitleBackgroundColor = contentsForHeader[thisRowChildren[j].dataset.xIndex][3];\n thisRowChildren[j].dataset.wptbTitleAlign = contentsForHeader[thisRowChildren[j].dataset.xIndex][4];\n } else {\n thisRowChildren[j].dataset.wptbTitleColumn = '';\n thisRowChildren[j].dataset.wptbTitleColumnFontSize = '';\n thisRowChildren[j].dataset.wptbTitleColumnColor = '';\n thisRowChildren[j].dataset.wptbTitleBackgroundColor = '';\n thisRowChildren[j].dataset.wptbTitleAlign = '';\n }\n }\n }\n },\n findAncestor: function( el, cls ) {\n while ( ( el = el.parentElement ) && !el.classList.contains( cls ) );\n return el;\n },\n rowIsTop: function( row ) {\n var parent = row.parentNode;\n if( parent.children[0] == row ) {\n return true;\n } else {\n return false;\n }\n },\n getSelectionText: function() {\n var txt = '';\n if (txt = window.getSelection) {\n txt = window.getSelection().toString();\n } else {\n txt = document.selection.createRange().text;\n }\n return txt;\n },\n elementOptionsPanelClear: function() {\n let elementOptionsGroup = document.getElementById( 'element-options-group' );\n if( elementOptionsGroup ) {\n elementOptionsGroup.innerHTML = '';\n }\n },\n wpColorPickerCheckChangeForTableStateSaving: function( event ) {\n if( event.originalEvent.type == 'external' ) {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n } else {\n let wpPickerContainer = WPTB_Helper.findAncestor( event.target, 'wp-picker-container' );\n if( wpPickerContainer ) {\n if( event.originalEvent.type == 'square' || event.originalEvent.type == 'strip' ) {\n let body = document.getElementsByTagName( 'body' )[0];\n body.removeEventListener( 'mouseup', WPTB_Helper.irisStripMouseUpStateSaveManager, false );\n body.addEventListener( 'mouseup', WPTB_Helper.irisStripMouseUpStateSaveManager, false );\n }\n }\n }\n },\n irisStripMouseUpStateSaveManager: function() {\n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n \n let body = document.getElementsByTagName( 'body' )[0];\n body.removeEventListener( 'mouseup', WPTB_Helper.irisStripMouseUpStateSaveManager, false );\n },\n wpColorPickerClear: function( attribute, isId ) {\n let input;\n if( isId ) {\n input = [document.getElementById( attribute )];\n input.length = 1;\n } else {\n input = document.getElementsByClassName( attribute );\n }\n for( let i = 0; i < input.length; i++ ) {\n let wpPickerContainer = WPTB_Helper.findAncestor( input[i], 'wp-picker-container' );\n if( wpPickerContainer ) {\n let parent = wpPickerContainer.parentNode;\n parent.removeChild( wpPickerContainer );\n let newInput = document.createElement( 'input' );\n if( isId ) {\n newInput.setAttribute( 'id', attribute );\n } else {\n newInput.classList.add( 'wptb-element-property', attribute );\n }\n newInput.value = \"\";\n parent.appendChild( newInput );\n }\n }\n },\n detectMode: function() {\n var url = window.location.href,\n regex = new RegExp('[?&]table(=([^&#]*)|&|#|$)'),\n results = regex.exec(url);\n if ( ! results ) return false;\n if ( ! results[2] ) return '';\n return decodeURIComponent( results[2].replace(/\\+/g, ' ') );\n },\n getColumnWidth: function( table, cell ) {\n let xIndex = cell.dataset.xIndex;\n let xIndexes = table.querySelectorAll( '[data-x-index=\"' + xIndex + '\"]' );\n let cellWidth = cell.getCellDimensions().width;\n for( let i = 0; i < xIndexes.length; i++ ) {\n if( cellWidth > xIndexes[i].getCellDimensions().width ) {\n cellWidth = xIndexes[i].getCellDimensions().width;\n }\n }\n return cellWidth;\n },\n getRowHeight: function( table, cell ) {\n let yIndex = cell.dataset.yIndex;\n let yIndexes = table.querySelectorAll( '[data-y-index=\"' + yIndex + '\"]' );\n let cellHeight = cell.getCellDimensions().height;\n for( let i = 0; i < yIndexes.length; i++ ) {\n if( cellHeight > yIndexes[i].getCellDimensions().height ) {\n cellHeight = yIndexes[i].getCellDimensions().height;\n }\n }\n return cellHeight;\n },\n newElementProxy: function( el ) {\n if( el ) {\n let data = {kind: el};\n return new WPTB_ElementObject( data );\n }\n },\n wpColorPickerChange: function( event, ui ) {\n let uiColor;\n if( ui ) {\n uiColor = ui.color.toString();\n } else {\n uiColor = '';\n }\n \n let parent = WPTB_Helper.findAncestor( event.target, 'wp-picker-input-wrap' ).getElementsByClassName( 'wptb-color-picker' )[0], classe, type, ps, number;\n classe = parent.dataset.element.match(/wptb-options-(.+)-(\\d+)/i);\n type = classe[1];\n number = classe[2];\n let affectedEl = document.getElementsByClassName( 'wptb-element-' + type + '-' + number )[0];\n if ( type == 'button' ) {\n if ( parent.dataset.type == 'button-text-color' ) {\n affectedEl.getElementsByClassName( 'wptb-button' )[0].style.color = uiColor;\n } else {\n affectedEl.getElementsByClassName( 'wptb-button' )[0].style.backgroundColor = uiColor;\n }\n } else if( type == 'list' ) {\n let ps = affectedEl.querySelectorAll( 'p' );\n if( ps.length > 0 ) {\n for ( let i = 0; i < ps.length; i++ ) {\n ps[i].style.color = uiColor;\n }\n }\n } else if( type == 'star_rating' ) {\n if ( parent.dataset.type == 'star-color' ) {\n let ratingStar = affectedEl.querySelectorAll('li');\n for( let i = 0; i < ratingStar.length; i++ ) {\n let span = ratingStar[i].getElementsByTagName( 'span' );\n for( let j = 0; j < span.length; j++ ) {\n span[j].style.fill = uiColor;\n }\n }\n } else if( parent.dataset.type == 'numeral-rating-color' ) {\n let wptbTextMessageSize = affectedEl.querySelector('.wptb-number-rating');\n wptbTextMessageSize.style.color = uiColor;\n }\n\n } else {\n affectedEl.style.color = uiColor;\n }\n },\n numberImputSize: function ( wptbNumberInputs, maxCount, maxValue ) {\n wptbNumberInputs.onkeydown = function() {\n let thisValue = this.value;\n thisValue = String( thisValue );\n if ( thisValue[0] == 0 ) {\n this.value = \"\";\n } else {\n thisValue = thisValue.substring( 0, maxCount );\n this.value = thisValue;\n }\n }\n wptbNumberInputs.onkeyup = function( ) {\n let thisValue = this.value;\n if ( parseInt( thisValue, 10 ) > parseInt( maxValue, 10 ) ) {\n this.value = maxValue;\n }\n \n let wptbTableStateSaveManager = new WPTB_TableStateSaveManager();\n wptbTableStateSaveManager.tableStateSet();\n }\n },\n ucfirst: function( str ) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n },\n wptbDocumentEventGenerate: function( eventName, element, details ) {\n if( eventName && element ) {\n if( ! details ) {\n details = true;\n }\n let event = new CustomEvent( eventName, { detail: details, bubbles: true } );\n element.dispatchEvent( event );\n }\n },\n // run script for the pointed element\n elementStartScript: function( element ) {\n //let script = element.getElementsByTagName( 'script' );\n let infArr = element.className.match(/wptb-element-(.+)-(\\d+)/i);\n if( infArr && Array.isArray( infArr ) ) {\n let kind = infArr[1];\n if( kind ) {\n// let wpTemplateId = 'wptb-' + kind + '-script';\n// let template = wp.template( wpTemplateId );\n// let data = {elemClass: infArr[0]};\n// let elementScriptText = template( data );\n// elementScriptText = elementScriptText.replace(/\\r|\\n|\\t/g, '').trim();\n//\n// let scriptNew = document.createElement( 'script' );\n// scriptNew.setAttribute( 'type', 'text/javascript' );\n// scriptNew.innerHTML = elementScriptText;\n// element.parentNode.appendChild( scriptNew );\n \n// element.parentNode.removeChild( scriptNew );\n if( kind in WPTB_ElementsScriptsLauncher ) {\n WPTB_ElementsScriptsLauncher[kind]( element );\n }\n }\n }\n },\n // deletes event handlers from the pointed option element and from all his daughter elements\n deleteEventHandlers: function( element ) {\n if( element ) {\n jQuery( element ).off();\n let elementChildren = element.children;\n if( elementChildren ) {\n for ( let i = 0; i < elementChildren.length; i++ ) {\n WPTB_Helper.deleteEventHandlers( elementChildren[i] );\n }\n }\n } else {\n return;\n }\n },\n // replace all occurrences in a string\n replaceAll: function( string, search, replace ){\n return string.split( search ).join( replace );\n },\n // clears code from TinyMCE attributes\n elementClearFromTinyMce: function( element ) {\n let mceContentBodys = element.querySelectorAll( '.mce-content-body' );\n if( mceContentBodys.length > 0 ) {\n for ( let k = 0; k < mceContentBodys.length; k++ ) {\n mceContentBodys[k].classList.remove( 'mce-content-body' );\n }\n }\n\n let dataMceStyle = element.querySelectorAll( '[data-mce-style]' );\n if ( dataMceStyle.length > 0 ) {\n for ( let k = 0; k < dataMceStyle.length; k++ ) {\n dataMceStyle[k].removeAttribute( 'data-mce-style' );\n }\n }\n \n let mceEditFocus = element.querySelectorAll( '.mce-edit-focus' );\n if( mceEditFocus.length > 0 ) {\n for ( let k = 0; k < mceEditFocus.length; k++ ) {\n mceEditFocus[k].classList.remove( 'mce-edit-focus' );\n }\n }\n\n let contentEditable = element.querySelectorAll( '[contenteditable]' );\n if ( contentEditable.length > 0 ) {\n for ( let k = 0; k < contentEditable.length; k++ ) {\n contentEditable[k].removeAttribute( 'contenteditable' );\n }\n }\n\n let spellCheck = element.querySelectorAll( '[spellcheck]' );\n if ( spellCheck.length > 0 ) {\n for ( let k = 0; k < spellCheck.length; k++ ) {\n spellCheck[k].removeAttribute( 'spellcheck' );\n }\n }\n\n let mceIds = element.querySelectorAll( '[id^=mce_]' );\n if ( mceIds.length > 0 ) {\n for ( let k = 0; k < mceIds.length; k++ ) {\n mceIds[k].removeAttribute( 'id' );\n }\n }\n \n return element;\n },\n elementOptionContainerCustomClassSet: function( targetInput, customClassForContainer ) {\n if( targetInput && customClassForContainer ) {\n let containerElement = WPTB_Helper.findAncestor( targetInput, 'wptb-element-option' );\n if( containerElement ) {\n containerElement.classList.add( customClassForContainer );\n }\n }\n },\n elementOptionContainerAdditionalStyles: function( targetInput, containerAdditionalStyles ) {\n if( targetInput && containerAdditionalStyles ) {\n let containerElement = WPTB_Helper.findAncestor( targetInput, 'wptb-element-option' );\n let containerStylesArrOne = containerAdditionalStyles.split( ';' );\n\n if( containerElement && containerStylesArrOne ) {\n function containerStylesSet( containerStyleStr, containerElement ) {\n if( containerStyleStr ) {\n containerStyleStrArr = containerStyleStr.split( ':' );\n\n if( containerStyleStrArr && Array.isArray( containerStyleStrArr ) ) {\n containerElement.style[containerStyleStrArr[0]] = containerStyleStrArr[1];\n }\n }\n }\n if( containerStylesArrOne && Array.isArray( containerStylesArrOne ) ) {\n for( let i = 0; i < containerStylesArrOne.length; i++ ) {\n if( containerStylesArrOne[i] ) {\n containerStylesSet( containerStylesArrOne[i], containerElement );\n }\n }\n } else {\n containerStylesSet( containerStylesArrOne, containerElement );\n }\n }\n }\n },\n // function which set handler for event of changes of control\n controlsInclude: function( element, functionHandler ) {\n if( element && typeof element === 'object' && typeof functionHandler === 'function' ) {\n element.addEventListener( 'element:controls:active', function() {\n if( ! element.hasOwnProperty( 'сontrolsConnectIndic' ) || element.сontrolsConnectIndic !== true ) {\n let infArr = element.className.match( /wptb-element-(.+)-(\\d+)/i ),\n elementKind;\n\n if( infArr && Array.isArray( infArr ) ) {\n elementKind = infArr[1];\n }\n\n// if( ! element.hasOwnProperty( 'сontrolsConnectIndic' ) || element.сontrolsConnectIndic !== true && elementKind ) {\n// let elementsSettingsTemplateJs = document.getElementsByClassName( 'wptb-element-datas' );\n// if( elementsSettingsTemplateJs.length > 0 ) {\n// elementsSettingsTemplateJs = elementsSettingsTemplateJs[0];\n//\n// let elementsSettings = elementsSettingsTemplateJs.innerHTML;\n// let controlClassesNames = [];\n// if( elementsSettings ) {\n// elementsSettings = elementsSettings.trim();\n// elementsSettings = JSON.parse( elementsSettings );\n// if( elementsSettings && typeof elementsSettings === 'object' ) {\n// if( 'tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2] in elementsSettings ) {\n// let elementSettings = elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]];\n// if( elementSettings && typeof elementSettings === 'object' ) {\n// Object.keys( elementSettings ).forEach( function( key ) {\n// let regularText = new RegExp( 'data-wptb-el-' + elementKind + '-(\\\\d+)-([a-zA-Z0-9_-]+)', \"i\" );\n// let keyInfArr = key.match( regularText );\n// if( keyInfArr && Array.isArray( keyInfArr ) ) {\n// let controlClass = key.replace( 'data-', '' );\n// controlClassesNames.push( [controlClass, keyInfArr[2]] );\n// }\n// });\n// }\n// }\n// }\n// }\n// }\n// }\n if( elementKind ){\n let elementOptionsContainer = document.querySelector( '.wptb-element-options.wptb-options-' + infArr[1] + '-' + infArr[2] );\n\n let elementOptions = elementOptionsContainer.querySelectorAll( '.wptb-element-option' );\n\n for( let i = 0; i < elementOptions.length; i++ ) {\n let controlActiveElement = elementOptions[i].querySelector( '.wptb-element-property' );\n if( controlActiveElement ) {\n let regularText = new RegExp( 'wptb-el-' + elementKind + '-(\\\\d+)-([a-zA-Z0-9_-]+)', \"i\" );\n let controlInfArr = controlActiveElement.className.match( regularText );\n if( controlInfArr && Array.isArray( controlInfArr ) ) {\n let controlUnicClassName = controlInfArr[0];\n\n element.addEventListener( 'wptb-control:' + controlUnicClassName, function() {\n let controls = {};\n let controlName = controlInfArr[2];\n let control = document.getElementsByClassName( controlUnicClassName );\n if( control.length > 0 && controlName ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( control );\n\n controls[controlName] = targetControlValue;\n }\n\n functionHandler( controls, element );\n }, false );\n }\n\n element.сontrolsConnectIndic = true;\n }\n }\n }\n }\n }, false );\n }\n },\n oneControlInclude: function( element, functionHandler, controlName ) {\n if( element && typeof element === 'object' && typeof functionHandler === 'function' && typeof controlName === 'string' ) {\n let infArr = element.className.match( /wptb-element-((.+-)\\d+)/i ),\n elementKind;\n \n if( infArr && Array.isArray( infArr ) ) {\n elementKind = infArr[1].split( '-' )[0];\n \n let wptbContrlStacksConfigId = 'wptb-' + elementKind + '-control-stack';\n let tmplControlsConfig = wp.template( wptbContrlStacksConfigId );\n let data = {\n container: '.' + infArr[0]\n };\n let jsonControlsConfigJson = tmplControlsConfig( data );\n let jsonControlsConfig = JSON.parse( jsonControlsConfigJson );\n \n if( jsonControlsConfig && typeof jsonControlsConfig === 'object' && jsonControlsConfig.hasOwnProperty( controlName ) ) {\n let controlClassName = 'wptb-el-' + infArr[1] + '-' + controlName;\n \n element.addEventListener( 'wptb-control:' + controlClassName, function( event ) {\n let control = document.getElementsByClassName( controlClassName );\n if( control.length > 0 ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( control );\n\n functionHandler( targetControlValue, element );\n }\n }, false );\n }\n }\n } else {\n return false;\n }\n },\n //\n innerElementCopyIncludeHandler: function( element, functionHandler ) {\n if( element && typeof element === 'object' && typeof functionHandler === 'function' ) {\n element.addEventListener( 'wptb-inner-element:copy', function( event ) {\n let innerElement = event.detail;\n if( innerElement ) {\n WPTB_Helper.elementClearFromTinyMce( innerElement );\n functionHandler( innerElement, element );\n }\n }, false );\n }\n },\n //\n appearDependOnControl: function( dependOn, targetControlElementClass ) {\n if( Array.isArray( dependOn ) ) {\n let dependOnControlName = dependOn[0];\n let infArr = targetControlElementClass.match( /wptb-el-((.+-)\\d+)-(.+)/i );\n \n if( infArr && Array.isArray( infArr ) ) {\n let controlName = infArr[3];\n\n let dependOnControlElementClass = targetControlElementClass.replace( controlName, dependOnControlName );\n\n let dependOnControlElement = document.getElementsByClassName( dependOnControlElementClass );\n\n if( dependOnControlElement.length > 0 ) {\n dependOnControlElement = dependOnControlElement[0];\n let targetControlElement = document.getElementsByClassName( targetControlElementClass );\n if( targetControlElement.length > 0 ) {\n targetControlElement = targetControlElement[0];\n let controlContainerElem = WPTB_Helper.findAncestor( targetControlElement, 'wptb-element-option' );\n\n if( controlContainerElem ) {\n function showHideDependOnControlElement( dependOnControlElementClass, dependOn ) {\n \n// let elementsSettingsTemplateJs = document.getElementsByClassName( 'wptb-element-datas' );\n// if( elementsSettingsTemplateJs.length > 0 ) {\n// elementsSettingsTemplateJs = elementsSettingsTemplateJs[0];\n//\n// let elementsSettings = elementsSettingsTemplateJs.innerHTML;\n// if( elementsSettings ) {\n// elementsSettings = elementsSettings.trim();\n// elementsSettings = JSON.parse( elementsSettings );\n// if( elementsSettings && typeof elementsSettings === 'object' && \n// ( 'tmpl-wptb-el-datas-' + dependOnControlElementKind ) in elementsSettings ) {\n// let elementSettings = elementsSettings['tmpl-wptb-el-datas-' + dependOnControlElementKind];\n// if( elementSettings && typeof elementSettings === 'object' && \n// ( 'data-wptb-el-' + dependOnControlElementKind + '-' + dependOnControlName ) in elementSettings ) {\n// let elementSettingValue = elementSettings['data-wptb-el-' + dependOnControlElementKind + '-' + dependOnControlName];\n// \n// if( elementSettingValue ) {\n// if( dependOn[1] && Array.isArray( dependOn[1] ) && \n// ( dependOn[1].indexOf( elementSettingValue ) !== -1 ) ) {\n// controlContainerElem.style.display = 'block';\n// } else if( dependOn[2] && Array.isArray( dependOn[2] ) && \n// ( dependOn[2].indexOf( elementSettingValue ) !== -1 ) ) {\n// controlContainerElem.style.display = 'none';\n// }\n// }\n// }\n// }\n// }\n// }\n if( dependOnControlElementClass ) {\n let dependOnControlElements = document.getElementsByClassName( dependOnControlElementClass );\n if( dependOnControlElements.length > 0 ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( dependOnControlElements );\n \n if( dependOn[1] && Array.isArray( dependOn[1] ) && \n ( dependOn[1].indexOf( targetControlValue ) !== -1 ) ) {\n controlContainerElem.style.display = 'block';\n } else if( dependOn[2] && Array.isArray( dependOn[2] ) && \n ( dependOn[2].indexOf( targetControlValue ) !== -1 ) ) {\n controlContainerElem.style.display = 'none';\n }\n }\n }\n }\n\n showHideDependOnControlElement( dependOnControlElementClass, dependOn );\n\n dependOnControlElement.addEventListener( 'change', function( event ) {\n showHideDependOnControlElement( dependOnControlElementClass, dependOn );\n }, false );\n }\n }\n }\n }\n }\n },\n //\n controlsStateManager: function ( targetControlClass, controlChangeIndic ) {\n let targetControls = document.getElementsByClassName( targetControlClass );\n if( targetControls.length > 0 ) {\n //targetControls = targetControls[0];\n \n let infArr = targetControlClass.match( /wptb-el-((.+-)\\d+)-(.+)/i );\n \n if( infArr && Array.isArray( infArr ) ) {\n let selectorElement;\n selectorElement = document.querySelector( '.wptb-element-' + infArr[1] );\n \n if( selectorElement ) {\n let elementsSettingsTemplatesJs;\n let elementSettings = {};\n let elementsSettings;\n elementsSettingsTemplatesJs = document.getElementsByClassName( 'wptb-element-datas' );\n if( elementsSettingsTemplatesJs.length == 0 || elementsSettingsTemplatesJs[0].innerHTML == '' ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( targetControls );\n elementSettings['data-' + targetControlClass] = targetControlValue;\n\n elementsSettings = {};\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] = elementSettings;\n elementsSettings = JSON.stringify( elementsSettings );\n\n if( elementsSettingsTemplatesJs.length == 0 ) {\n elementsSettingsTemplatesJs = document.createElement( 'script' );\n elementsSettingsTemplatesJs.setAttribute( 'type', 'text/html' );\n elementsSettingsTemplatesJs.setAttribute( 'class', 'wptb-element-datas' );\n } else {\n elementsSettingsTemplatesJs = elementsSettingsTemplatesJs[0];\n }\n\n elementsSettingsTemplatesJs.innerHTML = elementsSettings;\n\n let body = document.getElementsByTagName('body')[0];\n body.appendChild( elementsSettingsTemplatesJs );\n } else {\n elementsSettingsTemplatesJs = elementsSettingsTemplatesJs[0];\n elementsSettings = elementsSettingsTemplatesJs.innerHTML;\n if( elementsSettings ) {\n elementsSettings = elementsSettings.trim();\n elementsSettings = JSON.parse( elementsSettings );\n\n if( elementsSettings && typeof elementsSettings === 'object' ) {\n \n \n if( controlChangeIndic ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( targetControls );\n if( ! ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) || \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] !== 'object') {\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] = {};\n }\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass] = targetControlValue;\n elementsSettingsTemplatesJs.innerHTML = JSON.stringify( elementsSettings );\n } else if( ! ( ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) && \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] === 'object' && \n ( 'data-' + targetControlClass ) in elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] ) ) {\n let targetControlValue = WPTB_Helper.targetControlValueGet( targetControls );\n if( ! ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) || \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] !== 'object') {\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] = {};\n }\n elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass] = targetControlValue;\n elementsSettingsTemplatesJs.innerHTML = JSON.stringify( elementsSettings );\n } else if( ( ( 'tmpl-wptb-el-datas-' + infArr[1] ) in elementsSettings ) && \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] === 'object' && \n ( 'data-' + targetControlClass ) in elementsSettings['tmpl-wptb-el-datas-' + infArr[1]] ) {\n for( let i = 0; i < targetControls.length; i++ ) {\n if( targetControls[i].type == 'checkbox' ) {\n let targetControlValue;\n if( targetControls[i].name ) {\n targetControlValue = elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass][targetControls[i].name];\n } else {\n targetControlValue = elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass];\n }\n \n if( targetControlValue == 'checked' ) {\n targetControls[i].checked = true;\n } else if( targetControlValue == 'unchecked' ) {\n targetControls[i].checked = false;\n }\n } else {\n targetControls[i].value = elementsSettings['tmpl-wptb-el-datas-' + infArr[1]]['data-' + targetControlClass];\n }\n }\n }\n }\n }\n }\n }\n }\n }\n },\n //\n targetControlValueGet: function( targetControls ) {\n let targetControlValue;\n for( let i = 0; i < targetControls.length; i++ ) {\n if( targetControls[i].type == 'checkbox' && targetControls[i].name ) {\n if( ! targetControlValue ) targetControlValue = {};\n if( targetControls[i].checked == true ) {\n targetControlValue[targetControls[i].name] = 'checked';\n } else {\n targetControlValue[targetControls[i].name] = 'unchecked';\n }\n } else if( targetControls[i].type == 'checkbox' ) {\n if( targetControls[i].checked == true ) {\n targetControlValue = 'checked';\n } else {\n targetControlValue = 'unchecked';\n }\n } else if( targetControls[i].type ) {\n targetControlValue = targetControls[i].value;\n } else if( targetControls[i].dataset.alignmentValue && targetControls[i].classList.contains( 'selected' ) ){\n targetControlValue = targetControls[i].dataset.alignmentValue;\n }\n }\n return targetControlValue;\n },\n //\n elementControlsStateCopy: function( elementProt, copyElem ) {\n if( elementProt && copyElem ) {\n let infArrProt = elementProt.className.match( /wptb-element-((.+-)\\d+)/i );\n let infArrCopy = copyElem.className.match( /wptb-element-((.+-)\\d+)/i );\n if( infArrProt && Array.isArray( infArrProt ) &&\n infArrCopy && Array.isArray( infArrCopy )) {\n let elemProtKind = infArrProt[1];\n let elemCopyKind = infArrCopy[1];\n let elementsSettingsTemplateJs = document.getElementsByClassName( 'wptb-element-datas' );\n if( elementsSettingsTemplateJs.length > 0 ) {\n elementsSettingsTemplateJs = elementsSettingsTemplateJs[0];\n \n let elementsSettings = elementsSettingsTemplateJs.innerHTML;\n if( elementsSettings ) {\n elementsSettings = elementsSettings.trim();\n elementsSettings = JSON.parse( elementsSettings );\n \n if( elementsSettings && typeof elementsSettings === 'object' ) {\n let elementSettingsProt = elementsSettings['tmpl-wptb-el-datas-' + elemProtKind];\n if( elementSettingsProt && typeof elementSettingsProt === 'object' ) {\n let elementSettingsCopy = {};\n \n Object.keys( elementSettingsProt ).forEach( function( key ) {\n let elementSettingValue = elementSettingsProt[key];\n let elementSettingKeyCopy = key.replace( elemProtKind, elemCopyKind );\n elementSettingsCopy[elementSettingKeyCopy] = elementSettingValue;\n });\n \n if( Object.keys( elementSettingsCopy ).length > 0 ) {\n elementsSettings['tmpl-wptb-el-datas-' + elemCopyKind] = elementSettingsCopy;\n \n elementsSettings = JSON.stringify( elementsSettings );\n elementsSettingsTemplateJs.innerHTML = elementsSettings;\n }\n }\n }\n }\n }\n }\n }\n },\n //\n elementControlsStateDelete: function( element, nameControl ) {\n let infArr = element.className.match( /wptb-element-(.+)-(\\d+)/i );\n let body = document.getElementsByTagName( 'body' )[0];\n let wptbElementDatas = body.getElementsByClassName( 'wptb-element-datas' );\n if( infArr && Array.isArray( infArr ) && wptbElementDatas.length > 0 ) {\n wptbElementDatas = wptbElementDatas[0];\n let elementsSettings = wptbElementDatas.innerHTML;\n if( elementsSettings ) {\n elementsSettings = elementsSettings.trim();\n elementsSettings = JSON.parse( elementsSettings );\n if( elementsSettings && typeof elementsSettings === 'object' &&\n ( ( 'tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2] ) in elementsSettings ) ) {\n if( ! nameControl ) {\n delete elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]];\n } else {\n if( elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]] && \n typeof elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]] === 'object' &&\n ( 'data-wptb-el-' + infArr[1] + '-' + infArr[2] + '-' + nameControl ) in elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]] ) {\n delete elementsSettings['tmpl-wptb-el-datas-' + infArr[1] + '-' + infArr[2]]['data-wptb-el-' + infArr[1] + '-' + infArr[2] + '-' + nameControl];\n }\n }\n\n if( Object.keys( elementsSettings ).length == 0 ) {\n body.removeChild( wptbElementDatas );\n } else {\n elementsSettings = JSON.stringify( elementsSettings );\n wptbElementDatas.innerHTML = elementsSettings;\n }\n }\n }\n }\n },\n // \n elementOptionsSet: function( kind, element ) {\n // get controls config for this element\n let wptbContrlStacksConfigId = 'wptb-' + kind + '-control-stack';\n let tmplControlsConfig = wp.template( wptbContrlStacksConfigId );\n let data;\n let elementContainerClass;\n let elementOptionClassIndic;\n let elementOptionsGroup;\n let elementOptionsGroupId;\n let wptbelementOptionClass;\n \n // create containers for inserting controls of this item and their scripts\n let wptbelementOptionsContainer = document.createElement( 'div' );\n let wptbelementOptionsScriptsContainer = document.createElement( 'div' );\n \n let infArr = element.className.match( /wptb-element-((.+-)\\d+)/i );\n if( ! infArr && element.classList.contains( 'wptb-preview-table' ) ) {\n let table_id = WPTB_Helper.detectMode();\n element.classList.add( 'wptb-element-main-table_setting-' + table_id );\n infArr = element.className.match( /wptb-element-((.+-)\\d+)/i );\n }\n data = {\n container: '.' + infArr[0]\n };\n\n elementContainerClass = infArr[0];\n elementOptionClassIndic = infArr[1];\n \n if( ! element.classList.contains( 'wptb-preview-table' ) ) {\n let children = document.getElementById( 'element-options-group' ).childNodes;\n for ( let i = 0; i < children.length; i++) {\n if ( children[i].style )\n children[i].style.display = 'none';\n }\n \n // hide wptb-elements-container and wptb-settings-section\n document.getElementsByClassName( 'wptb-elements-container' )[0].style.display = 'none';\n document.getElementsByClassName( 'wptb-settings-section' )[0].style.display = 'none';\n\n // show element-options-group \n document.getElementById( 'element-options-group' ).style.display = 'block';\n \n elementOptionsGroupId = 'element-options-group';\n wptbelementOptionClass = 'wptb-element-option';\n }