All-in-One WP Migration - Version 5.44

Version Description

  • Add "Do not replace email domain" option in advanced settings
  • Add "ai1wm_exclude_content_from_export" WordPress hook on export
  • Add HTML5 uploader
Download this release

Release Info

Developer bangelov
Plugin Icon 128x128 All-in-One WP Migration
Version 5.44
Comparing to
See all releases

Code changes from version 5.43 to 5.44

all-in-one-wp-migration.php CHANGED
@@ -5,7 +5,7 @@
5
* Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
* Author: ServMask
7
* Author URI: https://servmask.com/
8
- * Version: 5.43
9
* Text Domain: all-in-one-wp-migration
10
* Domain Path: /languages
11
* Network: True
@@ -69,6 +69,9 @@ require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'deprecated.php';
69
// Include functions
70
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'functions.php';
71
72
// Include loader
73
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'loader.php';
74
5
* Description: Migration tool for all your blog data. Import or Export your blog content with a single click.
6
* Author: ServMask
7
* Author URI: https://servmask.com/
8
+ * Version: 5.44
9
* Text Domain: all-in-one-wp-migration
10
* Domain Path: /languages
11
* Network: True
69
// Include functions
70
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'functions.php';
71
72
+ // Include exceptions
73
+ require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'exceptions.php';
74
+
75
// Include loader
76
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'loader.php';
77
constants.php CHANGED
@@ -39,7 +39,7 @@ if ( function_exists( 'gethostname' ) && in_array( gethostname(), $local ) ) {
39
// ==================
40
// = Plugin Version =
41
// ==================
42
- define( 'AI1WM_VERSION', '5.43' );
43
44
// ===============
45
// = Plugin Name =
@@ -101,11 +101,6 @@ define( 'AI1WM_TEMPLATES_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'view' );
101
// ===================
102
define( 'BANDAR_TEMPLATES_PATH', AI1WM_TEMPLATES_PATH );
103
104
- // ==================
105
- // = Exception Path =
106
- // ==================
107
- define( 'AI1WM_EXCEPTION_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'exception' );
108
-
109
// ===============
110
// = Vendor Path =
111
// ===============
39
// ==================
40
// = Plugin Version =
41
// ==================
42
+ define( 'AI1WM_VERSION', '5.44' );
43
44
// ===============
45
// = Plugin Name =
101
// ===================
102
define( 'BANDAR_TEMPLATES_PATH', AI1WM_TEMPLATES_PATH );
103
104
// ===============
105
// = Vendor Path =
106
// ===============
lib/exception/class-ai1wm-not-accessible-exception.php → exceptions.php RENAMED
@@ -23,4 +23,14 @@
23
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
*/
25
26
class Ai1wm_Not_Accesible_Exception extends Exception {}
23
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
*/
25
26
+ class Ai1wm_Archive_Exception extends Exception {}
27
+ class Ai1wm_Backups_Exception extends Exception {}
28
+ class Ai1wm_Export_Exception extends Exception {}
29
+ class Ai1wm_Http_Exception extends Exception {}
30
+ class Ai1wm_Import_Exception extends Exception {}
31
+ class Ai1wm_Import_Retry_Exception extends Exception {}
32
class Ai1wm_Not_Accesible_Exception extends Exception {}
33
+ class Ai1wm_Not_Found_Exception extends Exception {}
34
+ class Ai1wm_Not_Readable_Exception extends Exception {}
35
+ class Ai1wm_Not_Writable_Exception extends Exception {}
36
+ class Ai1wm_Storage_Exception extends Exception {}
functions.php CHANGED
@@ -670,3 +670,74 @@ function ai1wm_urlencode( $value ) {
670
function ai1wm_urldecode( $value ) {
671
return is_array( $value ) ? array_map( 'ai1wm_urldecode', $value ) : urldecode( stripslashes( $value ) );
672
}
670
function ai1wm_urldecode( $value ) {
671
return is_array( $value ) ? array_map( 'ai1wm_urldecode', $value ) : urldecode( stripslashes( $value ) );
672
}
673
+
674
+ /**
675
+ * Opens a file in specified mode
676
+ *
677
+ * @param string $file Path to the file to open
678
+ * @param string $mode Mode in which to open the file
679
+ * @return resource
680
+ * @throws Exception
681
+ */
682
+ function ai1wm_open( $file, $mode ) {
683
+ $file_handle = fopen( $file, $mode );
684
+
685
+ if ( false === $file_handle ) {
686
+ throw new Exception( sprintf( __( 'Unable to open %s with mode %s', AI1WM_PLUGIN_NAME ), $file, $mode ) );
687
+ }
688
+ return $file_handle;
689
+ }
690
+
691
+ /**
692
+ * Write contents to a file
693
+ *
694
+ * @param resource $handle File handle to write to
695
+ * @param string $content Contents to write to the file
696
+ * @param string $file Filename that contents shall be written to
697
+ * @return int
698
+ * @throws Exception
699
+ */
700
+ function ai1wm_write( $handle, $content, $file ) {
701
+ $write_result = fwrite( $handle, $content );
702
+
703
+ if ( false === $write_result ) {
704
+ throw new Exception( sprintf( __( 'Unable to write to %s.', AI1WM_PLUGIN_NAME ), $file ) );
705
+ }
706
+ return $write_result;
707
+ }
708
+
709
+ /**
710
+ * Closes a file handle
711
+ *
712
+ * @param resource $handle File handle to close
713
+ * @return bool
714
+ */
715
+ function ai1wm_close( $handle ) {
716
+ return @fclose( $handle );
717
+ }
718
+
719
+ /**
720
+ * Deletes a file
721
+ *
722
+ * @param string $file Path to file to delete
723
+ * @return bool
724
+ */
725
+ function ai1wm_unlink( $file ) {
726
+ return @unlink( $file );
727
+ }
728
+
729
+ /**
730
+ * Copies one file's contents to another
731
+ *
732
+ * @param string $source_file File to copy the contents from
733
+ * @param string $destination_file File to copy the contents to
734
+ */
735
+ function ai1wm_copy( $source_file, $destination_file ) {
736
+ $source_handle = ai1wm_open( $source_file, 'rb' );
737
+ $destination_handle = ai1wm_open( $destination_file, 'ab' );
738
+ while ( $buffer = fread( $source_handle, 4096 ) ) {
739
+ ai1wm_write( $destination_handle, $buffer, $destination_file );
740
+ }
741
+ ai1wm_close( $source_handle );
742
+ ai1wm_close( $destination_handle );
743
+ }
lib/controller/class-ai1wm-import-controller.php CHANGED
@@ -68,7 +68,13 @@ class Ai1wm_Import_Controller {
68
foreach ( $hooks as $hook ) {
69
try {
70
$params = call_user_func_array( $hook['function'], array( $params ) );
71
- } catch ( Exception $e ) {
72
Ai1wm_Status::error( $e->getMessage(), __( 'Unable to import', AI1WM_PLUGIN_NAME ) );
73
exit;
74
}
68
foreach ( $hooks as $hook ) {
69
try {
70
$params = call_user_func_array( $hook['function'], array( $params ) );
71
+ }
72
+ catch ( Ai1wm_Import_Retry_Exception $exception ) {
73
+ status_header( $exception->getCode() );
74
+ wp_send_json_error( array( 'message' => $exception->getMessage() ) );
75
+ exit;
76
+ }
77
+ catch ( Exception $e ) {
78
Ai1wm_Status::error( $e->getMessage(), __( 'Unable to import', AI1WM_PLUGIN_NAME ) );
79
exit;
80
}
lib/controller/class-ai1wm-main-controller.php CHANGED
@@ -430,33 +430,21 @@ class Ai1wm_Main_Controller {
430
wp_enqueue_script(
431
'ai1wm-js-import',
432
Ai1wm_Template::asset_link( 'javascript/import.min.js' ),
433
- array( 'plupload-all', 'jquery' )
434
);
435
wp_enqueue_style(
436
'ai1wm-css-import',
437
Ai1wm_Template::asset_link( 'css/import.min.css' )
438
);
439
wp_localize_script( 'ai1wm-js-import', 'ai1wm_uploader', array(
440
- 'runtimes' => 'html5,silverlight,flash,html4',
441
- 'browse_button' => 'ai1wm-import-file',
442
- 'container' => 'ai1wm-plupload-upload-ui',
443
- 'drop_element' => 'ai1wm-drag-drop-area',
444
- 'file_data_name' => 'upload-file',
445
- 'chunk_size' => apply_filters( 'ai1wm_max_chunk_size', AI1WM_MAX_CHUNK_SIZE ),
446
- 'max_retries' => apply_filters( 'ai1wm_max_chunk_retries', AI1WM_MAX_CHUNK_RETRIES ),
447
- 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
448
- 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
449
- 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
450
- 'multiple_queues' => false,
451
- 'multi_selection' => false,
452
- 'urlstream_upload' => true,
453
- 'unique_names' => true,
454
- 'multipart' => true,
455
- 'multipart_params' => array(
456
'priority' => 5,
457
'secret_key' => get_option( AI1WM_SECRET_KEY ),
458
),
459
- 'filters' => array(
460
'ai1wm_archive_extension' => array( 'wpress', 'bin' ),
461
'ai1wm_archive_size' => apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ),
462
),
430
wp_enqueue_script(
431
'ai1wm-js-import',
432
Ai1wm_Template::asset_link( 'javascript/import.min.js' ),
433
+ array( 'jquery' )
434
);
435
wp_enqueue_style(
436
'ai1wm-css-import',
437
Ai1wm_Template::asset_link( 'css/import.min.css' )
438
);
439
wp_localize_script( 'ai1wm-js-import', 'ai1wm_uploader', array(
440
+ 'chunk_size' => apply_filters( 'ai1wm_max_chunk_size', AI1WM_MAX_CHUNK_SIZE ),
441
+ 'max_retries' => apply_filters( 'ai1wm_max_chunk_retries', AI1WM_MAX_CHUNK_RETRIES ),
442
+ 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_import' ) ),
443
+ 'params' => array(
444
'priority' => 5,
445
'secret_key' => get_option( AI1WM_SECRET_KEY ),
446
),
447
+ 'filters' => array(
448
'ai1wm_archive_extension' => array( 'wpress', 'bin' ),
449
'ai1wm_archive_size' => apply_filters( 'ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE ),
450
),
lib/exception/class-ai1wm-archive-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Archive_Exception extends Exception {}
lib/exception/class-ai1wm-backups-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Backups_Exception extends Exception {}
lib/exception/class-ai1wm-export-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Export_Exception extends Exception {}
lib/exception/class-ai1wm-http-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Http_Exception extends Exception {}
lib/exception/class-ai1wm-import-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Import_Exception extends Exception {}
lib/exception/class-ai1wm-not-found-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Not_Found_Exception extends Exception {}
lib/exception/class-ai1wm-not-readable-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Not_Readable_Exception extends Exception {}
lib/exception/class-ai1wm-not-writable-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Not_Writable_Exception extends Exception {}
lib/exception/class-ai1wm-storage-exception.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (C) 2014-2016 ServMask Inc.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
19
- * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
20
- * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
21
- * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
22
- * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
23
- * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
24
- */
25
-
26
- class Ai1wm_Storage_Exception extends Exception {}
lib/model/class-ai1wm-streams.php CHANGED
@@ -117,6 +117,7 @@ class WP_Http_Ai1wm {
117
$context = stream_context_create( array(
118
'ssl' => array(
119
'verify_peer' => $ssl_verify,
120
//'CN_match' => $arrURL['host'], // This is handled by self::verify_ssl_certificate()
121
'capture_peer_cert' => $ssl_verify,
122
'SNI_enabled' => true,
117
$context = stream_context_create( array(
118
'ssl' => array(
119
'verify_peer' => $ssl_verify,
120
+ 'verify_peer_name' => $ssl_verify,
121
//'CN_match' => $arrURL['host'], // This is handled by self::verify_ssl_certificate()
122
'capture_peer_cert' => $ssl_verify,
123
'SNI_enabled' => true,
lib/model/export/class-ai1wm-export-config.php CHANGED
@@ -60,6 +60,11 @@ class Ai1wm_Export_Config {
60
// Set WordPress Version and Content
61
$config->WordPress = (object) array( 'Version' => $wp_version, 'Content' => WP_CONTENT_DIR );
62
63
// Save package.json file
64
$handle = fopen( ai1wm_package_path( $params ), 'w' );
65
fwrite( $handle, json_encode( $config ) );
60
// Set WordPress Version and Content
61
$config->WordPress = (object) array( 'Version' => $wp_version, 'Content' => WP_CONTENT_DIR );
62
63
+ // Set No Replace Email
64
+ if ( isset( $params['options']['no_email_replace'] ) ) {
65
+ $config->NoEmailReplace = true;
66
+ }
67
+
68
// Save package.json file
69
$handle = fopen( ai1wm_package_path( $params ), 'w' );
70
fwrite( $handle, json_encode( $config ) );
lib/model/export/class-ai1wm-export-enumerate.php CHANGED
@@ -47,12 +47,25 @@ class Ai1wm_Export_Enumerate {
47
if ( isset( $params['options']['no_plugins'] ) ) {
48
$exclude_filters = array_merge( $exclude_filters, array( 'plugins', 'mu-plugins' ) );
49
} else {
50
- $exclude_filters = array_merge( $exclude_filters, ai1wm_plugin_filters() );
51
}
52
53
// Exclude media
54
if ( isset( $params['options']['no_media'] ) ) {
55
$exclude_filters[] = 'uploads';
56
}
57
58
// Get total files
@@ -78,7 +91,7 @@ class Ai1wm_Export_Enumerate {
78
$iterator = new Ai1wm_Recursive_Directory_Iterator( WP_CONTENT_DIR );
79
80
// Exclude uploads, plugins or themes
81
- $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, $exclude_filters );
82
83
// Recursively iterate over content directory
84
$iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
47
if ( isset( $params['options']['no_plugins'] ) ) {
48
$exclude_filters = array_merge( $exclude_filters, array( 'plugins', 'mu-plugins' ) );
49
} else {
50
+ $inactive_plugins = array();
51
+
52
+ // Exclude inactive plugins
53
+ if ( isset( $params['options']['no_inactive_plugins'] ) ) {
54
+ foreach ( get_plugins() as $basename => $plugin ) {
55
+ if ( is_plugin_inactive( $basename ) ) {
56
+ $inactive_plugins[] = 'plugins' . DIRECTORY_SEPARATOR . dirname( $basename );
57
+ }
58
+ }
59
+ }
60
+
61
+ // Set exclude filters
62
+ $exclude_filters = array_merge( $exclude_filters, ai1wm_plugin_filters( $inactive_plugins ) );
63
}
64
65
// Exclude media
66
if ( isset( $params['options']['no_media'] ) ) {
67
$exclude_filters[] = 'uploads';
68
+ $exclude_filters[] = 'blogs.dir';
69
}
70
71
// Get total files
91
$iterator = new Ai1wm_Recursive_Directory_Iterator( WP_CONTENT_DIR );
92
93
// Exclude uploads, plugins or themes
94
+ $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_content_from_export', $exclude_filters ) );
95
96
// Recursively iterate over content directory
97
$iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD );
lib/model/import/class-ai1wm-import-database.php CHANGED
@@ -167,9 +167,11 @@ class Ai1wm_Import_Database {
167
}
168
169
// Add email
170
- if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
171
- $old_values[] = sprintf( "@%s", $old_domain );
172
- $new_values[] = sprintf( "@%s", $new_domain );
173
}
174
}
175
@@ -206,9 +208,11 @@ class Ai1wm_Import_Database {
206
}
207
208
// Add email
209
- if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
210
- $old_values[] = sprintf( "@%s", $old_domain );
211
- $new_values[] = sprintf( "@%s", $new_domain );
212
}
213
}
214
}
@@ -266,9 +270,11 @@ class Ai1wm_Import_Database {
266
}
267
268
// Add email
269
- if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
270
- $old_values[] = sprintf( "@%s", $old_domain );
271
- $new_values[] = sprintf( "@%s", $new_domain );
272
}
273
}
274
}
@@ -326,9 +332,11 @@ class Ai1wm_Import_Database {
326
}
327
328
// Add email
329
- if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
330
- $old_values[] = sprintf( "@%s", $old_domain );
331
- $new_values[] = sprintf( "@%s", $new_domain );
332
}
333
}
334
}
167
}
168
169
// Add email
170
+ if ( ! isset( $config->NoEmailReplace ) ) {
171
+ if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
172
+ $old_values[] = sprintf( "@%s", $old_domain );
173
+ $new_values[] = sprintf( "@%s", $new_domain );
174
+ }
175
}
176
}
177
208
}
209
210
// Add email
211
+ if ( ! isset( $config->NoEmailReplace ) ) {
212
+ if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
213
+ $old_values[] = sprintf( "@%s", $old_domain );
214
+ $new_values[] = sprintf( "@%s", $new_domain );
215
+ }
216
}
217
}
218
}
270
}
271
272
// Add email
273
+ if ( ! isset( $config->NoEmailReplace ) ) {
274
+ if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
275
+ $old_values[] = sprintf( "@%s", $old_domain );
276
+ $new_values[] = sprintf( "@%s", $new_domain );
277
+ }
278
}
279
}
280
}
332
}
333
334
// Add email
335
+ if ( ! isset( $config->NoEmailReplace ) ) {
336
+ if ( ! in_array( sprintf( "@%s", $old_domain ), $old_values ) ) {
337
+ $old_values[] = sprintf( "@%s", $old_domain );
338
+ $new_values[] = sprintf( "@%s", $new_domain );
339
+ }
340
}
341
}
342
}
lib/model/import/class-ai1wm-import-upload.php CHANGED
@@ -25,54 +25,84 @@
25
26
class Ai1wm_Import_Upload {
27
28
- public static function execute( $params ) {
29
-
30
- // Get upload file
31
- if ( ! isset( $_FILES['upload-file'] ) ) {
32
- return $params;
33
}
34
35
- // Set chunk
36
- if ( isset( $params['chunk'] ) ) {
37
- $chunk = (int) $params['chunk'];
38
- } else {
39
- $chunk = 0;
40
}
41
42
- // Set chunks
43
- if ( isset( $params['chunks'] ) ) {
44
- $chunks = (int) $params['chunks'];
45
- } else {
46
- $chunks = 1;
47
}
48
49
- // Has any upload error?
50
- if ( empty( $_FILES['upload-file']['error'] ) ) {
51
52
- // Open partial file
53
- $out = fopen( ai1wm_archive_path( $params ), $chunk === 0 ? 'wb' : 'ab' );
54
- if ( $out ) {
55
56
- // Read binary input stream and append it to temp file
57
- $in = fopen( $_FILES['upload-file']['tmp_name'], 'rb' );
58
- if ( $in ) {
59
- while ( $buff = fread( $in, 4096 ) ) {
60
- fwrite( $out, $buff );
61
- }
62
}
63
-
64
- fclose( $in );
65
- fclose( $out );
66
-
67
- // Remove temporary uploaded file
68
- unlink( $_FILES['upload-file']['tmp_name'] );
69
- } else {
70
- status_header( 500 );
71
- }
72
- } else {
73
- status_header( 500 );
74
}
75
-
76
exit;
77
}
78
}
25
26
class Ai1wm_Import_Upload {
27
28
+ private static function validate() {
29
+ if ( ! array_key_exists( 'upload-file', $_FILES ) || ! is_array( $_FILES['upload-file'] ) ) {
30
+ throw new Ai1wm_Import_Retry_Exception(
31
+ __( 'Missing upload file.', AI1WM_PLUGIN_NAME ),
32
+ 400
33
+ );
34
}
35
36
+ if ( ! array_key_exists( 'error', $_FILES['upload-file'] ) ) {
37
+ throw new Ai1wm_Import_Retry_Exception(
38
+ __( 'Missing error key in upload file.', AI1WM_PLUGIN_NAME ),
39
+ 400
40
+ );
41
}
42
43
+ if ( ! array_key_exists( 'tmp_name', $_FILES['upload-file'] ) ) {
44
+ throw new Ai1wm_Import_Retry_Exception(
45
+ __( 'Missing tmp_name in upload file.', AI1WM_PLUGIN_NAME ),
46
+ 400
47
+ );
48
}
49
+ }
50
51
+ public static function execute( $params ) {
52
+ self::validate();
53
54
+ $error = $_FILES['upload-file']['error'];
55
+ $upload = $_FILES['upload-file']['tmp_name'];
56
+ $archive = ai1wm_archive_path( $params );
57
58
+ switch ( $error ) {
59
+ case UPLOAD_ERR_OK:
60
+ try {
61
+ ai1wm_copy( $upload, $archive );
62
+ ai1wm_unlink( $upload );
63
+ } catch ( Exception $exception ) {
64
+ throw new Ai1wm_Import_Retry_Exception(
65
+ sprintf(
66
+ __( 'Unable to upload the file because %s', AI1WM_PLUGIN_NAME ),
67
+ $exception->getMessage()
68
+ ),
69
+ 400
70
+ );
71
}
72
+ break;
73
+ case UPLOAD_ERR_INI_SIZE:
74
+ case UPLOAD_ERR_FORM_SIZE:
75
+ case UPLOAD_ERR_PARTIAL:
76
+ case UPLOAD_ERR_NO_FILE:
77
+ // File is too large, reduce the size and try again
78
+ throw new Ai1wm_Import_Retry_Exception(
79
+ __( 'The file is too large, retrying with smaller size.', AI1WM_PLUGIN_NAME ),
80
+ 413
81
+ );
82
+ case UPLOAD_ERR_NO_TMP_DIR:
83
+ throw new Ai1wm_Import_Retry_Exception(
84
+ __( 'Missing a temporary folder.', AI1WM_PLUGIN_NAME ),
85
+ 400
86
+ );
87
+ case UPLOAD_ERR_CANT_WRITE:
88
+ throw new Ai1wm_Import_Retry_Exception(
89
+ __( 'Failed to write file to disk.', AI1WM_PLUGIN_NAME ),
90
+ 400
91
+ );
92
+ case UPLOAD_ERR_EXTENSION:
93
+ throw new Ai1wm_Import_Retry_Exception(
94
+ __( 'A PHP extension stopped the file upload.', AI1WM_PLUGIN_NAME ),
95
+ 400
96
+ );
97
+ default:
98
+ throw new Ai1wm_Import_Retry_Exception(
99
+ sprintf(
100
+ __( 'Unrecognized error %s during upload.', AI1WM_PLUGIN_NAME ),
101
+ $error
102
+ ),
103
+ 400
104
+ );
105
}
106
exit;
107
}
108
}
lib/view/assets/css/import.min.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.ai1wm-divider{-ms-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border:none;height:0;background-color:transparent;font-size:14px;font-weight:700;text-align:center;text-transform:uppercase;color:rgba(0,0,0,.8);position:relative;top:0%;left:0%;margin:1rem 2.5rem;height:auto;padding:0;line-height:1}.ai1wm-divider:before,.ai1wm-divider:after{position:absolute;content:" ";z-index:3;width:50%;top:50%;height:0%;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.8)}.ai1wm-divider:before{left:0%;margin-left:-2.5rem}.ai1wm-divider:after{left:auto;right:0%;margin-right:-2.5rem}@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}[class^="ai1wm-icon-"],[class*=" ai1wm-icon-"]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-down{display:inline-block;position:relative;-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg);margin-left:.5em!important}.ai1wm-icon-chevron-down:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-alone{margin:0!important}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:before,.ai1wm-row:after{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message,.ai1wm-right .ai1wm-http-authentication{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{margin:0;padding:0;float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-row,.ai1wm-right{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:before,.ai1wm-container:after{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 #fff;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-replace-row .ai1wm-field-inline{float:left;width:100%}.ai1wm-replace-row .ai1wm-field-inline input{width:100%;font-weight:400;font-size:.8rem;padding:0 10px;height:2.3rem;line-height:2.3rem;margin-bottom:4px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type="text"],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#EFEFEF;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#F2F8F0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#F1D7D7;color:#A95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#D95C5C;border:2px solid #D95C5C;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#D95C5C}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block}.ai1wm-button-group.ai1wm-button-export{width:147px}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:180px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import{width:158px}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:6px 25px 1px 26px;height:22px;line-height:22px;text-decoration:none;color:#27ae60;text-align:left}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{-webkit-transform:translate(11px,-1px);transform:translate(11px,-1px);position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{display:inline-block;width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third,.ai1wm-line-second{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-gray{border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-green{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-green-small{border:2px solid #6eb649;background-color:transparent;color:#6eb649;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue{border:2px solid #00aff0;background-color:transparent;color:#00aff0;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;background-color:transparent;color:#e74c3c;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-alone{border-radius:50px!important;padding:5px 8px!important}.ai1wm-button-blue[disabled="disabled"],.ai1wm-button-green[disabled="disabled"],.ai1wm-button-red[disabled="disabled"],.ai1wm-button-green-small[disabled="disabled"]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled="disabled"]:hover{color:#00aff0}.ai1wm-button-red[disabled="disabled"]:hover{color:#e74c3c}.ai1wm-button-green[disabled="disabled"]:hover{color:#27ae60}.ai1wm-button-blue[disabled="disabled"]:hover,.ai1wm-button-green[disabled="disabled"]:hover,.ai1wm-button-red[disabled="disabled"]:hover,.ai1wm-button-green-small[disabled="disabled"]:hover{background:0 0}.ai1wm-button-gray i,.ai1wm-button-green i,.ai1wm-button-blue i,.ai1wm-button-red i{margin-left:-.5em;margin-right:.2em}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type="radio"].ai1wm-flat-radio-button{display:none}input[type="radio"].ai1wm-flat-radio-button+a i,input[type="radio"].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type="radio"].ai1wm-flat-radio-button:checked+a i,input[type="radio"].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:before,.ai1wm-clear:after{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-list-expanded{display:block!important}.ai1wm-field-inline input{border-radius:5px}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #D6D6D6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-feedback-cancel:active{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:none;color:#333;text-deciration:none}.ai1wm-feedback-types>li>a>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url("../img/logo-128x128.png");background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url("../img/logo-32x32.png")}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 0}.ai1wm-modal-container section p .ai1wm-modal-sites input{width:90%}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-growl-info{position:fixed;z-index:200000;top:0;margin-top:16px;right:16px;width:200px;padding:16px;background:#f1c40f;border:1px solid #e67e22;border-radius:5px;color:#111}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over .ai1wm-drag-drop-area{border-color:#83b4d8}.ai1wm-import-form{position:relative}#ai1wm-import-init{position:absolute;top:10px;left:10%;width:80%;text-align:center}#ai1wm-import-init>p{font-size:18px;color:#9e9e9e}#ai1wm-import-init>p>i{font-size:46px}.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-percent{position:absolute;width:50px;left:50%;-webkit-transform:translate(-24px,0);transform:translate(-24px,0);font-size:.5em;background:0 0}
1
+ @charset "UTF-8";.ai1wm-divider{-ms-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border:none;height:0;background-color:transparent;font-size:14px;font-weight:700;text-align:center;text-transform:uppercase;color:rgba(0,0,0,.8);position:relative;top:0%;left:0%;margin:1rem 2.5rem;height:auto;padding:0;line-height:1}.ai1wm-divider:before,.ai1wm-divider:after{position:absolute;content:" ";z-index:3;width:50%;top:50%;height:0%;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.8)}.ai1wm-divider:before{left:0%;margin-left:-2.5rem}.ai1wm-divider:after{left:auto;right:0%;margin-right:-2.5rem}@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}100%{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-emphasize{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}[class^="ai1wm-icon-"],[class*=" ai1wm-icon-"]{font-family:'servmask';speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-down{display:inline-block;position:relative;-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg);margin-left:.5em!important}.ai1wm-icon-chevron-down:before{content:"\e60d"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-alone{margin:0!important}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:before,.ai1wm-row:after{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message,.ai1wm-right .ai1wm-http-authentication{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{margin:0;padding:0;float:left;font-weight:300;font-size:22px;text-transform:uppercase}.ai1wm-holder h1 i{position:relative;top:2px}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-row,.ai1wm-right{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:before,.ai1wm-container:after{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 #fff;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-replace-row .ai1wm-field-inline{float:left;width:100%}.ai1wm-replace-row .ai1wm-field-inline input{width:100%;font-weight:400;font-size:.8rem;padding:0 10px;height:2.3rem;line-height:2.3rem;margin-bottom:4px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type="text"],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#EFEFEF;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#F2F8F0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#F1D7D7;color:#A95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#D95C5C;border:2px solid #D95C5C;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#D95C5C}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block}.ai1wm-button-group.ai1wm-button-export{width:147px}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:180px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import{width:158px}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:6px 25px 1px 26px;height:22px;line-height:22px;text-decoration:none;color:#27ae60;text-align:left}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{-webkit-transform:translate(11px,-1px);transform:translate(11px,-1px);position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{display:inline-block;width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third,.ai1wm-line-second{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-gray{border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-green{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-green-small{border:2px solid #6eb649;background-color:transparent;color:#6eb649;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue{border:2px solid #00aff0;background-color:transparent;color:#00aff0;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;background-color:transparent;color:#e74c3c;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-alone{border-radius:50px!important;padding:5px 8px!important}.ai1wm-button-blue[disabled="disabled"],.ai1wm-button-green[disabled="disabled"],.ai1wm-button-red[disabled="disabled"],.ai1wm-button-green-small[disabled="disabled"]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled="disabled"]:hover{color:#00aff0}.ai1wm-button-red[disabled="disabled"]:hover{color:#e74c3c}.ai1wm-button-green[disabled="disabled"]:hover{color:#27ae60}.ai1wm-button-blue[disabled="disabled"]:hover,.ai1wm-button-green[disabled="disabled"]:hover,.ai1wm-button-red[disabled="disabled"]:hover,.ai1wm-button-green-small[disabled="disabled"]:hover{background:0 0}.ai1wm-button-gray i,.ai1wm-button-green i,.ai1wm-button-blue i,.ai1wm-button-red i{margin-left:-.5em;margin-right:.2em}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type="radio"].ai1wm-flat-radio-button{display:none}input[type="radio"].ai1wm-flat-radio-button+a i,input[type="radio"].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type="radio"].ai1wm-flat-radio-button:checked+a i,input[type="radio"].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:before,.ai1wm-clear:after{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-list-expanded{display:block!important}.ai1wm-field-inline input{border-radius:5px}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-report-problem{position:relative;float:right}.ai1wm-report-problem-dialog{position:absolute;z-index:999;width:280px;right:0;background-color:#fff;margin:6px 0 0;padding:15px 15px 10px;border:1px solid #D6D6D6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;display:none}.ai1wm-report-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-report-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-feedback-cancel:active{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-report-active{display:block}.ai1wm-report-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-report-terms-segment>.ai1wm-report-terms{border-radius:3px}.ai1wm-no-underline{text-decoration:none}.ai1wm-top-negative-four{top:-4px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:none;color:#333;text-deciration:none}.ai1wm-feedback-types>li>a>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url("../img/logo-128x128.png");background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:none;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url("../img/logo-32x32.png")}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 0}.ai1wm-modal-container section p .ai1wm-modal-sites input{width:90%}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-growl-info{position:fixed;z-index:200000;top:0;margin-top:16px;right:16px;width:200px;padding:16px;background:#f1c40f;border:1px solid #e67e22;border-radius:5px;color:#111}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:20px 0 16px;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable input{display:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file>input{position:absolute;-webkit-transform:translate(-51px,-6px);transform:translate(-51px,-6px);width:158px;height:29px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0}#ai1wm-import-file>input::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}.ai1wm-import-form{position:relative}#ai1wm-import-init{position:absolute;top:10px;left:10%;width:80%;text-align:center}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all}.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-percent{position:absolute;width:50px;left:50%;-webkit-transform:translate(-24px,0);transform:translate(-24px,0);font-size:.5em;background:0 0}
lib/view/assets/javascript/backups.min.js CHANGED
@@ -1 +1,994 @@
1
- !function e(a,t,i){function o(s,r){if(!t[s]){if(!a[s]){var p="function"==typeof require&&require;if(!r&&p)return p(s,!0);if(n)return n(s,!0);throw new Error("Cannot find module '"+s+"'")}var c=t[s]={exports:{}};a[s][0].call(c.exports,function(e){var t=a[s][1][e];return o(t?t:e)},c,c.exports,e,a,t,i)}return t[s].exports}for(var n="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e){var a=(e("./servmask/report"),e("./servmask/feedback"),e("./servmask/util")),t=e("./import/import");jQuery(document).ready(function(e){"use strict";e(".ai1wm-backup-actions > a").hover(function(){e(this).addClass("ai1wm-button-on")},function(){e(this).removeClass("ai1wm-button-on")}),e(".ai1wm-backup-delete").click(function(a){var t=e(this);confirm("Are you sure you want to delete this file?")&&e.ajax({type:"POST",url:ai1wm_backups.ajax.url,data:{archive:t.data("archive")},success:function(a){var i=a.errors;0===i.length&&(t.closest("tr").remove(),0===e(".ai1wm-backups tbody tr").length&&(e(".ai1wm-backups").addClass("ai1wm-hide"),e(".ai1wm-backups-empty").removeClass("ai1wm-hide")))},dataType:"json"}),a.preventDefault()});var i=new t;e(".ai1wm-backup-restore").click(function(t){var o=a.random(12),n=e(this).data("archive");i.setParams([{name:"storage",value:o},{name:"archive",value:n},{name:"backups",value:1}]),i.start(),t.preventDefault()})})},{"./import/import":2,"./servmask/feedback":4,"./servmask/report":5,"./servmask/util":6}],2:[function(e,a){var t=e("../servmask/util"),i=e("./modal"),o=jQuery,n=function(){var e=this;this.params=[],this.modal=new i,this.modal.onConfirm=function(a){e.onConfirm(a)},this.modal.onBlogs=function(a){e.onBlogs(a)},this.modal.onStop=function(a){e.onStop(a)}};n.prototype.setParams=function(e){this.params=t.list(e)},n.prototype.start=function(e){var a=this;o(window).bind("beforeunload",function(){return"You are about to stop importing your website, are you sure?"}),this.stop=!1,this.setStatus({type:"info",message:"Preparing to import..."});var i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){a.getStatus()}).fail(function(){a.setStatus({type:"error",message:"Unable to start the import. Refresh the page and try again"})})},n.prototype.confirm=function(e){var a=this,i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:150});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){a.getStatus(ai1wm_import.status.php)}).fail(function(){a.setStatus({type:"error",message:"Unable to confirm the import. Refresh the page and try again"})})},n.prototype.blogs=function(e){var a=this,i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:150});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){a.getStatus(ai1wm_import.status.php)}).fail(function(){a.setStatus({type:"error",message:"Unable to prepare blogs the import. Refresh the page and try again"})})},n.prototype.clean=function(e){var a=this;this.stop=!0;var i=this.params.concat({name:"secret_key",value:ai1wm_import.secret_key}).concat({name:"priority",value:400});e&&(i=i.concat(t.list(e))),o.post(ai1wm_import.ajax.url,i).done(function(){o(window).unbind("beforeunload")}).fail(function(){a.setStatus({type:"error",message:"Unable to clean the import. Refresh the page and try again"})})},n.prototype.getStatus=function(e,a){var t=this,a=a||0;this.stop||o.ajax({cache:!1,url:e,dataType:"json"}).done(function(i){if(i)switch(t.setStatus(i),i.type){case"done":case"error":return o(window).unbind("beforeunload"),void 0;case"confirm":case"blogs":return}setTimeout(function(){t.getStatus(e,a)},3e3)}).fail(function(){a++,a>=6?t.setStatus({type:"error",message:"Unable to retrieve status of the import. Is your server running?"}):a>=3?t.getStatus(ai1wm_import.status.js,a):t.getStatus(ai1wm_import.status.php,a)})},n.prototype.setStatus=function(e){this.modal.render(e)},n.prototype.onConfirm=function(e){this.confirm(e)},n.prototype.onBlogs=function(e){this.blogs(e)},n.prototype.onStop=function(e){this.clean(e)},a.exports=n},{"../servmask/util":6,"./modal":3}],3:[function(e,a){var t=jQuery,i=function(){var e=this;this.error=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t("<span></span>").addClass("ai1wm-title-red").text("Unable to import"),c=t('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.progress=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=(t("<p></p>"),t("<div></div>")),r=t('<span class="ai1wm-progress-bar"></span>'),p=t('<span class="ai1wm-progress-bar-meter"></span>').width(a.percent+"%"),c=t('<span class="ai1wm-progress-bar-percent">0%</span>').text(a.percent+"%"),m=t('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on("click",function(){t(this).attr("disabled","disabled"),e.onStop(),e.modal.hide(),e.overlay.hide()});r.append(p).append(c),s.append(m),n.append(r),o.append(n),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.confirm=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t('<span class="ai1wm-icon-notification"></span>'),c=t('<button class="ai1wm-button-green">Continue</button>').on("click",function(){t(this).attr("disabled","disabled"),e.onConfirm()});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.blogs=function(a){var i=t("<form></form>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t("<span></span>").addClass("ai1wm-title-grey").text("Update subsite name"),c=t('<button class="ai1wm-button-green">Continue</button>').on("click",function(){t(this).attr("disabled","disabled"),e.onBlogs(t(this).closest("form").serializeArray())});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.info=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t('<span class="ai1wm-loader"></span>'),c=t('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr("disabled","disabled");r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.done=function(a){var i=t("<div></div>"),o=t("<section></section>"),n=t("<h1></h1>"),s=t("<p></p>").html(a.message),r=t("<div></div>"),p=t("<span></span>").addClass("ai1wm-title-green").text(a.title),c=t('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});r.append(c),n.append(p),o.append(n).append(s),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.overlay=t('<div class="ai1wm-overlay"></div>'),this.modal=t('<div class="ai1wm-modal-container"></div>'),t("body").append(this.overlay).append(this.modal)};i.prototype.render=function(e){switch(e.type){case"error":this.error(e);break;case"confirm":this.confirm(e);break;case"blogs":this.blogs(e);break;case"progress":this.progress(e);break;case"info":this.info(e);break;case"done":this.done(e)}},a.exports=i},{}],4:[function(){jQuery(document).ready(function(e){"use strict";e(".ai1wm-feedback-type").attr("checked",!1),e("#ai1wm-feedback-type-link-1").click(function(a){var t=e("#ai1wm-feedback-type-1");t.is(":checked")?(t.attr("checked",!1),a.preventDefault()):t.attr("checked",!0)}),e("#ai1wm-feedback-type-2").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-3").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","Leave plugin developers any feedback here"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-type-3").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-2").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","How may we help you?"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-cancel").click(function(a){e(".ai1wm-feedback-form").fadeOut(function(){e(".ai1wm-feedback-type").attr("checked",!1).closest("li").show()}),a.preventDefault()}),e("#ai1wm-feedback-submit").click(function(){var a=e(".ai1wm-feedback-type:checked").val(),t=e(".ai1wm-feedback-email").val(),i=e(".ai1wm-feedback-message").val(),o=e(".ai1wm-feedback-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_feedback.ajax.url,data:{"ai1wm-type":a,"ai1wm-email":t,"ai1wm-message":i,"ai1wm-terms":+o},success:function(a){var t=a.errors;if(t.length>0){e(".ai1wm-feedback .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(t,function(e,a){i.append("<p>"+a+"</p>")}),e(".ai1wm-feedback").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your feedback!</p>");e(".ai1wm-feedback").html(o)}},dataType:"json",async:!1})})})},{}],5:[function(){jQuery(document).ready(function(e){"use strict";e("#ai1wm-report-problem-button").click(function(a){e(this).next(".ai1wm-report-problem-dialog").toggleClass("ai1wm-report-active"),a.preventDefault()}),e("#ai1wm-report-cancel").click(function(a){e(this).closest(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active"),a.preventDefault()}),e("#ai1wm-report-submit").click(function(){var a=e(".ai1wm-report-email").val(),t=e(".ai1wm-report-message").val(),i=e(".ai1wm-report-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_report.ajax.url,data:{"ai1wm-email":a,"ai1wm-message":t,"ai1wm-terms":+i},success:function(a){var t=a.errors;if(t.length>0){e(".ai1wm-report-problem-dialog .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(t,function(e,a){i.append("<p>"+a+"</p>")}),e(".ai1wm-report-problem-dialog").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your request!</p>");e(".ai1wm-report-problem-dialog").html(o),setTimeout(function(){e(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active")},2e3)}},dataType:"json",async:!1})})})},{}],6:[function(e,a){var t=jQuery;a.exports={random:function(e){for(var a="",t="abcdefghijklmnopqrstuvwxyz0123456789",i=0;e>i;i++)a+=t.charAt(Math.floor(Math.random()*t.length));return a},form:function(e){return t(e).serializeArray()},ucfirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},list:function(e){if(t.isPlainObject(e)){var a=[],i=decodeURIComponent(t.param(e)).split("&");return t.each(i,function(e,t){var i=t.split("=");a.push({name:i[0],value:i[1]})}),a}return e}}},{}]},{},[1]);
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = {};
4
+
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__(moduleId) {
7
+
8
+ /******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId])
10
+ /******/ return installedModules[moduleId].exports;
11
+
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules[moduleId] = {
14
+ /******/ exports: {},
15
+ /******/ id: moduleId,
16
+ /******/ loaded: false
17
+ /******/ };
18
+
19
+ /******/ // Execute the module function
20
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+
22
+ /******/ // Flag the module as loaded
23
+ /******/ module.loaded = true;
24
+
25
+ /******/ // Return the exports of the module
26
+ /******/ return module.exports;
27
+ /******/ }
28
+
29
+
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__.m = modules;
32
+
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__.c = installedModules;
35
+
36
+ /******/ // __webpack_public_path__
37
+ /******/ __webpack_require__.p = "";
38
+
39
+ /******/ // Load entry module and return exports
40
+ /******/ return __webpack_require__(0);
41
+ /******/ })
42
+ /************************************************************************/
43
+ /******/ ([
44
+ /* 0 */
45
+ /***/ function(module, exports, __webpack_require__) {
46
+
47
+ 'use strict';
48
+
49
+ /**
50
+ * Copyright (C) 2014-2016 ServMask Inc.
51
+ *
52
+ * This program is free software: you can redistribute it and/or modify
53
+ * it under the terms of the GNU General Public License as published by
54
+ * the Free Software Foundation, either version 3 of the License, or
55
+ * (at your option) any later version.
56
+ *
57
+ * This program is distributed in the hope that it will be useful,
58
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
59
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60
+ * GNU General Public License for more details.
61
+ *
62
+ * You should have received a copy of the GNU General Public License
63
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
64
+ *
65
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
66
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
67
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
68
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
69
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
70
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
71
+ */
72
+
73
+ var Report = __webpack_require__(1),
74
+ Feedback = __webpack_require__(2),
75
+ Util = __webpack_require__(3),
76
+ Import = __webpack_require__(4);
77
+
78
+ jQuery(document).ready(function ($) {
79
+ 'use strict';
80
+
81
+ $('.ai1wm-backup-actions > a').hover(function () {
82
+ $(this).addClass('ai1wm-button-on');
83
+ }, function () {
84
+ $(this).removeClass('ai1wm-button-on');
85
+ });
86
+
87
+ // Delete file
88
+ $('.ai1wm-backup-delete').click(function (e) {
89
+ var self = $(this);
90
+
91
+ // Delete file
92
+ if (confirm('Are you sure you want to delete this file?')) {
93
+ $.ajax({
94
+ type: 'POST',
95
+ url: ai1wm_backups.ajax.url,
96
+ data: { 'archive': self.data('archive') },
97
+ success: function success(result) {
98
+ var errors = result.errors;
99
+ if (errors.length === 0) {
100
+ self.closest('tr').remove();
101
+ if ($('.ai1wm-backups tbody tr').length === 0) {
102
+ $('.ai1wm-backups').addClass('ai1wm-hide');
103
+ $('.ai1wm-backups-empty').removeClass('ai1wm-hide');
104
+ }
105
+ }
106
+ },
107
+ dataType: 'json'
108
+ });
109
+ }
110
+
111
+ e.preventDefault();
112
+ });
113
+
114
+ var model = new Import();
115
+
116
+ // Restore from file
117
+ $('.ai1wm-backup-restore').click(function (e) {
118
+ var storage = Util.random(12);
119
+ var archive = $(this).data('archive');
120
+
121
+ // Set global params
122
+ model.setParams([{ name: 'storage', value: storage }, { name: 'archive', value: archive }, { name: 'backups', value: 1 }]);
123
+
124
+ // Start import
125
+ model.start();
126
+
127
+ e.preventDefault();
128
+ });
129
+ });
130
+
131
+ /***/ },
132
+ /* 1 */
133
+ /***/ function(module, exports) {
134
+
135
+ 'use strict';
136
+
137
+ /**
138
+ * Copyright (C) 2014-2016 ServMask Inc.
139
+ *
140
+ * This program is free software: you can redistribute it and/or modify
141
+ * it under the terms of the GNU General Public License as published by
142
+ * the Free Software Foundation, either version 3 of the License, or
143
+ * (at your option) any later version.
144
+ *
145
+ * This program is distributed in the hope that it will be useful,
146
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
147
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
148
+ * GNU General Public License for more details.
149
+ *
150
+ * You should have received a copy of the GNU General Public License
151
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
152
+ *
153
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
154
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
155
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
156
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
157
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
158
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
159
+ */
160
+
161
+ jQuery(document).ready(function ($) {
162
+ 'use strict';
163
+
164
+ $('#ai1wm-report-problem-button').click(function (e) {
165
+ $(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
166
+
167
+ e.preventDefault();
168
+ });
169
+
170
+ $('#ai1wm-report-cancel').click(function (e) {
171
+ $(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
172
+
173
+ e.preventDefault();
174
+ });
175
+
176
+ $('#ai1wm-report-submit').click(function () {
177
+ var email = $('.ai1wm-report-email').val();
178
+ var message = $('.ai1wm-report-message').val();
179
+ var terms = $('.ai1wm-report-terms').is(':checked');
180
+
181
+ $.ajax({
182
+ type: 'POST',
183
+ url: ai1wm_report.ajax.url,
184
+ data: { 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
185
+ success: function success(data) {
186
+ var errors = data.errors;
187
+ if (errors.length > 0) {
188
+ // Reset previous messages
189
+ $('.ai1wm-report-problem-dialog .ai1wm-message').remove();
190
+
191
+ var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
192
+ $.each(errors, function (key, value) {
193
+ content.append('<p>' + value + '</p>');
194
+ });
195
+
196
+ $('.ai1wm-report-problem-dialog').prepend(content);
197
+ } else {
198
+ var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
199
+ $('.ai1wm-report-problem-dialog').html(_content);
200
+
201
+ // Hide message
202
+ setTimeout(function () {
203
+ $('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
204
+ }, 2000);
205
+ }
206
+ },
207
+ dataType: 'json',
208
+ async: false
209
+ });
210
+ });
211
+ });
212
+
213
+ /***/ },
214
+ /* 2 */
215
+ /***/ function(module, exports) {
216
+
217
+ 'use strict';
218
+
219
+ /**
220
+ * Copyright (C) 2014-2016 ServMask Inc.
221
+ *
222
+ * This program is free software: you can redistribute it and/or modify
223
+ * it under the terms of the GNU General Public License as published by
224
+ * the Free Software Foundation, either version 3 of the License, or
225
+ * (at your option) any later version.
226
+ *
227
+ * This program is distributed in the hope that it will be useful,
228
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
229
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
230
+ * GNU General Public License for more details.
231
+ *
232
+ * You should have received a copy of the GNU General Public License
233
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
234
+ *
235
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
236
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
237
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
238
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
239
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
240
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
241
+ */
242
+
243
+ jQuery(document).ready(function ($) {
244
+ 'use strict';
245
+
246
+ // Reset feedback form
247
+
248
+ $('.ai1wm-feedback-type').attr('checked', false);
249
+
250
+ // Review
251
+ $('#ai1wm-feedback-type-link-1').click(function (e) {
252
+ var radio = $('#ai1wm-feedback-type-1');
253
+ if (radio.is(':checked')) {
254
+ radio.attr('checked', false);
255
+ e.preventDefault();
256
+ } else {
257
+ radio.attr('checked', true);
258
+ }
259
+ });
260
+
261
+ // Improvement
262
+ $('#ai1wm-feedback-type-2').click(function () {
263
+ // Hide other options
264
+ $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
265
+
266
+ // change placeholder message
267
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
268
+
269
+ // Show feedback form
270
+ $('.ai1wm-feedback-form').fadeIn();
271
+ });
272
+
273
+ // Help
274
+ $('#ai1wm-feedback-type-3').click(function () {
275
+ // Hide other options
276
+ $('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
277
+
278
+ // change placeholder message
279
+ $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
280
+
281
+ // Show feedback form
282
+ $('.ai1wm-feedback-form').fadeIn();
283
+ });
284
+
285
+ // Cancel feedback form
286
+ $('#ai1wm-feedback-cancel').click(function (e) {
287
+ $('.ai1wm-feedback-form').fadeOut(function () {
288
+ $('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
289
+ });
290
+ e.preventDefault();
291
+ });
292
+
293
+ // Send feedback form
294
+ $('#ai1wm-feedback-submit').click(function () {
295
+ var type = $('.ai1wm-feedback-type:checked').val();
296
+ var email = $('.ai1wm-feedback-email').val();
297
+ var message = $('.ai1wm-feedback-message').val();
298
+ var terms = $('.ai1wm-feedback-terms').is(':checked');
299
+
300
+ $.ajax({
301
+ type: 'POST',
302
+ url: ai1wm_feedback.ajax.url,
303
+ data: { 'ai1wm-type': type, 'ai1wm-email': email, 'ai1wm-message': message, 'ai1wm-terms': +terms },
304
+ success: function success(data) {
305
+ var errors = data.errors;
306
+ if (errors.length > 0) {
307
+ // Reset previous messages
308
+ $('.ai1wm-feedback .ai1wm-message').remove();
309
+
310
+ var content = $('<div />').addClass('ai1wm-message ai1wm-error-message');
311
+ $.each(errors, function (key, value) {
312
+ content.append('<p>' + value + '</p>');
313
+ });
314
+
315
+ $('.ai1wm-feedback').prepend(content);
316
+ } else {
317
+ var _content = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
318
+ $('.ai1wm-feedback').html(_content);
319
+ }
320
+ },
321
+ dataType: 'json',
322
+ async: false
323
+ });
324
+ });
325
+ });
326
+
327
+ /***/ },
328
+ /* 3 */
329
+ /***/ function(module, exports) {
330
+
331
+ 'use strict';
332
+
333
+ /**
334
+ * Copyright (C) 2014-2016 ServMask Inc.
335
+ *
336
+ * This program is free software: you can redistribute it and/or modify
337
+ * it under the terms of the GNU General Public License as published by
338
+ * the Free Software Foundation, either version 3 of the License, or
339
+ * (at your option) any later version.
340
+ *
341
+ * This program is distributed in the hope that it will be useful,
342
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
343
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
344
+ * GNU General Public License for more details.
345
+ *
346
+ * You should have received a copy of the GNU General Public License
347
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
348
+ *
349
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
350
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
351
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
352
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
353
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
354
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
355
+ */
356
+
357
+ var $ = jQuery;
358
+
359
+ module.exports = {
360
+ random: function random(len) {
361
+ var text = '';
362
+ var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
363
+
364
+ for (var i = 0; i < len; i++) {
365
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
366
+ }
367
+
368
+ return text;
369
+ },
370
+ form: function form(id) {
371
+ return $(id).serializeArray();
372
+ },
373
+ ucfirst: function ucfirst(text) {
374
+ return text.charAt(0).toUpperCase() + text.slice(1);
375
+ },
376
+ list: function list(input) {
377
+ // Convert object to list
378
+ if ($.isPlainObject(input)) {
379
+ var result = [];
380
+ var params = decodeURIComponent($.param(input)).split('&');
381
+
382
+ // Loop over params
383
+ $.each(params, function (index, item) {
384
+ var value = item.split('=');
385
+
386
+ // Add item
387
+ result.push({ name: value[0], value: value[1] });
388
+ });
389
+
390
+ return result;
391
+ }
392
+
393
+ return input;
394
+ }
395
+ };
396
+
397
+ /***/ },
398
+ /* 4 */
399
+ /***/ function(module, exports, __webpack_require__) {
400
+
401
+ 'use strict';
402
+
403
+ /**
404
+ * Copyright (C) 2014-2016 ServMask Inc.
405
+ *
406
+ * This program is free software: you can redistribute it and/or modify
407
+ * it under the terms of the GNU General Public License as published by
408
+ * the Free Software Foundation, either version 3 of the License, or
409
+ * (at your option) any later version.
410
+ *
411
+ * This program is distributed in the hope that it will be useful,
412
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
413
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
414
+ * GNU General Public License for more details.
415
+ *
416
+ * You should have received a copy of the GNU General Public License
417
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
418
+ *
419
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
420
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
421
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
422
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
423
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
424
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
425
+ */
426
+
427
+ var Util = __webpack_require__(3),
428
+ Modal = __webpack_require__(5),
429
+ $ = jQuery;
430
+
431
+ var Import = function Import() {
432
+ var self = this;
433
+
434
+ // Set params
435
+ this.params = [];
436
+
437
+ // Set modal
438
+ this.modal = new Modal();
439
+
440
+ // Set confirm listener
441
+ this.modal.onConfirm = function (options) {
442
+ self.onConfirm(options);
443
+ };
444
+
445
+ // Set blogs listener
446
+ this.modal.onBlogs = function (options) {
447
+ self.onBlogs(options);
448
+ };
449
+
450
+ // Set stop listener
451
+ this.modal.onStop = function (options) {
452
+ self.onStop(options);
453
+ };
454
+ };
455
+
456
+ Import.prototype.setParams = function (params) {
457
+ this.params = Util.list(params);
458
+ };
459
+
460
+ Import.prototype.start = function (options) {
461
+ var self = this;
462
+
463
+ // Initializing beforeunload event
464
+ $(window).bind('beforeunload', function () {
465
+ return 'You are about to stop importing your website, are you sure?';
466
+ });
467
+
468
+ // Set stop
469
+ this.stop = false;
470
+
471
+ // Set initial status
472
+ this.setStatus({ type: 'info', message: 'Preparing to import...' });
473
+
474
+ // Set params
475
+ var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
476
+
477
+ // Set additional params
478
+ if (options) {
479
+ params = params.concat(Util.list(options));
480
+ }
481
+
482
+ // Import
483
+ $.post(ai1wm_import.ajax.url, params).done(function () {
484
+ self.getStatus();
485
+ }).fail(function () {
486
+ self.setStatus({
487
+ type: 'error',
488
+ message: 'Unable to start the import. Refresh the page and try again'
489
+ });
490
+ });
491
+ };
492
+
493
+ Import.prototype.confirm = function (options) {
494
+ var self = this;
495
+
496
+ // Set params
497
+ var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
498
+
499
+ // Set additional params
500
+ if (options) {
501
+ params = params.concat(Util.list(options));
502
+ }
503
+
504
+ // Confirm
505
+ $.post(ai1wm_import.ajax.url, params).done(function () {
506
+ self.getStatus(ai1wm_import.status.php);
507
+ }).fail(function () {
508
+ self.setStatus({
509
+ type: 'error',
510
+ message: 'Unable to confirm the import. Refresh the page and try again'
511
+ });
512
+ });
513
+ };
514
+
515
+ Import.prototype.blogs = function (options) {
516
+ var self = this;
517
+
518
+ // Set params
519
+ var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
520
+
521
+ // Set additional params
522
+ if (options) {
523
+ params = params.concat(Util.list(options));
524
+ }
525
+
526
+ // Blogs
527
+ $.post(ai1wm_import.ajax.url, params).done(function () {
528
+ self.getStatus(ai1wm_import.status.php);
529
+ }).fail(function () {
530
+ self.setStatus({
531
+ type: 'error',
532
+ message: 'Unable to prepare blogs the import. Refresh the page and try again'
533
+ });
534
+ });
535
+ };
536
+
537
+ Import.prototype.clean = function (options) {
538
+ var self = this;
539
+
540
+ // Set stop
541
+ this.stop = true;
542
+
543
+ // Set params
544
+ var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
545
+
546
+ // Set additional params
547
+ if (options) {
548
+ params = params.concat(Util.list(options));
549
+ }
550
+
551
+ // Clean
552
+ $.post(ai1wm_import.ajax.url, params).done(function () {
553
+ // Unbinding the beforeunload event when we stop importing
554
+ $(window).unbind('beforeunload');
555
+ }).fail(function () {
556
+ self.setStatus({
557
+ type: 'error',
558
+ message: 'Unable to clean the import. Refresh the page and try again'
559
+ });
560
+ });
561
+ };
562
+
563
+ Import.prototype.getStatus = function (url, retry) {
564
+ var self = this,
565
+ retry = retry || 0;
566
+
567
+ // Stop getting status
568
+ if (this.stop) {
569
+ return;
570
+ }
571
+
572
+ $.ajax({
573
+ cache: false,
574
+ url: url,
575
+ dataType: 'json'
576
+ }).done(function (params) {
577
+ if (params) {
578
+ self.setStatus(params);
579
+
580
+ // Next status
581
+ switch (params.type) {
582
+ case 'done':
583
+ case 'error':
584
+ // Unbinding the beforeunload event when any case is performed
585
+ $(window).unbind('beforeunload');
586
+ return;
587
+
588
+ case 'confirm':
589
+ case 'blogs':
590
+ return;
591
+ }
592
+ }
593
+
594
+ // Import is not done yet, let's check status in 3 seconds
595
+ setTimeout(function () {
596
+ self.getStatus(url, retry);
597
+ }, 3000);
598
+ }).fail(function () {
599
+ retry++;
600
+
601
+ // Retry 6 times
602
+ if (retry >= 6) {
603
+ self.setStatus({
604
+ type: 'error',
605
+ message: 'Unable to retrieve status of the import. Is your server running?'
606
+ });
607
+ } else if (retry >= 3) {
608
+ self.getStatus(ai1wm_import.status.js, retry);
609
+ } else {
610
+ self.getStatus(ai1wm_import.status.php, retry);
611
+ }
612
+ });;
613
+ };
614
+
615
+ Import.prototype.setStatus = function (params) {
616
+ this.modal.render(params);
617
+ };
618
+
619
+ Import.prototype.onConfirm = function (options) {
620
+ this.confirm(options);
621
+ };
622
+
623
+ Import.prototype.onBlogs = function (options) {
624
+ this.blogs(options);
625
+ };
626
+
627
+ Import.prototype.onStop = function (options) {
628
+ this.clean(options);
629
+ };
630
+
631
+ module.exports = Import;
632
+
633
+ /***/ },
634
+ /* 5 */
635
+ /***/ function(module, exports) {
636
+
637
+ 'use strict';
638
+
639
+ /**
640
+ * Copyright (C) 2014-2016 ServMask Inc.
641
+ *
642
+ * This program is free software: you can redistribute it and/or modify
643
+ * it under the terms of the GNU General Public License as published by
644
+ * the Free Software Foundation, either version 3 of the License, or
645
+ * (at your option) any later version.
646
+ *
647
+ * This program is distributed in the hope that it will be useful,
648
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
649
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
650
+ * GNU General Public License for more details.
651
+ *
652
+ * You should have received a copy of the GNU General Public License
653
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
654
+ *
655
+ * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
656
+ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
657
+ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
658
+ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
659
+ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
660
+ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
661
+ */
662
+
663
+ var $ = jQuery;
664
+
665
+ var Modal = function Modal() {
666
+ var self = this;
667
+ this.view = null;
668
+
669
+ // Error Modal
670
+ this.error = function (params) {
671
+
672
+ // Create the modal container
673
+ var container = $('<div></div>');
674
+
675
+ // Create section to hold title, message and action
676
+ var section = $('<section></section>');
677
+
678
+ // Create header to hold title
679
+ var header = $('<h1></h1>');
680
+
681
+ // Create paragraph to hold mesage
682
+ var message = $('<p></p>').html(params.message);
683
+
684
+ // Create action section
685
+ var action = $('<div></div>');
686
+
687
+ // Create title
688
+ var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to import');
689
+
690
+ // Create close button
691
+ var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
692
+ self.modal.hide();
693
+ self.overlay.hide();
694
+ });
695
+
696
+ // Append close button
697
+ action.append(closeButton);
698
+
699
+ // Append title to section
700
+ header.append(title);
701
+
702
+ // Append header and message to section
703
+ section.append(header).append(message);
704
+
705
+ // Append section and action to container
706
+ container.append(section).append(action);
707
+
708
+ // Render modal
709
+ self.modal.html(container).show();
710
+ self.overlay.show();
711
+ };
712
+
713
+ // Progress Modal
714
+ this.progress = function (params) {
715
+ if (this.view === 'progress') {
716
+ // Update progressBarMeter
717
+ this.progress.progressBarMeter.width(params.percent + '%');
718
+
719
+ // Update progressBarPercent
720
+ this.progress.progressBarPercent.text(params.percent + '%');
721
+ } else {
722
+
723
+ // Create the modal container
724
+ var container = $('<div></div>');
725
+
726
+ // Create section to hold title, message and action
727
+ var section = $('<section></section>');
728
+
729
+ // Create header to hold progress bar
730
+ var header = $('<h1></h1>');
731
+
732
+ // Create paragraph to hold mesage
733
+ var message = $('<p></p>');
734
+
735
+ // Create action section
736
+ var action = $('<div></div>');
737
+
738
+ // Create progressBar
739
+ var progressBar = $('<span class="ai1wm-progress-bar"></span>');
740
+
741
+ // Create progressBarMeter
742
+ this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
743
+
744
+ // Create progressBarPercent
745
+ this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
746
+
747
+ // Create stop import
748
+ var stopButton = $('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
749
+ $(this).attr('disabled', 'disabled');
750
+ self.onStop();
751
+ self.modal.hide();
752
+ self.overlay.hide();
753
+ });
754
+
755
+ // Append progress meter and progress percent
756
+ progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
757
+
758
+ // Append stop button
759
+ action.append(stopButton);
760
+
761
+ // Append progress bar to section
762
+ header.append(progressBar);
763
+
764
+ // Append header to section
765
+ section.append(header);
766
+
767
+ // Append section and action to container
768
+ container.append(section).append(action);
769
+
770
+ // Render modal
771
+ self.modal.html(container).show();
772
+ self.overlay.show();
773
+ }
774
+ };
775
+
776
+ // Confirm Modal
777
+ this.confirm = function (params) {
778
+
779
+ // Create the modal container
780
+ var container = $('<div></div>');
781
+
782
+ // Create section to hold title, message and action
783
+ var section = $('<section></section>');
784
+
785
+ // Create header to hold warning
786
+ var header = $('<h1></h1>');
787
+
788
+ // Create paragraph to hold mesage
789
+ var message = $('<p></p>').html(params.message);
790
+
791
+ // Create action section
792
+ var action = $('<div></div>');
793
+
794
+ // Create warning
795
+ var warning = $('<span class="ai1wm-icon-notification"></span>');
796
+
797
+ // Create confirm button
798
+ var confirmButton = $('<button class="ai1wm-button-green">Continue</button>').on('click', function () {
799
+ $(this).attr('disabled', 'disabled');
800
+ self.onConfirm();
801
+ });
802
+
803
+ // Append confirm button
804
+ action.append(confirmButton);
805
+
806
+ // Append warning to section
807
+ header.append(warning);
808
+
809
+ // Append header and message to section
810
+ section.append(header).append(message);
811
+
812
+ // Append section and action to container
813
+ container.append(section).append(action);
814
+
815
+ // Render modal
816
+ self.modal.html(container).show();
817
+ self.overlay.show();
818
+ };
819
+
820
+ // Blogs Modal
821
+ this.blogs = function (params) {
822
+
823
+ // Create the modal container
824
+ var container = $('<form></form>');
825
+
826
+ // Create section to hold title, message and action
827
+ var section = $('<section></section>');
828
+
829
+ // Create header to hold title
830
+ var header = $('<h1></h1>');
831
+
832
+ // Create paragraph to hold mesage
833
+ var message = $('<p></p>').html(params.message);
834
+
835
+ // Create action section
836
+ var action = $('<div></div>');
837
+
838
+ // Create title
839
+ var title = $('<span></span>').addClass('ai1wm-title-grey').text('Update subsite name');
840
+
841
+ // Create continue button
842
+ var continueButton = $('<button class="ai1wm-button-green">Continue</button>').on('click', function () {
843
+ $(this).attr('disabled', 'disabled');
844
+ self.onBlogs($(this).closest('form').serializeArray());
845
+ });
846
+
847
+ // Append continue button
848
+ action.append(continueButton);
849
+
850
+ // Append title to section
851
+ header.append(title);
852
+
853
+ // Append header and message to section
854
+ section.append(header).append(message);
855
+
856
+ // Append section and action to container
857
+ container.append(section).append(action);
858
+
859
+ // Render modal
860
+ self.modal.html(container).show();
861
+ self.overlay.show();
862
+ };
863
+
864
+ // Info Modal
865
+ this.info = function (params) {
866
+
867
+ // Create the modal container
868
+ var container = $('<div></div>');
869
+
870
+ // Create section to hold title, message and action
871
+ var section = $('<section></section>');
872
+
873
+ // Create header to hold loader
874
+ var header = $('<h1></h1>');
875
+
876
+ // Create paragraph to hold mesage
877
+ var message = $('<p></p>').html(params.message);
878
+
879
+ // Create action section
880
+ var action = $('<div></div>');
881
+
882
+ // Create loader
883
+ var loader = $('<span class="ai1wm-loader"></span>');
884
+
885
+ // Create stop import
886
+ var stopButton = $('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr('disabled', 'disabled');
887
+
888
+ // Append stop button
889
+ action.append(stopButton);
890
+
891
+ // Append loader to header
892
+ header.append(loader);
893
+
894
+ // Append header and message to section
895
+ section.append(header).append(message);
896
+
897
+ // Append section and action to container
898
+ container.append(section).append(action);
899
+
900
+ // Render modal
901
+ self.modal.html(container).show();
902
+ self.overlay.show();
903
+ };
904
+
905
+ // Done Modal
906
+ this.done = function (params) {
907
+
908
+ // Create the modal container
909
+ var container = $('<div></div>');
910
+
911
+ // Create section to hold title, message and action
912
+ var section = $('<section></section>');
913
+
914
+ // Create header to hold title
915
+ var header = $('<h1></h1>');
916
+
917
+ // Create paragraph to hold mesage
918
+ var message = $('<p></p>').html(params.message);
919
+
920
+ // Create action section
921
+ var action = $('<div></div>');
922
+
923
+ // Create title
924
+ var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
925
+
926
+ // Create close button
927
+ var closeButton = $('<button class="ai1wm-button-red">Close</button>').on('click', function () {
928
+ self.modal.hide();
929
+ self.overlay.hide();
930
+ });
931
+
932
+ // Append close button
933
+ action.append(closeButton);
934
+
935
+ // Append title to section
936
+ header.append(title);
937
+
938
+ // Append header and message to section
939
+ section.append(header).append(message);
940
+
941
+ // Append section and action to container
942
+ container.append(section).append(action);
943
+
944
+ // Render modal
945
+ self.modal.html(container).show();
946
+ self.overlay.show();
947
+ };
948
+
949
+ // Create the overlay
950
+ this.overlay = $('<div class="ai1wm-overlay"></div>');
951
+
952
+ // Create the modal container
953
+ this.modal = $('<div class="ai1wm-modal-container"></div>');
954
+
955
+ $('body').append(this.overlay) // Append overlay to body
956
+ .append(this.modal); // Append modal to body
957
+ };
958
+
959
+ Modal.prototype.render = function (params) {
960
+
961
+ // Show modal
962
+ switch (params.type) {
963
+ case 'error':
964
+ this.error(params);
965
+ break;
966
+
967
+ case 'confirm':
968
+ this.confirm(params);
969
+ break;
970
+
971
+ case 'blogs':
972
+ this.blogs(params);
973
+ break;
974
+
975
+ case 'progress':
976
+ this.progress(params);
977
+ break;
978
+
979
+ case 'info':
980
+ this.info(params);
981
+ break;
982
+
983
+ case 'done':
984
+ this.done(params);
985
+ break;
986
+ }
987
+
988
+ this.view = params.type;
989
+ };
990
+
991
+ module.exports = Modal;
992
+
993
+ /***/ }
994
+ /******/ ]);
lib/view/assets/javascript/export.min.js CHANGED
@@ -1 +1,1049 @@
1
- !function e(t,a,i){function o(r,s){if(!a[r]){if(!t[r]){var c="function"==typeof require&&require;if(!s&&c)return c(r,!0);if(n)return n(r,!0);throw new Error("Cannot find module '"+r+"'")}var p=a[r]={exports:{}};t[r][0].call(p.exports,function(e){var a=t[r][1][e];return o(a?a:e)},p,p.exports,e,t,a,i)}return a[r].exports}for(var n="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(e,t){var a=e("../servmask/util"),i=e("./modal"),o=jQuery,n=function(){var e=this;this.params=[],this.modal=new i,this.modal.onStop=function(t){e.onStop(t)}};n.prototype.setParams=function(e){this.params=a.list(e)},n.prototype.start=function(e){var t=this;o(window).bind("beforeunload",function(){return"You are about to stop exporting your website, are you sure?"}),this.stop=!1,this.setStatus({type:"info",message:"Preparing to export..."});var i=this.params.concat({name:"secret_key",value:ai1wm_export.secret_key});e&&(i=i.concat(a.list(e))),o.post(ai1wm_export.ajax.url,i).done(function(){t.getStatus(ai1wm_export.status.php)}).fail(function(){t.setStatus({type:"error",message:"Unable to start the export. Refresh the page and try again"})})},n.prototype.clean=function(e){var t=this;this.stop=!0;var i=this.params.concat({name:"secret_key",value:ai1wm_export.secret_key}).concat({name:"priority",value:300});e&&(i=i.concat(a.list(e))),o.post(ai1wm_export.ajax.url,i).done(function(){o(window).unbind("beforeunload")}).fail(function(){t.setStatus({type:"error",message:"Unable to clean the export. Refresh the page and try again"})})},n.prototype.getStatus=function(e,t){var a=this,t=t||0;this.stop||o.ajax({cache:!1,url:e,dataType:"json"}).done(function(i){if(i)switch(a.setStatus(i),i.type){case"done":case"error":case"download":return o(window).unbind("beforeunload"),void 0}setTimeout(function(){a.getStatus(e,t)},3e3)}).fail(function(){t++,t>=6?a.setStatus({type:"error",message:"Unable to retrieve status of the export. Is your server running?"}):t>=3?a.getStatus(ai1wm_export.status.js,t):a.getStatus(ai1wm_export.status.php,t)})},n.prototype.setStatus=function(e){this.modal.render(e)},n.prototype.onStop=function(e){this.clean(e)},t.exports=n},{"../servmask/util":10,"./modal":2}],2:[function(e,t){var a=jQuery,i=function(){var e=this;this.error=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=a("<h1></h1>"),r=a("<p></p>").html(t.message),s=a("<div></div>"),c=a("<span></span>").addClass("ai1wm-title-red").text("Unable to export"),p=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});s.append(p),n.append(c),o.append(n).append(r),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.info=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=a("<h1></h1>"),r=a("<p></p>").html(t.message),s=a("<div></div>"),c=a('<span class="ai1wm-loader"></span>'),p=a('<button class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop export</button>').on("click",function(){a(this).attr("disabled","disabled"),e.onStop(),e.modal.hide(),e.overlay.hide()});s.append(p),n.append(c),o.append(n).append(r),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.done=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=a("<h1></h1>"),r=a("<p></p>").html(t.message),s=a("<div></div>"),c=a("<span></span>").addClass("ai1wm-title-green").text(t.title),p=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});s.append(p),n.append(c),o.append(n).append(r),i.append(o).append(s),e.modal.html(i).show(),e.overlay.show()},this.download=function(t){var i=a("<div></div>"),o=a("<section></section>"),n=(a("<h1></h1>"),a("<p></p>").html(t.message)),r=a("<div></div>"),s=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){e.modal.hide(),e.overlay.hide()});r.append(s),o.append(n),i.append(o).append(r),e.modal.html(i).show(),e.overlay.show()},this.overlay=a('<div class="ai1wm-overlay"></div>'),this.modal=a('<div class="ai1wm-modal-container"></div>'),a("body").append(this.overlay).append(this.modal)};i.prototype.render=function(e){switch(e.type){case"error":this.error(e);break;case"info":this.info(e);break;case"done":this.done(e);break;case"download":this.download(e)}},t.exports=i},{}],3:[function(e){(function(t){var a=(e("./jquery/query"),e("./jquery/find_replace"),e("./servmask/report"),e("./servmask/feedback"),e("./servmask/util")),i=(e("./servmask/deprecated"),e("./export/export"));jQuery(document).ready(function(e){"use strict";var t=new i;e("#ai1wm-export-file").click(function(e){var i=a.random(12),o=a.form("#ai1wm-export-form").concat({name:"storage",value:i});t.setParams(o),t.start(),e.preventDefault()}),e(".ai1wm-accordion > .ai1wm-title").click(function(){e(this).parent().toggleClass("ai1wm-active")}),e("#ai1wm-add-new-replace-button").ai1wm_find_replace(),e(".ai1wm-expandable > p:first, .ai1wm-expandable > h4:first, .ai1wm-expandable > div.ai1wm-button-main").on("click",function(){e(this).parent().toggleClass("ai1wm-open")}),e(".ai1wm-collapsable").ai1wm_query()}),t.Ai1wm={Util:a,Export:i}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./export/export":1,"./jquery/find_replace":4,"./jquery/query":5,"./servmask/deprecated":6,"./servmask/feedback":8,"./servmask/report":9,"./servmask/util":10}],4:[function(){!function(e){e.fn.ai1wm_find_replace=function(){return e(this).click(function(t){t.preventDefault();var a=e("#ai1wm-queries > li:first").clone();a.find("input").val(""),a.find(".ai1wm-query-find-text").html("&lt;text&gt;"),a.find(".ai1wm-query-replace-text").html("&lt;another-text&gt;"),e("#ai1wm-queries > li").removeClass("ai1wm-open"),e(a).addClass("ai1wm-open"),e("#ai1wm-queries").append(a),e(a).ai1wm_query(),e(a).find("p:first").on("click",function(){e(this).parent().toggleClass("ai1wm-open")})}),this}}(jQuery)},{}],5:[function(){!function(e){e.fn.ai1wm_query=function(){var t=e(this).find("input.ai1wm-query-find-input"),a=e(this).find("input.ai1wm-query-replace-input"),i=e(this).find("small.ai1wm-query-find-text"),o=e(this).find("small.ai1wm-query-replace-text");return t.on("change paste input keypress keydown keyup",function(){var t=e(this).val().length>0?e(this).val():"<text>";i.text(t)}),a.on("change paste input keypress keydown keyup",function(){var t=e(this).val().length>0?e(this).val():"<another-text>";o.text(t)}),this}}(jQuery)},{}],6:[function(e){var t=(e("./util"),e("./dialog")),a={s3:"Amazon S3 Extension",url:"URL Extension",ftp:"FTP Extension",gdrive:"Google Drive Extension",dropbox:"Dropbox Extension"};window.Ai1wmExportController=function(e){this._export={},this._provider=e},window.Ai1wmExportController.prototype.start=function(){new t("<strong>All in One WP Migration</strong> is not compatible with current version of <strong>"+a[this._provider]+'</strong>. Please contact <a href="mailto:support@servmask.com">support@servmask.com</a> for more details.')},window.Ai1wmImportController=function(e){this._import={},this._provider=e},window.Ai1wmImportController.prototype.init=function(){},window.Ai1wmImportController.prototype.download=function(){new t("<strong>All in One WP Migration</strong> is not compatible with current version of <strong>"+a[this._provider]+'</strong>. Please contact <a href="mailto:support@servmask.com">support@servmask.com</a> for more details.')}},{"./dialog":7,"./util":10}],7:[function(e,t){var a=jQuery,i=function(e){var t=this;this.overlay=a('<div class="ai1wm-overlay"></div>'),this.container=a("<div></div>"),this.modal=a('<div class="ai1wm-modal-container"></div>'),this.section=a("<section></section>"),this.message=a("<p></p>").addClass("ai1wm-dialog-message").html(e),this.action=a("<div></div>"),this.closeButton=a('<button class="ai1wm-button-red">Close</button>').on("click",function(){t.modal.hide(),t.overlay.hide()}),this.action.append(this.closeButton),this.section.append(this.message),this.container.append(this.section).append(this.action),this.modal.html(this.container).show(),this.overlay.show(),a("body").append(this.overlay).append(this.modal)};t.exports=i},{}],8:[function(){jQuery(document).ready(function(e){"use strict";e(".ai1wm-feedback-type").attr("checked",!1),e("#ai1wm-feedback-type-link-1").click(function(t){var a=e("#ai1wm-feedback-type-1");a.is(":checked")?(a.attr("checked",!1),t.preventDefault()):a.attr("checked",!0)}),e("#ai1wm-feedback-type-2").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-3").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","Leave plugin developers any feedback here"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-type-3").click(function(){e("#ai1wm-feedback-type-1, #ai1wm-feedback-type-2").closest("li").hide(),e(".ai1wm-feedback-form").find(".ai1wm-feedback-message").attr("placeholder","How may we help you?"),e(".ai1wm-feedback-form").fadeIn()}),e("#ai1wm-feedback-cancel").click(function(t){e(".ai1wm-feedback-form").fadeOut(function(){e(".ai1wm-feedback-type").attr("checked",!1).closest("li").show()}),t.preventDefault()}),e("#ai1wm-feedback-submit").click(function(){var t=e(".ai1wm-feedback-type:checked").val(),a=e(".ai1wm-feedback-email").val(),i=e(".ai1wm-feedback-message").val(),o=e(".ai1wm-feedback-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_feedback.ajax.url,data:{"ai1wm-type":t,"ai1wm-email":a,"ai1wm-message":i,"ai1wm-terms":+o},success:function(t){var a=t.errors;if(a.length>0){e(".ai1wm-feedback .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(a,function(e,t){i.append("<p>"+t+"</p>")}),e(".ai1wm-feedback").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your feedback!</p>");e(".ai1wm-feedback").html(o)}},dataType:"json",async:!1})})})},{}],9:[function(){jQuery(document).ready(function(e){"use strict";e("#ai1wm-report-problem-button").click(function(t){e(this).next(".ai1wm-report-problem-dialog").toggleClass("ai1wm-report-active"),t.preventDefault()}),e("#ai1wm-report-cancel").click(function(t){e(this).closest(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active"),t.preventDefault()}),e("#ai1wm-report-submit").click(function(){var t=e(".ai1wm-report-email").val(),a=e(".ai1wm-report-message").val(),i=e(".ai1wm-report-terms").is(":checked");e.ajax({type:"POST",url:ai1wm_report.ajax.url,data:{"ai1wm-email":t,"ai1wm-message":a,"ai1wm-terms":+i},success:function(t){var a=t.errors;if(a.length>0){e(".ai1wm-report-problem-dialog .ai1wm-message").remove();var i=e("<div />").addClass("ai1wm-message ai1wm-error-message");e.each(a,function(e,t){i.append("<p>"+t+"</p>")}),e(".ai1wm-report-problem-dialog").prepend(i)}else{var o=e("<div />").addClass("ai1wm-message ai1wm-success-message").append("<p>Thanks for submitting your request!</p>");e(".ai1wm-report-problem-dialog").html(o),setTimeout(function(){e(".ai1wm-report-problem-dialog").removeClass("ai1wm-report-active")},2e3)}},dataType:"json",async:!1})})})},{}],10:[function(e,t){var a=jQuery;t.exports={random:function(e){for(var t="",a="abcdefghijklmnopqrstuvwxyz0123456789",i=0;e>i;i++)t+=a.charAt(Math.floor(Math.random()*a.length));return t},form:function(e){return a(e).serializeArray()},ucfirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},list:function(e){if(a.isPlainObject(e)){var t=[],i=decodeURIComponent(a.param(e)).split("&");return a.each(i,function(e,a){var i=a.split("=");t.push({name:i[0],value:i[1]})}),t}return e}}},{}]},{},[3]);