Search Regex - Version 2.0.1

Version Description

  • 11th May 2010 =
  • Comment title now takes you to comment page
  • Improve regex performance when data has large gaps
  • Use correct contact address
  • Support \1 as well as $1 in regular expression captures
Download this release

Release Info

Developer johnny5
Plugin Icon 128x128 Search Regex
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

api/api-search.php CHANGED
@@ -290,6 +290,11 @@ class Search_Regex_Api_Search extends Search_Regex_Api_Route {
290
  'backward',
291
  ],
292
  ],
 
 
 
 
 
293
  ];
294
  }
295
 
@@ -399,7 +404,7 @@ class Search_Regex_Api_Search extends Search_Regex_Api_Route {
399
 
400
  list( $search, $replacer ) = $this->get_search_replace( $params, $params['replacement'] );
401
 
402
- $results = $search->get_results( $replacer, $params['page'], $params['perPage'] );
403
  if ( ! is_wp_error( $results ) ) {
404
  $results['results'] = $search->results_to_json( $results['results'] );
405
  }
@@ -602,14 +607,19 @@ class Search_Regex_Api_Search extends Search_Regex_Api_Route {
602
  // Get the sanitized flags from all the sources
603
  $allowed = [];
604
  foreach ( $sources as $source ) {
605
- $allowed = array_merge( $allowed, $source->get_source_flags()->get_flags() );
606
  }
607
 
608
  // Make it unique, as some sources can use the same flag
609
- $allowed = array_unique( $allowed );
 
 
 
 
 
610
 
611
  // Any flags missing?
612
- if ( count( $allowed ) === count( $value ) ) {
613
  return true;
614
  }
615
  }
290
  'backward',
291
  ],
292
  ],
293
+ 'limit' => [
294
+ 'description' => 'Maximum number of results to return',
295
+ 'type' => 'integer',
296
+ 'default' => 0,
297
+ ],
298
  ];
299
  }
300
 
404
 
405
  list( $search, $replacer ) = $this->get_search_replace( $params, $params['replacement'] );
406
 
407
+ $results = $search->get_results( $replacer, $params['page'], $params['perPage'], $params['limit'] );
408
  if ( ! is_wp_error( $results ) ) {
409
  $results['results'] = $search->results_to_json( $results['results'] );
410
  }
607
  // Get the sanitized flags from all the sources
608
  $allowed = [];
609
  foreach ( $sources as $source ) {
610
+ $allowed = array_merge( $allowed, array_keys( $source->get_supported_flags() ) );
611
  }
612
 
613
  // Make it unique, as some sources can use the same flag
614
+ $allowed = array_values( array_unique( $allowed ) );
615
+
616
+ // Filter the value by this allowed list
617
+ $filtered_value = array_filter( $value, function( $item ) use ( $allowed ) {
618
+ return in_array( $item, $allowed, true );
619
+ } );
620
 
621
  // Any flags missing?
622
+ if ( count( $filtered_value ) === count( $value ) ) {
623
  return true;
624
  }
625
  }
locale/search-regex.pot CHANGED
@@ -14,89 +14,89 @@ msgstr ""
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
 
17
- #: search-regex-admin.php:44
18
  msgid "Settings"
19
  msgstr ""
20
 
21
- #: search-regex-admin.php:167, search-regex-strings.php:131
22
  msgid "{{link}}Source Flags{{/link}} - additional options for the selected source. For example, include post {{guid}}GUID{{/guid}} in the search."
23
  msgstr ""
24
 
25
  #. translators: URL
26
- #: search-regex-admin.php:175
27
  msgid "You can find full documentation about using Search Regex on the <a href=\"%s\" target=\"_blank\">searchregex.com</a> support site."
28
  msgstr ""
29
 
30
- #: search-regex-admin.php:176, search-regex-strings.php:127
31
  msgid "The following concepts are used by Search Regex:"
32
  msgstr ""
33
 
34
- #: search-regex-admin.php:178, search-regex-strings.php:128
35
  msgid "{{link}}Search Flags{{/link}} - additional qualifiers for your search, to enable case insensitivity, and to enable regular expression support."
36
  msgstr ""
37
 
38
- #: search-regex-admin.php:179, search-regex-strings.php:129
39
  msgid "{{link}}Regular expression{{/link}} - a way of defining a pattern for text matching. Provides more advanced matches."
40
  msgstr ""
41
 
42
- #: search-regex-admin.php:180, search-regex-strings.php:130
43
  msgid "{{link}}Source{{/link}} - the source of data you wish to search. For example, posts, pages, or comments."
44
  msgstr ""
45
 
46
- #: search-regex-admin.php:184
47
  msgid "Search Regex Support"
48
  msgstr ""
49
 
50
  #. translators: 1: Expected WordPress version, 2: Actual WordPress version
51
- #: search-regex-admin.php:248
52
  msgid "Search Regex requires WordPress v%1$1s, you are using v%2$2s - please update your WordPress"
53
  msgstr ""
54
 
55
- #: search-regex-admin.php:251
56
  msgid "Unable to load Search Regex"
57
  msgstr ""
58
 
59
- #: search-regex-admin.php:260
60
  msgid "Unable to load Search Regex ☹️"
61
  msgstr ""
62
 
63
- #: search-regex-admin.php:261
64
  msgid "This may be caused by another plugin - look at your browser's error console for more details."
65
  msgstr ""
66
 
67
- #: search-regex-admin.php:262, search-regex-strings.php:90
68
  msgid "If you are using a page caching plugin or service (CloudFlare, OVH, etc) then you can also try clearing that cache."
69
  msgstr ""
70
 
71
- #: search-regex-admin.php:263
72
  msgid "Also check if your browser is able to load <code>search-regex.js</code>:"
73
  msgstr ""
74
 
75
- #: search-regex-admin.php:265
76
  msgid "Please note that Search Regex requires the WordPress REST API to be enabled. If you have disabled this then you won't be able to use Search Regex"
77
  msgstr ""
78
 
79
- #: search-regex-admin.php:266
80
  msgid "Please see the <a href=\"https://searchregex.com/support/problems/\">list of common problems</a>."
81
  msgstr ""
82
 
83
- #: search-regex-admin.php:267
84
  msgid "If you think Search Regex is at fault then create an issue."
85
  msgstr ""
86
 
87
- #: search-regex-admin.php:268
88
  msgid "<code>SearchRegexi10n</code> is not defined. This usually means another plugin is blocking Search Regex from loading. Please disable all plugins and try again."
89
  msgstr ""
90
 
91
- #: search-regex-admin.php:271
92
  msgid "Create Issue"
93
  msgstr ""
94
 
95
- #: search-regex-admin.php:284
96
  msgid "Loading, please wait..."
97
  msgstr ""
98
 
99
- #: search-regex-admin.php:288
100
  msgid "Please enable JavaScript"
101
  msgstr ""
102
 
@@ -164,7 +164,7 @@ msgstr ""
164
  msgid "Create An Issue"
165
  msgstr ""
166
 
167
- #: search-regex-strings.php:24, source/core/comment.php:23
168
  msgid "Email"
169
  msgstr ""
170
 
@@ -225,23 +225,23 @@ msgid "If you are using WordPress 5.2 or newer then look at your {{link}}Site He
225
  msgstr ""
226
 
227
  #: search-regex-strings.php:40
228
- msgid "Search & Replace"
229
  msgstr ""
230
 
231
- #: search-regex-strings.php:41, search-regex-strings.php:82
232
- msgid "Options"
233
  msgstr ""
234
 
235
- #: search-regex-strings.php:42, search-regex-strings.php:83
236
- msgid "Support"
237
  msgstr ""
238
 
239
- #: search-regex-strings.php:43
240
- msgid "Replacement for this match"
241
  msgstr ""
242
 
243
- #: search-regex-strings.php:44
244
- msgid "Replace single phrase."
245
  msgstr ""
246
 
247
  #: search-regex-strings.php:45
@@ -528,7 +528,7 @@ msgstr ""
528
  msgid "If you want to submit information that you don't want in a public repository then send it directly via {{email}}email{{/email}} - include as much information as you can!"
529
  msgstr ""
530
 
531
- #: search-regex-strings.php:124, source/plugin/redirection.php:76
532
  msgid "Redirection"
533
  msgstr ""
534
 
@@ -645,7 +645,7 @@ msgid "Actions"
645
  msgstr ""
646
 
647
  #. translators: 1: server PHP version. 2: required PHP version.
648
- #: search-regex.php:33
649
  msgid "Disabled! Detected PHP %1$s, need PHP %2$s+"
650
  msgstr ""
651
 
@@ -705,70 +705,14 @@ msgstr ""
705
  msgid "Search all WordPress options."
706
  msgstr ""
707
 
708
- #: models/source-manager.php:113
709
  msgid "Standard Types"
710
  msgstr ""
711
 
712
- #: models/source-manager.php:120
713
  msgid "Specific Post Types"
714
  msgstr ""
715
 
716
- #: models/source-manager.php:127
717
  msgid "Plugins"
718
  msgstr ""
719
-
720
- #: source/core/comment.php:22, source/core/meta.php:19, source/core/options.php:19
721
- msgid "Name"
722
- msgstr ""
723
-
724
- #: source/core/comment.php:24, source/core/user.php:22, source/plugin/redirection.php:27
725
- msgid "URL"
726
- msgstr ""
727
-
728
- #: source/core/comment.php:25
729
- msgid "Comment"
730
- msgstr ""
731
-
732
- #: source/core/comment.php:54
733
- msgid "Include spam comments"
734
- msgstr ""
735
-
736
- #: source/core/meta.php:20, source/core/options.php:20
737
- msgid "Value"
738
- msgstr ""
739
-
740
- #: source/core/post.php:45
741
- msgid "Search GUID"
742
- msgstr ""
743
-
744
- #: source/core/post.php:80
745
- msgid "Content"
746
- msgstr ""
747
-
748
- #: source/core/post.php:81
749
- msgid "Excerpt"
750
- msgstr ""
751
-
752
- #: source/core/post.php:82, source/plugin/redirection.php:28
753
- msgid "Title"
754
- msgstr ""
755
-
756
- #: source/core/post.php:83
757
- msgid "Slug"
758
- msgstr ""
759
-
760
- #: source/core/post.php:84
761
- msgid "GUID"
762
- msgstr ""
763
-
764
- #: source/core/user.php:21
765
- msgid "Nicename"
766
- msgstr ""
767
-
768
- #: source/core/user.php:23
769
- msgid "Display name"
770
- msgstr ""
771
-
772
- #: source/plugin/redirection.php:77
773
- msgid "Search your redirects"
774
- msgstr ""
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
 
17
+ #: search-regex-admin.php:45
18
  msgid "Settings"
19
  msgstr ""
20
 
21
+ #: search-regex-admin.php:212, search-regex-strings.php:131
22
  msgid "{{link}}Source Flags{{/link}} - additional options for the selected source. For example, include post {{guid}}GUID{{/guid}} in the search."
23
  msgstr ""
24
 
25
  #. translators: URL
26
+ #: search-regex-admin.php:220
27
  msgid "You can find full documentation about using Search Regex on the <a href=\"%s\" target=\"_blank\">searchregex.com</a> support site."
28
  msgstr ""
29
 
30
+ #: search-regex-admin.php:221, search-regex-strings.php:127
31
  msgid "The following concepts are used by Search Regex:"
32
  msgstr ""
33
 
34
+ #: search-regex-admin.php:223, search-regex-strings.php:128
35
  msgid "{{link}}Search Flags{{/link}} - additional qualifiers for your search, to enable case insensitivity, and to enable regular expression support."
36
  msgstr ""
37
 
38
+ #: search-regex-admin.php:224, search-regex-strings.php:129
39
  msgid "{{link}}Regular expression{{/link}} - a way of defining a pattern for text matching. Provides more advanced matches."
40
  msgstr ""
41
 
42
+ #: search-regex-admin.php:225, search-regex-strings.php:130
43
  msgid "{{link}}Source{{/link}} - the source of data you wish to search. For example, posts, pages, or comments."
44
  msgstr ""
45
 
46
+ #: search-regex-admin.php:229
47
  msgid "Search Regex Support"
48
  msgstr ""
49
 
50
  #. translators: 1: Expected WordPress version, 2: Actual WordPress version
51
+ #: search-regex-admin.php:325
52
  msgid "Search Regex requires WordPress v%1$1s, you are using v%2$2s - please update your WordPress"
53
  msgstr ""
54
 
55
+ #: search-regex-admin.php:328
56
  msgid "Unable to load Search Regex"
57
  msgstr ""
58
 
59
+ #: search-regex-admin.php:343
60
  msgid "Unable to load Search Regex ☹️"
61
  msgstr ""
62
 
63
+ #: search-regex-admin.php:344
64
  msgid "This may be caused by another plugin - look at your browser's error console for more details."
65
  msgstr ""
66
 
67
+ #: search-regex-admin.php:345, search-regex-strings.php:90
68
  msgid "If you are using a page caching plugin or service (CloudFlare, OVH, etc) then you can also try clearing that cache."
69
  msgstr ""
70
 
71
+ #: search-regex-admin.php:346
72
  msgid "Also check if your browser is able to load <code>search-regex.js</code>:"
73
  msgstr ""
74
 
75
+ #: search-regex-admin.php:348
76
  msgid "Please note that Search Regex requires the WordPress REST API to be enabled. If you have disabled this then you won't be able to use Search Regex"
77
  msgstr ""
78
 
79
+ #: search-regex-admin.php:349
80
  msgid "Please see the <a href=\"https://searchregex.com/support/problems/\">list of common problems</a>."
81
  msgstr ""
82
 
83
+ #: search-regex-admin.php:350
84
  msgid "If you think Search Regex is at fault then create an issue."
85
  msgstr ""
86
 
87
+ #: search-regex-admin.php:351
88
  msgid "<code>SearchRegexi10n</code> is not defined. This usually means another plugin is blocking Search Regex from loading. Please disable all plugins and try again."
89
  msgstr ""
90
 
91
+ #: search-regex-admin.php:354
92
  msgid "Create Issue"
93
  msgstr ""
94
 
95
+ #: search-regex-admin.php:373
96
  msgid "Loading, please wait..."
97
  msgstr ""
98
 
99
+ #: search-regex-admin.php:377
100
  msgid "Please enable JavaScript"
101
  msgstr ""
102
 
164
  msgid "Create An Issue"
165
  msgstr ""
166
 
167
+ #: search-regex-strings.php:24
168
  msgid "Email"
169
  msgstr ""
170
 
225
  msgstr ""
226
 
227
  #: search-regex-strings.php:40
228
+ msgid "Replacement for this match"
229
  msgstr ""
230
 
231
+ #: search-regex-strings.php:41
232
+ msgid "Replace single phrase."
233
  msgstr ""
234
 
235
+ #: search-regex-strings.php:42
236
+ msgid "Search & Replace"
237
  msgstr ""
238
 
239
+ #: search-regex-strings.php:43, search-regex-strings.php:82
240
+ msgid "Options"
241
  msgstr ""
242
 
243
+ #: search-regex-strings.php:44, search-regex-strings.php:83
244
+ msgid "Support"
245
  msgstr ""
246
 
247
  #: search-regex-strings.php:45
528
  msgid "If you want to submit information that you don't want in a public repository then send it directly via {{email}}email{{/email}} - include as much information as you can!"
529
  msgstr ""
530
 
531
+ #: search-regex-strings.php:124
532
  msgid "Redirection"
533
  msgstr ""
534
 
645
  msgstr ""
646
 
647
  #. translators: 1: server PHP version. 2: required PHP version.
648
+ #: search-regex.php:39
649
  msgid "Disabled! Detected PHP %1$s, need PHP %2$s+"
650
  msgstr ""
651
 
705
  msgid "Search all WordPress options."
706
  msgstr ""
707
 
708
+ #: models/source-manager.php:117
709
  msgid "Standard Types"
710
  msgstr ""
711
 
712
+ #: models/source-manager.php:124
713
  msgid "Specific Post Types"
714
  msgstr ""
715
 
716
+ #: models/source-manager.php:131
717
  msgid "Plugins"
718
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/replace.php CHANGED
@@ -90,7 +90,6 @@ class Replace {
90
  if ( is_int( $replaced ) && $replaced > 0 ) {
91
  $rows_replaced++;
92
  $phrases_replaced += $replaced;
93
- error_log($replaced);
94
  }
95
  }
96
 
90
  if ( is_int( $replaced ) && $replaced > 0 ) {
91
  $rows_replaced++;
92
  $phrases_replaced += $replaced;
 
93
  }
94
  }
95
 
