Version Description
Changed
- Use late row lookup to perform database export
Download this release
Release Info
Developer | bangelov |
Plugin | All-in-One WP Migration |
Version | 6.54 |
Comparing to | |
See all releases |
Code changes from version 6.53 to 6.54
- all-in-one-wp-migration.php +1 -1
- constants.php +1 -1
- lib/model/class-ai1wm-extensions.php +1 -1
- lib/model/export/class-ai1wm-export-database.php +1 -14
- lib/vendor/servmask/database/class-ai1wm-database.php +21 -35
- lib/view/assets/css/backups.min.css +1 -1
- lib/view/assets/css/export.min.css +1 -1
- lib/view/assets/css/import.min.css +1 -1
- lib/view/assets/css/updater.min.css +1 -1
- lib/view/assets/javascript/backups.min.js +979 -947
- lib/view/assets/javascript/export.min.js +1072 -1011
- lib/view/assets/javascript/import.min.js +3137 -3073
- lib/view/assets/javascript/updater.min.js +110 -84
- readme.txt +6 -1
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: 6.
|
9 |
* Text Domain: all-in-one-wp-migration
|
10 |
* Domain Path: /languages
|
11 |
* Network: True
|
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: 6.54
|
9 |
* Text Domain: all-in-one-wp-migration
|
10 |
* Domain Path: /languages
|
11 |
* Network: True
|
constants.php
CHANGED
@@ -31,7 +31,7 @@ define( 'AI1WM_DEBUG', false );
|
|
31 |
// ==================
|
32 |
// = Plugin Version =
|
33 |
// ==================
|
34 |
-
define( 'AI1WM_VERSION', '6.
|
35 |
|
36 |
// ===============
|
37 |
// = Plugin Name =
|
31 |
// ==================
|
32 |
// = Plugin Version =
|
33 |
// ==================
|
34 |
+
define( 'AI1WM_VERSION', '6.54' );
|
35 |
|
36 |
// ===============
|
37 |
// = Plugin Name =
|
lib/model/class-ai1wm-extensions.php
CHANGED
@@ -76,7 +76,7 @@ class Ai1wm_Extensions {
|
|
76 |
'about' => AI1WMME_PLUGIN_ABOUT,
|
77 |
'basename' => AI1WMME_PLUGIN_BASENAME,
|
78 |
'version' => AI1WMME_VERSION,
|
79 |
-
'requires' => '3.
|
80 |
'short' => AI1WMME_PLUGIN_SHORT,
|
81 |
);
|
82 |
}
|
76 |
'about' => AI1WMME_PLUGIN_ABOUT,
|
77 |
'basename' => AI1WMME_PLUGIN_BASENAME,
|
78 |
'version' => AI1WMME_VERSION,
|
79 |
+
'requires' => '3.35',
|
80 |
'short' => AI1WMME_PLUGIN_SHORT,
|
81 |
);
|
82 |
}
|
lib/model/export/class-ai1wm-export-database.php
CHANGED
@@ -47,13 +47,6 @@ class Ai1wm_Export_Database {
|
|
47 |
$table_offset = 0;
|
48 |
}
|
49 |
|
50 |
-
// Set table keys
|
51 |
-
if ( isset( $params['table_keys'] ) ) {
|
52 |
-
$table_keys = (array) $params['table_keys'];
|
53 |
-
} else {
|
54 |
-
$table_keys = array();
|
55 |
-
}
|
56 |
-
|
57 |
// Set total tables count
|
58 |
if ( isset( $params['total_tables_count'] ) ) {
|
59 |
$total_tables_count = (int) $params['total_tables_count'];
|
@@ -132,7 +125,7 @@ class Ai1wm_Export_Database {
|
|
132 |
$mysql->set_table_where_clauses( ai1wm_table_prefix() . 'options', array( sprintf( "`option_name` NOT IN ('%s', '%s', '%s', '%s')", AI1WM_ACTIVE_PLUGINS, AI1WM_ACTIVE_TEMPLATE, AI1WM_ACTIVE_STYLESHEET, AI1WM_STATUS ) ) );
|
133 |
|
134 |
// Export database
|
135 |
-
if ( $mysql->export( ai1wm_database_path( $params ), $table_index, $table_offset,
|
136 |
|
137 |
// Get archive file
|
138 |
$archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) );
|
@@ -150,9 +143,6 @@ class Ai1wm_Export_Database {
|
|
150 |
// Unset table offset
|
151 |
unset( $params['table_offset'] );
|
152 |
|
153 |
-
// Unset table keys
|
154 |
-
unset( $params['table_keys'] );
|
155 |
-
|
156 |
// Unset total tables count
|
157 |
unset( $params['total_tables_count'] );
|
158 |
|
@@ -176,9 +166,6 @@ class Ai1wm_Export_Database {
|
|
176 |
// Set table offset
|
177 |
$params['table_offset'] = $table_offset;
|
178 |
|
179 |
-
// Set table keys
|
180 |
-
$params['table_keys'] = $table_keys;
|
181 |
-
|
182 |
// Set total tables count
|
183 |
$params['total_tables_count'] = $total_tables_count;
|
184 |
|
47 |
$table_offset = 0;
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
// Set total tables count
|
51 |
if ( isset( $params['total_tables_count'] ) ) {
|
52 |
$total_tables_count = (int) $params['total_tables_count'];
|
125 |
$mysql->set_table_where_clauses( ai1wm_table_prefix() . 'options', array( sprintf( "`option_name` NOT IN ('%s', '%s', '%s', '%s')", AI1WM_ACTIVE_PLUGINS, AI1WM_ACTIVE_TEMPLATE, AI1WM_ACTIVE_STYLESHEET, AI1WM_STATUS ) ) );
|
126 |
|
127 |
// Export database
|
128 |
+
if ( $mysql->export( ai1wm_database_path( $params ), $table_index, $table_offset, 10 ) ) {
|
129 |
|
130 |
// Get archive file
|
131 |
$archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) );
|
143 |
// Unset table offset
|
144 |
unset( $params['table_offset'] );
|
145 |
|
|
|
|
|
|
|
146 |
// Unset total tables count
|
147 |
unset( $params['total_tables_count'] );
|
148 |
|
166 |
// Set table offset
|
167 |
$params['table_offset'] = $table_offset;
|
168 |
|
|
|
|
|
|
|
169 |
// Set total tables count
|
170 |
$params['total_tables_count'] = $total_tables_count;
|
171 |
|
lib/vendor/servmask/database/class-ai1wm-database.php
CHANGED
@@ -475,11 +475,10 @@ abstract class Ai1wm_Database {
|
|
475 |
* @param string $file_name Name of file
|
476 |
* @param int $table_index Table index
|
477 |
* @param int $table_offset Table offset
|
478 |
-
* @param array $table_keys Table keys
|
479 |
* @param int $timeout Process timeout
|
480 |
* @return bool
|
481 |
*/
|
482 |
-
public function export( $file_name, &$table_index = 0, &$table_offset = 0,
|
483 |
// Set file handler
|
484 |
$file_handler = ai1wm_open( $file_name, 'ab' );
|
485 |
|
@@ -534,41 +533,39 @@ abstract class Ai1wm_Database {
|
|
534 |
ai1wm_write( $file_handler, ";\n\n" );
|
535 |
}
|
536 |
|
537 |
-
// Get primary
|
538 |
-
$primary_keys =
|
539 |
|
540 |
do {
|
541 |
|
542 |
// Set query
|
543 |
if ( $primary_keys ) {
|
544 |
|
545 |
-
// Set table
|
546 |
-
$
|
547 |
-
foreach ( $
|
548 |
-
$
|
549 |
}
|
550 |
|
551 |
-
|
|
|
|
|
|
|
552 |
foreach ( $this->get_table_where_clauses( $table_name ) as $clause ) {
|
553 |
$table_where[] = $clause;
|
554 |
}
|
555 |
|
556 |
$table_where = implode( ' AND ', $table_where );
|
557 |
|
558 |
-
// Set
|
559 |
-
$
|
560 |
-
foreach ( $primary_keys as $key ) {
|
561 |
-
$table_order[] = sprintf( '`%s`', $key );
|
562 |
-
}
|
563 |
-
|
564 |
-
$table_order = implode( ', ', $table_order );
|
565 |
-
|
566 |
-
// Set query with rows count
|
567 |
-
$query = sprintf( 'SELECT * FROM `%s` WHERE %s ORDER BY %s LIMIT %d', $table_name, $table_where, $table_order, 1000 );
|
568 |
|
569 |
} else {
|
570 |
|
571 |
-
// Set table
|
|
|
|
|
|
|
572 |
$table_where = array( 1 );
|
573 |
foreach ( $this->get_table_where_clauses( $table_name ) as $clause ) {
|
574 |
$table_where[] = $clause;
|
@@ -576,11 +573,8 @@ abstract class Ai1wm_Database {
|
|
576 |
|
577 |
$table_where = implode( ' AND ', $table_where );
|
578 |
|
579 |
-
// Set table order (by first column)
|
580 |
-
$table_order = 1;
|
581 |
-
|
582 |
// Set query with offset and rows count
|
583 |
-
$query = sprintf( 'SELECT * FROM `%s` WHERE %s ORDER BY %s LIMIT %d, %d', $table_name, $table_where, $
|
584 |
}
|
585 |
|
586 |
// Apply additional table prefix columns
|
@@ -620,11 +614,6 @@ abstract class Ai1wm_Database {
|
|
620 |
// Write insert statement
|
621 |
ai1wm_write( $file_handler, $table_insert );
|
622 |
|
623 |
-
// Set current table keys
|
624 |
-
foreach ( $primary_keys as $key ) {
|
625 |
-
$table_keys[ $key ] = $row[ $key ];
|
626 |
-
}
|
627 |
-
|
628 |
// Set current table rows
|
629 |
$table_offset++;
|
630 |
|
@@ -640,9 +629,6 @@ abstract class Ai1wm_Database {
|
|
640 |
}
|
641 |
} else {
|
642 |
|
643 |
-
// Set current table keys
|
644 |
-
$table_keys = array();
|
645 |
-
|
646 |
// Set current table offset
|
647 |
$table_offset = 0;
|
648 |
}
|
@@ -845,7 +831,7 @@ abstract class Ai1wm_Database {
|
|
845 |
$primary_keys = array();
|
846 |
|
847 |
// Get primary keys
|
848 |
-
$result = $this->query( "SHOW KEYS FROM `{$table_name}` WHERE Key_name = 'PRIMARY'" );
|
849 |
while ( $row = $this->fetch_assoc( $result ) ) {
|
850 |
if ( isset( $row['Column_name'] ) ) {
|
851 |
$primary_keys[] = $row['Column_name'];
|
@@ -867,8 +853,8 @@ abstract class Ai1wm_Database {
|
|
867 |
protected function get_unique_keys( $table_name ) {
|
868 |
$unique_keys = array();
|
869 |
|
870 |
-
// Get
|
871 |
-
$result = $this->query( "SHOW KEYS FROM `{$table_name}` WHERE Non_unique = 0" );
|
872 |
while ( $row = $this->fetch_assoc( $result ) ) {
|
873 |
if ( isset( $row['Column_name'] ) ) {
|
874 |
$unique_keys[] = $row['Column_name'];
|
475 |
* @param string $file_name Name of file
|
476 |
* @param int $table_index Table index
|
477 |
* @param int $table_offset Table offset
|
|
|
478 |
* @param int $timeout Process timeout
|
479 |
* @return bool
|
480 |
*/
|
481 |
+
public function export( $file_name, &$table_index = 0, &$table_offset = 0, $timeout = 0 ) {
|
482 |
// Set file handler
|
483 |
$file_handler = ai1wm_open( $file_name, 'ab' );
|
484 |
|
533 |
ai1wm_write( $file_handler, ";\n\n" );
|
534 |
}
|
535 |
|
536 |
+
// Get primary keys
|
537 |
+
$primary_keys = $this->get_primary_keys( $table_name );
|
538 |
|
539 |
do {
|
540 |
|
541 |
// Set query
|
542 |
if ( $primary_keys ) {
|
543 |
|
544 |
+
// Set table keys
|
545 |
+
$table_keys = array();
|
546 |
+
foreach ( $primary_keys as $key ) {
|
547 |
+
$table_keys[] = sprintf( '`%s`', $key );
|
548 |
}
|
549 |
|
550 |
+
$table_keys = implode( ', ', $table_keys );
|
551 |
+
|
552 |
+
// Set table where clauses
|
553 |
+
$table_where = array( 1 );
|
554 |
foreach ( $this->get_table_where_clauses( $table_name ) as $clause ) {
|
555 |
$table_where[] = $clause;
|
556 |
}
|
557 |
|
558 |
$table_where = implode( ' AND ', $table_where );
|
559 |
|
560 |
+
// Set query with offset and rows count
|
561 |
+
$query = sprintf( 'SELECT t1.* FROM `%s` AS t1 JOIN (SELECT %s FROM `%s` ORDER BY %s LIMIT %d, %d) AS t2 USING (%s) WHERE %s', $table_name, $table_keys, $table_name, $table_keys, $table_offset, 1000, $table_keys, $table_where );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
|
563 |
} else {
|
564 |
|
565 |
+
// Set table keys
|
566 |
+
$table_keys = 1;
|
567 |
+
|
568 |
+
// Set table where clauses
|
569 |
$table_where = array( 1 );
|
570 |
foreach ( $this->get_table_where_clauses( $table_name ) as $clause ) {
|
571 |
$table_where[] = $clause;
|
573 |
|
574 |
$table_where = implode( ' AND ', $table_where );
|
575 |
|
|
|
|
|
|
|
576 |
// Set query with offset and rows count
|
577 |
+
$query = sprintf( 'SELECT * FROM `%s` WHERE %s ORDER BY %s LIMIT %d, %d', $table_name, $table_where, $table_keys, $table_offset, 1000 );
|
578 |
}
|
579 |
|
580 |
// Apply additional table prefix columns
|
614 |
// Write insert statement
|
615 |
ai1wm_write( $file_handler, $table_insert );
|
616 |
|
|
|
|
|
|
|
|
|
|
|
617 |
// Set current table rows
|
618 |
$table_offset++;
|
619 |
|
629 |
}
|
630 |
} else {
|
631 |
|
|
|
|
|
|
|
632 |
// Set current table offset
|
633 |
$table_offset = 0;
|
634 |
}
|
831 |
$primary_keys = array();
|
832 |
|
833 |
// Get primary keys
|
834 |
+
$result = $this->query( "SHOW KEYS FROM `{$table_name}` WHERE `Key_name` = 'PRIMARY'" );
|
835 |
while ( $row = $this->fetch_assoc( $result ) ) {
|
836 |
if ( isset( $row['Column_name'] ) ) {
|
837 |
$primary_keys[] = $row['Column_name'];
|
853 |
protected function get_unique_keys( $table_name ) {
|
854 |
$unique_keys = array();
|
855 |
|
856 |
+
// Get unique keys
|
857 |
+
$result = $this->query( "SHOW KEYS FROM `{$table_name}` WHERE `Non_unique` = 0" );
|
858 |
while ( $row = $this->fetch_assoc( $result ) ) {
|
859 |
if ( isset( $row['Column_name'] ) ) {
|
860 |
$unique_keys[] = $row['Column_name'];
|
lib/view/assets/css/backups.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{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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{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 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.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-backup-progress{background-color:#dfdfdf;height:20px;width:350px;border-radius:15px}#ai1wm-backup-progress-bar{background-color:#00aff0;height:20px;line-height:20px;border-radius:15px;color:#fff;width:0;text-align:center}.ai1wm-backups{width:100%;margin:20px 0 0;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:left}.ai1wm-backups .ai1wm-column-info{text-align:right}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center}.ai1wm-backups .ai1wm-column-actions{text-align:right}.ai1wm-backups thead th{padding:4px 6px;text-align:left;font-size:1.2em}.ai1wm-backups tbody tr:first-child{border-top:1px solid #ccc}.ai1wm-backups tbody tr{border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:36px}.ai1wm-backups tbody td span{font-weight:700}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:right;width:250px}.ai1wm-backups tbody td.ai1wm-backup-actions a{margin-left:4px}.ai1wm-backups tbody td.ai1wm-backup-actions span{transition:width 2s cubic-bezier(.19,1,.22,1);display:inline-block;width:0;text-align:center;visibility:hidden}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-button-on span{width:80px;visibility:visible}
|
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:0;margin: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:after,.ai1wm-divider:before{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)}to{-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)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-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)}to{-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-down:before,.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-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:after,.ai1wm-row:before{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{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-right,.ai1wm-row{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:after,.ai1wm-container:before{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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines,.ai1wm-line{position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}.ai1wm-line-second,div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{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:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.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-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[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-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-button-blue i,.ai1wm-button-gray i,.ai1wm-button-green 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:after,.ai1wm-clear:before{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-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{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>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.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:0;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 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.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-backup-progress,#ai1wm-backup-progress-bar{background-color:#dfdfdf;height:20px;width:350px;border-radius:15px}#ai1wm-backup-progress-bar{background-color:#00aff0;line-height:20px;color:#fff;width:0;text-align:center}.ai1wm-backups{width:100%;margin:20px 0 0;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:left}.ai1wm-backups .ai1wm-column-info{text-align:right}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center}.ai1wm-backups .ai1wm-column-actions{text-align:right}.ai1wm-backups thead th{padding:4px 6px;text-align:left;font-size:1.2em}.ai1wm-backups tbody tr:first-child{border-top:1px solid #ccc}.ai1wm-backups tbody tr{border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:36px}.ai1wm-backups tbody td span{font-weight:700}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:right;width:250px}.ai1wm-backups tbody td.ai1wm-backup-actions a{margin-left:4px}.ai1wm-backups tbody td.ai1wm-backup-actions span{transition:width 2s cubic-bezier(.19,1,.22,1);display:inline-block;width:0;text-align:center;visibility:hidden}.ai1wm-backups tbody td.ai1wm-backup-actions .ai1wm-button-on span{width:80px;visibility:visible}
|
lib/view/assets/css/export.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{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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{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}@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-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-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)}}.ai1wm-accordion{margin:1em 0;display:block}.ai1wm-accordion h4{cursor:pointer;color:rgba(0,116,162,.8);margin:0}.ai1wm-accordion h4 small{color:#444;font-weight:400;display:inline;float:none;width:auto}.ai1wm-accordion .ai1wm-icon-arrow-right{transition:-webkit-transform .1s ease-out;transition:transform .1s ease-out}.ai1wm-accordion ul{margin:0;padding:0;list-style:none;visibility:hidden;height:0;transition:height .2s cubic-bezier(.19,1,.22,1)}.ai1wm-accordion ul li small{display:inline;float:none;width:auto}.ai1wm-accordion.ai1wm-open h4 .ai1wm-icon-arrow-right{-webkit-transform:rotate(90deg);transform:rotate(90deg);display:inline-block}.ai1wm-accordion.ai1wm-open ul{height:auto;margin:.6em 0 0 2em;visibility:visible}.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 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.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-query-arrow{position:relative;top:4px;float:right}.ai1wm-query.ai1wm-open{background:#ebebeb!important}.ai1wm-query.ai1wm-open p small{border-bottom:1px dashed #000}.ai1wm-query.ai1wm-open div{visibility:visible!important;height:82px!important;margin-top:8px}.ai1wm-query.ai1wm-open .ai1wm-query-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ai1wm-query{width:100%;margin:0 0 10px;list-style:none;background:0 0;border:1px solid #d8d8d8;padding:10px;border-radius:5px;box-sizing:border-box}.ai1wm-query div{transition:height .2s cubic-bezier(.19,1,.22,1);visibility:hidden;height:0}.ai1wm-query div input{width:100%;font-weight:400;font-size:.8rem;padding:0 10px;height:2.3rem;line-height:2.3rem;margin-bottom:4px;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;transition:.05s border-color ease-in-out;border-radius:5px}.ai1wm-query div input:focus{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.ai1wm-query p{margin:0;cursor:pointer}.ai1wm-query p small{display:inline;width:auto;float:none}.ai1wm-query-arrow{transition:-webkit-transform .1s ease-out;transition:transform .1s ease-out}.ai1wm-include-tables{display:inline-block;width:300px;margin:0 6px 0 0}.ai1wm-include-plugins{display:inline-block;width:300px;vertical-align:top}.ai1wm-include-media{display:inline-block;width:300px;margin:0 6px 0 0}.ai1wm-include-themes{display:inline-block;width:300px;vertical-align:top}.ai1wm-export-stats{margin-bottom:1em}#ai1wm-export-download{display:none;margin:0 0 2em}#ai1wm-export-download-stop{display:inline-block;margin:0 0 2em}#ai1wm-export-download.ai1wm-active{display:inline-block;-webkit-animation:ai1wm-fadein .5s;animation:ai1wm-fadein .5s}#ai1wm-export-download.ai1wm-emphasize{display:inline-block;-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}#ai1wm-export-download-size{display:block;color:#34495e}#ai1wm-queries{padding: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:0;margin: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:after,.ai1wm-divider:before{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)}to{-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)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-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)}to{-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-down:before,.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-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:after,.ai1wm-row:before{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{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-right,.ai1wm-row{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:after,.ai1wm-container:before{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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines,.ai1wm-line{position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}.ai1wm-line-second,div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{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:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.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-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[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-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-button-blue i,.ai1wm-button-gray i,.ai1wm-button-green 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:after,.ai1wm-clear:before{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-query div input,.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-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{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>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.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:0;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}@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)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-accordion{margin:1em 0;display:block}.ai1wm-accordion h4{cursor:pointer;color:rgba(0,116,162,.8);margin:0}.ai1wm-accordion h4 small{color:#444;font-weight:400}.ai1wm-accordion .ai1wm-icon-arrow-right{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out}.ai1wm-accordion ul{margin:0;padding:0;list-style:none}.ai1wm-accordion h4 small,.ai1wm-accordion ul li small{display:inline;float:none;width:auto}.ai1wm-accordion.ai1wm-open h4 .ai1wm-icon-arrow-right{display:inline-block}.ai1wm-accordion.ai1wm-open ul{height:auto;margin:.6em 0 0 2em;visibility:visible}.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 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.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-query-arrow{position:relative;top:4px;float:right}.ai1wm-query.ai1wm-open{background:#ebebeb!important}.ai1wm-query.ai1wm-open p small{border-bottom:1px dashed #000}.ai1wm-query.ai1wm-open div{visibility:visible!important;height:82px!important;margin-top:8px}.ai1wm-accordion.ai1wm-open h4 .ai1wm-icon-arrow-right,.ai1wm-query.ai1wm-open .ai1wm-query-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ai1wm-query{width:100%;margin:0 0 10px;list-style:none;background:0 0;border:1px solid #d8d8d8;padding:10px;border-radius:5px;box-sizing:border-box}.ai1wm-accordion ul,.ai1wm-query div{transition:height .2s cubic-bezier(.19,1,.22,1);visibility:hidden;height:0}.ai1wm-query div input{border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;transition:.05s border-color ease-in-out}.ai1wm-query div input:focus{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.ai1wm-query p{margin:0;cursor:pointer}.ai1wm-query p small{display:inline;width:auto;float:none}.ai1wm-query-arrow{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out}.ai1wm-include-tables{display:inline-block;width:300px;margin:0 6px 0 0}.ai1wm-include-plugins{display:inline-block;width:300px;vertical-align:top}.ai1wm-include-media{display:inline-block;width:300px;margin:0 6px 0 0}.ai1wm-include-themes{display:inline-block;width:300px;vertical-align:top}.ai1wm-export-stats{margin-bottom:1em}#ai1wm-export-download{display:none;margin:0 0 2em}#ai1wm-export-download-stop{display:inline-block;margin:0 0 2em}#ai1wm-export-download.ai1wm-active{display:inline-block;-webkit-animation:ai1wm-fadein .5s;animation:ai1wm-fadein .5s}#ai1wm-export-download.ai1wm-emphasize{display:inline-block;-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}#ai1wm-export-download-size{display:block;color:#34495e}#ai1wm-queries{padding:0}
|
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{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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{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 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.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}
|
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:0;margin: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:after,.ai1wm-divider:before{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)}to{-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)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-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)}to{-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-down:before,.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-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:after,.ai1wm-row:before{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{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-right,.ai1wm-row{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:after,.ai1wm-container:before{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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines,.ai1wm-line{position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}.ai1wm-line-second,div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{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:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.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-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[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-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-button-blue i,.ai1wm-button-gray i,.ai1wm-button-green 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:after,.ai1wm-clear:before{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-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited,.ai1wm-report-cancel:active,.ai1wm-report-cancel:link,.ai1wm-report-cancel:visited{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,.ai1wm-unlimited-import a{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>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.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,div.ai1wm-expandable input{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;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 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;border-radius:3px;height:30px;line-height:30px}.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.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-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,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;text-align:center;width:0}.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/css/updater.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";.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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{
|
1 |
+
@charset "UTF-8";.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:154px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:210px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-export .ai1mw-lines{-webkit-transform:translate(20px,-1px);transform:translate(20px,-1px)}.ai1wm-button-group.ai1wm-button-import{width:170px;box-sizing:content-box}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:240px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import .ai1mw-lines{-webkit-transform:translate(8px,-1px);transform:translate(8px,-1px)}.ai1wm-button-group .ai1wm-button-main{padding:6px 25px 1px;height:22px;box-sizing:content-box}.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;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines,.ai1wm-line{position:relative;display:inline-block;width:12px;height:10px}.ai1wm-line{width:100%;height:2px;margin:auto;background:#27ae60;position:absolute;transition:all .2s ease-in-out}.ai1wm-line-first{top:0}.ai1wm-line-second,div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-third{top:100%}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{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:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.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-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[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-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-button-blue i,.ai1wm-button-gray i,.ai1wm-button-green 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-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:'\f463';display:inline-block;font:20px/1 'dashicons';speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-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}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:left}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-left:1em}
|
lib/view/assets/javascript/backups.min.js
CHANGED
@@ -1,830 +1,817 @@
|
|
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 |
-
/******/
|
15 |
-
/******/
|
16 |
-
/******/
|
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.
|
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__(
|
41 |
/******/ })
|
42 |
/************************************************************************/
|
43 |
/******/ ([
|
44 |
/* 0 */
|
45 |
-
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
50 |
-
|
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__(3),
|
75 |
-
Util = __webpack_require__(2),
|
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 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
if (
|
93 |
-
|
94 |
-
url: ai1wm_backups.ajax.url,
|
95 |
-
type: 'POST',
|
96 |
-
dataType: 'json',
|
97 |
-
data: {
|
98 |
-
'secret_key': ai1wm_backups.secret_key,
|
99 |
-
'archive': self.data('archive')
|
100 |
-
},
|
101 |
-
dataFilter: function dataFilter(data, type) {
|
102 |
-
return Util.json(data);
|
103 |
-
},
|
104 |
-
success: function success(data) {
|
105 |
-
if (data.errors.length === 0) {
|
106 |
-
self.closest('tr').remove();
|
107 |
-
if ($('.ai1wm-backups tbody tr').length === 0) {
|
108 |
-
$('.ai1wm-backups').addClass('ai1wm-hide');
|
109 |
-
$('.ai1wm-backups-empty').removeClass('ai1wm-hide');
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
113 |
-
});
|
114 |
}
|
|
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
var model = new Import();
|
120 |
-
|
121 |
-
// Restore from file
|
122 |
-
$('.ai1wm-backup-restore').click(function (e) {
|
123 |
-
var storage = Util.random(12);
|
124 |
-
var options = Util.form('#ai1wm-backups-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: $(this).data('archive') });
|
125 |
-
|
126 |
-
// Set global params
|
127 |
-
model.setParams(options);
|
128 |
-
|
129 |
-
// Start import
|
130 |
-
model.start();
|
131 |
-
|
132 |
-
e.preventDefault();
|
133 |
-
});
|
134 |
-
});
|
135 |
|
136 |
-
/***/ },
|
137 |
/* 1 */
|
138 |
-
/***/ function(module, exports, __webpack_require__) {
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
'use strict';
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
*
|
145 |
-
* This program is free software: you can redistribute it and/or modify
|
146 |
-
* it under the terms of the GNU General Public License as published by
|
147 |
-
* the Free Software Foundation, either version 3 of the License, or
|
148 |
-
* (at your option) any later version.
|
149 |
-
*
|
150 |
-
* This program is distributed in the hope that it will be useful,
|
151 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
152 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
153 |
-
* GNU General Public License for more details.
|
154 |
-
*
|
155 |
-
* You should have received a copy of the GNU General Public License
|
156 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
157 |
-
*
|
158 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
159 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
160 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
161 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
162 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
163 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
164 |
-
*/
|
165 |
-
|
166 |
-
var Util = __webpack_require__(2);
|
167 |
-
|
168 |
-
jQuery(document).ready(function ($) {
|
169 |
-
'use strict';
|
170 |
-
|
171 |
-
$('#ai1wm-report-problem-button').click(function (e) {
|
172 |
-
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
173 |
|
174 |
-
|
175 |
-
|
176 |
|
177 |
-
|
178 |
-
|
179 |
|
180 |
-
|
181 |
-
|
182 |
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
}
|
222 |
}
|
223 |
-
}
|
224 |
});
|
225 |
});
|
|
|
226 |
|
227 |
-
/***/ },
|
228 |
/* 2 */
|
229 |
-
/***/ function(module, exports) {
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
'use strict';
|
232 |
|
233 |
-
|
234 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
235 |
-
*
|
236 |
-
* This program is free software: you can redistribute it and/or modify
|
237 |
-
* it under the terms of the GNU General Public License as published by
|
238 |
-
* the Free Software Foundation, either version 3 of the License, or
|
239 |
-
* (at your option) any later version.
|
240 |
-
*
|
241 |
-
* This program is distributed in the hope that it will be useful,
|
242 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
243 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
244 |
-
* GNU General Public License for more details.
|
245 |
-
*
|
246 |
-
* You should have received a copy of the GNU General Public License
|
247 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
248 |
-
*
|
249 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
250 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
251 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
252 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
253 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
254 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
255 |
-
*/
|
256 |
-
|
257 |
-
var $ = jQuery;
|
258 |
-
|
259 |
-
module.exports = {
|
260 |
-
random: function random(len) {
|
261 |
-
var text = '';
|
262 |
-
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
263 |
-
|
264 |
-
for (var i = 0; i < len; i++) {
|
265 |
-
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
266 |
-
}
|
267 |
-
|
268 |
-
return text;
|
269 |
-
},
|
270 |
-
form: function form(id) {
|
271 |
-
return $(id).serializeArray();
|
272 |
-
},
|
273 |
-
ucfirst: function ucfirst(text) {
|
274 |
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
275 |
-
},
|
276 |
-
list: function list(input) {
|
277 |
-
// Convert object to list
|
278 |
-
if ($.isPlainObject(input)) {
|
279 |
-
var result = [];
|
280 |
-
var params = decodeURIComponent($.param(input)).split('&');
|
281 |
-
|
282 |
-
// Loop over params
|
283 |
-
$.each(params, function (index, item) {
|
284 |
-
var value = item.split('=');
|
285 |
-
|
286 |
-
// Add item
|
287 |
-
result.push({ name: value[0], value: value[1] });
|
288 |
-
});
|
289 |
-
|
290 |
-
return result;
|
291 |
-
}
|
292 |
|
293 |
-
|
294 |
-
},
|
295 |
-
json: function json(input) {
|
296 |
-
if ($.type(input) === 'string') {
|
297 |
-
var result = input.match(/{[\s\S]+}/);
|
298 |
-
if (result !== null) {
|
299 |
-
return result[0];
|
300 |
-
}
|
301 |
-
}
|
302 |
|
303 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
}
|
305 |
-
};
|
306 |
-
|
307 |
-
/***/ },
|
308 |
-
/* 3 */
|
309 |
-
/***/ function(module, exports, __webpack_require__) {
|
310 |
-
|
311 |
-
'use strict';
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
315 |
-
*
|
316 |
-
* This program is free software: you can redistribute it and/or modify
|
317 |
-
* it under the terms of the GNU General Public License as published by
|
318 |
-
* the Free Software Foundation, either version 3 of the License, or
|
319 |
-
* (at your option) any later version.
|
320 |
-
*
|
321 |
-
* This program is distributed in the hope that it will be useful,
|
322 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
323 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
324 |
-
* GNU General Public License for more details.
|
325 |
-
*
|
326 |
-
* You should have received a copy of the GNU General Public License
|
327 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
328 |
-
*
|
329 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
330 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
331 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
332 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
333 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
334 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
335 |
-
*/
|
336 |
-
|
337 |
-
var Util = __webpack_require__(2);
|
338 |
-
|
339 |
-
jQuery(document).ready(function ($) {
|
340 |
-
'use strict';
|
341 |
-
|
342 |
-
// Reset feedback form
|
343 |
-
|
344 |
-
$('.ai1wm-feedback-type').attr('checked', false);
|
345 |
-
|
346 |
-
// Review
|
347 |
-
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
348 |
-
var radio = $('#ai1wm-feedback-type-1');
|
349 |
-
if (radio.is(':checked')) {
|
350 |
-
radio.attr('checked', false);
|
351 |
-
e.preventDefault();
|
352 |
-
} else {
|
353 |
-
radio.attr('checked', true);
|
354 |
-
}
|
355 |
-
});
|
356 |
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
|
362 |
-
|
363 |
-
|
364 |
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
|
374 |
-
|
375 |
-
|
376 |
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
});
|
386 |
-
e.preventDefault();
|
387 |
});
|
|
|
|
|
388 |
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
}
|
426 |
}
|
427 |
-
}
|
428 |
});
|
429 |
});
|
|
|
430 |
|
431 |
-
/***/ },
|
|
|
432 |
/* 4 */
|
433 |
-
/***/ function(module, exports, __webpack_require__) {
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
// Set blogs listener
|
483 |
-
this.modal.onBlogs = function (options) {
|
484 |
-
self.onBlogs(options);
|
485 |
-
};
|
486 |
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
};
|
491 |
};
|
492 |
|
493 |
-
|
494 |
-
|
|
|
495 |
};
|
|
|
496 |
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
}
|
505 |
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
// Initializing beforeunload event
|
512 |
-
$(window).bind('beforeunload', function () {
|
513 |
-
return 'You are about to stop importing your website, are you sure?';
|
514 |
-
});
|
515 |
|
516 |
-
|
517 |
-
|
|
|
|
|
518 |
|
519 |
-
|
520 |
-
|
|
|
|
|
521 |
|
522 |
-
|
523 |
-
|
524 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
}
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
if (params) {
|
540 |
-
self.run(params);
|
541 |
-
}
|
542 |
-
}).fail(function () {
|
543 |
-
var timeout = retries * 1000;
|
544 |
-
if (retries >= 5) {
|
545 |
-
return self.setStatus({
|
546 |
-
type: 'error',
|
547 |
-
message: 'Unable to start the import. Refresh the page and try again'
|
548 |
-
});
|
549 |
-
}
|
550 |
-
|
551 |
-
retries++;
|
552 |
-
|
553 |
-
setTimeout(self.start.bind(self, options, retries), timeout);
|
554 |
-
});
|
555 |
-
};
|
556 |
-
|
557 |
-
Import.prototype.run = function (params, retries) {
|
558 |
-
var self = this;
|
559 |
-
var retries = retries || 0;
|
560 |
-
|
561 |
-
// Stop running import
|
562 |
-
if (this.stopImport) {
|
563 |
-
return;
|
564 |
}
|
565 |
|
566 |
-
|
567 |
-
$.ajax({
|
568 |
-
url: ai1wm_import.ajax.url,
|
569 |
-
type: 'POST',
|
570 |
-
dataType: 'json',
|
571 |
-
data: params,
|
572 |
-
dataFilter: function dataFilter(data, type) {
|
573 |
-
return Util.json(data);
|
574 |
-
}
|
575 |
-
}).done(function (params) {
|
576 |
-
if (params) {
|
577 |
-
self.run(params);
|
578 |
-
}
|
579 |
-
}).fail(function () {
|
580 |
-
var timeout = retries * 1000;
|
581 |
-
|
582 |
-
retries++;
|
583 |
-
|
584 |
-
setTimeout(self.run.bind(self, params, retries), timeout);
|
585 |
-
});
|
586 |
-
};
|
587 |
-
|
588 |
-
Import.prototype.confirm = function (options, retries) {
|
589 |
-
var self = this;
|
590 |
-
var retries = retries || 0;
|
591 |
|
592 |
-
|
593 |
-
|
594 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
595 |
}
|
|
|
|
|
596 |
|
597 |
-
|
598 |
-
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
599 |
|
600 |
-
|
601 |
-
|
602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
603 |
}
|
604 |
|
605 |
-
|
606 |
-
$.ajax({
|
607 |
-
url: ai1wm_import.ajax.url,
|
608 |
-
type: 'POST',
|
609 |
-
dataType: 'json',
|
610 |
-
data: params,
|
611 |
-
dataFilter: function dataFilter(data, type) {
|
612 |
-
return Util.json(data);
|
613 |
-
}
|
614 |
-
}).done(function () {
|
615 |
-
self.getStatus();
|
616 |
-
}).done(function (params) {
|
617 |
-
if (params) {
|
618 |
-
self.run(params);
|
619 |
-
}
|
620 |
-
}).fail(function () {
|
621 |
-
var timeout = retries * 1000;
|
622 |
-
if (retries >= 5) {
|
623 |
-
return self.setStatus({
|
624 |
-
type: 'error',
|
625 |
-
message: 'Unable to confirm the import. Refresh the page and try again'
|
626 |
-
});
|
627 |
-
}
|
628 |
-
|
629 |
-
retries++;
|
630 |
|
631 |
-
|
632 |
-
|
633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
|
635 |
-
|
636 |
-
var self = this;
|
637 |
-
var retries = retries || 0;
|
638 |
|
639 |
-
|
640 |
-
|
641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
}
|
643 |
|
644 |
-
|
645 |
-
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
646 |
|
647 |
-
|
648 |
-
|
649 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
}
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
}
|
667 |
-
}).fail(function () {
|
668 |
-
var timeout = retries * 1000;
|
669 |
-
if (retries >= 5) {
|
670 |
-
return self.setStatus({
|
671 |
-
type: 'error',
|
672 |
-
message: 'Unable to prepare blogs the import. Refresh the page and try again'
|
673 |
-
});
|
674 |
}
|
|
|
675 |
|
676 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
677 |
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
|
686 |
-
|
687 |
-
|
|
|
688 |
|
689 |
-
|
690 |
-
|
|
|
691 |
|
692 |
-
|
693 |
-
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
|
694 |
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
699 |
|
700 |
-
//
|
701 |
-
|
702 |
-
url: ai1wm_import.ajax.url,
|
703 |
-
type: 'POST',
|
704 |
-
dataType: 'json',
|
705 |
-
data: params,
|
706 |
-
dataFilter: function dataFilter(data, type) {
|
707 |
-
return Util.json(data);
|
708 |
-
}
|
709 |
-
}).done(function () {
|
710 |
-
// Unbinding the beforeunload event when we stop importing
|
711 |
-
$(window).unbind('beforeunload');
|
712 |
-
|
713 |
-
// Destroy modal
|
714 |
-
self.modal.destroy();
|
715 |
-
}).fail(function () {
|
716 |
-
var timeout = retries * 1000;
|
717 |
-
if (retries >= 5) {
|
718 |
-
return self.setStatus({
|
719 |
-
type: 'error',
|
720 |
-
message: 'Unable to stop the import. Refresh the page and try again'
|
721 |
-
});
|
722 |
-
}
|
723 |
|
724 |
-
|
|
|
725 |
|
726 |
-
|
727 |
-
|
728 |
-
};
|
729 |
|
730 |
-
|
731 |
-
var
|
732 |
|
733 |
-
//
|
734 |
-
|
735 |
-
return;
|
736 |
-
}
|
737 |
|
738 |
-
|
739 |
-
|
740 |
-
type: 'GET',
|
741 |
-
dataType: 'json',
|
742 |
-
cache: false,
|
743 |
-
dataFilter: function dataFilter(data, type) {
|
744 |
-
return Util.json(data);
|
745 |
-
}
|
746 |
-
}).done(function (params) {
|
747 |
-
if (params) {
|
748 |
-
self.setStatus(params);
|
749 |
-
|
750 |
-
// Next status
|
751 |
-
switch (params.type) {
|
752 |
-
case 'done':
|
753 |
-
case 'error':
|
754 |
-
// Unbinding the beforeunload event when any case is performed
|
755 |
-
$(window).unbind('beforeunload');
|
756 |
-
return;
|
757 |
-
|
758 |
-
case 'confirm':
|
759 |
-
case 'blogs':
|
760 |
-
return;
|
761 |
-
}
|
762 |
-
}
|
763 |
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
setTimeout(self.getStatus.bind(self), 3000);
|
769 |
-
});;
|
770 |
-
};
|
771 |
|
772 |
-
|
773 |
-
|
774 |
-
};
|
775 |
|
776 |
-
|
777 |
-
|
778 |
-
};
|
779 |
|
780 |
-
|
781 |
-
|
782 |
-
};
|
783 |
|
784 |
-
|
785 |
-
|
786 |
-
};
|
787 |
|
788 |
-
|
|
|
|
|
|
|
789 |
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
|
794 |
-
|
|
|
795 |
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
* This program is free software: you can redistribute it and/or modify
|
800 |
-
* it under the terms of the GNU General Public License as published by
|
801 |
-
* the Free Software Foundation, either version 3 of the License, or
|
802 |
-
* (at your option) any later version.
|
803 |
-
*
|
804 |
-
* This program is distributed in the hope that it will be useful,
|
805 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
806 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
807 |
-
* GNU General Public License for more details.
|
808 |
-
*
|
809 |
-
* You should have received a copy of the GNU General Public License
|
810 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
811 |
-
*
|
812 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
813 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
814 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
815 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
816 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
817 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
818 |
-
*/
|
819 |
-
|
820 |
-
var $ = jQuery;
|
821 |
-
|
822 |
-
var Modal = function Modal() {
|
823 |
-
var self = this;
|
824 |
-
this.view = null;
|
825 |
-
|
826 |
-
// Error Modal
|
827 |
-
this.error = function (params) {
|
828 |
|
829 |
// Create the modal container
|
830 |
var container = $('<div></div>');
|
@@ -832,31 +819,41 @@
|
|
832 |
// Create section to hold title, message and action
|
833 |
var section = $('<section></section>');
|
834 |
|
835 |
-
// Create header to hold
|
836 |
var header = $('<h1></h1>');
|
837 |
|
838 |
// Create paragraph to hold mesage
|
839 |
-
var message = $('<p></p>')
|
840 |
|
841 |
// Create action section
|
842 |
var action = $('<div></div>');
|
843 |
|
844 |
-
// Create
|
845 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
|
847 |
-
// Create
|
848 |
-
var
|
849 |
-
|
|
|
850 |
});
|
851 |
|
852 |
-
// Append
|
853 |
-
|
|
|
|
|
|
|
854 |
|
855 |
-
// Append
|
856 |
-
header.append(
|
857 |
|
858 |
-
// Append header
|
859 |
-
section.append(header)
|
860 |
|
861 |
// Append section and action to container
|
862 |
container.append(section).append(action);
|
@@ -864,290 +861,325 @@
|
|
864 |
// Render modal
|
865 |
self.modal.html(container).show();
|
866 |
self.overlay.show();
|
867 |
-
}
|
868 |
-
|
869 |
-
// Progress Modal
|
870 |
-
this.progress = function (params) {
|
871 |
-
if (this.view === 'progress') {
|
872 |
-
|
873 |
-
// Update progressBarMeter
|
874 |
-
this.progress.progressBarMeter.width(params.percent + '%');
|
875 |
-
|
876 |
-
// Update progressBarPercent
|
877 |
-
this.progress.progressBarPercent.text(params.percent + '%');
|
878 |
-
} else {
|
879 |
-
|
880 |
-
// Create the modal container
|
881 |
-
var container = $('<div></div>');
|
882 |
-
|
883 |
-
// Create section to hold title, message and action
|
884 |
-
var section = $('<section></section>');
|
885 |
-
|
886 |
-
// Create header to hold progress bar
|
887 |
-
var header = $('<h1></h1>');
|
888 |
-
|
889 |
-
// Create paragraph to hold mesage
|
890 |
-
var message = $('<p></p>');
|
891 |
-
|
892 |
-
// Create action section
|
893 |
-
var action = $('<div></div>');
|
894 |
-
|
895 |
-
// Create progressBar
|
896 |
-
var progressBar = $('<span class="ai1wm-progress-bar"></span>');
|
897 |
-
|
898 |
-
// Create progressBarMeter
|
899 |
-
this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
|
900 |
-
|
901 |
-
// Create progressBarPercent
|
902 |
-
this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
|
903 |
-
|
904 |
-
// Create stop import
|
905 |
-
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
|
906 |
-
$(this).attr('disabled', 'disabled');
|
907 |
-
self.onStop();
|
908 |
-
});
|
909 |
-
|
910 |
-
// Append progress meter and progress percent
|
911 |
-
progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
|
912 |
-
|
913 |
-
// Append stop button
|
914 |
-
action.append(stopButton);
|
915 |
-
|
916 |
-
// Append progress bar to section
|
917 |
-
header.append(progressBar);
|
918 |
-
|
919 |
-
// Append header to section
|
920 |
-
section.append(header);
|
921 |
-
|
922 |
-
// Append section and action to container
|
923 |
-
container.append(section).append(action);
|
924 |
-
|
925 |
-
// Render modal
|
926 |
-
self.modal.html(container).show();
|
927 |
-
self.overlay.show();
|
928 |
-
}
|
929 |
-
};
|
930 |
-
|
931 |
-
// Confirm Modal
|
932 |
-
this.confirm = function (params) {
|
933 |
-
|
934 |
-
// Create the modal container
|
935 |
-
var container = $('<div></div>');
|
936 |
-
|
937 |
-
// Create section to hold title, message and action
|
938 |
-
var section = $('<section></section>');
|
939 |
|
940 |
-
|
941 |
-
|
942 |
|
943 |
-
|
944 |
-
|
945 |
|
946 |
-
|
947 |
-
|
948 |
|
949 |
-
|
950 |
-
|
951 |
|
952 |
-
|
953 |
-
|
954 |
-
$(this).attr('disabled', 'disabled');
|
955 |
-
self.onConfirm();
|
956 |
-
});
|
957 |
|
958 |
-
|
959 |
-
|
960 |
|
961 |
-
|
962 |
-
|
963 |
|
964 |
-
|
965 |
-
|
|
|
|
|
|
|
966 |
|
967 |
-
|
968 |
-
|
969 |
|
970 |
-
|
971 |
-
|
972 |
-
self.overlay.show();
|
973 |
-
};
|
974 |
|
975 |
-
//
|
976 |
-
|
977 |
|
978 |
-
|
979 |
-
|
980 |
|
981 |
-
|
982 |
-
|
|
|
|
|
983 |
|
984 |
-
|
985 |
-
|
986 |
|
987 |
-
|
988 |
-
|
989 |
|
990 |
-
|
991 |
-
|
992 |
|
993 |
-
|
994 |
-
|
995 |
|
996 |
-
|
997 |
-
|
998 |
-
$(this).attr('disabled', 'disabled');
|
999 |
-
self.onBlogs($(this).closest('form').serializeArray());
|
1000 |
-
});
|
1001 |
|
1002 |
-
|
1003 |
-
|
1004 |
|
1005 |
-
|
1006 |
-
|
1007 |
|
1008 |
-
|
1009 |
-
|
|
|
|
|
|
|
1010 |
|
1011 |
-
|
1012 |
-
|
1013 |
|
1014 |
-
|
1015 |
-
|
1016 |
-
self.overlay.show();
|
1017 |
-
};
|
1018 |
|
1019 |
-
//
|
1020 |
-
|
1021 |
|
1022 |
-
|
1023 |
-
|
1024 |
|
1025 |
-
|
1026 |
-
|
|
|
|
|
1027 |
|
1028 |
-
|
1029 |
-
|
1030 |
|
1031 |
-
|
1032 |
-
|
1033 |
|
1034 |
-
|
1035 |
-
|
1036 |
|
1037 |
-
|
1038 |
-
|
1039 |
|
1040 |
-
|
1041 |
-
|
1042 |
|
1043 |
-
|
1044 |
-
|
1045 |
|
1046 |
-
|
1047 |
-
|
1048 |
|
1049 |
-
|
1050 |
-
|
1051 |
|
1052 |
-
|
1053 |
-
|
1054 |
|
1055 |
-
|
1056 |
-
|
1057 |
-
self.overlay.show();
|
1058 |
-
};
|
1059 |
|
1060 |
-
//
|
1061 |
-
|
1062 |
|
1063 |
-
|
1064 |
-
|
1065 |
|
1066 |
-
|
1067 |
-
|
|
|
|
|
1068 |
|
1069 |
-
|
1070 |
-
|
1071 |
|
1072 |
-
|
1073 |
-
|
1074 |
|
1075 |
-
|
1076 |
-
|
1077 |
|
1078 |
-
|
1079 |
-
|
1080 |
|
1081 |
-
|
1082 |
-
|
1083 |
-
self.destroy();
|
1084 |
-
});
|
1085 |
|
1086 |
-
|
1087 |
-
|
1088 |
|
1089 |
-
|
1090 |
-
|
1091 |
|
1092 |
-
|
1093 |
-
|
|
|
|
|
1094 |
|
1095 |
-
|
1096 |
-
|
1097 |
|
1098 |
-
|
1099 |
-
|
1100 |
-
self.overlay.show();
|
1101 |
-
};
|
1102 |
|
1103 |
-
//
|
1104 |
-
|
1105 |
|
1106 |
-
//
|
1107 |
-
|
1108 |
|
1109 |
-
|
1110 |
-
.
|
|
|
1111 |
};
|
1112 |
|
1113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1114 |
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1128 |
|
1129 |
-
|
1130 |
-
|
1131 |
-
break;
|
1132 |
|
1133 |
-
|
1134 |
-
this.info(params);
|
1135 |
-
break;
|
1136 |
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
}
|
1141 |
|
1142 |
-
|
1143 |
-
|
1144 |
|
1145 |
-
|
1146 |
-
|
1147 |
-
this.overlay.hide();
|
1148 |
-
};
|
1149 |
|
1150 |
-
|
|
|
|
|
1151 |
|
1152 |
-
/***/ }
|
1153 |
/******/ ]);
|
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 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
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.l = 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 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, {
|
40 |
+
/******/ configurable: false,
|
41 |
+
/******/ enumerable: true,
|
42 |
+
/******/ get: getter
|
43 |
+
/******/ });
|
44 |
+
/******/ }
|
45 |
+
/******/ };
|
46 |
+
/******/
|
47 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
+
/******/ __webpack_require__.n = function(module) {
|
49 |
+
/******/ var getter = module && module.__esModule ?
|
50 |
+
/******/ function getDefault() { return module['default']; } :
|
51 |
+
/******/ function getModuleExports() { return module; };
|
52 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
+
/******/ return getter;
|
54 |
+
/******/ };
|
55 |
+
/******/
|
56 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
+
/******/
|
59 |
/******/ // __webpack_public_path__
|
60 |
/******/ __webpack_require__.p = "";
|
61 |
+
/******/
|
62 |
/******/ // Load entry module and return exports
|
63 |
+
/******/ return __webpack_require__(__webpack_require__.s = 8);
|
64 |
/******/ })
|
65 |
/************************************************************************/
|
66 |
/******/ ([
|
67 |
/* 0 */
|
68 |
+
/***/ (function(module, exports, __webpack_require__) {
|
69 |
+
|
70 |
+
"use strict";
|
71 |
+
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
75 |
+
*
|
76 |
+
* This program is free software: you can redistribute it and/or modify
|
77 |
+
* it under the terms of the GNU General Public License as published by
|
78 |
+
* the Free Software Foundation, either version 3 of the License, or
|
79 |
+
* (at your option) any later version.
|
80 |
+
*
|
81 |
+
* This program is distributed in the hope that it will be useful,
|
82 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
83 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
84 |
+
* GNU General Public License for more details.
|
85 |
+
*
|
86 |
+
* You should have received a copy of the GNU General Public License
|
87 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
88 |
+
*
|
89 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
90 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
91 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
92 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
93 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
94 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
95 |
+
*/
|
96 |
+
|
97 |
+
var $ = jQuery;
|
98 |
+
|
99 |
+
module.exports = {
|
100 |
+
random: function random(len) {
|
101 |
+
var text = '';
|
102 |
+
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
103 |
+
|
104 |
+
for (var i = 0; i < len; i++) {
|
105 |
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
106 |
+
}
|
107 |
|
108 |
+
return text;
|
109 |
+
},
|
110 |
+
form: function form(id) {
|
111 |
+
return $(id).serializeArray();
|
112 |
+
},
|
113 |
+
ucfirst: function ucfirst(text) {
|
114 |
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
115 |
+
},
|
116 |
+
list: function list(input) {
|
117 |
+
// Convert object to list
|
118 |
+
if ($.isPlainObject(input)) {
|
119 |
+
var result = [];
|
120 |
+
var params = decodeURIComponent($.param(input)).split('&');
|
121 |
+
|
122 |
+
// Loop over params
|
123 |
+
$.each(params, function (index, item) {
|
124 |
+
var value = item.split('=');
|
125 |
+
|
126 |
+
// Add item
|
127 |
+
result.push({ name: value[0], value: value[1] });
|
128 |
+
});
|
129 |
|
130 |
+
return result;
|
131 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
return input;
|
134 |
+
},
|
135 |
+
json: function json(input) {
|
136 |
+
if ($.type(input) === 'string') {
|
137 |
+
var result = input.match(/{[\s\S]+}/);
|
138 |
+
if (result !== null) {
|
139 |
+
return result[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
+
}
|
142 |
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
+
/***/ }),
|
148 |
/* 1 */
|
149 |
+
/***/ (function(module, exports, __webpack_require__) {
|
150 |
+
|
151 |
+
"use strict";
|
152 |
+
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
156 |
+
*
|
157 |
+
* This program is free software: you can redistribute it and/or modify
|
158 |
+
* it under the terms of the GNU General Public License as published by
|
159 |
+
* the Free Software Foundation, either version 3 of the License, or
|
160 |
+
* (at your option) any later version.
|
161 |
+
*
|
162 |
+
* This program is distributed in the hope that it will be useful,
|
163 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
164 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
165 |
+
* GNU General Public License for more details.
|
166 |
+
*
|
167 |
+
* You should have received a copy of the GNU General Public License
|
168 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
169 |
+
*
|
170 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
171 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
172 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
173 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
174 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
175 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
176 |
+
*/
|
177 |
+
|
178 |
+
var Util = __webpack_require__(0);
|
179 |
+
|
180 |
+
jQuery(document).ready(function ($) {
|
181 |
'use strict';
|
182 |
|
183 |
+
$('#ai1wm-report-problem-button').click(function (e) {
|
184 |
+
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
+
e.preventDefault();
|
187 |
+
});
|
188 |
|
189 |
+
$('#ai1wm-report-cancel').click(function (e) {
|
190 |
+
$(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
191 |
|
192 |
+
e.preventDefault();
|
193 |
+
});
|
194 |
|
195 |
+
$('#ai1wm-report-submit').click(function () {
|
196 |
+
var email = $('.ai1wm-report-email').val();
|
197 |
+
var message = $('.ai1wm-report-message').val();
|
198 |
+
var terms = $('.ai1wm-report-terms').is(':checked');
|
199 |
|
200 |
+
$.ajax({
|
201 |
+
url: ai1wm_report.ajax.url,
|
202 |
+
type: 'POST',
|
203 |
+
dataType: 'json',
|
204 |
+
async: false,
|
205 |
+
data: {
|
206 |
+
'secret_key': ai1wm_report.secret_key,
|
207 |
+
'ai1wm_email': email,
|
208 |
+
'ai1wm_message': message,
|
209 |
+
'ai1wm_terms': +terms
|
210 |
+
},
|
211 |
+
dataFilter: function dataFilter(data, type) {
|
212 |
+
return Util.json(data);
|
213 |
+
},
|
214 |
+
success: function success(data) {
|
215 |
+
if (data.errors.length > 0) {
|
216 |
+
// Reset previous messages
|
217 |
+
$('.ai1wm-report-problem-dialog .ai1wm-message').remove();
|
218 |
+
|
219 |
+
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
220 |
+
$.each(data.errors, function (key, value) {
|
221 |
+
errorMessage.append('<p>' + value + '</p>');
|
222 |
+
});
|
223 |
+
|
224 |
+
$('.ai1wm-report-problem-dialog').prepend(errorMessage);
|
225 |
+
} else {
|
226 |
+
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
|
227 |
+
$('.ai1wm-report-problem-dialog').html(successMessage);
|
228 |
+
|
229 |
+
// Hide message
|
230 |
+
setTimeout(function () {
|
231 |
+
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
232 |
+
}, 2000);
|
|
|
233 |
}
|
234 |
+
}
|
235 |
});
|
236 |
});
|
237 |
+
});
|
238 |
|
239 |
+
/***/ }),
|
240 |
/* 2 */
|
241 |
+
/***/ (function(module, exports, __webpack_require__) {
|
242 |
+
|
243 |
+
"use strict";
|
244 |
+
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
248 |
+
*
|
249 |
+
* This program is free software: you can redistribute it and/or modify
|
250 |
+
* it under the terms of the GNU General Public License as published by
|
251 |
+
* the Free Software Foundation, either version 3 of the License, or
|
252 |
+
* (at your option) any later version.
|
253 |
+
*
|
254 |
+
* This program is distributed in the hope that it will be useful,
|
255 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
256 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
257 |
+
* GNU General Public License for more details.
|
258 |
+
*
|
259 |
+
* You should have received a copy of the GNU General Public License
|
260 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
261 |
+
*
|
262 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
263 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
264 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
265 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
266 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
267 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
268 |
+
*/
|
269 |
+
|
270 |
+
var Util = __webpack_require__(0);
|
271 |
+
|
272 |
+
jQuery(document).ready(function ($) {
|
273 |
'use strict';
|
274 |
|
275 |
+
// Reset feedback form
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
|
277 |
+
$('.ai1wm-feedback-type').attr('checked', false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
|
279 |
+
// Review
|
280 |
+
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
281 |
+
var radio = $('#ai1wm-feedback-type-1');
|
282 |
+
if (radio.is(':checked')) {
|
283 |
+
radio.attr('checked', false);
|
284 |
+
e.preventDefault();
|
285 |
+
} else {
|
286 |
+
radio.attr('checked', true);
|
287 |
}
|
288 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
+
// Improvement
|
291 |
+
$('#ai1wm-feedback-type-2').click(function () {
|
292 |
+
// Hide other options
|
293 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
294 |
|
295 |
+
// change placeholder message
|
296 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
|
297 |
|
298 |
+
// Show feedback form
|
299 |
+
$('.ai1wm-feedback-form').fadeIn();
|
300 |
+
});
|
301 |
|
302 |
+
// Help
|
303 |
+
$('#ai1wm-feedback-type-3').click(function () {
|
304 |
+
// Hide other options
|
305 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
306 |
|
307 |
+
// change placeholder message
|
308 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
|
309 |
|
310 |
+
// Show feedback form
|
311 |
+
$('.ai1wm-feedback-form').fadeIn();
|
312 |
+
});
|
313 |
|
314 |
+
// Cancel feedback form
|
315 |
+
$('#ai1wm-feedback-cancel').click(function (e) {
|
316 |
+
$('.ai1wm-feedback-form').fadeOut(function () {
|
317 |
+
$('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
|
|
|
|
|
318 |
});
|
319 |
+
e.preventDefault();
|
320 |
+
});
|
321 |
|
322 |
+
// Send feedback form
|
323 |
+
$('#ai1wm-feedback-submit').click(function () {
|
324 |
+
var type = $('.ai1wm-feedback-type:checked').val();
|
325 |
+
var email = $('.ai1wm-feedback-email').val();
|
326 |
+
var message = $('.ai1wm-feedback-message').val();
|
327 |
+
var terms = $('.ai1wm-feedback-terms').is(':checked');
|
328 |
|
329 |
+
$.ajax({
|
330 |
+
url: ai1wm_feedback.ajax.url,
|
331 |
+
type: 'POST',
|
332 |
+
dataType: 'json',
|
333 |
+
async: false,
|
334 |
+
data: {
|
335 |
+
'secret_key': ai1wm_feedback.secret_key,
|
336 |
+
'ai1wm_type': type,
|
337 |
+
'ai1wm_email': email,
|
338 |
+
'ai1wm_message': message,
|
339 |
+
'ai1wm_terms': +terms
|
340 |
+
},
|
341 |
+
dataFilter: function dataFilter(data, type) {
|
342 |
+
return Util.json(data);
|
343 |
+
},
|
344 |
+
success: function success(data) {
|
345 |
+
if (data.errors.length > 0) {
|
346 |
+
// Reset previous messages
|
347 |
+
$('.ai1wm-feedback .ai1wm-message').remove();
|
348 |
+
|
349 |
+
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
350 |
+
$.each(data.errors, function (key, value) {
|
351 |
+
errorMessage.append('<p>' + value + '</p>');
|
352 |
+
});
|
353 |
+
|
354 |
+
$('.ai1wm-feedback').prepend(errorMessage);
|
355 |
+
} else {
|
356 |
+
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
357 |
+
$('.ai1wm-feedback').html(successMessage);
|
|
|
358 |
}
|
359 |
+
}
|
360 |
});
|
361 |
});
|
362 |
+
});
|
363 |
|
364 |
+
/***/ }),
|
365 |
+
/* 3 */,
|
366 |
/* 4 */
|
367 |
+
/***/ (function(module, exports, __webpack_require__) {
|
368 |
+
|
369 |
+
"use strict";
|
370 |
+
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
374 |
+
*
|
375 |
+
* This program is free software: you can redistribute it and/or modify
|
376 |
+
* it under the terms of the GNU General Public License as published by
|
377 |
+
* the Free Software Foundation, either version 3 of the License, or
|
378 |
+
* (at your option) any later version.
|
379 |
+
*
|
380 |
+
* This program is distributed in the hope that it will be useful,
|
381 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
382 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
383 |
+
* GNU General Public License for more details.
|
384 |
+
*
|
385 |
+
* You should have received a copy of the GNU General Public License
|
386 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
387 |
+
*
|
388 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
389 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
390 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
391 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
392 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
393 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
394 |
+
*/
|
395 |
+
|
396 |
+
var Util = __webpack_require__(0),
|
397 |
+
Modal = __webpack_require__(5),
|
398 |
+
$ = jQuery;
|
399 |
+
|
400 |
+
var Import = function Import() {
|
401 |
+
var self = this;
|
402 |
+
|
403 |
+
// Set params
|
404 |
+
this.params = [];
|
405 |
+
|
406 |
+
// Set stop flag
|
407 |
+
this.stopImport = false;
|
408 |
+
|
409 |
+
// Set modal
|
410 |
+
this.modal = new Modal();
|
411 |
+
|
412 |
+
// Set confirm listener
|
413 |
+
this.modal.onConfirm = function (options) {
|
414 |
+
self.onConfirm(options);
|
415 |
+
};
|
|
|
|
|
|
|
|
|
416 |
|
417 |
+
// Set blogs listener
|
418 |
+
this.modal.onBlogs = function (options) {
|
419 |
+
self.onBlogs(options);
|
|
|
420 |
};
|
421 |
|
422 |
+
// Set stop listener
|
423 |
+
this.modal.onStop = function (options) {
|
424 |
+
self.onStop(options);
|
425 |
};
|
426 |
+
};
|
427 |
|
428 |
+
Import.prototype.setParams = function (params) {
|
429 |
+
this.params = Util.list(params);
|
430 |
+
};
|
431 |
|
432 |
+
Import.prototype.start = function (options, retries) {
|
433 |
+
var self = this;
|
434 |
+
var retries = retries || 0;
|
|
|
435 |
|
436 |
+
// Set stop flag
|
437 |
+
if (retries === 0) {
|
438 |
+
this.stopImport = false;
|
439 |
+
}
|
|
|
|
|
|
|
|
|
|
|
440 |
|
441 |
+
// Stop running import
|
442 |
+
if (this.stopImport) {
|
443 |
+
return;
|
444 |
+
}
|
445 |
|
446 |
+
// Initializing beforeunload event
|
447 |
+
$(window).bind('beforeunload', function () {
|
448 |
+
return 'You are about to stop importing your website, are you sure?';
|
449 |
+
});
|
450 |
|
451 |
+
// Set initial status
|
452 |
+
this.setStatus({ type: 'info', message: 'Preparing to import...' });
|
453 |
+
|
454 |
+
// Set params
|
455 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
|
456 |
+
|
457 |
+
// Set additional params
|
458 |
+
if (options) {
|
459 |
+
params = params.concat(Util.list(options));
|
460 |
+
}
|
461 |
+
|
462 |
+
// Import
|
463 |
+
$.ajax({
|
464 |
+
url: ai1wm_import.ajax.url,
|
465 |
+
type: 'POST',
|
466 |
+
dataType: 'json',
|
467 |
+
data: params,
|
468 |
+
dataFilter: function dataFilter(data, type) {
|
469 |
+
return Util.json(data);
|
470 |
}
|
471 |
+
}).done(function () {
|
472 |
+
self.getStatus();
|
473 |
+
}).done(function (params) {
|
474 |
+
if (params) {
|
475 |
+
self.run(params);
|
476 |
+
}
|
477 |
+
}).fail(function () {
|
478 |
+
var timeout = retries * 1000;
|
479 |
+
if (retries >= 5) {
|
480 |
+
return self.setStatus({
|
481 |
+
type: 'error',
|
482 |
+
message: 'Unable to start the import. Refresh the page and try again'
|
483 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
}
|
485 |
|
486 |
+
retries++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
|
488 |
+
setTimeout(self.start.bind(self, options, retries), timeout);
|
489 |
+
});
|
490 |
+
};
|
491 |
+
|
492 |
+
Import.prototype.run = function (params, retries) {
|
493 |
+
var self = this;
|
494 |
+
var retries = retries || 0;
|
495 |
+
|
496 |
+
// Stop running import
|
497 |
+
if (this.stopImport) {
|
498 |
+
return;
|
499 |
+
}
|
500 |
+
|
501 |
+
// Import
|
502 |
+
$.ajax({
|
503 |
+
url: ai1wm_import.ajax.url,
|
504 |
+
type: 'POST',
|
505 |
+
dataType: 'json',
|
506 |
+
data: params,
|
507 |
+
dataFilter: function dataFilter(data, type) {
|
508 |
+
return Util.json(data);
|
509 |
+
}
|
510 |
+
}).done(function (params) {
|
511 |
+
if (params) {
|
512 |
+
self.run(params);
|
513 |
}
|
514 |
+
}).fail(function () {
|
515 |
+
var timeout = retries * 1000;
|
516 |
|
517 |
+
retries++;
|
|
|
518 |
|
519 |
+
setTimeout(self.run.bind(self, params, retries), timeout);
|
520 |
+
});
|
521 |
+
};
|
522 |
+
|
523 |
+
Import.prototype.confirm = function (options, retries) {
|
524 |
+
var self = this;
|
525 |
+
var retries = retries || 0;
|
526 |
+
|
527 |
+
// Stop running import
|
528 |
+
if (this.stopImport) {
|
529 |
+
return;
|
530 |
+
}
|
531 |
+
|
532 |
+
// Set params
|
533 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
534 |
+
|
535 |
+
// Set additional params
|
536 |
+
if (options) {
|
537 |
+
params = params.concat(Util.list(options));
|
538 |
+
}
|
539 |
+
|
540 |
+
// Confirm
|
541 |
+
$.ajax({
|
542 |
+
url: ai1wm_import.ajax.url,
|
543 |
+
type: 'POST',
|
544 |
+
dataType: 'json',
|
545 |
+
data: params,
|
546 |
+
dataFilter: function dataFilter(data, type) {
|
547 |
+
return Util.json(data);
|
548 |
+
}
|
549 |
+
}).done(function () {
|
550 |
+
self.getStatus();
|
551 |
+
}).done(function (params) {
|
552 |
+
if (params) {
|
553 |
+
self.run(params);
|
554 |
+
}
|
555 |
+
}).fail(function () {
|
556 |
+
var timeout = retries * 1000;
|
557 |
+
if (retries >= 5) {
|
558 |
+
return self.setStatus({
|
559 |
+
type: 'error',
|
560 |
+
message: 'Unable to confirm the import. Refresh the page and try again'
|
561 |
+
});
|
562 |
}
|
563 |
|
564 |
+
retries++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
|
566 |
+
setTimeout(self.confirm.bind(self, options, retries), timeout);
|
567 |
+
});
|
568 |
+
};
|
569 |
+
|
570 |
+
Import.prototype.blogs = function (options, retries) {
|
571 |
+
var self = this;
|
572 |
+
var retries = retries || 0;
|
573 |
+
|
574 |
+
// Stop running import
|
575 |
+
if (this.stopImport) {
|
576 |
+
return;
|
577 |
+
}
|
578 |
+
|
579 |
+
// Set params
|
580 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
581 |
+
|
582 |
+
// Set additional params
|
583 |
+
if (options) {
|
584 |
+
params = params.concat(Util.list(options));
|
585 |
+
}
|
586 |
+
|
587 |
+
// Blogs
|
588 |
+
$.ajax({
|
589 |
+
url: ai1wm_import.ajax.url,
|
590 |
+
type: 'POST',
|
591 |
+
dataType: 'json',
|
592 |
+
data: params,
|
593 |
+
dataFilter: function dataFilter(data, type) {
|
594 |
+
return Util.json(data);
|
595 |
+
}
|
596 |
+
}).done(function () {
|
597 |
+
self.getStatus();
|
598 |
+
}).done(function (params) {
|
599 |
+
if (params) {
|
600 |
+
self.run(params);
|
601 |
+
}
|
602 |
+
}).fail(function () {
|
603 |
+
var timeout = retries * 1000;
|
604 |
+
if (retries >= 5) {
|
605 |
+
return self.setStatus({
|
606 |
+
type: 'error',
|
607 |
+
message: 'Unable to prepare blogs the import. Refresh the page and try again'
|
608 |
+
});
|
609 |
+
}
|
610 |
|
611 |
+
retries++;
|
|
|
|
|
612 |
|
613 |
+
setTimeout(self.blogs.bind(self, options, retries), timeout);
|
614 |
+
});
|
615 |
+
};
|
616 |
+
|
617 |
+
Import.prototype.clean = function (options, retries) {
|
618 |
+
var self = this;
|
619 |
+
var retries = retries || 0;
|
620 |
+
|
621 |
+
// Set stop flag
|
622 |
+
this.stopImport = true;
|
623 |
+
|
624 |
+
// Set initial status
|
625 |
+
this.setStatus({ type: 'info', message: 'Please wait, stopping the import...' });
|
626 |
+
|
627 |
+
// Set params
|
628 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
|
629 |
+
|
630 |
+
// Set additional params
|
631 |
+
if (options) {
|
632 |
+
params = params.concat(Util.list(options));
|
633 |
+
}
|
634 |
+
|
635 |
+
// Clean
|
636 |
+
$.ajax({
|
637 |
+
url: ai1wm_import.ajax.url,
|
638 |
+
type: 'POST',
|
639 |
+
dataType: 'json',
|
640 |
+
data: params,
|
641 |
+
dataFilter: function dataFilter(data, type) {
|
642 |
+
return Util.json(data);
|
643 |
+
}
|
644 |
+
}).done(function () {
|
645 |
+
// Unbinding the beforeunload event when we stop importing
|
646 |
+
$(window).unbind('beforeunload');
|
647 |
+
|
648 |
+
// Destroy modal
|
649 |
+
self.modal.destroy();
|
650 |
+
}).fail(function () {
|
651 |
+
var timeout = retries * 1000;
|
652 |
+
if (retries >= 5) {
|
653 |
+
return self.setStatus({
|
654 |
+
type: 'error',
|
655 |
+
message: 'Unable to stop the import. Refresh the page and try again'
|
656 |
+
});
|
657 |
}
|
658 |
|
659 |
+
retries++;
|
|
|
660 |
|
661 |
+
setTimeout(self.clean.bind(self, options, retries), timeout);
|
662 |
+
});
|
663 |
+
};
|
664 |
+
|
665 |
+
Import.prototype.getStatus = function () {
|
666 |
+
var self = this;
|
667 |
+
|
668 |
+
// Stop getting status
|
669 |
+
if (this.stopImport) {
|
670 |
+
return;
|
671 |
+
}
|
672 |
+
|
673 |
+
$.ajax({
|
674 |
+
url: ai1wm_import.status.url,
|
675 |
+
type: 'GET',
|
676 |
+
dataType: 'json',
|
677 |
+
cache: false,
|
678 |
+
dataFilter: function dataFilter(data, type) {
|
679 |
+
return Util.json(data);
|
680 |
}
|
681 |
+
}).done(function (params) {
|
682 |
+
if (params) {
|
683 |
+
self.setStatus(params);
|
684 |
+
|
685 |
+
// Next status
|
686 |
+
switch (params.type) {
|
687 |
+
case 'done':
|
688 |
+
case 'error':
|
689 |
+
// Unbinding the beforeunload event when any case is performed
|
690 |
+
$(window).unbind('beforeunload');
|
691 |
+
return;
|
692 |
+
|
693 |
+
case 'confirm':
|
694 |
+
case 'blogs':
|
695 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
}
|
697 |
+
}
|
698 |
|
699 |
+
// Import is not done yet, let's check status in 3 seconds
|
700 |
+
setTimeout(self.getStatus.bind(self), 3000);
|
701 |
+
}).fail(function () {
|
702 |
+
// Import is not done yet, let's check status in 3 seconds
|
703 |
+
setTimeout(self.getStatus.bind(self), 3000);
|
704 |
+
});;
|
705 |
+
};
|
706 |
|
707 |
+
Import.prototype.setStatus = function (params) {
|
708 |
+
this.modal.render(params);
|
709 |
+
};
|
710 |
|
711 |
+
Import.prototype.onConfirm = function (options) {
|
712 |
+
this.confirm(options);
|
713 |
+
};
|
714 |
|
715 |
+
Import.prototype.onBlogs = function (options) {
|
716 |
+
this.blogs(options);
|
717 |
+
};
|
718 |
|
719 |
+
Import.prototype.onStop = function (options) {
|
720 |
+
this.clean(options);
|
721 |
+
};
|
722 |
|
723 |
+
module.exports = Import;
|
|
|
724 |
|
725 |
+
/***/ }),
|
726 |
+
/* 5 */
|
727 |
+
/***/ (function(module, exports, __webpack_require__) {
|
728 |
+
|
729 |
+
"use strict";
|
730 |
+
|
731 |
+
|
732 |
+
/**
|
733 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
734 |
+
*
|
735 |
+
* This program is free software: you can redistribute it and/or modify
|
736 |
+
* it under the terms of the GNU General Public License as published by
|
737 |
+
* the Free Software Foundation, either version 3 of the License, or
|
738 |
+
* (at your option) any later version.
|
739 |
+
*
|
740 |
+
* This program is distributed in the hope that it will be useful,
|
741 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
742 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
743 |
+
* GNU General Public License for more details.
|
744 |
+
*
|
745 |
+
* You should have received a copy of the GNU General Public License
|
746 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
747 |
+
*
|
748 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
749 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
750 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
751 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
752 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
753 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
754 |
+
*/
|
755 |
+
|
756 |
+
var $ = jQuery;
|
757 |
+
|
758 |
+
var Modal = function Modal() {
|
759 |
+
var self = this;
|
760 |
+
this.view = null;
|
761 |
+
|
762 |
+
// Error Modal
|
763 |
+
this.error = function (params) {
|
764 |
|
765 |
+
// Create the modal container
|
766 |
+
var container = $('<div></div>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
767 |
|
768 |
+
// Create section to hold title, message and action
|
769 |
+
var section = $('<section></section>');
|
770 |
|
771 |
+
// Create header to hold title
|
772 |
+
var header = $('<h1></h1>');
|
|
|
773 |
|
774 |
+
// Create paragraph to hold mesage
|
775 |
+
var message = $('<p></p>').html(params.message);
|
776 |
|
777 |
+
// Create action section
|
778 |
+
var action = $('<div></div>');
|
|
|
|
|
779 |
|
780 |
+
// Create title
|
781 |
+
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to import');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
|
783 |
+
// Create close button
|
784 |
+
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
785 |
+
self.destroy();
|
786 |
+
});
|
|
|
|
|
|
|
787 |
|
788 |
+
// Append close button
|
789 |
+
action.append(closeButton);
|
|
|
790 |
|
791 |
+
// Append title to section
|
792 |
+
header.append(title);
|
|
|
793 |
|
794 |
+
// Append header and message to section
|
795 |
+
section.append(header).append(message);
|
|
|
796 |
|
797 |
+
// Append section and action to container
|
798 |
+
container.append(section).append(action);
|
|
|
799 |
|
800 |
+
// Render modal
|
801 |
+
self.modal.html(container).show();
|
802 |
+
self.overlay.show();
|
803 |
+
};
|
804 |
|
805 |
+
// Progress Modal
|
806 |
+
this.progress = function (params) {
|
807 |
+
if (this.view === 'progress') {
|
808 |
|
809 |
+
// Update progressBarMeter
|
810 |
+
this.progress.progressBarMeter.width(params.percent + '%');
|
811 |
|
812 |
+
// Update progressBarPercent
|
813 |
+
this.progress.progressBarPercent.text(params.percent + '%');
|
814 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
815 |
|
816 |
// Create the modal container
|
817 |
var container = $('<div></div>');
|
819 |
// Create section to hold title, message and action
|
820 |
var section = $('<section></section>');
|
821 |
|
822 |
+
// Create header to hold progress bar
|
823 |
var header = $('<h1></h1>');
|
824 |
|
825 |
// Create paragraph to hold mesage
|
826 |
+
var message = $('<p></p>');
|
827 |
|
828 |
// Create action section
|
829 |
var action = $('<div></div>');
|
830 |
|
831 |
+
// Create progressBar
|
832 |
+
var progressBar = $('<span class="ai1wm-progress-bar"></span>');
|
833 |
+
|
834 |
+
// Create progressBarMeter
|
835 |
+
this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
|
836 |
+
|
837 |
+
// Create progressBarPercent
|
838 |
+
this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
|
839 |
|
840 |
+
// Create stop import
|
841 |
+
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
|
842 |
+
$(this).attr('disabled', 'disabled');
|
843 |
+
self.onStop();
|
844 |
});
|
845 |
|
846 |
+
// Append progress meter and progress percent
|
847 |
+
progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
|
848 |
+
|
849 |
+
// Append stop button
|
850 |
+
action.append(stopButton);
|
851 |
|
852 |
+
// Append progress bar to section
|
853 |
+
header.append(progressBar);
|
854 |
|
855 |
+
// Append header to section
|
856 |
+
section.append(header);
|
857 |
|
858 |
// Append section and action to container
|
859 |
container.append(section).append(action);
|
861 |
// Render modal
|
862 |
self.modal.html(container).show();
|
863 |
self.overlay.show();
|
864 |
+
}
|
865 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
|
867 |
+
// Confirm Modal
|
868 |
+
this.confirm = function (params) {
|
869 |
|
870 |
+
// Create the modal container
|
871 |
+
var container = $('<div></div>');
|
872 |
|
873 |
+
// Create section to hold title, message and action
|
874 |
+
var section = $('<section></section>');
|
875 |
|
876 |
+
// Create header to hold warning
|
877 |
+
var header = $('<h1></h1>');
|
878 |
|
879 |
+
// Create paragraph to hold mesage
|
880 |
+
var message = $('<p></p>').html(params.message);
|
|
|
|
|
|
|
881 |
|
882 |
+
// Create action section
|
883 |
+
var action = $('<div></div>');
|
884 |
|
885 |
+
// Create warning
|
886 |
+
var warning = $('<span class="ai1wm-icon-notification"></span>');
|
887 |
|
888 |
+
// Create confirm button
|
889 |
+
var confirmButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
|
890 |
+
$(this).attr('disabled', 'disabled');
|
891 |
+
self.onConfirm();
|
892 |
+
});
|
893 |
|
894 |
+
// Append confirm button
|
895 |
+
action.append(confirmButton);
|
896 |
|
897 |
+
// Append warning to section
|
898 |
+
header.append(warning);
|
|
|
|
|
899 |
|
900 |
+
// Append header and message to section
|
901 |
+
section.append(header).append(message);
|
902 |
|
903 |
+
// Append section and action to container
|
904 |
+
container.append(section).append(action);
|
905 |
|
906 |
+
// Render modal
|
907 |
+
self.modal.html(container).show();
|
908 |
+
self.overlay.show();
|
909 |
+
};
|
910 |
|
911 |
+
// Blogs Modal
|
912 |
+
this.blogs = function (params) {
|
913 |
|
914 |
+
// Create the modal container
|
915 |
+
var container = $('<form></form>');
|
916 |
|
917 |
+
// Create section to hold title, message and action
|
918 |
+
var section = $('<section></section>');
|
919 |
|
920 |
+
// Create header to hold title
|
921 |
+
var header = $('<h1></h1>');
|
922 |
|
923 |
+
// Create paragraph to hold mesage
|
924 |
+
var message = $('<p></p>').html(params.message);
|
|
|
|
|
|
|
925 |
|
926 |
+
// Create action section
|
927 |
+
var action = $('<div></div>');
|
928 |
|
929 |
+
// Create title
|
930 |
+
var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
|
931 |
|
932 |
+
// Create continue button
|
933 |
+
var continueButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
|
934 |
+
$(this).attr('disabled', 'disabled');
|
935 |
+
self.onBlogs($(this).closest('form').serializeArray());
|
936 |
+
});
|
937 |
|
938 |
+
// Append continue button
|
939 |
+
action.append(continueButton);
|
940 |
|
941 |
+
// Append title to section
|
942 |
+
header.append(title);
|
|
|
|
|
943 |
|
944 |
+
// Append header and message to section
|
945 |
+
section.append(header).append(message);
|
946 |
|
947 |
+
// Append section and action to container
|
948 |
+
container.append(section).append(action);
|
949 |
|
950 |
+
// Render modal
|
951 |
+
self.modal.html(container).show();
|
952 |
+
self.overlay.show();
|
953 |
+
};
|
954 |
|
955 |
+
// Info Modal
|
956 |
+
this.info = function (params) {
|
957 |
|
958 |
+
// Create the modal container
|
959 |
+
var container = $('<div></div>');
|
960 |
|
961 |
+
// Create section to hold title, message and action
|
962 |
+
var section = $('<section></section>');
|
963 |
|
964 |
+
// Create header to hold loader
|
965 |
+
var header = $('<h1></h1>');
|
966 |
|
967 |
+
// Create paragraph to hold mesage
|
968 |
+
var message = $('<p></p>').html(params.message);
|
969 |
|
970 |
+
// Create action section
|
971 |
+
var action = $('<div></div>');
|
972 |
|
973 |
+
// Create loader
|
974 |
+
var loader = $('<span class="ai1wm-loader"></span>');
|
975 |
|
976 |
+
// Create stop import
|
977 |
+
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr('disabled', 'disabled');
|
978 |
|
979 |
+
// Append stop button
|
980 |
+
action.append(stopButton);
|
981 |
|
982 |
+
// Append loader to header
|
983 |
+
header.append(loader);
|
|
|
|
|
984 |
|
985 |
+
// Append header and message to section
|
986 |
+
section.append(header).append(message);
|
987 |
|
988 |
+
// Append section and action to container
|
989 |
+
container.append(section).append(action);
|
990 |
|
991 |
+
// Render modal
|
992 |
+
self.modal.html(container).show();
|
993 |
+
self.overlay.show();
|
994 |
+
};
|
995 |
|
996 |
+
// Done Modal
|
997 |
+
this.done = function (params) {
|
998 |
|
999 |
+
// Create the modal container
|
1000 |
+
var container = $('<div></div>');
|
1001 |
|
1002 |
+
// Create section to hold title, message and action
|
1003 |
+
var section = $('<section></section>');
|
1004 |
|
1005 |
+
// Create header to hold title
|
1006 |
+
var header = $('<h1></h1>');
|
1007 |
|
1008 |
+
// Create paragraph to hold mesage
|
1009 |
+
var message = $('<p></p>').html(params.message);
|
|
|
|
|
1010 |
|
1011 |
+
// Create action section
|
1012 |
+
var action = $('<div></div>');
|
1013 |
|
1014 |
+
// Create title
|
1015 |
+
var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
|
1016 |
|
1017 |
+
// Create close button
|
1018 |
+
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
1019 |
+
self.destroy();
|
1020 |
+
});
|
1021 |
|
1022 |
+
// Append close button
|
1023 |
+
action.append(closeButton);
|
1024 |
|
1025 |
+
// Append title to section
|
1026 |
+
header.append(title);
|
|
|
|
|
1027 |
|
1028 |
+
// Append header and message to section
|
1029 |
+
section.append(header).append(message);
|
1030 |
|
1031 |
+
// Append section and action to container
|
1032 |
+
container.append(section).append(action);
|
1033 |
|
1034 |
+
// Render modal
|
1035 |
+
self.modal.html(container).show();
|
1036 |
+
self.overlay.show();
|
1037 |
};
|
1038 |
|
1039 |
+
// Create the overlay
|
1040 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
1041 |
+
|
1042 |
+
// Create the modal container
|
1043 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
1044 |
+
|
1045 |
+
$('body').append(this.overlay) // Append overlay to body
|
1046 |
+
.append(this.modal); // Append modal to body
|
1047 |
+
};
|
1048 |
+
|
1049 |
+
Modal.prototype.render = function (params) {
|
1050 |
+
|
1051 |
+
// Show modal
|
1052 |
+
switch (params.type) {
|
1053 |
+
case 'error':
|
1054 |
+
this.error(params);
|
1055 |
+
break;
|
1056 |
+
|
1057 |
+
case 'confirm':
|
1058 |
+
this.confirm(params);
|
1059 |
+
break;
|
1060 |
+
|
1061 |
+
case 'blogs':
|
1062 |
+
this.blogs(params);
|
1063 |
+
break;
|
1064 |
+
|
1065 |
+
case 'progress':
|
1066 |
+
this.progress(params);
|
1067 |
+
break;
|
1068 |
+
|
1069 |
+
case 'info':
|
1070 |
+
this.info(params);
|
1071 |
+
break;
|
1072 |
+
|
1073 |
+
case 'done':
|
1074 |
+
this.done(params);
|
1075 |
+
break;
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
this.view = params.type;
|
1079 |
+
};
|
1080 |
+
|
1081 |
+
Modal.prototype.destroy = function () {
|
1082 |
+
this.modal.hide();
|
1083 |
+
this.overlay.hide();
|
1084 |
+
};
|
1085 |
+
|
1086 |
+
module.exports = Modal;
|
1087 |
+
|
1088 |
+
/***/ }),
|
1089 |
+
/* 6 */,
|
1090 |
+
/* 7 */,
|
1091 |
+
/* 8 */
|
1092 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1093 |
+
|
1094 |
+
"use strict";
|
1095 |
+
|
1096 |
+
|
1097 |
+
/**
|
1098 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
1099 |
+
*
|
1100 |
+
* This program is free software: you can redistribute it and/or modify
|
1101 |
+
* it under the terms of the GNU General Public License as published by
|
1102 |
+
* the Free Software Foundation, either version 3 of the License, or
|
1103 |
+
* (at your option) any later version.
|
1104 |
+
*
|
1105 |
+
* This program is distributed in the hope that it will be useful,
|
1106 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1107 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1108 |
+
* GNU General Public License for more details.
|
1109 |
+
*
|
1110 |
+
* You should have received a copy of the GNU General Public License
|
1111 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1112 |
+
*
|
1113 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1114 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1115 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1116 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1117 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1118 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1119 |
+
*/
|
1120 |
+
|
1121 |
+
var Report = __webpack_require__(1),
|
1122 |
+
Feedback = __webpack_require__(2),
|
1123 |
+
Util = __webpack_require__(0),
|
1124 |
+
Import = __webpack_require__(4);
|
1125 |
+
|
1126 |
+
jQuery(document).ready(function ($) {
|
1127 |
+
'use strict';
|
1128 |
|
1129 |
+
$('.ai1wm-backup-actions > a').hover(function () {
|
1130 |
+
$(this).addClass('ai1wm-button-on');
|
1131 |
+
}, function () {
|
1132 |
+
$(this).removeClass('ai1wm-button-on');
|
1133 |
+
});
|
1134 |
|
1135 |
+
// Delete file
|
1136 |
+
$('.ai1wm-backup-delete').click(function (e) {
|
1137 |
+
var self = $(this);
|
1138 |
|
1139 |
+
// Delete file
|
1140 |
+
if (confirm('Are you sure you want to delete this file?')) {
|
1141 |
+
$.ajax({
|
1142 |
+
url: ai1wm_backups.ajax.url,
|
1143 |
+
type: 'POST',
|
1144 |
+
dataType: 'json',
|
1145 |
+
data: {
|
1146 |
+
'secret_key': ai1wm_backups.secret_key,
|
1147 |
+
'archive': self.data('archive')
|
1148 |
+
},
|
1149 |
+
dataFilter: function dataFilter(data, type) {
|
1150 |
+
return Util.json(data);
|
1151 |
+
},
|
1152 |
+
success: function success(data) {
|
1153 |
+
if (data.errors.length === 0) {
|
1154 |
+
self.closest('tr').remove();
|
1155 |
+
if ($('.ai1wm-backups tbody tr').length === 0) {
|
1156 |
+
$('.ai1wm-backups').addClass('ai1wm-hide');
|
1157 |
+
$('.ai1wm-backups-empty').removeClass('ai1wm-hide');
|
1158 |
+
}
|
1159 |
+
}
|
1160 |
+
}
|
1161 |
+
});
|
1162 |
+
}
|
1163 |
|
1164 |
+
e.preventDefault();
|
1165 |
+
});
|
|
|
1166 |
|
1167 |
+
var model = new Import();
|
|
|
|
|
1168 |
|
1169 |
+
// Restore from file
|
1170 |
+
$('.ai1wm-backup-restore').click(function (e) {
|
1171 |
+
var storage = Util.random(12);
|
1172 |
+
var options = Util.form('#ai1wm-backups-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: $(this).data('archive') });
|
1173 |
|
1174 |
+
// Set global params
|
1175 |
+
model.setParams(options);
|
1176 |
|
1177 |
+
// Start import
|
1178 |
+
model.start();
|
|
|
|
|
1179 |
|
1180 |
+
e.preventDefault();
|
1181 |
+
});
|
1182 |
+
});
|
1183 |
|
1184 |
+
/***/ })
|
1185 |
/******/ ]);
|
lib/view/assets/javascript/export.min.js
CHANGED
@@ -1,1190 +1,1251 @@
|
|
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 |
-
/******/
|
15 |
-
/******/
|
16 |
-
/******/
|
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.
|
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__(
|
41 |
/******/ })
|
42 |
/************************************************************************/
|
43 |
/******/ ([
|
44 |
/* 0 */
|
45 |
-
/***/ function(module, exports, __webpack_require__) {
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
var model = new Export();
|
85 |
-
|
86 |
-
// Export to file
|
87 |
-
$('#ai1wm-export-file').click(function (e) {
|
88 |
-
var storage = Util.random(12);
|
89 |
-
var options = Util.form('#ai1wm-export-form').concat({ name: 'storage', value: storage });
|
90 |
-
|
91 |
-
// Set global params
|
92 |
-
model.setParams(options);
|
93 |
-
|
94 |
-
// Start export
|
95 |
-
model.start();
|
96 |
-
|
97 |
-
e.preventDefault();
|
98 |
-
});
|
99 |
-
|
100 |
-
$('.ai1wm-accordion > .ai1wm-title').click(function () {
|
101 |
-
$(this).parent().toggleClass('ai1wm-active');
|
102 |
-
});
|
103 |
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
});
|
109 |
|
110 |
-
|
111 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
-
|
114 |
-
|
|
|
115 |
|
116 |
-
/***/ },
|
117 |
/* 1 */
|
118 |
-
/***/ function(module, exports, __webpack_require__) {
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
'use strict';
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
*
|
125 |
-
* This program is free software: you can redistribute it and/or modify
|
126 |
-
* it under the terms of the GNU General Public License as published by
|
127 |
-
* the Free Software Foundation, either version 3 of the License, or
|
128 |
-
* (at your option) any later version.
|
129 |
-
*
|
130 |
-
* This program is distributed in the hope that it will be useful,
|
131 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
132 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
133 |
-
* GNU General Public License for more details.
|
134 |
-
*
|
135 |
-
* You should have received a copy of the GNU General Public License
|
136 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
137 |
-
*
|
138 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
139 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
140 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
141 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
142 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
143 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
144 |
-
*/
|
145 |
-
|
146 |
-
var Util = __webpack_require__(2);
|
147 |
-
|
148 |
-
jQuery(document).ready(function ($) {
|
149 |
-
'use strict';
|
150 |
-
|
151 |
-
$('#ai1wm-report-problem-button').click(function (e) {
|
152 |
-
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
153 |
|
154 |
-
|
155 |
-
|
156 |
|
157 |
-
|
158 |
-
|
159 |
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
// Hide message
|
198 |
-
setTimeout(function () {
|
199 |
-
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
200 |
-
}, 2000);
|
201 |
-
}
|
202 |
}
|
203 |
-
}
|
204 |
});
|
205 |
});
|
|
|
206 |
|
207 |
-
/***/ },
|
208 |
/* 2 */
|
209 |
-
/***/ function(module, exports) {
|
210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
'use strict';
|
212 |
|
213 |
-
|
214 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
215 |
-
*
|
216 |
-
* This program is free software: you can redistribute it and/or modify
|
217 |
-
* it under the terms of the GNU General Public License as published by
|
218 |
-
* the Free Software Foundation, either version 3 of the License, or
|
219 |
-
* (at your option) any later version.
|
220 |
-
*
|
221 |
-
* This program is distributed in the hope that it will be useful,
|
222 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
223 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
224 |
-
* GNU General Public License for more details.
|
225 |
-
*
|
226 |
-
* You should have received a copy of the GNU General Public License
|
227 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
228 |
-
*
|
229 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
230 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
231 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
232 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
233 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
234 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
235 |
-
*/
|
236 |
-
|
237 |
-
var $ = jQuery;
|
238 |
-
|
239 |
-
module.exports = {
|
240 |
-
random: function random(len) {
|
241 |
-
var text = '';
|
242 |
-
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
243 |
-
|
244 |
-
for (var i = 0; i < len; i++) {
|
245 |
-
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
246 |
-
}
|
247 |
|
248 |
-
|
249 |
-
},
|
250 |
-
form: function form(id) {
|
251 |
-
return $(id).serializeArray();
|
252 |
-
},
|
253 |
-
ucfirst: function ucfirst(text) {
|
254 |
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
255 |
-
},
|
256 |
-
list: function list(input) {
|
257 |
-
// Convert object to list
|
258 |
-
if ($.isPlainObject(input)) {
|
259 |
-
var result = [];
|
260 |
-
var params = decodeURIComponent($.param(input)).split('&');
|
261 |
-
|
262 |
-
// Loop over params
|
263 |
-
$.each(params, function (index, item) {
|
264 |
-
var value = item.split('=');
|
265 |
-
|
266 |
-
// Add item
|
267 |
-
result.push({ name: value[0], value: value[1] });
|
268 |
-
});
|
269 |
-
|
270 |
-
return result;
|
271 |
-
}
|
272 |
-
|
273 |
-
return input;
|
274 |
-
},
|
275 |
-
json: function json(input) {
|
276 |
-
if ($.type(input) === 'string') {
|
277 |
-
var result = input.match(/{[\s\S]+}/);
|
278 |
-
if (result !== null) {
|
279 |
-
return result[0];
|
280 |
-
}
|
281 |
-
}
|
282 |
|
283 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
}
|
285 |
-
};
|
286 |
-
|
287 |
-
/***/ },
|
288 |
-
/* 3 */
|
289 |
-
/***/ function(module, exports, __webpack_require__) {
|
290 |
-
|
291 |
-
'use strict';
|
292 |
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
* it under the terms of the GNU General Public License as published by
|
298 |
-
* the Free Software Foundation, either version 3 of the License, or
|
299 |
-
* (at your option) any later version.
|
300 |
-
*
|
301 |
-
* This program is distributed in the hope that it will be useful,
|
302 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
-
* GNU General Public License for more details.
|
305 |
-
*
|
306 |
-
* You should have received a copy of the GNU General Public License
|
307 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
308 |
-
*
|
309 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
310 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
311 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
312 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
313 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
314 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
315 |
-
*/
|
316 |
-
|
317 |
-
var Util = __webpack_require__(2);
|
318 |
-
|
319 |
-
jQuery(document).ready(function ($) {
|
320 |
-
'use strict';
|
321 |
-
|
322 |
-
// Reset feedback form
|
323 |
-
|
324 |
-
$('.ai1wm-feedback-type').attr('checked', false);
|
325 |
-
|
326 |
-
// Review
|
327 |
-
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
328 |
-
var radio = $('#ai1wm-feedback-type-1');
|
329 |
-
if (radio.is(':checked')) {
|
330 |
-
radio.attr('checked', false);
|
331 |
-
e.preventDefault();
|
332 |
-
} else {
|
333 |
-
radio.attr('checked', true);
|
334 |
-
}
|
335 |
-
});
|
336 |
|
337 |
-
//
|
338 |
-
$('
|
339 |
-
// Hide other options
|
340 |
-
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
341 |
|
342 |
-
|
343 |
-
|
|
|
344 |
|
345 |
-
|
346 |
-
|
347 |
-
|
|
|
348 |
|
349 |
-
//
|
350 |
-
$('
|
351 |
-
// Hide other options
|
352 |
-
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
353 |
|
354 |
-
|
355 |
-
|
|
|
356 |
|
357 |
-
|
358 |
-
|
|
|
|
|
359 |
});
|
|
|
|
|
360 |
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
});
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
errorMessage.append('<p>' + value + '</p>');
|
399 |
-
});
|
400 |
-
|
401 |
-
$('.ai1wm-feedback').prepend(errorMessage);
|
402 |
-
} else {
|
403 |
-
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
404 |
-
$('.ai1wm-feedback').html(successMessage);
|
405 |
-
}
|
406 |
}
|
407 |
-
}
|
408 |
});
|
409 |
});
|
|
|
410 |
|
411 |
-
/***/ },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
/* 4 */,
|
413 |
/* 5 */,
|
414 |
/* 6 */
|
415 |
-
/***/ function(module, exports) {
|
416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
'use strict';
|
418 |
|
419 |
-
|
420 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
421 |
-
*
|
422 |
-
* This program is free software: you can redistribute it and/or modify
|
423 |
-
* it under the terms of the GNU General Public License as published by
|
424 |
-
* the Free Software Foundation, either version 3 of the License, or
|
425 |
-
* (at your option) any later version.
|
426 |
-
*
|
427 |
-
* This program is distributed in the hope that it will be useful,
|
428 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
429 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
430 |
-
* GNU General Public License for more details.
|
431 |
-
*
|
432 |
-
* You should have received a copy of the GNU General Public License
|
433 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
434 |
-
*
|
435 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
436 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
437 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
438 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
439 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
440 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
441 |
-
*/
|
442 |
-
|
443 |
-
;(function ($) {
|
444 |
-
|
445 |
-
$.fn.ai1wm_query = function () {
|
446 |
-
var findInput = $(this).find('input.ai1wm-query-find-input'),
|
447 |
-
replaceInput = $(this).find('input.ai1wm-query-replace-input'),
|
448 |
-
findText = $(this).find('small.ai1wm-query-find-text'),
|
449 |
-
replaceText = $(this).find('small.ai1wm-query-replace-text');
|
450 |
-
|
451 |
-
findInput.on('change paste input keypress keydown keyup', function () {
|
452 |
-
var _inputValue = $(this).val().length > 0 ? $(this).val() : '<text>';
|
453 |
-
findText.text(_inputValue);
|
454 |
-
});
|
455 |
-
|
456 |
-
replaceInput.on('change paste input keypress keydown keyup', function () {
|
457 |
-
var _inputValue = $(this).val().length > 0 ? $(this).val() : '<another-text>';
|
458 |
-
replaceText.text(_inputValue);
|
459 |
-
});
|
460 |
-
return this;
|
461 |
-
};
|
462 |
-
})(jQuery);
|
463 |
-
|
464 |
-
/***/ },
|
465 |
-
/* 7 */
|
466 |
-
/***/ function(module, exports) {
|
467 |
|
468 |
-
'
|
|
|
469 |
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
* This program is free software: you can redistribute it and/or modify
|
474 |
-
* it under the terms of the GNU General Public License as published by
|
475 |
-
* the Free Software Foundation, either version 3 of the License, or
|
476 |
-
* (at your option) any later version.
|
477 |
-
*
|
478 |
-
* This program is distributed in the hope that it will be useful,
|
479 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
480 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
481 |
-
* GNU General Public License for more details.
|
482 |
-
*
|
483 |
-
* You should have received a copy of the GNU General Public License
|
484 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
485 |
-
*
|
486 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
487 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
488 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
489 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
490 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
491 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
492 |
-
*/
|
493 |
-
|
494 |
-
;(function ($) {
|
495 |
-
|
496 |
-
$.fn.ai1wm_find_replace = function () {
|
497 |
-
$(this).click(function (e) {
|
498 |
-
e.preventDefault();
|
499 |
-
|
500 |
-
var row = $('#ai1wm-queries > li:first').clone();
|
501 |
-
|
502 |
-
// Reset input values
|
503 |
-
row.find('input').val('');
|
504 |
-
|
505 |
-
// Reset ai1wm-query-find-text
|
506 |
-
row.find('.ai1wm-query-find-text').html('<text>');
|
507 |
-
|
508 |
-
// Reset ai1wm-query-replace-text
|
509 |
-
row.find('.ai1wm-query-replace-text').html('<another-text>');
|
510 |
-
|
511 |
-
$('#ai1wm-queries > li').removeClass('ai1wm-open');
|
512 |
-
|
513 |
-
$(row).addClass('ai1wm-open');
|
514 |
-
|
515 |
-
// Add new replace fields
|
516 |
-
$('#ai1wm-queries').append(row);
|
517 |
-
$(row).ai1wm_query();
|
518 |
-
$(row).find('p:first').on('click', function () {
|
519 |
-
$(this).parent().toggleClass('ai1wm-open');
|
520 |
-
});
|
521 |
-
});
|
522 |
-
|
523 |
-
return this;
|
524 |
-
};
|
525 |
-
})(jQuery);
|
526 |
-
|
527 |
-
/***/ },
|
528 |
-
/* 8 */
|
529 |
-
/***/ function(module, exports, __webpack_require__) {
|
530 |
|
531 |
-
|
|
|
|
|
532 |
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
* This program is free software: you can redistribute it and/or modify
|
537 |
-
* it under the terms of the GNU General Public License as published by
|
538 |
-
* the Free Software Foundation, either version 3 of the License, or
|
539 |
-
* (at your option) any later version.
|
540 |
-
*
|
541 |
-
* This program is distributed in the hope that it will be useful,
|
542 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
543 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
544 |
-
* GNU General Public License for more details.
|
545 |
-
*
|
546 |
-
* You should have received a copy of the GNU General Public License
|
547 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
548 |
-
*
|
549 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
550 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
551 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
552 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
553 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
554 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
555 |
-
*/
|
556 |
-
|
557 |
-
var Util = __webpack_require__(2),
|
558 |
-
Dialog = __webpack_require__(9);
|
559 |
-
|
560 |
-
var Extensions = {
|
561 |
-
's3': 'Amazon S3 Extension',
|
562 |
-
'url': 'URL Extension',
|
563 |
-
'ftp': 'FTP Extension',
|
564 |
-
'gdrive': 'Google Drive Extension',
|
565 |
-
'dropbox': 'Dropbox Extension'
|
566 |
-
};
|
567 |
-
|
568 |
-
window.Ai1wmExportController = function (provider) {
|
569 |
-
this._export = {};
|
570 |
-
this._provider = provider;
|
571 |
-
};
|
572 |
-
|
573 |
-
window.Ai1wmExportController.prototype.start = function () {
|
574 |
-
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
575 |
-
};
|
576 |
-
|
577 |
-
window.Ai1wmImportController = function (provider) {
|
578 |
-
this._import = {};
|
579 |
-
this._provider = provider;
|
580 |
-
};
|
581 |
|
582 |
-
|
|
|
|
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
|
588 |
-
|
589 |
-
|
|
|
|
|
590 |
|
591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
|
593 |
-
|
594 |
-
|
595 |
|
596 |
-
|
597 |
-
|
598 |
-
$('#ai1wmde-import-file').attr('type', 'button');
|
599 |
|
600 |
-
|
601 |
-
|
602 |
-
$('#ai1wmfe-import-file').attr('type', 'button');
|
603 |
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
|
608 |
-
|
609 |
-
|
610 |
-
$('#ai1wmoe-import-file').attr('type', 'button');
|
611 |
|
612 |
-
|
613 |
-
$('#ai1wmse-import-file-cancel').attr('type', 'button');
|
614 |
-
$('#ai1wmse-import-file').attr('type', 'button');
|
615 |
|
616 |
-
|
617 |
-
|
618 |
-
$('#ai1wmle-import-file').attr('type', 'button');
|
619 |
-
});
|
620 |
-
|
621 |
-
/***/ },
|
622 |
/* 9 */
|
623 |
-
/***/ function(module, exports) {
|
624 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
'use strict';
|
626 |
|
627 |
-
|
628 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
629 |
-
*
|
630 |
-
* This program is free software: you can redistribute it and/or modify
|
631 |
-
* it under the terms of the GNU General Public License as published by
|
632 |
-
* the Free Software Foundation, either version 3 of the License, or
|
633 |
-
* (at your option) any later version.
|
634 |
-
*
|
635 |
-
* This program is distributed in the hope that it will be useful,
|
636 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
637 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
638 |
-
* GNU General Public License for more details.
|
639 |
-
*
|
640 |
-
* You should have received a copy of the GNU General Public License
|
641 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
642 |
-
*
|
643 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
644 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
645 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
646 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
647 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
648 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
649 |
-
*/
|
650 |
-
|
651 |
-
var $ = jQuery;
|
652 |
-
|
653 |
-
var Dialog = function Dialog(text) {
|
654 |
-
var self = this;
|
655 |
-
|
656 |
-
// Create the overlay
|
657 |
-
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
658 |
|
659 |
-
|
660 |
-
|
|
|
|
|
661 |
|
662 |
-
//
|
663 |
-
|
664 |
-
|
665 |
-
// Create section to hold title, message and action
|
666 |
-
this.section = $('<section></section>');
|
667 |
|
668 |
-
//
|
669 |
-
|
670 |
|
671 |
-
|
672 |
-
|
673 |
|
674 |
-
|
675 |
-
this.
|
676 |
-
|
677 |
-
self.overlay.hide();
|
678 |
-
});
|
679 |
|
680 |
-
|
681 |
-
this.action.append(this.closeButton);
|
682 |
|
683 |
-
|
684 |
-
this.
|
|
|
685 |
|
686 |
-
|
687 |
-
|
688 |
|
689 |
-
|
690 |
-
|
691 |
-
this.overlay.show();
|
692 |
|
693 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
};
|
|
|
695 |
|
696 |
-
|
|
|
|
|
697 |
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
|
702 |
-
|
703 |
-
|
704 |
-
/**
|
705 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
706 |
-
*
|
707 |
-
* This program is free software: you can redistribute it and/or modify
|
708 |
-
* it under the terms of the GNU General Public License as published by
|
709 |
-
* the Free Software Foundation, either version 3 of the License, or
|
710 |
-
* (at your option) any later version.
|
711 |
-
*
|
712 |
-
* This program is distributed in the hope that it will be useful,
|
713 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
714 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
715 |
-
* GNU General Public License for more details.
|
716 |
-
*
|
717 |
-
* You should have received a copy of the GNU General Public License
|
718 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
719 |
-
*
|
720 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
721 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
722 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
723 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
724 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
725 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
726 |
-
*/
|
727 |
-
|
728 |
-
var Util = __webpack_require__(2),
|
729 |
-
Modal = __webpack_require__(11),
|
730 |
-
$ = jQuery;
|
731 |
-
|
732 |
-
var Export = function Export() {
|
733 |
-
var self = this;
|
734 |
-
|
735 |
-
// Set params
|
736 |
-
this.params = [];
|
737 |
-
|
738 |
-
// Set stop flag
|
739 |
this.stopExport = false;
|
|
|
740 |
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
this.modal.onStop = function (options) {
|
746 |
-
self.onStop(options);
|
747 |
-
};
|
748 |
-
};
|
749 |
-
|
750 |
-
Export.prototype.setParams = function (params) {
|
751 |
-
this.params = Util.list(params);
|
752 |
-
};
|
753 |
|
754 |
-
|
755 |
-
|
756 |
-
|
|
|
757 |
|
758 |
-
|
759 |
-
|
760 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
}
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
|
|
766 |
}
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
return
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
this.setStatus({ type: 'info', message: 'Preparing to export...' });
|
775 |
-
|
776 |
-
// Set params
|
777 |
-
var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key });
|
778 |
-
|
779 |
-
// Set additional params
|
780 |
-
if (options) {
|
781 |
-
params = params.concat(Util.list(options));
|
782 |
}
|
783 |
|
784 |
-
|
785 |
-
$.ajax({
|
786 |
-
url: ai1wm_export.ajax.url,
|
787 |
-
type: 'POST',
|
788 |
-
dataType: 'json',
|
789 |
-
data: params,
|
790 |
-
dataFilter: function dataFilter(data, type) {
|
791 |
-
return Util.json(data);
|
792 |
-
}
|
793 |
-
}).done(function () {
|
794 |
-
self.getStatus();
|
795 |
-
}).done(function (params) {
|
796 |
-
if (params) {
|
797 |
-
self.run(params);
|
798 |
-
}
|
799 |
-
}).fail(function () {
|
800 |
-
var timeout = retries * 1000;
|
801 |
-
if (retries >= 5) {
|
802 |
-
return self.setStatus({
|
803 |
-
type: 'error',
|
804 |
-
message: 'Unable to start the export. Refresh the page and try again'
|
805 |
-
});
|
806 |
-
}
|
807 |
-
|
808 |
-
retries++;
|
809 |
-
|
810 |
-
setTimeout(self.start.bind(self, options, retries), timeout);
|
811 |
-
});
|
812 |
-
};
|
813 |
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
}
|
822 |
|
823 |
-
|
824 |
-
$.ajax({
|
825 |
-
url: ai1wm_export.ajax.url,
|
826 |
-
type: 'POST',
|
827 |
-
dataType: 'json',
|
828 |
-
data: params,
|
829 |
-
dataFilter: function dataFilter(data, type) {
|
830 |
-
return Util.json(data);
|
831 |
-
}
|
832 |
-
}).done(function (params) {
|
833 |
-
if (params) {
|
834 |
-
self.run(params);
|
835 |
-
}
|
836 |
-
}).fail(function () {
|
837 |
-
var timeout = retries * 1000;
|
838 |
-
if (retries >= 5) {
|
839 |
-
return self.setStatus({
|
840 |
-
type: 'error',
|
841 |
-
message: 'Unable to run the export. Refresh the page and try again'
|
842 |
-
});
|
843 |
-
}
|
844 |
-
|
845 |
-
retries++;
|
846 |
-
|
847 |
-
setTimeout(self.run.bind(self, params, retries), timeout);
|
848 |
-
});
|
849 |
-
};
|
850 |
-
|
851 |
-
Export.prototype.clean = function (options, retries) {
|
852 |
-
var self = this;
|
853 |
-
var retries = retries || 0;
|
854 |
-
|
855 |
-
// Set stop flag
|
856 |
-
this.stopExport = true;
|
857 |
|
858 |
-
|
859 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
860 |
|
861 |
-
|
862 |
-
var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key }).concat({ name: 'priority', value: 300 });
|
863 |
|
864 |
-
|
865 |
-
|
866 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
867 |
}
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
|
|
|
|
|
|
877 |
}
|
878 |
-
}).done(function () {
|
879 |
-
// Unbinding the beforeunload event when we stop exporting
|
880 |
-
$(window).unbind('beforeunload');
|
881 |
-
|
882 |
-
// Destroy modal
|
883 |
-
self.modal.destroy();
|
884 |
-
}).fail(function () {
|
885 |
-
var timeout = retries * 1000;
|
886 |
-
if (retries >= 5) {
|
887 |
-
return self.setStatus({
|
888 |
-
type: 'error',
|
889 |
-
message: 'Unable to stop the export. Refresh the page and try again'
|
890 |
-
});
|
891 |
-
}
|
892 |
-
|
893 |
-
retries++;
|
894 |
-
|
895 |
-
setTimeout(self.clean.bind(self, options, retries), timeout);
|
896 |
-
});
|
897 |
-
};
|
898 |
-
|
899 |
-
Export.prototype.getStatus = function () {
|
900 |
-
var self = this;
|
901 |
-
|
902 |
-
// Stop getting status
|
903 |
-
if (this.stopExport) {
|
904 |
-
return;
|
905 |
}
|
906 |
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
929 |
|
930 |
-
|
931 |
-
|
932 |
-
}).fail(function () {
|
933 |
-
// Export is not done yet, let's check status in 3 seconds
|
934 |
-
setTimeout(self.getStatus.bind(self), 3000);
|
935 |
-
});
|
936 |
-
};
|
937 |
|
938 |
-
|
939 |
-
|
940 |
-
};
|
941 |
|
942 |
-
|
943 |
-
|
944 |
-
};
|
945 |
|
946 |
-
|
|
|
947 |
|
948 |
-
|
949 |
-
|
950 |
-
/***/ function(module, exports) {
|
951 |
|
952 |
-
|
|
|
953 |
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
* it under the terms of the GNU General Public License as published by
|
959 |
-
* the Free Software Foundation, either version 3 of the License, or
|
960 |
-
* (at your option) any later version.
|
961 |
-
*
|
962 |
-
* This program is distributed in the hope that it will be useful,
|
963 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
964 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
965 |
-
* GNU General Public License for more details.
|
966 |
-
*
|
967 |
-
* You should have received a copy of the GNU General Public License
|
968 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
969 |
-
*
|
970 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
971 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
972 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
973 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
974 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
975 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
976 |
-
*/
|
977 |
-
|
978 |
-
var $ = jQuery;
|
979 |
-
|
980 |
-
var Modal = function Modal() {
|
981 |
-
var self = this;
|
982 |
-
|
983 |
-
// Error Modal
|
984 |
-
this.error = function (params) {
|
985 |
-
|
986 |
-
// Create the modal container
|
987 |
-
var container = $('<div></div>');
|
988 |
-
|
989 |
-
// Create section to hold title, message and action
|
990 |
-
var section = $('<section></section>');
|
991 |
-
|
992 |
-
// Create header to hold title
|
993 |
-
var header = $('<h1></h1>');
|
994 |
-
|
995 |
-
// Create paragraph to hold mesage
|
996 |
-
var message = $('<p></p>').html(params.message);
|
997 |
-
|
998 |
-
// Create action section
|
999 |
-
var action = $('<div></div>');
|
1000 |
-
|
1001 |
-
// Create title
|
1002 |
-
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to export');
|
1003 |
-
|
1004 |
-
// Create close button
|
1005 |
-
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
1006 |
-
self.destroy();
|
1007 |
-
});
|
1008 |
|
1009 |
-
|
1010 |
-
|
1011 |
|
1012 |
-
|
1013 |
-
|
1014 |
|
1015 |
-
|
1016 |
-
|
1017 |
|
1018 |
-
|
1019 |
-
|
1020 |
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
|
1026 |
-
|
1027 |
-
|
1028 |
|
1029 |
-
|
1030 |
-
|
1031 |
|
1032 |
-
|
1033 |
-
|
1034 |
|
1035 |
-
|
1036 |
-
|
1037 |
|
1038 |
-
|
1039 |
-
|
1040 |
|
1041 |
-
|
1042 |
-
|
1043 |
|
1044 |
-
|
1045 |
-
|
1046 |
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
|
1053 |
-
|
1054 |
-
|
1055 |
|
1056 |
-
|
1057 |
-
|
1058 |
|
1059 |
-
|
1060 |
-
|
1061 |
|
1062 |
-
|
1063 |
-
|
1064 |
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
|
1070 |
-
|
1071 |
-
|
1072 |
|
1073 |
-
|
1074 |
-
|
1075 |
|
1076 |
-
|
1077 |
-
|
1078 |
|
1079 |
-
|
1080 |
-
|
1081 |
|
1082 |
-
|
1083 |
-
|
1084 |
|
1085 |
-
|
1086 |
-
|
1087 |
|
1088 |
-
|
1089 |
-
|
1090 |
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
|
1096 |
-
|
1097 |
-
|
1098 |
|
1099 |
-
|
1100 |
-
|
1101 |
|
1102 |
-
|
1103 |
-
|
1104 |
|
1105 |
-
|
1106 |
-
|
1107 |
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
|
1113 |
-
|
1114 |
-
|
1115 |
|
1116 |
-
|
1117 |
-
|
1118 |
|
1119 |
-
|
1120 |
-
|
1121 |
|
1122 |
-
|
1123 |
-
|
1124 |
|
1125 |
-
|
1126 |
-
|
1127 |
|
1128 |
-
|
1129 |
-
|
1130 |
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
|
1136 |
-
|
1137 |
-
|
1138 |
|
1139 |
-
|
1140 |
-
|
1141 |
|
1142 |
-
|
1143 |
-
|
1144 |
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
|
1150 |
-
|
1151 |
-
|
1152 |
|
1153 |
-
|
1154 |
-
|
1155 |
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
|
1160 |
-
|
1161 |
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
|
1187 |
-
|
1188 |
|
1189 |
-
/***/ }
|
1190 |
/******/ ]);
|
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 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
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.l = 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 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, {
|
40 |
+
/******/ configurable: false,
|
41 |
+
/******/ enumerable: true,
|
42 |
+
/******/ get: getter
|
43 |
+
/******/ });
|
44 |
+
/******/ }
|
45 |
+
/******/ };
|
46 |
+
/******/
|
47 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
+
/******/ __webpack_require__.n = function(module) {
|
49 |
+
/******/ var getter = module && module.__esModule ?
|
50 |
+
/******/ function getDefault() { return module['default']; } :
|
51 |
+
/******/ function getModuleExports() { return module; };
|
52 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
+
/******/ return getter;
|
54 |
+
/******/ };
|
55 |
+
/******/
|
56 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
+
/******/
|
59 |
/******/ // __webpack_public_path__
|
60 |
/******/ __webpack_require__.p = "";
|
61 |
+
/******/
|
62 |
/******/ // Load entry module and return exports
|
63 |
+
/******/ return __webpack_require__(__webpack_require__.s = 9);
|
64 |
/******/ })
|
65 |
/************************************************************************/
|
66 |
/******/ ([
|
67 |
/* 0 */
|
68 |
+
/***/ (function(module, exports, __webpack_require__) {
|
69 |
+
|
70 |
+
"use strict";
|
71 |
+
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
75 |
+
*
|
76 |
+
* This program is free software: you can redistribute it and/or modify
|
77 |
+
* it under the terms of the GNU General Public License as published by
|
78 |
+
* the Free Software Foundation, either version 3 of the License, or
|
79 |
+
* (at your option) any later version.
|
80 |
+
*
|
81 |
+
* This program is distributed in the hope that it will be useful,
|
82 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
83 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
84 |
+
* GNU General Public License for more details.
|
85 |
+
*
|
86 |
+
* You should have received a copy of the GNU General Public License
|
87 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
88 |
+
*
|
89 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
90 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
91 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
92 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
93 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
94 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
95 |
+
*/
|
96 |
+
|
97 |
+
var $ = jQuery;
|
98 |
+
|
99 |
+
module.exports = {
|
100 |
+
random: function random(len) {
|
101 |
+
var text = '';
|
102 |
+
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
103 |
+
|
104 |
+
for (var i = 0; i < len; i++) {
|
105 |
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
106 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
+
return text;
|
109 |
+
},
|
110 |
+
form: function form(id) {
|
111 |
+
return $(id).serializeArray();
|
112 |
+
},
|
113 |
+
ucfirst: function ucfirst(text) {
|
114 |
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
115 |
+
},
|
116 |
+
list: function list(input) {
|
117 |
+
// Convert object to list
|
118 |
+
if ($.isPlainObject(input)) {
|
119 |
+
var result = [];
|
120 |
+
var params = decodeURIComponent($.param(input)).split('&');
|
121 |
+
|
122 |
+
// Loop over params
|
123 |
+
$.each(params, function (index, item) {
|
124 |
+
var value = item.split('=');
|
125 |
+
|
126 |
+
// Add item
|
127 |
+
result.push({ name: value[0], value: value[1] });
|
128 |
+
});
|
129 |
|
130 |
+
return result;
|
131 |
+
}
|
|
|
132 |
|
133 |
+
return input;
|
134 |
+
},
|
135 |
+
json: function json(input) {
|
136 |
+
if ($.type(input) === 'string') {
|
137 |
+
var result = input.match(/{[\s\S]+}/);
|
138 |
+
if (result !== null) {
|
139 |
+
return result[0];
|
140 |
+
}
|
141 |
+
}
|
142 |
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
};
|
146 |
|
147 |
+
/***/ }),
|
148 |
/* 1 */
|
149 |
+
/***/ (function(module, exports, __webpack_require__) {
|
150 |
+
|
151 |
+
"use strict";
|
152 |
+
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
156 |
+
*
|
157 |
+
* This program is free software: you can redistribute it and/or modify
|
158 |
+
* it under the terms of the GNU General Public License as published by
|
159 |
+
* the Free Software Foundation, either version 3 of the License, or
|
160 |
+
* (at your option) any later version.
|
161 |
+
*
|
162 |
+
* This program is distributed in the hope that it will be useful,
|
163 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
164 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
165 |
+
* GNU General Public License for more details.
|
166 |
+
*
|
167 |
+
* You should have received a copy of the GNU General Public License
|
168 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
169 |
+
*
|
170 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
171 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
172 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
173 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
174 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
175 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
176 |
+
*/
|
177 |
+
|
178 |
+
var Util = __webpack_require__(0);
|
179 |
+
|
180 |
+
jQuery(document).ready(function ($) {
|
181 |
'use strict';
|
182 |
|
183 |
+
$('#ai1wm-report-problem-button').click(function (e) {
|
184 |
+
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
+
e.preventDefault();
|
187 |
+
});
|
188 |
|
189 |
+
$('#ai1wm-report-cancel').click(function (e) {
|
190 |
+
$(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
191 |
|
192 |
+
e.preventDefault();
|
193 |
+
});
|
194 |
+
|
195 |
+
$('#ai1wm-report-submit').click(function () {
|
196 |
+
var email = $('.ai1wm-report-email').val();
|
197 |
+
var message = $('.ai1wm-report-message').val();
|
198 |
+
var terms = $('.ai1wm-report-terms').is(':checked');
|
199 |
|
200 |
+
$.ajax({
|
201 |
+
url: ai1wm_report.ajax.url,
|
202 |
+
type: 'POST',
|
203 |
+
dataType: 'json',
|
204 |
+
async: false,
|
205 |
+
data: {
|
206 |
+
'secret_key': ai1wm_report.secret_key,
|
207 |
+
'ai1wm_email': email,
|
208 |
+
'ai1wm_message': message,
|
209 |
+
'ai1wm_terms': +terms
|
210 |
+
},
|
211 |
+
dataFilter: function dataFilter(data, type) {
|
212 |
+
return Util.json(data);
|
213 |
+
},
|
214 |
+
success: function success(data) {
|
215 |
+
if (data.errors.length > 0) {
|
216 |
+
// Reset previous messages
|
217 |
+
$('.ai1wm-report-problem-dialog .ai1wm-message').remove();
|
218 |
+
|
219 |
+
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
220 |
+
$.each(data.errors, function (key, value) {
|
221 |
+
errorMessage.append('<p>' + value + '</p>');
|
222 |
+
});
|
223 |
+
|
224 |
+
$('.ai1wm-report-problem-dialog').prepend(errorMessage);
|
225 |
+
} else {
|
226 |
+
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
|
227 |
+
$('.ai1wm-report-problem-dialog').html(successMessage);
|
228 |
+
|
229 |
+
// Hide message
|
230 |
+
setTimeout(function () {
|
231 |
+
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
232 |
+
}, 2000);
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
}
|
234 |
+
}
|
235 |
});
|
236 |
});
|
237 |
+
});
|
238 |
|
239 |
+
/***/ }),
|
240 |
/* 2 */
|
241 |
+
/***/ (function(module, exports, __webpack_require__) {
|
242 |
+
|
243 |
+
"use strict";
|
244 |
+
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
248 |
+
*
|
249 |
+
* This program is free software: you can redistribute it and/or modify
|
250 |
+
* it under the terms of the GNU General Public License as published by
|
251 |
+
* the Free Software Foundation, either version 3 of the License, or
|
252 |
+
* (at your option) any later version.
|
253 |
+
*
|
254 |
+
* This program is distributed in the hope that it will be useful,
|
255 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
256 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
257 |
+
* GNU General Public License for more details.
|
258 |
+
*
|
259 |
+
* You should have received a copy of the GNU General Public License
|
260 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
261 |
+
*
|
262 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
263 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
264 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
265 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
266 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
267 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
268 |
+
*/
|
269 |
+
|
270 |
+
var Util = __webpack_require__(0);
|
271 |
+
|
272 |
+
jQuery(document).ready(function ($) {
|
273 |
'use strict';
|
274 |
|
275 |
+
// Reset feedback form
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
|
277 |
+
$('.ai1wm-feedback-type').attr('checked', false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
|
279 |
+
// Review
|
280 |
+
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
281 |
+
var radio = $('#ai1wm-feedback-type-1');
|
282 |
+
if (radio.is(':checked')) {
|
283 |
+
radio.attr('checked', false);
|
284 |
+
e.preventDefault();
|
285 |
+
} else {
|
286 |
+
radio.attr('checked', true);
|
287 |
}
|
288 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
+
// Improvement
|
291 |
+
$('#ai1wm-feedback-type-2').click(function () {
|
292 |
+
// Hide other options
|
293 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
|
295 |
+
// change placeholder message
|
296 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
|
|
|
|
|
297 |
|
298 |
+
// Show feedback form
|
299 |
+
$('.ai1wm-feedback-form').fadeIn();
|
300 |
+
});
|
301 |
|
302 |
+
// Help
|
303 |
+
$('#ai1wm-feedback-type-3').click(function () {
|
304 |
+
// Hide other options
|
305 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
306 |
|
307 |
+
// change placeholder message
|
308 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
|
|
|
|
|
309 |
|
310 |
+
// Show feedback form
|
311 |
+
$('.ai1wm-feedback-form').fadeIn();
|
312 |
+
});
|
313 |
|
314 |
+
// Cancel feedback form
|
315 |
+
$('#ai1wm-feedback-cancel').click(function (e) {
|
316 |
+
$('.ai1wm-feedback-form').fadeOut(function () {
|
317 |
+
$('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
|
318 |
});
|
319 |
+
e.preventDefault();
|
320 |
+
});
|
321 |
|
322 |
+
// Send feedback form
|
323 |
+
$('#ai1wm-feedback-submit').click(function () {
|
324 |
+
var type = $('.ai1wm-feedback-type:checked').val();
|
325 |
+
var email = $('.ai1wm-feedback-email').val();
|
326 |
+
var message = $('.ai1wm-feedback-message').val();
|
327 |
+
var terms = $('.ai1wm-feedback-terms').is(':checked');
|
|
|
328 |
|
329 |
+
$.ajax({
|
330 |
+
url: ai1wm_feedback.ajax.url,
|
331 |
+
type: 'POST',
|
332 |
+
dataType: 'json',
|
333 |
+
async: false,
|
334 |
+
data: {
|
335 |
+
'secret_key': ai1wm_feedback.secret_key,
|
336 |
+
'ai1wm_type': type,
|
337 |
+
'ai1wm_email': email,
|
338 |
+
'ai1wm_message': message,
|
339 |
+
'ai1wm_terms': +terms
|
340 |
+
},
|
341 |
+
dataFilter: function dataFilter(data, type) {
|
342 |
+
return Util.json(data);
|
343 |
+
},
|
344 |
+
success: function success(data) {
|
345 |
+
if (data.errors.length > 0) {
|
346 |
+
// Reset previous messages
|
347 |
+
$('.ai1wm-feedback .ai1wm-message').remove();
|
348 |
+
|
349 |
+
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
350 |
+
$.each(data.errors, function (key, value) {
|
351 |
+
errorMessage.append('<p>' + value + '</p>');
|
352 |
+
});
|
353 |
+
|
354 |
+
$('.ai1wm-feedback').prepend(errorMessage);
|
355 |
+
} else {
|
356 |
+
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
357 |
+
$('.ai1wm-feedback').html(successMessage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
}
|
359 |
+
}
|
360 |
});
|
361 |
});
|
362 |
+
});
|
363 |
|
364 |
+
/***/ }),
|
365 |
+
/* 3 */
|
366 |
+
/***/ (function(module, exports) {
|
367 |
+
|
368 |
+
var g;
|
369 |
+
|
370 |
+
// This works in non-strict mode
|
371 |
+
g = (function() {
|
372 |
+
return this;
|
373 |
+
})();
|
374 |
+
|
375 |
+
try {
|
376 |
+
// This works if eval is allowed (see CSP)
|
377 |
+
g = g || Function("return this")() || (1,eval)("this");
|
378 |
+
} catch(e) {
|
379 |
+
// This works if the window reference is available
|
380 |
+
if(typeof window === "object")
|
381 |
+
g = window;
|
382 |
+
}
|
383 |
+
|
384 |
+
// g can still be undefined, but nothing to do about it...
|
385 |
+
// We return undefined, instead of nothing here, so it's
|
386 |
+
// easier to handle this case. if(!global) { ...}
|
387 |
+
|
388 |
+
module.exports = g;
|
389 |
+
|
390 |
+
|
391 |
+
/***/ }),
|
392 |
/* 4 */,
|
393 |
/* 5 */,
|
394 |
/* 6 */
|
395 |
+
/***/ (function(module, exports, __webpack_require__) {
|
396 |
+
|
397 |
+
"use strict";
|
398 |
+
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
402 |
+
*
|
403 |
+
* This program is free software: you can redistribute it and/or modify
|
404 |
+
* it under the terms of the GNU General Public License as published by
|
405 |
+
* the Free Software Foundation, either version 3 of the License, or
|
406 |
+
* (at your option) any later version.
|
407 |
+
*
|
408 |
+
* This program is distributed in the hope that it will be useful,
|
409 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
410 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
411 |
+
* GNU General Public License for more details.
|
412 |
+
*
|
413 |
+
* You should have received a copy of the GNU General Public License
|
414 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
415 |
+
*
|
416 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
417 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
418 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
419 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
420 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
421 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
422 |
+
*/
|
423 |
+
|
424 |
+
var Util = __webpack_require__(0),
|
425 |
+
Dialog = __webpack_require__(7);
|
426 |
+
|
427 |
+
var Extensions = {
|
428 |
+
's3': 'Amazon S3 Extension',
|
429 |
+
'url': 'URL Extension',
|
430 |
+
'ftp': 'FTP Extension',
|
431 |
+
'gdrive': 'Google Drive Extension',
|
432 |
+
'dropbox': 'Dropbox Extension'
|
433 |
+
};
|
434 |
+
|
435 |
+
window.Ai1wmExportController = function (provider) {
|
436 |
+
this._export = {};
|
437 |
+
this._provider = provider;
|
438 |
+
};
|
439 |
+
|
440 |
+
window.Ai1wmExportController.prototype.start = function () {
|
441 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
442 |
+
};
|
443 |
+
|
444 |
+
window.Ai1wmImportController = function (provider) {
|
445 |
+
this._import = {};
|
446 |
+
this._provider = provider;
|
447 |
+
};
|
448 |
+
|
449 |
+
window.Ai1wmImportController.prototype.init = function () {};
|
450 |
+
|
451 |
+
window.Ai1wmImportController.prototype.download = function () {
|
452 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
453 |
+
};
|
454 |
+
|
455 |
+
jQuery(document).ready(function ($) {
|
456 |
'use strict';
|
457 |
|
458 |
+
// Box extension
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
|
460 |
+
$('#ai1wmbe-import-file-cancel').attr('type', 'button');
|
461 |
+
$('#ai1wmbe-import-file').attr('type', 'button');
|
462 |
|
463 |
+
// Dropbox extension
|
464 |
+
$('#ai1wmde-import-file-cancel').attr('type', 'button');
|
465 |
+
$('#ai1wmde-import-file').attr('type', 'button');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
|
467 |
+
// FTP extension
|
468 |
+
$('#ai1wmfe-import-file-cancel').attr('type', 'button');
|
469 |
+
$('#ai1wmfe-import-file').attr('type', 'button');
|
470 |
|
471 |
+
// Google Drive extension
|
472 |
+
$('#ai1wmge-import-file-cancel').attr('type', 'button');
|
473 |
+
$('#ai1wmge-import-file').attr('type', 'button');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
|
475 |
+
// OneDrive extension
|
476 |
+
$('#ai1wmoe-import-file-cancel').attr('type', 'button');
|
477 |
+
$('#ai1wmoe-import-file').attr('type', 'button');
|
478 |
|
479 |
+
// Amazon S3 extension
|
480 |
+
$('#ai1wmse-import-file-cancel').attr('type', 'button');
|
481 |
+
$('#ai1wmse-import-file').attr('type', 'button');
|
482 |
|
483 |
+
// URL extension
|
484 |
+
$('#ai1wmle-import-file-cancel').attr('type', 'button');
|
485 |
+
$('#ai1wmle-import-file').attr('type', 'button');
|
486 |
+
});
|
487 |
|
488 |
+
/***/ }),
|
489 |
+
/* 7 */
|
490 |
+
/***/ (function(module, exports, __webpack_require__) {
|
491 |
+
|
492 |
+
"use strict";
|
493 |
+
|
494 |
+
|
495 |
+
/**
|
496 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
497 |
+
*
|
498 |
+
* This program is free software: you can redistribute it and/or modify
|
499 |
+
* it under the terms of the GNU General Public License as published by
|
500 |
+
* the Free Software Foundation, either version 3 of the License, or
|
501 |
+
* (at your option) any later version.
|
502 |
+
*
|
503 |
+
* This program is distributed in the hope that it will be useful,
|
504 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
505 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
506 |
+
* GNU General Public License for more details.
|
507 |
+
*
|
508 |
+
* You should have received a copy of the GNU General Public License
|
509 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
510 |
+
*
|
511 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
512 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
513 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
514 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
515 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
516 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
517 |
+
*/
|
518 |
+
|
519 |
+
var $ = jQuery;
|
520 |
+
|
521 |
+
var Dialog = function Dialog(text) {
|
522 |
+
var self = this;
|
523 |
+
|
524 |
+
// Create the overlay
|
525 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
526 |
+
|
527 |
+
// Create the modal container
|
528 |
+
this.container = $('<div></div>');
|
529 |
+
|
530 |
+
// Create the modal container
|
531 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
532 |
+
|
533 |
+
// Create section to hold title, message and action
|
534 |
+
this.section = $('<section></section>');
|
535 |
+
|
536 |
+
// Create paragraph to hold mesage
|
537 |
+
this.message = $('<p></p>').addClass('ai1wm-dialog-message').html(text);
|
538 |
+
|
539 |
+
// Create action section
|
540 |
+
this.action = $('<div></div>');
|
541 |
+
|
542 |
+
// Create close button
|
543 |
+
this.closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
544 |
+
self.modal.hide();
|
545 |
+
self.overlay.hide();
|
546 |
+
});
|
547 |
|
548 |
+
// Append close button
|
549 |
+
this.action.append(this.closeButton);
|
550 |
|
551 |
+
// Append message to section
|
552 |
+
this.section.append(this.message);
|
|
|
553 |
|
554 |
+
// Append section and action to container
|
555 |
+
this.container.append(this.section).append(this.action);
|
|
|
556 |
|
557 |
+
// Render modal
|
558 |
+
this.modal.html(this.container).show();
|
559 |
+
this.overlay.show();
|
560 |
|
561 |
+
$('body').append(this.overlay).append(this.modal);
|
562 |
+
};
|
|
|
563 |
|
564 |
+
module.exports = Dialog;
|
|
|
|
|
565 |
|
566 |
+
/***/ }),
|
567 |
+
/* 8 */,
|
|
|
|
|
|
|
|
|
568 |
/* 9 */
|
569 |
+
/***/ (function(module, exports, __webpack_require__) {
|
570 |
+
|
571 |
+
"use strict";
|
572 |
+
/* WEBPACK VAR INJECTION */(function(global) {
|
573 |
+
|
574 |
+
/**
|
575 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
576 |
+
*
|
577 |
+
* This program is free software: you can redistribute it and/or modify
|
578 |
+
* it under the terms of the GNU General Public License as published by
|
579 |
+
* the Free Software Foundation, either version 3 of the License, or
|
580 |
+
* (at your option) any later version.
|
581 |
+
*
|
582 |
+
* This program is distributed in the hope that it will be useful,
|
583 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
584 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
585 |
+
* GNU General Public License for more details.
|
586 |
+
*
|
587 |
+
* You should have received a copy of the GNU General Public License
|
588 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
589 |
+
*
|
590 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
591 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
592 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
593 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
594 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
595 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
596 |
+
*/
|
597 |
+
|
598 |
+
var Query = __webpack_require__(10),
|
599 |
+
FindReplace = __webpack_require__(11),
|
600 |
+
Report = __webpack_require__(1),
|
601 |
+
Feedback = __webpack_require__(2),
|
602 |
+
Util = __webpack_require__(0),
|
603 |
+
Deprecated = __webpack_require__(6),
|
604 |
+
Export = __webpack_require__(12);
|
605 |
+
|
606 |
+
jQuery(document).ready(function ($) {
|
607 |
'use strict';
|
608 |
|
609 |
+
var model = new Export();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
|
611 |
+
// Export to file
|
612 |
+
$('#ai1wm-export-file').click(function (e) {
|
613 |
+
var storage = Util.random(12);
|
614 |
+
var options = Util.form('#ai1wm-export-form').concat({ name: 'storage', value: storage });
|
615 |
|
616 |
+
// Set global params
|
617 |
+
model.setParams(options);
|
|
|
|
|
|
|
618 |
|
619 |
+
// Start export
|
620 |
+
model.start();
|
621 |
|
622 |
+
e.preventDefault();
|
623 |
+
});
|
624 |
|
625 |
+
$('.ai1wm-accordion > .ai1wm-title').click(function () {
|
626 |
+
$(this).parent().toggleClass('ai1wm-active');
|
627 |
+
});
|
|
|
|
|
628 |
|
629 |
+
$('#ai1wm-add-new-replace-button').ai1wm_find_replace();
|
|
|
630 |
|
631 |
+
$('.ai1wm-expandable > p:first, .ai1wm-expandable > h4:first, .ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
|
632 |
+
$(this).parent().toggleClass('ai1wm-open');
|
633 |
+
});
|
634 |
|
635 |
+
$('.ai1wm-collapsable').ai1wm_query();
|
636 |
+
});
|
637 |
|
638 |
+
global.Ai1wm = { Util: Util, Export: Export };
|
639 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
|
|
|
640 |
|
641 |
+
/***/ }),
|
642 |
+
/* 10 */
|
643 |
+
/***/ (function(module, exports, __webpack_require__) {
|
644 |
+
|
645 |
+
"use strict";
|
646 |
+
|
647 |
+
|
648 |
+
/**
|
649 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
650 |
+
*
|
651 |
+
* This program is free software: you can redistribute it and/or modify
|
652 |
+
* it under the terms of the GNU General Public License as published by
|
653 |
+
* the Free Software Foundation, either version 3 of the License, or
|
654 |
+
* (at your option) any later version.
|
655 |
+
*
|
656 |
+
* This program is distributed in the hope that it will be useful,
|
657 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
658 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
659 |
+
* GNU General Public License for more details.
|
660 |
+
*
|
661 |
+
* You should have received a copy of the GNU General Public License
|
662 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
663 |
+
*
|
664 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
665 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
666 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
667 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
668 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
669 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
670 |
+
*/
|
671 |
+
|
672 |
+
;(function ($) {
|
673 |
+
|
674 |
+
$.fn.ai1wm_query = function () {
|
675 |
+
var findInput = $(this).find('input.ai1wm-query-find-input'),
|
676 |
+
replaceInput = $(this).find('input.ai1wm-query-replace-input'),
|
677 |
+
findText = $(this).find('small.ai1wm-query-find-text'),
|
678 |
+
replaceText = $(this).find('small.ai1wm-query-replace-text');
|
679 |
+
|
680 |
+
findInput.on('change paste input keypress keydown keyup', function () {
|
681 |
+
var _inputValue = $(this).val().length > 0 ? $(this).val() : '<text>';
|
682 |
+
findText.text(_inputValue);
|
683 |
+
});
|
684 |
+
|
685 |
+
replaceInput.on('change paste input keypress keydown keyup', function () {
|
686 |
+
var _inputValue = $(this).val().length > 0 ? $(this).val() : '<another-text>';
|
687 |
+
replaceText.text(_inputValue);
|
688 |
+
});
|
689 |
+
return this;
|
690 |
+
};
|
691 |
+
})(jQuery);
|
692 |
+
|
693 |
+
/***/ }),
|
694 |
+
/* 11 */
|
695 |
+
/***/ (function(module, exports, __webpack_require__) {
|
696 |
+
|
697 |
+
"use strict";
|
698 |
+
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
702 |
+
*
|
703 |
+
* This program is free software: you can redistribute it and/or modify
|
704 |
+
* it under the terms of the GNU General Public License as published by
|
705 |
+
* the Free Software Foundation, either version 3 of the License, or
|
706 |
+
* (at your option) any later version.
|
707 |
+
*
|
708 |
+
* This program is distributed in the hope that it will be useful,
|
709 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
710 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
711 |
+
* GNU General Public License for more details.
|
712 |
+
*
|
713 |
+
* You should have received a copy of the GNU General Public License
|
714 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
715 |
+
*
|
716 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
717 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
718 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
719 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
720 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
721 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
722 |
+
*/
|
723 |
+
|
724 |
+
;(function ($) {
|
725 |
+
|
726 |
+
$.fn.ai1wm_find_replace = function () {
|
727 |
+
$(this).click(function (e) {
|
728 |
+
e.preventDefault();
|
729 |
+
|
730 |
+
var row = $('#ai1wm-queries > li:first').clone();
|
731 |
+
|
732 |
+
// Reset input values
|
733 |
+
row.find('input').val('');
|
734 |
+
|
735 |
+
// Reset ai1wm-query-find-text
|
736 |
+
row.find('.ai1wm-query-find-text').html('<text>');
|
737 |
+
|
738 |
+
// Reset ai1wm-query-replace-text
|
739 |
+
row.find('.ai1wm-query-replace-text').html('<another-text>');
|
740 |
+
|
741 |
+
$('#ai1wm-queries > li').removeClass('ai1wm-open');
|
742 |
+
|
743 |
+
$(row).addClass('ai1wm-open');
|
744 |
+
|
745 |
+
// Add new replace fields
|
746 |
+
$('#ai1wm-queries').append(row);
|
747 |
+
$(row).ai1wm_query();
|
748 |
+
$(row).find('p:first').on('click', function () {
|
749 |
+
$(this).parent().toggleClass('ai1wm-open');
|
750 |
+
});
|
751 |
+
});
|
752 |
+
|
753 |
+
return this;
|
754 |
+
};
|
755 |
+
})(jQuery);
|
756 |
+
|
757 |
+
/***/ }),
|
758 |
+
/* 12 */
|
759 |
+
/***/ (function(module, exports, __webpack_require__) {
|
760 |
+
|
761 |
+
"use strict";
|
762 |
+
|
763 |
+
|
764 |
+
/**
|
765 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
766 |
+
*
|
767 |
+
* This program is free software: you can redistribute it and/or modify
|
768 |
+
* it under the terms of the GNU General Public License as published by
|
769 |
+
* the Free Software Foundation, either version 3 of the License, or
|
770 |
+
* (at your option) any later version.
|
771 |
+
*
|
772 |
+
* This program is distributed in the hope that it will be useful,
|
773 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
774 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
775 |
+
* GNU General Public License for more details.
|
776 |
+
*
|
777 |
+
* You should have received a copy of the GNU General Public License
|
778 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
779 |
+
*
|
780 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
781 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
782 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
783 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
784 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
785 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
786 |
+
*/
|
787 |
+
|
788 |
+
var Util = __webpack_require__(0),
|
789 |
+
Modal = __webpack_require__(13),
|
790 |
+
$ = jQuery;
|
791 |
+
|
792 |
+
var Export = function Export() {
|
793 |
+
var self = this;
|
794 |
+
|
795 |
+
// Set params
|
796 |
+
this.params = [];
|
797 |
+
|
798 |
+
// Set stop flag
|
799 |
+
this.stopExport = false;
|
800 |
+
|
801 |
+
// Set modal
|
802 |
+
this.modal = new Modal();
|
803 |
+
|
804 |
+
// Set stop listener
|
805 |
+
this.modal.onStop = function (options) {
|
806 |
+
self.onStop(options);
|
807 |
};
|
808 |
+
};
|
809 |
|
810 |
+
Export.prototype.setParams = function (params) {
|
811 |
+
this.params = Util.list(params);
|
812 |
+
};
|
813 |
|
814 |
+
Export.prototype.start = function (options, retries) {
|
815 |
+
var self = this;
|
816 |
+
var retries = retries || 0;
|
817 |
|
818 |
+
// Set stop flag
|
819 |
+
if (retries === 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
820 |
this.stopExport = false;
|
821 |
+
}
|
822 |
|
823 |
+
// Stop running export
|
824 |
+
if (this.stopExport) {
|
825 |
+
return;
|
826 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
827 |
|
828 |
+
// Initializing beforeunload event
|
829 |
+
$(window).bind('beforeunload', function () {
|
830 |
+
return 'You are about to stop exporting your website, are you sure?';
|
831 |
+
});
|
832 |
|
833 |
+
// Set initial status
|
834 |
+
this.setStatus({ type: 'info', message: 'Preparing to export...' });
|
835 |
+
|
836 |
+
// Set params
|
837 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key });
|
838 |
+
|
839 |
+
// Set additional params
|
840 |
+
if (options) {
|
841 |
+
params = params.concat(Util.list(options));
|
842 |
+
}
|
843 |
+
|
844 |
+
// Export
|
845 |
+
$.ajax({
|
846 |
+
url: ai1wm_export.ajax.url,
|
847 |
+
type: 'POST',
|
848 |
+
dataType: 'json',
|
849 |
+
data: params,
|
850 |
+
dataFilter: function dataFilter(data, type) {
|
851 |
+
return Util.json(data);
|
852 |
}
|
853 |
+
}).done(function () {
|
854 |
+
self.getStatus();
|
855 |
+
}).done(function (params) {
|
856 |
+
if (params) {
|
857 |
+
self.run(params);
|
858 |
}
|
859 |
+
}).fail(function () {
|
860 |
+
var timeout = retries * 1000;
|
861 |
+
if (retries >= 5) {
|
862 |
+
return self.setStatus({
|
863 |
+
type: 'error',
|
864 |
+
message: 'Unable to start the export. Refresh the page and try again'
|
865 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
}
|
867 |
|
868 |
+
retries++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
869 |
|
870 |
+
setTimeout(self.start.bind(self, options, retries), timeout);
|
871 |
+
});
|
872 |
+
};
|
873 |
+
|
874 |
+
Export.prototype.run = function (params, retries) {
|
875 |
+
var self = this;
|
876 |
+
var retries = retries || 0;
|
877 |
+
|
878 |
+
// Stop running export
|
879 |
+
if (this.stopExport) {
|
880 |
+
return;
|
881 |
+
}
|
882 |
+
|
883 |
+
// Export
|
884 |
+
$.ajax({
|
885 |
+
url: ai1wm_export.ajax.url,
|
886 |
+
type: 'POST',
|
887 |
+
dataType: 'json',
|
888 |
+
data: params,
|
889 |
+
dataFilter: function dataFilter(data, type) {
|
890 |
+
return Util.json(data);
|
891 |
+
}
|
892 |
+
}).done(function (params) {
|
893 |
+
if (params) {
|
894 |
+
self.run(params);
|
895 |
+
}
|
896 |
+
}).fail(function () {
|
897 |
+
var timeout = retries * 1000;
|
898 |
+
if (retries >= 5) {
|
899 |
+
return self.setStatus({
|
900 |
+
type: 'error',
|
901 |
+
message: 'Unable to run the export. Refresh the page and try again'
|
902 |
+
});
|
903 |
}
|
904 |
|
905 |
+
retries++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
906 |
|
907 |
+
setTimeout(self.run.bind(self, params, retries), timeout);
|
908 |
+
});
|
909 |
+
};
|
910 |
+
|
911 |
+
Export.prototype.clean = function (options, retries) {
|
912 |
+
var self = this;
|
913 |
+
var retries = retries || 0;
|
914 |
+
|
915 |
+
// Set stop flag
|
916 |
+
this.stopExport = true;
|
917 |
+
|
918 |
+
// Set initial status
|
919 |
+
this.setStatus({ type: 'info', message: 'Please wait, stopping the export...' });
|
920 |
+
|
921 |
+
// Set params
|
922 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_export.secret_key }).concat({ name: 'priority', value: 300 });
|
923 |
+
|
924 |
+
// Set additional params
|
925 |
+
if (options) {
|
926 |
+
params = params.concat(Util.list(options));
|
927 |
+
}
|
928 |
+
|
929 |
+
// Clean
|
930 |
+
$.ajax({
|
931 |
+
url: ai1wm_export.ajax.url,
|
932 |
+
type: 'POST',
|
933 |
+
dataType: 'json',
|
934 |
+
data: params,
|
935 |
+
dataFilter: function dataFilter(data, type) {
|
936 |
+
return Util.json(data);
|
937 |
+
}
|
938 |
+
}).done(function () {
|
939 |
+
// Unbinding the beforeunload event when we stop exporting
|
940 |
+
$(window).unbind('beforeunload');
|
941 |
+
|
942 |
+
// Destroy modal
|
943 |
+
self.modal.destroy();
|
944 |
+
}).fail(function () {
|
945 |
+
var timeout = retries * 1000;
|
946 |
+
if (retries >= 5) {
|
947 |
+
return self.setStatus({
|
948 |
+
type: 'error',
|
949 |
+
message: 'Unable to stop the export. Refresh the page and try again'
|
950 |
+
});
|
951 |
+
}
|
952 |
|
953 |
+
retries++;
|
|
|
954 |
|
955 |
+
setTimeout(self.clean.bind(self, options, retries), timeout);
|
956 |
+
});
|
957 |
+
};
|
958 |
+
|
959 |
+
Export.prototype.getStatus = function () {
|
960 |
+
var self = this;
|
961 |
+
|
962 |
+
// Stop getting status
|
963 |
+
if (this.stopExport) {
|
964 |
+
return;
|
965 |
+
}
|
966 |
+
|
967 |
+
$.ajax({
|
968 |
+
url: ai1wm_export.status.url,
|
969 |
+
type: 'GET',
|
970 |
+
dataType: 'json',
|
971 |
+
cache: false,
|
972 |
+
dataFilter: function dataFilter(data, type) {
|
973 |
+
return Util.json(data);
|
974 |
}
|
975 |
+
}).done(function (params) {
|
976 |
+
if (params) {
|
977 |
+
self.setStatus(params);
|
978 |
+
|
979 |
+
// Next status
|
980 |
+
switch (params.type) {
|
981 |
+
case 'done':
|
982 |
+
case 'error':
|
983 |
+
case 'download':
|
984 |
+
// Unbinding beforeunload event when any case is performed
|
985 |
+
$(window).unbind('beforeunload');
|
986 |
+
return;
|
987 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
988 |
}
|
989 |
|
990 |
+
// Export is not done yet, let's check status in 3 seconds
|
991 |
+
setTimeout(self.getStatus.bind(self), 3000);
|
992 |
+
}).fail(function () {
|
993 |
+
// Export is not done yet, let's check status in 3 seconds
|
994 |
+
setTimeout(self.getStatus.bind(self), 3000);
|
995 |
+
});
|
996 |
+
};
|
997 |
+
|
998 |
+
Export.prototype.setStatus = function (params) {
|
999 |
+
this.modal.render(params);
|
1000 |
+
};
|
1001 |
+
|
1002 |
+
Export.prototype.onStop = function (options) {
|
1003 |
+
this.clean(options);
|
1004 |
+
};
|
1005 |
+
|
1006 |
+
module.exports = Export;
|
1007 |
+
|
1008 |
+
/***/ }),
|
1009 |
+
/* 13 */
|
1010 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1011 |
+
|
1012 |
+
"use strict";
|
1013 |
+
|
1014 |
+
|
1015 |
+
/**
|
1016 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
1017 |
+
*
|
1018 |
+
* This program is free software: you can redistribute it and/or modify
|
1019 |
+
* it under the terms of the GNU General Public License as published by
|
1020 |
+
* the Free Software Foundation, either version 3 of the License, or
|
1021 |
+
* (at your option) any later version.
|
1022 |
+
*
|
1023 |
+
* This program is distributed in the hope that it will be useful,
|
1024 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1025 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1026 |
+
* GNU General Public License for more details.
|
1027 |
+
*
|
1028 |
+
* You should have received a copy of the GNU General Public License
|
1029 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1030 |
+
*
|
1031 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1032 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1033 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1034 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1035 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1036 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1037 |
+
*/
|
1038 |
+
|
1039 |
+
var $ = jQuery;
|
1040 |
+
|
1041 |
+
var Modal = function Modal() {
|
1042 |
+
var self = this;
|
1043 |
+
|
1044 |
+
// Error Modal
|
1045 |
+
this.error = function (params) {
|
1046 |
|
1047 |
+
// Create the modal container
|
1048 |
+
var container = $('<div></div>');
|
|
|
|
|
|
|
|
|
|
|
1049 |
|
1050 |
+
// Create section to hold title, message and action
|
1051 |
+
var section = $('<section></section>');
|
|
|
1052 |
|
1053 |
+
// Create header to hold title
|
1054 |
+
var header = $('<h1></h1>');
|
|
|
1055 |
|
1056 |
+
// Create paragraph to hold mesage
|
1057 |
+
var message = $('<p></p>').html(params.message);
|
1058 |
|
1059 |
+
// Create action section
|
1060 |
+
var action = $('<div></div>');
|
|
|
1061 |
|
1062 |
+
// Create title
|
1063 |
+
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to export');
|
1064 |
|
1065 |
+
// Create close button
|
1066 |
+
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
1067 |
+
self.destroy();
|
1068 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1069 |
|
1070 |
+
// Append close button
|
1071 |
+
action.append(closeButton);
|
1072 |
|
1073 |
+
// Append title to section
|
1074 |
+
header.append(title);
|
1075 |
|
1076 |
+
// Append header and message to section
|
1077 |
+
section.append(header).append(message);
|
1078 |
|
1079 |
+
// Append section and action to container
|
1080 |
+
container.append(section).append(action);
|
1081 |
|
1082 |
+
// Render modal
|
1083 |
+
self.modal.html(container).show();
|
1084 |
+
self.overlay.show();
|
1085 |
+
};
|
1086 |
|
1087 |
+
// Info Modal
|
1088 |
+
this.info = function (params) {
|
1089 |
|
1090 |
+
// Create the modal container
|
1091 |
+
var container = $('<div></div>');
|
1092 |
|
1093 |
+
// Create section to hold title, message and action
|
1094 |
+
var section = $('<section></section>');
|
1095 |
|
1096 |
+
// Create header to hold loader
|
1097 |
+
var header = $('<h1></h1>');
|
1098 |
|
1099 |
+
// Create paragraph to hold mesage
|
1100 |
+
var message = $('<p></p>').html(params.message);
|
1101 |
|
1102 |
+
// Create action section
|
1103 |
+
var action = $('<div></div>');
|
1104 |
|
1105 |
+
// Create loader
|
1106 |
+
var loader = $('<span class="ai1wm-loader"></span>');
|
1107 |
|
1108 |
+
// Create stop export
|
1109 |
+
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop export</button>').on('click', function () {
|
1110 |
+
$(this).attr('disabled', 'disabled');
|
1111 |
+
self.onStop();
|
1112 |
+
});
|
1113 |
|
1114 |
+
// Append stop button
|
1115 |
+
action.append(stopButton);
|
1116 |
|
1117 |
+
// Append loader to header
|
1118 |
+
header.append(loader);
|
1119 |
|
1120 |
+
// Append header and message to section
|
1121 |
+
section.append(header).append(message);
|
1122 |
|
1123 |
+
// Append section and action to container
|
1124 |
+
container.append(section).append(action);
|
1125 |
|
1126 |
+
// Render modal
|
1127 |
+
self.modal.html(container).show();
|
1128 |
+
self.overlay.show();
|
1129 |
+
};
|
1130 |
|
1131 |
+
// Done Modal
|
1132 |
+
this.done = function (params) {
|
1133 |
|
1134 |
+
// Create the modal container
|
1135 |
+
var container = $('<div></div>');
|
1136 |
|
1137 |
+
// Create section to hold title, message and action
|
1138 |
+
var section = $('<section></section>');
|
1139 |
|
1140 |
+
// Create header to hold title
|
1141 |
+
var header = $('<h1></h1>');
|
1142 |
|
1143 |
+
// Create paragraph to hold mesage
|
1144 |
+
var message = $('<p></p>').html(params.message);
|
1145 |
|
1146 |
+
// Create action section
|
1147 |
+
var action = $('<div></div>');
|
1148 |
|
1149 |
+
// Create title
|
1150 |
+
var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
|
1151 |
|
1152 |
+
// Create close button
|
1153 |
+
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
1154 |
+
self.destroy();
|
1155 |
+
});
|
1156 |
|
1157 |
+
// Append close button
|
1158 |
+
action.append(closeButton);
|
1159 |
|
1160 |
+
// Append title to section
|
1161 |
+
header.append(title);
|
1162 |
|
1163 |
+
// Append header and message to section
|
1164 |
+
section.append(header).append(message);
|
1165 |
|
1166 |
+
// Append section and action to container
|
1167 |
+
container.append(section).append(action);
|
1168 |
|
1169 |
+
// Render modal
|
1170 |
+
self.modal.html(container).show();
|
1171 |
+
self.overlay.show();
|
1172 |
+
};
|
1173 |
|
1174 |
+
// Download Modal
|
1175 |
+
this.download = function (params) {
|
1176 |
|
1177 |
+
// Create the modal container
|
1178 |
+
var container = $('<div></div>');
|
1179 |
|
1180 |
+
// Create section to hold title, message and action
|
1181 |
+
var section = $('<section></section>');
|
1182 |
|
1183 |
+
// Create header to hold title
|
1184 |
+
var header = $('<h1></h1>');
|
1185 |
|
1186 |
+
// Create paragraph to hold mesage
|
1187 |
+
var message = $('<p></p>').html(params.message);
|
1188 |
|
1189 |
+
// Create action section
|
1190 |
+
var action = $('<div></div>');
|
1191 |
|
1192 |
+
// Create close button
|
1193 |
+
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
1194 |
+
self.destroy();
|
1195 |
+
});
|
1196 |
|
1197 |
+
// Append close button
|
1198 |
+
action.append(closeButton);
|
1199 |
|
1200 |
+
// Append message to section
|
1201 |
+
section.append(message);
|
1202 |
|
1203 |
+
// Append section and action to container
|
1204 |
+
container.append(section).append(action);
|
1205 |
|
1206 |
+
// Render modal
|
1207 |
+
self.modal.html(container).show();
|
1208 |
+
self.overlay.show();
|
1209 |
+
};
|
1210 |
|
1211 |
+
// Create the overlay
|
1212 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
1213 |
|
1214 |
+
// Create the modal container
|
1215 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
1216 |
|
1217 |
+
$('body').append(this.overlay) // Append overlay to body
|
1218 |
+
.append(this.modal); // Append modal to body
|
1219 |
+
};
|
1220 |
|
1221 |
+
Modal.prototype.render = function (params) {
|
1222 |
|
1223 |
+
// Show modal
|
1224 |
+
switch (params.type) {
|
1225 |
+
case 'error':
|
1226 |
+
this.error(params);
|
1227 |
+
break;
|
1228 |
|
1229 |
+
case 'info':
|
1230 |
+
this.info(params);
|
1231 |
+
break;
|
1232 |
|
1233 |
+
case 'done':
|
1234 |
+
this.done(params);
|
1235 |
+
break;
|
1236 |
|
1237 |
+
case 'download':
|
1238 |
+
this.download(params);
|
1239 |
+
break;
|
1240 |
+
}
|
1241 |
+
};
|
1242 |
|
1243 |
+
Modal.prototype.destroy = function () {
|
1244 |
+
this.modal.hide();
|
1245 |
+
this.overlay.hide();
|
1246 |
+
};
|
1247 |
|
1248 |
+
module.exports = Modal;
|
1249 |
|
1250 |
+
/***/ })
|
1251 |
/******/ ]);
|
lib/view/assets/javascript/import.min.js
CHANGED
@@ -1,3349 +1,3413 @@
|
|
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 |
-
/******/
|
15 |
-
/******/
|
16 |
-
/******/
|
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.
|
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__(
|
41 |
/******/ })
|
42 |
/************************************************************************/
|
43 |
/******/ ([
|
44 |
/* 0 */
|
45 |
-
/***/ function(module, exports, __webpack_require__) {
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
// Expands/Collapses Import from
|
85 |
-
$('.ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
|
86 |
-
$(this).parent().toggleClass('ai1wm-open');
|
87 |
-
});
|
88 |
-
});
|
89 |
-
|
90 |
-
/***/ },
|
91 |
-
/* 1 */
|
92 |
-
/***/ function(module, exports, __webpack_require__) {
|
93 |
-
|
94 |
-
'use strict';
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
98 |
-
*
|
99 |
-
* This program is free software: you can redistribute it and/or modify
|
100 |
-
* it under the terms of the GNU General Public License as published by
|
101 |
-
* the Free Software Foundation, either version 3 of the License, or
|
102 |
-
* (at your option) any later version.
|
103 |
-
*
|
104 |
-
* This program is distributed in the hope that it will be useful,
|
105 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
106 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
107 |
-
* GNU General Public License for more details.
|
108 |
-
*
|
109 |
-
* You should have received a copy of the GNU General Public License
|
110 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
111 |
-
*
|
112 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
113 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
114 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
115 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
116 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
117 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
118 |
-
*/
|
119 |
-
|
120 |
-
var Util = __webpack_require__(2);
|
121 |
-
|
122 |
-
jQuery(document).ready(function ($) {
|
123 |
-
'use strict';
|
124 |
-
|
125 |
-
$('#ai1wm-report-problem-button').click(function (e) {
|
126 |
-
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
127 |
-
|
128 |
-
e.preventDefault();
|
129 |
-
});
|
130 |
-
|
131 |
-
$('#ai1wm-report-cancel').click(function (e) {
|
132 |
-
$(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
133 |
-
|
134 |
-
e.preventDefault();
|
135 |
-
});
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
if (data.errors.length > 0) {
|
158 |
-
// Reset previous messages
|
159 |
-
$('.ai1wm-report-problem-dialog .ai1wm-message').remove();
|
160 |
-
|
161 |
-
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
162 |
-
$.each(data.errors, function (key, value) {
|
163 |
-
errorMessage.append('<p>' + value + '</p>');
|
164 |
-
});
|
165 |
-
|
166 |
-
$('.ai1wm-report-problem-dialog').prepend(errorMessage);
|
167 |
-
} else {
|
168 |
-
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
|
169 |
-
$('.ai1wm-report-problem-dialog').html(successMessage);
|
170 |
-
|
171 |
-
// Hide message
|
172 |
-
setTimeout(function () {
|
173 |
-
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
174 |
-
}, 2000);
|
175 |
-
}
|
176 |
-
}
|
177 |
});
|
178 |
-
});
|
179 |
-
});
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
/***/ function(module, exports) {
|
184 |
-
|
185 |
-
'use strict';
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
189 |
-
*
|
190 |
-
* This program is free software: you can redistribute it and/or modify
|
191 |
-
* it under the terms of the GNU General Public License as published by
|
192 |
-
* the Free Software Foundation, either version 3 of the License, or
|
193 |
-
* (at your option) any later version.
|
194 |
-
*
|
195 |
-
* This program is distributed in the hope that it will be useful,
|
196 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
197 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
198 |
-
* GNU General Public License for more details.
|
199 |
-
*
|
200 |
-
* You should have received a copy of the GNU General Public License
|
201 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
202 |
-
*
|
203 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
204 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
205 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
206 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
207 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
208 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
209 |
-
*/
|
210 |
-
|
211 |
-
var $ = jQuery;
|
212 |
-
|
213 |
-
module.exports = {
|
214 |
-
random: function random(len) {
|
215 |
-
var text = '';
|
216 |
-
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
217 |
-
|
218 |
-
for (var i = 0; i < len; i++) {
|
219 |
-
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
220 |
-
}
|
221 |
-
|
222 |
-
return text;
|
223 |
-
},
|
224 |
-
form: function form(id) {
|
225 |
-
return $(id).serializeArray();
|
226 |
-
},
|
227 |
-
ucfirst: function ucfirst(text) {
|
228 |
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
229 |
-
},
|
230 |
-
list: function list(input) {
|
231 |
-
// Convert object to list
|
232 |
-
if ($.isPlainObject(input)) {
|
233 |
-
var result = [];
|
234 |
-
var params = decodeURIComponent($.param(input)).split('&');
|
235 |
-
|
236 |
-
// Loop over params
|
237 |
-
$.each(params, function (index, item) {
|
238 |
-
var value = item.split('=');
|
239 |
-
|
240 |
-
// Add item
|
241 |
-
result.push({ name: value[0], value: value[1] });
|
242 |
-
});
|
243 |
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
246 |
-
|
247 |
-
return input;
|
248 |
-
},
|
249 |
-
json: function json(input) {
|
250 |
-
if ($.type(input) === 'string') {
|
251 |
-
var result = input.match(/{[\s\S]+}/);
|
252 |
-
if (result !== null) {
|
253 |
-
return result[0];
|
254 |
-
}
|
255 |
-
}
|
256 |
-
|
257 |
-
return false;
|
258 |
}
|
259 |
-
};
|
260 |
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
'use strict';
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
*
|
270 |
-
* This program is free software: you can redistribute it and/or modify
|
271 |
-
* it under the terms of the GNU General Public License as published by
|
272 |
-
* the Free Software Foundation, either version 3 of the License, or
|
273 |
-
* (at your option) any later version.
|
274 |
-
*
|
275 |
-
* This program is distributed in the hope that it will be useful,
|
276 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
277 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
278 |
-
* GNU General Public License for more details.
|
279 |
-
*
|
280 |
-
* You should have received a copy of the GNU General Public License
|
281 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
282 |
-
*
|
283 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
284 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
285 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
286 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
287 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
288 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
289 |
-
*/
|
290 |
-
|
291 |
-
var Util = __webpack_require__(2);
|
292 |
-
|
293 |
-
jQuery(document).ready(function ($) {
|
294 |
-
'use strict';
|
295 |
-
|
296 |
-
// Reset feedback form
|
297 |
-
|
298 |
-
$('.ai1wm-feedback-type').attr('checked', false);
|
299 |
-
|
300 |
-
// Review
|
301 |
-
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
302 |
-
var radio = $('#ai1wm-feedback-type-1');
|
303 |
-
if (radio.is(':checked')) {
|
304 |
-
radio.attr('checked', false);
|
305 |
-
e.preventDefault();
|
306 |
-
} else {
|
307 |
-
radio.attr('checked', true);
|
308 |
-
}
|
309 |
-
});
|
310 |
-
|
311 |
-
// Improvement
|
312 |
-
$('#ai1wm-feedback-type-2').click(function () {
|
313 |
-
// Hide other options
|
314 |
-
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
315 |
-
|
316 |
-
// change placeholder message
|
317 |
-
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
|
318 |
-
|
319 |
-
// Show feedback form
|
320 |
-
$('.ai1wm-feedback-form').fadeIn();
|
321 |
-
});
|
322 |
-
|
323 |
-
// Help
|
324 |
-
$('#ai1wm-feedback-type-3').click(function () {
|
325 |
-
// Hide other options
|
326 |
-
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
327 |
-
|
328 |
-
// change placeholder message
|
329 |
-
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
|
330 |
-
|
331 |
-
// Show feedback form
|
332 |
-
$('.ai1wm-feedback-form').fadeIn();
|
333 |
-
});
|
334 |
-
|
335 |
-
// Cancel feedback form
|
336 |
-
$('#ai1wm-feedback-cancel').click(function (e) {
|
337 |
-
$('.ai1wm-feedback-form').fadeOut(function () {
|
338 |
-
$('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
|
339 |
-
});
|
340 |
-
e.preventDefault();
|
341 |
-
});
|
342 |
|
343 |
-
|
344 |
-
$('#ai1wm-feedback-submit').click(function () {
|
345 |
-
var type = $('.ai1wm-feedback-type:checked').val();
|
346 |
-
var email = $('.ai1wm-feedback-email').val();
|
347 |
-
var message = $('.ai1wm-feedback-message').val();
|
348 |
-
var terms = $('.ai1wm-feedback-terms').is(':checked');
|
349 |
-
|
350 |
-
$.ajax({
|
351 |
-
url: ai1wm_feedback.ajax.url,
|
352 |
-
type: 'POST',
|
353 |
-
dataType: 'json',
|
354 |
-
async: false,
|
355 |
-
data: {
|
356 |
-
'secret_key': ai1wm_feedback.secret_key,
|
357 |
-
'ai1wm_type': type,
|
358 |
-
'ai1wm_email': email,
|
359 |
-
'ai1wm_message': message,
|
360 |
-
'ai1wm_terms': +terms
|
361 |
-
},
|
362 |
-
dataFilter: function dataFilter(data, type) {
|
363 |
-
return Util.json(data);
|
364 |
-
},
|
365 |
-
success: function success(data) {
|
366 |
-
if (data.errors.length > 0) {
|
367 |
-
// Reset previous messages
|
368 |
-
$('.ai1wm-feedback .ai1wm-message').remove();
|
369 |
-
|
370 |
-
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
371 |
-
$.each(data.errors, function (key, value) {
|
372 |
-
errorMessage.append('<p>' + value + '</p>');
|
373 |
-
});
|
374 |
-
|
375 |
-
$('.ai1wm-feedback').prepend(errorMessage);
|
376 |
-
} else {
|
377 |
-
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
378 |
-
$('.ai1wm-feedback').html(successMessage);
|
379 |
-
}
|
380 |
-
}
|
381 |
-
});
|
382 |
-
});
|
383 |
});
|
384 |
|
385 |
-
|
386 |
-
|
387 |
-
/***/ function(module, exports, __webpack_require__) {
|
388 |
-
|
389 |
-
'use strict';
|
390 |
-
|
391 |
-
/**
|
392 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
393 |
-
*
|
394 |
-
* This program is free software: you can redistribute it and/or modify
|
395 |
-
* it under the terms of the GNU General Public License as published by
|
396 |
-
* the Free Software Foundation, either version 3 of the License, or
|
397 |
-
* (at your option) any later version.
|
398 |
-
*
|
399 |
-
* This program is distributed in the hope that it will be useful,
|
400 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
401 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
402 |
-
* GNU General Public License for more details.
|
403 |
-
*
|
404 |
-
* You should have received a copy of the GNU General Public License
|
405 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
406 |
-
*
|
407 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
408 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
409 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
410 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
411 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
412 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
413 |
-
*/
|
414 |
-
|
415 |
-
var Util = __webpack_require__(2),
|
416 |
-
Modal = __webpack_require__(5),
|
417 |
-
$ = jQuery;
|
418 |
-
|
419 |
-
var Import = function Import() {
|
420 |
-
var self = this;
|
421 |
-
|
422 |
-
// Set params
|
423 |
-
this.params = [];
|
424 |
-
|
425 |
-
// Set stop flag
|
426 |
-
this.stopImport = false;
|
427 |
-
|
428 |
-
// Set modal
|
429 |
-
this.modal = new Modal();
|
430 |
-
|
431 |
-
// Set confirm listener
|
432 |
-
this.modal.onConfirm = function (options) {
|
433 |
-
self.onConfirm(options);
|
434 |
-
};
|
435 |
-
|
436 |
-
// Set blogs listener
|
437 |
-
this.modal.onBlogs = function (options) {
|
438 |
-
self.onBlogs(options);
|
439 |
-
};
|
440 |
-
|
441 |
-
// Set stop listener
|
442 |
-
this.modal.onStop = function (options) {
|
443 |
-
self.onStop(options);
|
444 |
-
};
|
445 |
-
};
|
446 |
-
|
447 |
-
Import.prototype.setParams = function (params) {
|
448 |
-
this.params = Util.list(params);
|
449 |
-
};
|
450 |
-
|
451 |
-
Import.prototype.start = function (options, retries) {
|
452 |
-
var self = this;
|
453 |
-
var retries = retries || 0;
|
454 |
-
|
455 |
-
// Set stop flag
|
456 |
-
if (retries === 0) {
|
457 |
-
this.stopImport = false;
|
458 |
-
}
|
459 |
-
|
460 |
-
// Stop running import
|
461 |
-
if (this.stopImport) {
|
462 |
-
return;
|
463 |
-
}
|
464 |
-
|
465 |
-
// Initializing beforeunload event
|
466 |
-
$(window).bind('beforeunload', function () {
|
467 |
-
return 'You are about to stop importing your website, are you sure?';
|
468 |
-
});
|
469 |
-
|
470 |
-
// Set initial status
|
471 |
-
this.setStatus({ type: 'info', message: 'Preparing to import...' });
|
472 |
|
473 |
-
|
474 |
-
|
475 |
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
|
481 |
-
// Import
|
482 |
$.ajax({
|
483 |
-
url:
|
484 |
type: 'POST',
|
485 |
dataType: 'json',
|
486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
dataFilter: function dataFilter(data, type) {
|
488 |
return Util.json(data);
|
489 |
-
}
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
return self.setStatus({
|
500 |
-
type: 'error',
|
501 |
-
message: 'Unable to start the import. Refresh the page and try again'
|
502 |
-
});
|
503 |
-
}
|
504 |
-
|
505 |
-
retries++;
|
506 |
-
|
507 |
-
setTimeout(self.start.bind(self, options, retries), timeout);
|
508 |
-
});
|
509 |
-
};
|
510 |
|
511 |
-
|
512 |
-
|
513 |
-
|
|
|
514 |
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
// Import
|
521 |
-
$.ajax({
|
522 |
-
url: ai1wm_import.ajax.url,
|
523 |
-
type: 'POST',
|
524 |
-
dataType: 'json',
|
525 |
-
data: params,
|
526 |
-
dataFilter: function dataFilter(data, type) {
|
527 |
-
return Util.json(data);
|
528 |
-
}
|
529 |
-
}).done(function (params) {
|
530 |
-
if (params) {
|
531 |
-
self.run(params);
|
532 |
}
|
533 |
-
}).fail(function () {
|
534 |
-
var timeout = retries * 1000;
|
535 |
-
|
536 |
-
retries++;
|
537 |
-
|
538 |
-
setTimeout(self.run.bind(self, params, retries), timeout);
|
539 |
});
|
540 |
-
};
|
|
|
541 |
|
542 |
-
|
543 |
-
|
544 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
|
546 |
-
|
547 |
-
if (this.stopImport) {
|
548 |
-
return;
|
549 |
-
}
|
550 |
|
551 |
-
|
552 |
-
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
553 |
|
554 |
-
|
555 |
-
|
556 |
-
|
|
|
|
|
|
|
|
|
|
|
557 |
}
|
|
|
558 |
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
dataType: 'json',
|
564 |
-
data: params,
|
565 |
-
dataFilter: function dataFilter(data, type) {
|
566 |
-
return Util.json(data);
|
567 |
-
}
|
568 |
-
}).done(function () {
|
569 |
-
self.getStatus();
|
570 |
-
}).done(function (params) {
|
571 |
-
if (params) {
|
572 |
-
self.run(params);
|
573 |
-
}
|
574 |
-
}).fail(function () {
|
575 |
-
var timeout = retries * 1000;
|
576 |
-
if (retries >= 5) {
|
577 |
-
return self.setStatus({
|
578 |
-
type: 'error',
|
579 |
-
message: 'Unable to confirm the import. Refresh the page and try again'
|
580 |
-
});
|
581 |
-
}
|
582 |
-
|
583 |
-
retries++;
|
584 |
-
|
585 |
-
setTimeout(self.confirm.bind(self, options, retries), timeout);
|
586 |
-
});
|
587 |
-
};
|
588 |
-
|
589 |
-
Import.prototype.blogs = function (options, retries) {
|
590 |
-
var self = this;
|
591 |
-
var retries = retries || 0;
|
592 |
|
593 |
-
//
|
594 |
-
|
595 |
-
return;
|
596 |
-
}
|
597 |
|
598 |
-
//
|
599 |
-
|
|
|
600 |
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
|
606 |
-
//
|
607 |
-
|
608 |
-
url: ai1wm_import.ajax.url,
|
609 |
-
type: 'POST',
|
610 |
-
dataType: 'json',
|
611 |
-
data: params,
|
612 |
-
dataFilter: function dataFilter(data, type) {
|
613 |
-
return Util.json(data);
|
614 |
-
}
|
615 |
-
}).done(function () {
|
616 |
-
self.getStatus();
|
617 |
-
}).done(function (params) {
|
618 |
-
if (params) {
|
619 |
-
self.run(params);
|
620 |
-
}
|
621 |
-
}).fail(function () {
|
622 |
-
var timeout = retries * 1000;
|
623 |
-
if (retries >= 5) {
|
624 |
-
return self.setStatus({
|
625 |
-
type: 'error',
|
626 |
-
message: 'Unable to prepare blogs the import. Refresh the page and try again'
|
627 |
-
});
|
628 |
-
}
|
629 |
|
630 |
-
|
|
|
|
|
631 |
|
632 |
-
|
|
|
|
|
|
|
633 |
});
|
634 |
-
|
635 |
-
|
636 |
-
Import.prototype.clean = function (options, retries) {
|
637 |
-
var self = this;
|
638 |
-
var retries = retries || 0;
|
639 |
-
|
640 |
-
// Set stop flag
|
641 |
-
this.stopImport = true;
|
642 |
-
|
643 |
-
// Set initial status
|
644 |
-
this.setStatus({ type: 'info', message: 'Please wait, stopping the import...' });
|
645 |
-
|
646 |
-
// Set params
|
647 |
-
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
|
648 |
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
|
|
|
|
653 |
|
654 |
-
// Clean
|
655 |
$.ajax({
|
656 |
-
url:
|
657 |
type: 'POST',
|
658 |
dataType: 'json',
|
659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
660 |
dataFilter: function dataFilter(data, type) {
|
661 |
return Util.json(data);
|
662 |
-
}
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
return self.setStatus({
|
673 |
-
type: 'error',
|
674 |
-
message: 'Unable to stop the import. Refresh the page and try again'
|
675 |
-
});
|
676 |
-
}
|
677 |
-
|
678 |
-
retries++;
|
679 |
-
|
680 |
-
setTimeout(self.clean.bind(self, options, retries), timeout);
|
681 |
-
});
|
682 |
-
};
|
683 |
-
|
684 |
-
Import.prototype.getStatus = function () {
|
685 |
-
var self = this;
|
686 |
-
|
687 |
-
// Stop getting status
|
688 |
-
if (this.stopImport) {
|
689 |
-
return;
|
690 |
-
}
|
691 |
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
cache: false,
|
697 |
-
dataFilter: function dataFilter(data, type) {
|
698 |
-
return Util.json(data);
|
699 |
-
}
|
700 |
-
}).done(function (params) {
|
701 |
-
if (params) {
|
702 |
-
self.setStatus(params);
|
703 |
-
|
704 |
-
// Next status
|
705 |
-
switch (params.type) {
|
706 |
-
case 'done':
|
707 |
-
case 'error':
|
708 |
-
// Unbinding the beforeunload event when any case is performed
|
709 |
-
$(window).unbind('beforeunload');
|
710 |
-
return;
|
711 |
-
|
712 |
-
case 'confirm':
|
713 |
-
case 'blogs':
|
714 |
-
return;
|
715 |
}
|
716 |
}
|
|
|
|
|
|
|
717 |
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
var action = $('<div></div>');
|
797 |
-
|
798 |
-
// Create title
|
799 |
-
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to import');
|
800 |
-
|
801 |
-
// Create close button
|
802 |
-
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
803 |
-
self.destroy();
|
804 |
-
});
|
805 |
-
|
806 |
-
// Append close button
|
807 |
-
action.append(closeButton);
|
808 |
-
|
809 |
-
// Append title to section
|
810 |
-
header.append(title);
|
811 |
-
|
812 |
-
// Append header and message to section
|
813 |
-
section.append(header).append(message);
|
814 |
-
|
815 |
-
// Append section and action to container
|
816 |
-
container.append(section).append(action);
|
817 |
-
|
818 |
-
// Render modal
|
819 |
-
self.modal.html(container).show();
|
820 |
-
self.overlay.show();
|
821 |
-
};
|
822 |
-
|
823 |
-
// Progress Modal
|
824 |
-
this.progress = function (params) {
|
825 |
-
if (this.view === 'progress') {
|
826 |
-
|
827 |
-
// Update progressBarMeter
|
828 |
-
this.progress.progressBarMeter.width(params.percent + '%');
|
829 |
-
|
830 |
-
// Update progressBarPercent
|
831 |
-
this.progress.progressBarPercent.text(params.percent + '%');
|
832 |
-
} else {
|
833 |
-
|
834 |
-
// Create the modal container
|
835 |
-
var container = $('<div></div>');
|
836 |
-
|
837 |
-
// Create section to hold title, message and action
|
838 |
-
var section = $('<section></section>');
|
839 |
-
|
840 |
-
// Create header to hold progress bar
|
841 |
-
var header = $('<h1></h1>');
|
842 |
-
|
843 |
-
// Create paragraph to hold mesage
|
844 |
-
var message = $('<p></p>');
|
845 |
-
|
846 |
-
// Create action section
|
847 |
-
var action = $('<div></div>');
|
848 |
-
|
849 |
-
// Create progressBar
|
850 |
-
var progressBar = $('<span class="ai1wm-progress-bar"></span>');
|
851 |
-
|
852 |
-
// Create progressBarMeter
|
853 |
-
this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
|
854 |
-
|
855 |
-
// Create progressBarPercent
|
856 |
-
this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
|
857 |
-
|
858 |
-
// Create stop import
|
859 |
-
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
|
860 |
-
$(this).attr('disabled', 'disabled');
|
861 |
-
self.onStop();
|
862 |
-
});
|
863 |
-
|
864 |
-
// Append progress meter and progress percent
|
865 |
-
progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
|
866 |
-
|
867 |
-
// Append stop button
|
868 |
-
action.append(stopButton);
|
869 |
-
|
870 |
-
// Append progress bar to section
|
871 |
-
header.append(progressBar);
|
872 |
-
|
873 |
-
// Append header to section
|
874 |
-
section.append(header);
|
875 |
-
|
876 |
-
// Append section and action to container
|
877 |
-
container.append(section).append(action);
|
878 |
-
|
879 |
-
// Render modal
|
880 |
-
self.modal.html(container).show();
|
881 |
-
self.overlay.show();
|
882 |
-
}
|
883 |
-
};
|
884 |
-
|
885 |
-
// Confirm Modal
|
886 |
-
this.confirm = function (params) {
|
887 |
-
|
888 |
-
// Create the modal container
|
889 |
-
var container = $('<div></div>');
|
890 |
-
|
891 |
-
// Create section to hold title, message and action
|
892 |
-
var section = $('<section></section>');
|
893 |
-
|
894 |
-
// Create header to hold warning
|
895 |
-
var header = $('<h1></h1>');
|
896 |
-
|
897 |
-
// Create paragraph to hold mesage
|
898 |
-
var message = $('<p></p>').html(params.message);
|
899 |
-
|
900 |
-
// Create action section
|
901 |
-
var action = $('<div></div>');
|
902 |
-
|
903 |
-
// Create warning
|
904 |
-
var warning = $('<span class="ai1wm-icon-notification"></span>');
|
905 |
-
|
906 |
-
// Create confirm button
|
907 |
-
var confirmButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
|
908 |
-
$(this).attr('disabled', 'disabled');
|
909 |
-
self.onConfirm();
|
910 |
-
});
|
911 |
-
|
912 |
-
// Append confirm button
|
913 |
-
action.append(confirmButton);
|
914 |
-
|
915 |
-
// Append warning to section
|
916 |
-
header.append(warning);
|
917 |
-
|
918 |
-
// Append header and message to section
|
919 |
-
section.append(header).append(message);
|
920 |
-
|
921 |
-
// Append section and action to container
|
922 |
-
container.append(section).append(action);
|
923 |
-
|
924 |
-
// Render modal
|
925 |
-
self.modal.html(container).show();
|
926 |
-
self.overlay.show();
|
927 |
-
};
|
928 |
-
|
929 |
-
// Blogs Modal
|
930 |
-
this.blogs = function (params) {
|
931 |
-
|
932 |
-
// Create the modal container
|
933 |
-
var container = $('<form></form>');
|
934 |
-
|
935 |
-
// Create section to hold title, message and action
|
936 |
-
var section = $('<section></section>');
|
937 |
-
|
938 |
-
// Create header to hold title
|
939 |
-
var header = $('<h1></h1>');
|
940 |
-
|
941 |
-
// Create paragraph to hold mesage
|
942 |
-
var message = $('<p></p>').html(params.message);
|
943 |
-
|
944 |
-
// Create action section
|
945 |
-
var action = $('<div></div>');
|
946 |
-
|
947 |
-
// Create title
|
948 |
-
var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
|
949 |
-
|
950 |
-
// Create continue button
|
951 |
-
var continueButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
|
952 |
-
$(this).attr('disabled', 'disabled');
|
953 |
-
self.onBlogs($(this).closest('form').serializeArray());
|
954 |
-
});
|
955 |
-
|
956 |
-
// Append continue button
|
957 |
-
action.append(continueButton);
|
958 |
-
|
959 |
-
// Append title to section
|
960 |
-
header.append(title);
|
961 |
-
|
962 |
-
// Append header and message to section
|
963 |
-
section.append(header).append(message);
|
964 |
-
|
965 |
-
// Append section and action to container
|
966 |
-
container.append(section).append(action);
|
967 |
-
|
968 |
-
// Render modal
|
969 |
-
self.modal.html(container).show();
|
970 |
-
self.overlay.show();
|
971 |
-
};
|
972 |
-
|
973 |
-
// Info Modal
|
974 |
-
this.info = function (params) {
|
975 |
-
|
976 |
-
// Create the modal container
|
977 |
-
var container = $('<div></div>');
|
978 |
-
|
979 |
-
// Create section to hold title, message and action
|
980 |
-
var section = $('<section></section>');
|
981 |
-
|
982 |
-
// Create header to hold loader
|
983 |
-
var header = $('<h1></h1>');
|
984 |
-
|
985 |
-
// Create paragraph to hold mesage
|
986 |
-
var message = $('<p></p>').html(params.message);
|
987 |
-
|
988 |
-
// Create action section
|
989 |
-
var action = $('<div></div>');
|
990 |
-
|
991 |
-
// Create loader
|
992 |
-
var loader = $('<span class="ai1wm-loader"></span>');
|
993 |
-
|
994 |
-
// Create stop import
|
995 |
-
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr('disabled', 'disabled');
|
996 |
-
|
997 |
-
// Append stop button
|
998 |
-
action.append(stopButton);
|
999 |
-
|
1000 |
-
// Append loader to header
|
1001 |
-
header.append(loader);
|
1002 |
|
1003 |
-
|
1004 |
-
|
|
|
|
|
1005 |
|
1006 |
-
|
1007 |
-
|
|
|
|
|
|
|
1008 |
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
};
|
1013 |
|
1014 |
-
|
1015 |
-
|
|
|
1016 |
|
1017 |
-
|
1018 |
-
|
|
|
|
|
1019 |
|
1020 |
-
|
1021 |
-
|
|
|
|
|
1022 |
|
1023 |
-
|
1024 |
-
|
|
|
|
|
1025 |
|
1026 |
-
|
1027 |
-
|
1028 |
|
1029 |
-
|
1030 |
-
|
1031 |
|
1032 |
-
|
1033 |
-
|
|
|
|
|
1034 |
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1038 |
});
|
|
|
1039 |
|
1040 |
-
|
1041 |
-
action.append(closeButton);
|
1042 |
|
1043 |
-
|
1044 |
-
|
|
|
1045 |
|
1046 |
-
|
1047 |
-
|
|
|
1048 |
|
1049 |
-
|
1050 |
-
|
|
|
|
|
1051 |
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1056 |
|
1057 |
-
|
1058 |
-
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
1059 |
|
1060 |
-
|
1061 |
-
|
|
|
1062 |
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
|
1067 |
-
|
|
|
|
|
|
|
1068 |
|
1069 |
-
|
1070 |
-
|
1071 |
-
case 'error':
|
1072 |
-
this.error(params);
|
1073 |
-
break;
|
1074 |
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
|
|
1078 |
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1082 |
|
1083 |
-
|
1084 |
-
this.progress(params);
|
1085 |
-
break;
|
1086 |
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
}
|
1095 |
|
1096 |
-
|
1097 |
-
|
|
|
|
|
1098 |
|
1099 |
-
|
1100 |
-
|
1101 |
-
this.overlay.hide();
|
1102 |
-
};
|
1103 |
|
1104 |
-
|
|
|
|
|
|
|
1105 |
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
|
1112 |
-
|
1113 |
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
* This program is free software: you can redistribute it and/or modify
|
1118 |
-
* it under the terms of the GNU General Public License as published by
|
1119 |
-
* the Free Software Foundation, either version 3 of the License, or
|
1120 |
-
* (at your option) any later version.
|
1121 |
-
*
|
1122 |
-
* This program is distributed in the hope that it will be useful,
|
1123 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1124 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1125 |
-
* GNU General Public License for more details.
|
1126 |
-
*
|
1127 |
-
* You should have received a copy of the GNU General Public License
|
1128 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1129 |
-
*
|
1130 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1131 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1132 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1133 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1134 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1135 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1136 |
-
*/
|
1137 |
-
|
1138 |
-
var Util = __webpack_require__(2),
|
1139 |
-
Dialog = __webpack_require__(9);
|
1140 |
-
|
1141 |
-
var Extensions = {
|
1142 |
-
's3': 'Amazon S3 Extension',
|
1143 |
-
'url': 'URL Extension',
|
1144 |
-
'ftp': 'FTP Extension',
|
1145 |
-
'gdrive': 'Google Drive Extension',
|
1146 |
-
'dropbox': 'Dropbox Extension'
|
1147 |
-
};
|
1148 |
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
};
|
1153 |
|
1154 |
-
|
1155 |
-
|
1156 |
-
};
|
1157 |
|
1158 |
-
|
1159 |
-
|
1160 |
-
this._provider = provider;
|
1161 |
-
};
|
1162 |
|
1163 |
-
|
|
|
1164 |
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
|
|
1168 |
|
1169 |
-
|
1170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1171 |
|
1172 |
-
|
1173 |
|
1174 |
-
|
1175 |
-
|
|
|
1176 |
|
1177 |
-
|
1178 |
-
|
1179 |
-
$('#ai1wmde-import-file').attr('type', 'button');
|
1180 |
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
|
|
1184 |
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1188 |
|
1189 |
-
//
|
1190 |
-
|
1191 |
-
|
|
|
|
|
|
|
|
|
1192 |
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
});
|
1201 |
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
|
1206 |
-
|
|
|
|
|
1207 |
|
1208 |
-
|
1209 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
1210 |
-
*
|
1211 |
-
* This program is free software: you can redistribute it and/or modify
|
1212 |
-
* it under the terms of the GNU General Public License as published by
|
1213 |
-
* the Free Software Foundation, either version 3 of the License, or
|
1214 |
-
* (at your option) any later version.
|
1215 |
-
*
|
1216 |
-
* This program is distributed in the hope that it will be useful,
|
1217 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1218 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1219 |
-
* GNU General Public License for more details.
|
1220 |
-
*
|
1221 |
-
* You should have received a copy of the GNU General Public License
|
1222 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1223 |
-
*
|
1224 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1225 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1226 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1227 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1228 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1229 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1230 |
-
*/
|
1231 |
-
|
1232 |
-
var $ = jQuery;
|
1233 |
-
|
1234 |
-
var Dialog = function Dialog(text) {
|
1235 |
-
var self = this;
|
1236 |
-
|
1237 |
-
// Create the overlay
|
1238 |
-
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
1239 |
|
1240 |
-
|
1241 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1242 |
|
1243 |
// Create the modal container
|
1244 |
-
|
1245 |
|
1246 |
// Create section to hold title, message and action
|
1247 |
-
|
|
|
|
|
|
|
1248 |
|
1249 |
// Create paragraph to hold mesage
|
1250 |
-
|
1251 |
|
1252 |
// Create action section
|
1253 |
-
|
|
|
|
|
|
|
1254 |
|
1255 |
// Create close button
|
1256 |
-
|
1257 |
-
self.
|
1258 |
-
self.overlay.hide();
|
1259 |
});
|
1260 |
|
1261 |
// Append close button
|
1262 |
-
|
1263 |
|
1264 |
-
// Append
|
1265 |
-
|
|
|
|
|
|
|
1266 |
|
1267 |
// Append section and action to container
|
1268 |
-
|
1269 |
|
1270 |
// Render modal
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
$('body').append(this.overlay).append(this.modal);
|
1275 |
};
|
1276 |
|
1277 |
-
|
|
|
|
|
1278 |
|
1279 |
-
|
1280 |
-
|
1281 |
-
/* 11 */,
|
1282 |
-
/* 12 */
|
1283 |
-
/***/ function(module, exports, __webpack_require__) {
|
1284 |
-
|
1285 |
-
/* WEBPACK VAR INJECTION */(function(fetch, global) {'use strict';
|
1286 |
-
|
1287 |
-
/**
|
1288 |
-
* Copyright (C) 2014-2017 ServMask Inc.
|
1289 |
-
*
|
1290 |
-
* This program is free software: you can redistribute it and/or modify
|
1291 |
-
* it under the terms of the GNU General Public License as published by
|
1292 |
-
* the Free Software Foundation, either version 3 of the License, or
|
1293 |
-
* (at your option) any later version.
|
1294 |
-
*
|
1295 |
-
* This program is distributed in the hope that it will be useful,
|
1296 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1297 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1298 |
-
* GNU General Public License for more details.
|
1299 |
-
*
|
1300 |
-
* You should have received a copy of the GNU General Public License
|
1301 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1302 |
-
*
|
1303 |
-
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1304 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1305 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1306 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1307 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1308 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1309 |
-
*/
|
1310 |
-
|
1311 |
-
var Util = __webpack_require__(2),
|
1312 |
-
Import = __webpack_require__(4),
|
1313 |
-
$ = jQuery;
|
1314 |
-
|
1315 |
-
var FileUploader = function FileUploader() {};
|
1316 |
-
|
1317 |
-
FileUploader.prototype.setDefaultValues = function () {
|
1318 |
-
this.model = new Import();
|
1319 |
-
this.stopUpload = false;
|
1320 |
-
};
|
1321 |
-
|
1322 |
-
FileUploader.prototype.init = function () {
|
1323 |
-
var _this = this;
|
1324 |
-
|
1325 |
-
var selectElement = $('#ai1wm-import-file');
|
1326 |
-
var dropElement = $('#ai1wm-drag-drop-area');
|
1327 |
-
|
1328 |
-
selectElement.on('change', function (event) {
|
1329 |
-
event.preventDefault();
|
1330 |
-
_this.setDefaultValues();
|
1331 |
-
var file = event.target.files.item(0);
|
1332 |
-
_this.setDefaultValues();
|
1333 |
-
_this.fileSize = file.size;
|
1334 |
-
try {
|
1335 |
-
_this.onFilesAdded(file);
|
1336 |
-
_this.onBeforeUpload(file);
|
1337 |
-
_this.upload(file);
|
1338 |
-
} catch (exception) {
|
1339 |
-
_this.onError(exception);
|
1340 |
-
}
|
1341 |
-
});
|
1342 |
-
|
1343 |
-
dropElement.on('dragenter', function (event) {
|
1344 |
-
event.preventDefault();
|
1345 |
-
dropElement.addClass('ai1wm-drag-over');
|
1346 |
-
});
|
1347 |
-
dropElement.on('dragover', function (event) {
|
1348 |
-
event.preventDefault();
|
1349 |
-
dropElement.addClass('ai1wm-drag-over');
|
1350 |
-
});
|
1351 |
-
dropElement.on('dragleave', function (event) {
|
1352 |
-
event.preventDefault();
|
1353 |
-
dropElement.removeClass('ai1wm-drag-over');
|
1354 |
-
});
|
1355 |
-
dropElement.on('drop', function (event) {
|
1356 |
-
event.preventDefault();
|
1357 |
-
_this.setDefaultValues();
|
1358 |
-
dropElement.removeClass('ai1wm-drag-over');
|
1359 |
-
var file = event.originalEvent.dataTransfer.files.item(0);
|
1360 |
-
_this.fileSize = file.size;
|
1361 |
-
try {
|
1362 |
-
_this.onFilesAdded(file);
|
1363 |
-
_this.onBeforeUpload(file);
|
1364 |
-
_this.upload(file);
|
1365 |
-
} catch (exception) {
|
1366 |
-
_this.onError(exception);
|
1367 |
-
}
|
1368 |
-
});
|
1369 |
-
};
|
1370 |
|
1371 |
-
|
1372 |
-
|
|
|
1373 |
|
1374 |
-
|
|
|
1375 |
|
1376 |
-
|
1377 |
-
|
1378 |
|
1379 |
-
|
1380 |
-
|
1381 |
-
credentials: 'include',
|
1382 |
-
body: formData
|
1383 |
-
}).then(function (response) {
|
1384 |
-
if (_this2.stopUpload) {
|
1385 |
-
return;
|
1386 |
-
}
|
1387 |
|
1388 |
-
|
1389 |
-
|
1390 |
-
ai1wm_uploader.chunk_size = chunkSize / 2;
|
1391 |
-
return _this2.upload(file);
|
1392 |
-
case 200:
|
1393 |
-
return response.text().then(function (text) {
|
1394 |
-
var extractedJsonText = Util.json(text);
|
1395 |
-
if (extractedJsonText) {
|
1396 |
-
var json = JSON.parse(extractedJsonText);
|
1397 |
-
if (json.errors.length === 0) {
|
1398 |
-
file = file.slice(chunkSize, file.size, 'application/octet-binary');
|
1399 |
-
var uploadedBytes = _this2.fileSize - file.size;
|
1400 |
-
var progress = uploadedBytes / _this2.fileSize * 100;
|
1401 |
-
_this2.onUploadProgress(progress.toFixed(2));
|
1402 |
-
return progress === 100 ? _this2.onFileUploaded() : _this2.upload(file);
|
1403 |
-
}
|
1404 |
-
}
|
1405 |
|
1406 |
-
|
1407 |
-
|
1408 |
-
default:
|
1409 |
-
throw new Error(response.status);
|
1410 |
-
}
|
1411 |
-
}).catch(function (error) {
|
1412 |
-
var timeout = retries * 1000;
|
1413 |
-
if (retries >= 30) {
|
1414 |
-
return _this2.onError(new Error('We are sorry, there seems to be a problem while uploading your file. Follow <a href="https://www.youtube.com/watch?v=mRp7qTFYKgs" target="_blank">this guide</a> to resolve it.'));
|
1415 |
-
}
|
1416 |
|
1417 |
-
|
|
|
1418 |
|
1419 |
-
|
1420 |
-
|
1421 |
-
};
|
1422 |
|
1423 |
-
|
1424 |
-
|
1425 |
-
var formData = new FormData();
|
1426 |
-
formData.append('upload-file', file.slice(0, chunkSize, 'application/octet-binary'));
|
1427 |
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
|
|
|
|
1431 |
|
1432 |
-
|
1433 |
-
|
1434 |
|
1435 |
-
|
1436 |
-
|
1437 |
|
1438 |
-
|
1439 |
-
|
1440 |
-
}
|
1441 |
-
};
|
1442 |
|
1443 |
-
|
1444 |
-
|
1445 |
|
1446 |
-
|
1447 |
-
|
1448 |
-
});
|
1449 |
|
1450 |
-
|
1451 |
-
|
|
|
1452 |
}
|
1453 |
};
|
1454 |
|
1455 |
-
|
1456 |
-
|
1457 |
-
this.checkSize(file);
|
1458 |
-
|
1459 |
-
// Initializing beforeunload event
|
1460 |
-
$(window).bind('beforeunload', function () {
|
1461 |
-
return 'You are about to stop importing your website, are you sure?';
|
1462 |
-
});
|
1463 |
-
};
|
1464 |
-
|
1465 |
-
FileUploader.prototype.onBeforeUpload = function (file) {
|
1466 |
-
var self = this;
|
1467 |
-
|
1468 |
-
var storage = Util.random(12);
|
1469 |
-
var options = Util.form('#ai1wm-import-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: file.name });
|
1470 |
|
1471 |
-
//
|
1472 |
-
|
1473 |
|
1474 |
-
//
|
1475 |
-
|
1476 |
-
storage: storage,
|
1477 |
-
archive: file.name
|
1478 |
-
});
|
1479 |
|
1480 |
-
//
|
1481 |
-
|
1482 |
-
self.stopUpload = true;
|
1483 |
|
1484 |
-
|
1485 |
-
|
1486 |
-
};
|
1487 |
|
1488 |
-
//
|
1489 |
-
|
1490 |
-
};
|
1491 |
|
1492 |
-
|
1493 |
-
|
1494 |
-
};
|
1495 |
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
|
|
|
|
1499 |
|
1500 |
-
|
1501 |
-
|
1502 |
-
};
|
1503 |
|
1504 |
-
|
1505 |
-
|
1506 |
-
global.Ai1wm = { Util: Util, Import: Import };
|
1507 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(13), (function() { return this; }())))
|
1508 |
-
|
1509 |
-
/***/ },
|
1510 |
-
/* 13 */
|
1511 |
-
/***/ function(module, exports, __webpack_require__) {
|
1512 |
-
|
1513 |
-
/* WEBPACK VAR INJECTION */(function(Promise, global) {/*** IMPORTS FROM imports-loader ***/
|
1514 |
-
(function() {
|
1515 |
-
|
1516 |
-
(function(self) {
|
1517 |
-
'use strict';
|
1518 |
-
|
1519 |
-
if (self.fetch) {
|
1520 |
-
return
|
1521 |
-
}
|
1522 |
-
|
1523 |
-
var support = {
|
1524 |
-
searchParams: 'URLSearchParams' in self,
|
1525 |
-
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
1526 |
-
blob: 'FileReader' in self && 'Blob' in self && (function() {
|
1527 |
-
try {
|
1528 |
-
new Blob()
|
1529 |
-
return true
|
1530 |
-
} catch(e) {
|
1531 |
-
return false
|
1532 |
-
}
|
1533 |
-
})(),
|
1534 |
-
formData: 'FormData' in self,
|
1535 |
-
arrayBuffer: 'ArrayBuffer' in self
|
1536 |
-
}
|
1537 |
-
|
1538 |
-
if (support.arrayBuffer) {
|
1539 |
-
var viewClasses = [
|
1540 |
-
'[object Int8Array]',
|
1541 |
-
'[object Uint8Array]',
|
1542 |
-
'[object Uint8ClampedArray]',
|
1543 |
-
'[object Int16Array]',
|
1544 |
-
'[object Uint16Array]',
|
1545 |
-
'[object Int32Array]',
|
1546 |
-
'[object Uint32Array]',
|
1547 |
-
'[object Float32Array]',
|
1548 |
-
'[object Float64Array]'
|
1549 |
-
]
|
1550 |
-
|
1551 |
-
var isDataView = function(obj) {
|
1552 |
-
return obj && DataView.prototype.isPrototypeOf(obj)
|
1553 |
-
}
|
1554 |
-
|
1555 |
-
var isArrayBufferView = ArrayBuffer.isView || function(obj) {
|
1556 |
-
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
|
1557 |
-
}
|
1558 |
-
}
|
1559 |
-
|
1560 |
-
function normalizeName(name) {
|
1561 |
-
if (typeof name !== 'string') {
|
1562 |
-
name = String(name)
|
1563 |
-
}
|
1564 |
-
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
1565 |
-
throw new TypeError('Invalid character in header field name')
|
1566 |
-
}
|
1567 |
-
return name.toLowerCase()
|
1568 |
-
}
|
1569 |
-
|
1570 |
-
function normalizeValue(value) {
|
1571 |
-
if (typeof value !== 'string') {
|
1572 |
-
value = String(value)
|
1573 |
-
}
|
1574 |
-
return value
|
1575 |
-
}
|
1576 |
-
|
1577 |
-
// Build a destructive iterator for the value list
|
1578 |
-
function iteratorFor(items) {
|
1579 |
-
var iterator = {
|
1580 |
-
next: function() {
|
1581 |
-
var value = items.shift()
|
1582 |
-
return {done: value === undefined, value: value}
|
1583 |
-
}
|
1584 |
-
}
|
1585 |
-
|
1586 |
-
if (support.iterable) {
|
1587 |
-
iterator[Symbol.iterator] = function() {
|
1588 |
-
return iterator
|
1589 |
-
}
|
1590 |
-
}
|
1591 |
-
|
1592 |
-
return iterator
|
1593 |
-
}
|
1594 |
-
|
1595 |
-
function Headers(headers) {
|
1596 |
-
this.map = {}
|
1597 |
-
|
1598 |
-
if (headers instanceof Headers) {
|
1599 |
-
headers.forEach(function(value, name) {
|
1600 |
-
this.append(name, value)
|
1601 |
-
}, this)
|
1602 |
-
|
1603 |
-
} else if (headers) {
|
1604 |
-
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
1605 |
-
this.append(name, headers[name])
|
1606 |
-
}, this)
|
1607 |
-
}
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
Headers.prototype.append = function(name, value) {
|
1611 |
-
name = normalizeName(name)
|
1612 |
-
value = normalizeValue(value)
|
1613 |
-
var list = this.map[name]
|
1614 |
-
if (!list) {
|
1615 |
-
list = []
|
1616 |
-
this.map[name] = list
|
1617 |
-
}
|
1618 |
-
list.push(value)
|
1619 |
-
}
|
1620 |
-
|
1621 |
-
Headers.prototype['delete'] = function(name) {
|
1622 |
-
delete this.map[normalizeName(name)]
|
1623 |
-
}
|
1624 |
-
|
1625 |
-
Headers.prototype.get = function(name) {
|
1626 |
-
var values = this.map[normalizeName(name)]
|
1627 |
-
return values ? values[0] : null
|
1628 |
-
}
|
1629 |
-
|
1630 |
-
Headers.prototype.getAll = function(name) {
|
1631 |
-
return this.map[normalizeName(name)] || []
|
1632 |
-
}
|
1633 |
-
|
1634 |
-
Headers.prototype.has = function(name) {
|
1635 |
-
return this.map.hasOwnProperty(normalizeName(name))
|
1636 |
-
}
|
1637 |
-
|
1638 |
-
Headers.prototype.set = function(name, value) {
|
1639 |
-
this.map[normalizeName(name)] = [normalizeValue(value)]
|
1640 |
-
}
|
1641 |
-
|
1642 |
-
Headers.prototype.forEach = function(callback, thisArg) {
|
1643 |
-
Object.getOwnPropertyNames(this.map).forEach(function(name) {
|
1644 |
-
this.map[name].forEach(function(value) {
|
1645 |
-
callback.call(thisArg, value, name, this)
|
1646 |
-
}, this)
|
1647 |
-
}, this)
|
1648 |
-
}
|
1649 |
-
|
1650 |
-
Headers.prototype.keys = function() {
|
1651 |
-
var items = []
|
1652 |
-
this.forEach(function(value, name) { items.push(name) })
|
1653 |
-
return iteratorFor(items)
|
1654 |
-
}
|
1655 |
-
|
1656 |
-
Headers.prototype.values = function() {
|
1657 |
-
var items = []
|
1658 |
-
this.forEach(function(value) { items.push(value) })
|
1659 |
-
return iteratorFor(items)
|
1660 |
-
}
|
1661 |
-
|
1662 |
-
Headers.prototype.entries = function() {
|
1663 |
-
var items = []
|
1664 |
-
this.forEach(function(value, name) { items.push([name, value]) })
|
1665 |
-
return iteratorFor(items)
|
1666 |
-
}
|
1667 |
-
|
1668 |
-
if (support.iterable) {
|
1669 |
-
Headers.prototype[Symbol.iterator] = Headers.prototype.entries
|
1670 |
-
}
|
1671 |
-
|
1672 |
-
function consumed(body) {
|
1673 |
-
if (body.bodyUsed) {
|
1674 |
-
return Promise.reject(new TypeError('Already read'))
|
1675 |
-
}
|
1676 |
-
body.bodyUsed = true
|
1677 |
-
}
|
1678 |
-
|
1679 |
-
function fileReaderReady(reader) {
|
1680 |
-
return new Promise(function(resolve, reject) {
|
1681 |
-
reader.onload = function() {
|
1682 |
-
resolve(reader.result)
|
1683 |
-
}
|
1684 |
-
reader.onerror = function() {
|
1685 |
-
reject(reader.error)
|
1686 |
-
}
|
1687 |
-
})
|
1688 |
-
}
|
1689 |
-
|
1690 |
-
function readBlobAsArrayBuffer(blob) {
|
1691 |
-
var reader = new FileReader()
|
1692 |
-
var promise = fileReaderReady(reader)
|
1693 |
-
reader.readAsArrayBuffer(blob)
|
1694 |
-
return promise
|
1695 |
-
}
|
1696 |
-
|
1697 |
-
function readBlobAsText(blob) {
|
1698 |
-
var reader = new FileReader()
|
1699 |
-
var promise = fileReaderReady(reader)
|
1700 |
-
reader.readAsText(blob)
|
1701 |
-
return promise
|
1702 |
-
}
|
1703 |
-
|
1704 |
-
function readArrayBufferAsText(buf) {
|
1705 |
-
var view = new Uint8Array(buf)
|
1706 |
-
var chars = new Array(view.length)
|
1707 |
-
|
1708 |
-
for (var i = 0; i < view.length; i++) {
|
1709 |
-
chars[i] = String.fromCharCode(view[i])
|
1710 |
-
}
|
1711 |
-
return chars.join('')
|
1712 |
-
}
|
1713 |
-
|
1714 |
-
function bufferClone(buf) {
|
1715 |
-
if (buf.slice) {
|
1716 |
-
return buf.slice(0)
|
1717 |
-
} else {
|
1718 |
-
var view = new Uint8Array(buf.byteLength)
|
1719 |
-
view.set(new Uint8Array(buf))
|
1720 |
-
return view.buffer
|
1721 |
-
}
|
1722 |
-
}
|
1723 |
-
|
1724 |
-
function Body() {
|
1725 |
-
this.bodyUsed = false
|
1726 |
-
|
1727 |
-
this._initBody = function(body) {
|
1728 |
-
this._bodyInit = body
|
1729 |
-
if (!body) {
|
1730 |
-
this._bodyText = ''
|
1731 |
-
} else if (typeof body === 'string') {
|
1732 |
-
this._bodyText = body
|
1733 |
-
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
1734 |
-
this._bodyBlob = body
|
1735 |
-
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
1736 |
-
this._bodyFormData = body
|
1737 |
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
1738 |
-
this._bodyText = body.toString()
|
1739 |
-
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
1740 |
-
this._bodyArrayBuffer = bufferClone(body.buffer)
|
1741 |
-
// IE 10-11 can't handle a DataView body.
|
1742 |
-
this._bodyInit = new Blob([this._bodyArrayBuffer])
|
1743 |
-
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
1744 |
-
this._bodyArrayBuffer = bufferClone(body)
|
1745 |
-
} else {
|
1746 |
-
throw new Error('unsupported BodyInit type')
|
1747 |
-
}
|
1748 |
-
|
1749 |
-
if (!this.headers.get('content-type')) {
|
1750 |
-
if (typeof body === 'string') {
|
1751 |
-
this.headers.set('content-type', 'text/plain;charset=UTF-8')
|
1752 |
-
} else if (this._bodyBlob && this._bodyBlob.type) {
|
1753 |
-
this.headers.set('content-type', this._bodyBlob.type)
|
1754 |
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
1755 |
-
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
|
1756 |
-
}
|
1757 |
-
}
|
1758 |
-
}
|
1759 |
-
|
1760 |
-
if (support.blob) {
|
1761 |
-
this.blob = function() {
|
1762 |
-
var rejected = consumed(this)
|
1763 |
-
if (rejected) {
|
1764 |
-
return rejected
|
1765 |
-
}
|
1766 |
-
|
1767 |
-
if (this._bodyBlob) {
|
1768 |
-
return Promise.resolve(this._bodyBlob)
|
1769 |
-
} else if (this._bodyArrayBuffer) {
|
1770 |
-
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
|
1771 |
-
} else if (this._bodyFormData) {
|
1772 |
-
throw new Error('could not read FormData body as blob')
|
1773 |
-
} else {
|
1774 |
-
return Promise.resolve(new Blob([this._bodyText]))
|
1775 |
-
}
|
1776 |
-
}
|
1777 |
-
|
1778 |
-
this.arrayBuffer = function() {
|
1779 |
-
if (this._bodyArrayBuffer) {
|
1780 |
-
return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
|
1781 |
-
} else {
|
1782 |
-
return this.blob().then(readBlobAsArrayBuffer)
|
1783 |
-
}
|
1784 |
-
}
|
1785 |
-
}
|
1786 |
-
|
1787 |
-
this.text = function() {
|
1788 |
-
var rejected = consumed(this)
|
1789 |
-
if (rejected) {
|
1790 |
-
return rejected
|
1791 |
-
}
|
1792 |
-
|
1793 |
-
if (this._bodyBlob) {
|
1794 |
-
return readBlobAsText(this._bodyBlob)
|
1795 |
-
} else if (this._bodyArrayBuffer) {
|
1796 |
-
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
|
1797 |
-
} else if (this._bodyFormData) {
|
1798 |
-
throw new Error('could not read FormData body as text')
|
1799 |
-
} else {
|
1800 |
-
return Promise.resolve(this._bodyText)
|
1801 |
-
}
|
1802 |
-
}
|
1803 |
-
|
1804 |
-
if (support.formData) {
|
1805 |
-
this.formData = function() {
|
1806 |
-
return this.text().then(decode)
|
1807 |
-
}
|
1808 |
-
}
|
1809 |
-
|
1810 |
-
this.json = function() {
|
1811 |
-
return this.text().then(JSON.parse)
|
1812 |
-
}
|
1813 |
-
|
1814 |
-
return this
|
1815 |
-
}
|
1816 |
-
|
1817 |
-
// HTTP methods whose capitalization should be normalized
|
1818 |
-
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
|
1819 |
-
|
1820 |
-
function normalizeMethod(method) {
|
1821 |
-
var upcased = method.toUpperCase()
|
1822 |
-
return (methods.indexOf(upcased) > -1) ? upcased : method
|
1823 |
-
}
|
1824 |
-
|
1825 |
-
function Request(input, options) {
|
1826 |
-
options = options || {}
|
1827 |
-
var body = options.body
|
1828 |
-
|
1829 |
-
if (typeof input === 'string') {
|
1830 |
-
this.url = input
|
1831 |
-
} else {
|
1832 |
-
if (input.bodyUsed) {
|
1833 |
-
throw new TypeError('Already read')
|
1834 |
-
}
|
1835 |
-
this.url = input.url
|
1836 |
-
this.credentials = input.credentials
|
1837 |
-
if (!options.headers) {
|
1838 |
-
this.headers = new Headers(input.headers)
|
1839 |
-
}
|
1840 |
-
this.method = input.method
|
1841 |
-
this.mode = input.mode
|
1842 |
-
if (!body && input._bodyInit != null) {
|
1843 |
-
body = input._bodyInit
|
1844 |
-
input.bodyUsed = true
|
1845 |
-
}
|
1846 |
-
}
|
1847 |
-
|
1848 |
-
this.credentials = options.credentials || this.credentials || 'omit'
|
1849 |
-
if (options.headers || !this.headers) {
|
1850 |
-
this.headers = new Headers(options.headers)
|
1851 |
-
}
|
1852 |
-
this.method = normalizeMethod(options.method || this.method || 'GET')
|
1853 |
-
this.mode = options.mode || this.mode || null
|
1854 |
-
this.referrer = null
|
1855 |
-
|
1856 |
-
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
1857 |
-
throw new TypeError('Body not allowed for GET or HEAD requests')
|
1858 |
-
}
|
1859 |
-
this._initBody(body)
|
1860 |
-
}
|
1861 |
-
|
1862 |
-
Request.prototype.clone = function() {
|
1863 |
-
return new Request(this, { body: this._bodyInit })
|
1864 |
-
}
|
1865 |
-
|
1866 |
-
function decode(body) {
|
1867 |
-
var form = new FormData()
|
1868 |
-
body.trim().split('&').forEach(function(bytes) {
|
1869 |
-
if (bytes) {
|
1870 |
-
var split = bytes.split('=')
|
1871 |
-
var name = split.shift().replace(/\+/g, ' ')
|
1872 |
-
var value = split.join('=').replace(/\+/g, ' ')
|
1873 |
-
form.append(decodeURIComponent(name), decodeURIComponent(value))
|
1874 |
-
}
|
1875 |
-
})
|
1876 |
-
return form
|
1877 |
-
}
|
1878 |
-
|
1879 |
-
function parseHeaders(rawHeaders) {
|
1880 |
-
var headers = new Headers()
|
1881 |
-
rawHeaders.split('\r\n').forEach(function(line) {
|
1882 |
-
var parts = line.split(':')
|
1883 |
-
var key = parts.shift().trim()
|
1884 |
-
if (key) {
|
1885 |
-
var value = parts.join(':').trim()
|
1886 |
-
headers.append(key, value)
|
1887 |
-
}
|
1888 |
-
})
|
1889 |
-
return headers
|
1890 |
-
}
|
1891 |
-
|
1892 |
-
Body.call(Request.prototype)
|
1893 |
-
|
1894 |
-
function Response(bodyInit, options) {
|
1895 |
-
if (!options) {
|
1896 |
-
options = {}
|
1897 |
-
}
|
1898 |
-
|
1899 |
-
this.type = 'default'
|
1900 |
-
this.status = 'status' in options ? options.status : 200
|
1901 |
-
this.ok = this.status >= 200 && this.status < 300
|
1902 |
-
this.statusText = 'statusText' in options ? options.statusText : 'OK'
|
1903 |
-
this.headers = new Headers(options.headers)
|
1904 |
-
this.url = options.url || ''
|
1905 |
-
this._initBody(bodyInit)
|
1906 |
-
}
|
1907 |
-
|
1908 |
-
Body.call(Response.prototype)
|
1909 |
-
|
1910 |
-
Response.prototype.clone = function() {
|
1911 |
-
return new Response(this._bodyInit, {
|
1912 |
-
status: this.status,
|
1913 |
-
statusText: this.statusText,
|
1914 |
-
headers: new Headers(this.headers),
|
1915 |
-
url: this.url
|
1916 |
-
})
|
1917 |
-
}
|
1918 |
-
|
1919 |
-
Response.error = function() {
|
1920 |
-
var response = new Response(null, {status: 0, statusText: ''})
|
1921 |
-
response.type = 'error'
|
1922 |
-
return response
|
1923 |
-
}
|
1924 |
-
|
1925 |
-
var redirectStatuses = [301, 302, 303, 307, 308]
|
1926 |
-
|
1927 |
-
Response.redirect = function(url, status) {
|
1928 |
-
if (redirectStatuses.indexOf(status) === -1) {
|
1929 |
-
throw new RangeError('Invalid status code')
|
1930 |
-
}
|
1931 |
-
|
1932 |
-
return new Response(null, {status: status, headers: {location: url}})
|
1933 |
-
}
|
1934 |
-
|
1935 |
-
self.Headers = Headers
|
1936 |
-
self.Request = Request
|
1937 |
-
self.Response = Response
|
1938 |
-
|
1939 |
-
self.fetch = function(input, init) {
|
1940 |
-
return new Promise(function(resolve, reject) {
|
1941 |
-
var request = new Request(input, init)
|
1942 |
-
var xhr = new XMLHttpRequest()
|
1943 |
-
|
1944 |
-
xhr.onload = function() {
|
1945 |
-
var options = {
|
1946 |
-
status: xhr.status,
|
1947 |
-
statusText: xhr.statusText,
|
1948 |
-
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
1949 |
-
}
|
1950 |
-
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
|
1951 |
-
var body = 'response' in xhr ? xhr.response : xhr.responseText
|
1952 |
-
resolve(new Response(body, options))
|
1953 |
-
}
|
1954 |
-
|
1955 |
-
xhr.onerror = function() {
|
1956 |
-
reject(new TypeError('Network request failed'))
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
xhr.ontimeout = function() {
|
1960 |
-
reject(new TypeError('Network request failed'))
|
1961 |
-
}
|
1962 |
-
|
1963 |
-
xhr.open(request.method, request.url, true)
|
1964 |
-
|
1965 |
-
if (request.credentials === 'include') {
|
1966 |
-
xhr.withCredentials = true
|
1967 |
-
}
|
1968 |
-
|
1969 |
-
if ('responseType' in xhr && support.blob) {
|
1970 |
-
xhr.responseType = 'blob'
|
1971 |
-
}
|
1972 |
-
|
1973 |
-
request.headers.forEach(function(value, name) {
|
1974 |
-
xhr.setRequestHeader(name, value)
|
1975 |
-
})
|
1976 |
-
|
1977 |
-
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
|
1978 |
-
})
|
1979 |
-
}
|
1980 |
-
self.fetch.polyfill = true
|
1981 |
-
})(typeof self !== 'undefined' ? self : this);
|
1982 |
-
|
1983 |
-
|
1984 |
-
/*** EXPORTS FROM exports-loader ***/
|
1985 |
-
module.exports = global.fetch;
|
1986 |
-
}.call(global));
|
1987 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(14), (function() { return this; }())))
|
1988 |
-
|
1989 |
-
/***/ },
|
1990 |
-
/* 14 */
|
1991 |
-
/***/ function(module, exports, __webpack_require__) {
|
1992 |
-
|
1993 |
-
var require;/* WEBPACK VAR INJECTION */(function(process, Promise, global) {/*** IMPORTS FROM imports-loader ***/
|
1994 |
-
(function() {
|
1995 |
-
|
1996 |
-
/*!
|
1997 |
-
* @overview es6-promise - a tiny implementation of Promises/A+.
|
1998 |
-
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
1999 |
-
* @license Licensed under MIT license
|
2000 |
-
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
2001 |
-
* @version 3.3.1
|
2002 |
-
*/
|
2003 |
-
|
2004 |
-
(function (global, factory) {
|
2005 |
-
true ? module.exports = factory() :
|
2006 |
-
typeof define === 'function' && define.amd ? define(factory) :
|
2007 |
-
(global.ES6Promise = factory());
|
2008 |
-
}(this, (function () { 'use strict';
|
2009 |
-
|
2010 |
-
function objectOrFunction(x) {
|
2011 |
-
return typeof x === 'function' || typeof x === 'object' && x !== null;
|
2012 |
-
}
|
2013 |
|
2014 |
-
|
2015 |
-
|
2016 |
-
}
|
2017 |
|
2018 |
-
|
2019 |
-
|
2020 |
-
_isArray = function (x) {
|
2021 |
-
return Object.prototype.toString.call(x) === '[object Array]';
|
2022 |
-
};
|
2023 |
-
} else {
|
2024 |
-
_isArray = Array.isArray;
|
2025 |
-
}
|
2026 |
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
var vertxNext = undefined;
|
2031 |
-
var customSchedulerFn = undefined;
|
2032 |
-
|
2033 |
-
var asap = function asap(callback, arg) {
|
2034 |
-
queue[len] = callback;
|
2035 |
-
queue[len + 1] = arg;
|
2036 |
-
len += 2;
|
2037 |
-
if (len === 2) {
|
2038 |
-
// If len is 2, that means that we need to schedule an async flush.
|
2039 |
-
// If additional callbacks are queued before the queue is flushed, they
|
2040 |
-
// will be processed by this flush that we are scheduling.
|
2041 |
-
if (customSchedulerFn) {
|
2042 |
-
customSchedulerFn(flush);
|
2043 |
-
} else {
|
2044 |
-
scheduleFlush();
|
2045 |
-
}
|
2046 |
-
}
|
2047 |
};
|
2048 |
|
2049 |
-
|
2050 |
-
|
2051 |
-
}
|
2052 |
-
|
2053 |
-
function setAsap(asapFn) {
|
2054 |
-
asap = asapFn;
|
2055 |
-
}
|
2056 |
-
|
2057 |
-
var browserWindow = typeof window !== 'undefined' ? window : undefined;
|
2058 |
-
var browserGlobal = browserWindow || {};
|
2059 |
-
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
|
2060 |
-
var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
|
2061 |
-
|
2062 |
-
// test for web worker but not in IE10
|
2063 |
-
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
|
2064 |
-
|
2065 |
-
// node
|
2066 |
-
function useNextTick() {
|
2067 |
-
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
|
2068 |
-
// see https://github.com/cujojs/when/issues/410 for details
|
2069 |
-
return function () {
|
2070 |
-
return process.nextTick(flush);
|
2071 |
-
};
|
2072 |
-
}
|
2073 |
|
2074 |
-
|
2075 |
-
|
2076 |
-
return function () {
|
2077 |
-
vertxNext(flush);
|
2078 |
-
};
|
2079 |
-
}
|
2080 |
|
2081 |
-
|
2082 |
-
|
2083 |
-
var observer = new BrowserMutationObserver(flush);
|
2084 |
-
var node = document.createTextNode('');
|
2085 |
-
observer.observe(node, { characterData: true });
|
2086 |
|
2087 |
-
|
2088 |
-
|
2089 |
-
};
|
2090 |
-
}
|
2091 |
|
2092 |
-
|
2093 |
-
|
2094 |
-
var channel = new MessageChannel();
|
2095 |
-
channel.port1.onmessage = flush;
|
2096 |
-
return function () {
|
2097 |
-
return channel.port2.postMessage(0);
|
2098 |
-
};
|
2099 |
-
}
|
2100 |
|
2101 |
-
|
2102 |
-
|
2103 |
-
// other code modifying setTimeout (like sinon.useFakeTimers())
|
2104 |
-
var globalSetTimeout = setTimeout;
|
2105 |
-
return function () {
|
2106 |
-
return globalSetTimeout(flush, 1);
|
2107 |
-
};
|
2108 |
-
}
|
2109 |
|
2110 |
-
|
2111 |
-
|
2112 |
-
for (var i = 0; i < len; i += 2) {
|
2113 |
-
var callback = queue[i];
|
2114 |
-
var arg = queue[i + 1];
|
2115 |
|
2116 |
-
|
|
|
|
|
|
|
|
|
2117 |
|
2118 |
-
|
2119 |
-
|
2120 |
-
}
|
2121 |
|
2122 |
-
|
2123 |
-
|
2124 |
|
2125 |
-
|
2126 |
-
|
2127 |
-
var r = require;
|
2128 |
-
var vertx = __webpack_require__(16);
|
2129 |
-
vertxNext = vertx.runOnLoop || vertx.runOnContext;
|
2130 |
-
return useVertxTimer();
|
2131 |
-
} catch (e) {
|
2132 |
-
return useSetTimeout();
|
2133 |
-
}
|
2134 |
-
}
|
2135 |
|
2136 |
-
|
2137 |
-
|
2138 |
-
if (isNode) {
|
2139 |
-
scheduleFlush = useNextTick();
|
2140 |
-
} else if (BrowserMutationObserver) {
|
2141 |
-
scheduleFlush = useMutationObserver();
|
2142 |
-
} else if (isWorker) {
|
2143 |
-
scheduleFlush = useMessageChannel();
|
2144 |
-
} else if (browserWindow === undefined && "function" === 'function') {
|
2145 |
-
scheduleFlush = attemptVertx();
|
2146 |
-
} else {
|
2147 |
-
scheduleFlush = useSetTimeout();
|
2148 |
-
}
|
2149 |
|
2150 |
-
|
2151 |
-
|
|
|
|
|
2152 |
|
2153 |
-
|
|
|
2154 |
|
2155 |
-
|
|
|
2156 |
|
2157 |
-
|
2158 |
-
|
2159 |
-
}
|
2160 |
|
2161 |
-
|
|
|
2162 |
|
2163 |
-
|
2164 |
-
|
2165 |
-
var callback = _arguments[_state - 1];
|
2166 |
-
asap(function () {
|
2167 |
-
return invokeCallback(_state, child, callback, parent._result);
|
2168 |
-
});
|
2169 |
-
})();
|
2170 |
-
} else {
|
2171 |
-
subscribe(parent, child, onFulfillment, onRejection);
|
2172 |
-
}
|
2173 |
|
2174 |
-
|
2175 |
-
|
2176 |
|
2177 |
-
|
2178 |
-
|
2179 |
-
passed `value`. It is shorthand for the following:
|
2180 |
-
|
2181 |
-
```javascript
|
2182 |
-
let promise = new Promise(function(resolve, reject){
|
2183 |
-
resolve(1);
|
2184 |
-
});
|
2185 |
-
|
2186 |
-
promise.then(function(value){
|
2187 |
-
// value === 1
|
2188 |
-
});
|
2189 |
-
```
|
2190 |
-
|
2191 |
-
Instead of writing the above, your code now simply becomes the following:
|
2192 |
-
|
2193 |
-
```javascript
|
2194 |
-
let promise = Promise.resolve(1);
|
2195 |
-
|
2196 |
-
promise.then(function(value){
|
2197 |
-
// value === 1
|
2198 |
-
});
|
2199 |
-
```
|
2200 |
-
|
2201 |
-
@method resolve
|
2202 |
-
@static
|
2203 |
-
@param {Any} value value that the returned promise will be resolved with
|
2204 |
-
Useful for tooling.
|
2205 |
-
@return {Promise} a promise that will become fulfilled with the given
|
2206 |
-
`value`
|
2207 |
-
*/
|
2208 |
-
function resolve(object) {
|
2209 |
-
/*jshint validthis:true */
|
2210 |
-
var Constructor = this;
|
2211 |
-
|
2212 |
-
if (object && typeof object === 'object' && object.constructor === Constructor) {
|
2213 |
-
return object;
|
2214 |
-
}
|
2215 |
-
|
2216 |
-
var promise = new Constructor(noop);
|
2217 |
-
_resolve(promise, object);
|
2218 |
-
return promise;
|
2219 |
-
}
|
2220 |
|
2221 |
-
|
|
|
2222 |
|
2223 |
-
|
|
|
2224 |
|
2225 |
-
|
2226 |
-
|
2227 |
-
var REJECTED = 2;
|
2228 |
|
2229 |
-
|
|
|
2230 |
|
2231 |
-
|
2232 |
-
|
2233 |
-
}
|
2234 |
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
|
|
2238 |
|
2239 |
-
|
2240 |
-
|
2241 |
-
return promise.then;
|
2242 |
-
} catch (error) {
|
2243 |
-
GET_THEN_ERROR.error = error;
|
2244 |
-
return GET_THEN_ERROR;
|
2245 |
-
}
|
2246 |
-
}
|
2247 |
|
2248 |
-
|
2249 |
-
|
2250 |
-
then.call(value, fulfillmentHandler, rejectionHandler);
|
2251 |
-
} catch (e) {
|
2252 |
-
return e;
|
2253 |
-
}
|
2254 |
-
}
|
2255 |
|
2256 |
-
|
2257 |
-
|
2258 |
-
var sealed = false;
|
2259 |
-
var error = tryThen(then, thenable, function (value) {
|
2260 |
-
if (sealed) {
|
2261 |
-
return;
|
2262 |
-
}
|
2263 |
-
sealed = true;
|
2264 |
-
if (thenable !== value) {
|
2265 |
-
_resolve(promise, value);
|
2266 |
-
} else {
|
2267 |
-
fulfill(promise, value);
|
2268 |
-
}
|
2269 |
-
}, function (reason) {
|
2270 |
-
if (sealed) {
|
2271 |
-
return;
|
2272 |
-
}
|
2273 |
-
sealed = true;
|
2274 |
-
|
2275 |
-
_reject(promise, reason);
|
2276 |
-
}, 'Settle: ' + (promise._label || ' unknown promise'));
|
2277 |
-
|
2278 |
-
if (!sealed && error) {
|
2279 |
-
sealed = true;
|
2280 |
-
_reject(promise, error);
|
2281 |
-
}
|
2282 |
-
}, promise);
|
2283 |
-
}
|
2284 |
|
2285 |
-
|
2286 |
-
|
2287 |
-
fulfill(promise, thenable._result);
|
2288 |
-
} else if (thenable._state === REJECTED) {
|
2289 |
-
_reject(promise, thenable._result);
|
2290 |
-
} else {
|
2291 |
-
subscribe(thenable, undefined, function (value) {
|
2292 |
-
return _resolve(promise, value);
|
2293 |
-
}, function (reason) {
|
2294 |
-
return _reject(promise, reason);
|
2295 |
-
});
|
2296 |
-
}
|
2297 |
-
}
|
2298 |
|
2299 |
-
|
2300 |
-
|
2301 |
-
handleOwnThenable(promise, maybeThenable);
|
2302 |
-
} else {
|
2303 |
-
if (then$$ === GET_THEN_ERROR) {
|
2304 |
-
_reject(promise, GET_THEN_ERROR.error);
|
2305 |
-
} else if (then$$ === undefined) {
|
2306 |
-
fulfill(promise, maybeThenable);
|
2307 |
-
} else if (isFunction(then$$)) {
|
2308 |
-
handleForeignThenable(promise, maybeThenable, then$$);
|
2309 |
-
} else {
|
2310 |
-
fulfill(promise, maybeThenable);
|
2311 |
-
}
|
2312 |
-
}
|
2313 |
-
}
|
2314 |
|
2315 |
-
|
2316 |
-
|
2317 |
-
_reject(promise, selfFulfillment());
|
2318 |
-
} else if (objectOrFunction(value)) {
|
2319 |
-
handleMaybeThenable(promise, value, getThen(value));
|
2320 |
-
} else {
|
2321 |
-
fulfill(promise, value);
|
2322 |
-
}
|
2323 |
-
}
|
2324 |
|
2325 |
-
|
2326 |
-
|
2327 |
-
promise._onerror(promise._result);
|
2328 |
-
}
|
2329 |
|
2330 |
-
|
2331 |
-
|
|
|
|
|
2332 |
|
2333 |
-
|
2334 |
-
|
2335 |
-
return;
|
2336 |
-
}
|
2337 |
|
2338 |
-
|
2339 |
-
|
2340 |
|
2341 |
-
|
2342 |
-
|
2343 |
-
}
|
2344 |
-
}
|
2345 |
|
2346 |
-
|
2347 |
-
|
2348 |
-
return;
|
2349 |
-
}
|
2350 |
-
promise._state = REJECTED;
|
2351 |
-
promise._result = reason;
|
2352 |
|
2353 |
-
|
2354 |
-
|
|
|
|
|
2355 |
|
2356 |
-
|
2357 |
-
|
2358 |
-
var length = _subscribers.length;
|
2359 |
|
2360 |
-
|
|
|
2361 |
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
|
2366 |
-
|
2367 |
-
asap(publish, parent);
|
2368 |
-
}
|
2369 |
-
}
|
2370 |
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
|
|
|
|
2374 |
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
callback(detail);
|
2391 |
-
}
|
2392 |
-
}
|
2393 |
|
2394 |
-
|
|
|
|
|
2395 |
}
|
2396 |
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2400 |
|
2401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2402 |
|
2403 |
-
|
2404 |
-
|
2405 |
-
return callback(detail);
|
2406 |
-
} catch (e) {
|
2407 |
-
TRY_CATCH_ERROR.error = e;
|
2408 |
-
return TRY_CATCH_ERROR;
|
2409 |
-
}
|
2410 |
-
}
|
2411 |
|
2412 |
-
|
2413 |
-
|
2414 |
-
value = undefined,
|
2415 |
-
error = undefined,
|
2416 |
-
succeeded = undefined,
|
2417 |
-
failed = undefined;
|
2418 |
-
|
2419 |
-
if (hasCallback) {
|
2420 |
-
value = tryCatch(callback, detail);
|
2421 |
-
|
2422 |
-
if (value === TRY_CATCH_ERROR) {
|
2423 |
-
failed = true;
|
2424 |
-
error = value.error;
|
2425 |
-
value = null;
|
2426 |
-
} else {
|
2427 |
-
succeeded = true;
|
2428 |
-
}
|
2429 |
-
|
2430 |
-
if (promise === value) {
|
2431 |
-
_reject(promise, cannotReturnOwn());
|
2432 |
-
return;
|
2433 |
-
}
|
2434 |
-
} else {
|
2435 |
-
value = detail;
|
2436 |
-
succeeded = true;
|
2437 |
-
}
|
2438 |
-
|
2439 |
-
if (promise._state !== PENDING) {
|
2440 |
-
// noop
|
2441 |
-
} else if (hasCallback && succeeded) {
|
2442 |
-
_resolve(promise, value);
|
2443 |
-
} else if (failed) {
|
2444 |
-
_reject(promise, error);
|
2445 |
-
} else if (settled === FULFILLED) {
|
2446 |
-
fulfill(promise, value);
|
2447 |
-
} else if (settled === REJECTED) {
|
2448 |
-
_reject(promise, value);
|
2449 |
-
}
|
2450 |
-
}
|
2451 |
|
2452 |
-
|
2453 |
-
|
2454 |
-
resolver(function resolvePromise(value) {
|
2455 |
-
_resolve(promise, value);
|
2456 |
-
}, function rejectPromise(reason) {
|
2457 |
-
_reject(promise, reason);
|
2458 |
-
});
|
2459 |
-
} catch (e) {
|
2460 |
-
_reject(promise, e);
|
2461 |
-
}
|
2462 |
-
}
|
2463 |
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
}
|
2468 |
|
2469 |
-
|
2470 |
-
|
2471 |
-
promise._state = undefined;
|
2472 |
-
promise._result = undefined;
|
2473 |
-
promise._subscribers = [];
|
2474 |
-
}
|
2475 |
|
2476 |
-
|
2477 |
-
this._instanceConstructor = Constructor;
|
2478 |
-
this.promise = new Constructor(noop);
|
2479 |
-
|
2480 |
-
if (!this.promise[PROMISE_ID]) {
|
2481 |
-
makePromise(this.promise);
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
if (isArray(input)) {
|
2485 |
-
this._input = input;
|
2486 |
-
this.length = input.length;
|
2487 |
-
this._remaining = input.length;
|
2488 |
-
|
2489 |
-
this._result = new Array(this.length);
|
2490 |
-
|
2491 |
-
if (this.length === 0) {
|
2492 |
-
fulfill(this.promise, this._result);
|
2493 |
-
} else {
|
2494 |
-
this.length = this.length || 0;
|
2495 |
-
this._enumerate();
|
2496 |
-
if (this._remaining === 0) {
|
2497 |
-
fulfill(this.promise, this._result);
|
2498 |
-
}
|
2499 |
-
}
|
2500 |
-
} else {
|
2501 |
-
_reject(this.promise, validationError());
|
2502 |
-
}
|
2503 |
-
}
|
2504 |
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2508 |
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2512 |
|
2513 |
-
|
2514 |
-
|
2515 |
-
}
|
2516 |
-
};
|
2517 |
|
2518 |
-
|
2519 |
-
var c = this._instanceConstructor;
|
2520 |
-
var resolve$$ = c.resolve;
|
2521 |
-
|
2522 |
-
if (resolve$$ === resolve) {
|
2523 |
-
var _then = getThen(entry);
|
2524 |
-
|
2525 |
-
if (_then === then && entry._state !== PENDING) {
|
2526 |
-
this._settledAt(entry._state, i, entry._result);
|
2527 |
-
} else if (typeof _then !== 'function') {
|
2528 |
-
this._remaining--;
|
2529 |
-
this._result[i] = entry;
|
2530 |
-
} else if (c === Promise) {
|
2531 |
-
var promise = new c(noop);
|
2532 |
-
handleMaybeThenable(promise, entry, _then);
|
2533 |
-
this._willSettleAt(promise, i);
|
2534 |
-
} else {
|
2535 |
-
this._willSettleAt(new c(function (resolve$$) {
|
2536 |
-
return resolve$$(entry);
|
2537 |
-
}), i);
|
2538 |
-
}
|
2539 |
-
} else {
|
2540 |
-
this._willSettleAt(resolve$$(entry), i);
|
2541 |
-
}
|
2542 |
-
};
|
2543 |
|
2544 |
-
|
2545 |
-
|
2546 |
|
2547 |
-
|
2548 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2549 |
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2556 |
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2561 |
|
2562 |
-
|
2563 |
-
var enumerator = this;
|
2564 |
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
return enumerator._settledAt(REJECTED, i, reason);
|
2569 |
-
});
|
2570 |
-
};
|
2571 |
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
elements of the passed iterable to promises as it runs this algorithm.
|
2577 |
-
|
2578 |
-
Example:
|
2579 |
-
|
2580 |
-
```javascript
|
2581 |
-
let promise1 = resolve(1);
|
2582 |
-
let promise2 = resolve(2);
|
2583 |
-
let promise3 = resolve(3);
|
2584 |
-
let promises = [ promise1, promise2, promise3 ];
|
2585 |
-
|
2586 |
-
Promise.all(promises).then(function(array){
|
2587 |
-
// The array here would be [ 1, 2, 3 ];
|
2588 |
-
});
|
2589 |
-
```
|
2590 |
-
|
2591 |
-
If any of the `promises` given to `all` are rejected, the first promise
|
2592 |
-
that is rejected will be given as an argument to the returned promises's
|
2593 |
-
rejection handler. For example:
|
2594 |
-
|
2595 |
-
Example:
|
2596 |
-
|
2597 |
-
```javascript
|
2598 |
-
let promise1 = resolve(1);
|
2599 |
-
let promise2 = reject(new Error("2"));
|
2600 |
-
let promise3 = reject(new Error("3"));
|
2601 |
-
let promises = [ promise1, promise2, promise3 ];
|
2602 |
-
|
2603 |
-
Promise.all(promises).then(function(array){
|
2604 |
-
// Code here never runs because there are rejected promises!
|
2605 |
-
}, function(error) {
|
2606 |
-
// error.message === "2"
|
2607 |
-
});
|
2608 |
-
```
|
2609 |
-
|
2610 |
-
@method all
|
2611 |
-
@static
|
2612 |
-
@param {Array} entries array of promises
|
2613 |
-
@param {String} label optional string for labeling the promise.
|
2614 |
-
Useful for tooling.
|
2615 |
-
@return {Promise} promise that is fulfilled when all `promises` have been
|
2616 |
-
fulfilled, or rejected if any of them become rejected.
|
2617 |
-
@static
|
2618 |
-
*/
|
2619 |
-
function all(entries) {
|
2620 |
-
return new Enumerator(this, entries).promise;
|
2621 |
-
}
|
2622 |
|
2623 |
-
|
2624 |
-
|
2625 |
-
first passed promise to settle.
|
2626 |
-
|
2627 |
-
Example:
|
2628 |
-
|
2629 |
-
```javascript
|
2630 |
-
let promise1 = new Promise(function(resolve, reject){
|
2631 |
-
setTimeout(function(){
|
2632 |
-
resolve('promise 1');
|
2633 |
-
}, 200);
|
2634 |
-
});
|
2635 |
-
|
2636 |
-
let promise2 = new Promise(function(resolve, reject){
|
2637 |
-
setTimeout(function(){
|
2638 |
-
resolve('promise 2');
|
2639 |
-
}, 100);
|
2640 |
-
});
|
2641 |
-
|
2642 |
-
Promise.race([promise1, promise2]).then(function(result){
|
2643 |
-
// result === 'promise 2' because it was resolved before promise1
|
2644 |
-
// was resolved.
|
2645 |
-
});
|
2646 |
-
```
|
2647 |
-
|
2648 |
-
`Promise.race` is deterministic in that only the state of the first
|
2649 |
-
settled promise matters. For example, even if other promises given to the
|
2650 |
-
`promises` array argument are resolved, but the first settled promise has
|
2651 |
-
become rejected before the other promises became fulfilled, the returned
|
2652 |
-
promise will become rejected:
|
2653 |
-
|
2654 |
-
```javascript
|
2655 |
-
let promise1 = new Promise(function(resolve, reject){
|
2656 |
-
setTimeout(function(){
|
2657 |
-
resolve('promise 1');
|
2658 |
-
}, 200);
|
2659 |
-
});
|
2660 |
-
|
2661 |
-
let promise2 = new Promise(function(resolve, reject){
|
2662 |
-
setTimeout(function(){
|
2663 |
-
reject(new Error('promise 2'));
|
2664 |
-
}, 100);
|
2665 |
-
});
|
2666 |
-
|
2667 |
-
Promise.race([promise1, promise2]).then(function(result){
|
2668 |
-
// Code here never runs
|
2669 |
-
}, function(reason){
|
2670 |
-
// reason.message === 'promise 2' because promise 2 became rejected before
|
2671 |
-
// promise 1 became fulfilled
|
2672 |
-
});
|
2673 |
-
```
|
2674 |
-
|
2675 |
-
An example real-world use case is implementing timeouts:
|
2676 |
-
|
2677 |
-
```javascript
|
2678 |
-
Promise.race([ajax('foo.json'), timeout(5000)])
|
2679 |
-
```
|
2680 |
-
|
2681 |
-
@method race
|
2682 |
-
@static
|
2683 |
-
@param {Array} promises array of promises to observe
|
2684 |
-
Useful for tooling.
|
2685 |
-
@return {Promise} a promise which settles in the same way as the first passed
|
2686 |
-
promise to settle.
|
2687 |
-
*/
|
2688 |
-
function race(entries) {
|
2689 |
-
/*jshint validthis:true */
|
2690 |
-
var Constructor = this;
|
2691 |
-
|
2692 |
-
if (!isArray(entries)) {
|
2693 |
-
return new Constructor(function (_, reject) {
|
2694 |
-
return reject(new TypeError('You must pass an array to race.'));
|
2695 |
-
});
|
2696 |
-
} else {
|
2697 |
-
return new Constructor(function (resolve, reject) {
|
2698 |
-
var length = entries.length;
|
2699 |
-
for (var i = 0; i < length; i++) {
|
2700 |
-
Constructor.resolve(entries[i]).then(resolve, reject);
|
2701 |
-
}
|
2702 |
-
});
|
2703 |
-
}
|
2704 |
}
|
2705 |
|
2706 |
-
|
2707 |
-
|
2708 |
-
It is shorthand for the following:
|
2709 |
-
|
2710 |
-
```javascript
|
2711 |
-
let promise = new Promise(function(resolve, reject){
|
2712 |
-
reject(new Error('WHOOPS'));
|
2713 |
-
});
|
2714 |
-
|
2715 |
-
promise.then(function(value){
|
2716 |
-
// Code here doesn't run because the promise is rejected!
|
2717 |
-
}, function(reason){
|
2718 |
-
// reason.message === 'WHOOPS'
|
2719 |
-
});
|
2720 |
-
```
|
2721 |
-
|
2722 |
-
Instead of writing the above, your code now simply becomes the following:
|
2723 |
-
|
2724 |
-
```javascript
|
2725 |
-
let promise = Promise.reject(new Error('WHOOPS'));
|
2726 |
-
|
2727 |
-
promise.then(function(value){
|
2728 |
-
// Code here doesn't run because the promise is rejected!
|
2729 |
-
}, function(reason){
|
2730 |
-
// reason.message === 'WHOOPS'
|
2731 |
-
});
|
2732 |
-
```
|
2733 |
-
|
2734 |
-
@method reject
|
2735 |
-
@static
|
2736 |
-
@param {Any} reason value that the returned promise will be rejected with.
|
2737 |
-
Useful for tooling.
|
2738 |
-
@return {Promise} a promise rejected with the given `reason`.
|
2739 |
-
*/
|
2740 |
-
function reject(reason) {
|
2741 |
-
/*jshint validthis:true */
|
2742 |
-
var Constructor = this;
|
2743 |
-
var promise = new Constructor(noop);
|
2744 |
-
_reject(promise, reason);
|
2745 |
-
return promise;
|
2746 |
-
}
|
2747 |
|
2748 |
-
|
2749 |
-
|
2750 |
-
}
|
2751 |
|
2752 |
-
|
2753 |
-
|
2754 |
}
|
|
|
2755 |
|
2756 |
-
|
2757 |
-
|
2758 |
-
primary way of interacting with a promise is through its `then` method, which
|
2759 |
-
registers callbacks to receive either a promise's eventual value or the reason
|
2760 |
-
why the promise cannot be fulfilled.
|
2761 |
-
|
2762 |
-
Terminology
|
2763 |
-
-----------
|
2764 |
-
|
2765 |
-
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
|
2766 |
-
- `thenable` is an object or function that defines a `then` method.
|
2767 |
-
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
|
2768 |
-
- `exception` is a value that is thrown using the throw statement.
|
2769 |
-
- `reason` is a value that indicates why a promise was rejected.
|
2770 |
-
- `settled` the final resting state of a promise, fulfilled or rejected.
|
2771 |
-
|
2772 |
-
A promise can be in one of three states: pending, fulfilled, or rejected.
|
2773 |
-
|
2774 |
-
Promises that are fulfilled have a fulfillment value and are in the fulfilled
|
2775 |
-
state. Promises that are rejected have a rejection reason and are in the
|
2776 |
-
rejected state. A fulfillment value is never a thenable.
|
2777 |
-
|
2778 |
-
Promises can also be said to *resolve* a value. If this value is also a
|
2779 |
-
promise, then the original promise's settled state will match the value's
|
2780 |
-
settled state. So a promise that *resolves* a promise that rejects will
|
2781 |
-
itself reject, and a promise that *resolves* a promise that fulfills will
|
2782 |
-
itself fulfill.
|
2783 |
-
|
2784 |
-
|
2785 |
-
Basic Usage:
|
2786 |
-
------------
|
2787 |
-
|
2788 |
-
```js
|
2789 |
-
let promise = new Promise(function(resolve, reject) {
|
2790 |
-
// on success
|
2791 |
-
resolve(value);
|
2792 |
-
|
2793 |
-
// on failure
|
2794 |
-
reject(reason);
|
2795 |
-
});
|
2796 |
-
|
2797 |
-
promise.then(function(value) {
|
2798 |
-
// on fulfillment
|
2799 |
-
}, function(reason) {
|
2800 |
-
// on rejection
|
2801 |
-
});
|
2802 |
-
```
|
2803 |
-
|
2804 |
-
Advanced Usage:
|
2805 |
-
---------------
|
2806 |
-
|
2807 |
-
Promises shine when abstracting away asynchronous interactions such as
|
2808 |
-
`XMLHttpRequest`s.
|
2809 |
-
|
2810 |
-
```js
|
2811 |
-
function getJSON(url) {
|
2812 |
-
return new Promise(function(resolve, reject){
|
2813 |
-
let xhr = new XMLHttpRequest();
|
2814 |
-
|
2815 |
-
xhr.open('GET', url);
|
2816 |
-
xhr.onreadystatechange = handler;
|
2817 |
-
xhr.responseType = 'json';
|
2818 |
-
xhr.setRequestHeader('Accept', 'application/json');
|
2819 |
-
xhr.send();
|
2820 |
-
|
2821 |
-
function handler() {
|
2822 |
-
if (this.readyState === this.DONE) {
|
2823 |
-
if (this.status === 200) {
|
2824 |
-
resolve(this.response);
|
2825 |
-
} else {
|
2826 |
-
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
|
2827 |
-
}
|
2828 |
-
}
|
2829 |
-
};
|
2830 |
-
});
|
2831 |
-
}
|
2832 |
-
|
2833 |
-
getJSON('/posts.json').then(function(json) {
|
2834 |
-
// on fulfillment
|
2835 |
-
}, function(reason) {
|
2836 |
-
// on rejection
|
2837 |
-
});
|
2838 |
-
```
|
2839 |
-
|
2840 |
-
Unlike callbacks, promises are great composable primitives.
|
2841 |
-
|
2842 |
-
```js
|
2843 |
-
Promise.all([
|
2844 |
-
getJSON('/posts'),
|
2845 |
-
getJSON('/comments')
|
2846 |
-
]).then(function(values){
|
2847 |
-
values[0] // => postsJSON
|
2848 |
-
values[1] // => commentsJSON
|
2849 |
-
|
2850 |
-
return values;
|
2851 |
-
});
|
2852 |
-
```
|
2853 |
-
|
2854 |
-
@class Promise
|
2855 |
-
@param {function} resolver
|
2856 |
-
Useful for tooling.
|
2857 |
-
@constructor
|
2858 |
-
*/
|
2859 |
-
function Promise(resolver) {
|
2860 |
-
this[PROMISE_ID] = nextId();
|
2861 |
-
this._result = this._state = undefined;
|
2862 |
-
this._subscribers = [];
|
2863 |
-
|
2864 |
-
if (noop !== resolver) {
|
2865 |
-
typeof resolver !== 'function' && needsResolver();
|
2866 |
-
this instanceof Promise ? initializePromise(this, resolver) : needsNew();
|
2867 |
-
}
|
2868 |
-
}
|
2869 |
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
Promise.reject = reject;
|
2874 |
-
Promise._setScheduler = setScheduler;
|
2875 |
-
Promise._setAsap = setAsap;
|
2876 |
-
Promise._asap = asap;
|
2877 |
-
|
2878 |
-
Promise.prototype = {
|
2879 |
-
constructor: Promise,
|
2880 |
-
|
2881 |
-
/**
|
2882 |
-
The primary way of interacting with a promise is through its `then` method,
|
2883 |
-
which registers callbacks to receive either a promise's eventual value or the
|
2884 |
-
reason why the promise cannot be fulfilled.
|
2885 |
-
|
2886 |
-
```js
|
2887 |
-
findUser().then(function(user){
|
2888 |
-
// user is available
|
2889 |
-
}, function(reason){
|
2890 |
-
// user is unavailable, and you are given the reason why
|
2891 |
-
});
|
2892 |
-
```
|
2893 |
-
|
2894 |
-
Chaining
|
2895 |
-
--------
|
2896 |
-
|
2897 |
-
The return value of `then` is itself a promise. This second, 'downstream'
|
2898 |
-
promise is resolved with the return value of the first promise's fulfillment
|
2899 |
-
or rejection handler, or rejected if the handler throws an exception.
|
2900 |
-
|
2901 |
-
```js
|
2902 |
-
findUser().then(function (user) {
|
2903 |
-
return user.name;
|
2904 |
-
}, function (reason) {
|
2905 |
-
return 'default name';
|
2906 |
-
}).then(function (userName) {
|
2907 |
-
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
2908 |
-
// will be `'default name'`
|
2909 |
-
});
|
2910 |
-
|
2911 |
-
findUser().then(function (user) {
|
2912 |
-
throw new Error('Found user, but still unhappy');
|
2913 |
-
}, function (reason) {
|
2914 |
-
throw new Error('`findUser` rejected and we're unhappy');
|
2915 |
-
}).then(function (value) {
|
2916 |
-
// never reached
|
2917 |
-
}, function (reason) {
|
2918 |
-
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
2919 |
-
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
2920 |
-
});
|
2921 |
-
```
|
2922 |
-
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
2923 |
-
|
2924 |
-
```js
|
2925 |
-
findUser().then(function (user) {
|
2926 |
-
throw new PedagogicalException('Upstream error');
|
2927 |
-
}).then(function (value) {
|
2928 |
-
// never reached
|
2929 |
-
}).then(function (value) {
|
2930 |
-
// never reached
|
2931 |
-
}, function (reason) {
|
2932 |
-
// The `PedgagocialException` is propagated all the way down to here
|
2933 |
-
});
|
2934 |
-
```
|
2935 |
-
|
2936 |
-
Assimilation
|
2937 |
-
------------
|
2938 |
-
|
2939 |
-
Sometimes the value you want to propagate to a downstream promise can only be
|
2940 |
-
retrieved asynchronously. This can be achieved by returning a promise in the
|
2941 |
-
fulfillment or rejection handler. The downstream promise will then be pending
|
2942 |
-
until the returned promise is settled. This is called *assimilation*.
|
2943 |
-
|
2944 |
-
```js
|
2945 |
-
findUser().then(function (user) {
|
2946 |
-
return findCommentsByAuthor(user);
|
2947 |
-
}).then(function (comments) {
|
2948 |
-
// The user's comments are now available
|
2949 |
-
});
|
2950 |
-
```
|
2951 |
-
|
2952 |
-
If the assimliated promise rejects, then the downstream promise will also reject.
|
2953 |
-
|
2954 |
-
```js
|
2955 |
-
findUser().then(function (user) {
|
2956 |
-
return findCommentsByAuthor(user);
|
2957 |
-
}).then(function (comments) {
|
2958 |
-
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
2959 |
-
}, function (reason) {
|
2960 |
-
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
2961 |
-
});
|
2962 |
-
```
|
2963 |
-
|
2964 |
-
Simple Example
|
2965 |
-
--------------
|
2966 |
-
|
2967 |
-
Synchronous Example
|
2968 |
-
|
2969 |
-
```javascript
|
2970 |
-
let result;
|
2971 |
-
|
2972 |
-
try {
|
2973 |
-
result = findResult();
|
2974 |
-
// success
|
2975 |
-
} catch(reason) {
|
2976 |
-
// failure
|
2977 |
-
}
|
2978 |
-
```
|
2979 |
-
|
2980 |
-
Errback Example
|
2981 |
-
|
2982 |
-
```js
|
2983 |
-
findResult(function(result, err){
|
2984 |
-
if (err) {
|
2985 |
-
// failure
|
2986 |
-
} else {
|
2987 |
-
// success
|
2988 |
-
}
|
2989 |
-
});
|
2990 |
-
```
|
2991 |
-
|
2992 |
-
Promise Example;
|
2993 |
-
|
2994 |
-
```javascript
|
2995 |
-
findResult().then(function(result){
|
2996 |
-
// success
|
2997 |
-
}, function(reason){
|
2998 |
-
// failure
|
2999 |
-
});
|
3000 |
-
```
|
3001 |
-
|
3002 |
-
Advanced Example
|
3003 |
-
--------------
|
3004 |
-
|
3005 |
-
Synchronous Example
|
3006 |
-
|
3007 |
-
```javascript
|
3008 |
-
let author, books;
|
3009 |
-
|
3010 |
-
try {
|
3011 |
-
author = findAuthor();
|
3012 |
-
books = findBooksByAuthor(author);
|
3013 |
-
// success
|
3014 |
-
} catch(reason) {
|
3015 |
-
// failure
|
3016 |
-
}
|
3017 |
-
```
|
3018 |
-
|
3019 |
-
Errback Example
|
3020 |
-
|
3021 |
-
```js
|
3022 |
-
|
3023 |
-
function foundBooks(books) {
|
3024 |
-
|
3025 |
-
}
|
3026 |
-
|
3027 |
-
function failure(reason) {
|
3028 |
-
|
3029 |
-
}
|
3030 |
-
|
3031 |
-
findAuthor(function(author, err){
|
3032 |
-
if (err) {
|
3033 |
-
failure(err);
|
3034 |
-
// failure
|
3035 |
-
} else {
|
3036 |
-
try {
|
3037 |
-
findBoooksByAuthor(author, function(books, err) {
|
3038 |
-
if (err) {
|
3039 |
-
failure(err);
|
3040 |
-
} else {
|
3041 |
-
try {
|
3042 |
-
foundBooks(books);
|
3043 |
-
} catch(reason) {
|
3044 |
-
failure(reason);
|
3045 |
-
}
|
3046 |
-
}
|
3047 |
-
});
|
3048 |
-
} catch(error) {
|
3049 |
-
failure(err);
|
3050 |
-
}
|
3051 |
-
// success
|
3052 |
-
}
|
3053 |
-
});
|
3054 |
-
```
|
3055 |
-
|
3056 |
-
Promise Example;
|
3057 |
-
|
3058 |
-
```javascript
|
3059 |
-
findAuthor().
|
3060 |
-
then(findBooksByAuthor).
|
3061 |
-
then(function(books){
|
3062 |
-
// found books
|
3063 |
-
}).catch(function(reason){
|
3064 |
-
// something went wrong
|
3065 |
-
});
|
3066 |
-
```
|
3067 |
-
|
3068 |
-
@method then
|
3069 |
-
@param {Function} onFulfilled
|
3070 |
-
@param {Function} onRejected
|
3071 |
-
Useful for tooling.
|
3072 |
-
@return {Promise}
|
3073 |
-
*/
|
3074 |
-
then: then,
|
3075 |
-
|
3076 |
-
/**
|
3077 |
-
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
3078 |
-
as the catch block of a try/catch statement.
|
3079 |
-
|
3080 |
-
```js
|
3081 |
-
function findAuthor(){
|
3082 |
-
throw new Error('couldn't find that author');
|
3083 |
-
}
|
3084 |
-
|
3085 |
-
// synchronous
|
3086 |
-
try {
|
3087 |
-
findAuthor();
|
3088 |
-
} catch(reason) {
|
3089 |
-
// something went wrong
|
3090 |
-
}
|
3091 |
-
|
3092 |
-
// async with promises
|
3093 |
-
findAuthor().catch(function(reason){
|
3094 |
-
// something went wrong
|
3095 |
-
});
|
3096 |
-
```
|
3097 |
-
|
3098 |
-
@method catch
|
3099 |
-
@param {Function} onRejection
|
3100 |
-
Useful for tooling.
|
3101 |
-
@return {Promise}
|
3102 |
-
*/
|
3103 |
-
'catch': function _catch(onRejection) {
|
3104 |
-
return this.then(null, onRejection);
|
3105 |
-
}
|
3106 |
-
};
|
3107 |
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
if (typeof global !== 'undefined') {
|
3112 |
-
local = global;
|
3113 |
-
} else if (typeof self !== 'undefined') {
|
3114 |
-
local = self;
|
3115 |
-
} else {
|
3116 |
-
try {
|
3117 |
-
local = Function('return this')();
|
3118 |
-
} catch (e) {
|
3119 |
-
throw new Error('polyfill failed because global object is unavailable in this environment');
|
3120 |
-
}
|
3121 |
-
}
|
3122 |
-
|
3123 |
-
var P = local.Promise;
|
3124 |
-
|
3125 |
-
if (P) {
|
3126 |
-
var promiseToString = null;
|
3127 |
-
try {
|
3128 |
-
promiseToString = Object.prototype.toString.call(P.resolve());
|
3129 |
-
} catch (e) {
|
3130 |
-
// silently ignored
|
3131 |
-
}
|
3132 |
-
|
3133 |
-
if (promiseToString === '[object Promise]' && !P.cast) {
|
3134 |
-
return;
|
3135 |
-
}
|
3136 |
-
}
|
3137 |
-
|
3138 |
-
local.Promise = Promise;
|
3139 |
}
|
|
|
3140 |
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
Promise.Promise = Promise;
|
3145 |
-
|
3146 |
-
return Promise;
|
3147 |
-
|
3148 |
-
})));
|
3149 |
-
//# sourceMappingURL=es6-promise.map
|
3150 |
-
|
3151 |
-
/*** EXPORTS FROM exports-loader ***/
|
3152 |
-
module.exports = global.Promise;
|
3153 |
-
}.call(global));
|
3154 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15), __webpack_require__(14), (function() { return this; }())))
|
3155 |
-
|
3156 |
-
/***/ },
|
3157 |
-
/* 15 */
|
3158 |
-
/***/ function(module, exports) {
|
3159 |
-
|
3160 |
-
// shim for using process in browser
|
3161 |
-
var process = module.exports = {};
|
3162 |
|
3163 |
-
//
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
|
|
3167 |
|
3168 |
-
|
3169 |
-
var
|
3170 |
|
3171 |
-
|
3172 |
-
|
3173 |
-
}
|
3174 |
-
function defaultClearTimeout () {
|
3175 |
-
throw new Error('clearTimeout has not been defined');
|
3176 |
-
}
|
3177 |
-
(function () {
|
3178 |
-
try {
|
3179 |
-
if (typeof setTimeout === 'function') {
|
3180 |
-
cachedSetTimeout = setTimeout;
|
3181 |
-
} else {
|
3182 |
-
cachedSetTimeout = defaultSetTimout;
|
3183 |
-
}
|
3184 |
-
} catch (e) {
|
3185 |
-
cachedSetTimeout = defaultSetTimout;
|
3186 |
-
}
|
3187 |
-
try {
|
3188 |
-
if (typeof clearTimeout === 'function') {
|
3189 |
-
cachedClearTimeout = clearTimeout;
|
3190 |
-
} else {
|
3191 |
-
cachedClearTimeout = defaultClearTimeout;
|
3192 |
-
}
|
3193 |
-
} catch (e) {
|
3194 |
-
cachedClearTimeout = defaultClearTimeout;
|
3195 |
-
}
|
3196 |
-
} ())
|
3197 |
-
function runTimeout(fun) {
|
3198 |
-
if (cachedSetTimeout === setTimeout) {
|
3199 |
-
//normal enviroments in sane situations
|
3200 |
-
return setTimeout(fun, 0);
|
3201 |
-
}
|
3202 |
-
// if setTimeout wasn't available but was latter defined
|
3203 |
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
3204 |
-
cachedSetTimeout = setTimeout;
|
3205 |
-
return setTimeout(fun, 0);
|
3206 |
-
}
|
3207 |
-
try {
|
3208 |
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
3209 |
-
return cachedSetTimeout(fun, 0);
|
3210 |
-
} catch(e){
|
3211 |
-
try {
|
3212 |
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
3213 |
-
return cachedSetTimeout.call(null, fun, 0);
|
3214 |
-
} catch(e){
|
3215 |
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
3216 |
-
return cachedSetTimeout.call(this, fun, 0);
|
3217 |
-
}
|
3218 |
-
}
|
3219 |
|
|
|
|
|
3220 |
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
}
|
3227 |
-
// if clearTimeout wasn't available but was latter defined
|
3228 |
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
3229 |
-
cachedClearTimeout = clearTimeout;
|
3230 |
-
return clearTimeout(marker);
|
3231 |
-
}
|
3232 |
-
try {
|
3233 |
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
3234 |
-
return cachedClearTimeout(marker);
|
3235 |
-
} catch (e){
|
3236 |
-
try {
|
3237 |
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
3238 |
-
return cachedClearTimeout.call(null, marker);
|
3239 |
-
} catch (e){
|
3240 |
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
3241 |
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
3242 |
-
return cachedClearTimeout.call(this, marker);
|
3243 |
-
}
|
3244 |
-
}
|
3245 |
|
|
|
|
|
|
|
3246 |
|
|
|
|
|
|
|
3247 |
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
var currentQueue;
|
3252 |
-
var queueIndex = -1;
|
3253 |
-
|
3254 |
-
function cleanUpNextTick() {
|
3255 |
-
if (!draining || !currentQueue) {
|
3256 |
-
return;
|
3257 |
-
}
|
3258 |
-
draining = false;
|
3259 |
-
if (currentQueue.length) {
|
3260 |
-
queue = currentQueue.concat(queue);
|
3261 |
-
} else {
|
3262 |
-
queueIndex = -1;
|
3263 |
-
}
|
3264 |
-
if (queue.length) {
|
3265 |
-
drainQueue();
|
3266 |
-
}
|
3267 |
-
}
|
3268 |
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
}
|
3273 |
-
var timeout = runTimeout(cleanUpNextTick);
|
3274 |
-
draining = true;
|
3275 |
-
|
3276 |
-
var len = queue.length;
|
3277 |
-
while(len) {
|
3278 |
-
currentQueue = queue;
|
3279 |
-
queue = [];
|
3280 |
-
while (++queueIndex < len) {
|
3281 |
-
if (currentQueue) {
|
3282 |
-
currentQueue[queueIndex].run();
|
3283 |
-
}
|
3284 |
-
}
|
3285 |
-
queueIndex = -1;
|
3286 |
-
len = queue.length;
|
3287 |
-
}
|
3288 |
-
currentQueue = null;
|
3289 |
-
draining = false;
|
3290 |
-
runClearTimeout(timeout);
|
3291 |
-
}
|
3292 |
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
for (var i = 1; i < arguments.length; i++) {
|
3297 |
-
args[i - 1] = arguments[i];
|
3298 |
-
}
|
3299 |
-
}
|
3300 |
-
queue.push(new Item(fun, args));
|
3301 |
-
if (queue.length === 1 && !draining) {
|
3302 |
-
runTimeout(drainQueue);
|
3303 |
-
}
|
3304 |
-
};
|
3305 |
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
this.array = array;
|
3310 |
-
}
|
3311 |
-
Item.prototype.run = function () {
|
3312 |
-
this.fun.apply(null, this.array);
|
3313 |
-
};
|
3314 |
-
process.title = 'browser';
|
3315 |
-
process.browser = true;
|
3316 |
-
process.env = {};
|
3317 |
-
process.argv = [];
|
3318 |
-
process.version = ''; // empty string to avoid regexp issues
|
3319 |
-
process.versions = {};
|
3320 |
-
|
3321 |
-
function noop() {}
|
3322 |
-
|
3323 |
-
process.on = noop;
|
3324 |
-
process.addListener = noop;
|
3325 |
-
process.once = noop;
|
3326 |
-
process.off = noop;
|
3327 |
-
process.removeListener = noop;
|
3328 |
-
process.removeAllListeners = noop;
|
3329 |
-
process.emit = noop;
|
3330 |
-
|
3331 |
-
process.binding = function (name) {
|
3332 |
-
throw new Error('process.binding is not supported');
|
3333 |
-
};
|
3334 |
|
3335 |
-
|
3336 |
-
process.chdir = function (dir) {
|
3337 |
-
throw new Error('process.chdir is not supported');
|
3338 |
-
};
|
3339 |
-
process.umask = function() { return 0; };
|
3340 |
|
|
|
|
|
3341 |
|
3342 |
-
/***/ },
|
3343 |
/* 16 */
|
3344 |
-
/***/ function(module, exports) {
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3349 |
/******/ ]);
|
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 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
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.l = 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 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, {
|
40 |
+
/******/ configurable: false,
|
41 |
+
/******/ enumerable: true,
|
42 |
+
/******/ get: getter
|
43 |
+
/******/ });
|
44 |
+
/******/ }
|
45 |
+
/******/ };
|
46 |
+
/******/
|
47 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
+
/******/ __webpack_require__.n = function(module) {
|
49 |
+
/******/ var getter = module && module.__esModule ?
|
50 |
+
/******/ function getDefault() { return module['default']; } :
|
51 |
+
/******/ function getModuleExports() { return module; };
|
52 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
+
/******/ return getter;
|
54 |
+
/******/ };
|
55 |
+
/******/
|
56 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
+
/******/
|
59 |
/******/ // __webpack_public_path__
|
60 |
/******/ __webpack_require__.p = "";
|
61 |
+
/******/
|
62 |
/******/ // Load entry module and return exports
|
63 |
+
/******/ return __webpack_require__(__webpack_require__.s = 14);
|
64 |
/******/ })
|
65 |
/************************************************************************/
|
66 |
/******/ ([
|
67 |
/* 0 */
|
68 |
+
/***/ (function(module, exports, __webpack_require__) {
|
69 |
+
|
70 |
+
"use strict";
|
71 |
+
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
75 |
+
*
|
76 |
+
* This program is free software: you can redistribute it and/or modify
|
77 |
+
* it under the terms of the GNU General Public License as published by
|
78 |
+
* the Free Software Foundation, either version 3 of the License, or
|
79 |
+
* (at your option) any later version.
|
80 |
+
*
|
81 |
+
* This program is distributed in the hope that it will be useful,
|
82 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
83 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
84 |
+
* GNU General Public License for more details.
|
85 |
+
*
|
86 |
+
* You should have received a copy of the GNU General Public License
|
87 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
88 |
+
*
|
89 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
90 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
91 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
92 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
93 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
94 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
95 |
+
*/
|
96 |
+
|
97 |
+
var $ = jQuery;
|
98 |
+
|
99 |
+
module.exports = {
|
100 |
+
random: function random(len) {
|
101 |
+
var text = '';
|
102 |
+
var possible = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
103 |
+
|
104 |
+
for (var i = 0; i < len; i++) {
|
105 |
+
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
106 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
+
return text;
|
109 |
+
},
|
110 |
+
form: function form(id) {
|
111 |
+
return $(id).serializeArray();
|
112 |
+
},
|
113 |
+
ucfirst: function ucfirst(text) {
|
114 |
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
115 |
+
},
|
116 |
+
list: function list(input) {
|
117 |
+
// Convert object to list
|
118 |
+
if ($.isPlainObject(input)) {
|
119 |
+
var result = [];
|
120 |
+
var params = decodeURIComponent($.param(input)).split('&');
|
121 |
+
|
122 |
+
// Loop over params
|
123 |
+
$.each(params, function (index, item) {
|
124 |
+
var value = item.split('=');
|
125 |
+
|
126 |
+
// Add item
|
127 |
+
result.push({ name: value[0], value: value[1] });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
});
|
|
|
|
|
129 |
|
130 |
+
return result;
|
131 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
return input;
|
134 |
+
},
|
135 |
+
json: function json(input) {
|
136 |
+
if ($.type(input) === 'string') {
|
137 |
+
var result = input.match(/{[\s\S]+}/);
|
138 |
+
if (result !== null) {
|
139 |
+
return result[0];
|
140 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
|
|
142 |
|
143 |
+
return false;
|
144 |
+
}
|
145 |
+
};
|
146 |
|
147 |
+
/***/ }),
|
148 |
+
/* 1 */
|
149 |
+
/***/ (function(module, exports, __webpack_require__) {
|
150 |
+
|
151 |
+
"use strict";
|
152 |
+
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
156 |
+
*
|
157 |
+
* This program is free software: you can redistribute it and/or modify
|
158 |
+
* it under the terms of the GNU General Public License as published by
|
159 |
+
* the Free Software Foundation, either version 3 of the License, or
|
160 |
+
* (at your option) any later version.
|
161 |
+
*
|
162 |
+
* This program is distributed in the hope that it will be useful,
|
163 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
164 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
165 |
+
* GNU General Public License for more details.
|
166 |
+
*
|
167 |
+
* You should have received a copy of the GNU General Public License
|
168 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
169 |
+
*
|
170 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
171 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
172 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
173 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
174 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
175 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
176 |
+
*/
|
177 |
+
|
178 |
+
var Util = __webpack_require__(0);
|
179 |
+
|
180 |
+
jQuery(document).ready(function ($) {
|
181 |
'use strict';
|
182 |
|
183 |
+
$('#ai1wm-report-problem-button').click(function (e) {
|
184 |
+
$(this).next('.ai1wm-report-problem-dialog').toggleClass('ai1wm-report-active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
+
e.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
});
|
188 |
|
189 |
+
$('#ai1wm-report-cancel').click(function (e) {
|
190 |
+
$(this).closest('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
+
e.preventDefault();
|
193 |
+
});
|
194 |
|
195 |
+
$('#ai1wm-report-submit').click(function () {
|
196 |
+
var email = $('.ai1wm-report-email').val();
|
197 |
+
var message = $('.ai1wm-report-message').val();
|
198 |
+
var terms = $('.ai1wm-report-terms').is(':checked');
|
199 |
|
|
|
200 |
$.ajax({
|
201 |
+
url: ai1wm_report.ajax.url,
|
202 |
type: 'POST',
|
203 |
dataType: 'json',
|
204 |
+
async: false,
|
205 |
+
data: {
|
206 |
+
'secret_key': ai1wm_report.secret_key,
|
207 |
+
'ai1wm_email': email,
|
208 |
+
'ai1wm_message': message,
|
209 |
+
'ai1wm_terms': +terms
|
210 |
+
},
|
211 |
dataFilter: function dataFilter(data, type) {
|
212 |
return Util.json(data);
|
213 |
+
},
|
214 |
+
success: function success(data) {
|
215 |
+
if (data.errors.length > 0) {
|
216 |
+
// Reset previous messages
|
217 |
+
$('.ai1wm-report-problem-dialog .ai1wm-message').remove();
|
218 |
+
|
219 |
+
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
220 |
+
$.each(data.errors, function (key, value) {
|
221 |
+
errorMessage.append('<p>' + value + '</p>');
|
222 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
+
$('.ai1wm-report-problem-dialog').prepend(errorMessage);
|
225 |
+
} else {
|
226 |
+
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your request!</p>');
|
227 |
+
$('.ai1wm-report-problem-dialog').html(successMessage);
|
228 |
|
229 |
+
// Hide message
|
230 |
+
setTimeout(function () {
|
231 |
+
$('.ai1wm-report-problem-dialog').removeClass('ai1wm-report-active');
|
232 |
+
}, 2000);
|
233 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
});
|
236 |
+
});
|
237 |
+
});
|
238 |
|
239 |
+
/***/ }),
|
240 |
+
/* 2 */
|
241 |
+
/***/ (function(module, exports, __webpack_require__) {
|
242 |
+
|
243 |
+
"use strict";
|
244 |
+
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
248 |
+
*
|
249 |
+
* This program is free software: you can redistribute it and/or modify
|
250 |
+
* it under the terms of the GNU General Public License as published by
|
251 |
+
* the Free Software Foundation, either version 3 of the License, or
|
252 |
+
* (at your option) any later version.
|
253 |
+
*
|
254 |
+
* This program is distributed in the hope that it will be useful,
|
255 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
256 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
257 |
+
* GNU General Public License for more details.
|
258 |
+
*
|
259 |
+
* You should have received a copy of the GNU General Public License
|
260 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
261 |
+
*
|
262 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
263 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
264 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
265 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
266 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
267 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
268 |
+
*/
|
269 |
+
|
270 |
+
var Util = __webpack_require__(0);
|
271 |
+
|
272 |
+
jQuery(document).ready(function ($) {
|
273 |
+
'use strict';
|
274 |
|
275 |
+
// Reset feedback form
|
|
|
|
|
|
|
276 |
|
277 |
+
$('.ai1wm-feedback-type').attr('checked', false);
|
|
|
278 |
|
279 |
+
// Review
|
280 |
+
$('#ai1wm-feedback-type-link-1').click(function (e) {
|
281 |
+
var radio = $('#ai1wm-feedback-type-1');
|
282 |
+
if (radio.is(':checked')) {
|
283 |
+
radio.attr('checked', false);
|
284 |
+
e.preventDefault();
|
285 |
+
} else {
|
286 |
+
radio.attr('checked', true);
|
287 |
}
|
288 |
+
});
|
289 |
|
290 |
+
// Improvement
|
291 |
+
$('#ai1wm-feedback-type-2').click(function () {
|
292 |
+
// Hide other options
|
293 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-3').closest('li').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
|
295 |
+
// change placeholder message
|
296 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'Leave plugin developers any feedback here');
|
|
|
|
|
297 |
|
298 |
+
// Show feedback form
|
299 |
+
$('.ai1wm-feedback-form').fadeIn();
|
300 |
+
});
|
301 |
|
302 |
+
// Help
|
303 |
+
$('#ai1wm-feedback-type-3').click(function () {
|
304 |
+
// Hide other options
|
305 |
+
$('#ai1wm-feedback-type-1, #ai1wm-feedback-type-2').closest('li').hide();
|
306 |
|
307 |
+
// change placeholder message
|
308 |
+
$('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', 'How may we help you?');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
|
310 |
+
// Show feedback form
|
311 |
+
$('.ai1wm-feedback-form').fadeIn();
|
312 |
+
});
|
313 |
|
314 |
+
// Cancel feedback form
|
315 |
+
$('#ai1wm-feedback-cancel').click(function (e) {
|
316 |
+
$('.ai1wm-feedback-form').fadeOut(function () {
|
317 |
+
$('.ai1wm-feedback-type').attr('checked', false).closest('li').show();
|
318 |
});
|
319 |
+
e.preventDefault();
|
320 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
|
322 |
+
// Send feedback form
|
323 |
+
$('#ai1wm-feedback-submit').click(function () {
|
324 |
+
var type = $('.ai1wm-feedback-type:checked').val();
|
325 |
+
var email = $('.ai1wm-feedback-email').val();
|
326 |
+
var message = $('.ai1wm-feedback-message').val();
|
327 |
+
var terms = $('.ai1wm-feedback-terms').is(':checked');
|
328 |
|
|
|
329 |
$.ajax({
|
330 |
+
url: ai1wm_feedback.ajax.url,
|
331 |
type: 'POST',
|
332 |
dataType: 'json',
|
333 |
+
async: false,
|
334 |
+
data: {
|
335 |
+
'secret_key': ai1wm_feedback.secret_key,
|
336 |
+
'ai1wm_type': type,
|
337 |
+
'ai1wm_email': email,
|
338 |
+
'ai1wm_message': message,
|
339 |
+
'ai1wm_terms': +terms
|
340 |
+
},
|
341 |
dataFilter: function dataFilter(data, type) {
|
342 |
return Util.json(data);
|
343 |
+
},
|
344 |
+
success: function success(data) {
|
345 |
+
if (data.errors.length > 0) {
|
346 |
+
// Reset previous messages
|
347 |
+
$('.ai1wm-feedback .ai1wm-message').remove();
|
348 |
+
|
349 |
+
var errorMessage = $('<div />').addClass('ai1wm-message ai1wm-error-message');
|
350 |
+
$.each(data.errors, function (key, value) {
|
351 |
+
errorMessage.append('<p>' + value + '</p>');
|
352 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
|
354 |
+
$('.ai1wm-feedback').prepend(errorMessage);
|
355 |
+
} else {
|
356 |
+
var successMessage = $('<div />').addClass('ai1wm-message ai1wm-success-message').append('<p>Thanks for submitting your feedback!</p>');
|
357 |
+
$('.ai1wm-feedback').html(successMessage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
}
|
359 |
}
|
360 |
+
});
|
361 |
+
});
|
362 |
+
});
|
363 |
|
364 |
+
/***/ }),
|
365 |
+
/* 3 */
|
366 |
+
/***/ (function(module, exports) {
|
367 |
+
|
368 |
+
var g;
|
369 |
+
|
370 |
+
// This works in non-strict mode
|
371 |
+
g = (function() {
|
372 |
+
return this;
|
373 |
+
})();
|
374 |
+
|
375 |
+
try {
|
376 |
+
// This works if eval is allowed (see CSP)
|
377 |
+
g = g || Function("return this")() || (1,eval)("this");
|
378 |
+
} catch(e) {
|
379 |
+
// This works if the window reference is available
|
380 |
+
if(typeof window === "object")
|
381 |
+
g = window;
|
382 |
+
}
|
383 |
+
|
384 |
+
// g can still be undefined, but nothing to do about it...
|
385 |
+
// We return undefined, instead of nothing here, so it's
|
386 |
+
// easier to handle this case. if(!global) { ...}
|
387 |
+
|
388 |
+
module.exports = g;
|
389 |
+
|
390 |
+
|
391 |
+
/***/ }),
|
392 |
+
/* 4 */
|
393 |
+
/***/ (function(module, exports, __webpack_require__) {
|
394 |
+
|
395 |
+
"use strict";
|
396 |
+
|
397 |
+
|
398 |
+
/**
|
399 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
400 |
+
*
|
401 |
+
* This program is free software: you can redistribute it and/or modify
|
402 |
+
* it under the terms of the GNU General Public License as published by
|
403 |
+
* the Free Software Foundation, either version 3 of the License, or
|
404 |
+
* (at your option) any later version.
|
405 |
+
*
|
406 |
+
* This program is distributed in the hope that it will be useful,
|
407 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
408 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
409 |
+
* GNU General Public License for more details.
|
410 |
+
*
|
411 |
+
* You should have received a copy of the GNU General Public License
|
412 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
413 |
+
*
|
414 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
415 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
416 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
417 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
418 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
419 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
420 |
+
*/
|
421 |
+
|
422 |
+
var Util = __webpack_require__(0),
|
423 |
+
Modal = __webpack_require__(5),
|
424 |
+
$ = jQuery;
|
425 |
+
|
426 |
+
var Import = function Import() {
|
427 |
+
var self = this;
|
428 |
+
|
429 |
+
// Set params
|
430 |
+
this.params = [];
|
431 |
+
|
432 |
+
// Set stop flag
|
433 |
+
this.stopImport = false;
|
434 |
+
|
435 |
+
// Set modal
|
436 |
+
this.modal = new Modal();
|
437 |
+
|
438 |
+
// Set confirm listener
|
439 |
+
this.modal.onConfirm = function (options) {
|
440 |
+
self.onConfirm(options);
|
441 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
|
443 |
+
// Set blogs listener
|
444 |
+
this.modal.onBlogs = function (options) {
|
445 |
+
self.onBlogs(options);
|
446 |
+
};
|
447 |
|
448 |
+
// Set stop listener
|
449 |
+
this.modal.onStop = function (options) {
|
450 |
+
self.onStop(options);
|
451 |
+
};
|
452 |
+
};
|
453 |
|
454 |
+
Import.prototype.setParams = function (params) {
|
455 |
+
this.params = Util.list(params);
|
456 |
+
};
|
|
|
457 |
|
458 |
+
Import.prototype.start = function (options, retries) {
|
459 |
+
var self = this;
|
460 |
+
var retries = retries || 0;
|
461 |
|
462 |
+
// Set stop flag
|
463 |
+
if (retries === 0) {
|
464 |
+
this.stopImport = false;
|
465 |
+
}
|
466 |
|
467 |
+
// Stop running import
|
468 |
+
if (this.stopImport) {
|
469 |
+
return;
|
470 |
+
}
|
471 |
|
472 |
+
// Initializing beforeunload event
|
473 |
+
$(window).bind('beforeunload', function () {
|
474 |
+
return 'You are about to stop importing your website, are you sure?';
|
475 |
+
});
|
476 |
|
477 |
+
// Set initial status
|
478 |
+
this.setStatus({ type: 'info', message: 'Preparing to import...' });
|
479 |
|
480 |
+
// Set params
|
481 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key });
|
482 |
|
483 |
+
// Set additional params
|
484 |
+
if (options) {
|
485 |
+
params = params.concat(Util.list(options));
|
486 |
+
}
|
487 |
|
488 |
+
// Import
|
489 |
+
$.ajax({
|
490 |
+
url: ai1wm_import.ajax.url,
|
491 |
+
type: 'POST',
|
492 |
+
dataType: 'json',
|
493 |
+
data: params,
|
494 |
+
dataFilter: function dataFilter(data, type) {
|
495 |
+
return Util.json(data);
|
496 |
+
}
|
497 |
+
}).done(function () {
|
498 |
+
self.getStatus();
|
499 |
+
}).done(function (params) {
|
500 |
+
if (params) {
|
501 |
+
self.run(params);
|
502 |
+
}
|
503 |
+
}).fail(function () {
|
504 |
+
var timeout = retries * 1000;
|
505 |
+
if (retries >= 5) {
|
506 |
+
return self.setStatus({
|
507 |
+
type: 'error',
|
508 |
+
message: 'Unable to start the import. Refresh the page and try again'
|
509 |
});
|
510 |
+
}
|
511 |
|
512 |
+
retries++;
|
|
|
513 |
|
514 |
+
setTimeout(self.start.bind(self, options, retries), timeout);
|
515 |
+
});
|
516 |
+
};
|
517 |
|
518 |
+
Import.prototype.run = function (params, retries) {
|
519 |
+
var self = this;
|
520 |
+
var retries = retries || 0;
|
521 |
|
522 |
+
// Stop running import
|
523 |
+
if (this.stopImport) {
|
524 |
+
return;
|
525 |
+
}
|
526 |
|
527 |
+
// Import
|
528 |
+
$.ajax({
|
529 |
+
url: ai1wm_import.ajax.url,
|
530 |
+
type: 'POST',
|
531 |
+
dataType: 'json',
|
532 |
+
data: params,
|
533 |
+
dataFilter: function dataFilter(data, type) {
|
534 |
+
return Util.json(data);
|
535 |
+
}
|
536 |
+
}).done(function (params) {
|
537 |
+
if (params) {
|
538 |
+
self.run(params);
|
539 |
+
}
|
540 |
+
}).fail(function () {
|
541 |
+
var timeout = retries * 1000;
|
542 |
|
543 |
+
retries++;
|
|
|
544 |
|
545 |
+
setTimeout(self.run.bind(self, params, retries), timeout);
|
546 |
+
});
|
547 |
+
};
|
548 |
|
549 |
+
Import.prototype.confirm = function (options, retries) {
|
550 |
+
var self = this;
|
551 |
+
var retries = retries || 0;
|
552 |
|
553 |
+
// Stop running import
|
554 |
+
if (this.stopImport) {
|
555 |
+
return;
|
556 |
+
}
|
557 |
|
558 |
+
// Set params
|
559 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
|
|
|
|
|
|
560 |
|
561 |
+
// Set additional params
|
562 |
+
if (options) {
|
563 |
+
params = params.concat(Util.list(options));
|
564 |
+
}
|
565 |
|
566 |
+
// Confirm
|
567 |
+
$.ajax({
|
568 |
+
url: ai1wm_import.ajax.url,
|
569 |
+
type: 'POST',
|
570 |
+
dataType: 'json',
|
571 |
+
data: params,
|
572 |
+
dataFilter: function dataFilter(data, type) {
|
573 |
+
return Util.json(data);
|
574 |
+
}
|
575 |
+
}).done(function () {
|
576 |
+
self.getStatus();
|
577 |
+
}).done(function (params) {
|
578 |
+
if (params) {
|
579 |
+
self.run(params);
|
580 |
+
}
|
581 |
+
}).fail(function () {
|
582 |
+
var timeout = retries * 1000;
|
583 |
+
if (retries >= 5) {
|
584 |
+
return self.setStatus({
|
585 |
+
type: 'error',
|
586 |
+
message: 'Unable to confirm the import. Refresh the page and try again'
|
587 |
+
});
|
588 |
+
}
|
589 |
|
590 |
+
retries++;
|
|
|
|
|
591 |
|
592 |
+
setTimeout(self.confirm.bind(self, options, retries), timeout);
|
593 |
+
});
|
594 |
+
};
|
595 |
|
596 |
+
Import.prototype.blogs = function (options, retries) {
|
597 |
+
var self = this;
|
598 |
+
var retries = retries || 0;
|
|
|
599 |
|
600 |
+
// Stop running import
|
601 |
+
if (this.stopImport) {
|
602 |
+
return;
|
603 |
+
}
|
604 |
|
605 |
+
// Set params
|
606 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 150 });
|
|
|
|
|
607 |
|
608 |
+
// Set additional params
|
609 |
+
if (options) {
|
610 |
+
params = params.concat(Util.list(options));
|
611 |
+
}
|
612 |
|
613 |
+
// Blogs
|
614 |
+
$.ajax({
|
615 |
+
url: ai1wm_import.ajax.url,
|
616 |
+
type: 'POST',
|
617 |
+
dataType: 'json',
|
618 |
+
data: params,
|
619 |
+
dataFilter: function dataFilter(data, type) {
|
620 |
+
return Util.json(data);
|
621 |
+
}
|
622 |
+
}).done(function () {
|
623 |
+
self.getStatus();
|
624 |
+
}).done(function (params) {
|
625 |
+
if (params) {
|
626 |
+
self.run(params);
|
627 |
+
}
|
628 |
+
}).fail(function () {
|
629 |
+
var timeout = retries * 1000;
|
630 |
+
if (retries >= 5) {
|
631 |
+
return self.setStatus({
|
632 |
+
type: 'error',
|
633 |
+
message: 'Unable to prepare blogs the import. Refresh the page and try again'
|
634 |
+
});
|
635 |
+
}
|
636 |
|
637 |
+
retries++;
|
638 |
|
639 |
+
setTimeout(self.blogs.bind(self, options, retries), timeout);
|
640 |
+
});
|
641 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
|
643 |
+
Import.prototype.clean = function (options, retries) {
|
644 |
+
var self = this;
|
645 |
+
var retries = retries || 0;
|
|
|
646 |
|
647 |
+
// Set stop flag
|
648 |
+
this.stopImport = true;
|
|
|
649 |
|
650 |
+
// Set initial status
|
651 |
+
this.setStatus({ type: 'info', message: 'Please wait, stopping the import...' });
|
|
|
|
|
652 |
|
653 |
+
// Set params
|
654 |
+
var params = this.params.concat({ name: 'secret_key', value: ai1wm_import.secret_key }).concat({ name: 'priority', value: 400 });
|
655 |
|
656 |
+
// Set additional params
|
657 |
+
if (options) {
|
658 |
+
params = params.concat(Util.list(options));
|
659 |
+
}
|
660 |
|
661 |
+
// Clean
|
662 |
+
$.ajax({
|
663 |
+
url: ai1wm_import.ajax.url,
|
664 |
+
type: 'POST',
|
665 |
+
dataType: 'json',
|
666 |
+
data: params,
|
667 |
+
dataFilter: function dataFilter(data, type) {
|
668 |
+
return Util.json(data);
|
669 |
+
}
|
670 |
+
}).done(function () {
|
671 |
+
// Unbinding the beforeunload event when we stop importing
|
672 |
+
$(window).unbind('beforeunload');
|
673 |
+
|
674 |
+
// Destroy modal
|
675 |
+
self.modal.destroy();
|
676 |
+
}).fail(function () {
|
677 |
+
var timeout = retries * 1000;
|
678 |
+
if (retries >= 5) {
|
679 |
+
return self.setStatus({
|
680 |
+
type: 'error',
|
681 |
+
message: 'Unable to stop the import. Refresh the page and try again'
|
682 |
+
});
|
683 |
+
}
|
684 |
|
685 |
+
retries++;
|
686 |
|
687 |
+
setTimeout(self.clean.bind(self, options, retries), timeout);
|
688 |
+
});
|
689 |
+
};
|
690 |
|
691 |
+
Import.prototype.getStatus = function () {
|
692 |
+
var self = this;
|
|
|
693 |
|
694 |
+
// Stop getting status
|
695 |
+
if (this.stopImport) {
|
696 |
+
return;
|
697 |
+
}
|
698 |
|
699 |
+
$.ajax({
|
700 |
+
url: ai1wm_import.status.url,
|
701 |
+
type: 'GET',
|
702 |
+
dataType: 'json',
|
703 |
+
cache: false,
|
704 |
+
dataFilter: function dataFilter(data, type) {
|
705 |
+
return Util.json(data);
|
706 |
+
}
|
707 |
+
}).done(function (params) {
|
708 |
+
if (params) {
|
709 |
+
self.setStatus(params);
|
710 |
+
|
711 |
+
// Next status
|
712 |
+
switch (params.type) {
|
713 |
+
case 'done':
|
714 |
+
case 'error':
|
715 |
+
// Unbinding the beforeunload event when any case is performed
|
716 |
+
$(window).unbind('beforeunload');
|
717 |
+
return;
|
718 |
+
|
719 |
+
case 'confirm':
|
720 |
+
case 'blogs':
|
721 |
+
return;
|
722 |
+
}
|
723 |
+
}
|
724 |
|
725 |
+
// Import is not done yet, let's check status in 3 seconds
|
726 |
+
setTimeout(self.getStatus.bind(self), 3000);
|
727 |
+
}).fail(function () {
|
728 |
+
// Import is not done yet, let's check status in 3 seconds
|
729 |
+
setTimeout(self.getStatus.bind(self), 3000);
|
730 |
+
});;
|
731 |
+
};
|
732 |
|
733 |
+
Import.prototype.setStatus = function (params) {
|
734 |
+
this.modal.render(params);
|
735 |
+
};
|
736 |
|
737 |
+
Import.prototype.onConfirm = function (options) {
|
738 |
+
this.confirm(options);
|
739 |
+
};
|
|
|
740 |
|
741 |
+
Import.prototype.onBlogs = function (options) {
|
742 |
+
this.blogs(options);
|
743 |
+
};
|
744 |
|
745 |
+
Import.prototype.onStop = function (options) {
|
746 |
+
this.clean(options);
|
747 |
+
};
|
748 |
|
749 |
+
module.exports = Import;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
750 |
|
751 |
+
/***/ }),
|
752 |
+
/* 5 */
|
753 |
+
/***/ (function(module, exports, __webpack_require__) {
|
754 |
+
|
755 |
+
"use strict";
|
756 |
+
|
757 |
+
|
758 |
+
/**
|
759 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
760 |
+
*
|
761 |
+
* This program is free software: you can redistribute it and/or modify
|
762 |
+
* it under the terms of the GNU General Public License as published by
|
763 |
+
* the Free Software Foundation, either version 3 of the License, or
|
764 |
+
* (at your option) any later version.
|
765 |
+
*
|
766 |
+
* This program is distributed in the hope that it will be useful,
|
767 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
768 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
769 |
+
* GNU General Public License for more details.
|
770 |
+
*
|
771 |
+
* You should have received a copy of the GNU General Public License
|
772 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
773 |
+
*
|
774 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
775 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
776 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
777 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
778 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
779 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
780 |
+
*/
|
781 |
+
|
782 |
+
var $ = jQuery;
|
783 |
+
|
784 |
+
var Modal = function Modal() {
|
785 |
+
var self = this;
|
786 |
+
this.view = null;
|
787 |
+
|
788 |
+
// Error Modal
|
789 |
+
this.error = function (params) {
|
790 |
|
791 |
// Create the modal container
|
792 |
+
var container = $('<div></div>');
|
793 |
|
794 |
// Create section to hold title, message and action
|
795 |
+
var section = $('<section></section>');
|
796 |
+
|
797 |
+
// Create header to hold title
|
798 |
+
var header = $('<h1></h1>');
|
799 |
|
800 |
// Create paragraph to hold mesage
|
801 |
+
var message = $('<p></p>').html(params.message);
|
802 |
|
803 |
// Create action section
|
804 |
+
var action = $('<div></div>');
|
805 |
+
|
806 |
+
// Create title
|
807 |
+
var title = $('<span></span>').addClass('ai1wm-title-red').text('Unable to import');
|
808 |
|
809 |
// Create close button
|
810 |
+
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
811 |
+
self.destroy();
|
|
|
812 |
});
|
813 |
|
814 |
// Append close button
|
815 |
+
action.append(closeButton);
|
816 |
|
817 |
+
// Append title to section
|
818 |
+
header.append(title);
|
819 |
+
|
820 |
+
// Append header and message to section
|
821 |
+
section.append(header).append(message);
|
822 |
|
823 |
// Append section and action to container
|
824 |
+
container.append(section).append(action);
|
825 |
|
826 |
// Render modal
|
827 |
+
self.modal.html(container).show();
|
828 |
+
self.overlay.show();
|
|
|
|
|
829 |
};
|
830 |
|
831 |
+
// Progress Modal
|
832 |
+
this.progress = function (params) {
|
833 |
+
if (this.view === 'progress') {
|
834 |
|
835 |
+
// Update progressBarMeter
|
836 |
+
this.progress.progressBarMeter.width(params.percent + '%');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
837 |
|
838 |
+
// Update progressBarPercent
|
839 |
+
this.progress.progressBarPercent.text(params.percent + '%');
|
840 |
+
} else {
|
841 |
|
842 |
+
// Create the modal container
|
843 |
+
var container = $('<div></div>');
|
844 |
|
845 |
+
// Create section to hold title, message and action
|
846 |
+
var section = $('<section></section>');
|
847 |
|
848 |
+
// Create header to hold progress bar
|
849 |
+
var header = $('<h1></h1>');
|
|
|
|
|
|
|
|
|
|
|
|
|
850 |
|
851 |
+
// Create paragraph to hold mesage
|
852 |
+
var message = $('<p></p>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
853 |
|
854 |
+
// Create action section
|
855 |
+
var action = $('<div></div>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
856 |
|
857 |
+
// Create progressBar
|
858 |
+
var progressBar = $('<span class="ai1wm-progress-bar"></span>');
|
859 |
|
860 |
+
// Create progressBarMeter
|
861 |
+
this.progress.progressBarMeter = $('<span class="ai1wm-progress-bar-meter"></span>').width(params.percent + '%');
|
|
|
862 |
|
863 |
+
// Create progressBarPercent
|
864 |
+
this.progress.progressBarPercent = $('<span class="ai1wm-progress-bar-percent">0%</span>').text(params.percent + '%');
|
|
|
|
|
865 |
|
866 |
+
// Create stop import
|
867 |
+
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').on('click', function () {
|
868 |
+
$(this).attr('disabled', 'disabled');
|
869 |
+
self.onStop();
|
870 |
+
});
|
871 |
|
872 |
+
// Append progress meter and progress percent
|
873 |
+
progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent);
|
874 |
|
875 |
+
// Append stop button
|
876 |
+
action.append(stopButton);
|
877 |
|
878 |
+
// Append progress bar to section
|
879 |
+
header.append(progressBar);
|
|
|
|
|
880 |
|
881 |
+
// Append header to section
|
882 |
+
section.append(header);
|
883 |
|
884 |
+
// Append section and action to container
|
885 |
+
container.append(section).append(action);
|
|
|
886 |
|
887 |
+
// Render modal
|
888 |
+
self.modal.html(container).show();
|
889 |
+
self.overlay.show();
|
890 |
}
|
891 |
};
|
892 |
|
893 |
+
// Confirm Modal
|
894 |
+
this.confirm = function (params) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
895 |
|
896 |
+
// Create the modal container
|
897 |
+
var container = $('<div></div>');
|
898 |
|
899 |
+
// Create section to hold title, message and action
|
900 |
+
var section = $('<section></section>');
|
|
|
|
|
|
|
901 |
|
902 |
+
// Create header to hold warning
|
903 |
+
var header = $('<h1></h1>');
|
|
|
904 |
|
905 |
+
// Create paragraph to hold mesage
|
906 |
+
var message = $('<p></p>').html(params.message);
|
|
|
907 |
|
908 |
+
// Create action section
|
909 |
+
var action = $('<div></div>');
|
|
|
910 |
|
911 |
+
// Create warning
|
912 |
+
var warning = $('<span class="ai1wm-icon-notification"></span>');
|
|
|
913 |
|
914 |
+
// Create confirm button
|
915 |
+
var confirmButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
|
916 |
+
$(this).attr('disabled', 'disabled');
|
917 |
+
self.onConfirm();
|
918 |
+
});
|
919 |
|
920 |
+
// Append confirm button
|
921 |
+
action.append(confirmButton);
|
|
|
922 |
|
923 |
+
// Append warning to section
|
924 |
+
header.append(warning);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
925 |
|
926 |
+
// Append header and message to section
|
927 |
+
section.append(header).append(message);
|
|
|
928 |
|
929 |
+
// Append section and action to container
|
930 |
+
container.append(section).append(action);
|
|
|
|
|
|
|
|
|
|
|
|
|
931 |
|
932 |
+
// Render modal
|
933 |
+
self.modal.html(container).show();
|
934 |
+
self.overlay.show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
935 |
};
|
936 |
|
937 |
+
// Blogs Modal
|
938 |
+
this.blogs = function (params) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
939 |
|
940 |
+
// Create the modal container
|
941 |
+
var container = $('<form></form>');
|
|
|
|
|
|
|
|
|
942 |
|
943 |
+
// Create section to hold title, message and action
|
944 |
+
var section = $('<section></section>');
|
|
|
|
|
|
|
945 |
|
946 |
+
// Create header to hold title
|
947 |
+
var header = $('<h1></h1>');
|
|
|
|
|
948 |
|
949 |
+
// Create paragraph to hold mesage
|
950 |
+
var message = $('<p></p>').html(params.message);
|
|
|
|
|
|
|
|
|
|
|
|
|
951 |
|
952 |
+
// Create action section
|
953 |
+
var action = $('<div></div>');
|
|
|
|
|
|
|
|
|
|
|
|
|
954 |
|
955 |
+
// Create title
|
956 |
+
var title = $('<span></span>').addClass('ai1wm-title-grey').text(params.title);
|
|
|
|
|
|
|
957 |
|
958 |
+
// Create continue button
|
959 |
+
var continueButton = $('<button type="button" class="ai1wm-button-green">Continue</button>').on('click', function () {
|
960 |
+
$(this).attr('disabled', 'disabled');
|
961 |
+
self.onBlogs($(this).closest('form').serializeArray());
|
962 |
+
});
|
963 |
|
964 |
+
// Append continue button
|
965 |
+
action.append(continueButton);
|
|
|
966 |
|
967 |
+
// Append title to section
|
968 |
+
header.append(title);
|
969 |
|
970 |
+
// Append header and message to section
|
971 |
+
section.append(header).append(message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
|
973 |
+
// Append section and action to container
|
974 |
+
container.append(section).append(action);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
975 |
|
976 |
+
// Render modal
|
977 |
+
self.modal.html(container).show();
|
978 |
+
self.overlay.show();
|
979 |
+
};
|
980 |
|
981 |
+
// Info Modal
|
982 |
+
this.info = function (params) {
|
983 |
|
984 |
+
// Create the modal container
|
985 |
+
var container = $('<div></div>');
|
986 |
|
987 |
+
// Create section to hold title, message and action
|
988 |
+
var section = $('<section></section>');
|
|
|
989 |
|
990 |
+
// Create header to hold loader
|
991 |
+
var header = $('<h1></h1>');
|
992 |
|
993 |
+
// Create paragraph to hold mesage
|
994 |
+
var message = $('<p></p>').html(params.message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
995 |
|
996 |
+
// Create action section
|
997 |
+
var action = $('<div></div>');
|
998 |
|
999 |
+
// Create loader
|
1000 |
+
var loader = $('<span class="ai1wm-loader"></span>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1001 |
|
1002 |
+
// Create stop import
|
1003 |
+
var stopButton = $('<button type="button" class="ai1wm-button-red"><i class="ai1wm-icon-notification"></i> Stop import</button>').attr('disabled', 'disabled');
|
1004 |
|
1005 |
+
// Append stop button
|
1006 |
+
action.append(stopButton);
|
1007 |
|
1008 |
+
// Append loader to header
|
1009 |
+
header.append(loader);
|
|
|
1010 |
|
1011 |
+
// Append header and message to section
|
1012 |
+
section.append(header).append(message);
|
1013 |
|
1014 |
+
// Append section and action to container
|
1015 |
+
container.append(section).append(action);
|
|
|
1016 |
|
1017 |
+
// Render modal
|
1018 |
+
self.modal.html(container).show();
|
1019 |
+
self.overlay.show();
|
1020 |
+
};
|
1021 |
|
1022 |
+
// Done Modal
|
1023 |
+
this.done = function (params) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
|
1025 |
+
// Create the modal container
|
1026 |
+
var container = $('<div></div>');
|
|
|
|
|
|
|
|
|
|
|
1027 |
|
1028 |
+
// Create section to hold title, message and action
|
1029 |
+
var section = $('<section></section>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1030 |
|
1031 |
+
// Create header to hold title
|
1032 |
+
var header = $('<h1></h1>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1033 |
|
1034 |
+
// Create paragraph to hold mesage
|
1035 |
+
var message = $('<p></p>').html(params.message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1036 |
|
1037 |
+
// Create action section
|
1038 |
+
var action = $('<div></div>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1039 |
|
1040 |
+
// Create title
|
1041 |
+
var title = $('<span></span>').addClass('ai1wm-title-green').text(params.title);
|
|
|
|
|
1042 |
|
1043 |
+
// Create close button
|
1044 |
+
var closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
1045 |
+
self.destroy();
|
1046 |
+
});
|
1047 |
|
1048 |
+
// Append close button
|
1049 |
+
action.append(closeButton);
|
|
|
|
|
1050 |
|
1051 |
+
// Append title to section
|
1052 |
+
header.append(title);
|
1053 |
|
1054 |
+
// Append header and message to section
|
1055 |
+
section.append(header).append(message);
|
|
|
|
|
1056 |
|
1057 |
+
// Append section and action to container
|
1058 |
+
container.append(section).append(action);
|
|
|
|
|
|
|
|
|
1059 |
|
1060 |
+
// Render modal
|
1061 |
+
self.modal.html(container).show();
|
1062 |
+
self.overlay.show();
|
1063 |
+
};
|
1064 |
|
1065 |
+
// Create the overlay
|
1066 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
|
|
1067 |
|
1068 |
+
// Create the modal container
|
1069 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
1070 |
|
1071 |
+
$('body').append(this.overlay) // Append overlay to body
|
1072 |
+
.append(this.modal); // Append modal to body
|
1073 |
+
};
|
1074 |
|
1075 |
+
Modal.prototype.render = function (params) {
|
|
|
|
|
|
|
1076 |
|
1077 |
+
// Show modal
|
1078 |
+
switch (params.type) {
|
1079 |
+
case 'error':
|
1080 |
+
this.error(params);
|
1081 |
+
break;
|
1082 |
|
1083 |
+
case 'confirm':
|
1084 |
+
this.confirm(params);
|
1085 |
+
break;
|
1086 |
|
1087 |
+
case 'blogs':
|
1088 |
+
this.blogs(params);
|
1089 |
+
break;
|
1090 |
|
1091 |
+
case 'progress':
|
1092 |
+
this.progress(params);
|
1093 |
+
break;
|
1094 |
|
1095 |
+
case 'info':
|
1096 |
+
this.info(params);
|
1097 |
+
break;
|
|
|
|
|
|
|
1098 |
|
1099 |
+
case 'done':
|
1100 |
+
this.done(params);
|
1101 |
+
break;
|
1102 |
}
|
1103 |
|
1104 |
+
this.view = params.type;
|
1105 |
+
};
|
1106 |
+
|
1107 |
+
Modal.prototype.destroy = function () {
|
1108 |
+
this.modal.hide();
|
1109 |
+
this.overlay.hide();
|
1110 |
+
};
|
1111 |
+
|
1112 |
+
module.exports = Modal;
|
1113 |
+
|
1114 |
+
/***/ }),
|
1115 |
+
/* 6 */
|
1116 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1117 |
+
|
1118 |
+
"use strict";
|
1119 |
+
|
1120 |
+
|
1121 |
+
/**
|
1122 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
1123 |
+
*
|
1124 |
+
* This program is free software: you can redistribute it and/or modify
|
1125 |
+
* it under the terms of the GNU General Public License as published by
|
1126 |
+
* the Free Software Foundation, either version 3 of the License, or
|
1127 |
+
* (at your option) any later version.
|
1128 |
+
*
|
1129 |
+
* This program is distributed in the hope that it will be useful,
|
1130 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1131 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1132 |
+
* GNU General Public License for more details.
|
1133 |
+
*
|
1134 |
+
* You should have received a copy of the GNU General Public License
|
1135 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1136 |
+
*
|
1137 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1138 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1139 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1140 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1141 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1142 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1143 |
+
*/
|
1144 |
+
|
1145 |
+
var Util = __webpack_require__(0),
|
1146 |
+
Dialog = __webpack_require__(7);
|
1147 |
+
|
1148 |
+
var Extensions = {
|
1149 |
+
's3': 'Amazon S3 Extension',
|
1150 |
+
'url': 'URL Extension',
|
1151 |
+
'ftp': 'FTP Extension',
|
1152 |
+
'gdrive': 'Google Drive Extension',
|
1153 |
+
'dropbox': 'Dropbox Extension'
|
1154 |
+
};
|
1155 |
+
|
1156 |
+
window.Ai1wmExportController = function (provider) {
|
1157 |
+
this._export = {};
|
1158 |
+
this._provider = provider;
|
1159 |
+
};
|
1160 |
+
|
1161 |
+
window.Ai1wmExportController.prototype.start = function () {
|
1162 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
1163 |
+
};
|
1164 |
+
|
1165 |
+
window.Ai1wmImportController = function (provider) {
|
1166 |
+
this._import = {};
|
1167 |
+
this._provider = provider;
|
1168 |
+
};
|
1169 |
+
|
1170 |
+
window.Ai1wmImportController.prototype.init = function () {};
|
1171 |
+
|
1172 |
+
window.Ai1wmImportController.prototype.download = function () {
|
1173 |
+
new Dialog('<strong>All in One WP Migration</strong> is not compatible with current version of ' + '<strong>' + Extensions[this._provider] + '</strong>. Please contact ' + '<a href="mailto:support@servmask.com">support@servmask.com</a> for more details.');
|
1174 |
+
};
|
1175 |
+
|
1176 |
+
jQuery(document).ready(function ($) {
|
1177 |
+
'use strict';
|
1178 |
|
1179 |
+
// Box extension
|
1180 |
+
|
1181 |
+
$('#ai1wmbe-import-file-cancel').attr('type', 'button');
|
1182 |
+
$('#ai1wmbe-import-file').attr('type', 'button');
|
1183 |
+
|
1184 |
+
// Dropbox extension
|
1185 |
+
$('#ai1wmde-import-file-cancel').attr('type', 'button');
|
1186 |
+
$('#ai1wmde-import-file').attr('type', 'button');
|
1187 |
+
|
1188 |
+
// FTP extension
|
1189 |
+
$('#ai1wmfe-import-file-cancel').attr('type', 'button');
|
1190 |
+
$('#ai1wmfe-import-file').attr('type', 'button');
|
1191 |
+
|
1192 |
+
// Google Drive extension
|
1193 |
+
$('#ai1wmge-import-file-cancel').attr('type', 'button');
|
1194 |
+
$('#ai1wmge-import-file').attr('type', 'button');
|
1195 |
+
|
1196 |
+
// OneDrive extension
|
1197 |
+
$('#ai1wmoe-import-file-cancel').attr('type', 'button');
|
1198 |
+
$('#ai1wmoe-import-file').attr('type', 'button');
|
1199 |
+
|
1200 |
+
// Amazon S3 extension
|
1201 |
+
$('#ai1wmse-import-file-cancel').attr('type', 'button');
|
1202 |
+
$('#ai1wmse-import-file').attr('type', 'button');
|
1203 |
+
|
1204 |
+
// URL extension
|
1205 |
+
$('#ai1wmle-import-file-cancel').attr('type', 'button');
|
1206 |
+
$('#ai1wmle-import-file').attr('type', 'button');
|
1207 |
+
});
|
1208 |
+
|
1209 |
+
/***/ }),
|
1210 |
+
/* 7 */
|
1211 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1212 |
+
|
1213 |
+
"use strict";
|
1214 |
+
|
1215 |
+
|
1216 |
+
/**
|
1217 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
1218 |
+
*
|
1219 |
+
* This program is free software: you can redistribute it and/or modify
|
1220 |
+
* it under the terms of the GNU General Public License as published by
|
1221 |
+
* the Free Software Foundation, either version 3 of the License, or
|
1222 |
+
* (at your option) any later version.
|
1223 |
+
*
|
1224 |
+
* This program is distributed in the hope that it will be useful,
|
1225 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1226 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1227 |
+
* GNU General Public License for more details.
|
1228 |
+
*
|
1229 |
+
* You should have received a copy of the GNU General Public License
|
1230 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1231 |
+
*
|
1232 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1233 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1234 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1235 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1236 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1237 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1238 |
+
*/
|
1239 |
+
|
1240 |
+
var $ = jQuery;
|
1241 |
+
|
1242 |
+
var Dialog = function Dialog(text) {
|
1243 |
+
var self = this;
|
1244 |
+
|
1245 |
+
// Create the overlay
|
1246 |
+
this.overlay = $('<div class="ai1wm-overlay"></div>');
|
1247 |
+
|
1248 |
+
// Create the modal container
|
1249 |
+
this.container = $('<div></div>');
|
1250 |
+
|
1251 |
+
// Create the modal container
|
1252 |
+
this.modal = $('<div class="ai1wm-modal-container"></div>');
|
1253 |
+
|
1254 |
+
// Create section to hold title, message and action
|
1255 |
+
this.section = $('<section></section>');
|
1256 |
+
|
1257 |
+
// Create paragraph to hold mesage
|
1258 |
+
this.message = $('<p></p>').addClass('ai1wm-dialog-message').html(text);
|
1259 |
+
|
1260 |
+
// Create action section
|
1261 |
+
this.action = $('<div></div>');
|
1262 |
+
|
1263 |
+
// Create close button
|
1264 |
+
this.closeButton = $('<button type="button" class="ai1wm-button-red">Close</button>').on('click', function () {
|
1265 |
+
self.modal.hide();
|
1266 |
+
self.overlay.hide();
|
1267 |
+
});
|
1268 |
|
1269 |
+
// Append close button
|
1270 |
+
this.action.append(this.closeButton);
|
|
|
|
|
|
|
|
|
|
|
|
|
1271 |
|
1272 |
+
// Append message to section
|
1273 |
+
this.section.append(this.message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1274 |
|
1275 |
+
// Append section and action to container
|
1276 |
+
this.container.append(this.section).append(this.action);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1277 |
|
1278 |
+
// Render modal
|
1279 |
+
this.modal.html(this.container).show();
|
1280 |
+
this.overlay.show();
|
|
|
1281 |
|
1282 |
+
$('body').append(this.overlay).append(this.modal);
|
1283 |
+
};
|
|
|
|
|
|
|
|
|
1284 |
|
1285 |
+
module.exports = Dialog;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1286 |
|
1287 |
+
/***/ }),
|
1288 |
+
/* 8 */,
|
1289 |
+
/* 9 */,
|
1290 |
+
/* 10 */,
|
1291 |
+
/* 11 */,
|
1292 |
+
/* 12 */,
|
1293 |
+
/* 13 */,
|
1294 |
+
/* 14 */
|
1295 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1296 |
+
|
1297 |
+
"use strict";
|
1298 |
+
|
1299 |
+
|
1300 |
+
/**
|
1301 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
1302 |
+
*
|
1303 |
+
* This program is free software: you can redistribute it and/or modify
|
1304 |
+
* it under the terms of the GNU General Public License as published by
|
1305 |
+
* the Free Software Foundation, either version 3 of the License, or
|
1306 |
+
* (at your option) any later version.
|
1307 |
+
*
|
1308 |
+
* This program is distributed in the hope that it will be useful,
|
1309 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1310 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1311 |
+
* GNU General Public License for more details.
|
1312 |
+
*
|
1313 |
+
* You should have received a copy of the GNU General Public License
|
1314 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1315 |
+
*
|
1316 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1317 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1318 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1319 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1320 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1321 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1322 |
+
*/
|
1323 |
+
|
1324 |
+
var Report = __webpack_require__(1),
|
1325 |
+
Feedback = __webpack_require__(2),
|
1326 |
+
Deprecated = __webpack_require__(6),
|
1327 |
+
FileUploader = __webpack_require__(15);
|
1328 |
+
|
1329 |
+
jQuery(document).ready(function ($) {
|
1330 |
+
'use strict';
|
1331 |
+
|
1332 |
+
var uploader = new FileUploader();
|
1333 |
+
uploader.init();
|
1334 |
+
|
1335 |
+
// Expands/Collapses Import from
|
1336 |
+
$('.ai1wm-expandable > div.ai1wm-button-main').on('click', function () {
|
1337 |
+
$(this).parent().toggleClass('ai1wm-open');
|
1338 |
+
});
|
1339 |
+
});
|
1340 |
+
|
1341 |
+
/***/ }),
|
1342 |
+
/* 15 */
|
1343 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1344 |
+
|
1345 |
+
"use strict";
|
1346 |
+
/* WEBPACK VAR INJECTION */(function(fetch, global) {
|
1347 |
+
|
1348 |
+
/**
|
1349 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
1350 |
+
*
|
1351 |
+
* This program is free software: you can redistribute it and/or modify
|
1352 |
+
* it under the terms of the GNU General Public License as published by
|
1353 |
+
* the Free Software Foundation, either version 3 of the License, or
|
1354 |
+
* (at your option) any later version.
|
1355 |
+
*
|
1356 |
+
* This program is distributed in the hope that it will be useful,
|
1357 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1358 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1359 |
+
* GNU General Public License for more details.
|
1360 |
+
*
|
1361 |
+
* You should have received a copy of the GNU General Public License
|
1362 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1363 |
+
*
|
1364 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
1365 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
1366 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
1367 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
1368 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
1369 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
1370 |
+
*/
|
1371 |
+
|
1372 |
+
var Util = __webpack_require__(0),
|
1373 |
+
Import = __webpack_require__(4),
|
1374 |
+
$ = jQuery;
|
1375 |
+
|
1376 |
+
var FileUploader = function FileUploader() {};
|
1377 |
+
|
1378 |
+
FileUploader.prototype.setDefaultValues = function () {
|
1379 |
+
this.model = new Import();
|
1380 |
+
this.stopUpload = false;
|
1381 |
+
};
|
1382 |
+
|
1383 |
+
FileUploader.prototype.init = function () {
|
1384 |
+
var _this = this;
|
1385 |
+
|
1386 |
+
var selectElement = $('#ai1wm-import-file');
|
1387 |
+
var dropElement = $('#ai1wm-drag-drop-area');
|
1388 |
+
|
1389 |
+
selectElement.on('change', function (event) {
|
1390 |
+
event.preventDefault();
|
1391 |
+
_this.setDefaultValues();
|
1392 |
+
var file = event.target.files.item(0);
|
1393 |
+
_this.setDefaultValues();
|
1394 |
+
_this.fileSize = file.size;
|
1395 |
+
try {
|
1396 |
+
_this.onFilesAdded(file);
|
1397 |
+
_this.onBeforeUpload(file);
|
1398 |
+
_this.upload(file);
|
1399 |
+
} catch (exception) {
|
1400 |
+
_this.onError(exception);
|
1401 |
+
}
|
1402 |
+
});
|
1403 |
|
1404 |
+
dropElement.on('dragenter', function (event) {
|
1405 |
+
event.preventDefault();
|
1406 |
+
dropElement.addClass('ai1wm-drag-over');
|
1407 |
+
});
|
1408 |
+
dropElement.on('dragover', function (event) {
|
1409 |
+
event.preventDefault();
|
1410 |
+
dropElement.addClass('ai1wm-drag-over');
|
1411 |
+
});
|
1412 |
+
dropElement.on('dragleave', function (event) {
|
1413 |
+
event.preventDefault();
|
1414 |
+
dropElement.removeClass('ai1wm-drag-over');
|
1415 |
+
});
|
1416 |
+
dropElement.on('drop', function (event) {
|
1417 |
+
event.preventDefault();
|
1418 |
+
_this.setDefaultValues();
|
1419 |
+
dropElement.removeClass('ai1wm-drag-over');
|
1420 |
+
var file = event.originalEvent.dataTransfer.files.item(0);
|
1421 |
+
_this.fileSize = file.size;
|
1422 |
+
try {
|
1423 |
+
_this.onFilesAdded(file);
|
1424 |
+
_this.onBeforeUpload(file);
|
1425 |
+
_this.upload(file);
|
1426 |
+
} catch (exception) {
|
1427 |
+
_this.onError(exception);
|
1428 |
+
}
|
1429 |
+
});
|
1430 |
+
};
|
1431 |
|
1432 |
+
FileUploader.prototype.upload = function (file, retries) {
|
1433 |
+
var _this2 = this;
|
|
|
|
|
1434 |
|
1435 |
+
var retries = retries || 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1436 |
|
1437 |
+
var chunkSize = file.size > ai1wm_uploader.chunk_size ? ai1wm_uploader.chunk_size : file.size;
|
1438 |
+
var formData = this.getFormData(file, chunkSize);
|
1439 |
|
1440 |
+
fetch(ai1wm_uploader.url, {
|
1441 |
+
method: 'POST',
|
1442 |
+
credentials: 'include',
|
1443 |
+
body: formData
|
1444 |
+
}).then(function (response) {
|
1445 |
+
if (_this2.stopUpload) {
|
1446 |
+
return;
|
1447 |
+
}
|
1448 |
|
1449 |
+
switch (response.status) {
|
1450 |
+
case 413:
|
1451 |
+
ai1wm_uploader.chunk_size = chunkSize / 2;
|
1452 |
+
return _this2.upload(file);
|
1453 |
+
case 200:
|
1454 |
+
return response.text().then(function (text) {
|
1455 |
+
var extractedJsonText = Util.json(text);
|
1456 |
+
if (extractedJsonText) {
|
1457 |
+
var json = JSON.parse(extractedJsonText);
|
1458 |
+
if (json.errors.length === 0) {
|
1459 |
+
file = file.slice(chunkSize, file.size, 'application/octet-binary');
|
1460 |
+
var uploadedBytes = _this2.fileSize - file.size;
|
1461 |
+
var progress = uploadedBytes / _this2.fileSize * 100;
|
1462 |
+
_this2.onUploadProgress(progress.toFixed(2));
|
1463 |
+
return progress === 100 ? _this2.onFileUploaded() : _this2.upload(file);
|
1464 |
+
}
|
1465 |
+
}
|
1466 |
|
1467 |
+
throw new Error(text);
|
1468 |
+
});
|
1469 |
+
default:
|
1470 |
+
throw new Error(response.status);
|
1471 |
+
}
|
1472 |
+
}).catch(function (error) {
|
1473 |
+
var timeout = retries * 1000;
|
1474 |
+
if (retries >= 30) {
|
1475 |
+
return _this2.onError(new Error('We are sorry, there seems to be a problem while uploading your file. Follow <a href="https://www.youtube.com/watch?v=mRp7qTFYKgs" target="_blank">this guide</a> to resolve it.'));
|
1476 |
+
}
|
1477 |
|
1478 |
+
retries++;
|
|
|
1479 |
|
1480 |
+
setTimeout(_this2.upload.bind(_this2, file, retries), timeout);
|
1481 |
+
});
|
1482 |
+
};
|
|
|
|
|
|
|
1483 |
|
1484 |
+
FileUploader.prototype.getFormData = function (file, chunkSize) {
|
1485 |
+
var params = ai1wm_uploader.params;
|
1486 |
+
var formData = new FormData();
|
1487 |
+
formData.append('upload-file', file.slice(0, chunkSize, 'application/octet-binary'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1488 |
|
1489 |
+
for (var name in params) {
|
1490 |
+
formData.append(name, params[name]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1491 |
}
|
1492 |
|
1493 |
+
return formData;
|
1494 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1495 |
|
1496 |
+
FileUploader.prototype.checkSize = function (file) {
|
1497 |
+
var size = parseInt(ai1wm_uploader.filters.ai1wm_archive_size, 10);
|
|
|
1498 |
|
1499 |
+
if (file.size > size && size !== 0) {
|
1500 |
+
throw new Error(ai1wm_import.oversize);
|
1501 |
}
|
1502 |
+
};
|
1503 |
|
1504 |
+
FileUploader.prototype.checkExtension = function (file) {
|
1505 |
+
var extensions = ai1wm_uploader.filters.ai1wm_archive_extension;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1506 |
|
1507 |
+
var matchExtension = extensions.some(function (extension) {
|
1508 |
+
return file.name.substr(-extension.length) === extension;
|
1509 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1510 |
|
1511 |
+
if (!matchExtension) {
|
1512 |
+
throw new Error(ai1wm_import.invalid_extension);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1513 |
}
|
1514 |
+
};
|
1515 |
|
1516 |
+
FileUploader.prototype.onFilesAdded = function (file) {
|
1517 |
+
this.checkExtension(file);
|
1518 |
+
this.checkSize(file);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1519 |
|
1520 |
+
// Initializing beforeunload event
|
1521 |
+
$(window).bind('beforeunload', function () {
|
1522 |
+
return 'You are about to stop importing your website, are you sure?';
|
1523 |
+
});
|
1524 |
+
};
|
1525 |
|
1526 |
+
FileUploader.prototype.onBeforeUpload = function (file) {
|
1527 |
+
var self = this;
|
1528 |
|
1529 |
+
var storage = Util.random(12);
|
1530 |
+
var options = Util.form('#ai1wm-import-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: file.name });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1531 |
|
1532 |
+
// Set global params
|
1533 |
+
this.model.setParams(options);
|
1534 |
|
1535 |
+
// Set multipart params
|
1536 |
+
$.extend(ai1wm_uploader.params, {
|
1537 |
+
storage: storage,
|
1538 |
+
archive: file.name
|
1539 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1540 |
|
1541 |
+
// Set stop
|
1542 |
+
this.model.onStop = function () {
|
1543 |
+
self.stopUpload = true;
|
1544 |
|
1545 |
+
// Clean storage
|
1546 |
+
self.model.clean();
|
1547 |
+
};
|
1548 |
|
1549 |
+
// Set status
|
1550 |
+
this.model.setStatus({ type: 'progress', percent: '0.00' });
|
1551 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1552 |
|
1553 |
+
FileUploader.prototype.onUploadProgress = function (percent) {
|
1554 |
+
this.model.setStatus({ type: 'progress', percent: percent });
|
1555 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1556 |
|
1557 |
+
FileUploader.prototype.onFileUploaded = function () {
|
1558 |
+
this.model.start();
|
1559 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1560 |
|
1561 |
+
FileUploader.prototype.onError = function (error) {
|
1562 |
+
this.model.setStatus({ type: 'error', message: error.message });
|
1563 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1564 |
|
1565 |
+
module.exports = FileUploader;
|
|
|
|
|
|
|
|
|
1566 |
|
1567 |
+
global.Ai1wm = { Util: Util, Import: Import };
|
1568 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(16), __webpack_require__(3)))
|
1569 |
|
1570 |
+
/***/ }),
|
1571 |
/* 16 */
|
1572 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1573 |
+
|
1574 |
+
/* WEBPACK VAR INJECTION */(function(global, Promise) {/*** IMPORTS FROM imports-loader ***/
|
1575 |
+
(function() {
|
1576 |
+
|
1577 |
+
(function(self) {
|
1578 |
+
'use strict';
|
1579 |
+
|
1580 |
+
if (self.fetch) {
|
1581 |
+
return
|
1582 |
+
}
|
1583 |
+
|
1584 |
+
var support = {
|
1585 |
+
searchParams: 'URLSearchParams' in self,
|
1586 |
+
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
1587 |
+
blob: 'FileReader' in self && 'Blob' in self && (function() {
|
1588 |
+
try {
|
1589 |
+
new Blob()
|
1590 |
+
return true
|
1591 |
+
} catch(e) {
|
1592 |
+
return false
|
1593 |
+
}
|
1594 |
+
})(),
|
1595 |
+
formData: 'FormData' in self,
|
1596 |
+
arrayBuffer: 'ArrayBuffer' in self
|
1597 |
+
}
|
1598 |
+
|
1599 |
+
if (support.arrayBuffer) {
|
1600 |
+
var viewClasses = [
|
1601 |
+
'[object Int8Array]',
|
1602 |
+
'[object Uint8Array]',
|
1603 |
+
'[object Uint8ClampedArray]',
|
1604 |
+
'[object Int16Array]',
|
1605 |
+
'[object Uint16Array]',
|
1606 |
+
'[object Int32Array]',
|
1607 |
+
'[object Uint32Array]',
|
1608 |
+
'[object Float32Array]',
|
1609 |
+
'[object Float64Array]'
|
1610 |
+
]
|
1611 |
+
|
1612 |
+
var isDataView = function(obj) {
|
1613 |
+
return obj && DataView.prototype.isPrototypeOf(obj)
|
1614 |
+
}
|
1615 |
+
|
1616 |
+
var isArrayBufferView = ArrayBuffer.isView || function(obj) {
|
1617 |
+
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
|
1618 |
+
}
|
1619 |
+
}
|
1620 |
+
|
1621 |
+
function normalizeName(name) {
|
1622 |
+
if (typeof name !== 'string') {
|
1623 |
+
name = String(name)
|
1624 |
+
}
|
1625 |
+
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
1626 |
+
throw new TypeError('Invalid character in header field name')
|
1627 |
+
}
|
1628 |
+
return name.toLowerCase()
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
function normalizeValue(value) {
|
1632 |
+
if (typeof value !== 'string') {
|
1633 |
+
value = String(value)
|
1634 |
+
}
|
1635 |
+
return value
|
1636 |
+
}
|
1637 |
+
|
1638 |
+
// Build a destructive iterator for the value list
|
1639 |
+
function iteratorFor(items) {
|
1640 |
+
var iterator = {
|
1641 |
+
next: function() {
|
1642 |
+
var value = items.shift()
|
1643 |
+
return {done: value === undefined, value: value}
|
1644 |
+
}
|
1645 |
+
}
|
1646 |
+
|
1647 |
+
if (support.iterable) {
|
1648 |
+
iterator[Symbol.iterator] = function() {
|
1649 |
+
return iterator
|
1650 |
+
}
|
1651 |
+
}
|
1652 |
+
|
1653 |
+
return iterator
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
function Headers(headers) {
|
1657 |
+
this.map = {}
|
1658 |
+
|
1659 |
+
if (headers instanceof Headers) {
|
1660 |
+
headers.forEach(function(value, name) {
|
1661 |
+
this.append(name, value)
|
1662 |
+
}, this)
|
1663 |
+
} else if (Array.isArray(headers)) {
|
1664 |
+
headers.forEach(function(header) {
|
1665 |
+
this.append(header[0], header[1])
|
1666 |
+
}, this)
|
1667 |
+
} else if (headers) {
|
1668 |
+
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
1669 |
+
this.append(name, headers[name])
|
1670 |
+
}, this)
|
1671 |
+
}
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
Headers.prototype.append = function(name, value) {
|
1675 |
+
name = normalizeName(name)
|
1676 |
+
value = normalizeValue(value)
|
1677 |
+
var oldValue = this.map[name]
|
1678 |
+
this.map[name] = oldValue ? oldValue+','+value : value
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
Headers.prototype['delete'] = function(name) {
|
1682 |
+
delete this.map[normalizeName(name)]
|
1683 |
+
}
|
1684 |
+
|
1685 |
+
Headers.prototype.get = function(name) {
|
1686 |
+
name = normalizeName(name)
|
1687 |
+
return this.has(name) ? this.map[name] : null
|
1688 |
+
}
|
1689 |
+
|
1690 |
+
Headers.prototype.has = function(name) {
|
1691 |
+
return this.map.hasOwnProperty(normalizeName(name))
|
1692 |
+
}
|
1693 |
+
|
1694 |
+
Headers.prototype.set = function(name, value) {
|
1695 |
+
this.map[normalizeName(name)] = normalizeValue(value)
|
1696 |
+
}
|
1697 |
+
|
1698 |
+
Headers.prototype.forEach = function(callback, thisArg) {
|
1699 |
+
for (var name in this.map) {
|
1700 |
+
if (this.map.hasOwnProperty(name)) {
|
1701 |
+
callback.call(thisArg, this.map[name], name, this)
|
1702 |
+
}
|
1703 |
+
}
|
1704 |
+
}
|
1705 |
+
|
1706 |
+
Headers.prototype.keys = function() {
|
1707 |
+
var items = []
|
1708 |
+
this.forEach(function(value, name) { items.push(name) })
|
1709 |
+
return iteratorFor(items)
|
1710 |
+
}
|
1711 |
+
|
1712 |
+
Headers.prototype.values = function() {
|
1713 |
+
var items = []
|
1714 |
+
this.forEach(function(value) { items.push(value) })
|
1715 |
+
return iteratorFor(items)
|
1716 |
+
}
|
1717 |
+
|
1718 |
+
Headers.prototype.entries = function() {
|
1719 |
+
var items = []
|
1720 |
+
this.forEach(function(value, name) { items.push([name, value]) })
|
1721 |
+
return iteratorFor(items)
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
if (support.iterable) {
|
1725 |
+
Headers.prototype[Symbol.iterator] = Headers.prototype.entries
|
1726 |
+
}
|
1727 |
+
|
1728 |
+
function consumed(body) {
|
1729 |
+
if (body.bodyUsed) {
|
1730 |
+
return Promise.reject(new TypeError('Already read'))
|
1731 |
+
}
|
1732 |
+
body.bodyUsed = true
|
1733 |
+
}
|
1734 |
+
|
1735 |
+
function fileReaderReady(reader) {
|
1736 |
+
return new Promise(function(resolve, reject) {
|
1737 |
+
reader.onload = function() {
|
1738 |
+
resolve(reader.result)
|
1739 |
+
}
|
1740 |
+
reader.onerror = function() {
|
1741 |
+
reject(reader.error)
|
1742 |
+
}
|
1743 |
+
})
|
1744 |
+
}
|
1745 |
+
|
1746 |
+
function readBlobAsArrayBuffer(blob) {
|
1747 |
+
var reader = new FileReader()
|
1748 |
+
var promise = fileReaderReady(reader)
|
1749 |
+
reader.readAsArrayBuffer(blob)
|
1750 |
+
return promise
|
1751 |
+
}
|
1752 |
+
|
1753 |
+
function readBlobAsText(blob) {
|
1754 |
+
var reader = new FileReader()
|
1755 |
+
var promise = fileReaderReady(reader)
|
1756 |
+
reader.readAsText(blob)
|
1757 |
+
return promise
|
1758 |
+
}
|
1759 |
+
|
1760 |
+
function readArrayBufferAsText(buf) {
|
1761 |
+
var view = new Uint8Array(buf)
|
1762 |
+
var chars = new Array(view.length)
|
1763 |
+
|
1764 |
+
for (var i = 0; i < view.length; i++) {
|
1765 |
+
chars[i] = String.fromCharCode(view[i])
|
1766 |
+
}
|
1767 |
+
return chars.join('')
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
function bufferClone(buf) {
|
1771 |
+
if (buf.slice) {
|
1772 |
+
return buf.slice(0)
|
1773 |
+
} else {
|
1774 |
+
var view = new Uint8Array(buf.byteLength)
|
1775 |
+
view.set(new Uint8Array(buf))
|
1776 |
+
return view.buffer
|
1777 |
+
}
|
1778 |
+
}
|
1779 |
+
|
1780 |
+
function Body() {
|
1781 |
+
this.bodyUsed = false
|
1782 |
+
|
1783 |
+
this._initBody = function(body) {
|
1784 |
+
this._bodyInit = body
|
1785 |
+
if (!body) {
|
1786 |
+
this._bodyText = ''
|
1787 |
+
} else if (typeof body === 'string') {
|
1788 |
+
this._bodyText = body
|
1789 |
+
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
1790 |
+
this._bodyBlob = body
|
1791 |
+
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
1792 |
+
this._bodyFormData = body
|
1793 |
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
1794 |
+
this._bodyText = body.toString()
|
1795 |
+
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
1796 |
+
this._bodyArrayBuffer = bufferClone(body.buffer)
|
1797 |
+
// IE 10-11 can't handle a DataView body.
|
1798 |
+
this._bodyInit = new Blob([this._bodyArrayBuffer])
|
1799 |
+
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
1800 |
+
this._bodyArrayBuffer = bufferClone(body)
|
1801 |
+
} else {
|
1802 |
+
throw new Error('unsupported BodyInit type')
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
if (!this.headers.get('content-type')) {
|
1806 |
+
if (typeof body === 'string') {
|
1807 |
+
this.headers.set('content-type', 'text/plain;charset=UTF-8')
|
1808 |
+
} else if (this._bodyBlob && this._bodyBlob.type) {
|
1809 |
+
this.headers.set('content-type', this._bodyBlob.type)
|
1810 |
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
1811 |
+
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
|
1812 |
+
}
|
1813 |
+
}
|
1814 |
+
}
|
1815 |
+
|
1816 |
+
if (support.blob) {
|
1817 |
+
this.blob = function() {
|
1818 |
+
var rejected = consumed(this)
|
1819 |
+
if (rejected) {
|
1820 |
+
return rejected
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
if (this._bodyBlob) {
|
1824 |
+
return Promise.resolve(this._bodyBlob)
|
1825 |
+
} else if (this._bodyArrayBuffer) {
|
1826 |
+
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
|
1827 |
+
} else if (this._bodyFormData) {
|
1828 |
+
throw new Error('could not read FormData body as blob')
|
1829 |
+
} else {
|
1830 |
+
return Promise.resolve(new Blob([this._bodyText]))
|
1831 |
+
}
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
this.arrayBuffer = function() {
|
1835 |
+
if (this._bodyArrayBuffer) {
|
1836 |
+
return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
|
1837 |
+
} else {
|
1838 |
+
return this.blob().then(readBlobAsArrayBuffer)
|
1839 |
+
}
|
1840 |
+
}
|
1841 |
+
}
|
1842 |
+
|
1843 |
+
this.text = function() {
|
1844 |
+
var rejected = consumed(this)
|
1845 |
+
if (rejected) {
|
1846 |
+
return rejected
|
1847 |
+
}
|
1848 |
+
|
1849 |
+
if (this._bodyBlob) {
|
1850 |
+
return readBlobAsText(this._bodyBlob)
|
1851 |
+
} else if (this._bodyArrayBuffer) {
|
1852 |
+
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
|
1853 |
+
} else if (this._bodyFormData) {
|
1854 |
+
throw new Error('could not read FormData body as text')
|
1855 |
+
} else {
|
1856 |
+
return Promise.resolve(this._bodyText)
|
1857 |
+
}
|
1858 |
+
}
|
1859 |
+
|
1860 |
+
if (support.formData) {
|
1861 |
+
this.formData = function() {
|
1862 |
+
return this.text().then(decode)
|
1863 |
+
}
|
1864 |
+
}
|
1865 |
+
|
1866 |
+
this.json = function() {
|
1867 |
+
return this.text().then(JSON.parse)
|
1868 |
+
}
|
1869 |
+
|
1870 |
+
return this
|
1871 |
+
}
|
1872 |
+
|
1873 |
+
// HTTP methods whose capitalization should be normalized
|
1874 |
+
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
|
1875 |
+
|
1876 |
+
function normalizeMethod(method) {
|
1877 |
+
var upcased = method.toUpperCase()
|
1878 |
+
return (methods.indexOf(upcased) > -1) ? upcased : method
|
1879 |
+
}
|
1880 |
+
|
1881 |
+
function Request(input, options) {
|
1882 |
+
options = options || {}
|
1883 |
+
var body = options.body
|
1884 |
+
|
1885 |
+
if (input instanceof Request) {
|
1886 |
+
if (input.bodyUsed) {
|
1887 |
+
throw new TypeError('Already read')
|
1888 |
+
}
|
1889 |
+
this.url = input.url
|
1890 |
+
this.credentials = input.credentials
|
1891 |
+
if (!options.headers) {
|
1892 |
+
this.headers = new Headers(input.headers)
|
1893 |
+
}
|
1894 |
+
this.method = input.method
|
1895 |
+
this.mode = input.mode
|
1896 |
+
if (!body && input._bodyInit != null) {
|
1897 |
+
body = input._bodyInit
|
1898 |
+
input.bodyUsed = true
|
1899 |
+
}
|
1900 |
+
} else {
|
1901 |
+
this.url = String(input)
|
1902 |
+
}
|
1903 |
+
|
1904 |
+
this.credentials = options.credentials || this.credentials || 'omit'
|
1905 |
+
if (options.headers || !this.headers) {
|
1906 |
+
this.headers = new Headers(options.headers)
|
1907 |
+
}
|
1908 |
+
this.method = normalizeMethod(options.method || this.method || 'GET')
|
1909 |
+
this.mode = options.mode || this.mode || null
|
1910 |
+
this.referrer = null
|
1911 |
+
|
1912 |
+
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
1913 |
+
throw new TypeError('Body not allowed for GET or HEAD requests')
|
1914 |
+
}
|
1915 |
+
this._initBody(body)
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
Request.prototype.clone = function() {
|
1919 |
+
return new Request(this, { body: this._bodyInit })
|
1920 |
+
}
|
1921 |
+
|
1922 |
+
function decode(body) {
|
1923 |
+
var form = new FormData()
|
1924 |
+
body.trim().split('&').forEach(function(bytes) {
|
1925 |
+
if (bytes) {
|
1926 |
+
var split = bytes.split('=')
|
1927 |
+
var name = split.shift().replace(/\+/g, ' ')
|
1928 |
+
var value = split.join('=').replace(/\+/g, ' ')
|
1929 |
+
form.append(decodeURIComponent(name), decodeURIComponent(value))
|
1930 |
+
}
|
1931 |
+
})
|
1932 |
+
return form
|
1933 |
+
}
|
1934 |
+
|
1935 |
+
function parseHeaders(rawHeaders) {
|
1936 |
+
var headers = new Headers()
|
1937 |
+
rawHeaders.split(/\r?\n/).forEach(function(line) {
|
1938 |
+
var parts = line.split(':')
|
1939 |
+
var key = parts.shift().trim()
|
1940 |
+
if (key) {
|
1941 |
+
var value = parts.join(':').trim()
|
1942 |
+
headers.append(key, value)
|
1943 |
+
}
|
1944 |
+
})
|
1945 |
+
return headers
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
Body.call(Request.prototype)
|
1949 |
+
|
1950 |
+
function Response(bodyInit, options) {
|
1951 |
+
if (!options) {
|
1952 |
+
options = {}
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
this.type = 'default'
|
1956 |
+
this.status = 'status' in options ? options.status : 200
|
1957 |
+
this.ok = this.status >= 200 && this.status < 300
|
1958 |
+
this.statusText = 'statusText' in options ? options.statusText : 'OK'
|
1959 |
+
this.headers = new Headers(options.headers)
|
1960 |
+
this.url = options.url || ''
|
1961 |
+
this._initBody(bodyInit)
|
1962 |
+
}
|
1963 |
+
|
1964 |
+
Body.call(Response.prototype)
|
1965 |
+
|
1966 |
+
Response.prototype.clone = function() {
|
1967 |
+
return new Response(this._bodyInit, {
|
1968 |
+
status: this.status,
|
1969 |
+
statusText: this.statusText,
|
1970 |
+
headers: new Headers(this.headers),
|
1971 |
+
url: this.url
|
1972 |
+
})
|
1973 |
+
}
|
1974 |
+
|
1975 |
+
Response.error = function() {
|
1976 |
+
var response = new Response(null, {status: 0, statusText: ''})
|
1977 |
+
response.type = 'error'
|
1978 |
+
return response
|
1979 |
+
}
|
1980 |
+
|
1981 |
+
var redirectStatuses = [301, 302, 303, 307, 308]
|
1982 |
+
|
1983 |
+
Response.redirect = function(url, status) {
|
1984 |
+
if (redirectStatuses.indexOf(status) === -1) {
|
1985 |
+
throw new RangeError('Invalid status code')
|
1986 |
+
}
|
1987 |
+
|
1988 |
+
return new Response(null, {status: status, headers: {location: url}})
|
1989 |
+
}
|
1990 |
+
|
1991 |
+
self.Headers = Headers
|
1992 |
+
self.Request = Request
|
1993 |
+
self.Response = Response
|
1994 |
+
|
1995 |
+
self.fetch = function(input, init) {
|
1996 |
+
return new Promise(function(resolve, reject) {
|
1997 |
+
var request = new Request(input, init)
|
1998 |
+
var xhr = new XMLHttpRequest()
|
1999 |
+
|
2000 |
+
xhr.onload = function() {
|
2001 |
+
var options = {
|
2002 |
+
status: xhr.status,
|
2003 |
+
statusText: xhr.statusText,
|
2004 |
+
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
2005 |
+
}
|
2006 |
+
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
|
2007 |
+
var body = 'response' in xhr ? xhr.response : xhr.responseText
|
2008 |
+
resolve(new Response(body, options))
|
2009 |
+
}
|
2010 |
+
|
2011 |
+
xhr.onerror = function() {
|
2012 |
+
reject(new TypeError('Network request failed'))
|
2013 |
+
}
|
2014 |
+
|
2015 |
+
xhr.ontimeout = function() {
|
2016 |
+
reject(new TypeError('Network request failed'))
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
xhr.open(request.method, request.url, true)
|
2020 |
+
|
2021 |
+
if (request.credentials === 'include') {
|
2022 |
+
xhr.withCredentials = true
|
2023 |
+
}
|
2024 |
+
|
2025 |
+
if ('responseType' in xhr && support.blob) {
|
2026 |
+
xhr.responseType = 'blob'
|
2027 |
+
}
|
2028 |
+
|
2029 |
+
request.headers.forEach(function(value, name) {
|
2030 |
+
xhr.setRequestHeader(name, value)
|
2031 |
+
})
|
2032 |
+
|
2033 |
+
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
|
2034 |
+
})
|
2035 |
+
}
|
2036 |
+
self.fetch.polyfill = true
|
2037 |
+
})(typeof self !== 'undefined' ? self : this);
|
2038 |
+
|
2039 |
+
|
2040 |
+
/*** EXPORTS FROM exports-loader ***/
|
2041 |
+
module.exports = global.fetch;
|
2042 |
+
}.call(global));
|
2043 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(17)))
|
2044 |
+
|
2045 |
+
/***/ }),
|
2046 |
+
/* 17 */
|
2047 |
+
/***/ (function(module, exports, __webpack_require__) {
|
2048 |
+
|
2049 |
+
/* WEBPACK VAR INJECTION */(function(global, process) {var require;/*** IMPORTS FROM imports-loader ***/
|
2050 |
+
(function() {
|
2051 |
+
|
2052 |
+
/*!
|
2053 |
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
2054 |
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
2055 |
+
* @license Licensed under MIT license
|
2056 |
+
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
2057 |
+
* @version 4.1.1
|
2058 |
+
*/
|
2059 |
+
|
2060 |
+
(function (global, factory) {
|
2061 |
+
true ? module.exports = factory() :
|
2062 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
2063 |
+
(global.ES6Promise = factory());
|
2064 |
+
}(this, (function () { 'use strict';
|
2065 |
+
|
2066 |
+
function objectOrFunction(x) {
|
2067 |
+
var type = typeof x;
|
2068 |
+
return x !== null && (type === 'object' || type === 'function');
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
function isFunction(x) {
|
2072 |
+
return typeof x === 'function';
|
2073 |
+
}
|
2074 |
+
|
2075 |
+
var _isArray = undefined;
|
2076 |
+
if (Array.isArray) {
|
2077 |
+
_isArray = Array.isArray;
|
2078 |
+
} else {
|
2079 |
+
_isArray = function (x) {
|
2080 |
+
return Object.prototype.toString.call(x) === '[object Array]';
|
2081 |
+
};
|
2082 |
+
}
|
2083 |
+
|
2084 |
+
var isArray = _isArray;
|
2085 |
+
|
2086 |
+
var len = 0;
|
2087 |
+
var vertxNext = undefined;
|
2088 |
+
var customSchedulerFn = undefined;
|
2089 |
+
|
2090 |
+
var asap = function asap(callback, arg) {
|
2091 |
+
queue[len] = callback;
|
2092 |
+
queue[len + 1] = arg;
|
2093 |
+
len += 2;
|
2094 |
+
if (len === 2) {
|
2095 |
+
// If len is 2, that means that we need to schedule an async flush.
|
2096 |
+
// If additional callbacks are queued before the queue is flushed, they
|
2097 |
+
// will be processed by this flush that we are scheduling.
|
2098 |
+
if (customSchedulerFn) {
|
2099 |
+
customSchedulerFn(flush);
|
2100 |
+
} else {
|
2101 |
+
scheduleFlush();
|
2102 |
+
}
|
2103 |
+
}
|
2104 |
+
};
|
2105 |
+
|
2106 |
+
function setScheduler(scheduleFn) {
|
2107 |
+
customSchedulerFn = scheduleFn;
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
function setAsap(asapFn) {
|
2111 |
+
asap = asapFn;
|
2112 |
+
}
|
2113 |
+
|
2114 |
+
var browserWindow = typeof window !== 'undefined' ? window : undefined;
|
2115 |
+
var browserGlobal = browserWindow || {};
|
2116 |
+
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
|
2117 |
+
var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
|
2118 |
+
|
2119 |
+
// test for web worker but not in IE10
|
2120 |
+
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
|
2121 |
+
|
2122 |
+
// node
|
2123 |
+
function useNextTick() {
|
2124 |
+
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
|
2125 |
+
// see https://github.com/cujojs/when/issues/410 for details
|
2126 |
+
return function () {
|
2127 |
+
return process.nextTick(flush);
|
2128 |
+
};
|
2129 |
+
}
|
2130 |
+
|
2131 |
+
// vertx
|
2132 |
+
function useVertxTimer() {
|
2133 |
+
if (typeof vertxNext !== 'undefined') {
|
2134 |
+
return function () {
|
2135 |
+
vertxNext(flush);
|
2136 |
+
};
|
2137 |
+
}
|
2138 |
+
|
2139 |
+
return useSetTimeout();
|
2140 |
+
}
|
2141 |
+
|
2142 |
+
function useMutationObserver() {
|
2143 |
+
var iterations = 0;
|
2144 |
+
var observer = new BrowserMutationObserver(flush);
|
2145 |
+
var node = document.createTextNode('');
|
2146 |
+
observer.observe(node, { characterData: true });
|
2147 |
+
|
2148 |
+
return function () {
|
2149 |
+
node.data = iterations = ++iterations % 2;
|
2150 |
+
};
|
2151 |
+
}
|
2152 |
+
|
2153 |
+
// web worker
|
2154 |
+
function useMessageChannel() {
|
2155 |
+
var channel = new MessageChannel();
|
2156 |
+
channel.port1.onmessage = flush;
|
2157 |
+
return function () {
|
2158 |
+
return channel.port2.postMessage(0);
|
2159 |
+
};
|
2160 |
+
}
|
2161 |
+
|
2162 |
+
function useSetTimeout() {
|
2163 |
+
// Store setTimeout reference so es6-promise will be unaffected by
|
2164 |
+
// other code modifying setTimeout (like sinon.useFakeTimers())
|
2165 |
+
var globalSetTimeout = setTimeout;
|
2166 |
+
return function () {
|
2167 |
+
return globalSetTimeout(flush, 1);
|
2168 |
+
};
|
2169 |
+
}
|
2170 |
+
|
2171 |
+
var queue = new Array(1000);
|
2172 |
+
function flush() {
|
2173 |
+
for (var i = 0; i < len; i += 2) {
|
2174 |
+
var callback = queue[i];
|
2175 |
+
var arg = queue[i + 1];
|
2176 |
+
|
2177 |
+
callback(arg);
|
2178 |
+
|
2179 |
+
queue[i] = undefined;
|
2180 |
+
queue[i + 1] = undefined;
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
len = 0;
|
2184 |
+
}
|
2185 |
+
|
2186 |
+
function attemptVertx() {
|
2187 |
+
try {
|
2188 |
+
var r = require;
|
2189 |
+
var vertx = __webpack_require__(19);
|
2190 |
+
vertxNext = vertx.runOnLoop || vertx.runOnContext;
|
2191 |
+
return useVertxTimer();
|
2192 |
+
} catch (e) {
|
2193 |
+
return useSetTimeout();
|
2194 |
+
}
|
2195 |
+
}
|
2196 |
+
|
2197 |
+
var scheduleFlush = undefined;
|
2198 |
+
// Decide what async method to use to triggering processing of queued callbacks:
|
2199 |
+
if (isNode) {
|
2200 |
+
scheduleFlush = useNextTick();
|
2201 |
+
} else if (BrowserMutationObserver) {
|
2202 |
+
scheduleFlush = useMutationObserver();
|
2203 |
+
} else if (isWorker) {
|
2204 |
+
scheduleFlush = useMessageChannel();
|
2205 |
+
} else if (browserWindow === undefined && "function" === 'function') {
|
2206 |
+
scheduleFlush = attemptVertx();
|
2207 |
+
} else {
|
2208 |
+
scheduleFlush = useSetTimeout();
|
2209 |
+
}
|
2210 |
+
|
2211 |
+
function then(onFulfillment, onRejection) {
|
2212 |
+
var _arguments = arguments;
|
2213 |
+
|
2214 |
+
var parent = this;
|
2215 |
+
|
2216 |
+
var child = new this.constructor(noop);
|
2217 |
+
|
2218 |
+
if (child[PROMISE_ID] === undefined) {
|
2219 |
+
makePromise(child);
|
2220 |
+
}
|
2221 |
+
|
2222 |
+
var _state = parent._state;
|
2223 |
+
|
2224 |
+
if (_state) {
|
2225 |
+
(function () {
|
2226 |
+
var callback = _arguments[_state - 1];
|
2227 |
+
asap(function () {
|
2228 |
+
return invokeCallback(_state, child, callback, parent._result);
|
2229 |
+
});
|
2230 |
+
})();
|
2231 |
+
} else {
|
2232 |
+
subscribe(parent, child, onFulfillment, onRejection);
|
2233 |
+
}
|
2234 |
+
|
2235 |
+
return child;
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
/**
|
2239 |
+
`Promise.resolve` returns a promise that will become resolved with the
|
2240 |
+
passed `value`. It is shorthand for the following:
|
2241 |
+
|
2242 |
+
```javascript
|
2243 |
+
let promise = new Promise(function(resolve, reject){
|
2244 |
+
resolve(1);
|
2245 |
+
});
|
2246 |
+
|
2247 |
+
promise.then(function(value){
|
2248 |
+
// value === 1
|
2249 |
+
});
|
2250 |
+
```
|
2251 |
+
|
2252 |
+
Instead of writing the above, your code now simply becomes the following:
|
2253 |
+
|
2254 |
+
```javascript
|
2255 |
+
let promise = Promise.resolve(1);
|
2256 |
+
|
2257 |
+
promise.then(function(value){
|
2258 |
+
// value === 1
|
2259 |
+
});
|
2260 |
+
```
|
2261 |
+
|
2262 |
+
@method resolve
|
2263 |
+
@static
|
2264 |
+
@param {Any} value value that the returned promise will be resolved with
|
2265 |
+
Useful for tooling.
|
2266 |
+
@return {Promise} a promise that will become fulfilled with the given
|
2267 |
+
`value`
|
2268 |
+
*/
|
2269 |
+
function resolve$1(object) {
|
2270 |
+
/*jshint validthis:true */
|
2271 |
+
var Constructor = this;
|
2272 |
+
|
2273 |
+
if (object && typeof object === 'object' && object.constructor === Constructor) {
|
2274 |
+
return object;
|
2275 |
+
}
|
2276 |
+
|
2277 |
+
var promise = new Constructor(noop);
|
2278 |
+
resolve(promise, object);
|
2279 |
+
return promise;
|
2280 |
+
}
|
2281 |
+
|
2282 |
+
var PROMISE_ID = Math.random().toString(36).substring(16);
|
2283 |
+
|
2284 |
+
function noop() {}
|
2285 |
+
|
2286 |
+
var PENDING = void 0;
|
2287 |
+
var FULFILLED = 1;
|
2288 |
+
var REJECTED = 2;
|
2289 |
+
|
2290 |
+
var GET_THEN_ERROR = new ErrorObject();
|
2291 |
+
|
2292 |
+
function selfFulfillment() {
|
2293 |
+
return new TypeError("You cannot resolve a promise with itself");
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
function cannotReturnOwn() {
|
2297 |
+
return new TypeError('A promises callback cannot return that same promise.');
|
2298 |
+
}
|
2299 |
+
|
2300 |
+
function getThen(promise) {
|
2301 |
+
try {
|
2302 |
+
return promise.then;
|
2303 |
+
} catch (error) {
|
2304 |
+
GET_THEN_ERROR.error = error;
|
2305 |
+
return GET_THEN_ERROR;
|
2306 |
+
}
|
2307 |
+
}
|
2308 |
+
|
2309 |
+
function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
|
2310 |
+
try {
|
2311 |
+
then$$1.call(value, fulfillmentHandler, rejectionHandler);
|
2312 |
+
} catch (e) {
|
2313 |
+
return e;
|
2314 |
+
}
|
2315 |
+
}
|
2316 |
+
|
2317 |
+
function handleForeignThenable(promise, thenable, then$$1) {
|
2318 |
+
asap(function (promise) {
|
2319 |
+
var sealed = false;
|
2320 |
+
var error = tryThen(then$$1, thenable, function (value) {
|
2321 |
+
if (sealed) {
|
2322 |
+
return;
|
2323 |
+
}
|
2324 |
+
sealed = true;
|
2325 |
+
if (thenable !== value) {
|
2326 |
+
resolve(promise, value);
|
2327 |
+
} else {
|
2328 |
+
fulfill(promise, value);
|
2329 |
+
}
|
2330 |
+
}, function (reason) {
|
2331 |
+
if (sealed) {
|
2332 |
+
return;
|
2333 |
+
}
|
2334 |
+
sealed = true;
|
2335 |
+
|
2336 |
+
reject(promise, reason);
|
2337 |
+
}, 'Settle: ' + (promise._label || ' unknown promise'));
|
2338 |
+
|
2339 |
+
if (!sealed && error) {
|
2340 |
+
sealed = true;
|
2341 |
+
reject(promise, error);
|
2342 |
+
}
|
2343 |
+
}, promise);
|
2344 |
+
}
|
2345 |
+
|
2346 |
+
function handleOwnThenable(promise, thenable) {
|
2347 |
+
if (thenable._state === FULFILLED) {
|
2348 |
+
fulfill(promise, thenable._result);
|
2349 |
+
} else if (thenable._state === REJECTED) {
|
2350 |
+
reject(promise, thenable._result);
|
2351 |
+
} else {
|
2352 |
+
subscribe(thenable, undefined, function (value) {
|
2353 |
+
return resolve(promise, value);
|
2354 |
+
}, function (reason) {
|
2355 |
+
return reject(promise, reason);
|
2356 |
+
});
|
2357 |
+
}
|
2358 |
+
}
|
2359 |
+
|
2360 |
+
function handleMaybeThenable(promise, maybeThenable, then$$1) {
|
2361 |
+
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
|
2362 |
+
handleOwnThenable(promise, maybeThenable);
|
2363 |
+
} else {
|
2364 |
+
if (then$$1 === GET_THEN_ERROR) {
|
2365 |
+
reject(promise, GET_THEN_ERROR.error);
|
2366 |
+
GET_THEN_ERROR.error = null;
|
2367 |
+
} else if (then$$1 === undefined) {
|
2368 |
+
fulfill(promise, maybeThenable);
|
2369 |
+
} else if (isFunction(then$$1)) {
|
2370 |
+
handleForeignThenable(promise, maybeThenable, then$$1);
|
2371 |
+
} else {
|
2372 |
+
fulfill(promise, maybeThenable);
|
2373 |
+
}
|
2374 |
+
}
|
2375 |
+
}
|
2376 |
+
|
2377 |
+
function resolve(promise, value) {
|
2378 |
+
if (promise === value) {
|
2379 |
+
reject(promise, selfFulfillment());
|
2380 |
+
} else if (objectOrFunction(value)) {
|
2381 |
+
handleMaybeThenable(promise, value, getThen(value));
|
2382 |
+
} else {
|
2383 |
+
fulfill(promise, value);
|
2384 |
+
}
|
2385 |
+
}
|
2386 |
+
|
2387 |
+
function publishRejection(promise) {
|
2388 |
+
if (promise._onerror) {
|
2389 |
+
promise._onerror(promise._result);
|
2390 |
+
}
|
2391 |
+
|
2392 |
+
publish(promise);
|
2393 |
+
}
|
2394 |
+
|
2395 |
+
function fulfill(promise, value) {
|
2396 |
+
if (promise._state !== PENDING) {
|
2397 |
+
return;
|
2398 |
+
}
|
2399 |
+
|
2400 |
+
promise._result = value;
|
2401 |
+
promise._state = FULFILLED;
|
2402 |
+
|
2403 |
+
if (promise._subscribers.length !== 0) {
|
2404 |
+
asap(publish, promise);
|
2405 |
+
}
|
2406 |
+
}
|
2407 |
+
|
2408 |
+
function reject(promise, reason) {
|
2409 |
+
if (promise._state !== PENDING) {
|
2410 |
+
return;
|
2411 |
+
}
|
2412 |
+
promise._state = REJECTED;
|
2413 |
+
promise._result = reason;
|
2414 |
+
|
2415 |
+
asap(publishRejection, promise);
|
2416 |
+
}
|
2417 |
+
|
2418 |
+
function subscribe(parent, child, onFulfillment, onRejection) {
|
2419 |
+
var _subscribers = parent._subscribers;
|
2420 |
+
var length = _subscribers.length;
|
2421 |
+
|
2422 |
+
parent._onerror = null;
|
2423 |
+
|
2424 |
+
_subscribers[length] = child;
|
2425 |
+
_subscribers[length + FULFILLED] = onFulfillment;
|
2426 |
+
_subscribers[length + REJECTED] = onRejection;
|
2427 |
+
|
2428 |
+
if (length === 0 && parent._state) {
|
2429 |
+
asap(publish, parent);
|
2430 |
+
}
|
2431 |
+
}
|
2432 |
+
|
2433 |
+
function publish(promise) {
|
2434 |
+
var subscribers = promise._subscribers;
|
2435 |
+
var settled = promise._state;
|
2436 |
+
|
2437 |
+
if (subscribers.length === 0) {
|
2438 |
+
return;
|
2439 |
+
}
|
2440 |
+
|
2441 |
+
var child = undefined,
|
2442 |
+
callback = undefined,
|
2443 |
+
detail = promise._result;
|
2444 |
+
|
2445 |
+
for (var i = 0; i < subscribers.length; i += 3) {
|
2446 |
+
child = subscribers[i];
|
2447 |
+
callback = subscribers[i + settled];
|
2448 |
+
|
2449 |
+
if (child) {
|
2450 |
+
invokeCallback(settled, child, callback, detail);
|
2451 |
+
} else {
|
2452 |
+
callback(detail);
|
2453 |
+
}
|
2454 |
+
}
|
2455 |
+
|
2456 |
+
promise._subscribers.length = 0;
|
2457 |
+
}
|
2458 |
+
|
2459 |
+
function ErrorObject() {
|
2460 |
+
this.error = null;
|
2461 |
+
}
|
2462 |
+
|
2463 |
+
var TRY_CATCH_ERROR = new ErrorObject();
|
2464 |
+
|
2465 |
+
function tryCatch(callback, detail) {
|
2466 |
+
try {
|
2467 |
+
return callback(detail);
|
2468 |
+
} catch (e) {
|
2469 |
+
TRY_CATCH_ERROR.error = e;
|
2470 |
+
return TRY_CATCH_ERROR;
|
2471 |
+
}
|
2472 |
+
}
|
2473 |
+
|
2474 |
+
function invokeCallback(settled, promise, callback, detail) {
|
2475 |
+
var hasCallback = isFunction(callback),
|
2476 |
+
value = undefined,
|
2477 |
+
error = undefined,
|
2478 |
+
succeeded = undefined,
|
2479 |
+
failed = undefined;
|
2480 |
+
|
2481 |
+
if (hasCallback) {
|
2482 |
+
value = tryCatch(callback, detail);
|
2483 |
+
|
2484 |
+
if (value === TRY_CATCH_ERROR) {
|
2485 |
+
failed = true;
|
2486 |
+
error = value.error;
|
2487 |
+
value.error = null;
|
2488 |
+
} else {
|
2489 |
+
succeeded = true;
|
2490 |
+
}
|
2491 |
+
|
2492 |
+
if (promise === value) {
|
2493 |
+
reject(promise, cannotReturnOwn());
|
2494 |
+
return;
|
2495 |
+
}
|
2496 |
+
} else {
|
2497 |
+
value = detail;
|
2498 |
+
succeeded = true;
|
2499 |
+
}
|
2500 |
+
|
2501 |
+
if (promise._state !== PENDING) {
|
2502 |
+
// noop
|
2503 |
+
} else if (hasCallback && succeeded) {
|
2504 |
+
resolve(promise, value);
|
2505 |
+
} else if (failed) {
|
2506 |
+
reject(promise, error);
|
2507 |
+
} else if (settled === FULFILLED) {
|
2508 |
+
fulfill(promise, value);
|
2509 |
+
} else if (settled === REJECTED) {
|
2510 |
+
reject(promise, value);
|
2511 |
+
}
|
2512 |
+
}
|
2513 |
+
|
2514 |
+
function initializePromise(promise, resolver) {
|
2515 |
+
try {
|
2516 |
+
resolver(function resolvePromise(value) {
|
2517 |
+
resolve(promise, value);
|
2518 |
+
}, function rejectPromise(reason) {
|
2519 |
+
reject(promise, reason);
|
2520 |
+
});
|
2521 |
+
} catch (e) {
|
2522 |
+
reject(promise, e);
|
2523 |
+
}
|
2524 |
+
}
|
2525 |
+
|
2526 |
+
var id = 0;
|
2527 |
+
function nextId() {
|
2528 |
+
return id++;
|
2529 |
+
}
|
2530 |
+
|
2531 |
+
function makePromise(promise) {
|
2532 |
+
promise[PROMISE_ID] = id++;
|
2533 |
+
promise._state = undefined;
|
2534 |
+
promise._result = undefined;
|
2535 |
+
promise._subscribers = [];
|
2536 |
+
}
|
2537 |
+
|
2538 |
+
function Enumerator$1(Constructor, input) {
|
2539 |
+
this._instanceConstructor = Constructor;
|
2540 |
+
this.promise = new Constructor(noop);
|
2541 |
+
|
2542 |
+
if (!this.promise[PROMISE_ID]) {
|
2543 |
+
makePromise(this.promise);
|
2544 |
+
}
|
2545 |
+
|
2546 |
+
if (isArray(input)) {
|
2547 |
+
this.length = input.length;
|
2548 |
+
this._remaining = input.length;
|
2549 |
+
|
2550 |
+
this._result = new Array(this.length);
|
2551 |
+
|
2552 |
+
if (this.length === 0) {
|
2553 |
+
fulfill(this.promise, this._result);
|
2554 |
+
} else {
|
2555 |
+
this.length = this.length || 0;
|
2556 |
+
this._enumerate(input);
|
2557 |
+
if (this._remaining === 0) {
|
2558 |
+
fulfill(this.promise, this._result);
|
2559 |
+
}
|
2560 |
+
}
|
2561 |
+
} else {
|
2562 |
+
reject(this.promise, validationError());
|
2563 |
+
}
|
2564 |
+
}
|
2565 |
+
|
2566 |
+
function validationError() {
|
2567 |
+
return new Error('Array Methods must be provided an Array');
|
2568 |
+
}
|
2569 |
+
|
2570 |
+
Enumerator$1.prototype._enumerate = function (input) {
|
2571 |
+
for (var i = 0; this._state === PENDING && i < input.length; i++) {
|
2572 |
+
this._eachEntry(input[i], i);
|
2573 |
+
}
|
2574 |
+
};
|
2575 |
+
|
2576 |
+
Enumerator$1.prototype._eachEntry = function (entry, i) {
|
2577 |
+
var c = this._instanceConstructor;
|
2578 |
+
var resolve$$1 = c.resolve;
|
2579 |
+
|
2580 |
+
if (resolve$$1 === resolve$1) {
|
2581 |
+
var _then = getThen(entry);
|
2582 |
+
|
2583 |
+
if (_then === then && entry._state !== PENDING) {
|
2584 |
+
this._settledAt(entry._state, i, entry._result);
|
2585 |
+
} else if (typeof _then !== 'function') {
|
2586 |
+
this._remaining--;
|
2587 |
+
this._result[i] = entry;
|
2588 |
+
} else if (c === Promise$2) {
|
2589 |
+
var promise = new c(noop);
|
2590 |
+
handleMaybeThenable(promise, entry, _then);
|
2591 |
+
this._willSettleAt(promise, i);
|
2592 |
+
} else {
|
2593 |
+
this._willSettleAt(new c(function (resolve$$1) {
|
2594 |
+
return resolve$$1(entry);
|
2595 |
+
}), i);
|
2596 |
+
}
|
2597 |
+
} else {
|
2598 |
+
this._willSettleAt(resolve$$1(entry), i);
|
2599 |
+
}
|
2600 |
+
};
|
2601 |
+
|
2602 |
+
Enumerator$1.prototype._settledAt = function (state, i, value) {
|
2603 |
+
var promise = this.promise;
|
2604 |
+
|
2605 |
+
if (promise._state === PENDING) {
|
2606 |
+
this._remaining--;
|
2607 |
+
|
2608 |
+
if (state === REJECTED) {
|
2609 |
+
reject(promise, value);
|
2610 |
+
} else {
|
2611 |
+
this._result[i] = value;
|
2612 |
+
}
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
if (this._remaining === 0) {
|
2616 |
+
fulfill(promise, this._result);
|
2617 |
+
}
|
2618 |
+
};
|
2619 |
+
|
2620 |
+
Enumerator$1.prototype._willSettleAt = function (promise, i) {
|
2621 |
+
var enumerator = this;
|
2622 |
+
|
2623 |
+
subscribe(promise, undefined, function (value) {
|
2624 |
+
return enumerator._settledAt(FULFILLED, i, value);
|
2625 |
+
}, function (reason) {
|
2626 |
+
return enumerator._settledAt(REJECTED, i, reason);
|
2627 |
+
});
|
2628 |
+
};
|
2629 |
+
|
2630 |
+
/**
|
2631 |
+
`Promise.all` accepts an array of promises, and returns a new promise which
|
2632 |
+
is fulfilled with an array of fulfillment values for the passed promises, or
|
2633 |
+
rejected with the reason of the first passed promise to be rejected. It casts all
|
2634 |
+
elements of the passed iterable to promises as it runs this algorithm.
|
2635 |
+
|
2636 |
+
Example:
|
2637 |
+
|
2638 |
+
```javascript
|
2639 |
+
let promise1 = resolve(1);
|
2640 |
+
let promise2 = resolve(2);
|
2641 |
+
let promise3 = resolve(3);
|
2642 |
+
let promises = [ promise1, promise2, promise3 ];
|
2643 |
+
|
2644 |
+
Promise.all(promises).then(function(array){
|
2645 |
+
// The array here would be [ 1, 2, 3 ];
|
2646 |
+
});
|
2647 |
+
```
|
2648 |
+
|
2649 |
+
If any of the `promises` given to `all` are rejected, the first promise
|
2650 |
+
that is rejected will be given as an argument to the returned promises's
|
2651 |
+
rejection handler. For example:
|
2652 |
+
|
2653 |
+
Example:
|
2654 |
+
|
2655 |
+
```javascript
|
2656 |
+
let promise1 = resolve(1);
|
2657 |
+
let promise2 = reject(new Error("2"));
|
2658 |
+
let promise3 = reject(new Error("3"));
|
2659 |
+
let promises = [ promise1, promise2, promise3 ];
|
2660 |
+
|
2661 |
+
Promise.all(promises).then(function(array){
|
2662 |
+
// Code here never runs because there are rejected promises!
|
2663 |
+
}, function(error) {
|
2664 |
+
// error.message === "2"
|
2665 |
+
});
|
2666 |
+
```
|
2667 |
+
|
2668 |
+
@method all
|
2669 |
+
@static
|
2670 |
+
@param {Array} entries array of promises
|
2671 |
+
@param {String} label optional string for labeling the promise.
|
2672 |
+
Useful for tooling.
|
2673 |
+
@return {Promise} promise that is fulfilled when all `promises` have been
|
2674 |
+
fulfilled, or rejected if any of them become rejected.
|
2675 |
+
@static
|
2676 |
+
*/
|
2677 |
+
function all$1(entries) {
|
2678 |
+
return new Enumerator$1(this, entries).promise;
|
2679 |
+
}
|
2680 |
+
|
2681 |
+
/**
|
2682 |
+
`Promise.race` returns a new promise which is settled in the same way as the
|
2683 |
+
first passed promise to settle.
|
2684 |
+
|
2685 |
+
Example:
|
2686 |
+
|
2687 |
+
```javascript
|
2688 |
+
let promise1 = new Promise(function(resolve, reject){
|
2689 |
+
setTimeout(function(){
|
2690 |
+
resolve('promise 1');
|
2691 |
+
}, 200);
|
2692 |
+
});
|
2693 |
+
|
2694 |
+
let promise2 = new Promise(function(resolve, reject){
|
2695 |
+
setTimeout(function(){
|
2696 |
+
resolve('promise 2');
|
2697 |
+
}, 100);
|
2698 |
+
});
|
2699 |
+
|
2700 |
+
Promise.race([promise1, promise2]).then(function(result){
|
2701 |
+
// result === 'promise 2' because it was resolved before promise1
|
2702 |
+
// was resolved.
|
2703 |
+
});
|
2704 |
+
```
|
2705 |
+
|
2706 |
+
`Promise.race` is deterministic in that only the state of the first
|
2707 |
+
settled promise matters. For example, even if other promises given to the
|
2708 |
+
`promises` array argument are resolved, but the first settled promise has
|
2709 |
+
become rejected before the other promises became fulfilled, the returned
|
2710 |
+
promise will become rejected:
|
2711 |
+
|
2712 |
+
```javascript
|
2713 |
+
let promise1 = new Promise(function(resolve, reject){
|
2714 |
+
setTimeout(function(){
|
2715 |
+
resolve('promise 1');
|
2716 |
+
}, 200);
|
2717 |
+
});
|
2718 |
+
|
2719 |
+
let promise2 = new Promise(function(resolve, reject){
|
2720 |
+
setTimeout(function(){
|
2721 |
+
reject(new Error('promise 2'));
|
2722 |
+
}, 100);
|
2723 |
+
});
|
2724 |
+
|
2725 |
+
Promise.race([promise1, promise2]).then(function(result){
|
2726 |
+
// Code here never runs
|
2727 |
+
}, function(reason){
|
2728 |
+
// reason.message === 'promise 2' because promise 2 became rejected before
|
2729 |
+
// promise 1 became fulfilled
|
2730 |
+
});
|
2731 |
+
```
|
2732 |
+
|
2733 |
+
An example real-world use case is implementing timeouts:
|
2734 |
+
|
2735 |
+
```javascript
|
2736 |
+
Promise.race([ajax('foo.json'), timeout(5000)])
|
2737 |
+
```
|
2738 |
+
|
2739 |
+
@method race
|
2740 |
+
@static
|
2741 |
+
@param {Array} promises array of promises to observe
|
2742 |
+
Useful for tooling.
|
2743 |
+
@return {Promise} a promise which settles in the same way as the first passed
|
2744 |
+
promise to settle.
|
2745 |
+
*/
|
2746 |
+
function race$1(entries) {
|
2747 |
+
/*jshint validthis:true */
|
2748 |
+
var Constructor = this;
|
2749 |
+
|
2750 |
+
if (!isArray(entries)) {
|
2751 |
+
return new Constructor(function (_, reject) {
|
2752 |
+
return reject(new TypeError('You must pass an array to race.'));
|
2753 |
+
});
|
2754 |
+
} else {
|
2755 |
+
return new Constructor(function (resolve, reject) {
|
2756 |
+
var length = entries.length;
|
2757 |
+
for (var i = 0; i < length; i++) {
|
2758 |
+
Constructor.resolve(entries[i]).then(resolve, reject);
|
2759 |
+
}
|
2760 |
+
});
|
2761 |
+
}
|
2762 |
+
}
|
2763 |
+
|
2764 |
+
/**
|
2765 |
+
`Promise.reject` returns a promise rejected with the passed `reason`.
|
2766 |
+
It is shorthand for the following:
|
2767 |
+
|
2768 |
+
```javascript
|
2769 |
+
let promise = new Promise(function(resolve, reject){
|
2770 |
+
reject(new Error('WHOOPS'));
|
2771 |
+
});
|
2772 |
+
|
2773 |
+
promise.then(function(value){
|
2774 |
+
// Code here doesn't run because the promise is rejected!
|
2775 |
+
}, function(reason){
|
2776 |
+
// reason.message === 'WHOOPS'
|
2777 |
+
});
|
2778 |
+
```
|
2779 |
+
|
2780 |
+
Instead of writing the above, your code now simply becomes the following:
|
2781 |
+
|
2782 |
+
```javascript
|
2783 |
+
let promise = Promise.reject(new Error('WHOOPS'));
|
2784 |
+
|
2785 |
+
promise.then(function(value){
|
2786 |
+
// Code here doesn't run because the promise is rejected!
|
2787 |
+
}, function(reason){
|
2788 |
+
// reason.message === 'WHOOPS'
|
2789 |
+
});
|
2790 |
+
```
|
2791 |
+
|
2792 |
+
@method reject
|
2793 |
+
@static
|
2794 |
+
@param {Any} reason value that the returned promise will be rejected with.
|
2795 |
+
Useful for tooling.
|
2796 |
+
@return {Promise} a promise rejected with the given `reason`.
|
2797 |
+
*/
|
2798 |
+
function reject$1(reason) {
|
2799 |
+
/*jshint validthis:true */
|
2800 |
+
var Constructor = this;
|
2801 |
+
var promise = new Constructor(noop);
|
2802 |
+
reject(promise, reason);
|
2803 |
+
return promise;
|
2804 |
+
}
|
2805 |
+
|
2806 |
+
function needsResolver() {
|
2807 |
+
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
2808 |
+
}
|
2809 |
+
|
2810 |
+
function needsNew() {
|
2811 |
+
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
2812 |
+
}
|
2813 |
+
|
2814 |
+
/**
|
2815 |
+
Promise objects represent the eventual result of an asynchronous operation. The
|
2816 |
+
primary way of interacting with a promise is through its `then` method, which
|
2817 |
+
registers callbacks to receive either a promise's eventual value or the reason
|
2818 |
+
why the promise cannot be fulfilled.
|
2819 |
+
|
2820 |
+
Terminology
|
2821 |
+
-----------
|
2822 |
+
|
2823 |
+
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
|
2824 |
+
- `thenable` is an object or function that defines a `then` method.
|
2825 |
+
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
|
2826 |
+
- `exception` is a value that is thrown using the throw statement.
|
2827 |
+
- `reason` is a value that indicates why a promise was rejected.
|
2828 |
+
- `settled` the final resting state of a promise, fulfilled or rejected.
|
2829 |
+
|
2830 |
+
A promise can be in one of three states: pending, fulfilled, or rejected.
|
2831 |
+
|
2832 |
+
Promises that are fulfilled have a fulfillment value and are in the fulfilled
|
2833 |
+
state. Promises that are rejected have a rejection reason and are in the
|
2834 |
+
rejected state. A fulfillment value is never a thenable.
|
2835 |
+
|
2836 |
+
Promises can also be said to *resolve* a value. If this value is also a
|
2837 |
+
promise, then the original promise's settled state will match the value's
|
2838 |
+
settled state. So a promise that *resolves* a promise that rejects will
|
2839 |
+
itself reject, and a promise that *resolves* a promise that fulfills will
|
2840 |
+
itself fulfill.
|
2841 |
+
|
2842 |
+
|
2843 |
+
Basic Usage:
|
2844 |
+
------------
|
2845 |
+
|
2846 |
+
```js
|
2847 |
+
let promise = new Promise(function(resolve, reject) {
|
2848 |
+
// on success
|
2849 |
+
resolve(value);
|
2850 |
+
|
2851 |
+
// on failure
|
2852 |
+
reject(reason);
|
2853 |
+
});
|
2854 |
+
|
2855 |
+
promise.then(function(value) {
|
2856 |
+
// on fulfillment
|
2857 |
+
}, function(reason) {
|
2858 |
+
// on rejection
|
2859 |
+
});
|
2860 |
+
```
|
2861 |
+
|
2862 |
+
Advanced Usage:
|
2863 |
+
---------------
|
2864 |
+
|
2865 |
+
Promises shine when abstracting away asynchronous interactions such as
|
2866 |
+
`XMLHttpRequest`s.
|
2867 |
+
|
2868 |
+
```js
|
2869 |
+
function getJSON(url) {
|
2870 |
+
return new Promise(function(resolve, reject){
|
2871 |
+
let xhr = new XMLHttpRequest();
|
2872 |
+
|
2873 |
+
xhr.open('GET', url);
|
2874 |
+
xhr.onreadystatechange = handler;
|
2875 |
+
xhr.responseType = 'json';
|
2876 |
+
xhr.setRequestHeader('Accept', 'application/json');
|
2877 |
+
xhr.send();
|
2878 |
+
|
2879 |
+
function handler() {
|
2880 |
+
if (this.readyState === this.DONE) {
|
2881 |
+
if (this.status === 200) {
|
2882 |
+
resolve(this.response);
|
2883 |
+
} else {
|
2884 |
+
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
|
2885 |
+
}
|
2886 |
+
}
|
2887 |
+
};
|
2888 |
+
});
|
2889 |
+
}
|
2890 |
+
|
2891 |
+
getJSON('/posts.json').then(function(json) {
|
2892 |
+
// on fulfillment
|
2893 |
+
}, function(reason) {
|
2894 |
+
// on rejection
|
2895 |
+
});
|
2896 |
+
```
|
2897 |
+
|
2898 |
+
Unlike callbacks, promises are great composable primitives.
|
2899 |
+
|
2900 |
+
```js
|
2901 |
+
Promise.all([
|
2902 |
+
getJSON('/posts'),
|
2903 |
+
getJSON('/comments')
|
2904 |
+
]).then(function(values){
|
2905 |
+
values[0] // => postsJSON
|
2906 |
+
values[1] // => commentsJSON
|
2907 |
+
|
2908 |
+
return values;
|
2909 |
+
});
|
2910 |
+
```
|
2911 |
+
|
2912 |
+
@class Promise
|
2913 |
+
@param {function} resolver
|
2914 |
+
Useful for tooling.
|
2915 |
+
@constructor
|
2916 |
+
*/
|
2917 |
+
function Promise$2(resolver) {
|
2918 |
+
this[PROMISE_ID] = nextId();
|
2919 |
+
this._result = this._state = undefined;
|
2920 |
+
this._subscribers = [];
|
2921 |
+
|
2922 |
+
if (noop !== resolver) {
|
2923 |
+
typeof resolver !== 'function' && needsResolver();
|
2924 |
+
this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
|
2925 |
+
}
|
2926 |
+
}
|
2927 |
+
|
2928 |
+
Promise$2.all = all$1;
|
2929 |
+
Promise$2.race = race$1;
|
2930 |
+
Promise$2.resolve = resolve$1;
|
2931 |
+
Promise$2.reject = reject$1;
|
2932 |
+
Promise$2._setScheduler = setScheduler;
|
2933 |
+
Promise$2._setAsap = setAsap;
|
2934 |
+
Promise$2._asap = asap;
|
2935 |
+
|
2936 |
+
Promise$2.prototype = {
|
2937 |
+
constructor: Promise$2,
|
2938 |
+
|
2939 |
+
/**
|
2940 |
+
The primary way of interacting with a promise is through its `then` method,
|
2941 |
+
which registers callbacks to receive either a promise's eventual value or the
|
2942 |
+
reason why the promise cannot be fulfilled.
|
2943 |
+
|
2944 |
+
```js
|
2945 |
+
findUser().then(function(user){
|
2946 |
+
// user is available
|
2947 |
+
}, function(reason){
|
2948 |
+
// user is unavailable, and you are given the reason why
|
2949 |
+
});
|
2950 |
+
```
|
2951 |
+
|
2952 |
+
Chaining
|
2953 |
+
--------
|
2954 |
+
|
2955 |
+
The return value of `then` is itself a promise. This second, 'downstream'
|
2956 |
+
promise is resolved with the return value of the first promise's fulfillment
|
2957 |
+
or rejection handler, or rejected if the handler throws an exception.
|
2958 |
+
|
2959 |
+
```js
|
2960 |
+
findUser().then(function (user) {
|
2961 |
+
return user.name;
|
2962 |
+
}, function (reason) {
|
2963 |
+
return 'default name';
|
2964 |
+
}).then(function (userName) {
|
2965 |
+
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
2966 |
+
// will be `'default name'`
|
2967 |
+
});
|
2968 |
+
|
2969 |
+
findUser().then(function (user) {
|
2970 |
+
throw new Error('Found user, but still unhappy');
|
2971 |
+
}, function (reason) {
|
2972 |
+
throw new Error('`findUser` rejected and we're unhappy');
|
2973 |
+
}).then(function (value) {
|
2974 |
+
// never reached
|
2975 |
+
}, function (reason) {
|
2976 |
+
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
2977 |
+
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
2978 |
+
});
|
2979 |
+
```
|
2980 |
+
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
2981 |
+
|
2982 |
+
```js
|
2983 |
+
findUser().then(function (user) {
|
2984 |
+
throw new PedagogicalException('Upstream error');
|
2985 |
+
}).then(function (value) {
|
2986 |
+
// never reached
|
2987 |
+
}).then(function (value) {
|
2988 |
+
// never reached
|
2989 |
+
}, function (reason) {
|
2990 |
+
// The `PedgagocialException` is propagated all the way down to here
|
2991 |
+
});
|
2992 |
+
```
|
2993 |
+
|
2994 |
+
Assimilation
|
2995 |
+
------------
|
2996 |
+
|
2997 |
+
Sometimes the value you want to propagate to a downstream promise can only be
|
2998 |
+
retrieved asynchronously. This can be achieved by returning a promise in the
|
2999 |
+
fulfillment or rejection handler. The downstream promise will then be pending
|
3000 |
+
until the returned promise is settled. This is called *assimilation*.
|
3001 |
+
|
3002 |
+
```js
|
3003 |
+
findUser().then(function (user) {
|
3004 |
+
return findCommentsByAuthor(user);
|
3005 |
+
}).then(function (comments) {
|
3006 |
+
// The user's comments are now available
|
3007 |
+
});
|
3008 |
+
```
|
3009 |
+
|
3010 |
+
If the assimliated promise rejects, then the downstream promise will also reject.
|
3011 |
+
|
3012 |
+
```js
|
3013 |
+
findUser().then(function (user) {
|
3014 |
+
return findCommentsByAuthor(user);
|
3015 |
+
}).then(function (comments) {
|
3016 |
+
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
3017 |
+
}, function (reason) {
|
3018 |
+
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
3019 |
+
});
|
3020 |
+
```
|
3021 |
+
|
3022 |
+
Simple Example
|
3023 |
+
--------------
|
3024 |
+
|
3025 |
+
Synchronous Example
|
3026 |
+
|
3027 |
+
```javascript
|
3028 |
+
let result;
|
3029 |
+
|
3030 |
+
try {
|
3031 |
+
result = findResult();
|
3032 |
+
// success
|
3033 |
+
} catch(reason) {
|
3034 |
+
// failure
|
3035 |
+
}
|
3036 |
+
```
|
3037 |
+
|
3038 |
+
Errback Example
|
3039 |
+
|
3040 |
+
```js
|
3041 |
+
findResult(function(result, err){
|
3042 |
+
if (err) {
|
3043 |
+
// failure
|
3044 |
+
} else {
|
3045 |
+
// success
|
3046 |
+
}
|
3047 |
+
});
|
3048 |
+
```
|
3049 |
+
|
3050 |
+
Promise Example;
|
3051 |
+
|
3052 |
+
```javascript
|
3053 |
+
findResult().then(function(result){
|
3054 |
+
// success
|
3055 |
+
}, function(reason){
|
3056 |
+
// failure
|
3057 |
+
});
|
3058 |
+
```
|
3059 |
+
|
3060 |
+
Advanced Example
|
3061 |
+
--------------
|
3062 |
+
|
3063 |
+
Synchronous Example
|
3064 |
+
|
3065 |
+
```javascript
|
3066 |
+
let author, books;
|
3067 |
+
|
3068 |
+
try {
|
3069 |
+
author = findAuthor();
|
3070 |
+
books = findBooksByAuthor(author);
|
3071 |
+
// success
|
3072 |
+
} catch(reason) {
|
3073 |
+
// failure
|
3074 |
+
}
|
3075 |
+
```
|
3076 |
+
|
3077 |
+
Errback Example
|
3078 |
+
|
3079 |
+
```js
|
3080 |
+
|
3081 |
+
function foundBooks(books) {
|
3082 |
+
|
3083 |
+
}
|
3084 |
+
|
3085 |
+
function failure(reason) {
|
3086 |
+
|
3087 |
+
}
|
3088 |
+
|
3089 |
+
findAuthor(function(author, err){
|
3090 |
+
if (err) {
|
3091 |
+
failure(err);
|
3092 |
+
// failure
|
3093 |
+
} else {
|
3094 |
+
try {
|
3095 |
+
findBoooksByAuthor(author, function(books, err) {
|
3096 |
+
if (err) {
|
3097 |
+
failure(err);
|
3098 |
+
} else {
|
3099 |
+
try {
|
3100 |
+
foundBooks(books);
|
3101 |
+
} catch(reason) {
|
3102 |
+
failure(reason);
|
3103 |
+
}
|
3104 |
+
}
|
3105 |
+
});
|
3106 |
+
} catch(error) {
|
3107 |
+
failure(err);
|
3108 |
+
}
|
3109 |
+
// success
|
3110 |
+
}
|
3111 |
+
});
|
3112 |
+
```
|
3113 |
+
|
3114 |
+
Promise Example;
|
3115 |
+
|
3116 |
+
```javascript
|
3117 |
+
findAuthor().
|
3118 |
+
then(findBooksByAuthor).
|
3119 |
+
then(function(books){
|
3120 |
+
// found books
|
3121 |
+
}).catch(function(reason){
|
3122 |
+
// something went wrong
|
3123 |
+
});
|
3124 |
+
```
|
3125 |
+
|
3126 |
+
@method then
|
3127 |
+
@param {Function} onFulfilled
|
3128 |
+
@param {Function} onRejected
|
3129 |
+
Useful for tooling.
|
3130 |
+
@return {Promise}
|
3131 |
+
*/
|
3132 |
+
then: then,
|
3133 |
+
|
3134 |
+
/**
|
3135 |
+
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
3136 |
+
as the catch block of a try/catch statement.
|
3137 |
+
|
3138 |
+
```js
|
3139 |
+
function findAuthor(){
|
3140 |
+
throw new Error('couldn't find that author');
|
3141 |
+
}
|
3142 |
+
|
3143 |
+
// synchronous
|
3144 |
+
try {
|
3145 |
+
findAuthor();
|
3146 |
+
} catch(reason) {
|
3147 |
+
// something went wrong
|
3148 |
+
}
|
3149 |
+
|
3150 |
+
// async with promises
|
3151 |
+
findAuthor().catch(function(reason){
|
3152 |
+
// something went wrong
|
3153 |
+
});
|
3154 |
+
```
|
3155 |
+
|
3156 |
+
@method catch
|
3157 |
+
@param {Function} onRejection
|
3158 |
+
Useful for tooling.
|
3159 |
+
@return {Promise}
|
3160 |
+
*/
|
3161 |
+
'catch': function _catch(onRejection) {
|
3162 |
+
return this.then(null, onRejection);
|
3163 |
+
}
|
3164 |
+
};
|
3165 |
+
|
3166 |
+
/*global self*/
|
3167 |
+
function polyfill$1() {
|
3168 |
+
var local = undefined;
|
3169 |
+
|
3170 |
+
if (typeof global !== 'undefined') {
|
3171 |
+
local = global;
|
3172 |
+
} else if (typeof self !== 'undefined') {
|
3173 |
+
local = self;
|
3174 |
+
} else {
|
3175 |
+
try {
|
3176 |
+
local = Function('return this')();
|
3177 |
+
} catch (e) {
|
3178 |
+
throw new Error('polyfill failed because global object is unavailable in this environment');
|
3179 |
+
}
|
3180 |
+
}
|
3181 |
+
|
3182 |
+
var P = local.Promise;
|
3183 |
+
|
3184 |
+
if (P) {
|
3185 |
+
var promiseToString = null;
|
3186 |
+
try {
|
3187 |
+
promiseToString = Object.prototype.toString.call(P.resolve());
|
3188 |
+
} catch (e) {
|
3189 |
+
// silently ignored
|
3190 |
+
}
|
3191 |
+
|
3192 |
+
if (promiseToString === '[object Promise]' && !P.cast) {
|
3193 |
+
return;
|
3194 |
+
}
|
3195 |
+
}
|
3196 |
+
|
3197 |
+
local.Promise = Promise$2;
|
3198 |
+
}
|
3199 |
+
|
3200 |
+
// Strange compat..
|
3201 |
+
Promise$2.polyfill = polyfill$1;
|
3202 |
+
Promise$2.Promise = Promise$2;
|
3203 |
+
|
3204 |
+
return Promise$2;
|
3205 |
+
|
3206 |
+
})));
|
3207 |
+
|
3208 |
+
//# sourceMappingURL=es6-promise.map
|
3209 |
+
|
3210 |
+
|
3211 |
+
/*** EXPORTS FROM exports-loader ***/
|
3212 |
+
module.exports = global.Promise;
|
3213 |
+
}.call(global));
|
3214 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(18)))
|
3215 |
+
|
3216 |
+
/***/ }),
|
3217 |
+
/* 18 */
|
3218 |
+
/***/ (function(module, exports) {
|
3219 |
+
|
3220 |
+
// shim for using process in browser
|
3221 |
+
var process = module.exports = {};
|
3222 |
+
|
3223 |
+
// cached from whatever global is present so that test runners that stub it
|
3224 |
+
// don't break things. But we need to wrap it in a try catch in case it is
|
3225 |
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
3226 |
+
// function because try/catches deoptimize in certain engines.
|
3227 |
+
|
3228 |
+
var cachedSetTimeout;
|
3229 |
+
var cachedClearTimeout;
|
3230 |
+
|
3231 |
+
function defaultSetTimout() {
|
3232 |
+
throw new Error('setTimeout has not been defined');
|
3233 |
+
}
|
3234 |
+
function defaultClearTimeout () {
|
3235 |
+
throw new Error('clearTimeout has not been defined');
|
3236 |
+
}
|
3237 |
+
(function () {
|
3238 |
+
try {
|
3239 |
+
if (typeof setTimeout === 'function') {
|
3240 |
+
cachedSetTimeout = setTimeout;
|
3241 |
+
} else {
|
3242 |
+
cachedSetTimeout = defaultSetTimout;
|
3243 |
+
}
|
3244 |
+
} catch (e) {
|
3245 |
+
cachedSetTimeout = defaultSetTimout;
|
3246 |
+
}
|
3247 |
+
try {
|
3248 |
+
if (typeof clearTimeout === 'function') {
|
3249 |
+
cachedClearTimeout = clearTimeout;
|
3250 |
+
} else {
|
3251 |
+
cachedClearTimeout = defaultClearTimeout;
|
3252 |
+
}
|
3253 |
+
} catch (e) {
|
3254 |
+
cachedClearTimeout = defaultClearTimeout;
|
3255 |
+
}
|
3256 |
+
} ())
|
3257 |
+
function runTimeout(fun) {
|
3258 |
+
if (cachedSetTimeout === setTimeout) {
|
3259 |
+
//normal enviroments in sane situations
|
3260 |
+
return setTimeout(fun, 0);
|
3261 |
+
}
|
3262 |
+
// if setTimeout wasn't available but was latter defined
|
3263 |
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
3264 |
+
cachedSetTimeout = setTimeout;
|
3265 |
+
return setTimeout(fun, 0);
|
3266 |
+
}
|
3267 |
+
try {
|
3268 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
3269 |
+
return cachedSetTimeout(fun, 0);
|
3270 |
+
} catch(e){
|
3271 |
+
try {
|
3272 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
3273 |
+
return cachedSetTimeout.call(null, fun, 0);
|
3274 |
+
} catch(e){
|
3275 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
3276 |
+
return cachedSetTimeout.call(this, fun, 0);
|
3277 |
+
}
|
3278 |
+
}
|
3279 |
+
|
3280 |
+
|
3281 |
+
}
|
3282 |
+
function runClearTimeout(marker) {
|
3283 |
+
if (cachedClearTimeout === clearTimeout) {
|
3284 |
+
//normal enviroments in sane situations
|
3285 |
+
return clearTimeout(marker);
|
3286 |
+
}
|
3287 |
+
// if clearTimeout wasn't available but was latter defined
|
3288 |
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
3289 |
+
cachedClearTimeout = clearTimeout;
|
3290 |
+
return clearTimeout(marker);
|
3291 |
+
}
|
3292 |
+
try {
|
3293 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
3294 |
+
return cachedClearTimeout(marker);
|
3295 |
+
} catch (e){
|
3296 |
+
try {
|
3297 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
3298 |
+
return cachedClearTimeout.call(null, marker);
|
3299 |
+
} catch (e){
|
3300 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
3301 |
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
3302 |
+
return cachedClearTimeout.call(this, marker);
|
3303 |
+
}
|
3304 |
+
}
|
3305 |
+
|
3306 |
+
|
3307 |
+
|
3308 |
+
}
|
3309 |
+
var queue = [];
|
3310 |
+
var draining = false;
|
3311 |
+
var currentQueue;
|
3312 |
+
var queueIndex = -1;
|
3313 |
+
|
3314 |
+
function cleanUpNextTick() {
|
3315 |
+
if (!draining || !currentQueue) {
|
3316 |
+
return;
|
3317 |
+
}
|
3318 |
+
draining = false;
|
3319 |
+
if (currentQueue.length) {
|
3320 |
+
queue = currentQueue.concat(queue);
|
3321 |
+
} else {
|
3322 |
+
queueIndex = -1;
|
3323 |
+
}
|
3324 |
+
if (queue.length) {
|
3325 |
+
drainQueue();
|
3326 |
+
}
|
3327 |
+
}
|
3328 |
+
|
3329 |
+
function drainQueue() {
|
3330 |
+
if (draining) {
|
3331 |
+
return;
|
3332 |
+
}
|
3333 |
+
var timeout = runTimeout(cleanUpNextTick);
|
3334 |
+
draining = true;
|
3335 |
+
|
3336 |
+
var len = queue.length;
|
3337 |
+
while(len) {
|
3338 |
+
currentQueue = queue;
|
3339 |
+
queue = [];
|
3340 |
+
while (++queueIndex < len) {
|
3341 |
+
if (currentQueue) {
|
3342 |
+
currentQueue[queueIndex].run();
|
3343 |
+
}
|
3344 |
+
}
|
3345 |
+
queueIndex = -1;
|
3346 |
+
len = queue.length;
|
3347 |
+
}
|
3348 |
+
currentQueue = null;
|
3349 |
+
draining = false;
|
3350 |
+
runClearTimeout(timeout);
|
3351 |
+
}
|
3352 |
+
|
3353 |
+
process.nextTick = function (fun) {
|
3354 |
+
var args = new Array(arguments.length - 1);
|
3355 |
+
if (arguments.length > 1) {
|
3356 |
+
for (var i = 1; i < arguments.length; i++) {
|
3357 |
+
args[i - 1] = arguments[i];
|
3358 |
+
}
|
3359 |
+
}
|
3360 |
+
queue.push(new Item(fun, args));
|
3361 |
+
if (queue.length === 1 && !draining) {
|
3362 |
+
runTimeout(drainQueue);
|
3363 |
+
}
|
3364 |
+
};
|
3365 |
+
|
3366 |
+
// v8 likes predictible objects
|
3367 |
+
function Item(fun, array) {
|
3368 |
+
this.fun = fun;
|
3369 |
+
this.array = array;
|
3370 |
+
}
|
3371 |
+
Item.prototype.run = function () {
|
3372 |
+
this.fun.apply(null, this.array);
|
3373 |
+
};
|
3374 |
+
process.title = 'browser';
|
3375 |
+
process.browser = true;
|
3376 |
+
process.env = {};
|
3377 |
+
process.argv = [];
|
3378 |
+
process.version = ''; // empty string to avoid regexp issues
|
3379 |
+
process.versions = {};
|
3380 |
+
|
3381 |
+
function noop() {}
|
3382 |
+
|
3383 |
+
process.on = noop;
|
3384 |
+
process.addListener = noop;
|
3385 |
+
process.once = noop;
|
3386 |
+
process.off = noop;
|
3387 |
+
process.removeListener = noop;
|
3388 |
+
process.removeAllListeners = noop;
|
3389 |
+
process.emit = noop;
|
3390 |
+
process.prependListener = noop;
|
3391 |
+
process.prependOnceListener = noop;
|
3392 |
+
|
3393 |
+
process.listeners = function (name) { return [] }
|
3394 |
+
|
3395 |
+
process.binding = function (name) {
|
3396 |
+
throw new Error('process.binding is not supported');
|
3397 |
+
};
|
3398 |
+
|
3399 |
+
process.cwd = function () { return '/' };
|
3400 |
+
process.chdir = function (dir) {
|
3401 |
+
throw new Error('process.chdir is not supported');
|
3402 |
+
};
|
3403 |
+
process.umask = function() { return 0; };
|
3404 |
+
|
3405 |
+
|
3406 |
+
/***/ }),
|
3407 |
+
/* 19 */
|
3408 |
+
/***/ (function(module, exports) {
|
3409 |
+
|
3410 |
+
/* (ignored) */
|
3411 |
+
|
3412 |
+
/***/ })
|
3413 |
/******/ ]);
|
lib/view/assets/javascript/updater.min.js
CHANGED
@@ -1,118 +1,144 @@
|
|
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 |
-
/******/
|
15 |
-
/******/
|
16 |
-
/******/
|
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.
|
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__(
|
41 |
/******/ })
|
42 |
/************************************************************************/
|
43 |
-
/******/ (
|
44 |
-
|
45 |
-
/***/
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
'use strict';
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
67 |
-
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
68 |
-
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
69 |
-
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
70 |
-
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
71 |
-
*/
|
72 |
-
|
73 |
-
jQuery(document).ready(function ($) {
|
74 |
-
'use strict';
|
75 |
-
|
76 |
-
$('.ai1wm-purchase-add').click(function (e) {
|
77 |
-
var button = this;
|
78 |
-
e.preventDefault();
|
79 |
-
$(this).attr('disabled', true);
|
80 |
-
var dialog = $(this).closest('.ai1wm-modal-dialog');
|
81 |
-
var error = dialog.find('.ai1wm-modal-error');
|
82 |
-
var index = dialog.attr('id').split('-').pop();
|
83 |
-
var purchaseId = dialog.find('.ai1wm-purchase-id').val();
|
84 |
-
var updateLink = dialog.find('.ai1wm-update-link').val();
|
85 |
-
|
86 |
-
// Check Purchase ID
|
87 |
$.ajax({
|
88 |
-
url:
|
89 |
-
type: '
|
90 |
-
dataType: 'json'
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
data: { 'ai1wm_uuid': product.uuid, 'ai1wm_extension': product.extension }
|
98 |
-
}).done(function () {
|
99 |
-
window.location.hash = '';
|
100 |
-
|
101 |
-
// Update plugin row
|
102 |
-
$('#ai1wm-update-section-' + index).html('<a href="' + updateLink + '">Check for updates</a>');
|
103 |
-
$(button).attr('disabled', false);
|
104 |
-
});
|
105 |
-
}).fail(function () {
|
106 |
$(button).attr('disabled', false);
|
107 |
-
error.html('Your purchase ID is invalid, please <a href="mailto:support@servmask.com">contact us</a>');
|
108 |
});
|
|
|
|
|
|
|
109 |
});
|
|
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
});
|
115 |
});
|
|
|
|
|
|
|
116 |
|
117 |
-
|
118 |
-
/******/ ]);
|
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 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
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.l = 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 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, {
|
40 |
+
/******/ configurable: false,
|
41 |
+
/******/ enumerable: true,
|
42 |
+
/******/ get: getter
|
43 |
+
/******/ });
|
44 |
+
/******/ }
|
45 |
+
/******/ };
|
46 |
+
/******/
|
47 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
+
/******/ __webpack_require__.n = function(module) {
|
49 |
+
/******/ var getter = module && module.__esModule ?
|
50 |
+
/******/ function getDefault() { return module['default']; } :
|
51 |
+
/******/ function getModuleExports() { return module; };
|
52 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
+
/******/ return getter;
|
54 |
+
/******/ };
|
55 |
+
/******/
|
56 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
+
/******/
|
59 |
/******/ // __webpack_public_path__
|
60 |
/******/ __webpack_require__.p = "";
|
61 |
+
/******/
|
62 |
/******/ // Load entry module and return exports
|
63 |
+
/******/ return __webpack_require__(__webpack_require__.s = 20);
|
64 |
/******/ })
|
65 |
/************************************************************************/
|
66 |
+
/******/ ({
|
67 |
+
|
68 |
+
/***/ 20:
|
69 |
+
/***/ (function(module, exports, __webpack_require__) {
|
70 |
+
|
71 |
+
"use strict";
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Copyright (C) 2014-2017 ServMask Inc.
|
76 |
+
*
|
77 |
+
* This program is free software: you can redistribute it and/or modify
|
78 |
+
* it under the terms of the GNU General Public License as published by
|
79 |
+
* the Free Software Foundation, either version 3 of the License, or
|
80 |
+
* (at your option) any later version.
|
81 |
+
*
|
82 |
+
* This program is distributed in the hope that it will be useful,
|
83 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
84 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
85 |
+
* GNU General Public License for more details.
|
86 |
+
*
|
87 |
+
* You should have received a copy of the GNU General Public License
|
88 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
89 |
+
*
|
90 |
+
* ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗
|
91 |
+
* ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝
|
92 |
+
* ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝
|
93 |
+
* ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗
|
94 |
+
* ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗
|
95 |
+
* ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
96 |
+
*/
|
97 |
+
|
98 |
+
jQuery(document).ready(function ($) {
|
99 |
'use strict';
|
100 |
|
101 |
+
$('.ai1wm-purchase-add').click(function (e) {
|
102 |
+
var button = this;
|
103 |
+
e.preventDefault();
|
104 |
+
$(this).attr('disabled', true);
|
105 |
+
var dialog = $(this).closest('.ai1wm-modal-dialog');
|
106 |
+
var error = dialog.find('.ai1wm-modal-error');
|
107 |
+
var index = dialog.attr('id').split('-').pop();
|
108 |
+
var purchaseId = dialog.find('.ai1wm-purchase-id').val();
|
109 |
+
var updateLink = dialog.find('.ai1wm-update-link').val();
|
110 |
+
|
111 |
+
// Check Purchase ID
|
112 |
+
$.ajax({
|
113 |
+
url: 'https://servmask.com/purchase/' + purchaseId + '/check',
|
114 |
+
type: 'GET',
|
115 |
+
dataType: 'json'
|
116 |
+
}).done(function (product) {
|
117 |
+
// Update Purchase ID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
$.ajax({
|
119 |
+
url: ai1wm_updater.ajax.url,
|
120 |
+
type: 'POST',
|
121 |
+
dataType: 'json',
|
122 |
+
data: { 'ai1wm_uuid': product.uuid, 'ai1wm_extension': product.extension }
|
123 |
+
}).done(function () {
|
124 |
+
window.location.hash = '';
|
125 |
+
|
126 |
+
// Update plugin row
|
127 |
+
$('#ai1wm-update-section-' + index).html('<a href="' + updateLink + '">Check for updates</a>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
$(button).attr('disabled', false);
|
|
|
129 |
});
|
130 |
+
}).fail(function () {
|
131 |
+
$(button).attr('disabled', false);
|
132 |
+
error.html('Your purchase ID is invalid, please <a href="mailto:support@servmask.com">contact us</a>');
|
133 |
});
|
134 |
+
});
|
135 |
|
136 |
+
$('.ai1wm-purchase-discard').click(function (e) {
|
137 |
+
window.location.hash = '';
|
138 |
+
e.preventDefault();
|
|
|
139 |
});
|
140 |
+
});
|
141 |
+
|
142 |
+
/***/ })
|
143 |
|
144 |
+
/******/ });
|
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: yani.iliev, bangelov, pimjitsawang
|
|
3 |
Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordpress migration, website migration, database export, database import, apoyo, sauvegarde, di riserva, バックアップ
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.8
|
6 |
-
Stable tag: 6.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
|
@@ -90,6 +90,11 @@ Alternatively you can download the plugin using the download button on this page
|
|
90 |
3. Plugin Menu
|
91 |
|
92 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
93 |
= 6.53 =
|
94 |
**Added**
|
95 |
|
3 |
Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordpress migration, website migration, database export, database import, apoyo, sauvegarde, di riserva, バックアップ
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.8
|
6 |
+
Stable tag: 6.54
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable.
|
90 |
3. Plugin Menu
|
91 |
|
92 |
== Changelog ==
|
93 |
+
= 6.54 =
|
94 |
+
**Changed**
|
95 |
+
|
96 |
+
* Use late row lookup to perform database export
|
97 |
+
|
98 |
= 6.53 =
|
99 |
**Added**
|
100 |
|