models/search.php CHANGED
@@ -118,13 +118,14 @@ class Search {
118
  *
119
  * @param Replace $replacer The replacer which performs any replacements.
120
  * @param int $offset Current page offset.
121
- * @param int $limit Per page limit.
 
122
  * @return Array|\WP_Error Array containing `totals`, `progress`, and `results`
123
  */
124
- public function get_results( Replace $replacer, $offset, $limit = 5 ) {
125
  // TODO return totals of each source
126
  $totals = $this->get_totals( $offset );
127
- $rows = $this->get_data( $offset, $limit );
128
 
129
  if ( $totals instanceof \WP_Error ) {
130
  return $totals;
@@ -135,12 +136,21 @@ class Search {
135
  }
136
 
137
  $results = $this->rows_to_results( (array) $rows, $replacer );
 
138
  if ( $results instanceof \WP_Error ) {
139
  return $results;
140
  }
141
 
142
- $previous = max( 0, $offset - $limit );
143
- $next = min( $offset + $limit, $totals['rows'] ); // TODO this isn't going to end in simple search
 
 
 
 
 
 
 
 
144
 
145
  if ( $next === $offset ) {
146
  $next = false;
118
  *
119
  * @param Replace $replacer The replacer which performs any replacements.
120
  * @param int $offset Current page offset.
121
+ * @param int $per_page Per page limit.
122
+ * @param int $limit Max number of results.
123
  * @return Array|\WP_Error Array containing `totals`, `progress`, and `results`
124
  */
125
+ public function get_results( Replace $replacer, $offset, $per_page, $limit = 0 ) {
126
  // TODO return totals of each source
127
  $totals = $this->get_totals( $offset );
128
+ $rows = $this->get_data( $offset, $per_page );
129
 
130
  if ( $totals instanceof \WP_Error ) {
131
  return $totals;
136
  }
137
 
138
  $results = $this->rows_to_results( (array) $rows, $replacer );
139
+
140
  if ( $results instanceof \WP_Error ) {
141
  return $results;
142
  }
143
 
144
+ $previous = max( 0, $offset - $per_page );
145
+
146
+ // We always go in $per_page groups, but we need to limit if we only need a few more to fill a result set
147
+ if ( $limit > 0 && $limit <= count( $results ) ) {
148
+ $next = min( $offset + $limit, $totals['rows'] );
149
+ } else {
150
+ $next = min( $offset + $per_page, $totals['rows'] ); // TODO this isn't going to end in simple search
151
+ }
152
+
153
+ $results = array_slice( $results, 0, $limit === 0 ? $per_page : $limit );
154
 
155
  if ( $next === $offset ) {
156
  $next = false;
readme.txt CHANGED
@@ -19,6 +19,8 @@ You can use this to do things like:
19
  - Update URLs in links and images
20
  - Perform site-wide changes
21
 
 
 
22
  == What can I search? ==
23
 
24
  You can search:
@@ -31,6 +33,14 @@ You can search:
31
  - WordPress options
32
  - Supported plugins (such as Redirection)
33
 
 
 
 
 
 
 
 
 
34
  == Support ==
35
 
36
  Please submit bugs, patches, and feature requests to:
@@ -63,10 +73,29 @@ You can find full details of installing a plugin on the [plugin installation pag
63
 
64
  Full documentation can be found on the [Search Regex](http://searchregex.com/) site.
65
 
 
 
 
 
 
66
  == Changelog ==
67
 
68
- = 2.0 - 9th May 2020 =
69
- - Release version 2.0
 
 
 
70
 
71
- = 1.4.16 - 21st November 2014 =
72
- - Old version
 
 
 
 
 
 
 
 
 
 
 
19
  - Update URLs in links and images
20
  - Perform site-wide changes
21
 
22
+ Search Regex handles small and large sites.
23
+
24
  == What can I search? ==
25
 
26
  You can search:
33
  - WordPress options
34
  - Supported plugins (such as Redirection)
35
 
36
+ Full regular expression support is provided, and you can capture data and use it in the replacement.
37
+
38
+ == Replace Matched Data ==
39
+
40
+ Once a match has been made you can replace it with a popup replacer. You can also replace all matches in a database row, and you can replace all matches across your database.
41
+
42
+ Additionally, if you need to make your change with context of the surrounding content you can use the inline editor to edit the full context.
43
+
44
  == Support ==
45
 
46
  Please submit bugs, patches, and feature requests to:
73
 
74
  Full documentation can be found on the [Search Regex](http://searchregex.com/) site.
75
 
76
+ == Upgrade Notice ==
77
+
78
+ = 2.0 =
79
+ * Entirely new rewrite of the plugin. Requires minimum PHP 5.6.
80
+
81
  == Changelog ==
82
 
83
+ = 2.0.1 - 11th May 2010 =
84
+ - Comment title now takes you to comment page
85
+ - Improve regex performance when data has large gaps
86
+ - Use correct contact address
87
+ - Support \1 as well as $1 in regular expression captures
88
 
89
+ = 2.0 - 9th May 2020 =
90
+ - Release version 2.0, a ground-up rewrite
91
+ - Handles any size of database without memory issues or server timeouts
92
+ - New and responsive UI with inline replacing of individual phrases
93
+ - Match replacements are updated in real-time, including regular expressions
94
+ - Edit an entire database row with the inline editor
95
+ - Supports custom post types
96
+ - Groups columns from one database together
97
+ - Search in third-party plugins (currently Redirection)
98
+ - Improved regular expressions without needing delimiters
99
+
100
+ = 1.4.16 - 21st Nov 2014 and before to 2007 =
101
+ - Old versions
search-regex-strings.php CHANGED
@@ -37,11 +37,11 @@ __( "{{link}}Caching software{{/link}}, in particular Cloudflare, can cache the
37
  __( "{{link}}Please temporarily disable other plugins!{{/link}} This fixes so many problems.", "search-regex" ), // client/component/error/index.js:173
38
  __( "If you are using WordPress 5.2 or newer then look at your {{link}}Site Health{{/link}} and resolve any issues.", "search-regex" ), // client/component/error/index.js:180
39
  __( "That didn't help", "search-regex" ), // client/component/error/index.js:188
 
 
40
  __( "Search & Replace", "search-regex" ), // client/component/menu/index.js:18
41
  __( "Options", "search-regex" ), // client/component/menu/index.js:22
42
  __( "Support", "search-regex" ), // client/component/menu/index.js:26
43
- __( "Replacement for this match", "search-regex" ), // client/component/highlight-matches/replacement.js:52
44
- __( "Replace single phrase.", "search-regex" ), // client/component/highlight-matches/replacement.js:53
45
  __( "View notice", "search-regex" ), // client/component/notice/index.js:76
46
  __( "Single", "search-regex" ), // client/component/replace/index.js:19
47
  __( "Multi", "search-regex" ), // client/component/replace/index.js:23
@@ -152,11 +152,11 @@ __( "Page %(current)s of %(total)s", "search-regex" ), // client/page/search-rep
152
  __( "Next page", "search-regex" ), // client/page/search-replace/pagination/simple-pagination.js:49
153
  __( "Last page", "search-regex" ), // client/page/search-replace/pagination/simple-pagination.js:50
154
  __( "No more matching results found.", "search-regex" ), // client/page/search-replace/search-results/empty-results.js:11
155
- __( "Maximum number of page requests has been exceeded and the search stopped. Try to be more specific with your search term.", "search-regex" ), // client/page/search-replace/search-results/index.js:36
156
- __( "Source", "search-regex" ), // client/page/search-replace/search-results/index.js:56
157
- __( "Row ID", "search-regex" ), // client/page/search-replace/search-results/index.js:57
158
- __( "Matches", "search-regex" ), // client/page/search-replace/search-results/index.js:58
159
- __( "Matched Phrases", "search-regex" ), // client/page/search-replace/search-results/index.js:59
160
- __( "Actions", "search-regex" ), // client/page/search-replace/search-results/index.js:60
161
  );
162
  /* THIS IS THE END OF THE GENERATED FILE */
37
  __( "{{link}}Please temporarily disable other plugins!{{/link}} This fixes so many problems.", "search-regex" ), // client/component/error/index.js:173
38
  __( "If you are using WordPress 5.2 or newer then look at your {{link}}Site Health{{/link}} and resolve any issues.", "search-regex" ), // client/component/error/index.js:180
39
  __( "That didn't help", "search-regex" ), // client/component/error/index.js:188
40
+ __( "Replacement for this match", "search-regex" ), // client/component/highlight-matches/replacement.js:52
41
+ __( "Replace single phrase.", "search-regex" ), // client/component/highlight-matches/replacement.js:53
42
  __( "Search & Replace", "search-regex" ), // client/component/menu/index.js:18
43
  __( "Options", "search-regex" ), // client/component/menu/index.js:22
44
  __( "Support", "search-regex" ), // client/component/menu/index.js:26
 
 
45
  __( "View notice", "search-regex" ), // client/component/notice/index.js:76
46
  __( "Single", "search-regex" ), // client/component/replace/index.js:19
47
  __( "Multi", "search-regex" ), // client/component/replace/index.js:23
152
  __( "Next page", "search-regex" ), // client/page/search-replace/pagination/simple-pagination.js:49
153
  __( "Last page", "search-regex" ), // client/page/search-replace/pagination/simple-pagination.js:50
154
  __( "No more matching results found.", "search-regex" ), // client/page/search-replace/search-results/empty-results.js:11
155
+ __( "Maximum number of page requests has been exceeded and the search stopped. Try to be more specific with your search term.", "search-regex" ), // client/page/search-replace/search-results/index.js:37
156
+ __( "Source", "search-regex" ), // client/page/search-replace/search-results/index.js:61
157
+ __( "Row ID", "search-regex" ), // client/page/search-replace/search-results/index.js:62
158
+ __( "Matches", "search-regex" ), // client/page/search-replace/search-results/index.js:63
159
+ __( "Matched Phrases", "search-regex" ), // client/page/search-replace/search-results/index.js:64
160
+ __( "Actions", "search-regex" ), // client/page/search-replace/search-results/index.js:65
161
  );
162
  /* THIS IS THE END OF THE GENERATED FILE */
search-regex-version.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
 
3
- define( 'SEARCHREGEX_VERSION', '2.0' );
4
- define( 'SEARCHREGEX_BUILD', '32f788d37fc2989dee637ada18b75ef4' );
5
  define( 'SEARCHREGEX_MIN_WP', '4.6' );
1
  <?php
2
 
3
+ define( 'SEARCHREGEX_VERSION', '2.0.1' );
4
+ define( 'SEARCHREGEX_BUILD', '988f594fdf195fa7746f1dc82eb2f821' );
5
  define( 'SEARCHREGEX_MIN_WP', '4.6' );
search-regex.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Search Regex v2.0 */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){var r=n(25),o=new r;e.exports={numberFormat:o.numberFormat.bind(o),translate:o.translate.bind(o),configure:o.configure.bind(o),setLocale:o.setLocale.bind(o),getLocale:o.getLocale.bind(o),getLocaleSlug:o.getLocaleSlug.bind(o),addTranslations:o.addTranslations.bind(o),reRenderTranslations:o.reRenderTranslations.bind(o),registerComponentUpdateHook:o.registerComponentUpdateHook.bind(o),registerTranslateHook:o.registerTranslateHook.bind(o),state:o.state,stateObserver:o.stateObserver,on:o.stateObserver.on.bind(o.stateObserver),off:o.stateObserver.removeListener.bind(o.stateObserver),emit:o.stateObserver.emit.bind(o.stateObserver),$this:o,I18N:r}},function(e,t,n){e.exports=n(35)()},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function l(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],o=0;o<e.length;o++){var a=e[o],u=t.base?a[0]+t.base:a[0],c=n[u]||0,s="".concat(u," ").concat(c);n[u]=c+1;var f=l(s),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==f?(i[f].references++,i[f].updater(p)):i.push({identifier:s,updater:g(p,t),references:1}),r.push(s)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function p(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,o=n.media,a=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,m=0;function g(e,t){var n,r,o;if(t.singleton){var a=m++;n=h||(h=c(t)),r=p.bind(null,n,a,!1),o=p.bind(null,n,a,!0)}else n=c(t),r=d.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=l(n[r]);i[o].references--}for(var a=u(e,t),c=0;c<n.length;c++){var s=l(n[c]);0===i[s].references&&(i[s].updater(),i.splice(s,1))}n=a}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(i=r,l=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(u," */")),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([o]).join("\n")}var i,l,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
@@ -52,4 +52,4 @@ function(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,a
52
  *
53
  * This source code is licensed under the MIT license found in the
54
  * LICENSE file in the root directory of this source tree.
55
- */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case i:case u:case l:case h:return e;default:switch(e=e&&e.$$typeof){case s:case d:case y:case g:case c:return e;default:return t}}case a:return t}}}function _(e){return x(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=s,t.ContextProvider=c,t.Element=o,t.ForwardRef=d,t.Fragment=i,t.Lazy=y,t.Memo=g,t.Portal=a,t.Profiler=u,t.StrictMode=l,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||x(e)===f},t.isConcurrentMode=_,t.isContextConsumer=function(e){return x(e)===s},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===d},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===a},t.isProfiler=function(e){return x(e)===u},t.isStrictMode=function(e){return x(e)===l},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===u||e===l||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===s||e.$$typeof===d||e.$$typeof===v||e.$$typeof===w||e.$$typeof===E||e.$$typeof===b)},t.typeOf=x},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(9),o=n(16),a=Object.prototype.hasOwnProperty,i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,l(t)?t:[t])},s=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,n,o,a,i,u,s,f,d,h,m,g,y){var b,v=t;if("function"==typeof s?v=s(n,v):v instanceof Date?v=h(v):"comma"===o&&l(v)&&(v=v.join(",")),null===v){if(a)return u&&!g?u(n,p.encoder,y,"key"):n;v=""}if("string"==typeof(b=v)||"number"==typeof b||"boolean"==typeof b||"symbol"==typeof b||"bigint"==typeof b||r.isBuffer(v))return u?[m(g?n:u(n,p.encoder,y,"key"))+"="+m(u(v,p.encoder,y,"value"))]:[m(n)+"="+m(String(v))];var w,E=[];if(void 0===v)return E;if(l(s))w=s;else{var x=Object.keys(v);w=f?x.sort(f):x}for(var _=0;_<w.length;++_){var S=w[_];i&&null===v[S]||(l(v)?c(E,e(v[S],"function"==typeof o?o(n,S):n,o,a,i,u,s,f,d,h,m,g,y)):c(E,e(v[S],n+(d?"."+S:"["+S+"]"),o,a,i,u,s,f,d,h,m,g,y)))}return E};e.exports=function(e,t){var n,r=e,u=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=p.filter;return("function"==typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof u.filter?r=(0,u.filter)("",r):l(u.filter)&&(n=u.filter);var s,f=[];if("object"!=typeof r||null===r)return"";s=t&&t.arrayFormat in i?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=i[s];n||(n=Object.keys(r)),u.sort&&n.sort(u.sort);for(var m=0;m<n.length;++m){var g=n[m];u.skipNulls&&null===r[g]||c(f,d(r[g],g,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.formatter,u.encodeValuesOnly,u.charset))}var y=f.join(u.delimiter),b=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),y.length>0?b+y:""}},function(e,t,n){"use strict";var r=n(9),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t){if(a(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},s=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,s=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(l=i.exec(a))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(l[1])}return l&&s.push("["+a.slice(l.index)+"]"),function(e,t,n,r){for(var o=r?t:u(t,n),a=e.length-1;a>=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&l!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(i=[])[s]=o:i[c]=o:i={0:o}}o=i}return o}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var f="string"==typeof e?function(e,t){var n,s={},f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=f.split(t.delimiter,p),h=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?m="utf-8":"utf8=%26%2310003%3B"===d[n]&&(m="iso-8859-1"),h=n,n=d.length);for(n=0;n<d.length;++n)if(n!==h){var g,y,b=d[n],v=b.indexOf("]="),w=-1===v?b.indexOf("="):v+1;-1===w?(g=t.decoder(b,i.decoder,m,"key"),y=t.strictNullHandling?null:""):(g=t.decoder(b.slice(0,w),i.decoder,m,"key"),y=c(u(b.slice(w+1),t),(function(e){return t.decoder(e,i.decoder,m,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===m&&(y=l(y)),b.indexOf("[]=")>-1&&(y=a(y)?[y]:y),o.call(s,g)?s[g]=r.combine(s[g],y):s[g]=y}return s}(e,n):e,p=n.plainObjects?Object.create(null):{},d=Object.keys(f),h=0;h<d.length;++h){var m=d[h],g=s(m,f[m],n,"string"==typeof e);p=r.merge(p,g,n)}return r.compact(p)}},function(e,t,n){var r=n(3),o=n(43);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".redirection .form-table th a{color:#444}.redirection .form-table td ul{padding-left:20px;list-style-type:disc;margin:0;margin-top:15px}.redirection .form-table td li{margin-bottom:0;line-height:1.6}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(45);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'@-webkit-keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}@keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}.placeholder-container{width:100%;height:100px;position:relative}.placeholder-loading{content:"";position:absolute;top:16px;right:8px;bottom:16px;left:8px;padding-left:8px;padding-top:8px;background-color:#bbb;-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.placeholder-inline{width:100%;height:50px;position:relative}.placeholder-inline .placeholder-loading{top:0;right:0;left:0;bottom:0}.loading-small{width:25px;height:25px}input.current-page{width:60px}.loader-wrapper{position:relative}.loader-textarea{height:100px}.wp-list-table .is-placeholder td{position:relative;height:50px}.wp-list-table .item-loading{opacity:0.3}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(47);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.donation .donation-amount{float:left;margin-top:10px}.donation .donation-amount span{font-size:28px;margin-top:4px;vertical-align:bottom}.donation .donation-amount img{width:24px !important;margin-bottom:-5px !important}.donation .donation-amount:after{content:"";display:block;clear:both}.donation input[type="number"]{width:60px;margin-left:10px}.donation td,.donation th{padding-bottom:0;margin-bottom:0}.donation input[type="submit"]{margin-left:10px}.newsletter h3{margin-top:30px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(49);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".github{margin-top:8px}.github a{text-decoration:none}.github img{padding-right:10px;margin-bottom:-10px}.searchregex-help ul{list-style:disc;margin-left:20px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(51);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.redirect-popover__toggle{display:inline-block;flex:none !important;cursor:pointer}.redirect-popover__content{box-shadow:0 3px 30px rgba(51,51,51,0.1);border:1px solid #ddd;background:white;min-width:150px;max-height:400px;position:absolute;z-index:10001;height:auto;overflow-y:auto}.redirect-popover__arrows{position:absolute;width:100%}.redirect-popover__arrows::after,.redirect-popover__arrows::before{content:"";box-shadow:0 3px 30px rgba(51,51,51,0.1);position:absolute;height:0;width:0;line-height:0;margin-left:10px}.redirect-popover__arrows::before{border:8px solid #ddd;border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;top:-8px}.redirect-popover__arrows::after{border:8px solid white;border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;top:-6px;z-index:10003}.redirect-popover__arrows.redirect-popover__arrows__right::after,.redirect-popover__arrows.redirect-popover__arrows__right::before{right:0;margin-right:10px}.redirect-popover__arrows.redirect-popover__arrows__centre::after,.redirect-popover__arrows.redirect-popover__arrows__centre::before{left:calc(50% - 16px)}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(53);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.redirect-badge{display:inline-block;padding:0 5px 0 6px;font-size:12px;background-color:#ddd;border-radius:3px;font-feature-settings:"c2sc";font-variant:small-caps;white-space:nowrap;color:black}.redirect-badge>div{display:flex;align-items:center}.redirect-badge.redirect-badge__click{cursor:pointer;border:1px solid transparent}.redirect-badge.redirect-badge__click:hover{border:1px solid black}.redirect-badge span{background-color:transparent;border:none;width:15px;text-align:center;padding:0;margin-left:4px;font-size:20px;vertical-align:middle;margin-top:-5px;margin-right:-3px}.redirect-badge span:hover{color:white;background-color:#333}.redirect-badge:not(:last-child){margin-right:5px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(55);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.redirect-multioption .redirect-popover__content{padding:10px 10px;white-space:nowrap;box-sizing:border-box}.redirect-multioption .redirect-popover__content h4{margin-top:5px}.redirect-multioption .redirect-popover__content h5{margin-top:3px;margin-bottom:6px;text-transform:uppercase;color:#999}.redirect-multioption .redirect-popover__content p{margin:2px 0 0.8em !important}.redirect-multioption .redirect-popover__content p:first-child{margin-top:0}.redirect-multioption .redirect-popover__content p:last-child{margin-bottom:0 !important}.redirect-multioption .redirect-popover__content label{display:inline-block;width:100%}.button.redirect-multioption__button,.redirect-multioption__button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;box-shadow:none;height:30px;max-width:500px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#fff;border-color:#7e8993;color:#32373c}.button.redirect-multioption__button svg,.redirect-multioption__button svg{margin-left:5px;margin-right:-4px;display:inline-block;fill:#888;border-left:1px solid #ddd;padding-left:5px}.button.redirect-multioption__button h5,.redirect-multioption__button h5{padding:0;margin:0;margin-right:10px;font-size:13px;font-weight:normal}.button.redirect-multioption__button .redirect-badge,.redirect-multioption__button .redirect-badge{line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions .button.redirect-multioption__button{height:28px}.actions .redirect-multioption__button .redirect-badge{margin-top:-1px}.redirect-multioption__button.redirect-multioption__button_enabled{background-color:#fff}.redirect-multioption__button.redirect-multioption__button_enabled svg{transform:rotate(180deg);border-right:1px solid #ddd;border-left:1px solid transparent;padding-right:4px;padding-left:0}.redirect-multioption__group{margin-bottom:20px}.redirect-multioption__group:last-child{margin-bottom:10px}.branch-4-9 .redirect-dropdownbutton .button,.branch-4-9 .button.redirect-multioption__button,.branch-5-0 .redirect-dropdownbutton .button,.branch-5-0 .button.redirect-multioption__button,.branch-5-1 .redirect-dropdownbutton .button,.branch-5-1 .button.redirect-multioption__button,.branch-5-2 .redirect-dropdownbutton .button,.branch-5-2 .button.redirect-multioption__button{border-color:#ddd}.branch-4-9 input[type="search"],.branch-5-0 input[type="search"],.branch-5-1 input[type="search"],.branch-5-2 input[type="search"]{height:30px}.branch-4-9 .redirect-multioption__button .redirect-badge,.branch-4-9 .redirect-multioption,.branch-4-9 .actions .redirect-multioption__button .redirect-badge,.branch-5-0 .redirect-multioption__button .redirect-badge,.branch-5-0 .redirect-multioption,.branch-5-0 .actions .redirect-multioption__button .redirect-badge,.branch-5-1 .redirect-multioption__button .redirect-badge,.branch-5-1 .redirect-multioption,.branch-5-1 .actions .redirect-multioption__button .redirect-badge,.branch-5-2 .redirect-multioption__button .redirect-badge,.branch-5-2 .redirect-multioption,.branch-5-2 .actions .redirect-multioption__button .redirect-badge{margin-top:1px !important}.actions .redirect-popover__content{margin-top:-1px}.redirect-multioption{padding:0 10px}.redirect-multioption p{white-space:nowrap}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(57);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.searchregex-replace__input{display:flex;width:100%;align-items:flex-start}.searchregex-replace__input input[type="text"]{width:100%}.searchregex-replace__input select{margin-left:10px}.searchregex-replace__input textarea{width:100%;margin-left:1px;margin-right:1px;padding:4px 8px}.redirect-popover__content .searchregex-replace__action{display:flex;justify-content:space-between;align-items:center;margin-top:10px;margin-left:10px}.redirect-popover__content .searchregex-replace__action p{color:#999;margin:0}.searchregex-replace__modal{padding:13px 10px;width:450px}.searchregex-replace__modal input[type="text"]{width:75%}.searchregex-replace__modal select{width:25%}.searchregex-replace__modal p.searchregex-replace__actions{text-align:right;margin-bottom:0}.searchregex-replace__modal p.searchregex-replace__actions input{margin-left:10px}.searchregex-replace__modal textarea{width:75%}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(59);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".spinner-container{display:inline-block;position:relative}.css-spinner{position:absolute;left:10px;top:-25px;display:block;width:40px;height:40px;background-color:#333;border-radius:100%;-webkit-animation:sk-scaleout 1.0s infinite ease-in-out;animation:sk-scaleout 1.0s infinite ease-in-out}@-webkit-keyframes sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sk-scaleout{0%{transform:scale(0)}100%{transform:scale(1);opacity:0}}.spinner-small .css-spinner{width:20px;height:20px;top:-15px;left:5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(61);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__replaced,.searchregex-result__highlight{background-color:yellow;font-weight:bold;padding:1px;cursor:pointer}.searchregex-result__replaced{background-color:orange;display:inline}.searchregex-result__deleted{background-color:red;color:white}.searchregex-match{display:flex;align-items:flex-start;justify-content:flex-start;line-height:2}.searchregex-match .searchregex-match__column{margin-right:10px;background-color:#ddd;padding:0 5px;border-radius:3px;margin-bottom:5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(63);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,"body.redirection-modal_shown{overflow:hidden}.redirection-modal_wrapper{width:100%}.redirection-modal_backdrop{width:100%;height:100%;position:fixed;top:0;left:0;z-index:10000;background-color:rgba(255,255,255,0.4)}.redirection-modal_main{position:fixed;top:0;left:0;height:100%;width:100%;z-index:10000;align-items:center;flex-grow:1;display:flex;flex-direction:row;justify-content:center}.redirection-modal_main .redirect-click-outside{min-height:100px;max-width:90%;max-height:90%;min-width:60%}.redirection-modal_main .redirection-modal_content{position:relative;background:#fff;opacity:1;border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,0.2);transition:height 0.05s ease;min-height:100px;max-width:90%;max-height:90%;min-width:60%;margin:0 auto}.redirection-modal_main .redirection-modal_content h1{margin:0 !important;color:#333 !important}.redirection-modal_main .redirection-modal_close button{position:absolute;top:0;right:0;padding-top:10px;padding-right:10px;border:none;background-color:#fff;border-radius:2px;cursor:pointer;z-index:10001}.redirection-modal_wrapper.redirection-modal_wrapper-padless .redirection-modal_content{padding:20px}.redirection-modal_wrapper-padding .redirection-modal_content{padding:10px}.redirection-modal_error h2{text-align:center}.redirection-modal_loading{display:flex;height:100px}.redirection-modal_loading>*{justify-content:center;align-self:center;margin-left:calc(50% - 30px);margin-top:40px}@media screen and (max-width: 782px){.redirection-modal_main .redirection-modal_content{width:80%;margin-right:10%}}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(65);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-editor{padding:5px}.searchregex-editor textarea{width:100%;min-height:150px;margin-bottom:10px}.searchregex-editor h2{margin-top:0}.searchregex-editor .searchregex-editor__actions{display:flex;justify-content:space-between}.searchregex-editor button.button-primary{margin-right:10px}.searchregex-editor .css-spinner{margin-left:-50px;height:24px;width:24px;margin-top:12px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(67);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__more{font-style:italic}.searchregex-result__updating{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.searchregex-result__updating .css-spinner{width:24px;height:24px;margin-top:10px}.searchregex-result h2{margin:0;padding:0;margin-bottom:10px;font-weight:normal;font-size:1.2em}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(69);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".tablenav-pages{display:flex;justify-content:space-between;align-items:center;padding:10px}.pagination-links{display:flex;align-items:center}.pagination-links .button{margin:0 2px}.pagination-links .paging-input{margin:0 4px}.pagination-links .tablenav-paging-text{margin:0 5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(71);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__table{width:100px}.searchregex-result__row{width:50px}.searchregex-result__matches{width:70px}.searchregex-result__column{width:100px}.searchregex-result__action{width:200px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(73);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-replaceall{margin-top:50px}.searchregex-replaceall__progress{position:relative}.searchregex-replaceall__status{position:absolute;top:0;left:0;width:100%;text-align:center;font-size:18px;font-weight:bold;margin-top:20px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(75);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.searchregex-loading{opacity:0.8;-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.searchregex-search table{table-layout:fixed;width:100%}.searchregex-search th{text-align:left;width:80px;vertical-align:top;padding-top:5px}.searchregex-search td{width:100%}.searchregex-search .inline-error{margin-top:20px}.searchregex-search__search td{display:flex;justify-content:flex-start;align-items:flex-start}.searchregex-search__search input[type="text"]{width:100%}.searchregex-search__search .redirect-popover__toggle,.searchregex-search__search select{margin-left:10px}.searchregex-search__replace,.searchregex-search__search,.searchregex-search__source{width:100%;margin-bottom:10px}.searchregex-search__replace>label,.searchregex-search__search>label,.searchregex-search__source>label{font-weight:bold;width:60px}.searchregex-search__replace .redirect-popover__toggle button,.searchregex-search__search .redirect-popover__toggle button,.searchregex-search__source .redirect-popover__toggle button{min-width:150px;margin-right:2px}.searchregex-search__replace select,.searchregex-search__search select,.searchregex-search__source select{min-width:150px;margin-right:0}.searchregex-search__source select{margin-right:10px}.searchregex-search__source td{display:flex;align-items:center}.searchregex-search__source__description{margin-left:5px}.searchregex-search__action{margin-top:10px}.searchregex-search__action input.button{margin-right:10px}.searchregex-search__action .css-spinner{width:28px;height:28px;margin-top:10px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(77);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".api-result-retry{float:right;clear:both}.api-result-log{background-color:#ddd;padding:5px 10px;color:#111;margin:10px 0;position:relative}.api-result-log .api-result-method_fail{color:white;background-color:#ff3860;padding:3px 5px;margin-right:5px}.api-result-log .api-result-method_pass{color:white;background-color:#4ab866;padding:3px 5px;width:150px;margin-right:5px}.api-result-log .dashicons{vertical-align:middle;width:26px;height:26px;font-size:26px;padding:0}.api-result-log .dashicons-no{color:#ff3860}.api-result-log .dashicons-yes{color:#4ab866}.api-result-log pre{background-color:#ccc;padding:10px 15px}.api-result-log pre{font-family:'Courier New', Courier, monospace}.api-result-log code{background-color:transparent}.api-result-log h4{margin:0;margin-top:5px;font-size:14px}.api-result-log_details{display:flex}.api-result-log_details>div{width:95%}.api-result-log_details a{color:#111}.api-result-log_details a:hover{font-weight:bold}.api-result-log_details pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.api-result-hide{position:absolute;bottom:25px;right:5%}.api-result-select{position:absolute;right:10px;top:15px}.api-result-select span{background-color:#777;color:white;padding:5px 10px;margin-left:10px}.api-result-header{display:flex;align-items:center}.api-result-header .api-result-progress{margin:0 15px}.api-result-header .css-spinner{width:18px;height:18px;top:-14px}.api-result-header .api-result-status{text-align:center;top:0;left:0;padding:5px 10px;background-color:#ddd;font-weight:bold}.api-result-header .api-result-status_good{background-color:#4ab866;color:white}.api-result-header .api-result-status_problem{background-color:#f0b849}.api-result-header .api-result-status_failed{background-color:#ff3860;color:white}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(79);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".red-error{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 15px 2px;padding:1px 12px;border-left-color:#dc3232;margin:5px 0 15px;margin-top:2em}.red-error .closer{float:right;padding-top:5px;font-size:18px;cursor:pointer;color:#333}.red-error textarea{font-family:courier,Monaco,monospace;font-size:12px;background-color:#eee;width:100%}.red-error span code{background-color:transparent}.red-error h3{font-size:1.2em}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(81);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".redirection-notice{position:fixed;bottom:25px;right:0;font-weight:bold;box-shadow:3px 3px 3px rgba(0,0,0,0.2);border-top:1px solid #eee;cursor:pointer;transition:width 1s ease-in-out}.redirection-notice p{padding-right:20px}.redirection-notice .closer{position:absolute;right:5px;top:10px;font-size:16px;opacity:0.8}.redirection-notice.notice-shrunk{width:20px}.redirection-notice.notice-shrunk p{font-size:16px}.redirection-notice.notice-shrunk .closer{display:none}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(83);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.subsubsub-container::before,.subsubsub-container::after{content:"";display:table}.subsubsub-container::after{clear:both}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(85);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.wp-core-ui .button-delete{box-shadow:none;text-shadow:none;background-color:#ff3860;border-color:transparent;color:#fff}.wp-core-ui .button-delete:hover{background-color:#ff3860;border-color:transparent;box-shadow:none;text-shadow:none}.inline-notice{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 15px 2px;padding:5px 12px;margin:5px 0 15px;border-left-color:#ffb900}.inline-notice.inline-general{border-left-color:#46b450}.inline-error{border-color:red}.addTop{margin-top:20px}@media screen and (max-width: 782px){.newsletter form input[type="email"]{display:block;width:100%;margin:5px 0}.import select{width:100%;margin:5px 0}.plugin-importer button{width:100%}p.search-box input[name="s"]{margin-top:20px}}.module-export{border:1px solid #ddd;padding:5px;font-family:courier,Monaco,monospace;margin-top:15px;width:100%;background-color:white !important}.redirect-edit .table-actions{margin-left:1px;margin-top:2px;display:flex;align-items:center;justify-content:flex-start}.redirect-edit .table-actions .redirection-edit_advanced{text-decoration:none;font-size:16px}.redirect-edit .table-actions .redirection-edit_advanced svg{padding-top:2px}.error{padding-bottom:10px !important}.notice{display:block !important}.database-switch{float:right}.database-switch a{color:#444;text-decoration:none}.database-switch a:hover{text-decoration:underline}\n',""]),e.exports=t},function(e,t,n){"use strict";n.r(t);var r=n(17),o=n.n(r),a="URLSearchParams"in self,i="Symbol"in self&&"iterator"in Symbol,l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),u="FormData"in self,c="ArrayBuffer"in self;if(c)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function p(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function g(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function b(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:l&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&l&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||f(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l&&(this.blob=function(){var e=g(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,n,r=g(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=y(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=p(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[p(e)]},m.prototype.get=function(e){return e=p(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(p(e))},m.prototype.set=function(e,t){this.map[p(e)]=d(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),h(e)},m.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},m.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),h(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(e,t){var n,r,o=(t=t||{}).body;if(e instanceof x){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new m(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),E.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function S(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},w.call(x.prototype),w.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];S.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})};var k=self.DOMException;try{new k}catch(e){(k=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),k.prototype.constructor=k}function P(e,t){return new Promise((function(n,r){var o=new x(e,t);if(o.signal&&o.signal.aborted)return r(new k("Aborted","AbortError"));var a=new XMLHttpRequest;function i(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new S(o,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new k("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&l&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",i),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",i)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}P.polyfill=!0,self.fetch||(self.fetch=P,self.Headers=m,self.Request=x,self.Response=S),!window.Promise&&(window.Promise=o.a),Array.from||(Array.from=function(e){return[].slice.call(e)}),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var a=t[o];if(e.call(r,a,o,t))return a;o++}}});var T=n(0),j=n.n(T),C=n(6),R=n.n(C),N=n(1),A=n.n(N),I=n(2),D=n.n(I),L=j.a.createContext(null);var F=function(e){e()},M={notify:function(){}};function z(){var e=F,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var U=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=M,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=z())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=M)},e}();var H=function(e){var t=e.store,n=e.context,r=e.children,o=Object(T.useMemo)((function(){var e=new U(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),a=Object(T.useMemo)((function(){return t.getState()}),[t]);Object(T.useEffect)((function(){var e=o.subscription;return e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,a]);var i=n||L;return j.a.createElement(i.Provider,{value:o},r)};function W(){return(W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function B(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var $=n(11),V=n.n($),q=n(10),Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?T.useLayoutEffect:T.useEffect,G=[],K=[null,null];function Y(e,t){var n=e[1];return[t.payload,n+1]}function X(e,t,n){Q((function(){return e.apply(void 0,t)}),n)}function J(e,t,n,r,o,a,i){e.current=r,t.current=o,n.current=!1,a.current&&(a.current=null,i())}function Z(e,t,n,r,o,a,i,l,u,c){if(e){var s=!1,f=null,p=function(){if(!s){var e,n,p=t.getState();try{e=r(p,o.current)}catch(e){n=e,f=e}n||(f=null),e===a.current?i.current||u():(a.current=e,l.current=e,i.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=p,n.trySubscribe(),p();return function(){if(s=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var ee=function(){return[null,0]};function te(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,i=void 0===a?"connectAdvanced":a,l=n.renderCountProp,u=void 0===l?void 0:l,c=n.shouldHandleStateChanges,s=void 0===c||c,f=n.storeKey,p=void 0===f?"store":f,d=(n.withRef,n.forwardRef),h=void 0!==d&&d,m=n.context,g=void 0===m?L:m,y=B(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),b=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),a=W({},y,{getDisplayName:o,methodName:i,renderCountProp:u,shouldHandleStateChanges:s,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=y.pure;var c=l?T.useMemo:function(e){return e()};function f(n){var r=Object(T.useMemo)((function(){var e=n.forwardedRef,t=B(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=r[0],i=r[1],l=r[2],u=Object(T.useMemo)((function(){return o&&o.Consumer&&Object(q.isContextConsumer)(j.a.createElement(o.Consumer,null))?o:b}),[o,b]),f=Object(T.useContext)(u),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(f)&&Boolean(f.store);var d=p?n.store:f.store,h=Object(T.useMemo)((function(){return function(t){return e(t.dispatch,a)}(d)}),[d]),m=Object(T.useMemo)((function(){if(!s)return K;var e=new U(d,p?null:f.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,p,f]),g=m[0],y=m[1],v=Object(T.useMemo)((function(){return p?f:W({},f,{subscription:g})}),[p,f,g]),w=Object(T.useReducer)(Y,G,ee),E=w[0][0],x=w[1];if(E&&E.error)throw E.error;var _=Object(T.useRef)(),S=Object(T.useRef)(l),O=Object(T.useRef)(),k=Object(T.useRef)(!1),P=c((function(){return O.current&&l===S.current?O.current:h(d.getState(),l)}),[d,E,l]);X(J,[S,_,k,l,P,O,y]),X(Z,[s,d,g,h,S,_,k,O,y,x],[d,g,h]);var C=Object(T.useMemo)((function(){return j.a.createElement(t,W({},P,{ref:i}))}),[i,t,P]);return Object(T.useMemo)((function(){return s?j.a.createElement(u.Provider,{value:v},C):C}),[u,C,v])}var d=l?j.a.memo(f):f;if(d.WrappedComponent=t,d.displayName=r,h){var m=j.a.forwardRef((function(e,t){return j.a.createElement(d,W({},e,{forwardedRef:t}))}));return m.displayName=r,m.WrappedComponent=t,V()(m,t)}return V()(d,t)}}function ne(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function re(e,t){if(ne(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!ne(e[n[o]],t[n[o]]))return!1;return!0}var oe=n(7);function ae(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function ie(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function le(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=ie(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=ie(o),o=r(t,n)),o},r}}var ue=[function(e){return"function"==typeof e?le(e):void 0},function(e){return e?void 0:ae((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?ae((function(t){return Object(oe.bindActionCreators)(e,t)})):void 0}];var ce=[function(e){return"function"==typeof e?le(e):void 0},function(e){return e?void 0:ae((function(){return{}}))}];function se(e,t,n){return W({},n,{},e,{},t)}var fe=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,a=n.areMergedPropsEqual,i=!1;return function(t,n,l){var u=e(t,n,l);return i?o&&a(u,r)||(r=u):(i=!0,r=u),r}}}(e):void 0},function(e){return e?void 0:function(){return se}}];function pe(e,t,n,r){return function(o,a){return n(e(o,a),t(r,a),a)}}function de(e,t,n,r,o){var a,i,l,u,c,s=o.areStatesEqual,f=o.areOwnPropsEqual,p=o.areStatePropsEqual,d=!1;function h(o,d){var h,m,g=!f(d,i),y=!s(o,a);return a=o,i=d,g&&y?(l=e(a,i),t.dependsOnOwnProps&&(u=t(r,i)),c=n(l,u,i)):g?(e.dependsOnOwnProps&&(l=e(a,i)),t.dependsOnOwnProps&&(u=t(r,i)),c=n(l,u,i)):y?(h=e(a,i),m=!p(h,l),l=h,m&&(c=n(l,u,i)),c):c}return function(o,s){return d?h(o,s):(l=e(a=o,i=s),u=t(r,i),c=n(l,u,i),d=!0,c)}}function he(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,a=B(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),i=n(e,a),l=r(e,a),u=o(e,a);return(a.pure?de:pe)(i,l,u,e,a)}function me(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function ge(e,t){return e===t}function ye(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?te:n,o=t.mapStateToPropsFactories,a=void 0===o?ce:o,i=t.mapDispatchToPropsFactories,l=void 0===i?ue:i,u=t.mergePropsFactories,c=void 0===u?fe:u,s=t.selectorFactory,f=void 0===s?he:s;return function(e,t,n,o){void 0===o&&(o={});var i=o,u=i.pure,s=void 0===u||u,p=i.areStatesEqual,d=void 0===p?ge:p,h=i.areOwnPropsEqual,m=void 0===h?re:h,g=i.areStatePropsEqual,y=void 0===g?re:g,b=i.areMergedPropsEqual,v=void 0===b?re:b,w=B(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=me(e,a,"mapStateToProps"),x=me(t,l,"mapDispatchToProps"),_=me(n,c,"mergeProps");return r(f,W({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:x,initMergeProps:_,pure:s,areStatesEqual:d,areOwnPropsEqual:m,areStatePropsEqual:y,areMergedPropsEqual:v},w))}}var be=ye();var ve;ve=C.unstable_batchedUpdates,F=ve;var we=n(19);function Ee(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var xe=Ee();xe.withExtraArgument=Ee;var _e=xe,Se="STATUS_IN_PROGRESS",Oe="STATUS_COMPLETE";function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t,n,r){var o=e[t]?Pe({},e[t]):[];return o[n]=r,Te({},t,o)}var Ce="SEARCH_FAIL";function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ie=function(e,t,n){return"forward"===n&&!1===e.progress.next||"backward"===n&&!1===e.progress.previous||t.length===e.perPage};function De(e,t){return e.search.searchFlags.regex?function(e,t){var n,r,o,a,i="forward"===e.searchDirection?e.results.concat(t.results):t.results.concat(e.results);return Ne(Ne({},e),{},{status:Ie(t,i,e.searchDirection)?Oe:e.status,results:i,requestCount:e.requestCount+1,progress:(n=e.progress,r=t.progress,o=e.searchDirection,a=0===e.requestCount,Ne(Ne({},n),{},{current:r.current,next:"forward"===o||a?r.next:n.next,previous:"backward"===o||a?r.previous:n.previous,rows:(n.rows?n.rows:0)+r.rows})),totals:Ne(Ne({},e.totals),t.totals),canCancel:!1,showLoading:!1})}(e,t):function(e,t){return Ne(Ne({},e),{},{status:Oe,results:t.results,progress:t.progress,totals:t.totals?Ne(Ne({},e.totals),t.totals):e.totals,canCancel:!1,showLoading:!1})}(e,t)}var Le=function(){return Ne(Ne({},Fe()),{},{results:[],totals:[],progress:{}})},Fe=function(){return{requestCount:0,searchedPhrase:"",replaceCount:0,phraseCount:0,status:null,replacing:[],replaceAll:!1,row:null,canCancel:!1,showLoading:!1}};function Me(e,t){var n=t.results.rows+e.replaceCount,r=t.totals.matched_rows?t.totals.matched_rows:t.totals.rows?t.totals.rows:e.totals.rows;return!1===t.progress.next||n>=r||e.totals.matched_rows>0&&n>=e.totals.matched_rows}var ze=function(e){return e.status===Oe||null===e.status};function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){We(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function We(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Be=function(e,t){return e.slice(0).concat([t])},$e=function(e,t){return e.slice(0).concat([t])},Ve=function(e){return Math.max(0,e.inProgress-1)},qe={SETTING_SAVED:Object(N.translate)("Settings saved"),SEARCH_DELETE_COMPLETE:Object(N.translate)("Row deleted"),SEARCH_REPLACE_COMPLETE:Object(N.translate)("Row replaced"),SEARCH_SAVE_ROW_COMPLETE:Object(N.translate)("Row updated")};var Qe=Object(oe.combineReducers)({settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETTING_API_TRY":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"loading"}))});case"SETTING_API_SUCCESS":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"ok"}))});case"SETTING_API_FAILED":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"fail",error:t.error}))});case"SETTING_LOAD_START":return Pe(Pe({},e),{},{loadStatus:Se});case"SETTING_LOAD_SUCCESS":return Pe(Pe({},e),{},{loadStatus:Oe,values:t.values});case"SETTING_LOAD_FAILED":return Pe(Pe({},e),{},{loadStatus:"STATUS_FAILED",error:t.error});case"SETTING_SAVING":return Pe(Pe({},e),{},{saveStatus:Se,warning:!1});case"SETTING_SAVED":return Pe(Pe({},e),{},{saveStatus:Oe,values:t.values,warning:!!t.warning&&t.warning});case"SETTING_SAVE_FAILED":return Pe(Pe({},e),{},{saveStatus:"STATUS_FAILED",error:t.error});case"SETTING_LOAD_STATUS":return Pe(Pe({},e),{},{pluginStatus:t.pluginStatus})}return e},search:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SEARCH_VALUES":return Ne(Ne({},e),{},{search:Ne(Ne({},e.search),t.searchValue),results:void 0!==t.searchValue.replacement?e.results:[],status:void 0!==t.searchValue.replacement?e.status:null});case"SEARCH_CANCEL":return t.clearAll?Ne(Ne({},e),Le()):Ne(Ne({},e),Fe());case"SEARCH_START_FRESH":return Ne(Ne({},e),{},{requestCount:0,status:Se,totals:0===t.page?[]:e.totals,progress:0===t.page?[]:e.progress,results:[],searchDirection:t.searchDirection,searchedPhrase:t.replacement,showLoading:!0});case"SEARCH_START_MORE":return Ne(Ne({},e),{},{canCancel:!0,showLoading:!0});case"SEARCH_COMPLETE":return ze(e)?e:De(e,t);case"SEARCH_REPLACE_COMPLETE":return ze(e)?e:Ne(Ne({},De(Ne(Ne({},e),{},{results:[]}),t)),{},{replacing:e.replacing.filter((function(e){return e!==t.rowId}))});case"SEARCH_REPLACE_ALL":return Ne(Ne(Ne({},e),Le()),{},{replaceAll:!0,status:Se,canCancel:!0});case"SEARCH_REPLACE_ALL_COMPLETE":return ze(e)?e:Ne(Ne({},e),{},{replaceCount:t.results.rows+e.replaceCount,phraseCount:t.results.phrases+e.phraseCount,requestCount:!1===t.progress.next?0:e.requestCount+1,progress:t.progress,totals:Ne(Ne({},e.totals),t.totals),status:Me(e,t)?Oe:Se});case"SEARCH_SAVE_ROW_COMPLETE":return Ne(Ne({},e),{},{status:Oe,replacing:e.replacing.filter((function(e){return e!==t.rowId})),results:e.results.map((function(e){return e.row_id===t.result.row_id?t.result:e})),rawData:null});case"SEARCH_LOAD_ROW_COMPLETE":return Ne(Ne({},e),{},{replacing:e.replacing.filter((function(e){return e!==t.rowId})),status:Oe,rawData:t.row});case"SEARCH_REPLACE_ROW":return Ne(Ne({},e),{},{replacing:e.replacing.concat(t.rowId),status:Se,rawData:null});case Ce:return Ne(Ne(Ne({},e),Fe()),{},{status:"STATUS_FAILED"});case"SEARCH_DELETE_COMPLETE":return Ne(Ne({},e),{},{results:e.results.filter((function(e){return e.row_id!==t.rowId})),replacing:e.replacing.filter((function(e){return e!==t.rowId})),status:Oe})}return e},message:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce:case"SETTING_LOAD_FAILED":case"SETTING_SAVE_FAILED":var n=Be(e.errors,t.error);return console.error(t.error.message),He(He({},e),{},{errors:n,inProgress:Ve(e)});case"SEARCH_REPLACE_ROW":case"SETTING_SAVING":return He(He({},e),{},{inProgress:e.inProgress+1});case"SEARCH_REPLACE_COMPLETE":case"SEARCH_DELETE_COMPLETE":case"SEARCH_SAVE_ROW_COMPLETE":case"SETTING_SAVED":return He(He({},e),{},{notices:$e(e.notices,qe[t.type]),inProgress:Ve(e)});case"MESSAGE_CLEAR_NOTICES":return He(He({},e),{},{notices:[]});case"MESSAGE_CLEAR_ERRORS":return He(He({},e),{},{errors:[]})}return e}}),Ge=n(8),Ke=n.n(Ge),Ye=["search","options","support"];function Xe(e,t){var n=function(e,t,n){var r=Je(n);for(var o in e)e[o]&&t[o]!==e[o]?r[o.toLowerCase()]=e[o]:t[o]===e[o]&&delete r[o.toLowerCase()];return"?"+Ge.stringify(r)}(e,t);document.location.search!==n&&history.pushState({},null,n)}function Je(e){return Ge.parse(e?e.slice(1):document.location.search.slice(1))}function Ze(e){var t=Je(e);return-1!==Ye.indexOf(t.sub)?t.sub:"search"}var et=Object(we.composeWithDevTools)({name:"Search Regex"}),tt=[_e,function(){return function(e){return function(t){switch(t.type){case"SEARCH_START_FRESH":!function(e){Xe({searchPhrase:e.searchPhrase,searchFlags:e.searchFlags,source:e.source,sourceFlags:e.sourceFlags,perPage:e.perPage},{searchPhrase:"",searchFlags:[],source:[],sourceFlags:[],perPage:25,sub:"search"})}(t)}return e(t)}}}];function nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(oe.createStore)(Qe,e,et(oe.applyMiddleware.apply(void 0,tt)));return t}function rt(){var e=SearchRegexi10n&&SearchRegexi10n.preload&&SearchRegexi10n.preload.pluginStatus?SearchRegexi10n.preload.pluginStatus:[];return{loadStatus:Se,saveStatus:!1,error:!1,pluginStatus:e,apiTest:{},database:SearchRegexi10n.database?SearchRegexi10n.database:{},values:SearchRegexi10n.settings?SearchRegexi10n.settings:{},api:SearchRegexi10n.api?SearchRegexi10n.api:[],warning:!1}}var ot=function(){return[{value:"regex",label:Object(N.translate)("Regular Expression")},{value:"case",label:Object(N.translate)("Ignore Case")}]},at=function(){return[{value:25,label:Object(N.translate)("25 per page ")},{value:50,label:Object(N.translate)("50 per page ")},{value:100,label:Object(N.translate)("100 per page")},{value:250,label:Object(N.translate)("250 per page")},{value:500,label:Object(N.translate)("500 per page")}]};function it(e,t,n){return t.find((function(t){return t.value===e||t.name===e}))?e:n}function lt(e,t){return e.filter((function(e){return it(e,t,!1)}))}function ut(e,t,n){return t[e[0]]?n.filter((function(n){return void 0!==t[e[0]][n]})):[]}function ct(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function st(e){var t,n,r=e.searchPhrase,o=e.searchFlags,a=e.sourceFlags,i=e.replacement,l=e.perPage,u=(t=SearchRegexi10n.preload.sources,n=e.source.length>0?e.source[0]:[],t.map((function(e){return it(n,e.sources)})).filter((function(e){return e})));return{searchPhrase:r,searchFlags:ct(lt(o,ot())),source:u,sourceFlags:ct(ut(u,SearchRegexi10n.preload.source_flags,a)),replacement:i,perPage:it(parseInt(l,10),at(),25)}}function ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ht=function(e){return Object.keys(e).filter((function(t){return e[t]||0===e[t]||!1===e[t]})).reduce((function(t,n){return t[n]=e[n],t}),{})},mt=function(){return SearchRegexi10n.api&&SearchRegexi10n.api.WP_API_root?SearchRegexi10n.api.WP_API_root:"/wp-json/"},gt=function(){return SearchRegexi10n.api.WP_API_nonce},yt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=mt()+"search-regex/v1/"+e+"/";if(t._wpnonce=gt(),t&&Object.keys(t).length>0&&(t=ht(t),Object.keys(t).length>0)){var r=n+(-1===mt().indexOf("?")?"?":"&")+Ke.a.stringify(t);return r}return n},bt=function(){return new Headers({Accept:"application/json, */*;q=0.1"})},vt=function(){return new Headers({"Content-Type":"application/json; charset=utf-8"})},wt=function(e){return{url:e,credentials:"same-origin"}},Et=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return pt(pt({headers:bt()},wt(yt(e,t))),{},{method:"get"})},xt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=pt(pt({headers:vt()},wt(yt(e,n))),{},{method:"post",params:t});return r.body="{}",Object.keys(t).length>0&&(r.body=JSON.stringify(t)),r},_t={get:function(){return Et("setting")},update:function(e){return xt("setting",e)}},St={get:function(e){return Et("search",e)},replace:function(e){return xt("replace",e)}},Ot={deleteRow:function(e,t){return xt("source/".concat(e,"/").concat(t,"/delete"))},loadRow:function(e,t){return Et("source/".concat(e,"/").concat(t))},saveRow:function(e,t,n){return xt("source/".concat(e,"/").concat(t),n)}},kt={checkApi:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?xt("plugin/test",{test:"ping"}):Et("plugin/test");return n.url=n.url.replace(mt(),e).replace(/[\?&]_wpnonce=[a-f0-9]*/,""),n.url+=(-1===n.url.indexOf("?")?"?":"&")+"_wpnonce="+gt(),n}},Pt=function(e){return 0===e?"Admin AJAX returned 0":e.message?e.message:"Unknown error "+e},Tt=function(e){return e.error_code?e.error_code:e.data&&e.data.error_code?e.data.error_code:0===e?"admin-ajax":e.code?e.code:"unknown"},jt=function(e){return e.action=function(e){return e.url.replace(mt(),"").replace(/[\?&]_wpnonce=[a-f0-9]*/,"")+" "+e.method.toUpperCase()}(e),fetch(e.url,e).then((function(t){if(!t||!t.status)throw{message:"No data or status object returned in request",code:0};var n;return t.status&&void 0!==t.statusText&&(e.status=t.status,e.statusText=t.statusText),t.headers.get("x-wp-nonce")&&(n=t.headers.get("x-wp-nonce"),SearchRegexi10n.api.WP_API_nonce=n),t.text()})).then((function(t){e.raw=t;try{var n=JSON.parse(t.replace(/\ufeff/,""));if(e.status&&200!==e.status)throw{message:Pt(n),code:Tt(n),request:e,data:n.data?n.data:null};if(0===n)throw{message:"Failed to get data",code:"json-zero"};return n}catch(t){throw t.request=e,t.code=t.code||t.name,t}}))},Ct=(n(42),function(e){var t=e.title,n=e.url,r=void 0!==n&&n;return j.a.createElement("tr",null,j.a.createElement("th",null,!r&&t,r&&j.a.createElement("a",{href:r,target:"_blank"},t)),j.a.createElement("td",null,e.children))}),Rt=function(e){return j.a.createElement("table",{className:"form-table"},j.a.createElement("tbody",null,e.children))};function Nt(e){return(Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var At=function e(t){var n=t.value,r=t.label;return"object"===Nt(n)?j.a.createElement("optgroup",{label:r},n.map((function(t,n){return j.a.createElement(e,{label:t.label,value:t.value,key:n})}))):j.a.createElement("option",{value:n},r)},It=function(e){var t=e.items,n=e.value,r=e.name,o=e.onChange,a=e.isEnabled,i=void 0===a||a;return j.a.createElement("select",{name:r,value:n,onChange:o,disabled:!i},t.map((function(e,t){return j.a.createElement(At,{value:e.value,label:e.label,key:t})})))};function Dt(e){return(Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ft(e,t){return(Ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var o=Ht(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zt(this,n)}}function zt(e,t){return!t||"object"!==Dt(t)&&"function"!=typeof t?Ut(e):t}function Ut(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bt=function(){return[{value:0,label:Object(N.translate)("Default REST API")},{value:1,label:Object(N.translate)("Raw REST API")},{value:3,label:Object(N.translate)("Relative REST API")}]},$t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ft(e,t)}(a,e);var t,n,r,o=Mt(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Wt(Ut(t=o.call(this,e)),"onChange",(function(e){var n=e.target,r="checkbox"===n.type?n.checked:n.value;t.setState(Wt({},n.name,r))})),Wt(Ut(t),"onSubmit",(function(e){e.preventDefault(),t.props.onSaveSettings(t.state)})),t.state=e.values,t}return t=a,(n=[{key:"render",value:function(){var e=this.props.saveStatus;return j.a.createElement("form",{onSubmit:this.onSubmit},j.a.createElement(Rt,null,j.a.createElement(Ct,{title:""},j.a.createElement("label",null,j.a.createElement("input",{type:"checkbox",checked:this.state.support,name:"support",onChange:this.onChange}),j.a.createElement("span",{className:"sub"},Object(N.translate)("I'm a nice person and I have helped support the author of this plugin")))),j.a.createElement(Ct,{title:Object(N.translate)("REST API")},j.a.createElement(It,{items:Bt(),name:"rest_api",value:parseInt(this.state.rest_api,10),onChange:this.onChange}),"  ",j.a.createElement("span",{className:"sub"},Object(N.translate)("How Search Regex uses the REST API - don't change unless necessary")))),j.a.createElement("input",{className:"button-primary",type:"submit",name:"update",value:Object(N.translate)("Update"),disabled:e===Se}))}}])&&Lt(t.prototype,n),r&&Lt(t,r),a}(j.a.Component);var Vt=be((function(e){var t=e.settings;return{values:t.values,saveStatus:t.saveStatus}}),(function(e){return{onSaveSettings:function(t){e(function(e){return function(t){return jt(_t.update(e)).then((function(e){t({type:"SETTING_SAVED",values:e.settings,warning:e.warning})})).catch((function(e){t({type:"SETTING_SAVE_FAILED",error:e})})),t({type:"SETTING_SAVING",settings:e})}}(t))}}}))($t),qt=(n(44),function(){return j.a.createElement("div",{className:"placeholder-container"},j.a.createElement("div",{className:"placeholder-loading"}))});n(46);function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kt(e,t){return(Kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zt(e);if(t){var o=Zt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xt(this,n)}}function Xt(e,t){return!t||"object"!==Qt(t)&&"function"!=typeof t?Jt(e):t}function Jt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zt(e){return(Zt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var en=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kt(e,t)}(a,e);var t,n,r,o=Yt(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).onDonate=t.handleDonation.bind(Jt(t)),t.onChange=t.handleChange.bind(Jt(t)),t.onBlur=t.handleBlur.bind(Jt(t)),t.onInput=t.handleInput.bind(Jt(t)),t.state={support:e.support,amount:20},t}return t=a,(n=[{key:"handleBlur",value:function(){this.setState({amount:Math.max(16,this.state.amount)})}},{key:"handleDonation",value:function(){this.setState({support:!1})}},{key:"getReturnUrl",value:function(){return document.location.href+"#thanks"}},{key:"handleChange",value:function(e){this.state.amount!==e.value&&this.setState({amount:parseInt(e.value,10)})}},{key:"handleInput",value:function(e){var t=e.target.value?parseInt(e.target.value,10):16;this.setState({amount:t})}},{key:"getAmountoji",value:function(e){for(var t=[[100,"😍"],[80,"😎"],[60,"😊"],[40,"😃"],[20,"😀"],[10,"🙂"]],n=0;n<t.length;n++)if(e>=t[n][0])return t[n][1];return t[t.length-1][1]}},{key:"renderSupported",value:function(){return j.a.createElement("div",null,Object(N.translate)("You've supported this plugin - thank you!"),"  ",j.a.createElement("a",{href:"#",onClick:this.onDonate},Object(N.translate)("I'd like to support some more.")))}},{key:"renderUnsupported",value:function(){for(var e,t,n,r=(n="",(t=16)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),o=20;o<=100;o+=20)r[o]="";return j.a.createElement("div",null,j.a.createElement("label",null,j.a.createElement("p",null,Object(N.translate)("Search Regex is free to use - life is wonderful and lovely! It has required a great deal of time and effort to develop and you can help support this development by {{strong}}making a small donation{{/strong}}.",{components:{strong:j.a.createElement("strong",null)}})," ",Object(N.translate)("You get useful software and I get to carry on making it better."))),j.a.createElement("input",{type:"hidden",name:"cmd",value:"_xclick"}),j.a.createElement("input",{type:"hidden",name:"business",value:"admin@urbangiraffe.com"}),j.a.createElement("input",{type:"hidden",name:"item_name",value:"Search Regex (WordPress Plugin)"}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_promo_code",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_product_category",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_shipping_method",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_user_address_change",value:""}),j.a.createElement("input",{type:"hidden",name:"no_shipping",value:"1"}),j.a.createElement("input",{type:"hidden",name:"return",value:this.getReturnUrl()}),j.a.createElement("input",{type:"hidden",name:"no_note",value:"1"}),j.a.createElement("input",{type:"hidden",name:"currency_code",value:"USD"}),j.a.createElement("input",{type:"hidden",name:"tax",value:"0"}),j.a.createElement("input",{type:"hidden",name:"lc",value:"US"}),j.a.createElement("input",{type:"hidden",name:"bn",value:"PP-DonationsBF"}),j.a.createElement("div",{className:"donation-amount"},"$",j.a.createElement("input",{type:"number",name:"amount",min:16,value:this.state.amount,onChange:this.onInput,onBlur:this.onBlur}),j.a.createElement("span",null,this.getAmountoji(this.state.amount)),j.a.createElement("input",{type:"submit",className:"button-primary",value:Object(N.translate)("Support 💰")})))}},{key:"render",value:function(){var e=this.state.support;return j.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",className:"donation"},j.a.createElement(Rt,null,j.a.createElement(Ct,{title:Object(N.translate)("Plugin Support")+":"},e?this.renderSupported():this.renderUnsupported())))}}])&&Gt(t.prototype,n),r&&Gt(t,r),a}(j.a.Component);function tn(e){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function on(e,t){return(on=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function an(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=un(e);if(t){var o=un(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ln(this,n)}}function ln(e,t){return!t||"object"!==tn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&on(e,t)}(a,e);var t,n,r,o=an(a);function a(){return nn(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"componentDidMount",value:function(){this.props.onLoadSettings()}},{key:"render",value:function(){var e=this.props,t=e.loadStatus,n=e.values;return t!==Se&&n?j.a.createElement("div",null,t===Oe&&j.a.createElement(en,{support:n.support}),t===Oe&&j.a.createElement(Vt,null)):j.a.createElement(qt,null)}}])&&rn(t.prototype,n),r&&rn(t,r),a}(j.a.Component);var sn=be((function(e){var t=e.settings;return{loadStatus:t.loadStatus,values:t.values}}),(function(e){return{onLoadSettings:function(){e((function(e,t){return t().settings.loadStatus===Oe?null:(jt(_t.get()).then((function(t){e({type:"SETTING_LOAD_SUCCESS",values:t.settings})})).catch((function(t){e({type:"SETTING_LOAD_FAILED",error:t})})),e({type:"SETTING_LOAD_START"}))}))}}}))(cn),fn=function(e){var t=e.url,n=e.children;return j.a.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer"},n)},pn=function(){return j.a.createElement("div",null,j.a.createElement("h2",null,Object(N.translate)("Need more help?")),j.a.createElement("p",null,Object(N.translate)("Full documentation for Search Regex can be found at {{site}}https://searchregex.com{{/site}}.",{components:{site:j.a.createElement(fn,{url:"https://searchregex.com/support/"})}})),j.a.createElement("p",null,j.a.createElement("strong",null,Object(N.translate)("If you want to report a bug please read the {{report}}Reporting Bugs{{/report}} guide.",{components:{report:j.a.createElement(fn,{url:"https://searchregex.com/support/reporting-bugs/"})}}))),j.a.createElement("div",{className:"inline-notice inline-general"},j.a.createElement("p",{className:"github"},j.a.createElement(fn,{url:"https://github.com/johngodley/search-regex/issues"},j.a.createElement("img",{src:SearchRegexi10n.pluginBaseUrl+"/images/GitHub-Mark-64px.png",width:"32",height:"32"})),j.a.createElement(fn,{url:"https://github.com/johngodley/search-regex/issues"},"https://github.com/johngodley/search-regex/"))),j.a.createElement("p",null,Object(N.translate)("Please note that any support is provide on as-time-is-available basis and is not guaranteed. I do not provide paid support.")),j.a.createElement("p",null,Object(N.translate)("If you want to submit information that you don't want in a public repository then send it directly via {{email}}email{{/email}} - include as much information as you can!",{components:{email:j.a.createElement("a",{href:"mailto:john@searchregex.com?subject=Search%20Regex%20Issue&body="+encodeURIComponent("Search Regex: "+SearchRegexi10n.versions)})}})),j.a.createElement("h2",null,Object(N.translate)("Redirection")),j.a.createElement("p",null,Object(N.translate)("Like this plugin? You might want to consider {{link}}Redirection{{/link}}, a plugin to manage redirects, that is also written by me.",{components:{link:j.a.createElement(fn,{url:"https://redirection.me"})}})))};var dn=function(){return j.a.createElement("div",{className:"searchregex-help"},j.a.createElement("h3",null,Object(N.translate)("Quick Help")),j.a.createElement("p",null,Object(N.translate)("The following concepts are used by Search Regex:")),j.a.createElement("ul",null,j.a.createElement("li",null,Object(N.translate)("{{link}}Search Flags{{/link}} - additional qualifiers for your search, to enable case insensitivity, and to enable regular expression support.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/searching/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Regular expression{{/link}} - a way of defining a pattern for text matching. Provides more advanced matches.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/regular-expression/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Source{{/link}} - the source of data you wish to search. For example, posts, pages, or comments.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/search-source/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Source Flags{{/link}} - additional options for the selected source. For example, include post {{guid}}GUID{{/guid}} in the search.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/search-source/"}),guid:j.a.createElement(fn,{url:"https://deliciousbrains.com/wordpress-post-guids-sometimes-update/"})}}))))},hn=(n(48),function(){return j.a.createElement(j.a.Fragment,null,j.a.createElement(dn,null),j.a.createElement(pn,null))}),mn=n(5),gn=n.n(mn);n(50);function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){vn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(e,t){if(null===e)return{};var n=e.left,r=e.top,o=e.width,a={left:n,top:r+e.height};return t&&(a.width=o),a}function En(e){var t=e.style,n=e.align,r=gn()("redirect-popover__arrows",{"redirect-popover__arrows__left":"left"===n,"redirect-popover__arrows__right":"right"===n,"redirect-popover__arrows__centre":"centre"===n});return j.a.createElement("div",{className:r,style:t})}var xn=function(e){var t=e.position,n=e.children,r=e.togglePosition,o=e.align,a=e.hasArrow,i=Object(T.useRef)(null),l=Object(T.useMemo)((function(){return function(e,t,n,r,o){if(!r.current)return bn(bn({},e),{},{visibility:"hidden"});var a=e.width?e.width:r.current.getBoundingClientRect().width,i=t.parentWidth-a-20,l=function(e,t,n,r){return"right"===r?e+n-t:"centre"===r?e-(t+n)/2:e}(t.left,e.width?e.width:a,t.width,n);return bn(bn({},e),{},{left:Math.min(i,l),top:o?e.top+5:e.top})}(t,r,o,i,a)}),[t,r]),u=Object(T.useMemo)((function(){return function(e,t){return t?bn(bn({},e),{},{width:t.getBoundingClientRect().width}):e}(l,i.current)}),[l]);return j.a.createElement(j.a.Fragment,null,a&&j.a.createElement(En,{style:u,align:o}),j.a.createElement("div",{className:"redirect-popover__content",style:l,ref:i},n))};function _n(e){var t=Object(T.useRef)(null),n=e.children,r=e.onOutside,o=e.className,a=function(e){(function(e,t){return!!t.current&&!t.current.contains(e.target)}(e,t)||"Escape"===e.key)&&r(e)};return Object(T.useEffect)((function(){return addEventListener("click",a),addEventListener("keydown",a),function(){removeEventListener("click",a),removeEventListener("keydown",a)}}),[]),j.a.createElement("div",{className:o,ref:t},n)}function Sn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return On(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return On(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function On(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kn=function(e){var t=e.renderContent,n=e.className,r=e.renderToggle,o=e.align,a=void 0===o?"left":o,i=e.onHide,l=e.matchToggle,u=void 0!==l&&l,c=e.hasArrow,s=void 0!==c&&c,f=e.offset,p=Sn(Object(T.useState)(!1),2),d=p[0],h=p[1],m=Sn(Object(T.useState)(null),2),g=m[0],y=m[1],b=Object(T.useRef)(null);return Object(T.useEffect)((function(){d&&y(function(e,t){if(null===e)return{};var n=document.getElementById("react-portal").getBoundingClientRect(),r=e.getBoundingClientRect(),o=r.height,a=r.width,i=r.left,l=r.top;return{left:i-n.left+(t||0),top:l-n.top,width:a,height:o,parentWidth:n.width,parentHeight:n.height}}(b.current,f))}),[d,u]),Object(T.useEffect)((function(){if(d){var e=window.addEventListener("resize",(function(){h(!1)}));return function(){window.removeEventListener("resize",e)}}}),[d]),j.a.createElement(j.a.Fragment,null,j.a.createElement("div",{className:gn()("redirect-popover__toggle",n),ref:b},r(d,(function(e){return h(!d)}))),d&&Object(C.createPortal)(j.a.createElement(_n,{className:"redirect-popover",onOutside:function(){h(!1),i&&i()}},j.a.createElement(xn,{position:wn(g,u),togglePosition:g,align:a,hasArrow:s},t((function(){return h(!1)})))),document.getElementById("react-portal")))};n(52);function Pn(){return(Pn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Tn=function(e){var t=e.children,n=e.className,r=e.onClick,o=e.title,a=e.onCancel,i={title:o,onClick:r};return j.a.createElement("div",Pn({className:gn()("redirect-badge",n,r?"redirect-badge__click":null)},i),j.a.createElement("div",null,t,a&&j.a.createElement("span",{onClick:a},"⨯")))};function jn(e){return(jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cn(e){return function(e){if(Array.isArray(e))return Rn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function An(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach((function(t){Hn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function In(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ln(e,t){return(Ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Un(e);if(t){var o=Un(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Mn(this,n)}}function Mn(e,t){return!t||"object"!==jn(t)&&"function"!=typeof t?zn(e):t}function zn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Un(e){return(Un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn=function(e){var t=e.label,n=e.value,r=e.onSelect,o=e.isSelected;return j.a.createElement("p",null,j.a.createElement("label",null,j.a.createElement("input",{type:"checkbox",name:n,onChange:function(e){return r(n,e.target.checked)},checked:o}),t))},Bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ln(e,t)}(a,e);var t,n,r,o=Fn(a);function a(){var e;In(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hn(zn(e=o.call.apply(o,[this].concat(n))),"onSelect",(function(t,n){var r=e.props,o=r.selected,a=r.value,i=r.multiple,l=An({},o);if(n){var u=t===a||t;l[a]=i?[].concat(Cn(l[a]),[t]):u}else i?l[a]=l[a].filter((function(e){return e!==t})):delete l[a];e.props.onApply(l,t)})),e}return t=a,(n=[{key:"isSelected",value:function(e){var t=this.props,n=t.multiple,r=t.selected,o=t.value;return n&&Array.isArray(r[o])?-1!==r[o].indexOf(e):!(o!==e||!r[o])||r[o]===e}},{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.options,o=t.value;return r?j.a.createElement("div",{className:"redirect-multioption__group"},j.a.createElement("h5",null,n),r.map((function(t){return j.a.createElement(Wn,{label:t.label,value:t.value,onSelect:e.onSelect,isSelected:e.isSelected(t.value),key:t.value})}))):j.a.createElement(Wn,{label:n,value:o,onSelect:this.onSelect,isSelected:this.isSelected(o)})}}])&&Dn(t.prototype,n),r&&Dn(t,r),a}(j.a.Component);n(54);function $n(e){return($n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(n),!0).forEach((function(t){er(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kn(e,t){return(Kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var o=Zn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xn(this,n)}}function Xn(e,t){return!t||"object"!==$n(t)&&"function"!=typeof t?Jn(e):t}function Jn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kn(e,t)}(a,e);var t,n,r,o=Yn(a);function a(){var e;Qn(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return er(Jn(e=o.call.apply(o,[this].concat(n))),"removeFilter",(function(t,n){n.preventDefault(),n.stopPropagation();var r=qn({},e.props.selected);delete r[t],e.props.onApply(r,t)})),e}return t=a,(n=[{key:"getBadges",value:function(){var e=this,t=this.props,n=t.selected,r=t.options,o=t.badges,a=Object.keys(n).filter((function(e){return void 0!==n[e]}));return a.length>0&&o?a.slice(0,3).map((function(t){var o=r.find((function(e){return e.value===t}));return o&&n[t]?j.a.createElement(Tn,{key:t,onCancel:function(n){return e.removeFilter(t,n)}},o.label):null})).concat([a.length>3?j.a.createElement("span",{key:"end"},"..."):null]):null}},{key:"shouldShowTitle",value:function(){var e=this.props,t=e.selected;return!1===e.hideTitle||0===Object.keys(t).filter((function(e){return t[e]})).length}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,r=t.selected,o=t.onApply,a=t.title,i=t.isEnabled,l=t.multiple,u=t.className,c=this.getBadges();return j.a.createElement(kn,{renderToggle:function(t,n){return j.a.createElement("button",{className:gn()("button","action","redirect-multioption__button",i?null:"redirect-multioption__disabled",t?"redirect-multioption__button_enabled":null),onClick:n,disabled:!i,type:"button"},e.shouldShowTitle()&&j.a.createElement("h5",null,a),c,j.a.createElement("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false"},j.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})))},matchToggle:c&&Object.keys(r),align:"right",renderContent:function(){return j.a.createElement("div",{className:gn()("redirect-multioption",u)},n.map((function(e){return j.a.createElement(Bn,{label:e.label,value:e.value,options:e.options,multiple:e.multiple||l||!1,selected:r,key:e.label,onApply:o})})))}})}}])&&Gn(t.prototype,n),r&&Gn(t,r),a}(j.a.Component);er(tr,"defaultProps",{badges:!1,hideTitle:!1,isEnabled:!0});var nr=tr;n(56);function rr(){return(rr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function or(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ar(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ir(e){var t=e.children,n=e.onSave,r=e.className,o=gn()("searchregex-replace",r);if(n){return j.a.createElement("form",{className:o,onSubmit:function(e){e.preventDefault(),n()}},t)}return j.a.createElement("div",{className:o},t)}var lr=function(e){var t=e.canReplace,n=e.setReplace,r=e.className,o=e.autoFocus,a=e.onSave,i=e.onCancel,l=e.placeholder,u=e.description,c=Object(T.useRef)(null),s=or(Object(T.useState)(""),2),f=s[0],p=s[1],d=or(Object(T.useState)(""),2),h=d[0],m=d[1],g={id:"replace",value:null===f?"":f,name:"replace",onChange:function(e){return p(e.target.value)},disabled:!t||"remove"===h,placeholder:"remove"===h?Object(N.translate)("Search phrase will be removed"):l,ref:c};return Object(T.useEffect)((function(){p("remove"===h?null:""),n("remove"===h?null:"")}),[h]),Object(T.useEffect)((function(){n(f)}),[f]),Object(T.useEffect)((function(){setTimeout((function(){o&&c&&c.current.focus()}),50)}),[c]),j.a.createElement(ir,{onSave:a&&function(){return a(f)},className:r},j.a.createElement("div",{className:"searchregex-replace__input"},"multi"===h?j.a.createElement("textarea",rr({rows:"4"},g)):j.a.createElement("input",rr({type:"text"},g)),j.a.createElement(It,{items:[{value:"",label:Object(N.translate)("Single")},{value:"multi",label:Object(N.translate)("Multi")},{value:"remove",label:Object(N.translate)("Remove")}],name:"replace_flags",value:h,onChange:function(e){return m(e.target.value)},isEnabled:t})),j.a.createElement("div",{className:"searchregex-replace__action"},u&&j.a.createElement("p",null,u),a&&j.a.createElement("p",{className:"searchregex-replace__actions"},j.a.createElement("input",{type:"submit",className:"button button-primary",value:Object(N.translate)("Replace"),disabled:""===f}),j.a.createElement("input",{type:"button",className:"button button-secondary",value:Object(N.translate)("Cancel"),onClick:i}))))};function ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach((function(t){sr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e){return cr(cr({},e),{},{searchFlags:Object.keys(e.searchFlags),sourceFlags:Object.keys(e.sourceFlags)})}var pr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"forward";return function(r){var o=cr(cr({},fr(e)),{},{page:t,searchDirection:n});return jt(St.get(o)).then((function(e){r(cr(cr({type:"SEARCH_COMPLETE"},e),{},{perPage:o.perPage}))})).catch((function(e){r({type:Ce,error:e})})),r(cr({type:"SEARCH_START_FRESH"},o))}},dr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(o,a){var i=a().search.search,l=cr(cr({},i),{},{rowId:t,replacePhrase:e,searchFlags:Object.keys(i.searchFlags),sourceFlags:Object.keys(i.sourceFlags)});return n&&(l.columnId=n),r&&(l.posId=r),jt(St.replace(l)).then((function(e){o(cr(cr({type:"SEARCH_REPLACE_COMPLETE"},e),{},{perPage:i.perPage,rowId:t}))})).catch((function(e){o({type:Ce,error:e})})),o({type:"SEARCH_REPLACE_ROW",rowId:t})}};var hr=function(e){return e.map((function(e){var t=e.name;return{label:e.label,value:t}}))};var mr=be((function(e){var t=e.search;return{search:t.search,sources:t.sources,sourceFlagOptions:t.sourceFlags,replaceAll:t.replaceAll}}),(function(e){return{onSetSearch:function(t){e(function(e){return{type:"SEARCH_VALUES",searchValue:e}}(t))}}}))((function(e){var t,n=e.search,r=e.onSetSearch,o=e.sources,a=e.sourceFlagOptions,i=e.replaceAll,l=n.searchPhrase,u=n.searchFlags,c=n.sourceFlags,s=n.source,f=n.perPage,p=o.map((function(e){var t=e.sources;return{label:e.label,value:hr(t)}})),d=a[s[0]]?(t=a[s[0]],Object.keys(t).map((function(e){return{value:e,label:t[e]}}))):null,h=status===Se||i,m=function(e,t){if(0===t.length)return null;for(var n=0;n<e.length;n++)for(var r=0;r<e[n].sources.length;r++)if(e[n].sources[r].name===t[0])return e[n].sources[r];return null}(o,s);return j.a.createElement("table",null,j.a.createElement("tbody",null,j.a.createElement("tr",{className:"searchregex-search__search"},j.a.createElement("th",null,Object(N.translate)("Search")),j.a.createElement("td",null,j.a.createElement("input",{type:"text",value:l,name:"searchPhrase",placeholder:Object(N.translate)("Enter search phrase"),onChange:function(e){var t,n,o;r((t={},n=e.target.name,o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},disabled:h}),j.a.createElement(nr,{options:ot(),selected:u,onApply:function(e){return r({searchFlags:e})},title:Object(N.translate)("Search Flags"),isEnabled:!h,badges:!0}))),j.a.createElement("tr",{className:"searchregex-search__replace"},j.a.createElement("th",null,Object(N.translate)("Replace")),j.a.createElement("td",null,j.a.createElement(lr,{canReplace:!h,setReplace:function(e){return r({replacement:e})},placeholder:Object(N.translate)("Enter global replacement text")}))),j.a.createElement("tr",{className:"searchregex-search__source"},j.a.createElement("th",null,Object(N.translate)("Source")),j.a.createElement("td",null,j.a.createElement(It,{items:p,value:s[0],onChange:function(e){return r({source:[e.target.value],sourceFlags:{}})},name:"source",isEnabled:!h}),d&&d.length>0&&j.a.createElement(nr,{options:d,selected:c,onApply:function(e){return r({sourceFlags:e})},title:Object(N.translate)("Source Options"),isEnabled:!h,badges:!0,hideTitle:!0}),m&&j.a.createElement("span",{className:"searchregex-search__source__description"},m.description))),j.a.createElement("tr",null,j.a.createElement("th",null,Object(N.translate)("Results")),j.a.createElement("td",null,j.a.createElement(It,{name:"perPage",items:at(),value:f,onChange:function(e){return r({perPage:parseInt(e.target.value,10)})},isEnabled:!h})))))}));var gr=be((function(e){return{isLoading:e.status===Se}}),(function(e){return{onDelete:function(t,n){e(function(e,t){return function(n){return jt(Ot.deleteRow(e,t)).then((function(e){n({type:"SEARCH_DELETE_COMPLETE",rowId:t})})).catch((function(e){n({type:Ce,error:e})})),n({type:"SEARCH_REPLACE_ROW",rowId:t})}}(t,n))},onSave:function(t,n){e(dr(t,n))}}}))((function(e){for(var t=e.setReplacement,n=e.actions,r=e.isLoading,o=e.onSave,a=e.result,i=e.onDelete,l=e.onEditor,u=e.description,c=function(e,n){n(),t(""),o(e,a.row_id)},s=[j.a.createElement(kn,{key:"replace",renderToggle:function(e,t){return j.a.createElement("a",{href:"#",onClick:function(e){return function(e,t){e.preventDefault(),r||t()}(e,t)}},Object(N.translate)("Replace"))},onHide:function(){return t("")},hasArrow:!0,disabled:r,align:"right",renderContent:function(e){return j.a.createElement(lr,{className:"searchregex-replace__modal",canReplace:!0,setReplace:function(e){return t(e)},autoFocus:!0,onSave:function(t){return c(t,e)},onCancel:function(){return function(e){e(),t("")}(e)},placeholder:Object(N.translate)("Replacement for all matches in this row"),description:u})}})],f={edit:Object(N.translate)("Edit")},p=Object.keys(n),d=0;d<p.length;d++)f[p[d]]&&s.push(j.a.createElement(fn,{url:n[p[d]],key:p[d]},f[p[d]]));return s.push(j.a.createElement("a",{key:"edit",href:"#",onClick:function(e){e.preventDefault(),l()}},Object(N.translate)("Editor"))),s.push(j.a.createElement("a",{key:"delete",href:"#",onClick:function(e){e.preventDefault(),i(a.source_type,a.row_id)}},Object(N.translate)("Delete"))),s.reduce((function(e,t){return[e," | ",t]}))})),yr=(n(58),function(e){var t=e.size,n=void 0===t?"":t,r="spinner-container"+(n?" spinner-"+n:"");return j.a.createElement("div",{className:r},j.a.createElement("span",{className:"css-spinner"}))});var br=function(){return j.a.createElement("div",{className:"searchregex-result__more"},Object(N.translate)("Maximum number of matches exceeded and hidden from view. These will be included in any replacements."))};var vr=function(e){var t=e.typeOfReplacement,n=e.isReplacing,r=e.onUpdate,o=e.onSave,a=e.children,i=e.match,l=function(e,t){r(""),o(e),t()},u=function(e){r(""),e&&e()};return j.a.createElement(kn,{className:gn()({"searchregex-result__replaced":"replace"===t,"searchregex-result__highlight":"match"===t,"searchregex-result__deleted":"delete"===t}),renderToggle:function(e,t){return j.a.createElement("span",{onClick:function(){return!n&&t()},title:i},a)},onHide:u,hasArrow:!0,align:"centre",offset:25,renderContent:function(e){return j.a.createElement(lr,{className:"searchregex-replace__modal",canReplace:!0,setReplace:function(e){return r(e)},autoFocus:!0,onSave:function(t){return l(t,e)},onCancel:function(){return u(e)},placeholder:Object(N.translate)("Replacement for this match"),description:Object(N.translate)("Replace single phrase.")})}})},wr=function(e,t){return" ".replace(t.length)};function Er(e,t){return e&&t.length>0?e.replace(/(\\?)\$(\d{1,2})/g,(function(e,n,r){return r=parseInt(r,10),n.length>0?e.replace("\\",""):void 0!==t[r-1]?t[r-1]:e})):e}function xr(e,t){return null===e?"delete":e!==t?"replace":"match"}var _r=function(e){var t=e.match,n=e.originalMatch;return null===t?j.a.createElement("strike",null,n):t.replace(/\n/g,"↵").replace(/^(\s+)/,wr).replace(/(\s+)$/,wr)};n(60);function Sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||kr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e){return function(e){if(Array.isArray(e))return Pr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||kr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e,t){if(e){if("string"==typeof e)return Pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pr(e,t):void 0}}function Pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Tr=function(e){return e.map((function(){return""}))};function jr(e,t,n){for(var r=e.source,o=e.matches,a=e.contextReplacement,i=e.columnId,l=e.rowId,u=e.onReplace,c=e.isReplacing,s=[],f=0,p=function(e){var p,d,h,m=o[e],g=m.context_offset,y=m.match,b=m.pos_id,v=m.replacement,w=m.captures,E=(p=[t[e],a,v],d=y,void 0===(h=p.find((function(e){return n=d,null===(t=e)||t!==n&&""!==t;var t,n})))?d:h);s.push(r.substring(f,g)),s.push(j.a.createElement(vr,{typeOfReplacement:xr(E,y),onSave:function(e){return u(e,l,i,b)},onUpdate:function(r){return n(function(e,t,n){var r=Or(e);return r[t]=n,r}(t,e,r))},isReplacing:c,title:y,key:e},j.a.createElement(_r,{match:Er(E,w),originalMatch:y}))),f=g+y.length},d=0;d<o.length;d++)p(d);return s.push(r.substr(f)),s}var Cr=be(null,(function(e){return{onReplace:function(t,n,r,o){e(dr(t,n,r,o))}}}))((function(e){var t=e.matches,n=e.count,r=e.contextReplacement,o=Sr(Object(T.useState)(Tr(t)),2),a=o[0],i=o[1],l=jr(e,a,i);return Object(T.useEffect)((function(){i(Tr(t))}),[r]),j.a.createElement("div",{className:"searchregex-match__context"},l,t.length!==n&&j.a.createElement(br,null))}));var Rr=function(e){var t=e.item,n=e.rowId,r=e.contextReplacement,o=e.isReplacing,a=e.column,i=t.context,l=t.match_count,u=t.matches,c=a.column_id,s=a.column_label;return j.a.createElement("div",{className:"searchregex-match"},j.a.createElement("div",{className:"searchregex-match__column",title:c},s),j.a.createElement(Cr,{source:i,matches:u,count:l,contextReplacement:r,columnId:c,rowId:n,isReplacing:o}))};function Nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ar(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ir=function(e){var t=e.replacement,n=e.rowId,r=e.isReplacing,o=e.column,a=o.contexts,i=o.context_count,l=o.match_count,u=Nr(Object(T.useState)(!1),2),c=u[0],s=u[1],f=a.slice(0,c?a.length:2),p=l-f.reduce((function(e,t){return e+t.match_count}),0);return j.a.createElement(j.a.Fragment,null,f.map((function(e){return j.a.createElement(Rr,{item:e,key:n+"-"+e.context_id,column:o,rowId:n,contextReplacement:t,isReplacing:r})})),!c&&a.length>2&&j.a.createElement("p",null,j.a.createElement("button",{className:"button button-secondary",onClick:function(){return s(!0)}},Object(N.translate)("Show %s more","Show %s more",{count:p,args:Object(N.numberFormat)(p)}))),c&&a.length!==i&&j.a.createElement(br,null))};var Dr=!!document.documentElement.currentStyle,Lr={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Fr=["letter-spacing","line-height","font-family","font-weight","font-size","font-style","tab-size","text-rendering","text-transform","width","text-indent","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","box-sizing"],Mr={},zr=document.createElement("textarea"),Ur=function(e){Object.keys(Lr).forEach((function(t){e.style.setProperty(t,Lr[t],"important")}))};function Hr(e,t,n,r,o){void 0===n&&(n=!1),void 0===r&&(r=null),void 0===o&&(o=null),null===zr.parentNode&&document.body.appendChild(zr);var a=function(e,t,n){void 0===n&&(n=!1);if(n&&Mr[t])return Mr[t];var r=window.getComputedStyle(e);if(null===r)return null;var o=Fr.reduce((function(e,t){return e[t]=r.getPropertyValue(t),e}),{}),a=o["box-sizing"];if(""===a)return null;Dr&&"border-box"===a&&(o.width=parseFloat(o.width)+parseFloat(r["border-right-width"])+parseFloat(r["border-left-width"])+parseFloat(r["padding-right"])+parseFloat(r["padding-left"])+"px");var i=parseFloat(o["padding-bottom"])+parseFloat(o["padding-top"]),l=parseFloat(o["border-bottom-width"])+parseFloat(o["border-top-width"]),u={sizingStyle:o,paddingSize:i,borderSize:l,boxSizing:a};n&&(Mr[t]=u);return u}(e,t,n);if(null===a)return null;var i=a.paddingSize,l=a.borderSize,u=a.boxSizing,c=a.sizingStyle;Object.keys(c).forEach((function(e){zr.style[e]=c[e]})),Ur(zr),zr.value=e.value||e.placeholder||"x";var s=-1/0,f=1/0,p=zr.scrollHeight;"border-box"===u?p+=l:"content-box"===u&&(p-=i),zr.value="x";var d=zr.scrollHeight-i,h=Math.floor(p/d);return null!==r&&(s=d*r,"border-box"===u&&(s=s+i+l),p=Math.max(s,p)),null!==o&&(f=d*o,"border-box"===u&&(f=f+i+l),p=Math.min(f,p)),{height:p,minHeight:s,maxHeight:f,rowCount:Math.floor(p/d),valueRowCount:h}}zr.setAttribute("tab-index","-1"),zr.setAttribute("aria-hidden","true"),Ur(zr);var Wr=function(){},Br=0,$r=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this)._onRef=function(e){n._ref=e;var t=n.props.inputRef;"function"!=typeof t?t.current=e:t(e)},n._onChange=function(e){n._controlled||n._resizeComponent(),n.props.onChange(e,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n))},n._resizeComponent=function(e){void 0===e&&(e=Wr);var t=Hr(n._ref,n._uid,n.props.useCacheForDOMMeasurements,n.props.minRows,n.props.maxRows);if(null!==t){var r=t.height,o=t.minHeight,a=t.maxHeight,i=t.rowCount,l=t.valueRowCount;n.rowCount=i,n.valueRowCount=l,n.state.height===r&&n.state.minHeight===o&&n.state.maxHeight===a?e():n.setState({height:r,minHeight:o,maxHeight:a},e)}else e()},n.state={height:t.style&&t.style.height||0,minHeight:-1/0,maxHeight:1/0},n._uid=Br++,n._controlled=void 0!==t.value,n._resizeLock=!1,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.render=function(){var e=this.props,t=(e.inputRef,e.maxRows,e.minRows,e.onHeightChange,e.useCacheForDOMMeasurements,B(e,["inputRef","maxRows","minRows","onHeightChange","useCacheForDOMMeasurements"]));return t.style=W({},t.style,{height:this.state.height}),Math.max(t.style.maxHeight||1/0,this.state.maxHeight)<this.state.height&&(t.style.overflow="hidden"),Object(T.createElement)("textarea",W({},t,{onChange:this._onChange,ref:this._onRef}))},o.componentDidMount=function(){var e=this;this._resizeComponent(),this._resizeListener=function(){e._resizeLock||(e._resizeLock=!0,e._resizeComponent((function(){e._resizeLock=!1})))},window.addEventListener("resize",this._resizeListener)},o.componentDidUpdate=function(e,t){e!==this.props&&this._resizeComponent(),this.state.height!==t.height&&this.props.onHeightChange(this.state.height,this)},o.componentWillUnmount=function(){window.removeEventListener("resize",this._resizeListener),function(e){delete Mr[e]}(this._uid)},r}(T.Component);$r.defaultProps={inputRef:Wr,onChange:Wr,onHeightChange:Wr,useCacheForDOMMeasurements:!1};var Vr=$r;function qr(e){return(qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qr(){return(Qr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kr(e,t){return(Kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zr(e);if(t){var o=Zr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xr(this,n)}}function Xr(e,t){return!t||"object"!==qr(t)&&"function"!=typeof t?Jr(e):t}function Jr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zr(e){return(Zr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function to(e){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function no(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ro(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oo(e,t){return(oo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ao(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uo(e);if(t){var o=uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return io(this,n)}}function io(e,t){return!t||"object"!==to(t)&&"function"!=typeof t?lo(e):t}function lo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uo(e){return(uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function co(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var so,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oo(e,t)}(a,e);var t,n,r,o=ao(a);function a(){var e;no(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return co(lo(e=o.call.apply(o,[this].concat(n))),"handleClickOutside",(function(){e.props.onClose()})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props.onClose;return j.a.createElement("div",{className:"redirection-modal_content"},j.a.createElement("div",{className:"redirection-modal_close"},j.a.createElement("button",{onClick:e},"✖")),this.props.children)}}])&&ro(t.prototype,n),r&&ro(t,r),a}(j.a.Component),po=(so=fo,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kr(e,t)}(a,e);var t,n,r,o=Yr(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),eo(Jr(t=o.call(this,e)),"onClick",(function(e){t.node.current&&null===e.target.closest(".redirect-click-outside")&&t.node.current.handleClickOutside(e)})),eo(Jr(t),"onKeydown",(function(e){"Escape"===e.key&&t.node.current.handleClickOutside(e)})),t.node=j.a.createRef(),t}return t=a,(n=[{key:"componentDidMount",value:function(){addEventListener("mousedown",this.onClick),addEventListener("keydown",this.onKeydown)}},{key:"componentWillUnmount",value:function(){removeEventListener("mousedown",this.onClick),removeEventListener("keydown",this.onKeydown)}},{key:"render",value:function(){return j.a.createElement("div",{className:"redirect-click-outside"},j.a.createElement(so,Qr({},this.props,{ref:this.node})))}}])&&Gr(t.prototype,n),r&&Gr(t,r),a}(j.a.Component));n(62);function ho(e){Object(T.useEffect)((function(){return document.body.classList.add("redirection-modal_shown"),function(){document.body.classList.remove("redirection-modal_shown")}}));var t=gn()({"redirection-modal_wrapper":!0,"redirection-modal_wrapper-padding":e.padding});return j.a.createElement("div",{className:t},j.a.createElement("div",{className:"redirection-modal_backdrop"}),j.a.createElement("div",{className:"redirection-modal_main"},j.a.createElement(po,e)))}ho.defaultProps={padding:!0,onClose:function(){}};var mo=function(e){return R.a.createPortal(j.a.createElement(ho,e),document.getElementById("react-modal"))};n(64);function go(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bo=be((function(e){var t=e.search;return{rawData:t.rawData,status:t.status}}),(function(e){return{onLoad:function(t,n){e(function(e,t){return function(n){return jt(Ot.loadRow(e,t)).then((function(e){n({type:"SEARCH_LOAD_ROW_COMPLETE",rowId:t,row:e.result})})).catch((function(e){n({type:Ce,error:e})})),n({type:"SEARCH_REPLACE_ROW",rowId:t})}}(t,n))},onSave:function(t,n,r,o){e(function(e,t,n,r){return function(o,a){var i=a().search.search,l=i.searchPhrase,u=i.searchFlags,c=i.replacement,s=i.sourceFlags,f={searchPhrase:l,replacement:c,searchFlags:Object.keys(u),sourceFlags:Object.keys(s)};return jt(Ot.saveRow(e,t,cr(cr({},f),{},{columnId:n,content:r}))).then((function(e){o(cr(cr({type:"SEARCH_SAVE_ROW_COMPLETE"},e),{},{rowId:t}))})).catch((function(e){o({type:Ce,error:e})})),o({type:"SEARCH_REPLACE_ROW",rowId:t})}}(t,n,r,o))}}}))((function(e){var t=e.result,n=e.onClose,r=e.onLoad,o=e.rawData,a=e.onSave,i=e.status,l=t.row_id,u=t.source_type,c=t.columns,s=go(Object(T.useState)(c[0].column_id),2),f=s[0],p=s[1],d=go(Object(T.useState)(""),2),h=d[0],m=d[1],g=c.find((function(e){return e.column_id===f}))?c.find((function(e){return e.column_id===f})).column_label:"";return Object(T.useEffect)((function(){r(u,l)}),[]),Object(T.useEffect)((function(){o&&m(o[f]?o[f]:"")}),[o]),o?j.a.createElement(mo,{onClose:n},j.a.createElement("div",{className:"searchregex-editor"},j.a.createElement("h2",null,Object(N.translate)("Editing %s",{args:g})),j.a.createElement(Vr,{value:h,rows:"15",maxRows:30,onChange:function(e){return m(e.target.value)},disabled:i===Se}),j.a.createElement("div",{className:"searchregex-editor__actions"},1===c.length&&j.a.createElement("div",null," "),c.length>1&&j.a.createElement(It,{name:"column_id",value:f,items:c.map((function(e){return{value:e.column_id,label:e.column_label}})),onChange:function(e){return t=e.target.value,p(t),void m(o[t]?o[t]:"");var t},isEnabled:i!==Se}),j.a.createElement("div",null,i===Se&&j.a.createElement(yr,null),j.a.createElement("button",{disabled:i===Se,className:"button button-primary",onClick:function(){n(),a(u,l,f,h)}},Object(N.translate)("Save")),j.a.createElement("button",{className:"button button-secondary",onClick:function(){return n()}},Object(N.translate)("Close")))))):null}));n(66);function vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eo(e,t){return null===t||t.length>0?t:e}function xo(e){var t=e.view,n=e.title;return t?j.a.createElement(fn,{url:t},n):n}var _o=be((function(e){var t=e.search;return{replacing:t.replacing,globalReplacement:t.search.replacement}}),null)((function(e){var t=e.result,n=e.globalReplacement,r=e.replacing,o=t.columns,a=t.actions,i=t.row_id,l=t.source_name,u=t.source_type,c=t.title,s=t.match_count,f=-1!==r.indexOf(i),p=vo(Object(T.useState)(""),2),d=p[0],h=p[1],m=vo(Object(T.useState)(!1),2),g=m[0],y=m[1];return Object(T.useEffect)((function(){h("")}),[n]),j.a.createElement("tr",{className:gn()("searchregex-result",{"searchregex-result__updating":f})},j.a.createElement("td",{className:"searchregex-result__table"},j.a.createElement("span",{title:u},l)),j.a.createElement("td",{className:"searchregex-result__row"},i),j.a.createElement("td",{className:"searchregex-result__row"},s),j.a.createElement("td",{className:"searchregex-result__match"},j.a.createElement("h2",null,j.a.createElement(xo,{view:a.view,title:c})),o.map((function(e){return j.a.createElement(Ir,{column:e,replacement:Eo(n,d),rowId:i,isReplacing:f,key:e.column_id})}))),j.a.createElement("td",{className:"searchregex-result__action"},f?j.a.createElement(yr,null):j.a.createElement(gr,{actions:a,setReplacement:h,result:t,onEditor:function(){return y(!0)},description:Object(N.translate)("Replace %(count)s match.","Replace %(count)s matches.",{count:s,args:{count:Object(N.numberFormat)(s)}})}),g&&j.a.createElement(bo,{onClose:function(){return y(!1)},result:t})))}));var So=function(e){for(var t=e.columns,n=[],r=0;r<t;r++)n.push(j.a.createElement("td",{key:r,colSpan:0==r?2:1},j.a.createElement(qt,null)));return j.a.createElement("tr",null,n)};var Oo=function(e){var t=e.columns;return j.a.createElement("tr",null,j.a.createElement("td",{colSpan:t},Object(N.translate)("No more matching results found.")))},ko=function(e){var t=e.title,n=e.button,r=e.className,o=e.enabled,a=e.onClick;return o?j.a.createElement("a",{className:r+" button",href:"#",onClick:function(e){e.preventDefault(),a()}},j.a.createElement("span",{className:"screen-reader-text"},t),j.a.createElement("span",{"aria-hidden":"true"},n)):j.a.createElement("span",{className:"tablenav-pages-navspan button disabled","aria-hidden":"true"},n)};var Po=be((function(e){return{search:e.search.search}}),(function(e){return{onChangePage:function(t,n){e(pr(t,n))}}}))((function(e){var t=e.progress,n=e.onChangePage,r=e.isLoading,o=e.matchedPhrases,a=e.matchedRows,i=e.perPage,l=e.search,u=e.noTotal,c=void 0!==u&&u,s=t.current,f=t.previous,p=t.next,d=Math.round(a/i),h=Math.round(s/i),m=p&&h<d;return j.a.createElement("div",{className:"tablenav-pages"},c&&j.a.createElement("div",null," "),!c&&j.a.createElement("div",{className:"displaying-num"},Object(N.translate)("Matches: %(phrases)s across %(rows)s database row.","Matches: %(phrases)s across %(rows)s database rows.",{count:a,args:{phrases:Object(N.numberFormat)(o),rows:Object(N.numberFormat)(a)}})),j.a.createElement("div",{className:"pagination-links"},j.a.createElement(ko,{title:Object(N.translate)("First page"),button:"«",className:"first-page",enabled:!1!==f&&!r,onClick:function(){return n(l,0)}}),j.a.createElement(ko,{title:Object(N.translate)("Prev page"),button:"‹",className:"prev-page",enabled:!1!==f&&!r,onClick:function(){return n(l,f)}}),j.a.createElement("span",{className:"tablenav-paging-text"},Object(N.translate)("Page %(current)s of %(total)s",{args:{current:Object(N.numberFormat)(h+1),total:Object(N.numberFormat)(Math.max(1,d+1))}})),j.a.createElement(ko,{title:Object(N.translate)("Next page"),button:"›",className:"next-page",enabled:m&&!r,onClick:function(){return n(l,p)}}),j.a.createElement(ko,{title:Object(N.translate)("Last page"),button:"»",className:"last-page",enabled:m&&!r,onClick:function(){return n(l,(d-1)*i)}})))})),To=function(e,t){return!1===t?100:t/e*100},jo=function(e,t){return 0===t?t:t/e*100};var Co=be((function(e){return{search:e.search.search}}),(function(e){return{onChangePage:function(t,n,r){e(pr(t,n,r))}}}))((function(e){var t=e.total,n=e.progress,r=e.onChangePage,o=e.isLoading,a=e.searchDirection,i=e.search,l=e.noTotal,u=void 0!==l&&l,c=n.previous,s=n.next;return j.a.createElement("div",{className:"tablenav-pages"},u&&j.a.createElement("div",null," "),!u&&j.a.createElement("div",{className:"displaying-num"},Object(N.translate)("%s database row in total","%s database rows in total",{count:t,args:Object(N.numberFormat)(t)})),j.a.createElement("div",{className:"pagination-links"},j.a.createElement(ko,{title:Object(N.translate)("First page"),button:"«",className:"first-page",enabled:!1!==c&&!o,onClick:function(){return r(i,0,"forward")}}),j.a.createElement(ko,{title:Object(N.translate)("Prev page"),button:"‹",className:"prev-page",enabled:!1!==c&&!o,onClick:function(){return r(i,c,"backward")}}),j.a.createElement("span",{className:"tablenav-paging-text"},Object(N.translate)("Progress %(current)s%%",{args:{current:Object(N.numberFormat)("forward"===a?To(t,s):jo(t,0==s?c:s))}})),j.a.createElement(ko,{title:Object(N.translate)("Next page"),button:"›",className:"next-page",enabled:!1!==s&&!o,onClick:function(){return r(i,s,"forward")}})))}));n(68);function Ro(){return(Ro=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var No=function(e){var t=e.totals,n=e.searchDirection,r=t.matched_rows,o=t.matched_phrases,a=t.rows;return null===r?j.a.createElement("div",{className:"tablenav-pages"},j.a.createElement("div",{className:"displaying-num"}," ")):r>0?j.a.createElement(Po,Ro({},e,{matchedRows:r,matchedPhrases:o,total:a})):j.a.createElement(Co,Ro({},e,{total:a,searchDirection:n}))};n(70);var Ao=be((function(e){var t=e.search,n=t.results,r=t.status,o=t.progress,a=t.totals,i=t.requestCount;return{results:n,status:r,progress:o,searchDirection:t.searchDirection,totals:a,requestCount:i,search:t.search,showLoading:t.showLoading}}),(function(e){return{onSearchMore:function(t,n){e(function(e,t){return function(n,r){var o=cr(cr({},fr(e)),{},{page:t,searchDirection:r().search.searchDirection});return jt(St.get(o)).then((function(e){n(cr(cr({type:"SEARCH_COMPLETE"},e),{},{perPage:o.perPage}))})).catch((function(e){n({type:Ce,error:e})})),n(cr({type:"SEARCH_START_MORE"},o))}}(t,n))},onSetError:function(t){e(function(e){return{type:Ce,error:e}}(t))}}}))((function(e){var t=e.results,n=e.totals,r=e.progress,o=e.status,a=e.requestCount,i=e.search,l=e.searchDirection,u=e.showLoading,c=i.searchFlags,s=i.perPage,f=e.onSearchMore,p=e.onChangePage,d=e.onSetError,h=o===Se;return Object(T.useEffect)((function(){a>100?d(Object(N.translate)("Maximum number of page requests has been exceeded and the search stopped. Try to be more specific with your search term.")):Object.keys(c).length>0&&function(e,t,n,r){return e===Se&&t>0&&n.length!==r}(o,a,t,s)&&function(e,t){return"forward"===e&&!1!==t.next||"backward"===e&&!1!==t.previous}(l,r)&&f(i,"forward"===l?r.next:r.previous)}),[a]),j.a.createElement(j.a.Fragment,null,j.a.createElement(No,{totals:n,onChangePage:p,perPage:s,isLoading:h,progress:r,searchDirection:l}),j.a.createElement("table",{className:gn()("wp-list-table","widefat","fixed","striped","items","searchregex-results")},j.a.createElement("thead",null,j.a.createElement("tr",null,j.a.createElement("th",{className:"searchregex-result__table"},Object(N.translate)("Source")),j.a.createElement("th",{className:"searchregex-result__row"},Object(N.translate)("Row ID")),j.a.createElement("th",{className:"searchregex-result__matches"},Object(N.translate)("Matches")),j.a.createElement("th",{className:"searchregex-result__match"},Object(N.translate)("Matched Phrases")),j.a.createElement("th",{className:"searchregex-result__action"},Object(N.translate)("Actions")))),j.a.createElement("tbody",null,t.map((function(e,t){return j.a.createElement(_o,{key:t,result:e})})),u&&j.a.createElement(So,{columns:4}),!h&&0===t.length&&j.a.createElement(Oo,{columns:5}))),j.a.createElement(No,{totals:n,onChangePage:p,perPage:s,isLoading:h,progress:r,searchDirection:l,noTotal:!0}))})),Io=function(e,t){return e===Se||0===t.length},Do=function(e,t,n){return e===Se||0===t.length||t===n||null!==n&&0===n.length};var Lo=be((function(e){var t=e.search;return{search:t.search,status:t.status,replaceAll:t.replaceAll,canCancel:t.canCancel}}),(function(e){return{onCancel:function(){e({type:"SEARCH_CANCEL",clearAll:!1})},onSearch:function(t,n,r){e(pr(t,n,r))},onReplace:function(t,n,r){e(function(e,t,n){return function(r,o){return jt(St.replace(cr(cr({},e),{},{replacePhrase:e.replacement,page:t,perPage:n,searchFlags:Object.keys(e.searchFlags)}))).then((function(e){r(cr({type:"SEARCH_REPLACE_ALL_COMPLETE"},e))})).catch((function(e){r({type:Ce,error:e})})),r({type:"SEARCH_REPLACE_ALL"})}}(t,n,r))}}}))((function(e){var t=e.search,n=e.status,r=e.onSearch,o=e.onReplace,a=e.onCancel,i=e.replaceAll,l=e.canCancel,u=t.searchPhrase,c=t.replacement;return j.a.createElement("div",{className:"searchregex-search__action"},j.a.createElement("input",{className:"button button-primary",type:"submit",value:Object(N.translate)("Search"),onClick:function(){return r(t,0,"forward")},disabled:Io(n,u)||i}),j.a.createElement("input",{className:"button button-delete",type:"submit",value:Object(N.translate)("Replace All"),onClick:function(){return o(t,0,50)},disabled:Do(n,u,c)||i}),n===Se&&l&&j.a.createElement(j.a.Fragment,null,j.a.createElement("button",{className:"button button-delete",onClick:a},Object(N.translate)("Cancel")),j.a.createElement(yr,null)))}));function Fo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Uo(e,t,n){return(Uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ho(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wo(e,t){return(Wo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Bo=function(e){return function(e){function t(){return Fo(this,t),zo(this,Ho(t).apply(this,arguments))}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wo(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(){var e=this,t=Date.now(),n=!1;Object.keys(this.paths).forEach((function(r){var o=e.paths[r];if(o){n=!0;var a=o.style;a.transitionDuration=".3s, .3s, .3s, .06s",e.prevTimeStamp&&t-e.prevTimeStamp<100&&(a.transitionDuration="0s, 0s")}})),n&&(this.prevTimeStamp=Date.now())}},{key:"render",value:function(){return Uo(Ho(t.prototype),"render",this).call(this)}}])&&Mo(n.prototype,r),o&&Mo(n,o),t}(e)},$o={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},Vo=D.a.oneOfType([D.a.number,D.a.string]),qo={className:D.a.string,percent:D.a.oneOfType([Vo,D.a.arrayOf(Vo)]),prefixCls:D.a.string,strokeColor:D.a.oneOfType([D.a.string,D.a.arrayOf(D.a.oneOfType([D.a.string,D.a.object])),D.a.object]),strokeLinecap:D.a.oneOf(["butt","round","square"]),strokeWidth:Vo,style:D.a.object,trailColor:D.a.string,trailWidth:Vo};function Qo(){return(Qo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Go(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Zo(e):t}function Jo(e){return(Jo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ea(e,t){return(ea=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ta(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var na=function(e){function t(){var e,n;Ko(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return ta(Zo(n=Xo(this,(e=Jo(t)).call.apply(e,[this].concat(o)))),"paths",{}),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ea(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.percent,o=t.prefixCls,a=t.strokeColor,i=t.strokeLinecap,l=t.strokeWidth,u=t.style,c=t.trailColor,s=t.trailWidth,f=t.transition,p=Go(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete p.gapPosition;var d=Array.isArray(r)?r:[r],h=Array.isArray(a)?a:[a],m=l/2,g=100-l/2,y="M ".concat("round"===i?m:0,",").concat(m,"\n L ").concat("round"===i?g:100,",").concat(m),b="0 0 100 ".concat(l),v=0;return j.a.createElement("svg",Qo({className:"".concat(o,"-line ").concat(n),viewBox:b,preserveAspectRatio:"none",style:u},p),j.a.createElement("path",{className:"".concat(o,"-line-trail"),d:y,strokeLinecap:i,stroke:c,strokeWidth:s||l,fillOpacity:"0"}),d.map((function(t,n){var r={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(v,"px"),transition:f||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=h[n]||h[h.length-1];return v+=t,j.a.createElement("path",{key:n,className:"".concat(o,"-line-path"),d:y,strokeLinecap:i,stroke:a,strokeWidth:l,fillOpacity:"0",ref:function(t){e.paths[n]=t},style:r})})))}}])&&Yo(n.prototype,r),o&&Yo(n,o),t}(T.Component);na.propTypes=qo,na.defaultProps=$o;var ra=Bo(na);function oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oa(n,!0).forEach((function(t){pa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oa(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ia(){return(ia=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function la(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ca(e){return(ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fa(e,t){return(fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var da=0;function ha(e){return+e.replace("%","")}function ma(e){return Array.isArray(e)?e:[e]}function ga(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,i=50-r/2,l=0,u=-i,c=0,s=-2*i;switch(a){case"left":l=-i,u=0,c=2*i,s=0;break;case"right":l=i,u=0,c=-2*i,s=0;break;case"bottom":u=i,s=2*i}var f="M 50,50 m ".concat(l,",").concat(u,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(c,",").concat(-s,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(-c,",").concat(s),p=2*Math.PI*i,d={stroke:n,strokeDasharray:"".concat(t/100*(p-o),"px ").concat(p,"px"),strokeDashoffset:"-".concat(o/2+e/100*(p-o),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:f,pathStyle:d}}var ya=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?sa(e):t}(this,ca(t).call(this)),pa(sa(e),"paths",{}),pa(sa(e),"gradientId",0),e.gradientId=da,da+=1,e}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fa(e,t)}(t,e),n=t,(r=[{key:"getStokeList",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.percent,o=t.strokeColor,a=t.strokeWidth,i=t.strokeLinecap,l=t.gapDegree,u=t.gapPosition,c=ma(r),s=ma(o),f=0;return c.map((function(t,r){var o=s[r]||s[s.length-1],c="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(e.gradientId,")"):"",p=ga(f,t,o,a,l,u),d=p.pathString,h=p.pathStyle;return f+=t,j.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:d,stroke:c,strokeLinecap:i,strokeWidth:0===t?0:a,fillOpacity:"0",style:h,ref:function(t){e.paths[r]=t}})}))}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.strokeWidth,r=e.trailWidth,o=e.gapDegree,a=e.gapPosition,i=e.trailColor,l=e.strokeLinecap,u=e.style,c=e.className,s=e.strokeColor,f=la(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor"]),p=ga(0,100,i,n,o,a),d=p.pathString,h=p.pathStyle;delete f.percent;var m=ma(s).find((function(e){return"[object Object]"===Object.prototype.toString.call(e)}));return j.a.createElement("svg",ia({className:"".concat(t,"-circle ").concat(c),viewBox:"0 0 100 100",style:u},f),m&&j.a.createElement("defs",null,j.a.createElement("linearGradient",{id:"".concat(t,"-gradient-").concat(this.gradientId),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(m).sort((function(e,t){return ha(e)-ha(t)})).map((function(e,t){return j.a.createElement("stop",{key:t,offset:e,stopColor:m[e]})})))),j.a.createElement("path",{className:"".concat(t,"-circle-trail"),d:d,stroke:i,strokeLinecap:l,strokeWidth:r||n,fillOpacity:"0",style:h}),this.getStokeList().reverse())}}])&&ua(n.prototype,r),o&&ua(n,o),t}(T.Component);ya.propTypes=aa({},qo,{gapPosition:D.a.oneOf(["top","bottom","left","right"])}),ya.defaultProps=aa({},$o,{gapPosition:"top"});Bo(ya),n(72);var ba=be((function(e){var t=e.search,n=t.progress,r=t.totals,o=t.requestCount,a=t.replaceCount,i=t.phraseCount;return{status:t.status,progress:n,totals:r,requestCount:o,replaceCount:a,phraseCount:i,isRegex:void 0!==t.search.searchFlags.regex}}),(function(e){return{onCancel:function(){e({type:"SEARCH_CANCEL",clearAll:!0})},onNext:function(t){e(function(e){return function(t,n){var r=cr(cr({},fr(n().search.search)),{},{page:e});return jt(St.replace(r)).then((function(e){t(cr({type:"SEARCH_REPLACE_ALL_COMPLETE"},e))})).catch((function(e){t({type:Ce,error:e})})),t({type:"SEARCH_REPLACE_ALL_MORE"})}}(t))}}}))((function(e){var t=e.progress,n=e.totals,r=e.requestCount,o=e.replaceCount,a=e.onNext,i=e.status,l=e.onCancel,u=e.phraseCount,c=e.isRegex?n.rows:n.matched_rows,s=void 0===t.rows?0:t.current+t.rows,f=c>0?Math.round(s/c*100):0;return Object(T.useEffect)((function(){r>0&&!1!==t.next&&o<c&&i===Se&&a(t.next)}),[r]),j.a.createElement("div",{className:"searchregex-replaceall"},j.a.createElement("h3",null,Object(N.translate)("Replace progress")),j.a.createElement("div",{className:"searchregex-replaceall__progress"},j.a.createElement(ra,{percent:f,strokeWidth:"4",trailWidth:"4",strokeLinecap:"square"}),j.a.createElement("div",{className:"searchregex-replaceall__status"},"".concat(f,"%"))),i===Oe&&j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Object(N.translate)("Finished!")),j.a.createElement("p",null,Object(N.translate)("Rows updated: %s",{args:Object(N.numberFormat)(o)})),j.a.createElement("p",null,Object(N.translate)("Phrases replaced: %s",{args:Object(N.numberFormat)(u)})),j.a.createElement("button",{className:"button button-primary",onClick:l},Object(N.translate)("Finished!"))))}));n(74);var va=be((function(e){var t=e.search;return{status:t.status,replaceAll:t.replaceAll}}),null)((function(e){var t=e.status,n=e.replaceAll;return j.a.createElement(j.a.Fragment,null,j.a.createElement("div",{className:"inline-notice inline-warning"},j.a.createElement("p",null,Object(N.translate)("You are advised to backup your data before making modifications."))),j.a.createElement("p",null,Object(N.translate)("Search and replace information in your database.")),j.a.createElement("form",{className:"searchregex-search",onSubmit:function(e){return e.preventDefault()}},j.a.createElement(mr,null),j.a.createElement(Lo,null)),t&&(n?j.a.createElement(ba,null):j.a.createElement(Ao,null)))}));function wa(e){return 0===e.code?e.message:e.data&&e.data.wpdb?j.a.createElement("span",null,"".concat(e.message," (").concat(e.code,")"),": ",j.a.createElement("code",null,e.data.wpdb)):e.code?j.a.createElement(j.a.Fragment,null,e.message," (",j.a.createElement("code",null,e.code),")"):e.message}var Ea=function(e){var t,n,r,o,a=e.error;if(0===a.code)return j.a.createElement("p",null,Object(N.translate)("WordPress did not return a response. This could mean an error occurred or that the request was blocked. Please check your server error_log."));if("rest_cookie_invalid_nonce"===a.code)return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,wa(a)),j.a.createElement("p",null,Object(N.translate)("Your REST API is being cached. Please clear any caching plugin and any server cache, logout, clear your browser cache, and try again.")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/cloudflare/"},Object(N.translate)("Read this REST API guide for more information."))));if(a.request&&function(e,t){return(-1!==[400,401,403,405].indexOf(e)||"rest_no_route"===t)&&0===parseInt(t,10)}(a.request.status,a.code))return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,wa(a)),j.a.createElement("p",null,Object(N.translate)("Your REST API is probably being blocked by a security plugin. Please disable this, or configure it to allow REST API requests.")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/"},Object(N.translate)("Read this REST API guide for more information."))));if(a.request&&404===a.request.status)return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,wa(a)),j.a.createElement("p",null,Object(N.translate)("Your REST API is returning a 404 page. This may be caused by a security plugin, or your server may be misconfigured")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/"},Object(N.translate)("Read this REST API guide for more information."))));if(a.request&&413===a.request.status)return j.a.createElement("p",null,Object(N.translate)("Your server has rejected the request for being too big. You will need to change it to continue."));if(a.request&&function(e){return-1!==[500,502,503].indexOf(e)}(a.request.status))return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,wa(a)),j.a.createElement("p",null,Object(N.translate)("This could be a security plugin, or your server is out of memory or has an external error. Please check your server error log")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/#http"},Object(N.translate)("Read this REST API guide for more information."))));if("disabled"===a.code||"rest_disabled"===a.code)return j.a.createElement("p",null,Object(N.translate)("Your WordPress REST API has been disabled. You will need to enable it for Search Regex to continue working"));if(-1!==a.message.indexOf("Unexpected token")||-1!==a.message.indexOf("JSON parse error")){var i=(t=a.request,n=t.raw,r=n.split("<br />").filter((function(e){return e})),(o=n.lastIndexOf("}"))!==n.length?n.substr(o+1).trim():r.slice(0,r.length-1).join(" ").trim());return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,wa(a)),j.a.createElement("p",null,Object(N.translate)("WordPress returned an unexpected message. This is probably a PHP error from another plugin.")),i.length>1&&j.a.createElement("p",null,j.a.createElement("strong",null,Object(N.translate)("Possible cause"),":")," ",j.a.createElement("code",null,i.substr(0,1e3))))}var l=a.message.toLowerCase();return"failed to fetch"===l||"not allowed to request resource"===l||-1!==l.indexOf("networkerror")?j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,wa(a)),j.a.createElement("p",null,Object(N.translate)("Unable to make request due to browser security. This is typically because your WordPress and Site URL settings are inconsistent, or the request was blocked by your site CORS policy.")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/#url"},Object(N.translate)("Read this REST API guide for more information.")))):j.a.createElement("p",null,wa(a))};function xa(e){return(xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sa(e,t){return(Sa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ta(e);if(t){var o=Ta(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ka(this,n)}}function ka(e,t){return!t||"object"!==xa(t)&&"function"!=typeof t?Pa(e):t}function Pa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ta(e){return(Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ca=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sa(e,t)}(a,e);var t,n,r,o=Oa(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),ja(Pa(t=o.call(this,e)),"onShow",(function(e){e.preventDefault(),t.setState({hide:!1})})),ja(Pa(t),"onHide",(function(e){e.preventDefault(),t.setState({hide:!0})}));var n=t.props.error.request;return t.state={hide:t.doesNeedHiding(n)},t}return t=a,(n=[{key:"doesNeedHiding",value:function(e){return e&&e.raw&&e.raw.length>500}},{key:"render",value:function(){var e=this.props.error.request,t=this.state.hide,n=this.doesNeedHiding(e);return e&&e.raw?j.a.createElement(j.a.Fragment,null,n&&t&&j.a.createElement("a",{className:"api-result-hide",onClick:this.onShow,href:"#"},Object(N.translate)("Show Full")),n&&!t&&j.a.createElement("a",{className:"api-result-hide",onClick:this.onHide,href:"#"},Object(N.translate)("Hide")),j.a.createElement("pre",null,t?e.raw.substr(0,500)+" ...":e.raw)):null}}])&&_a(t.prototype,n),r&&_a(t,r),a}(j.a.Component),Ra=function(e,t){var n=function(e){return e.code?e.code:e.name?e.name:null}(e);return j.a.createElement("div",{className:"api-result-log_details",key:t},j.a.createElement("p",null,j.a.createElement("span",{className:"dashicons dashicons-no"})),j.a.createElement("div",null,j.a.createElement("p",null,t.map((function(t,n){return j.a.createElement("span",{key:n,className:"api-result-method_fail"},t," ",e.data&&e.data.status)})),n&&j.a.createElement("strong",null,n,": "),e.message),j.a.createElement(Ea,{error:e}),j.a.createElement(Ca,{error:e})))},Na=function(e){return j.a.createElement("p",{key:e},j.a.createElement("span",{className:"dashicons dashicons-yes"}),e.map((function(e,t){return j.a.createElement("span",{key:t,className:"api-result-method_pass"},e)})),Object(N.translate)("Working!"))},Aa=function(e){return e.code?e.code:0},Ia=function(e){var t=e.result,n=[],r=t.GET,o=t.POST;return r.status===o.status&&Aa(r)===Aa(o)?("fail"===r.status?n.push(Ra(r.error,["GET","POST"])):n.push(Na(["GET","POST"])),n):("fail"===r.status?n.push(Ra(r.error,["GET"])):n.push(Na(["GET"])),"fail"===o.status?n.push(Ra(o.error,["POST"])):n.push(Na(["POST"])),n)},Da=function(e){var t=e.item,n=e.result,r=e.routes,o=e.isCurrent,a=e.allowChange;return function(e){return 0===Object.keys(e).length||"loading"===e.GET.status||"loading"===e.POST.status}(n)?null:j.a.createElement("div",{className:"api-result-log"},j.a.createElement("form",{className:"api-result-select",action:SearchRegexi10n.pluginRoot+"&sub=support",method:"POST"},a&&!o&&j.a.createElement("input",{type:"submit",className:"button button-secondary",value:Object(N.translate)("Switch to this API")}),a&&o&&j.a.createElement("span",null,Object(N.translate)("Current API")),j.a.createElement("input",{type:"hidden",name:"rest_api",value:t.value}),j.a.createElement("input",{type:"hidden",name:"_wpnonce",value:gt()}),j.a.createElement("input",{type:"hidden",name:"action",value:"rest_api"})),j.a.createElement("h4",null,t.text),j.a.createElement("p",null,"URL: ",j.a.createElement("code",null,j.a.createElement(fn,{url:r[t.value]},r[t.value]))),j.a.createElement(Ia,{result:n}))};n(76);function La(e){return(La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ma(e,t){return(Ma=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function za(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wa(e);if(t){var o=Wa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ua(this,n)}}function Ua(e,t){return!t||"object"!==La(t)&&"function"!=typeof t?Ha(e):t}function Ha(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wa(e){return(Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $a="warning-not-selected",Va=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ma(e,t)}(a,e);var t,n,r,o=za(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Ba(Ha(t=o.call(this,e)),"onRetry",(function(e){e.preventDefault,t.setState({showing:!1}),t.onTry()})),Ba(Ha(t),"onShow",(function(){t.setState({showing:!0})})),t.state={showing:!1},t}return t=a,(n=[{key:"componentDidMount",value:function(){this.onTry()}},{key:"onTry",value:function(){var e=this.props.routes,t=Object.keys(e).map((function(t){return{id:t,url:e[t]}}));this.props.onCheckApi(t.filter((function(e){return e})))}},{key:"getPercent",value:function(e,t){if(0===Object.keys(e).length)return 0;for(var n=2*t.length,r=0,o=0;o<Object.keys(e).length;o++){var a=Object.keys(e)[o];e[a]&&e[a].GET&&"loading"!==e[a].GET.status&&r++,e[a]&&e[a].POST&&"loading"!==e[a].POST.status&&r++}return Math.round(r/n*100)}},{key:"getApiStatus",value:function(e,t,n){var r,o=Object.keys(e).filter((function(t){return(n=e[t]).GET&&n.POST&&("fail"===n.GET.status||"fail"===n.POST.status);var n})).length;return 0===o?"ok":o<t.length?(r=e[n]).GET&&r.POST&&"ok"===r.GET.status&&"ok"===r.POST.status?"warning-current":$a:"fail"}},{key:"getApiStatusText",value:function(e){return"ok"===e?Object(N.translate)("Good"):"warning-current"===e?Object(N.translate)("Working but some issues"):e===$a?Object(N.translate)("Not working but fixable"):Object(N.translate)("Unavailable")}},{key:"canShowProblem",value:function(e){return this.state.showing||"fail"===e||e===$a}},{key:"renderError",value:function(e){var t=this.canShowProblem(e),n=Object(N.translate)("There are some problems connecting to your REST API. It is not necessary to fix these problems and the plugin is able to work.");return"fail"===e?n=Object(N.translate)("Your REST API is not working and the plugin will not be able to continue until this is fixed."):e===$a&&(n=Object(N.translate)("You are using a broken REST API route. Changing to a working API should fix the problem.")),j.a.createElement("div",{className:"api-result-log"},j.a.createElement("p",null,j.a.createElement("strong",null,Object(N.translate)("Summary")),": ",n),!t&&j.a.createElement("p",null,j.a.createElement("button",{className:"button-secondary",onClick:this.onShow},Object(N.translate)("Show Problems"))))}},{key:"render",value:function(){var e=Bt(),t=this.props,n=t.apiTest,r=t.routes,o=t.current,a=t.allowChange,i=this.state.showing,l=this.getPercent(n,e),u=this.getApiStatus(n,e,o),c=l>=100&&this.canShowProblem(u)||i,s=gn()({"api-result-status":!0,"api-result-status_good":"ok"===u&&l>=100,"api-result-status_problem":"warning-current"===u&&l>=100,"api-result-status_failed":("fail"===u||u===$a)&&l>=100});return j.a.createElement("div",{className:"api-result-wrapper"},j.a.createElement("div",{className:"api-result-header"},j.a.createElement("strong",null,"REST API:"),j.a.createElement("div",{className:"api-result-progress"},j.a.createElement("span",{className:s},l<100&&Object(N.translate)("Testing - %s%%",{args:[l]}),l>=100&&this.getApiStatusText(u)),l<100&&j.a.createElement(yr,null)),l>=100&&"ok"!==u&&j.a.createElement("button",{className:"button button-secondary api-result-retry",onClick:this.onRetry},Object(N.translate)("Check Again"))),l>=100&&"ok"!==u&&this.renderError(u),c&&e.map((function(e,t){return j.a.createElement(Da,{item:e,result:(i=n,l=e.value,i&&i[l]?i[l]:{}),routes:r,key:t,isCurrent:o===e.value,allowChange:a});var i,l})))}}])&&Fa(t.prototype,n),r&&Fa(t,r),a}(j.a.Component);Ba(Va,"defaultProps",{allowChange:!0});var qa=be((function(e){var t=e.settings,n=t.api,r=n.routes,o=n.current;return{apiTest:t.apiTest,routes:r,current:o}}),(function(e){return{onCheckApi:function(t){e(function(e){return function(t){for(var n=function(n){var r=e[n],o=r.id,a=r.url;t({type:"SETTING_API_TRY",id:o,method:"GET"}),t({type:"SETTING_API_TRY",id:o,method:"POST"}),setTimeout((function(){jt(kt.checkApi(a)).then((function(){t({type:"SETTING_API_SUCCESS",id:o,method:"GET"})})).catch((function(e){t({type:"SETTING_API_FAILED",id:o,method:"GET",error:e})})),jt(kt.checkApi(a,!0)).then((function(){t({type:"SETTING_API_SUCCESS",id:o,method:"POST"})})).catch((function(e){t({type:"SETTING_API_FAILED",id:o,method:"POST",error:e})}))}),1e3)},r=0;r<e.length;r++)n(r)}}(t))}}}))(Va);n(78);function Qa(e){return(Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ka(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ya(e,t){return(Ya=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var o=ei(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ja(this,n)}}function Ja(e,t){return!t||"object"!==Qa(t)&&"function"!=typeof t?Za(e):t}function Za(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ti(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ni=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ya(e,t)}(a,e);var t,n,r,o=Xa(a);function a(){var e;Ga(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ti(Za(e=o.call.apply(o,[this].concat(n))),"onClick",(function(){e.props.onClear()})),e}return t=a,(n=[{key:"componentDidUpdate",value:function(e){0===e.errors.length&&this.props.errors.length>0&&window.scrollTo(0,0)}},{key:"getDebug",value:function(e){for(var t=[SearchRegexi10n.versions],n=0;n<e.length;n++){var r=e[n].request,o=void 0!==r&&r;t.push(""),t.push("Error: "+this.getErrorDetails(e[n])),o&&o.status&&o.statusText&&(t.push("Action: "+o.action),o.params&&t.push("Params: "+JSON.stringify(o.params)),t.push("Code: "+o.status+" "+o.statusText)),o&&t.push("Raw: "+(o.raw?o.raw:"-no data-"))}return t}},{key:"getErrorDetails",value:function(e){return 0===e.code?e.message:e.data&&e.data.wpdb?"".concat(e.message," (").concat(e.code,"): ").concat(e.data.wpdb):e.code?"".concat(e.message," (").concat(e.code,")"):e.message}},{key:"removeSameError",value:function(e){return e.filter((function(t,n){for(var r=n+1;n<e.length-1;n++){if(t.code&&e[r].code&&t.code===e[r].code)return!1;if(t.message&&e[r].message&&t.message===e[r].message)return!1}return!0}))}},{key:"renderDebug",value:function(e){var t="mailto:john@search-regex?subject=Search%20Regex%20Error&body="+encodeURIComponent(e.join("\n")),n="https://github.com/johngodley/search-regex/issues/new?title=Search%20Regex%20Error&body="+encodeURIComponent("```\n"+e.join("\n")+"\n```\n\n");return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Object(N.translate)("Please {{strong}}create an issue{{/strong}} or send it in an {{strong}}email{{/strong}}.",{components:{strong:j.a.createElement("strong",null)}})),j.a.createElement("p",null,j.a.createElement("a",{href:n,className:"button-primary"},Object(N.translate)("Create An Issue"))," ",j.a.createElement("a",{href:t,className:"button-secondary"},Object(N.translate)("Email"))),j.a.createElement("p",null,Object(N.translate)("Include these details in your report along with a description of what you were doing and a screenshot.")),j.a.createElement("p",null,j.a.createElement(Vr,{readOnly:!0,cols:"120",value:e.join("\n"),spellCheck:!1})))}},{key:"renderNonce",value:function(e){return j.a.createElement("div",{className:"red-error"},j.a.createElement("h2",null,Object(N.translate)("You are not authorised to access this page.")),j.a.createElement("p",null,Object(N.translate)("This is usually fixed by doing one of these:")),j.a.createElement("ol",null,j.a.createElement("li",null,Object(N.translate)("Reload the page - your current session is old.")),j.a.createElement("li",null,Object(N.translate)("Log out, clear your browser cache, and log in again - your browser has cached an old session.")),j.a.createElement("li",null,Object(N.translate)("Your admin pages are being cached. Clear this cache and try again."))),j.a.createElement("p",null,Object(N.translate)("The problem is almost certainly caused by one of the above.")),j.a.createElement("h3",null,Object(N.translate)("That didn't help")),this.renderDebug(e))}},{key:"renderError",value:function(e){var t=this.removeSameError(e),n=this.getDebug(t);return e.length>0&&"rest_cookie_invalid_nonce"===e[0].code?this.renderNonce(n):j.a.createElement("div",{className:"red-error"},j.a.createElement("div",{className:"closer",onClick:this.onClick},"✖"),j.a.createElement("h2",null,Object(N.translate)("Something went wrong 🙁")),j.a.createElement("div",{className:"red-error_title"},t.map((function(e,t){return j.a.createElement(Ea,{error:e,key:t})}))),j.a.createElement(qa,null),j.a.createElement("h3",null,Object(N.translate)("What do I do next?")),j.a.createElement("ol",null,j.a.createElement("li",null,Object(N.translate)('Take a look at the {{link}}plugin status{{/link}}. It may be able to identify and "magic fix" the problem.',{components:{link:j.a.createElement("a",{href:"?page=search-regex.php&sub=support"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Caching software{{/link}}, in particular Cloudflare, can cache the wrong thing. Try clearing all your caches.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/problems/cloudflare/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Please temporarily disable other plugins!{{/link}} This fixes so many problems.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/problems/plugins/"})}})),j.a.createElement("li",null,Object(N.translate)("If you are using WordPress 5.2 or newer then look at your {{link}}Site Health{{/link}} and resolve any issues.",{components:{link:j.a.createElement(fn,{url:"/wp-admin/site-health.php"})}}))),j.a.createElement("h3",null,Object(N.translate)("That didn't help")),this.renderDebug(n))}},{key:"render",value:function(){var e=this.props.errors;return 0===e.length?null:this.renderError(e)}}])&&Ka(t.prototype,n),r&&Ka(t,r),a}(j.a.Component);var ri=be((function(e){return{errors:e.message.errors}}),(function(e){return{onClear:function(){e({type:"MESSAGE_CLEAR_ERRORS"})}}}))(ni);n(80);function oi(e){return(oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ai(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ii(e,t){return(ii=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=si(e);if(t){var o=si(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ui(this,n)}}function ui(e,t){return!t||"object"!==oi(t)&&"function"!=typeof t?ci(e):t}function ci(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function si(e){return(si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ii(e,t)}(a,e);var t,n,r,o=li(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),fi(ci(t=o.call(this,e)),"onClick",(function(){t.state.shrunk?t.setState({shrunk:!1}):t.props.onClear()})),fi(ci(t),"onShrink",(function(){t.setState({shrunk:!0})})),t.state={shrunk:!1,width:"auto"},t}return t=a,(n=[{key:"getSnapshotBeforeUpdate",value:function(e){return this.props.notices!==e.notices&&(this.stopTimer(),this.setState({shrunk:!1}),this.startTimer()),null}},{key:"componentWillUnmount",value:function(){this.stopTimer()}},{key:"stopTimer",value:function(){clearTimeout(this.timer)}},{key:"startTimer",value:function(){this.timer=setTimeout(this.onShrink,5e3)}},{key:"getNotice",value:function(e){return e.length>1?e[e.length-1]+" ("+e.length+")":e[0]}},{key:"renderNotice",value:function(e){var t="notice notice-info redirection-notice"+(this.state.shrunk?" redirection-notice_shrunk":"");return j.a.createElement("div",{className:t,onClick:this.onClick},j.a.createElement("div",{className:"closer"},"✔"),j.a.createElement("p",null,this.state.shrunk?j.a.createElement("span",{title:Object(N.translate)("View notice")},"🔔"):this.getNotice(e)))}},{key:"render",value:function(){var e=this.props.notices;return 0===e.length?null:this.renderNotice(e)}}])&&ai(t.prototype,n),r&&ai(t,r),a}(j.a.Component);var di=be((function(e){return{notices:e.message.notices}}),(function(e){return{onClear:function(){e({type:"MESSAGE_CLEAR_NOTICES"})}}}))(pi),hi=function(e){var t=e.item,n=e.isCurrent,r=e.onClick,o=SearchRegexi10n.pluginRoot+(""===t.value?"":"&sub="+t.value);return j.a.createElement("li",null,j.a.createElement("a",{className:n?"current":"",href:o,onClick:function(e){e.preventDefault(),r(t.value,o)}},t.name))};function mi(e){return-1!==SearchRegexi10n.caps.pages.indexOf(e)}n(82);var gi=function(e,t){return e===t.value||"search"===e&&""===t.value},yi=function(e){var t=e.onChangePage,n=e.current,r=[{name:Object(N.translate)("Search & Replace"),value:""},{name:Object(N.translate)("Options"),value:"options"},{name:Object(N.translate)("Support"),value:"support"}].filter((function(e){return mi(e.value)||""===e.value&&mi("search")}));return r.length<2?null:j.a.createElement("div",{className:"subsubsub-container"},j.a.createElement("ul",{className:"subsubsub"},r.map((function(e,r){return j.a.createElement(hi,{key:r,item:e,isCurrent:gi(n,e),onClick:t})})).reduce((function(e,t){return[e," | ",t]}))))};n(84);function bi(e){return(bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wi(e,t){return(wi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ei(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Si(e);if(t){var o=Si(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xi(this,n)}}function xi(e,t){return!t||"object"!==bi(t)&&"function"!=typeof t?_i(e):t}function _i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Si(e){return(Si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ki=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wi(e,t)}(a,e);var t,n,r,o=Ei(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Oi(_i(t=o.call(this,e)),"onPageChanged",(function(){var e=Ze();t.changePage(e),t.setState({page:e,clicked:t.state.clicked+1})})),Oi(_i(t),"onChangePage",(function(e,n){""===e&&(e="search"),t.props.onClear(),history.pushState({},null,n),t.changePage(e),t.setState({page:e,clicked:t.state.clicked+1})})),t.state={page:Ze(),clicked:0,stack:!1,error:"2.0"!==SearchRegexi10n.version,info:!1},window.addEventListener("popstate",t.onPageChanged),t}return t=a,(n=[{key:"componentDidCatch",value:function(e,t){this.setState({error:!0,stack:e,info:t})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.onPageChanged)}},{key:"changePage",value:function(e){}},{key:"getContent",value:function(e){switch(this.state.clicked,e){case"support":return j.a.createElement(hn,null);case"options":return j.a.createElement(sn,null)}return j.a.createElement(va,null)}},{key:"renderError",value:function(){var e=[SearchRegexi10n.versions,"Buster: 2.0 === "+SearchRegexi10n.version,"",this.state.stack];return this.state.info&&this.state.info.componentStack&&e.push(this.state.info.componentStack),"2.0"!==SearchRegexi10n.version?j.a.createElement("div",{className:"red-error"},j.a.createElement("h2",null,Object(N.translate)("Cached Search Regex detected")),j.a.createElement("p",null,Object(N.translate)("Please clear your browser cache and reload this page.")),j.a.createElement("p",null,Object(N.translate)("If you are using a caching system such as Cloudflare then please read this: "),j.a.createElement(fn,{url:"https://searchregex.com/support/problems/cloudflare/"},Object(N.translate)("clearing your cache."))),j.a.createElement("p",null,j.a.createElement("textarea",{readOnly:!0,rows:e.length+3,cols:"120",value:e.join("\n"),spellCheck:!1}))):j.a.createElement("div",{className:"red-error"},j.a.createElement("h2",null,Object(N.translate)("Something went wrong 🙁")),j.a.createElement("p",null,Object(N.translate)("Search Regex is not working. Try clearing your browser cache and reloading this page."),"  ",Object(N.translate)("If you are using a page caching plugin or service (CloudFlare, OVH, etc) then you can also try clearing that cache.")),j.a.createElement("p",null,Object(N.translate)("If that doesn't help, open your browser's error console and create a {{link}}new issue{{/link}} with the details.",{components:{link:j.a.createElement(fn,{url:"https://github.com/johngodley/searchregex/issues"})}})),j.a.createElement("p",null,Object(N.translate)("Please mention {{code}}%s{{/code}}, and explain what you were doing at the time",{components:{code:j.a.createElement("code",null)},args:this.state.page})),j.a.createElement("p",null,j.a.createElement("textarea",{readOnly:!0,rows:e.length+8,cols:"120",value:e.join("\n"),spellCheck:!1})))}},{key:"render",value:function(){var e=this.state,t=e.error,n=e.page,r={search:Object(N.translate)("Search Regex"),options:Object(N.translate)("Options"),support:Object(N.translate)("Support")}[n];return t?this.renderError():j.a.createElement("div",{className:"wrap searchregex"},j.a.createElement("h1",{className:"wp-heading-inline"},r),j.a.createElement(yi,{onChangePage:this.onChangePage,current:n}),j.a.createElement(ri,null),this.getContent(n),j.a.createElement(di,null))}}])&&vi(t.prototype,n),r&&vi(t,r),a}(j.a.Component);var Pi,Ti=be((function(e){return{errors:e.message.errors}}),(function(e){return{onClear:function(){e({type:"MESSAGE_CLEAR_ERRORS"})}}}))(ki),ji=function(){return j.a.createElement(H,{store:nt({settings:rt(),search:{results:[],replacements:[],replacing:[],replaceAll:!1,replaceCount:0,phraseCount:0,search:(e=Je(),st({searchPhrase:e.searchphrase?e.searchphrase:"",searchFlags:e.searchflags?e.searchflags:["case"],source:e.source?e.source:["posts"],sourceFlags:e.sourceflags?e.sourceflags:[],replacement:"",perPage:e.perpage?e.perpage:25})),searchDirection:null,searchedPhrase:"",requestCount:0,totals:{},progress:{},status:null,showLoading:!1,sources:SearchRegexi10n.preload&&SearchRegexi10n.preload.sources?SearchRegexi10n.preload.sources:[],sourceFlags:SearchRegexi10n.preload&&SearchRegexi10n.preload.source_flags?SearchRegexi10n.preload.source_flags:[],rawData:null,canCancel:!1},message:{errors:[],notices:[],inProgress:0,saving:[]}})},j.a.createElement(j.a.StrictMode,null,j.a.createElement(Ti,null)));var e};document.querySelector("#react-ui")&&(Pi="react-ui",A.a.setLocale({"":{localeSlug:SearchRegexi10n.localeSlug}}),A.a.addTranslations(SearchRegexi10n.locale),R.a.render(j.a.createElement(ji,null),document.getElementById(Pi))),window.searchregex=SearchRegexi10n.version}]);
1
+ /*! Search Regex v2.0.1 */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){var r=n(25),o=new r;e.exports={numberFormat:o.numberFormat.bind(o),translate:o.translate.bind(o),configure:o.configure.bind(o),setLocale:o.setLocale.bind(o),getLocale:o.getLocale.bind(o),getLocaleSlug:o.getLocaleSlug.bind(o),addTranslations:o.addTranslations.bind(o),reRenderTranslations:o.reRenderTranslations.bind(o),registerComponentUpdateHook:o.registerComponentUpdateHook.bind(o),registerTranslateHook:o.registerTranslateHook.bind(o),state:o.state,stateObserver:o.stateObserver,on:o.stateObserver.on.bind(o.stateObserver),off:o.stateObserver.removeListener.bind(o.stateObserver),emit:o.stateObserver.emit.bind(o.stateObserver),$this:o,I18N:r}},function(e,t,n){e.exports=n(35)()},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function l(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],o=0;o<e.length;o++){var a=e[o],u=t.base?a[0]+t.base:a[0],c=n[u]||0,s="".concat(u," ").concat(c);n[u]=c+1;var f=l(s),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==f?(i[f].references++,i[f].updater(p)):i.push({identifier:s,updater:g(p,t),references:1}),r.push(s)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function p(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,o=n.media,a=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,m=0;function g(e,t){var n,r,o;if(t.singleton){var a=m++;n=h||(h=c(t)),r=p.bind(null,n,a,!1),o=p.bind(null,n,a,!0)}else n=c(t),r=d.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=l(n[r]);i[o].references--}for(var a=u(e,t),c=0;c<n.length;c++){var s=l(n[c]);0===i[s].references&&(i[s].updater(),i.splice(s,1))}n=a}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(i=r,l=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(u," */")),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([o]).join("\n")}var i,l,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
52
  *
53
  * This source code is licensed under the MIT license found in the
54
  * LICENSE file in the root directory of this source tree.
55
+ */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case i:case u:case l:case h:return e;default:switch(e=e&&e.$$typeof){case s:case d:case y:case g:case c:return e;default:return t}}case a:return t}}}function _(e){return x(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=s,t.ContextProvider=c,t.Element=o,t.ForwardRef=d,t.Fragment=i,t.Lazy=y,t.Memo=g,t.Portal=a,t.Profiler=u,t.StrictMode=l,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||x(e)===f},t.isConcurrentMode=_,t.isContextConsumer=function(e){return x(e)===s},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===d},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===a},t.isProfiler=function(e){return x(e)===u},t.isStrictMode=function(e){return x(e)===l},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===u||e===l||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===s||e.$$typeof===d||e.$$typeof===v||e.$$typeof===w||e.$$typeof===E||e.$$typeof===b)},t.typeOf=x},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(9),o=n(16),a=Object.prototype.hasOwnProperty,i={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,l(t)?t:[t])},s=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,n,o,a,i,u,s,f,d,h,m,g,y){var b,v=t;if("function"==typeof s?v=s(n,v):v instanceof Date?v=h(v):"comma"===o&&l(v)&&(v=v.join(",")),null===v){if(a)return u&&!g?u(n,p.encoder,y,"key"):n;v=""}if("string"==typeof(b=v)||"number"==typeof b||"boolean"==typeof b||"symbol"==typeof b||"bigint"==typeof b||r.isBuffer(v))return u?[m(g?n:u(n,p.encoder,y,"key"))+"="+m(u(v,p.encoder,y,"value"))]:[m(n)+"="+m(String(v))];var w,E=[];if(void 0===v)return E;if(l(s))w=s;else{var x=Object.keys(v);w=f?x.sort(f):x}for(var _=0;_<w.length;++_){var S=w[_];i&&null===v[S]||(l(v)?c(E,e(v[S],"function"==typeof o?o(n,S):n,o,a,i,u,s,f,d,h,m,g,y)):c(E,e(v[S],n+(d?"."+S:"["+S+"]"),o,a,i,u,s,f,d,h,m,g,y)))}return E};e.exports=function(e,t){var n,r=e,u=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=p.filter;return("function"==typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof u.filter?r=(0,u.filter)("",r):l(u.filter)&&(n=u.filter);var s,f=[];if("object"!=typeof r||null===r)return"";s=t&&t.arrayFormat in i?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=i[s];n||(n=Object.keys(r)),u.sort&&n.sort(u.sort);for(var m=0;m<n.length;++m){var g=n[m];u.skipNulls&&null===r[g]||c(f,d(r[g],g,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.formatter,u.encodeValuesOnly,u.charset))}var y=f.join(u.delimiter),b=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),y.length>0?b+y:""}},function(e,t,n){"use strict";var r=n(9),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t){if(a(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},s=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,s=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(l=i.exec(a))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(l[1])}return l&&s.push("["+a.slice(l.index)+"]"),function(e,t,n,r){for(var o=r?t:u(t,n),a=e.length-1;a>=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&l!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(i=[])[s]=o:i[c]=o:i={0:o}}o=i}return o}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var f="string"==typeof e?function(e,t){var n,s={},f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=f.split(t.delimiter,p),h=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?m="utf-8":"utf8=%26%2310003%3B"===d[n]&&(m="iso-8859-1"),h=n,n=d.length);for(n=0;n<d.length;++n)if(n!==h){var g,y,b=d[n],v=b.indexOf("]="),w=-1===v?b.indexOf("="):v+1;-1===w?(g=t.decoder(b,i.decoder,m,"key"),y=t.strictNullHandling?null:""):(g=t.decoder(b.slice(0,w),i.decoder,m,"key"),y=c(u(b.slice(w+1),t),(function(e){return t.decoder(e,i.decoder,m,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===m&&(y=l(y)),b.indexOf("[]=")>-1&&(y=a(y)?[y]:y),o.call(s,g)?s[g]=r.combine(s[g],y):s[g]=y}return s}(e,n):e,p=n.plainObjects?Object.create(null):{},d=Object.keys(f),h=0;h<d.length;++h){var m=d[h],g=s(m,f[m],n,"string"==typeof e);p=r.merge(p,g,n)}return r.compact(p)}},function(e,t,n){var r=n(3),o=n(43);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".redirection .form-table th a{color:#444}.redirection .form-table td ul{padding-left:20px;list-style-type:disc;margin:0;margin-top:15px}.redirection .form-table td li{margin-bottom:0;line-height:1.6}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(45);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'@-webkit-keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}@keyframes loading-fade{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}.placeholder-container{width:100%;height:100px;position:relative}.placeholder-loading{content:"";position:absolute;top:16px;right:8px;bottom:16px;left:8px;padding-left:8px;padding-top:8px;background-color:#bbb;-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.placeholder-inline{width:100%;height:50px;position:relative}.placeholder-inline .placeholder-loading{top:0;right:0;left:0;bottom:0}.loading-small{width:25px;height:25px}input.current-page{width:60px}.loader-wrapper{position:relative}.loader-textarea{height:100px}.wp-list-table .is-placeholder td{position:relative;height:50px}.wp-list-table .item-loading{opacity:0.3}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(47);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.donation .donation-amount{float:left;margin-top:10px}.donation .donation-amount span{font-size:28px;margin-top:4px;vertical-align:bottom}.donation .donation-amount img{width:24px !important;margin-bottom:-5px !important}.donation .donation-amount:after{content:"";display:block;clear:both}.donation input[type="number"]{width:60px;margin-left:10px}.donation td,.donation th{padding-bottom:0;margin-bottom:0}.donation input[type="submit"]{margin-left:10px}.newsletter h3{margin-top:30px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(49);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".github{margin-top:8px}.github a{text-decoration:none}.github img{padding-right:10px;margin-bottom:-10px}.searchregex-help ul{list-style:disc;margin-left:20px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(51);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.redirect-popover__toggle{display:inline-block;flex:none !important;cursor:pointer}.redirect-popover__content{box-shadow:0 3px 30px rgba(51,51,51,0.1);border:1px solid #ddd;background:white;min-width:150px;max-height:400px;position:absolute;z-index:10001;height:auto;overflow-y:auto}.redirect-popover__arrows{position:absolute;width:100%}.redirect-popover__arrows::after,.redirect-popover__arrows::before{content:"";box-shadow:0 3px 30px rgba(51,51,51,0.1);position:absolute;height:0;width:0;line-height:0;margin-left:10px}.redirect-popover__arrows::before{border:8px solid #ddd;border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;top:-8px}.redirect-popover__arrows::after{border:8px solid white;border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;top:-6px;z-index:10003}.redirect-popover__arrows.redirect-popover__arrows__right::after,.redirect-popover__arrows.redirect-popover__arrows__right::before{right:0;margin-right:10px}.redirect-popover__arrows.redirect-popover__arrows__centre::after,.redirect-popover__arrows.redirect-popover__arrows__centre::before{left:calc(50% - 16px)}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(53);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.redirect-badge{display:inline-block;padding:0 5px 0 6px;font-size:12px;background-color:#ddd;border-radius:3px;font-feature-settings:"c2sc";font-variant:small-caps;white-space:nowrap;color:black}.redirect-badge>div{display:flex;align-items:center}.redirect-badge.redirect-badge__click{cursor:pointer;border:1px solid transparent}.redirect-badge.redirect-badge__click:hover{border:1px solid black}.redirect-badge span{background-color:transparent;border:none;width:15px;text-align:center;padding:0;margin-left:4px;font-size:20px;vertical-align:middle;margin-top:-5px;margin-right:-3px}.redirect-badge span:hover{color:white;background-color:#333}.redirect-badge:not(:last-child){margin-right:5px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(55);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.redirect-multioption .redirect-popover__content{padding:10px 10px;white-space:nowrap;box-sizing:border-box}.redirect-multioption .redirect-popover__content h4{margin-top:5px}.redirect-multioption .redirect-popover__content h5{margin-top:3px;margin-bottom:6px;text-transform:uppercase;color:#999}.redirect-multioption .redirect-popover__content p{margin:2px 0 0.8em !important}.redirect-multioption .redirect-popover__content p:first-child{margin-top:0}.redirect-multioption .redirect-popover__content p:last-child{margin-bottom:0 !important}.redirect-multioption .redirect-popover__content label{display:inline-block;width:100%}.button.redirect-multioption__button,.redirect-multioption__button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;box-shadow:none;height:30px;max-width:500px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#fff;border-color:#7e8993;color:#32373c}.button.redirect-multioption__button svg,.redirect-multioption__button svg{margin-left:5px;margin-right:-4px;display:inline-block;fill:#888;border-left:1px solid #ddd;padding-left:5px}.button.redirect-multioption__button h5,.redirect-multioption__button h5{padding:0;margin:0;margin-right:10px;font-size:13px;font-weight:normal}.button.redirect-multioption__button .redirect-badge,.redirect-multioption__button .redirect-badge{line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions .button.redirect-multioption__button{height:28px}.actions .redirect-multioption__button .redirect-badge{margin-top:-1px}.redirect-multioption__button.redirect-multioption__button_enabled{background-color:#fff}.redirect-multioption__button.redirect-multioption__button_enabled svg{transform:rotate(180deg);border-right:1px solid #ddd;border-left:1px solid transparent;padding-right:4px;padding-left:0}.redirect-multioption__group{margin-bottom:20px}.redirect-multioption__group:last-child{margin-bottom:10px}.branch-4-9 .redirect-dropdownbutton .button,.branch-4-9 .button.redirect-multioption__button,.branch-5-0 .redirect-dropdownbutton .button,.branch-5-0 .button.redirect-multioption__button,.branch-5-1 .redirect-dropdownbutton .button,.branch-5-1 .button.redirect-multioption__button,.branch-5-2 .redirect-dropdownbutton .button,.branch-5-2 .button.redirect-multioption__button{border-color:#ddd}.branch-4-9 input[type="search"],.branch-5-0 input[type="search"],.branch-5-1 input[type="search"],.branch-5-2 input[type="search"]{height:30px}.branch-4-9 .redirect-multioption__button .redirect-badge,.branch-4-9 .redirect-multioption,.branch-4-9 .actions .redirect-multioption__button .redirect-badge,.branch-5-0 .redirect-multioption__button .redirect-badge,.branch-5-0 .redirect-multioption,.branch-5-0 .actions .redirect-multioption__button .redirect-badge,.branch-5-1 .redirect-multioption__button .redirect-badge,.branch-5-1 .redirect-multioption,.branch-5-1 .actions .redirect-multioption__button .redirect-badge,.branch-5-2 .redirect-multioption__button .redirect-badge,.branch-5-2 .redirect-multioption,.branch-5-2 .actions .redirect-multioption__button .redirect-badge{margin-top:1px !important}.actions .redirect-popover__content{margin-top:-1px}.redirect-multioption{padding:0 10px}.redirect-multioption p{white-space:nowrap}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(57);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.searchregex-replace__input{display:flex;width:100%;align-items:flex-start}.searchregex-replace__input input[type="text"]{width:100%}.searchregex-replace__input select{margin-left:10px}.searchregex-replace__input textarea{width:100%;margin-left:1px;margin-right:1px;padding:4px 8px}.redirect-popover__content .searchregex-replace__action{display:flex;justify-content:space-between;align-items:center;margin-top:10px;margin-left:10px}.redirect-popover__content .searchregex-replace__action p{color:#999;margin:0}.searchregex-replace__modal{padding:13px 10px;width:450px}.searchregex-replace__modal input[type="text"]{width:75%}.searchregex-replace__modal select{width:25%}.searchregex-replace__modal p.searchregex-replace__actions{text-align:right;margin-bottom:0}.searchregex-replace__modal p.searchregex-replace__actions input{margin-left:10px}.searchregex-replace__modal textarea{width:75%}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(59);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".spinner-container{display:inline-block;position:relative}.css-spinner{position:absolute;left:10px;top:-25px;display:block;width:40px;height:40px;background-color:#333;border-radius:100%;-webkit-animation:sk-scaleout 1.0s infinite ease-in-out;animation:sk-scaleout 1.0s infinite ease-in-out}@-webkit-keyframes sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sk-scaleout{0%{transform:scale(0)}100%{transform:scale(1);opacity:0}}.spinner-small .css-spinner{width:20px;height:20px;top:-15px;left:5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(61);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__replaced,.searchregex-result__highlight{background-color:yellow;font-weight:bold;padding:1px;cursor:pointer}.searchregex-result__replaced{background-color:orange;display:inline}.searchregex-result__deleted{background-color:red;color:white}.searchregex-match{display:flex;align-items:flex-start;justify-content:flex-start;line-height:2}.searchregex-match .searchregex-match__column{margin-right:10px;background-color:#ddd;padding:0 5px;border-radius:3px;margin-bottom:5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(63);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,"body.redirection-modal_shown{overflow:hidden}.redirection-modal_wrapper{width:100%}.redirection-modal_backdrop{width:100%;height:100%;position:fixed;top:0;left:0;z-index:10000;background-color:rgba(255,255,255,0.4)}.redirection-modal_main{position:fixed;top:0;left:0;height:100%;width:100%;z-index:10000;align-items:center;flex-grow:1;display:flex;flex-direction:row;justify-content:center}.redirection-modal_main .redirect-click-outside{min-height:100px;max-width:90%;max-height:90%;min-width:60%}.redirection-modal_main .redirection-modal_content{position:relative;background:#fff;opacity:1;border:1px solid #e2e4e7;box-shadow:0 3px 30px rgba(25,30,35,0.2);transition:height 0.05s ease;min-height:100px;max-width:90%;max-height:90%;min-width:60%;margin:0 auto}.redirection-modal_main .redirection-modal_content h1{margin:0 !important;color:#333 !important}.redirection-modal_main .redirection-modal_close button{position:absolute;top:0;right:0;padding-top:10px;padding-right:10px;border:none;background-color:#fff;border-radius:2px;cursor:pointer;z-index:10001}.redirection-modal_wrapper.redirection-modal_wrapper-padless .redirection-modal_content{padding:20px}.redirection-modal_wrapper-padding .redirection-modal_content{padding:10px}.redirection-modal_error h2{text-align:center}.redirection-modal_loading{display:flex;height:100px}.redirection-modal_loading>*{justify-content:center;align-self:center;margin-left:calc(50% - 30px);margin-top:40px}@media screen and (max-width: 782px){.redirection-modal_main .redirection-modal_content{width:80%;margin-right:10%}}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(65);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-editor{padding:5px}.searchregex-editor textarea{width:100%;min-height:150px;margin-bottom:10px}.searchregex-editor h2{margin-top:0}.searchregex-editor .searchregex-editor__actions{display:flex;justify-content:space-between}.searchregex-editor button.button-primary{margin-right:10px}.searchregex-editor .css-spinner{margin-left:-50px;height:24px;width:24px;margin-top:12px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(67);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__more{font-style:italic}.searchregex-result__updating{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.searchregex-result__updating .css-spinner{width:24px;height:24px;margin-top:10px}.searchregex-result h2{margin:0;padding:0;margin-bottom:10px;font-weight:normal;font-size:1.2em}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(69);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".tablenav-pages{display:flex;justify-content:space-between;align-items:center;padding:10px}.pagination-links{display:flex;align-items:center}.pagination-links .button{margin:0 2px}.pagination-links .paging-input{margin:0 4px}.pagination-links .tablenav-paging-text{margin:0 5px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(71);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-result__table{width:100px}.searchregex-result__row{width:50px}.searchregex-result__matches{width:70px}.searchregex-result__column{width:100px}.searchregex-result__action{width:200px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(73);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".searchregex-replaceall{margin-top:50px}.searchregex-replaceall__progress{position:relative}.searchregex-replaceall__status{position:absolute;top:0;left:0;width:100%;text-align:center;font-size:18px;font-weight:bold;margin-top:20px}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(75);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.searchregex-loading{opacity:0.8;-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite}.searchregex-search table{table-layout:fixed;width:100%}.searchregex-search th{text-align:left;width:80px;vertical-align:top;padding-top:5px}.searchregex-search td{width:100%}.searchregex-search .inline-error{margin-top:20px}.searchregex-search__search td{display:flex;justify-content:flex-start;align-items:flex-start}.searchregex-search__search input[type="text"]{width:100%}.searchregex-search__search .redirect-popover__toggle,.searchregex-search__search select{margin-left:10px}.searchregex-search__replace,.searchregex-search__search,.searchregex-search__source{width:100%;margin-bottom:10px}.searchregex-search__replace>label,.searchregex-search__search>label,.searchregex-search__source>label{font-weight:bold;width:60px}.searchregex-search__replace .redirect-popover__toggle button,.searchregex-search__search .redirect-popover__toggle button,.searchregex-search__source .redirect-popover__toggle button{min-width:150px;margin-right:2px}.searchregex-search__replace select,.searchregex-search__search select,.searchregex-search__source select{min-width:150px;margin-right:0}.searchregex-search__source select{margin-right:10px}.searchregex-search__source td{display:flex;align-items:center}.searchregex-search__source__description{margin-left:5px}.searchregex-search__action{margin-top:10px}.searchregex-search__action input.button{margin-right:10px}.searchregex-search__action .css-spinner{width:28px;height:28px;margin-top:10px}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(77);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".api-result-retry{float:right;clear:both}.api-result-log{background-color:#ddd;padding:5px 10px;color:#111;margin:10px 0;position:relative}.api-result-log .api-result-method_fail{color:white;background-color:#ff3860;padding:3px 5px;margin-right:5px}.api-result-log .api-result-method_pass{color:white;background-color:#4ab866;padding:3px 5px;width:150px;margin-right:5px}.api-result-log .dashicons{vertical-align:middle;width:26px;height:26px;font-size:26px;padding:0}.api-result-log .dashicons-no{color:#ff3860}.api-result-log .dashicons-yes{color:#4ab866}.api-result-log pre{background-color:#ccc;padding:10px 15px}.api-result-log pre{font-family:'Courier New', Courier, monospace}.api-result-log code{background-color:transparent}.api-result-log h4{margin:0;margin-top:5px;font-size:14px}.api-result-log_details{display:flex}.api-result-log_details>div{width:95%}.api-result-log_details a{color:#111}.api-result-log_details a:hover{font-weight:bold}.api-result-log_details pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.api-result-hide{position:absolute;bottom:25px;right:5%}.api-result-select{position:absolute;right:10px;top:15px}.api-result-select span{background-color:#777;color:white;padding:5px 10px;margin-left:10px}.api-result-header{display:flex;align-items:center}.api-result-header .api-result-progress{margin:0 15px}.api-result-header .css-spinner{width:18px;height:18px;top:-14px}.api-result-header .api-result-status{text-align:center;top:0;left:0;padding:5px 10px;background-color:#ddd;font-weight:bold}.api-result-header .api-result-status_good{background-color:#4ab866;color:white}.api-result-header .api-result-status_problem{background-color:#f0b849}.api-result-header .api-result-status_failed{background-color:#ff3860;color:white}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(79);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".red-error{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 15px 2px;padding:1px 12px;border-left-color:#dc3232;margin:5px 0 15px;margin-top:2em}.red-error .closer{float:right;padding-top:5px;font-size:18px;cursor:pointer;color:#333}.red-error textarea{font-family:courier,Monaco,monospace;font-size:12px;background-color:#eee;width:100%}.red-error span code{background-color:transparent}.red-error h3{font-size:1.2em}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(81);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".redirection-notice{position:fixed;bottom:25px;right:0;font-weight:bold;box-shadow:3px 3px 3px rgba(0,0,0,0.2);border-top:1px solid #eee;cursor:pointer;transition:width 1s ease-in-out}.redirection-notice p{padding-right:20px}.redirection-notice .closer{position:absolute;right:5px;top:10px;font-size:16px;opacity:0.8}.redirection-notice.notice-shrunk{width:20px}.redirection-notice.notice-shrunk p{font-size:16px}.redirection-notice.notice-shrunk .closer{display:none}\n",""]),e.exports=t},function(e,t,n){var r=n(3),o=n(83);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.subsubsub-container::before,.subsubsub-container::after{content:"";display:table}.subsubsub-container::after{clear:both}\n',""]),e.exports=t},function(e,t,n){var r=n(3),o=n(85);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};r(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,'.wp-core-ui .button-delete{box-shadow:none;text-shadow:none;background-color:#ff3860;border-color:transparent;color:#fff}.wp-core-ui .button-delete:hover{background-color:#ff3860;border-color:transparent;box-shadow:none;text-shadow:none}.inline-notice{background:#fff;border-left:4px solid #fff;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin:5px 15px 2px;padding:5px 12px;margin:5px 0 15px;border-left-color:#ffb900}.inline-notice.inline-general{border-left-color:#46b450}.inline-error{border-color:red}.addTop{margin-top:20px}@media screen and (max-width: 782px){.newsletter form input[type="email"]{display:block;width:100%;margin:5px 0}.import select{width:100%;margin:5px 0}.plugin-importer button{width:100%}p.search-box input[name="s"]{margin-top:20px}}.module-export{border:1px solid #ddd;padding:5px;font-family:courier,Monaco,monospace;margin-top:15px;width:100%;background-color:white !important}.redirect-edit .table-actions{margin-left:1px;margin-top:2px;display:flex;align-items:center;justify-content:flex-start}.redirect-edit .table-actions .redirection-edit_advanced{text-decoration:none;font-size:16px}.redirect-edit .table-actions .redirection-edit_advanced svg{padding-top:2px}.error{padding-bottom:10px !important}.notice{display:block !important}.database-switch{float:right}.database-switch a{color:#444;text-decoration:none}.database-switch a:hover{text-decoration:underline}\n',""]),e.exports=t},function(e,t,n){"use strict";n.r(t);var r=n(17),o=n.n(r),a="URLSearchParams"in self,i="Symbol"in self&&"iterator"in Symbol,l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),u="FormData"in self,c="ArrayBuffer"in self;if(c)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function p(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function g(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function b(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:l&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&l&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||f(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l&&(this.blob=function(){var e=g(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,n,r=g(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=y(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=p(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[p(e)]},m.prototype.get=function(e){return e=p(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(p(e))},m.prototype.set=function(e,t){this.map[p(e)]=d(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),h(e)},m.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},m.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),h(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(e,t){var n,r,o=(t=t||{}).body;if(e instanceof x){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new m(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),E.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function S(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},w.call(x.prototype),w.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];S.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})};var k=self.DOMException;try{new k}catch(e){(k=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),k.prototype.constructor=k}function P(e,t){return new Promise((function(n,r){var o=new x(e,t);if(o.signal&&o.signal.aborted)return r(new k("Aborted","AbortError"));var a=new XMLHttpRequest;function i(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new S(o,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new k("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&l&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",i),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",i)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}P.polyfill=!0,self.fetch||(self.fetch=P,self.Headers=m,self.Request=x,self.Response=S),!window.Promise&&(window.Promise=o.a),Array.from||(Array.from=function(e){return[].slice.call(e)}),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var a=t[o];if(e.call(r,a,o,t))return a;o++}}});var T=n(0),j=n.n(T),C=n(6),R=n.n(C),N=n(1),A=n.n(N),I=n(2),D=n.n(I),L=j.a.createContext(null);var F=function(e){e()},M={notify:function(){}};function z(){var e=F,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var U=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=M,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=z())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=M)},e}();var H=function(e){var t=e.store,n=e.context,r=e.children,o=Object(T.useMemo)((function(){var e=new U(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),a=Object(T.useMemo)((function(){return t.getState()}),[t]);Object(T.useEffect)((function(){var e=o.subscription;return e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,a]);var i=n||L;return j.a.createElement(i.Provider,{value:o},r)};function W(){return(W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function B(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var $=n(11),V=n.n($),q=n(10),Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?T.useLayoutEffect:T.useEffect,G=[],K=[null,null];function Y(e,t){var n=e[1];return[t.payload,n+1]}function X(e,t,n){Q((function(){return e.apply(void 0,t)}),n)}function J(e,t,n,r,o,a,i){e.current=r,t.current=o,n.current=!1,a.current&&(a.current=null,i())}function Z(e,t,n,r,o,a,i,l,u,c){if(e){var s=!1,f=null,p=function(){if(!s){var e,n,p=t.getState();try{e=r(p,o.current)}catch(e){n=e,f=e}n||(f=null),e===a.current?i.current||u():(a.current=e,l.current=e,i.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=p,n.trySubscribe(),p();return function(){if(s=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var ee=function(){return[null,0]};function te(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,i=void 0===a?"connectAdvanced":a,l=n.renderCountProp,u=void 0===l?void 0:l,c=n.shouldHandleStateChanges,s=void 0===c||c,f=n.storeKey,p=void 0===f?"store":f,d=(n.withRef,n.forwardRef),h=void 0!==d&&d,m=n.context,g=void 0===m?L:m,y=B(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),b=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),a=W({},y,{getDisplayName:o,methodName:i,renderCountProp:u,shouldHandleStateChanges:s,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),l=y.pure;var c=l?T.useMemo:function(e){return e()};function f(n){var r=Object(T.useMemo)((function(){var e=n.forwardedRef,t=B(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=r[0],i=r[1],l=r[2],u=Object(T.useMemo)((function(){return o&&o.Consumer&&Object(q.isContextConsumer)(j.a.createElement(o.Consumer,null))?o:b}),[o,b]),f=Object(T.useContext)(u),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(f)&&Boolean(f.store);var d=p?n.store:f.store,h=Object(T.useMemo)((function(){return function(t){return e(t.dispatch,a)}(d)}),[d]),m=Object(T.useMemo)((function(){if(!s)return K;var e=new U(d,p?null:f.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,p,f]),g=m[0],y=m[1],v=Object(T.useMemo)((function(){return p?f:W({},f,{subscription:g})}),[p,f,g]),w=Object(T.useReducer)(Y,G,ee),E=w[0][0],x=w[1];if(E&&E.error)throw E.error;var _=Object(T.useRef)(),S=Object(T.useRef)(l),O=Object(T.useRef)(),k=Object(T.useRef)(!1),P=c((function(){return O.current&&l===S.current?O.current:h(d.getState(),l)}),[d,E,l]);X(J,[S,_,k,l,P,O,y]),X(Z,[s,d,g,h,S,_,k,O,y,x],[d,g,h]);var C=Object(T.useMemo)((function(){return j.a.createElement(t,W({},P,{ref:i}))}),[i,t,P]);return Object(T.useMemo)((function(){return s?j.a.createElement(u.Provider,{value:v},C):C}),[u,C,v])}var d=l?j.a.memo(f):f;if(d.WrappedComponent=t,d.displayName=r,h){var m=j.a.forwardRef((function(e,t){return j.a.createElement(d,W({},e,{forwardedRef:t}))}));return m.displayName=r,m.WrappedComponent=t,V()(m,t)}return V()(d,t)}}function ne(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function re(e,t){if(ne(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!ne(e[n[o]],t[n[o]]))return!1;return!0}var oe=n(7);function ae(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function ie(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function le(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=ie(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=ie(o),o=r(t,n)),o},r}}var ue=[function(e){return"function"==typeof e?le(e):void 0},function(e){return e?void 0:ae((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?ae((function(t){return Object(oe.bindActionCreators)(e,t)})):void 0}];var ce=[function(e){return"function"==typeof e?le(e):void 0},function(e){return e?void 0:ae((function(){return{}}))}];function se(e,t,n){return W({},n,{},e,{},t)}var fe=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,a=n.areMergedPropsEqual,i=!1;return function(t,n,l){var u=e(t,n,l);return i?o&&a(u,r)||(r=u):(i=!0,r=u),r}}}(e):void 0},function(e){return e?void 0:function(){return se}}];function pe(e,t,n,r){return function(o,a){return n(e(o,a),t(r,a),a)}}function de(e,t,n,r,o){var a,i,l,u,c,s=o.areStatesEqual,f=o.areOwnPropsEqual,p=o.areStatePropsEqual,d=!1;function h(o,d){var h,m,g=!f(d,i),y=!s(o,a);return a=o,i=d,g&&y?(l=e(a,i),t.dependsOnOwnProps&&(u=t(r,i)),c=n(l,u,i)):g?(e.dependsOnOwnProps&&(l=e(a,i)),t.dependsOnOwnProps&&(u=t(r,i)),c=n(l,u,i)):y?(h=e(a,i),m=!p(h,l),l=h,m&&(c=n(l,u,i)),c):c}return function(o,s){return d?h(o,s):(l=e(a=o,i=s),u=t(r,i),c=n(l,u,i),d=!0,c)}}function he(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,a=B(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),i=n(e,a),l=r(e,a),u=o(e,a);return(a.pure?de:pe)(i,l,u,e,a)}function me(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function ge(e,t){return e===t}function ye(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?te:n,o=t.mapStateToPropsFactories,a=void 0===o?ce:o,i=t.mapDispatchToPropsFactories,l=void 0===i?ue:i,u=t.mergePropsFactories,c=void 0===u?fe:u,s=t.selectorFactory,f=void 0===s?he:s;return function(e,t,n,o){void 0===o&&(o={});var i=o,u=i.pure,s=void 0===u||u,p=i.areStatesEqual,d=void 0===p?ge:p,h=i.areOwnPropsEqual,m=void 0===h?re:h,g=i.areStatePropsEqual,y=void 0===g?re:g,b=i.areMergedPropsEqual,v=void 0===b?re:b,w=B(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=me(e,a,"mapStateToProps"),x=me(t,l,"mapDispatchToProps"),_=me(n,c,"mergeProps");return r(f,W({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:x,initMergeProps:_,pure:s,areStatesEqual:d,areOwnPropsEqual:m,areStatePropsEqual:y,areMergedPropsEqual:v},w))}}var be=ye();var ve;ve=C.unstable_batchedUpdates,F=ve;var we=n(19);function Ee(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var xe=Ee();xe.withExtraArgument=Ee;var _e=xe,Se="STATUS_IN_PROGRESS",Oe="STATUS_COMPLETE";function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t,n,r){var o=e[t]?Pe({},e[t]):[];return o[n]=r,Te({},t,o)}var Ce="SEARCH_FAIL";function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e,t){return e.search.searchFlags.regex?function(e,t){var n,r,o,a,i="forward"===e.searchDirection?e.results.concat(t.results):t.results.concat(e.results),l=function(e,t,n){return"forward"===n&&!1===e.progress.next||"backward"===n&&!1===e.progress.previous||t.length>=e.perPage}(t,i,e.searchDirection)?Oe:e.status;return Ne(Ne({},e),{},{status:l,results:i,requestCount:e.requestCount+1,progress:(n=e.progress,r=t.progress,o=e.searchDirection,a=0===e.requestCount,Ne(Ne({},n),{},{current:r.current,next:"forward"===o||a?r.next:n.next,previous:"backward"===o||a?r.previous:n.previous,rows:(n.rows?n.rows:0)+r.rows})),totals:Ne(Ne({},e.totals),t.totals),canCancel:l!==Oe,showLoading:l!==Oe})}(e,t):function(e,t){return Ne(Ne({},e),{},{status:Oe,results:t.results,progress:t.progress,totals:t.totals?Ne(Ne({},e.totals),t.totals):e.totals,canCancel:!1,showLoading:!1})}(e,t)}var De=function(){return Ne(Ne({},Le()),{},{results:[],totals:{},progress:{},status:null})},Le=function(){return{requestCount:0,searchedPhrase:"",replaceCount:0,phraseCount:0,status:Oe,replacing:[],replaceAll:!1,row:null,canCancel:!1,showLoading:!1}};function Fe(e,t){var n=t.results.rows+e.replaceCount,r=t.totals.matched_rows?t.totals.matched_rows:t.totals.rows?t.totals.rows:e.totals.rows;return!1===t.progress.next||n>=r||e.totals.matched_rows>0&&n>=e.totals.matched_rows}var Me=function(e){return e.status===Oe||null===e.status};function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){He(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var We=function(e,t){return e.slice(0).concat([t])},Be=function(e,t){return e.slice(0).concat([t])},$e=function(e){return Math.max(0,e.inProgress-1)},Ve={SETTING_SAVED:Object(N.translate)("Settings saved"),SEARCH_DELETE_COMPLETE:Object(N.translate)("Row deleted"),SEARCH_REPLACE_COMPLETE:Object(N.translate)("Row replaced"),SEARCH_SAVE_ROW_COMPLETE:Object(N.translate)("Row updated")};var qe=Object(oe.combineReducers)({settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETTING_API_TRY":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"loading"}))});case"SETTING_API_SUCCESS":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"ok"}))});case"SETTING_API_FAILED":return Pe(Pe({},e),{},{apiTest:Pe(Pe({},e.apiTest),je(e.apiTest,t.id,t.method,{status:"fail",error:t.error}))});case"SETTING_LOAD_START":return Pe(Pe({},e),{},{loadStatus:Se});case"SETTING_LOAD_SUCCESS":return Pe(Pe({},e),{},{loadStatus:Oe,values:t.values});case"SETTING_LOAD_FAILED":return Pe(Pe({},e),{},{loadStatus:"STATUS_FAILED",error:t.error});case"SETTING_SAVING":return Pe(Pe({},e),{},{saveStatus:Se,warning:!1});case"SETTING_SAVED":return Pe(Pe({},e),{},{saveStatus:Oe,values:t.values,warning:!!t.warning&&t.warning});case"SETTING_SAVE_FAILED":return Pe(Pe({},e),{},{saveStatus:"STATUS_FAILED",error:t.error});case"SETTING_LOAD_STATUS":return Pe(Pe({},e),{},{pluginStatus:t.pluginStatus})}return e},search:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SEARCH_VALUES":return Ne(Ne({},e),{},{search:Ne(Ne({},e.search),t.searchValue),results:void 0!==t.searchValue.replacement?e.results:[],status:void 0!==t.searchValue.replacement?e.status:null});case"SEARCH_CANCEL":return t.clearAll?Ne(Ne({},e),De()):Ne(Ne({},e),Le());case"SEARCH_START_FRESH":return Ne(Ne({},e),{},{requestCount:0,status:Se,totals:0===t.page?[]:e.totals,progress:0===t.page?[]:e.progress,results:[],searchDirection:t.searchDirection,searchedPhrase:t.replacement,showLoading:!0});case"SEARCH_START_MORE":return Me(e)?e:Ne(Ne({},e),{},{canCancel:!0,showLoading:!0});case"SEARCH_COMPLETE":return Me(e)?e:Ie(e,t);case"SEARCH_REPLACE_COMPLETE":return Me(e)?e:Ne(Ne({},Ie(Ne(Ne({},e),{},{results:[]}),t)),{},{replacing:e.replacing.filter((function(e){return e!==t.rowId}))});case"SEARCH_REPLACE_ALL":return Ne(Ne(Ne({},e),De()),{},{replaceAll:!0,status:Se,canCancel:!0});case"SEARCH_REPLACE_ALL_COMPLETE":return Me(e)?e:Ne(Ne({},e),{},{replaceCount:t.results.rows+e.replaceCount,phraseCount:t.results.phrases+e.phraseCount,requestCount:!1===t.progress.next?0:e.requestCount+1,progress:t.progress,totals:Ne(Ne({},e.totals),t.totals),status:Fe(e,t)?Oe:Se});case"SEARCH_SAVE_ROW_COMPLETE":return Ne(Ne({},e),{},{status:Oe,replacing:e.replacing.filter((function(e){return e!==t.rowId})),results:e.results.map((function(e){return e.row_id===t.result.row_id?t.result:e})),rawData:null});case"SEARCH_LOAD_ROW_COMPLETE":return Ne(Ne({},e),{},{replacing:e.replacing.filter((function(e){return e!==t.rowId})),status:Oe,rawData:t.row});case"SEARCH_REPLACE_ROW":return Ne(Ne({},e),{},{replacing:e.replacing.concat(t.rowId),status:Se,rawData:null});case Ce:return Ne(Ne(Ne({},e),Le()),{},{status:"STATUS_FAILED"});case"SEARCH_DELETE_COMPLETE":return Ne(Ne({},e),{},{results:e.results.filter((function(e){return e.row_id!==t.rowId})),replacing:e.replacing.filter((function(e){return e!==t.rowId})),status:Oe})}return e},message:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ce:case"SETTING_LOAD_FAILED":case"SETTING_SAVE_FAILED":var n=We(e.errors,t.error);return console.error(t.error.message),Ue(Ue({},e),{},{errors:n,inProgress:$e(e)});case"SEARCH_REPLACE_ROW":case"SETTING_SAVING":return Ue(Ue({},e),{},{inProgress:e.inProgress+1});case"SEARCH_REPLACE_COMPLETE":case"SEARCH_DELETE_COMPLETE":case"SEARCH_SAVE_ROW_COMPLETE":case"SETTING_SAVED":return Ue(Ue({},e),{},{notices:Be(e.notices,Ve[t.type]),inProgress:$e(e)});case"MESSAGE_CLEAR_NOTICES":return Ue(Ue({},e),{},{notices:[]});case"MESSAGE_CLEAR_ERRORS":return Ue(Ue({},e),{},{errors:[]})}return e}}),Qe=n(8),Ge=n.n(Qe),Ke=["search","options","support"];function Ye(e,t){var n=function(e,t,n){var r=Xe(n);for(var o in e)e[o]&&t[o]!==e[o]?r[o.toLowerCase()]=e[o]:t[o]===e[o]&&delete r[o.toLowerCase()];return"?"+Qe.stringify(r)}(e,t);document.location.search!==n&&history.pushState({},null,n)}function Xe(e){return Qe.parse(e?e.slice(1):document.location.search.slice(1))}function Je(e){var t=Xe(e);return-1!==Ke.indexOf(t.sub)?t.sub:"search"}var Ze=Object(we.composeWithDevTools)({name:"Search Regex"}),et=[_e,function(){return function(e){return function(t){switch(t.type){case"SEARCH_START_FRESH":!function(e){Ye({searchPhrase:e.searchPhrase,searchFlags:e.searchFlags,source:e.source,sourceFlags:e.sourceFlags,perPage:e.perPage},{searchPhrase:"",searchFlags:[],source:[],sourceFlags:[],perPage:25,sub:"search"})}(t)}return e(t)}}}];function tt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(oe.createStore)(qe,e,Ze(oe.applyMiddleware.apply(void 0,et)));return t}function nt(){var e=SearchRegexi10n&&SearchRegexi10n.preload&&SearchRegexi10n.preload.pluginStatus?SearchRegexi10n.preload.pluginStatus:[];return{loadStatus:Se,saveStatus:!1,error:!1,pluginStatus:e,apiTest:{},database:SearchRegexi10n.database?SearchRegexi10n.database:{},values:SearchRegexi10n.settings?SearchRegexi10n.settings:{},api:SearchRegexi10n.api?SearchRegexi10n.api:[],warning:!1}}var rt=function(){return[{value:"regex",label:Object(N.translate)("Regular Expression")},{value:"case",label:Object(N.translate)("Ignore Case")}]},ot=function(){return[{value:25,label:Object(N.translate)("25 per page ")},{value:50,label:Object(N.translate)("50 per page ")},{value:100,label:Object(N.translate)("100 per page")},{value:250,label:Object(N.translate)("250 per page")},{value:500,label:Object(N.translate)("500 per page")}]};function at(e,t,n){return t.find((function(t){return t.value===e||t.name===e}))?e:n}function it(e,t){return e.filter((function(e){return at(e,t,!1)}))}function lt(e,t,n){return t[e[0]]?n.filter((function(n){return void 0!==t[e[0]][n]})):[]}function ut(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function ct(e){var t,n,r=e.searchPhrase,o=e.searchFlags,a=e.sourceFlags,i=e.replacement,l=e.perPage,u=(t=SearchRegexi10n.preload.sources,n=e.source.length>0?e.source[0]:[],t.map((function(e){return at(n,e.sources)})).filter((function(e){return e})));return{searchPhrase:r,searchFlags:ut(it(o,rt())),source:u,sourceFlags:ut(lt(u,SearchRegexi10n.preload.source_flags,a)),replacement:i,perPage:at(parseInt(l,10),ot(),25)}}function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ht=function(e){return Object.keys(e).filter((function(t){return e[t]||0===e[t]||!1===e[t]})).reduce((function(t,n){return t[n]=e[n],t}),{})},mt=function(){return SearchRegexi10n.api&&SearchRegexi10n.api.WP_API_root?SearchRegexi10n.api.WP_API_root:"/wp-json/"},gt=function(){return SearchRegexi10n.api.WP_API_nonce},yt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=mt()+"search-regex/v1/"+e+"/";if(t._wpnonce=gt(),t&&Object.keys(t).length>0&&(t=ht(t),Object.keys(t).length>0)){var r=n+(-1===mt().indexOf("?")?"?":"&")+Ge.a.stringify(t);return r}return n},bt=function(){return new Headers({Accept:"application/json, */*;q=0.1"})},vt=function(){return new Headers({"Content-Type":"application/json; charset=utf-8"})},wt=function(e){return{url:e,credentials:"same-origin"}},Et=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return pt(pt({headers:bt()},wt(yt(e,t))),{},{method:"get"})},xt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=pt(pt({headers:vt()},wt(yt(e,n))),{},{method:"post",params:t});return r.body="{}",Object.keys(t).length>0&&(r.body=JSON.stringify(t)),r},_t={get:function(){return Et("setting")},update:function(e){return xt("setting",e)}},St={get:function(e){return Et("search",e)},replace:function(e){return xt("replace",e)}},Ot={deleteRow:function(e,t){return xt("source/".concat(e,"/").concat(t,"/delete"))},loadRow:function(e,t){return Et("source/".concat(e,"/").concat(t))},saveRow:function(e,t,n){return xt("source/".concat(e,"/").concat(t),n)}},kt={checkApi:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?xt("plugin/test",{test:"ping"}):Et("plugin/test");return n.url=n.url.replace(mt(),e).replace(/[\?&]_wpnonce=[a-f0-9]*/,""),n.url+=(-1===n.url.indexOf("?")?"?":"&")+"_wpnonce="+gt(),n}},Pt=function(e){return 0===e?"Admin AJAX returned 0":e.message?e.message:(console.error(e),"Unknown error "+("object"===st(e)?Object.keys(e):e))},Tt=function(e){return e.error_code?e.error_code:e.data&&e.data.error_code?e.data.error_code:0===e?"admin-ajax":e.code?e.code:"unknown"},jt=function(e){return e.action=function(e){return e.url.replace(mt(),"").replace(/[\?&]_wpnonce=[a-f0-9]*/,"")+" "+e.method.toUpperCase()}(e),fetch(e.url,e).then((function(t){if(!t||!t.status)throw{message:"No data or status object returned in request",code:0};var n;return t.status&&void 0!==t.statusText&&(e.status=t.status,e.statusText=t.statusText),t.headers.get("x-wp-nonce")&&(n=t.headers.get("x-wp-nonce"),SearchRegexi10n.api.WP_API_nonce=n),t.text()})).then((function(t){e.raw=t;try{var n=JSON.parse(t.replace(/\ufeff/,""));if(e.status&&200!==e.status)throw{message:Pt(n),code:Tt(n),request:e,data:n.data?n.data:null};if(0===n)throw{message:"Failed to get data",code:"json-zero"};return n}catch(t){throw t.request=e,t.code=t.code||t.name,t}}))},Ct=(n(42),function(e){var t=e.title,n=e.url,r=void 0!==n&&n;return j.a.createElement("tr",null,j.a.createElement("th",null,!r&&t,r&&j.a.createElement("a",{href:r,target:"_blank"},t)),j.a.createElement("td",null,e.children))}),Rt=function(e){return j.a.createElement("table",{className:"form-table"},j.a.createElement("tbody",null,e.children))};function Nt(e){return(Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var At=function e(t){var n=t.value,r=t.label;return"object"===Nt(n)?j.a.createElement("optgroup",{label:r},n.map((function(t,n){return j.a.createElement(e,{label:t.label,value:t.value,key:n})}))):j.a.createElement("option",{value:n},r)},It=function(e){var t=e.items,n=e.value,r=e.name,o=e.onChange,a=e.isEnabled,i=void 0===a||a;return j.a.createElement("select",{name:r,value:n,onChange:o,disabled:!i},t.map((function(e,t){return j.a.createElement(At,{value:e.value,label:e.label,key:t})})))};function Dt(e){return(Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ft(e,t){return(Ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var o=Ht(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zt(this,n)}}function zt(e,t){return!t||"object"!==Dt(t)&&"function"!=typeof t?Ut(e):t}function Ut(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bt=function(){return[{value:0,label:Object(N.translate)("Default REST API")},{value:1,label:Object(N.translate)("Raw REST API")},{value:3,label:Object(N.translate)("Relative REST API")}]},$t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ft(e,t)}(a,e);var t,n,r,o=Mt(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Wt(Ut(t=o.call(this,e)),"onChange",(function(e){var n=e.target,r="checkbox"===n.type?n.checked:n.value;t.setState(Wt({},n.name,r))})),Wt(Ut(t),"onSubmit",(function(e){e.preventDefault(),t.props.onSaveSettings(t.state)})),t.state=e.values,t}return t=a,(n=[{key:"render",value:function(){var e=this.props.saveStatus;return j.a.createElement("form",{onSubmit:this.onSubmit},j.a.createElement(Rt,null,j.a.createElement(Ct,{title:""},j.a.createElement("label",null,j.a.createElement("input",{type:"checkbox",checked:this.state.support,name:"support",onChange:this.onChange}),j.a.createElement("span",{className:"sub"},Object(N.translate)("I'm a nice person and I have helped support the author of this plugin")))),j.a.createElement(Ct,{title:Object(N.translate)("REST API")},j.a.createElement(It,{items:Bt(),name:"rest_api",value:parseInt(this.state.rest_api,10),onChange:this.onChange}),"  ",j.a.createElement("span",{className:"sub"},Object(N.translate)("How Search Regex uses the REST API - don't change unless necessary")))),j.a.createElement("input",{className:"button-primary",type:"submit",name:"update",value:Object(N.translate)("Update"),disabled:e===Se}))}}])&&Lt(t.prototype,n),r&&Lt(t,r),a}(j.a.Component);var Vt=be((function(e){var t=e.settings;return{values:t.values,saveStatus:t.saveStatus}}),(function(e){return{onSaveSettings:function(t){e(function(e){return function(t){return jt(_t.update(e)).then((function(e){t({type:"SETTING_SAVED",values:e.settings,warning:e.warning})})).catch((function(e){t({type:"SETTING_SAVE_FAILED",error:e})})),t({type:"SETTING_SAVING",settings:e})}}(t))}}}))($t),qt=(n(44),function(){return j.a.createElement("div",{className:"placeholder-container"},j.a.createElement("div",{className:"placeholder-loading"}))});n(46);function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kt(e,t){return(Kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zt(e);if(t){var o=Zt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xt(this,n)}}function Xt(e,t){return!t||"object"!==Qt(t)&&"function"!=typeof t?Jt(e):t}function Jt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zt(e){return(Zt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var en=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kt(e,t)}(a,e);var t,n,r,o=Yt(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).onDonate=t.handleDonation.bind(Jt(t)),t.onChange=t.handleChange.bind(Jt(t)),t.onBlur=t.handleBlur.bind(Jt(t)),t.onInput=t.handleInput.bind(Jt(t)),t.state={support:e.support,amount:20},t}return t=a,(n=[{key:"handleBlur",value:function(){this.setState({amount:Math.max(16,this.state.amount)})}},{key:"handleDonation",value:function(){this.setState({support:!1})}},{key:"getReturnUrl",value:function(){return document.location.href+"#thanks"}},{key:"handleChange",value:function(e){this.state.amount!==e.value&&this.setState({amount:parseInt(e.value,10)})}},{key:"handleInput",value:function(e){var t=e.target.value?parseInt(e.target.value,10):16;this.setState({amount:t})}},{key:"getAmountoji",value:function(e){for(var t=[[100,"😍"],[80,"😎"],[60,"😊"],[40,"😃"],[20,"😀"],[10,"🙂"]],n=0;n<t.length;n++)if(e>=t[n][0])return t[n][1];return t[t.length-1][1]}},{key:"renderSupported",value:function(){return j.a.createElement("div",null,Object(N.translate)("You've supported this plugin - thank you!"),"  ",j.a.createElement("a",{href:"#",onClick:this.onDonate},Object(N.translate)("I'd like to support some more.")))}},{key:"renderUnsupported",value:function(){for(var e,t,n,r=(n="",(t=16)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),o=20;o<=100;o+=20)r[o]="";return j.a.createElement("div",null,j.a.createElement("label",null,j.a.createElement("p",null,Object(N.translate)("Search Regex is free to use - life is wonderful and lovely! It has required a great deal of time and effort to develop and you can help support this development by {{strong}}making a small donation{{/strong}}.",{components:{strong:j.a.createElement("strong",null)}})," ",Object(N.translate)("You get useful software and I get to carry on making it better."))),j.a.createElement("input",{type:"hidden",name:"cmd",value:"_xclick"}),j.a.createElement("input",{type:"hidden",name:"business",value:"admin@urbangiraffe.com"}),j.a.createElement("input",{type:"hidden",name:"item_name",value:"Search Regex (WordPress Plugin)"}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_promo_code",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_product_category",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_shipping_method",value:""}),j.a.createElement("input",{type:"hidden",name:"buyer_credit_user_address_change",value:""}),j.a.createElement("input",{type:"hidden",name:"no_shipping",value:"1"}),j.a.createElement("input",{type:"hidden",name:"return",value:this.getReturnUrl()}),j.a.createElement("input",{type:"hidden",name:"no_note",value:"1"}),j.a.createElement("input",{type:"hidden",name:"currency_code",value:"USD"}),j.a.createElement("input",{type:"hidden",name:"tax",value:"0"}),j.a.createElement("input",{type:"hidden",name:"lc",value:"US"}),j.a.createElement("input",{type:"hidden",name:"bn",value:"PP-DonationsBF"}),j.a.createElement("div",{className:"donation-amount"},"$",j.a.createElement("input",{type:"number",name:"amount",min:16,value:this.state.amount,onChange:this.onInput,onBlur:this.onBlur}),j.a.createElement("span",null,this.getAmountoji(this.state.amount)),j.a.createElement("input",{type:"submit",className:"button-primary",value:Object(N.translate)("Support 💰")})))}},{key:"render",value:function(){var e=this.state.support;return j.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",className:"donation"},j.a.createElement(Rt,null,j.a.createElement(Ct,{title:Object(N.translate)("Plugin Support")+":"},e?this.renderSupported():this.renderUnsupported())))}}])&&Gt(t.prototype,n),r&&Gt(t,r),a}(j.a.Component);function tn(e){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function on(e,t){return(on=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function an(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=un(e);if(t){var o=un(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ln(this,n)}}function ln(e,t){return!t||"object"!==tn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&on(e,t)}(a,e);var t,n,r,o=an(a);function a(){return nn(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"componentDidMount",value:function(){this.props.onLoadSettings()}},{key:"render",value:function(){var e=this.props,t=e.loadStatus,n=e.values;return t!==Se&&n?j.a.createElement("div",null,t===Oe&&j.a.createElement(en,{support:n.support}),t===Oe&&j.a.createElement(Vt,null)):j.a.createElement(qt,null)}}])&&rn(t.prototype,n),r&&rn(t,r),a}(j.a.Component);var sn=be((function(e){var t=e.settings;return{loadStatus:t.loadStatus,values:t.values}}),(function(e){return{onLoadSettings:function(){e((function(e,t){return t().settings.loadStatus===Oe?null:(jt(_t.get()).then((function(t){e({type:"SETTING_LOAD_SUCCESS",values:t.settings})})).catch((function(t){e({type:"SETTING_LOAD_FAILED",error:t})})),e({type:"SETTING_LOAD_START"}))}))}}}))(cn),fn=function(e){var t=e.url,n=e.children;return j.a.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer"},n)},pn=function(){return j.a.createElement("div",null,j.a.createElement("h2",null,Object(N.translate)("Need more help?")),j.a.createElement("p",null,Object(N.translate)("Full documentation for Search Regex can be found at {{site}}https://searchregex.com{{/site}}.",{components:{site:j.a.createElement(fn,{url:"https://searchregex.com/support/"})}})),j.a.createElement("p",null,j.a.createElement("strong",null,Object(N.translate)("If you want to report a bug please read the {{report}}Reporting Bugs{{/report}} guide.",{components:{report:j.a.createElement(fn,{url:"https://searchregex.com/support/reporting-bugs/"})}}))),j.a.createElement("div",{className:"inline-notice inline-general"},j.a.createElement("p",{className:"github"},j.a.createElement(fn,{url:"https://github.com/johngodley/search-regex/issues"},j.a.createElement("img",{src:SearchRegexi10n.pluginBaseUrl+"/images/GitHub-Mark-64px.png",width:"32",height:"32"})),j.a.createElement(fn,{url:"https://github.com/johngodley/search-regex/issues"},"https://github.com/johngodley/search-regex/"))),j.a.createElement("p",null,Object(N.translate)("Please note that any support is provide on as-time-is-available basis and is not guaranteed. I do not provide paid support.")),j.a.createElement("p",null,Object(N.translate)("If you want to submit information that you don't want in a public repository then send it directly via {{email}}email{{/email}} - include as much information as you can!",{components:{email:j.a.createElement("a",{href:"mailto:john@searchregex.com?subject=Search%20Regex%20Issue&body="+encodeURIComponent("Search Regex: "+SearchRegexi10n.versions)})}})),j.a.createElement("h2",null,Object(N.translate)("Redirection")),j.a.createElement("p",null,Object(N.translate)("Like this plugin? You might want to consider {{link}}Redirection{{/link}}, a plugin to manage redirects, that is also written by me.",{components:{link:j.a.createElement(fn,{url:"https://redirection.me"})}})))};var dn=function(){return j.a.createElement("div",{className:"searchregex-help"},j.a.createElement("h3",null,Object(N.translate)("Quick Help")),j.a.createElement("p",null,Object(N.translate)("The following concepts are used by Search Regex:")),j.a.createElement("ul",null,j.a.createElement("li",null,Object(N.translate)("{{link}}Search Flags{{/link}} - additional qualifiers for your search, to enable case insensitivity, and to enable regular expression support.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/searching/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Regular expression{{/link}} - a way of defining a pattern for text matching. Provides more advanced matches.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/regular-expression/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Source{{/link}} - the source of data you wish to search. For example, posts, pages, or comments.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/search-source/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Source Flags{{/link}} - additional options for the selected source. For example, include post {{guid}}GUID{{/guid}} in the search.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/search-source/"}),guid:j.a.createElement(fn,{url:"https://deliciousbrains.com/wordpress-post-guids-sometimes-update/"})}}))))},hn=(n(48),function(){return j.a.createElement(j.a.Fragment,null,j.a.createElement(dn,null),j.a.createElement(pn,null))}),mn=n(5),gn=n.n(mn);n(50);function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){vn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(e,t){if(null===e)return{};var n=e.left,r=e.top,o=e.width,a={left:n,top:r+e.height};return t&&(a.width=o),a}function En(e){var t=e.style,n=e.align,r=gn()("redirect-popover__arrows",{"redirect-popover__arrows__left":"left"===n,"redirect-popover__arrows__right":"right"===n,"redirect-popover__arrows__centre":"centre"===n});return j.a.createElement("div",{className:r,style:t})}var xn=function(e){var t=e.position,n=e.children,r=e.togglePosition,o=e.align,a=e.hasArrow,i=Object(T.useRef)(null),l=Object(T.useMemo)((function(){return function(e,t,n,r,o){if(!r.current)return bn(bn({},e),{},{visibility:"hidden"});var a=e.width?e.width:r.current.getBoundingClientRect().width,i=t.parentWidth-a-20,l=function(e,t,n,r){return"right"===r?e+n-t:"centre"===r?e-(t+n)/2:e}(t.left,e.width?e.width:a,t.width,n);return bn(bn({},e),{},{left:Math.min(i,l),top:o?e.top+5:e.top})}(t,r,o,i,a)}),[t,r]),u=Object(T.useMemo)((function(){return function(e,t){return t?bn(bn({},e),{},{width:t.getBoundingClientRect().width}):e}(l,i.current)}),[l]);return j.a.createElement(j.a.Fragment,null,a&&j.a.createElement(En,{style:u,align:o}),j.a.createElement("div",{className:"redirect-popover__content",style:l,ref:i},n))};function _n(e){var t=Object(T.useRef)(null),n=e.children,r=e.onOutside,o=e.className,a=function(e){(function(e,t){return!!t.current&&!t.current.contains(e.target)}(e,t)||"Escape"===e.key)&&r(e)};return Object(T.useEffect)((function(){return addEventListener("click",a),addEventListener("keydown",a),function(){removeEventListener("click",a),removeEventListener("keydown",a)}}),[]),j.a.createElement("div",{className:o,ref:t},n)}function Sn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return On(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return On(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function On(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kn=function(e){var t=e.renderContent,n=e.className,r=e.renderToggle,o=e.align,a=void 0===o?"left":o,i=e.onHide,l=e.matchToggle,u=void 0!==l&&l,c=e.hasArrow,s=void 0!==c&&c,f=e.offset,p=Sn(Object(T.useState)(!1),2),d=p[0],h=p[1],m=Sn(Object(T.useState)(null),2),g=m[0],y=m[1],b=Object(T.useRef)(null);return Object(T.useEffect)((function(){d&&y(function(e,t){if(null===e)return{};var n=document.getElementById("react-portal").getBoundingClientRect(),r=e.getBoundingClientRect(),o=r.height,a=r.width,i=r.left,l=r.top;return{left:i-n.left+(t||0),top:l-n.top,width:a,height:o,parentWidth:n.width,parentHeight:n.height}}(b.current,f))}),[d,u]),Object(T.useEffect)((function(){if(d){var e=window.addEventListener("resize",(function(){h(!1)}));return function(){window.removeEventListener("resize",e)}}}),[d]),j.a.createElement(j.a.Fragment,null,j.a.createElement("div",{className:gn()("redirect-popover__toggle",n),ref:b},r(d,(function(e){return h(!d)}))),d&&Object(C.createPortal)(j.a.createElement(_n,{className:"redirect-popover",onOutside:function(){h(!1),i&&i()}},j.a.createElement(xn,{position:wn(g,u),togglePosition:g,align:a,hasArrow:s},t((function(){return h(!1)})))),document.getElementById("react-portal")))};n(52);function Pn(){return(Pn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Tn=function(e){var t=e.children,n=e.className,r=e.onClick,o=e.title,a=e.onCancel,i={title:o,onClick:r};return j.a.createElement("div",Pn({className:gn()("redirect-badge",n,r?"redirect-badge__click":null)},i),j.a.createElement("div",null,t,a&&j.a.createElement("span",{onClick:a},"⨯")))};function jn(e){return(jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cn(e){return function(e){if(Array.isArray(e))return Rn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function An(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach((function(t){Hn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function In(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ln(e,t){return(Ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Un(e);if(t){var o=Un(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Mn(this,n)}}function Mn(e,t){return!t||"object"!==jn(t)&&"function"!=typeof t?zn(e):t}function zn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Un(e){return(Un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn=function(e){var t=e.label,n=e.value,r=e.onSelect,o=e.isSelected;return j.a.createElement("p",null,j.a.createElement("label",null,j.a.createElement("input",{type:"checkbox",name:n,onChange:function(e){return r(n,e.target.checked)},checked:o}),t))},Bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ln(e,t)}(a,e);var t,n,r,o=Fn(a);function a(){var e;In(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hn(zn(e=o.call.apply(o,[this].concat(n))),"onSelect",(function(t,n){var r=e.props,o=r.selected,a=r.value,i=r.multiple,l=An({},o);if(n){var u=t===a||t;l[a]=i?[].concat(Cn(l[a]),[t]):u}else i?l[a]=l[a].filter((function(e){return e!==t})):delete l[a];e.props.onApply(l,t)})),e}return t=a,(n=[{key:"isSelected",value:function(e){var t=this.props,n=t.multiple,r=t.selected,o=t.value;return n&&Array.isArray(r[o])?-1!==r[o].indexOf(e):!(o!==e||!r[o])||r[o]===e}},{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.options,o=t.value;return r?j.a.createElement("div",{className:"redirect-multioption__group"},j.a.createElement("h5",null,n),r.map((function(t){return j.a.createElement(Wn,{label:t.label,value:t.value,onSelect:e.onSelect,isSelected:e.isSelected(t.value),key:t.value})}))):j.a.createElement(Wn,{label:n,value:o,onSelect:this.onSelect,isSelected:this.isSelected(o)})}}])&&Dn(t.prototype,n),r&&Dn(t,r),a}(j.a.Component);n(54);function $n(e){return($n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(n),!0).forEach((function(t){er(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kn(e,t){return(Kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var o=Zn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xn(this,n)}}function Xn(e,t){return!t||"object"!==$n(t)&&"function"!=typeof t?Jn(e):t}function Jn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kn(e,t)}(a,e);var t,n,r,o=Yn(a);function a(){var e;Qn(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return er(Jn(e=o.call.apply(o,[this].concat(n))),"removeFilter",(function(t,n){n.preventDefault(),n.stopPropagation();var r=qn({},e.props.selected);delete r[t],e.props.onApply(r,t)})),e}return t=a,(n=[{key:"getBadges",value:function(){var e=this,t=this.props,n=t.selected,r=t.options,o=t.badges,a=Object.keys(n).filter((function(e){return void 0!==n[e]}));return a.length>0&&o?a.slice(0,3).map((function(t){var o=r.find((function(e){return e.value===t}));return o&&n[t]?j.a.createElement(Tn,{key:t,onCancel:function(n){return e.removeFilter(t,n)}},o.label):null})).concat([a.length>3?j.a.createElement("span",{key:"end"},"..."):null]):null}},{key:"shouldShowTitle",value:function(){var e=this.props,t=e.selected;return!1===e.hideTitle||0===Object.keys(t).filter((function(e){return t[e]})).length}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,r=t.selected,o=t.onApply,a=t.title,i=t.isEnabled,l=t.multiple,u=t.className,c=this.getBadges();return j.a.createElement(kn,{renderToggle:function(t,n){return j.a.createElement("button",{className:gn()("button","action","redirect-multioption__button",i?null:"redirect-multioption__disabled",t?"redirect-multioption__button_enabled":null),onClick:n,disabled:!i,type:"button"},e.shouldShowTitle()&&j.a.createElement("h5",null,a),c,j.a.createElement("svg",{height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false"},j.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})))},matchToggle:c&&Object.keys(r),align:"right",renderContent:function(){return j.a.createElement("div",{className:gn()("redirect-multioption",u)},n.map((function(e){return j.a.createElement(Bn,{label:e.label,value:e.value,options:e.options,multiple:e.multiple||l||!1,selected:r,key:e.label,onApply:o})})))}})}}])&&Gn(t.prototype,n),r&&Gn(t,r),a}(j.a.Component);er(tr,"defaultProps",{badges:!1,hideTitle:!1,isEnabled:!0});var nr=tr;n(56);function rr(){return(rr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function or(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ar(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ir(e){var t=e.children,n=e.onSave,r=e.className,o=gn()("searchregex-replace",r);if(n){return j.a.createElement("form",{className:o,onSubmit:function(e){e.preventDefault(),n()}},t)}return j.a.createElement("div",{className:o},t)}var lr=function(e){var t=e.canReplace,n=e.setReplace,r=e.className,o=e.autoFocus,a=e.onSave,i=e.onCancel,l=e.placeholder,u=e.description,c=Object(T.useRef)(null),s=or(Object(T.useState)(""),2),f=s[0],p=s[1],d=or(Object(T.useState)(""),2),h=d[0],m=d[1],g={id:"replace",value:null===f?"":f,name:"replace",onChange:function(e){return p(e.target.value)},disabled:!t||"remove"===h,placeholder:"remove"===h?Object(N.translate)("Search phrase will be removed"):l,ref:c};return Object(T.useEffect)((function(){p("remove"===h?null:""),n("remove"===h?null:"")}),[h]),Object(T.useEffect)((function(){n(f)}),[f]),Object(T.useEffect)((function(){setTimeout((function(){o&&c&&c.current.focus()}),50)}),[c]),j.a.createElement(ir,{onSave:a&&function(){return a(f)},className:r},j.a.createElement("div",{className:"searchregex-replace__input"},"multi"===h?j.a.createElement("textarea",rr({rows:"4"},g)):j.a.createElement("input",rr({type:"text"},g)),j.a.createElement(It,{items:[{value:"",label:Object(N.translate)("Single")},{value:"multi",label:Object(N.translate)("Multi")},{value:"remove",label:Object(N.translate)("Remove")}],name:"replace_flags",value:h,onChange:function(e){return m(e.target.value)},isEnabled:t})),j.a.createElement("div",{className:"searchregex-replace__action"},u&&j.a.createElement("p",null,u),a&&j.a.createElement("p",{className:"searchregex-replace__actions"},j.a.createElement("input",{type:"submit",className:"button button-primary",value:Object(N.translate)("Replace"),disabled:""===f}),j.a.createElement("input",{type:"button",className:"button button-secondary",value:Object(N.translate)("Cancel"),onClick:i}))))};function ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach((function(t){sr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e,t){return cr(cr({},e),{},{searchFlags:Object.keys(e.searchFlags),sourceFlags:Object.keys(e.sourceFlags)})}var pr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"forward";return function(r,o){var a=cr(cr({},fr(e,o().search.sources)),{},{page:t,searchDirection:n});return jt(St.get(a)).then((function(e){r(cr(cr({type:"SEARCH_COMPLETE"},e),{},{perPage:a.perPage}))})).catch((function(e){r({type:Ce,error:e})})),r(cr({type:"SEARCH_START_FRESH"},a))}},dr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(o,a){var i=a().search.search,l=cr(cr({},fr(i,a().search.sources)),{},{rowId:t,replacePhrase:e});return n&&(l.columnId=n),r&&(l.posId=r),jt(St.replace(l)).then((function(e){o(cr(cr({type:"SEARCH_REPLACE_COMPLETE"},e),{},{perPage:i.perPage,rowId:t}))})).catch((function(e){o({type:Ce,error:e})})),o({type:"SEARCH_REPLACE_ROW",rowId:t})}};var hr=function(e){return e.map((function(e){var t=e.name;return{label:e.label,value:t}}))};var mr=be((function(e){var t=e.search;return{search:t.search,sources:t.sources,sourceFlagOptions:t.sourceFlags,replaceAll:t.replaceAll}}),(function(e){return{onSetSearch:function(t){e(function(e){return{type:"SEARCH_VALUES",searchValue:e}}(t))}}}))((function(e){var t,n=e.search,r=e.onSetSearch,o=e.sources,a=e.sourceFlagOptions,i=e.replaceAll,l=n.searchPhrase,u=n.searchFlags,c=n.sourceFlags,s=n.source,f=n.perPage,p=o.map((function(e){var t=e.sources;return{label:e.label,value:hr(t)}})),d=a[s[0]]?(t=a[s[0]],Object.keys(t).map((function(e){return{value:e,label:t[e]}}))):null,h=status===Se||i,m=function(e,t){if(0===t.length)return null;for(var n=0;n<e.length;n++)for(var r=0;r<e[n].sources.length;r++)if(e[n].sources[r].name===t[0])return e[n].sources[r];return null}(o,s);return j.a.createElement("table",null,j.a.createElement("tbody",null,j.a.createElement("tr",{className:"searchregex-search__search"},j.a.createElement("th",null,Object(N.translate)("Search")),j.a.createElement("td",null,j.a.createElement("input",{type:"text",value:l,name:"searchPhrase",placeholder:Object(N.translate)("Enter search phrase"),onChange:function(e){var t,n,o;r((t={},n=e.target.name,o=e.target.value,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))},disabled:h}),j.a.createElement(nr,{options:rt(),selected:u,onApply:function(e){return r({searchFlags:e})},title:Object(N.translate)("Search Flags"),isEnabled:!h,badges:!0}))),j.a.createElement("tr",{className:"searchregex-search__replace"},j.a.createElement("th",null,Object(N.translate)("Replace")),j.a.createElement("td",null,j.a.createElement(lr,{canReplace:!h,setReplace:function(e){return r({replacement:e})},placeholder:Object(N.translate)("Enter global replacement text")}))),j.a.createElement("tr",{className:"searchregex-search__source"},j.a.createElement("th",null,Object(N.translate)("Source")),j.a.createElement("td",null,j.a.createElement(It,{items:p,value:s[0],onChange:function(e){return r({source:[e.target.value],sourceFlags:{}})},name:"source",isEnabled:!h}),d&&d.length>0&&j.a.createElement(nr,{options:d,selected:c,onApply:function(e){return r({sourceFlags:e})},title:Object(N.translate)("Source Options"),isEnabled:!h,badges:!0,hideTitle:!0}),m&&j.a.createElement("span",{className:"searchregex-search__source__description"},m.description))),j.a.createElement("tr",null,j.a.createElement("th",null,Object(N.translate)("Results")),j.a.createElement("td",null,j.a.createElement(It,{name:"perPage",items:ot(),value:f,onChange:function(e){return r({perPage:parseInt(e.target.value,10)})},isEnabled:!h})))))}));var gr=be((function(e){return{isLoading:e.status===Se}}),(function(e){return{onDelete:function(t,n){e(function(e,t){return function(n){return jt(Ot.deleteRow(e,t)).then((function(e){n({type:"SEARCH_DELETE_COMPLETE",rowId:t})})).catch((function(e){n({type:Ce,error:e})})),n({type:"SEARCH_REPLACE_ROW",rowId:t})}}(t,n))},onSave:function(t,n){e(dr(t,n))}}}))((function(e){for(var t=e.setReplacement,n=e.actions,r=e.isLoading,o=e.onSave,a=e.result,i=e.onDelete,l=e.onEditor,u=e.description,c=function(e,n){n(),t(""),o(e,a.row_id)},s=[j.a.createElement(kn,{key:"replace",renderToggle:function(e,t){return j.a.createElement("a",{href:"#",onClick:function(e){return function(e,t){e.preventDefault(),r||t()}(e,t)}},Object(N.translate)("Replace"))},onHide:function(){return t("")},hasArrow:!0,disabled:r,align:"right",renderContent:function(e){return j.a.createElement(lr,{className:"searchregex-replace__modal",canReplace:!0,setReplace:function(e){return t(e)},autoFocus:!0,onSave:function(t){return c(t,e)},onCancel:function(){return function(e){e(),t("")}(e)},placeholder:Object(N.translate)("Replacement for all matches in this row"),description:u})}})],f={edit:Object(N.translate)("Edit")},p=Object.keys(n),d=0;d<p.length;d++)f[p[d]]&&s.push(j.a.createElement(fn,{url:n[p[d]],key:p[d]},f[p[d]]));return s.push(j.a.createElement("a",{key:"edit",href:"#",onClick:function(e){e.preventDefault(),l()}},Object(N.translate)("Editor"))),s.push(j.a.createElement("a",{key:"delete",href:"#",onClick:function(e){e.preventDefault(),i(a.source_type,a.row_id)}},Object(N.translate)("Delete"))),s.reduce((function(e,t){return[e," | ",t]}))})),yr=(n(58),function(e){var t=e.size,n=void 0===t?"":t,r="spinner-container"+(n?" spinner-"+n:"");return j.a.createElement("div",{className:r},j.a.createElement("span",{className:"css-spinner"}))});var br=function(){return j.a.createElement("div",{className:"searchregex-result__more"},Object(N.translate)("Maximum number of matches exceeded and hidden from view. These will be included in any replacements."))};var vr=function(e){var t=e.typeOfReplacement,n=e.isReplacing,r=e.onUpdate,o=e.onSave,a=e.children,i=e.match,l=function(e,t){r(""),o(e),t()},u=function(e){r(""),e&&e()};return j.a.createElement(kn,{className:gn()({"searchregex-result__replaced":"replace"===t,"searchregex-result__highlight":"match"===t,"searchregex-result__deleted":"delete"===t}),renderToggle:function(e,t){return j.a.createElement("span",{onClick:function(){return!n&&t()},title:i},a)},onHide:u,hasArrow:!0,align:"centre",offset:25,renderContent:function(e){return j.a.createElement(lr,{className:"searchregex-replace__modal",canReplace:!0,setReplace:function(e){return r(e)},autoFocus:!0,onSave:function(t){return l(t,e)},onCancel:function(){return u(e)},placeholder:Object(N.translate)("Replacement for this match"),description:Object(N.translate)("Replace single phrase.")})}})},wr=function(e,t){return" ".replace(t.length)};function Er(e,t){return e&&t.length>0?e.replace(/(\\?\$|\\?\\)+(\d{1,2})/g,(function(e,n,r){return r=parseInt(r,10),"\\$"===e.substr(0,2)?e.replace("\\",""):void 0!==t[r-1]?t[r-1]:e})):e}function xr(e,t){return null===e?"delete":e!==t?"replace":"match"}var _r=function(e){var t=e.match,n=e.originalMatch;return null===t?j.a.createElement("strike",null,n):t.replace(/\n/g,"↵").replace(/^(\s+)/,wr).replace(/(\s+)$/,wr)};n(60);function Sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||kr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e){return function(e){if(Array.isArray(e))return Pr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||kr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e,t){if(e){if("string"==typeof e)return Pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pr(e,t):void 0}}function Pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Tr=function(e){return e.map((function(){return""}))};function jr(e,t,n){for(var r=e.source,o=e.matches,a=e.contextReplacement,i=e.columnId,l=e.rowId,u=e.onReplace,c=e.isReplacing,s=[],f=0,p=function(e){var p,d,h,m=o[e],g=m.context_offset,y=m.match,b=m.pos_id,v=m.replacement,w=m.captures,E=(p=[t[e],a,v],d=y,void 0===(h=p.find((function(e){return n=d,null===(t=e)||t!==n&&""!==t;var t,n})))?d:h);s.push(r.substring(f,g)),s.push(j.a.createElement(vr,{typeOfReplacement:xr(E,y),onSave:function(e){return u(e,l,i,b)},onUpdate:function(r){return n(function(e,t,n){var r=Or(e);return r[t]=n,r}(t,e,r))},isReplacing:c,title:y,key:e},j.a.createElement(_r,{match:Er(E,w),originalMatch:y}))),f=g+y.length},d=0;d<o.length;d++)p(d);return s.push(r.substr(f)),s}var Cr=be(null,(function(e){return{onReplace:function(t,n,r,o){e(dr(t,n,r,o))}}}))((function(e){var t=e.matches,n=e.count,r=e.contextReplacement,o=Sr(Object(T.useState)(Tr(t)),2),a=o[0],i=o[1],l=jr(e,a,i);return Object(T.useEffect)((function(){i(Tr(t))}),[r]),j.a.createElement("div",{className:"searchregex-match__context"},l,t.length!==n&&j.a.createElement(br,null))}));var Rr=function(e){var t=e.item,n=e.rowId,r=e.contextReplacement,o=e.isReplacing,a=e.column,i=t.context,l=t.match_count,u=t.matches,c=a.column_id,s=a.column_label;return j.a.createElement("div",{className:"searchregex-match"},j.a.createElement("div",{className:"searchregex-match__column",title:c},s),j.a.createElement(Cr,{source:i,matches:u,count:l,contextReplacement:r,columnId:c,rowId:n,isReplacing:o}))};function Nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ar(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ir=function(e){var t=e.replacement,n=e.rowId,r=e.isReplacing,o=e.column,a=o.contexts,i=o.context_count,l=o.match_count,u=Nr(Object(T.useState)(!1),2),c=u[0],s=u[1],f=a.slice(0,c?a.length:2),p=l-f.reduce((function(e,t){return e+t.match_count}),0);return j.a.createElement(j.a.Fragment,null,f.map((function(e){return j.a.createElement(Rr,{item:e,key:n+"-"+e.context_id,column:o,rowId:n,contextReplacement:t,isReplacing:r})})),!c&&a.length>2&&j.a.createElement("p",null,j.a.createElement("button",{className:"button button-secondary",onClick:function(){return s(!0)}},Object(N.translate)("Show %s more","Show %s more",{count:p,args:Object(N.numberFormat)(p)}))),c&&a.length!==i&&j.a.createElement(br,null))};var Dr=!!document.documentElement.currentStyle,Lr={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Fr=["letter-spacing","line-height","font-family","font-weight","font-size","font-style","tab-size","text-rendering","text-transform","width","text-indent","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","box-sizing"],Mr={},zr=document.createElement("textarea"),Ur=function(e){Object.keys(Lr).forEach((function(t){e.style.setProperty(t,Lr[t],"important")}))};function Hr(e,t,n,r,o){void 0===n&&(n=!1),void 0===r&&(r=null),void 0===o&&(o=null),null===zr.parentNode&&document.body.appendChild(zr);var a=function(e,t,n){void 0===n&&(n=!1);if(n&&Mr[t])return Mr[t];var r=window.getComputedStyle(e);if(null===r)return null;var o=Fr.reduce((function(e,t){return e[t]=r.getPropertyValue(t),e}),{}),a=o["box-sizing"];if(""===a)return null;Dr&&"border-box"===a&&(o.width=parseFloat(o.width)+parseFloat(r["border-right-width"])+parseFloat(r["border-left-width"])+parseFloat(r["padding-right"])+parseFloat(r["padding-left"])+"px");var i=parseFloat(o["padding-bottom"])+parseFloat(o["padding-top"]),l=parseFloat(o["border-bottom-width"])+parseFloat(o["border-top-width"]),u={sizingStyle:o,paddingSize:i,borderSize:l,boxSizing:a};n&&(Mr[t]=u);return u}(e,t,n);if(null===a)return null;var i=a.paddingSize,l=a.borderSize,u=a.boxSizing,c=a.sizingStyle;Object.keys(c).forEach((function(e){zr.style[e]=c[e]})),Ur(zr),zr.value=e.value||e.placeholder||"x";var s=-1/0,f=1/0,p=zr.scrollHeight;"border-box"===u?p+=l:"content-box"===u&&(p-=i),zr.value="x";var d=zr.scrollHeight-i,h=Math.floor(p/d);return null!==r&&(s=d*r,"border-box"===u&&(s=s+i+l),p=Math.max(s,p)),null!==o&&(f=d*o,"border-box"===u&&(f=f+i+l),p=Math.min(f,p)),{height:p,minHeight:s,maxHeight:f,rowCount:Math.floor(p/d),valueRowCount:h}}zr.setAttribute("tab-index","-1"),zr.setAttribute("aria-hidden","true"),Ur(zr);var Wr=function(){},Br=0,$r=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this)._onRef=function(e){n._ref=e;var t=n.props.inputRef;"function"!=typeof t?t.current=e:t(e)},n._onChange=function(e){n._controlled||n._resizeComponent(),n.props.onChange(e,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n))},n._resizeComponent=function(e){void 0===e&&(e=Wr);var t=Hr(n._ref,n._uid,n.props.useCacheForDOMMeasurements,n.props.minRows,n.props.maxRows);if(null!==t){var r=t.height,o=t.minHeight,a=t.maxHeight,i=t.rowCount,l=t.valueRowCount;n.rowCount=i,n.valueRowCount=l,n.state.height===r&&n.state.minHeight===o&&n.state.maxHeight===a?e():n.setState({height:r,minHeight:o,maxHeight:a},e)}else e()},n.state={height:t.style&&t.style.height||0,minHeight:-1/0,maxHeight:1/0},n._uid=Br++,n._controlled=void 0!==t.value,n._resizeLock=!1,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.render=function(){var e=this.props,t=(e.inputRef,e.maxRows,e.minRows,e.onHeightChange,e.useCacheForDOMMeasurements,B(e,["inputRef","maxRows","minRows","onHeightChange","useCacheForDOMMeasurements"]));return t.style=W({},t.style,{height:this.state.height}),Math.max(t.style.maxHeight||1/0,this.state.maxHeight)<this.state.height&&(t.style.overflow="hidden"),Object(T.createElement)("textarea",W({},t,{onChange:this._onChange,ref:this._onRef}))},o.componentDidMount=function(){var e=this;this._resizeComponent(),this._resizeListener=function(){e._resizeLock||(e._resizeLock=!0,e._resizeComponent((function(){e._resizeLock=!1})))},window.addEventListener("resize",this._resizeListener)},o.componentDidUpdate=function(e,t){e!==this.props&&this._resizeComponent(),this.state.height!==t.height&&this.props.onHeightChange(this.state.height,this)},o.componentWillUnmount=function(){window.removeEventListener("resize",this._resizeListener),function(e){delete Mr[e]}(this._uid)},r}(T.Component);$r.defaultProps={inputRef:Wr,onChange:Wr,onHeightChange:Wr,useCacheForDOMMeasurements:!1};var Vr=$r;function qr(e){return(qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qr(){return(Qr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kr(e,t){return(Kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zr(e);if(t){var o=Zr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xr(this,n)}}function Xr(e,t){return!t||"object"!==qr(t)&&"function"!=typeof t?Jr(e):t}function Jr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zr(e){return(Zr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function to(e){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function no(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ro(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oo(e,t){return(oo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ao(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uo(e);if(t){var o=uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return io(this,n)}}function io(e,t){return!t||"object"!==to(t)&&"function"!=typeof t?lo(e):t}function lo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uo(e){return(uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function co(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var so,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oo(e,t)}(a,e);var t,n,r,o=ao(a);function a(){var e;no(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return co(lo(e=o.call.apply(o,[this].concat(n))),"handleClickOutside",(function(){e.props.onClose()})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props.onClose;return j.a.createElement("div",{className:"redirection-modal_content"},j.a.createElement("div",{className:"redirection-modal_close"},j.a.createElement("button",{onClick:e},"✖")),this.props.children)}}])&&ro(t.prototype,n),r&&ro(t,r),a}(j.a.Component),po=(so=fo,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kr(e,t)}(a,e);var t,n,r,o=Yr(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),eo(Jr(t=o.call(this,e)),"onClick",(function(e){t.node.current&&null===e.target.closest(".redirect-click-outside")&&t.node.current.handleClickOutside(e)})),eo(Jr(t),"onKeydown",(function(e){"Escape"===e.key&&t.node.current.handleClickOutside(e)})),t.node=j.a.createRef(),t}return t=a,(n=[{key:"componentDidMount",value:function(){addEventListener("mousedown",this.onClick),addEventListener("keydown",this.onKeydown)}},{key:"componentWillUnmount",value:function(){removeEventListener("mousedown",this.onClick),removeEventListener("keydown",this.onKeydown)}},{key:"render",value:function(){return j.a.createElement("div",{className:"redirect-click-outside"},j.a.createElement(so,Qr({},this.props,{ref:this.node})))}}])&&Gr(t.prototype,n),r&&Gr(t,r),a}(j.a.Component));n(62);function ho(e){Object(T.useEffect)((function(){return document.body.classList.add("redirection-modal_shown"),function(){document.body.classList.remove("redirection-modal_shown")}}));var t=gn()({"redirection-modal_wrapper":!0,"redirection-modal_wrapper-padding":e.padding});return j.a.createElement("div",{className:t},j.a.createElement("div",{className:"redirection-modal_backdrop"}),j.a.createElement("div",{className:"redirection-modal_main"},j.a.createElement(po,e)))}ho.defaultProps={padding:!0,onClose:function(){}};var mo=function(e){return R.a.createPortal(j.a.createElement(ho,e),document.getElementById("react-modal"))};n(64);function go(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bo=be((function(e){var t=e.search;return{rawData:t.rawData,status:t.status}}),(function(e){return{onLoad:function(t,n){e(function(e,t){return function(n){return jt(Ot.loadRow(e,t)).then((function(e){n({type:"SEARCH_LOAD_ROW_COMPLETE",rowId:t,row:e.result})})).catch((function(e){n({type:Ce,error:e})})),n({type:"SEARCH_REPLACE_ROW",rowId:t})}}(t,n))},onSave:function(t,n,r,o){e(function(e,t,n,r){return function(o,a){var i=a().search.search,l=i.searchPhrase,u=i.searchFlags,c=i.replacement,s=i.sourceFlags,f={searchPhrase:l,replacement:c,searchFlags:Object.keys(u),sourceFlags:Object.keys(s)};return jt(Ot.saveRow(e,t,cr(cr({},f),{},{columnId:n,content:r}))).then((function(e){o(cr(cr({type:"SEARCH_SAVE_ROW_COMPLETE"},e),{},{rowId:t}))})).catch((function(e){o({type:Ce,error:e})})),o({type:"SEARCH_REPLACE_ROW",rowId:t})}}(t,n,r,o))}}}))((function(e){var t=e.result,n=e.onClose,r=e.onLoad,o=e.rawData,a=e.onSave,i=e.status,l=t.row_id,u=t.source_type,c=t.columns,s=go(Object(T.useState)(c[0].column_id),2),f=s[0],p=s[1],d=go(Object(T.useState)(""),2),h=d[0],m=d[1],g=c.find((function(e){return e.column_id===f}))?c.find((function(e){return e.column_id===f})).column_label:"";return Object(T.useEffect)((function(){r(u,l)}),[]),Object(T.useEffect)((function(){o&&m(o[f]?o[f]:"")}),[o]),o?j.a.createElement(mo,{onClose:n},j.a.createElement("div",{className:"searchregex-editor"},j.a.createElement("h2",null,Object(N.translate)("Editing %s",{args:g})),j.a.createElement(Vr,{value:h,rows:"15",maxRows:30,onChange:function(e){return m(e.target.value)},disabled:i===Se}),j.a.createElement("div",{className:"searchregex-editor__actions"},1===c.length&&j.a.createElement("div",null," "),c.length>1&&j.a.createElement(It,{name:"column_id",value:f,items:c.map((function(e){return{value:e.column_id,label:e.column_label}})),onChange:function(e){return t=e.target.value,p(t),void m(o[t]?o[t]:"");var t},isEnabled:i!==Se}),j.a.createElement("div",null,i===Se&&j.a.createElement(yr,null),j.a.createElement("button",{disabled:i===Se,className:"button button-primary",onClick:function(){n(),a(u,l,f,h)}},Object(N.translate)("Save")),j.a.createElement("button",{className:"button button-secondary",onClick:function(){return n()}},Object(N.translate)("Close")))))):null}));n(66);function vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eo(e,t){return null===t||t.length>0?t:e}function xo(e){var t=e.view,n=e.title;return t?j.a.createElement(fn,{url:t},n):n}var _o=be((function(e){var t=e.search;return{replacing:t.replacing,globalReplacement:t.search.replacement}}),null)((function(e){var t=e.result,n=e.globalReplacement,r=e.replacing,o=t.columns,a=t.actions,i=t.row_id,l=t.source_name,u=t.source_type,c=t.title,s=t.match_count,f=r&&-1!==r.indexOf(i),p=vo(Object(T.useState)(""),2),d=p[0],h=p[1],m=vo(Object(T.useState)(!1),2),g=m[0],y=m[1];return Object(T.useEffect)((function(){h("")}),[n]),j.a.createElement("tr",{className:gn()("searchregex-result",{"searchregex-result__updating":f})},j.a.createElement("td",{className:"searchregex-result__table"},j.a.createElement("span",{title:u},l)),j.a.createElement("td",{className:"searchregex-result__row"},i),j.a.createElement("td",{className:"searchregex-result__row"},s),j.a.createElement("td",{className:"searchregex-result__match"},j.a.createElement("h2",null,j.a.createElement(xo,{view:a.view,title:c})),o.map((function(e){return j.a.createElement(Ir,{column:e,replacement:Eo(n,d),rowId:i,isReplacing:f,key:e.column_id})}))),j.a.createElement("td",{className:"searchregex-result__action"},f?j.a.createElement(yr,null):j.a.createElement(gr,{actions:a,setReplacement:h,result:t,onEditor:function(){return y(!0)},description:Object(N.translate)("Replace %(count)s match.","Replace %(count)s matches.",{count:s,args:{count:Object(N.numberFormat)(s)}})}),g&&j.a.createElement(bo,{onClose:function(){return y(!1)},result:t})))}));var So=function(e){for(var t=e.columns,n=[],r=0;r<t;r++)n.push(j.a.createElement("td",{key:r,colSpan:0==r?2:1},j.a.createElement(qt,null)));return j.a.createElement("tr",null,n)};var Oo=function(e){var t=e.columns;return j.a.createElement("tr",null,j.a.createElement("td",{colSpan:t},Object(N.translate)("No more matching results found.")))},ko=function(e){var t=e.title,n=e.button,r=e.className,o=e.enabled,a=e.onClick;return o?j.a.createElement("a",{className:r+" button",href:"#",onClick:function(e){e.preventDefault(),a()}},j.a.createElement("span",{className:"screen-reader-text"},t),j.a.createElement("span",{"aria-hidden":"true"},n)):j.a.createElement("span",{className:"tablenav-pages-navspan button disabled","aria-hidden":"true"},n)};var Po=be((function(e){return{search:e.search.search}}),(function(e){return{onChangePage:function(t,n){e(pr(t,n))}}}))((function(e){var t=e.progress,n=e.onChangePage,r=e.isLoading,o=e.matchedPhrases,a=e.matchedRows,i=e.perPage,l=e.search,u=e.noTotal,c=void 0!==u&&u,s=t.current,f=t.previous,p=t.next,d=Math.ceil(a/i),h=Math.ceil(s/i)+1,m=p&&h<d;return j.a.createElement("div",{className:"tablenav-pages"},c&&j.a.createElement("div",null," "),!c&&j.a.createElement("div",{className:"displaying-num"},Object(N.translate)("Matches: %(phrases)s across %(rows)s database row.","Matches: %(phrases)s across %(rows)s database rows.",{count:a,args:{phrases:Object(N.numberFormat)(o),rows:Object(N.numberFormat)(a)}})),j.a.createElement("div",{className:"pagination-links"},j.a.createElement(ko,{title:Object(N.translate)("First page"),button:"«",className:"first-page",enabled:!1!==f&&!r,onClick:function(){return n(l,0)}}),j.a.createElement(ko,{title:Object(N.translate)("Prev page"),button:"‹",className:"prev-page",enabled:!1!==f&&!r,onClick:function(){return n(l,f)}}),j.a.createElement("span",{className:"tablenav-paging-text"},Object(N.translate)("Page %(current)s of %(total)s",{args:{current:Object(N.numberFormat)(h),total:Object(N.numberFormat)(d)}})),j.a.createElement(ko,{title:Object(N.translate)("Next page"),button:"›",className:"next-page",enabled:m&&!r,onClick:function(){return n(l,p)}}),j.a.createElement(ko,{title:Object(N.translate)("Last page"),button:"»",className:"last-page",enabled:m&&!r,onClick:function(){return n(l,(d-1)*i)}})))})),To=function(e,t){return!1===t?100:t/e*100},jo=function(e,t){return 0===t?t:t/e*100};var Co=be((function(e){return{search:e.search.search}}),(function(e){return{onChangePage:function(t,n,r){e(pr(t,n,r))}}}))((function(e){var t=e.total,n=e.progress,r=e.onChangePage,o=e.isLoading,a=e.searchDirection,i=e.search,l=e.noTotal,u=void 0!==l&&l,c=n.previous,s=n.next;return j.a.createElement("div",{className:"tablenav-pages"},u&&j.a.createElement("div",null," "),!u&&j.a.createElement("div",{className:"displaying-num"},Object(N.translate)("%s database row in total","%s database rows in total",{count:t,args:Object(N.numberFormat)(t)})),j.a.createElement("div",{className:"pagination-links"},j.a.createElement(ko,{title:Object(N.translate)("First page"),button:"«",className:"first-page",enabled:!1!==c&&!o,onClick:function(){return r(i,0,"forward")}}),j.a.createElement(ko,{title:Object(N.translate)("Prev page"),button:"‹",className:"prev-page",enabled:!1!==c&&!o,onClick:function(){return r(i,c,"backward")}}),j.a.createElement("span",{className:"tablenav-paging-text"},Object(N.translate)("Progress %(current)s%%",{args:{current:Object(N.numberFormat)("forward"===a?To(t,s):jo(t,0==s?c:s))}})),j.a.createElement(ko,{title:Object(N.translate)("Next page"),button:"›",className:"next-page",enabled:!1!==s&&!o,onClick:function(){return r(i,s,"forward")}})))}));n(68);function Ro(){return(Ro=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var No=function(e){var t=e.totals,n=e.searchDirection,r=t.matched_rows,o=t.matched_phrases,a=t.rows;return null===r?j.a.createElement("div",{className:"tablenav-pages"},j.a.createElement("div",{className:"displaying-num"}," ")):r>0?j.a.createElement(Po,Ro({},e,{matchedRows:r,matchedPhrases:o,total:a})):j.a.createElement(Co,Ro({},e,{total:a,searchDirection:n}))},Ao=(n(70),function(e,t){return"forward"===e&&!1!==t.next||"backward"===e&&!1!==t.previous});var Io=be((function(e){var t=e.search,n=t.results,r=t.status,o=t.progress,a=t.totals,i=t.requestCount;return{results:n,status:r,progress:o,searchDirection:t.searchDirection,totals:a,requestCount:i,search:t.search,showLoading:t.showLoading}}),(function(e){return{onSearchMore:function(t,n,r){e(function(e,t,n){return function(r,o){var a=cr(cr({},fr(e,o().search.sources)),{},{page:t,searchDirection:o().search.searchDirection,limit:n});return jt(St.get(a)).then((function(e){r(cr(cr({type:"SEARCH_COMPLETE"},e),{},{perPage:a.perPage}))})).catch((function(e){r({type:Ce,error:e})})),r(cr({type:"SEARCH_START_MORE"},a))}}(t,n,r))},onSetError:function(t){e(function(e){return{type:Ce,error:{message:e}}}(t))},onCancel:function(){e({type:"SEARCH_CANCEL",clearAll:!1})}}}))((function(e){var t=e.results,n=e.totals,r=e.progress,o=e.status,a=e.requestCount,i=e.search,l=e.searchDirection,u=e.showLoading,c=e.onCancel,s=i.perPage,f=i.searchFlags,p=e.onSearchMore,d=e.onChangePage,h=e.onSetError,m=o===Se;return Object(T.useEffect)((function(){a>500?h(Object(N.translate)("Maximum number of page requests has been exceeded and the search stopped. Try to be more specific with your search term.")):f.regex&&function(e,t,n,r){return e===Se&&t>0&&n.length<r}(o,a,t,s)&&Ao(l,r)?setTimeout((function(){p(i,"forward"===l?r.next:r.previous,s-t.length)}),450):f.regex&&!Ao(l,r)&&c()}),[a]),j.a.createElement(j.a.Fragment,null,j.a.createElement(No,{totals:n,onChangePage:d,perPage:s,isLoading:m,progress:r,searchDirection:l}),j.a.createElement("table",{className:gn()("wp-list-table","widefat","fixed","striped","items","searchregex-results")},j.a.createElement("thead",null,j.a.createElement("tr",null,j.a.createElement("th",{className:"searchregex-result__table"},Object(N.translate)("Source")),j.a.createElement("th",{className:"searchregex-result__row"},Object(N.translate)("Row ID")),j.a.createElement("th",{className:"searchregex-result__matches"},Object(N.translate)("Matches")),j.a.createElement("th",{className:"searchregex-result__match"},Object(N.translate)("Matched Phrases")),j.a.createElement("th",{className:"searchregex-result__action"},Object(N.translate)("Actions")))),j.a.createElement("tbody",null,t.map((function(e,t){return j.a.createElement(_o,{key:t,result:e})})),u&&j.a.createElement(So,{columns:4}),!m&&0===t.length&&j.a.createElement(Oo,{columns:5}))),j.a.createElement(No,{totals:n,onChangePage:d,perPage:s,isLoading:m,progress:r,searchDirection:l,noTotal:!0}))})),Do=function(e,t){return e===Se||0===t.length},Lo=function(e,t,n){return e===Se||0===t.length||t===n||null!==n&&0===n.length};var Fo=be((function(e){var t=e.search;return{search:t.search,status:t.status,replaceAll:t.replaceAll,canCancel:t.canCancel}}),(function(e){return{onCancel:function(){e({type:"SEARCH_CANCEL",clearAll:!1})},onSearch:function(t,n,r){e(pr(t,n,r))},onReplace:function(t,n,r){e(function(e,t,n){return function(r,o){var a=cr(cr({},fr(e,o().search.sources)),{},{replacePhrase:e.replacement,page:t,perPage:n});return jt(St.replace(a)).then((function(e){r(cr({type:"SEARCH_REPLACE_ALL_COMPLETE"},e))})).catch((function(e){r({type:Ce,error:e})})),r({type:"SEARCH_REPLACE_ALL"})}}(t,n,r))}}}))((function(e){var t=e.search,n=e.status,r=e.onSearch,o=e.onReplace,a=e.onCancel,i=e.replaceAll,l=e.canCancel,u=t.searchPhrase,c=t.replacement;return j.a.createElement("div",{className:"searchregex-search__action"},j.a.createElement("input",{className:"button button-primary",type:"submit",value:Object(N.translate)("Search"),onClick:function(){return r(t,0,"forward")},disabled:Do(n,u)||i}),j.a.createElement("input",{className:"button button-delete",type:"submit",value:Object(N.translate)("Replace All"),onClick:function(){return o(t,0,50)},disabled:Lo(n,u,c)||i}),n===Se&&l&&j.a.createElement(j.a.Fragment,null,j.a.createElement("button",{className:"button button-delete",onClick:a},Object(N.translate)("Cancel")),j.a.createElement(yr,null)))}));function Mo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ho(e,t,n){return(Ho="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wo(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Wo(e){return(Wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bo(e,t){return(Bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $o=function(e){return function(e){function t(){return Mo(this,t),Uo(this,Wo(t).apply(this,arguments))}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bo(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(){var e=this,t=Date.now(),n=!1;Object.keys(this.paths).forEach((function(r){var o=e.paths[r];if(o){n=!0;var a=o.style;a.transitionDuration=".3s, .3s, .3s, .06s",e.prevTimeStamp&&t-e.prevTimeStamp<100&&(a.transitionDuration="0s, 0s")}})),n&&(this.prevTimeStamp=Date.now())}},{key:"render",value:function(){return Ho(Wo(t.prototype),"render",this).call(this)}}])&&zo(n.prototype,r),o&&zo(n,o),t}(e)},Vo={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},qo=D.a.oneOfType([D.a.number,D.a.string]),Qo={className:D.a.string,percent:D.a.oneOfType([qo,D.a.arrayOf(qo)]),prefixCls:D.a.string,strokeColor:D.a.oneOfType([D.a.string,D.a.arrayOf(D.a.oneOfType([D.a.string,D.a.object])),D.a.object]),strokeLinecap:D.a.oneOf(["butt","round","square"]),strokeWidth:qo,style:D.a.object,trailColor:D.a.string,trailWidth:qo};function Go(){return(Go=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ko(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?ea(e):t}function Zo(e){return(Zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ea(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ta(e,t){return(ta=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function na(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ra=function(e){function t(){var e,n;Yo(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return na(ea(n=Jo(this,(e=Zo(t)).call.apply(e,[this].concat(o)))),"paths",{}),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ta(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.percent,o=t.prefixCls,a=t.strokeColor,i=t.strokeLinecap,l=t.strokeWidth,u=t.style,c=t.trailColor,s=t.trailWidth,f=t.transition,p=Ko(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete p.gapPosition;var d=Array.isArray(r)?r:[r],h=Array.isArray(a)?a:[a],m=l/2,g=100-l/2,y="M ".concat("round"===i?m:0,",").concat(m,"\n L ").concat("round"===i?g:100,",").concat(m),b="0 0 100 ".concat(l),v=0;return j.a.createElement("svg",Go({className:"".concat(o,"-line ").concat(n),viewBox:b,preserveAspectRatio:"none",style:u},p),j.a.createElement("path",{className:"".concat(o,"-line-trail"),d:y,strokeLinecap:i,stroke:c,strokeWidth:s||l,fillOpacity:"0"}),d.map((function(t,n){var r={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(v,"px"),transition:f||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=h[n]||h[h.length-1];return v+=t,j.a.createElement("path",{key:n,className:"".concat(o,"-line-path"),d:y,strokeLinecap:i,stroke:a,strokeWidth:l,fillOpacity:"0",ref:function(t){e.paths[n]=t},style:r})})))}}])&&Xo(n.prototype,r),o&&Xo(n,o),t}(T.Component);ra.propTypes=Qo,ra.defaultProps=Vo;var oa=$o(ra);function aa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ia(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aa(n,!0).forEach((function(t){da(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aa(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function la(){return(la=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ua(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sa(e){return(sa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pa(e,t){return(pa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ha=0;function ma(e){return+e.replace("%","")}function ga(e){return Array.isArray(e)?e:[e]}function ya(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,i=50-r/2,l=0,u=-i,c=0,s=-2*i;switch(a){case"left":l=-i,u=0,c=2*i,s=0;break;case"right":l=i,u=0,c=-2*i,s=0;break;case"bottom":u=i,s=2*i}var f="M 50,50 m ".concat(l,",").concat(u,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(c,",").concat(-s,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(-c,",").concat(s),p=2*Math.PI*i,d={stroke:n,strokeDasharray:"".concat(t/100*(p-o),"px ").concat(p,"px"),strokeDashoffset:"-".concat(o/2+e/100*(p-o),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:f,pathStyle:d}}var ba=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?fa(e):t}(this,sa(t).call(this)),da(fa(e),"paths",{}),da(fa(e),"gradientId",0),e.gradientId=ha,ha+=1,e}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pa(e,t)}(t,e),n=t,(r=[{key:"getStokeList",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.percent,o=t.strokeColor,a=t.strokeWidth,i=t.strokeLinecap,l=t.gapDegree,u=t.gapPosition,c=ga(r),s=ga(o),f=0;return c.map((function(t,r){var o=s[r]||s[s.length-1],c="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(e.gradientId,")"):"",p=ya(f,t,o,a,l,u),d=p.pathString,h=p.pathStyle;return f+=t,j.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:d,stroke:c,strokeLinecap:i,strokeWidth:0===t?0:a,fillOpacity:"0",style:h,ref:function(t){e.paths[r]=t}})}))}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.strokeWidth,r=e.trailWidth,o=e.gapDegree,a=e.gapPosition,i=e.trailColor,l=e.strokeLinecap,u=e.style,c=e.className,s=e.strokeColor,f=ua(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor"]),p=ya(0,100,i,n,o,a),d=p.pathString,h=p.pathStyle;delete f.percent;var m=ga(s).find((function(e){return"[object Object]"===Object.prototype.toString.call(e)}));return j.a.createElement("svg",la({className:"".concat(t,"-circle ").concat(c),viewBox:"0 0 100 100",style:u},f),m&&j.a.createElement("defs",null,j.a.createElement("linearGradient",{id:"".concat(t,"-gradient-").concat(this.gradientId),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(m).sort((function(e,t){return ma(e)-ma(t)})).map((function(e,t){return j.a.createElement("stop",{key:t,offset:e,stopColor:m[e]})})))),j.a.createElement("path",{className:"".concat(t,"-circle-trail"),d:d,stroke:i,strokeLinecap:l,strokeWidth:r||n,fillOpacity:"0",style:h}),this.getStokeList().reverse())}}])&&ca(n.prototype,r),o&&ca(n,o),t}(T.Component);ba.propTypes=ia({},Qo,{gapPosition:D.a.oneOf(["top","bottom","left","right"])}),ba.defaultProps=ia({},Vo,{gapPosition:"top"});$o(ba),n(72);var va=be((function(e){var t=e.search,n=t.progress,r=t.totals,o=t.requestCount,a=t.replaceCount,i=t.phraseCount;return{status:t.status,progress:n,totals:r,requestCount:o,replaceCount:a,phraseCount:i,isRegex:void 0!==t.search.searchFlags.regex}}),(function(e){return{onClear:function(){e({type:"SEARCH_CANCEL",clearAll:!0})},onNext:function(t){e(function(e){return function(t,n){var r=n().search.search,o=cr(cr({},fr(n().search.search,n().search.sources)),{},{replacePhrase:r.replacement,page:e});return jt(St.replace(o)).then((function(e){t(cr({type:"SEARCH_REPLACE_ALL_COMPLETE"},e))})).catch((function(e){t({type:Ce,error:e})})),t({type:"SEARCH_REPLACE_ALL_MORE"})}}(t))}}}))((function(e){var t=e.progress,n=e.totals,r=e.requestCount,o=e.replaceCount,a=e.onNext,i=e.status,l=e.onClear,u=e.phraseCount,c=e.isRegex?n.rows:n.matched_rows,s=void 0===t.rows?0:t.current+t.rows,f=c>0?Math.round(s/c*100):0;return Object(T.useEffect)((function(){r>0&&!1!==t.next&&o<c&&i===Se&&a(t.next)}),[r]),j.a.createElement("div",{className:"searchregex-replaceall"},j.a.createElement("h3",null,Object(N.translate)("Replace progress")),j.a.createElement("div",{className:"searchregex-replaceall__progress"},j.a.createElement(oa,{percent:f,strokeWidth:"4",trailWidth:"4",strokeLinecap:"square"}),j.a.createElement("div",{className:"searchregex-replaceall__status"},"".concat(f,"%"))),i===Oe&&j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Object(N.translate)("Finished!")),j.a.createElement("p",null,Object(N.translate)("Rows updated: %s",{args:Object(N.numberFormat)(o)})),j.a.createElement("p",null,Object(N.translate)("Phrases replaced: %s",{args:Object(N.numberFormat)(u)})),j.a.createElement("button",{className:"button button-primary",onClick:l},Object(N.translate)("Finished!"))))}));n(74);var wa=be((function(e){var t=e.search;return{status:t.status,replaceAll:t.replaceAll}}),null)((function(e){var t=e.status,n=e.replaceAll;return j.a.createElement(j.a.Fragment,null,j.a.createElement("div",{className:"inline-notice inline-warning"},j.a.createElement("p",null,Object(N.translate)("You are advised to backup your data before making modifications."))),j.a.createElement("p",null,Object(N.translate)("Search and replace information in your database.")),j.a.createElement("form",{className:"searchregex-search",onSubmit:function(e){return e.preventDefault()}},j.a.createElement(mr,null),j.a.createElement(Fo,null)),t&&(n?j.a.createElement(va,null):j.a.createElement(Io,null)))}));function Ea(e){return 0===e.code?e.message:e.data&&e.data.wpdb?j.a.createElement("span",null,"".concat(e.message," (").concat(e.code,")"),": ",j.a.createElement("code",null,e.data.wpdb)):e.code?j.a.createElement(j.a.Fragment,null,e.message," (",j.a.createElement("code",null,e.code),")"):e.message}var xa=function(e){var t,n,r,o,a=e.error;if(0===a.code)return j.a.createElement("p",null,Object(N.translate)("WordPress did not return a response. This could mean an error occurred or that the request was blocked. Please check your server error_log."));if("rest_cookie_invalid_nonce"===a.code)return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Ea(a)),j.a.createElement("p",null,Object(N.translate)("Your REST API is being cached. Please clear any caching plugin and any server cache, logout, clear your browser cache, and try again.")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/cloudflare/"},Object(N.translate)("Read this REST API guide for more information."))));if(a.request&&function(e,t){return(-1!==[400,401,403,405].indexOf(e)||"rest_no_route"===t)&&0===parseInt(t,10)}(a.request.status,a.code))return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Ea(a)),j.a.createElement("p",null,Object(N.translate)("Your REST API is probably being blocked by a security plugin. Please disable this, or configure it to allow REST API requests.")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/"},Object(N.translate)("Read this REST API guide for more information."))));if(a.request&&404===a.request.status)return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Ea(a)),j.a.createElement("p",null,Object(N.translate)("Your REST API is returning a 404 page. This may be caused by a security plugin, or your server may be misconfigured")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/"},Object(N.translate)("Read this REST API guide for more information."))));if(a.request&&413===a.request.status)return j.a.createElement("p",null,Object(N.translate)("Your server has rejected the request for being too big. You will need to change it to continue."));if(a.request&&function(e){return-1!==[500,502,503].indexOf(e)}(a.request.status))return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Ea(a)),j.a.createElement("p",null,Object(N.translate)("This could be a security plugin, or your server is out of memory or has an external error. Please check your server error log")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/#http"},Object(N.translate)("Read this REST API guide for more information."))));if("disabled"===a.code||"rest_disabled"===a.code)return j.a.createElement("p",null,Object(N.translate)("Your WordPress REST API has been disabled. You will need to enable it for Search Regex to continue working"));if(void 0===a.message)return j.a.createElement("p",null,Object(N.translate)("An unknown error occurred."));if(-1!==a.message.indexOf("Unexpected token")||-1!==a.message.indexOf("JSON parse error")){var i=(t=a.request,n=t.raw,r=n.split("<br />").filter((function(e){return e})),(o=n.lastIndexOf("}"))!==n.length?n.substr(o+1).trim():r.slice(0,r.length-1).join(" ").trim());return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Ea(a)),j.a.createElement("p",null,Object(N.translate)("WordPress returned an unexpected message. This is probably a PHP error from another plugin.")),i.length>1&&j.a.createElement("p",null,j.a.createElement("strong",null,Object(N.translate)("Possible cause"),":")," ",j.a.createElement("code",null,i.substr(0,1e3))))}var l=a.message.toLowerCase();return"failed to fetch"===l||"not allowed to request resource"===l||-1!==l.indexOf("networkerror")?j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Ea(a)),j.a.createElement("p",null,Object(N.translate)("Unable to make request due to browser security. This is typically because your WordPress and Site URL settings are inconsistent, or the request was blocked by your site CORS policy.")),j.a.createElement("p",null,j.a.createElement(fn,{url:"https://searchregex.com/support/problems/rest-api/#url"},Object(N.translate)("Read this REST API guide for more information.")))):j.a.createElement("p",null,Ea(a))};function _a(e){return(_a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oa(e,t){return(Oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ka(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ja(e);if(t){var o=ja(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pa(this,n)}}function Pa(e,t){return!t||"object"!==_a(t)&&"function"!=typeof t?Ta(e):t}function Ta(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ja(e){return(ja=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ca(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ra=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oa(e,t)}(a,e);var t,n,r,o=ka(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Ca(Ta(t=o.call(this,e)),"onShow",(function(e){e.preventDefault(),t.setState({hide:!1})})),Ca(Ta(t),"onHide",(function(e){e.preventDefault(),t.setState({hide:!0})}));var n=t.props.error.request;return t.state={hide:t.doesNeedHiding(n)},t}return t=a,(n=[{key:"doesNeedHiding",value:function(e){return e&&e.raw&&e.raw.length>500}},{key:"render",value:function(){var e=this.props.error.request,t=this.state.hide,n=this.doesNeedHiding(e);return e&&e.raw?j.a.createElement(j.a.Fragment,null,n&&t&&j.a.createElement("a",{className:"api-result-hide",onClick:this.onShow,href:"#"},Object(N.translate)("Show Full")),n&&!t&&j.a.createElement("a",{className:"api-result-hide",onClick:this.onHide,href:"#"},Object(N.translate)("Hide")),j.a.createElement("pre",null,t?e.raw.substr(0,500)+" ...":e.raw)):null}}])&&Sa(t.prototype,n),r&&Sa(t,r),a}(j.a.Component),Na=function(e,t){var n=function(e){return e.code?e.code:e.name?e.name:null}(e);return j.a.createElement("div",{className:"api-result-log_details",key:t},j.a.createElement("p",null,j.a.createElement("span",{className:"dashicons dashicons-no"})),j.a.createElement("div",null,j.a.createElement("p",null,t.map((function(t,n){return j.a.createElement("span",{key:n,className:"api-result-method_fail"},t," ",e.data&&e.data.status)})),n&&j.a.createElement("strong",null,n,": "),e.message),j.a.createElement(xa,{error:e}),j.a.createElement(Ra,{error:e})))},Aa=function(e){return j.a.createElement("p",{key:e},j.a.createElement("span",{className:"dashicons dashicons-yes"}),e.map((function(e,t){return j.a.createElement("span",{key:t,className:"api-result-method_pass"},e)})),Object(N.translate)("Working!"))},Ia=function(e){return e.code?e.code:0},Da=function(e){var t=e.result,n=[],r=t.GET,o=t.POST;return r.status===o.status&&Ia(r)===Ia(o)?("fail"===r.status?n.push(Na(r.error,["GET","POST"])):n.push(Aa(["GET","POST"])),n):("fail"===r.status?n.push(Na(r.error,["GET"])):n.push(Aa(["GET"])),"fail"===o.status?n.push(Na(o.error,["POST"])):n.push(Aa(["POST"])),n)},La=function(e){var t=e.item,n=e.result,r=e.routes,o=e.isCurrent,a=e.allowChange;return function(e){return 0===Object.keys(e).length||"loading"===e.GET.status||"loading"===e.POST.status}(n)?null:j.a.createElement("div",{className:"api-result-log"},j.a.createElement("form",{className:"api-result-select",action:SearchRegexi10n.pluginRoot+"&sub=support",method:"POST"},a&&!o&&j.a.createElement("input",{type:"submit",className:"button button-secondary",value:Object(N.translate)("Switch to this API")}),a&&o&&j.a.createElement("span",null,Object(N.translate)("Current API")),j.a.createElement("input",{type:"hidden",name:"rest_api",value:t.value}),j.a.createElement("input",{type:"hidden",name:"_wpnonce",value:gt()}),j.a.createElement("input",{type:"hidden",name:"action",value:"rest_api"})),j.a.createElement("h4",null,t.text),j.a.createElement("p",null,"URL: ",j.a.createElement("code",null,j.a.createElement(fn,{url:r[t.value]},r[t.value]))),j.a.createElement(Da,{result:n}))};n(76);function Fa(e){return(Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ma(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function za(e,t){return(za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ua(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ba(e);if(t){var o=Ba(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ha(this,n)}}function Ha(e,t){return!t||"object"!==Fa(t)&&"function"!=typeof t?Wa(e):t}function Wa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ba(e){return(Ba=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Va="warning-not-selected",qa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&za(e,t)}(a,e);var t,n,r,o=Ua(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),$a(Wa(t=o.call(this,e)),"onRetry",(function(e){e.preventDefault,t.setState({showing:!1}),t.onTry()})),$a(Wa(t),"onShow",(function(){t.setState({showing:!0})})),t.state={showing:!1},t}return t=a,(n=[{key:"componentDidMount",value:function(){this.onTry()}},{key:"onTry",value:function(){var e=this.props.routes,t=Object.keys(e).map((function(t){return{id:t,url:e[t]}}));this.props.onCheckApi(t.filter((function(e){return e})))}},{key:"getPercent",value:function(e,t){if(0===Object.keys(e).length)return 0;for(var n=2*t.length,r=0,o=0;o<Object.keys(e).length;o++){var a=Object.keys(e)[o];e[a]&&e[a].GET&&"loading"!==e[a].GET.status&&r++,e[a]&&e[a].POST&&"loading"!==e[a].POST.status&&r++}return Math.round(r/n*100)}},{key:"getApiStatus",value:function(e,t,n){var r,o=Object.keys(e).filter((function(t){return(n=e[t]).GET&&n.POST&&("fail"===n.GET.status||"fail"===n.POST.status);var n})).length;return 0===o?"ok":o<t.length?(r=e[n]).GET&&r.POST&&"ok"===r.GET.status&&"ok"===r.POST.status?"warning-current":Va:"fail"}},{key:"getApiStatusText",value:function(e){return"ok"===e?Object(N.translate)("Good"):"warning-current"===e?Object(N.translate)("Working but some issues"):e===Va?Object(N.translate)("Not working but fixable"):Object(N.translate)("Unavailable")}},{key:"canShowProblem",value:function(e){return this.state.showing||"fail"===e||e===Va}},{key:"renderError",value:function(e){var t=this.canShowProblem(e),n=Object(N.translate)("There are some problems connecting to your REST API. It is not necessary to fix these problems and the plugin is able to work.");return"fail"===e?n=Object(N.translate)("Your REST API is not working and the plugin will not be able to continue until this is fixed."):e===Va&&(n=Object(N.translate)("You are using a broken REST API route. Changing to a working API should fix the problem.")),j.a.createElement("div",{className:"api-result-log"},j.a.createElement("p",null,j.a.createElement("strong",null,Object(N.translate)("Summary")),": ",n),!t&&j.a.createElement("p",null,j.a.createElement("button",{className:"button-secondary",onClick:this.onShow},Object(N.translate)("Show Problems"))))}},{key:"render",value:function(){var e=Bt(),t=this.props,n=t.apiTest,r=t.routes,o=t.current,a=t.allowChange,i=this.state.showing,l=this.getPercent(n,e),u=this.getApiStatus(n,e,o),c=l>=100&&this.canShowProblem(u)||i,s=gn()({"api-result-status":!0,"api-result-status_good":"ok"===u&&l>=100,"api-result-status_problem":"warning-current"===u&&l>=100,"api-result-status_failed":("fail"===u||u===Va)&&l>=100});return j.a.createElement("div",{className:"api-result-wrapper"},j.a.createElement("div",{className:"api-result-header"},j.a.createElement("strong",null,"REST API:"),j.a.createElement("div",{className:"api-result-progress"},j.a.createElement("span",{className:s},l<100&&Object(N.translate)("Testing - %s%%",{args:[l]}),l>=100&&this.getApiStatusText(u)),l<100&&j.a.createElement(yr,null)),l>=100&&"ok"!==u&&j.a.createElement("button",{className:"button button-secondary api-result-retry",onClick:this.onRetry},Object(N.translate)("Check Again"))),l>=100&&"ok"!==u&&this.renderError(u),c&&e.map((function(e,t){return j.a.createElement(La,{item:e,result:(i=n,l=e.value,i&&i[l]?i[l]:{}),routes:r,key:t,isCurrent:o===e.value,allowChange:a});var i,l})))}}])&&Ma(t.prototype,n),r&&Ma(t,r),a}(j.a.Component);$a(qa,"defaultProps",{allowChange:!0});var Qa=be((function(e){var t=e.settings,n=t.api,r=n.routes,o=n.current;return{apiTest:t.apiTest,routes:r,current:o}}),(function(e){return{onCheckApi:function(t){e(function(e){return function(t){for(var n=function(n){var r=e[n],o=r.id,a=r.url;t({type:"SETTING_API_TRY",id:o,method:"GET"}),t({type:"SETTING_API_TRY",id:o,method:"POST"}),setTimeout((function(){jt(kt.checkApi(a)).then((function(){t({type:"SETTING_API_SUCCESS",id:o,method:"GET"})})).catch((function(e){t({type:"SETTING_API_FAILED",id:o,method:"GET",error:e})})),jt(kt.checkApi(a,!0)).then((function(){t({type:"SETTING_API_SUCCESS",id:o,method:"POST"})})).catch((function(e){t({type:"SETTING_API_FAILED",id:o,method:"POST",error:e})}))}),1e3)},r=0;r<e.length;r++)n(r)}}(t))}}}))(qa);n(78);function Ga(e){return(Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ka(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ya(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xa(e,t){return(Xa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ja(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ti(e);if(t){var o=ti(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Za(this,n)}}function Za(e,t){return!t||"object"!==Ga(t)&&"function"!=typeof t?ei(e):t}function ei(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ti(e){return(ti=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ri=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xa(e,t)}(a,e);var t,n,r,o=Ja(a);function a(){var e;Ka(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ni(ei(e=o.call.apply(o,[this].concat(n))),"onClick",(function(){e.props.onClear()})),e}return t=a,(n=[{key:"componentDidUpdate",value:function(e){0===e.errors.length&&this.props.errors.length>0&&window.scrollTo(0,0)}},{key:"getDebug",value:function(e){for(var t=[SearchRegexi10n.versions],n=0;n<e.length;n++){var r=e[n].request,o=void 0!==r&&r;t.push(""),t.push("Error: "+this.getErrorDetails(e[n])),o&&o.status&&o.statusText&&(t.push("Action: "+o.action),o.params&&t.push("Params: "+JSON.stringify(o.params)),t.push("Code: "+o.status+" "+o.statusText)),o&&t.push("Raw: "+(o.raw?o.raw:"-no data-"))}return t}},{key:"getErrorDetails",value:function(e){return 0===e.code?e.message:e.data&&e.data.wpdb?"".concat(e.message," (").concat(e.code,"): ").concat(e.data.wpdb):e.code?"".concat(e.message," (").concat(e.code,")"):e.message}},{key:"removeSameError",value:function(e){return e.filter((function(t,n){for(var r=n+1;n<e.length-1;n++){if(t.code&&e[r].code&&t.code===e[r].code)return!1;if(t.message&&e[r].message&&t.message===e[r].message)return!1}return!0}))}},{key:"renderDebug",value:function(e){var t="mailto:john@searchregex.com?subject=Search%20Regex%20Error&body="+encodeURIComponent(e.join("\n")),n="https://github.com/johngodley/search-regex/issues/new?title=Search%20Regex%20Error&body="+encodeURIComponent("```\n"+e.join("\n")+"\n```\n\n");return j.a.createElement(j.a.Fragment,null,j.a.createElement("p",null,Object(N.translate)("Please {{strong}}create an issue{{/strong}} or send it in an {{strong}}email{{/strong}}.",{components:{strong:j.a.createElement("strong",null)}})),j.a.createElement("p",null,j.a.createElement("a",{href:n,className:"button-primary"},Object(N.translate)("Create An Issue"))," ",j.a.createElement("a",{href:t,className:"button-secondary"},Object(N.translate)("Email"))),j.a.createElement("p",null,Object(N.translate)("Include these details in your report along with a description of what you were doing and a screenshot.")),j.a.createElement("p",null,j.a.createElement(Vr,{readOnly:!0,cols:"120",value:e.join("\n"),spellCheck:!1})))}},{key:"renderNonce",value:function(e){return j.a.createElement("div",{className:"red-error"},j.a.createElement("h2",null,Object(N.translate)("You are not authorised to access this page.")),j.a.createElement("p",null,Object(N.translate)("This is usually fixed by doing one of these:")),j.a.createElement("ol",null,j.a.createElement("li",null,Object(N.translate)("Reload the page - your current session is old.")),j.a.createElement("li",null,Object(N.translate)("Log out, clear your browser cache, and log in again - your browser has cached an old session.")),j.a.createElement("li",null,Object(N.translate)("Your admin pages are being cached. Clear this cache and try again."))),j.a.createElement("p",null,Object(N.translate)("The problem is almost certainly caused by one of the above.")),j.a.createElement("h3",null,Object(N.translate)("That didn't help")),this.renderDebug(e))}},{key:"renderError",value:function(e){var t=this.removeSameError(e),n=this.getDebug(t);return e.length>0&&"rest_cookie_invalid_nonce"===e[0].code?this.renderNonce(n):j.a.createElement("div",{className:"red-error"},j.a.createElement("div",{className:"closer",onClick:this.onClick},"✖"),j.a.createElement("h2",null,Object(N.translate)("Something went wrong 🙁")),j.a.createElement("div",{className:"red-error_title"},t.map((function(e,t){return j.a.createElement(xa,{error:e,key:t})}))),j.a.createElement(Qa,null),j.a.createElement("h3",null,Object(N.translate)("What do I do next?")),j.a.createElement("ol",null,j.a.createElement("li",null,Object(N.translate)('Take a look at the {{link}}plugin status{{/link}}. It may be able to identify and "magic fix" the problem.',{components:{link:j.a.createElement("a",{href:"?page=search-regex.php&sub=support"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Caching software{{/link}}, in particular Cloudflare, can cache the wrong thing. Try clearing all your caches.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/problems/cloudflare/"})}})),j.a.createElement("li",null,Object(N.translate)("{{link}}Please temporarily disable other plugins!{{/link}} This fixes so many problems.",{components:{link:j.a.createElement(fn,{url:"https://searchregex.com/support/problems/plugins/"})}})),j.a.createElement("li",null,Object(N.translate)("If you are using WordPress 5.2 or newer then look at your {{link}}Site Health{{/link}} and resolve any issues.",{components:{link:j.a.createElement(fn,{url:"/wp-admin/site-health.php"})}}))),j.a.createElement("h3",null,Object(N.translate)("That didn't help")),this.renderDebug(n))}},{key:"render",value:function(){var e=this.props.errors;return 0===e.length?null:this.renderError(e)}}])&&Ya(t.prototype,n),r&&Ya(t,r),a}(j.a.Component);var oi=be((function(e){return{errors:e.message.errors}}),(function(e){return{onClear:function(){e({type:"MESSAGE_CLEAR_ERRORS"})}}}))(ri);n(80);function ai(e){return(ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function li(e,t){return(li=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fi(e);if(t){var o=fi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ci(this,n)}}function ci(e,t){return!t||"object"!==ai(t)&&"function"!=typeof t?si(e):t}function si(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fi(e){return(fi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var di=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&li(e,t)}(a,e);var t,n,r,o=ui(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),pi(si(t=o.call(this,e)),"onClick",(function(){t.state.shrunk?t.setState({shrunk:!1}):t.props.onClear()})),pi(si(t),"onShrink",(function(){t.setState({shrunk:!0})})),t.state={shrunk:!1,width:"auto"},t}return t=a,(n=[{key:"getSnapshotBeforeUpdate",value:function(e){return this.props.notices!==e.notices&&(this.stopTimer(),this.setState({shrunk:!1}),this.startTimer()),null}},{key:"componentWillUnmount",value:function(){this.stopTimer()}},{key:"stopTimer",value:function(){clearTimeout(this.timer)}},{key:"startTimer",value:function(){this.timer=setTimeout(this.onShrink,5e3)}},{key:"getNotice",value:function(e){return e.length>1?e[e.length-1]+" ("+e.length+")":e[0]}},{key:"renderNotice",value:function(e){var t="notice notice-info redirection-notice"+(this.state.shrunk?" redirection-notice_shrunk":"");return j.a.createElement("div",{className:t,onClick:this.onClick},j.a.createElement("div",{className:"closer"},"✔"),j.a.createElement("p",null,this.state.shrunk?j.a.createElement("span",{title:Object(N.translate)("View notice")},"🔔"):this.getNotice(e)))}},{key:"render",value:function(){var e=this.props.notices;return 0===e.length?null:this.renderNotice(e)}}])&&ii(t.prototype,n),r&&ii(t,r),a}(j.a.Component);var hi=be((function(e){return{notices:e.message.notices}}),(function(e){return{onClear:function(){e({type:"MESSAGE_CLEAR_NOTICES"})}}}))(di),mi=function(e){var t=e.item,n=e.isCurrent,r=e.onClick,o=SearchRegexi10n.pluginRoot+(""===t.value?"":"&sub="+t.value);return j.a.createElement("li",null,j.a.createElement("a",{className:n?"current":"",href:o,onClick:function(e){e.preventDefault(),r(t.value,o)}},t.name))};function gi(e){return-1!==SearchRegexi10n.caps.pages.indexOf(e)}n(82);var yi=function(e,t){return e===t.value||"search"===e&&""===t.value},bi=function(e){var t=e.onChangePage,n=e.current,r=[{name:Object(N.translate)("Search & Replace"),value:""},{name:Object(N.translate)("Options"),value:"options"},{name:Object(N.translate)("Support"),value:"support"}].filter((function(e){return gi(e.value)||""===e.value&&gi("search")}));return r.length<2?null:j.a.createElement("div",{className:"subsubsub-container"},j.a.createElement("ul",{className:"subsubsub"},r.map((function(e,r){return j.a.createElement(mi,{key:r,item:e,isCurrent:yi(n,e),onClick:t})})).reduce((function(e,t){return[e," | ",t]}))))};n(84);function vi(e){return(vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ei(e,t){return(Ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Oi(e);if(t){var o=Oi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _i(this,n)}}function _i(e,t){return!t||"object"!==vi(t)&&"function"!=typeof t?Si(e):t}function Si(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oi(e){return(Oi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ki(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ei(e,t)}(a,e);var t,n,r,o=xi(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),ki(Si(t=o.call(this,e)),"onPageChanged",(function(){var e=Je();t.changePage(e),t.setState({page:e,clicked:t.state.clicked+1})})),ki(Si(t),"onChangePage",(function(e,n){""===e&&(e="search"),t.props.onClear(),history.pushState({},null,n),t.changePage(e),t.setState({page:e,clicked:t.state.clicked+1})})),t.state={page:Je(),clicked:0,stack:!1,error:"2.0.1"!==SearchRegexi10n.version,info:!1},window.addEventListener("popstate",t.onPageChanged),t}return t=a,(n=[{key:"componentDidCatch",value:function(e,t){this.setState({error:!0,stack:e,info:t})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this.onPageChanged)}},{key:"changePage",value:function(e){}},{key:"getContent",value:function(e){switch(this.state.clicked,e){case"support":return j.a.createElement(hn,null);case"options":return j.a.createElement(sn,null)}return j.a.createElement(wa,null)}},{key:"renderError",value:function(){var e=[SearchRegexi10n.versions,"Buster: 2.0.1 === "+SearchRegexi10n.version,"",this.state.stack];return this.state.info&&this.state.info.componentStack&&e.push(this.state.info.componentStack),"2.0.1"!==SearchRegexi10n.version?j.a.createElement("div",{className:"red-error"},j.a.createElement("h2",null,Object(N.translate)("Cached Search Regex detected")),j.a.createElement("p",null,Object(N.translate)("Please clear your browser cache and reload this page.")),j.a.createElement("p",null,Object(N.translate)("If you are using a caching system such as Cloudflare then please read this: "),j.a.createElement(fn,{url:"https://searchregex.com/support/problems/cloudflare/"},Object(N.translate)("clearing your cache."))),j.a.createElement("p",null,j.a.createElement("textarea",{readOnly:!0,rows:e.length+3,cols:"120",value:e.join("\n"),spellCheck:!1}))):j.a.createElement("div",{className:"red-error"},j.a.createElement("h2",null,Object(N.translate)("Something went wrong 🙁")),j.a.createElement("p",null,Object(N.translate)("Search Regex is not working. Try clearing your browser cache and reloading this page."),"  ",Object(N.translate)("If you are using a page caching plugin or service (CloudFlare, OVH, etc) then you can also try clearing that cache.")),j.a.createElement("p",null,Object(N.translate)("If that doesn't help, open your browser's error console and create a {{link}}new issue{{/link}} with the details.",{components:{link:j.a.createElement(fn,{url:"https://github.com/johngodley/searchregex/issues"})}})),j.a.createElement("p",null,Object(N.translate)("Please mention {{code}}%s{{/code}}, and explain what you were doing at the time",{components:{code:j.a.createElement("code",null)},args:this.state.page})),j.a.createElement("p",null,j.a.createElement("textarea",{readOnly:!0,rows:e.length+8,cols:"120",value:e.join("\n"),spellCheck:!1})))}},{key:"render",value:function(){var e=this.state,t=e.error,n=e.page,r={search:Object(N.translate)("Search Regex"),options:Object(N.translate)("Options"),support:Object(N.translate)("Support")}[n];return t?this.renderError():j.a.createElement("div",{className:"wrap searchregex"},j.a.createElement("h1",{className:"wp-heading-inline"},r),j.a.createElement(bi,{onChangePage:this.onChangePage,current:n}),j.a.createElement(oi,null),this.getContent(n),j.a.createElement(hi,null))}}])&&wi(t.prototype,n),r&&wi(t,r),a}(j.a.Component);var Ti,ji=be((function(e){return{errors:e.message.errors}}),(function(e){return{onClear:function(){e({type:"MESSAGE_CLEAR_ERRORS"})}}}))(Pi),Ci=function(){return j.a.createElement(H,{store:tt({settings:nt(),search:{results:[],replacements:[],replacing:[],replaceAll:!1,replaceCount:0,phraseCount:0,search:(e=Xe(),ct({searchPhrase:e.searchphrase?e.searchphrase:"",searchFlags:e.searchflags?e.searchflags:["case"],source:e.source?e.source:["posts"],sourceFlags:e.sourceflags?e.sourceflags:[],replacement:"",perPage:e.perpage?e.perpage:25})),searchDirection:null,searchedPhrase:"",requestCount:0,totals:{},progress:{},status:null,showLoading:!1,sources:SearchRegexi10n.preload&&SearchRegexi10n.preload.sources?SearchRegexi10n.preload.sources:[],sourceFlags:SearchRegexi10n.preload&&SearchRegexi10n.preload.source_flags?SearchRegexi10n.preload.source_flags:[],rawData:null,canCancel:!1},message:{errors:[],notices:[],inProgress:0,saving:[]}})},j.a.createElement(j.a.StrictMode,null,j.a.createElement(ji,null)));var e};document.querySelector("#react-ui")&&(Ti="react-ui",A.a.setLocale({"":{localeSlug:SearchRegexi10n.localeSlug}}),A.a.addTranslations(SearchRegexi10n.locale),R.a.render(j.a.createElement(Ci,null),document.getElementById(Ti))),window.searchregex=SearchRegexi10n.version}]);
search-regex.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Search Regex
5
  Plugin URI: https://searchregex.com/
6
  Description: Adds search and replace functionality across posts, pages, comments, and meta-data, with full regular expression support
7
- Version: 2.0
8
  Author: John Godley
9
  Text Domain: search-regex
10
  Domain Path: /locale
4
  Plugin Name: Search Regex
5
  Plugin URI: https://searchregex.com/
6
  Description: Adds search and replace functionality across posts, pages, comments, and meta-data, with full regular expression support
7
+ Version: 2.0.1
8
  Author: John Godley
9
  Text Domain: search-regex
10
  Domain Path: /locale
source/core/comment.php CHANGED
@@ -44,12 +44,18 @@ class Source_Comment extends Search_Source {
44
  }
45
 
46
  public function get_actions( Result $result ) {
 
 
47
  $link = get_edit_comment_link( $result->get_row_id() );
 
48
 
49
  if ( $link ) {
50
- return [
 
 
51
  'edit' => str_replace( '&amp;', '&', $link ),
52
- ];
 
53
  }
54
 
55
  return [];
@@ -65,6 +71,10 @@ class Source_Comment extends Search_Source {
65
  return 'comment_ID';
66
  }
67
 
 
 
 
 
68
  public function get_table_name() {
69
  global $wpdb;
70
 
44
  }
45
 
46
  public function get_actions( Result $result ) {
47
+ $actions = [];
48
+
49
  $link = get_edit_comment_link( $result->get_row_id() );
50
+ $raw = $result->get_raw();
51
 
52
  if ( $link ) {
53
+ $view = get_permalink( intval( $raw['comment_post_ID'], 10 ) );
54
+
55
+ return array_filter( [
56
  'edit' => str_replace( '&amp;', '&', $link ),
57
+ 'view' => $view,
58
+ ] );
59
  }
60
 
61
  return [];
71
  return 'comment_ID';
72
  }
73
 
74
+ public function get_info_columns() {
75
+ return [ 'comment_post_ID' ];
76
+ }
77
+
78
  public function get_table_name() {
79
  global $wpdb;
80