FluentSMTP – WP Mail SMTP, Amazon SES, SendGrid, MailGun and Any SMTP Connector Plugin - Version 2.0.2

Version Description

(Date: September 21, 2021) = * Fixed Scheduled Database Cleanup * Improvement on wp_mail loading and sending emails * Pepipost Driver Improvement * SendGrid Driver Improvement * SendinBlue Drive Improvement

Download this release

Release Info

Developer techjewel
Plugin Icon FluentSMTP – WP Mail SMTP, Amazon SES, SendGrid, MailGun and Any SMTP Connector Plugin
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

app/Bindings.php CHANGED
@@ -13,6 +13,7 @@ $singletons = [
13
  'gmail' => 'FluentMail\App\Services\Mailer\Providers\Gmail\Handler',
14
  'outlook' => 'FluentMail\App\Services\Mailer\Providers\Outlook\Handler',
15
  'postmark' => 'FluentMail\App\Services\Mailer\Providers\Postmark\Handler',
 
16
  ];
17
 
18
  foreach ($singletons as $key => $className) {
13
  'gmail' => 'FluentMail\App\Services\Mailer\Providers\Gmail\Handler',
14
  'outlook' => 'FluentMail\App\Services\Mailer\Providers\Outlook\Handler',
15
  'postmark' => 'FluentMail\App\Services\Mailer\Providers\Postmark\Handler',
16
+ // 'elasticmail' => 'FluentMail\App\Services\Mailer\Providers\ElasticMail\Handler',
17
  ];
18
 
19
  foreach ($singletons as $key => $className) {
app/Functions/helpers.php CHANGED
@@ -26,46 +26,6 @@ if (!function_exists('fluentMailAssetUrl')) {
26
  }
27
  }
28
 
29
- if (!function_exists('dd')) {
30
- function dd()
31
- {
32
- foreach (func_get_args() as $arg) {
33
- echo "<pre>";
34
- print_r($arg);
35
- echo "</pre>";
36
- }
37
- die;
38
- }
39
- }
40
-
41
- if (!function_exists('ddd')) {
42
- function ddd($data)
43
- {
44
- foreach (func_get_args() as $arg) {
45
- echo "<pre>";
46
- print_r($arg);
47
- echo "</pre>";
48
- }
49
- }
50
- }
51
-
52
- if (!function_exists('fluentMailWpParseArgs')) {
53
- function fluentMailWpParseArgs($args, $defaults = [])
54
- {
55
- $newArgs = (array)$defaults;
56
-
57
- foreach ($args as $key => $value) {
58
- if (is_array($value) && isset($newArgs[$key])) {
59
- $newArgs[$key] = fluentMailWpParseArgs($value, $newArgs[$key]);
60
- } else {
61
- $newArgs[$key] = $value;
62
- }
63
- }
64
-
65
- return $newArgs;
66
- }
67
- }
68
-
69
  if (!function_exists('fluentMailIsListedSenderEmail')) {
70
  function fluentMailIsListedSenderEmail($email)
71
  {
@@ -201,3 +161,423 @@ if (!function_exists('fluentMailSesConnection')) {
201
  }
202
  }
203
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  }
27
  }
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  if (!function_exists('fluentMailIsListedSenderEmail')) {
30
  function fluentMailIsListedSenderEmail($email)
31
  {
161
  }
162
  }
163
 
164
+ if(!function_exists('fluentMail_wp_mail')) {
165
+ function fluentMail_wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
166
+ // Compact the input, apply the filters, and extract them back out.
167
+ /**
168
+ * Filters the wp_mail() arguments.
169
+ *
170
+ * @since 2.2.0
171
+ *
172
+ * @param array $args A compacted array of wp_mail() arguments, including the "to" email,
173
+ * subject, message, headers, and attachments values.
174
+ */
175
+ $atts = apply_filters(
176
+ 'wp_mail', compact('to', 'subject', 'message', 'headers', 'attachments')
177
+ );
178
+
179
+ /**
180
+ * Filters whether to preempt sending an email.
181
+ *
182
+ * Returning a non-null value will short-circuit {@see wp_mail()}, returning
183
+ * that value instead. A boolean return value should be used to indicate whether
184
+ * the email was successfully sent.
185
+ *
186
+ * @since 5.7.0
187
+ *
188
+ * @param null|bool $return Short-circuit return value.
189
+ * @param array $atts {
190
+ * Array of the `wp_mail()` arguments.
191
+ *
192
+ * @type string|string[] $to Array or comma-separated list of email addresses to send message.
193
+ * @type string $subject Email subject.
194
+ * @type string $message Message contents.
195
+ * @type string|string[] $headers Additional headers.
196
+ * @type string|string[] $attachments Paths to files to attach.
197
+ * }
198
+ */
199
+ $pre_wp_mail = apply_filters( 'pre_wp_mail', null, $atts );
200
+
201
+ if ( null !== $pre_wp_mail ) {
202
+ return $pre_wp_mail;
203
+ }
204
+
205
+
206
+ if ( isset( $atts['to'] ) ) {
207
+ $to = $atts['to'];
208
+ }
209
+
210
+ if ( ! is_array( $to ) ) {
211
+ $to = explode( ',', $to );
212
+ }
213
+
214
+ if ( isset( $atts['subject'] ) ) {
215
+ $subject = $atts['subject'];
216
+ }
217
+
218
+ if ( isset( $atts['message'] ) ) {
219
+ $message = $atts['message'];
220
+ }
221
+
222
+ if ( isset( $atts['headers'] ) ) {
223
+ $headers = $atts['headers'];
224
+ }
225
+
226
+ if ( isset( $atts['attachments'] ) ) {
227
+ $attachments = $atts['attachments'];
228
+ }
229
+
230
+ if ( ! is_array( $attachments ) ) {
231
+ $attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) );
232
+ }
233
+
234
+ global $phpmailer;
235
+
236
+ // (Re)create it, if it's gone missing.
237
+ if ( ! ( $phpmailer instanceof PHPMailer\PHPMailer\PHPMailer ) ) {
238
+ require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
239
+ require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
240
+ require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
241
+ $phpmailer = new PHPMailer\PHPMailer\PHPMailer( true );
242
+
243
+ $phpmailer::$validator = static function ( $email ) {
244
+ return (bool) is_email( $email );
245
+ };
246
+ }
247
+
248
+ if (($class = get_class($phpmailer)) != 'PHPMailer\PHPMailer\PHPMailer') {
249
+ do_action(
250
+ 'wp_mail_failed',
251
+ new WP_Error(
252
+ 400,
253
+ "Oops! PHPMailer is modified by $class."
254
+ )
255
+ );
256
+ }
257
+
258
+ // Headers.
259
+ $cc = array();
260
+ $bcc = array();
261
+ $reply_to = array();
262
+
263
+ if ( empty( $headers ) ) {
264
+ $headers = array();
265
+ } else {
266
+ if ( ! is_array( $headers ) ) {
267
+ // Explode the headers out, so this function can take
268
+ // both string headers and an array of headers.
269
+ $tempheaders = explode( "\n", str_replace( "\r\n", "\n", $headers ) );
270
+ } else {
271
+ $tempheaders = $headers;
272
+ }
273
+ $headers = array();
274
+
275
+ // If it's actually got contents.
276
+ if ( ! empty( $tempheaders ) ) {
277
+ // Iterate through the raw headers.
278
+ foreach ( (array) $tempheaders as $header ) {
279
+ if ( strpos( $header, ':' ) === false ) {
280
+ if ( false !== stripos( $header, 'boundary=' ) ) {
281
+ $parts = preg_split( '/boundary=/i', trim( $header ) );
282
+ $boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) );
283
+ }
284
+ continue;
285
+ }
286
+ // Explode them out.
287
+ list( $name, $content ) = explode( ':', trim( $header ), 2 );
288
+
289
+ // Cleanup crew.
290
+ $name = trim( $name );
291
+ $content = trim( $content );
292
+
293
+ switch ( strtolower( $name ) ) {
294
+ // Mainly for legacy -- process a "From:" header if it's there.
295
+ case 'from':
296
+ $bracket_pos = strpos( $content, '<' );
297
+ if ( false !== $bracket_pos ) {
298
+ // Text before the bracketed email is the "From" name.
299
+ if ( $bracket_pos > 0 ) {
300
+ $from_name = substr( $content, 0, $bracket_pos - 1 );
301
+ $from_name = str_replace( '"', '', $from_name );
302
+ $from_name = trim( $from_name );
303
+ }
304
+
305
+ $from_email = substr( $content, $bracket_pos + 1 );
306
+ $from_email = str_replace( '>', '', $from_email );
307
+ $from_email = trim( $from_email );
308
+
309
+ // Avoid setting an empty $from_email.
310
+ } elseif ( '' !== trim( $content ) ) {
311
+ $from_email = trim( $content );
312
+ }
313
+ break;
314
+ case 'content-type':
315
+ if ( strpos( $content, ';' ) !== false ) {
316
+ list( $type, $charset_content ) = explode( ';', $content );
317
+ $content_type = trim( $type );
318
+ if ( false !== stripos( $charset_content, 'charset=' ) ) {
319
+ $charset = trim( str_replace( array( 'charset=', '"' ), '', $charset_content ) );
320
+ } elseif ( false !== stripos( $charset_content, 'boundary=' ) ) {
321
+ $boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset_content ) );
322
+ $charset = '';
323
+ }
324
+
325
+ // Avoid setting an empty $content_type.
326
+ } elseif ( '' !== trim( $content ) ) {
327
+ $content_type = trim( $content );
328
+ }
329
+ break;
330
+ case 'cc':
331
+ $cc = array_merge( (array) $cc, explode( ',', $content ) );
332
+ break;
333
+ case 'bcc':
334
+ $bcc = array_merge( (array) $bcc, explode( ',', $content ) );
335
+ break;
336
+ case 'reply-to':
337
+ $reply_to = array_merge( (array) $reply_to, explode( ',', $content ) );
338
+ break;
339
+ default:
340
+ // Add it to our grand headers array.
341
+ $headers[ trim( $name ) ] = trim( $content );
342
+ break;
343
+ }
344
+ }
345
+ }
346
+ }
347
+
348
+ // Empty out the values that may be set.
349
+ $phpmailer->clearAllRecipients();
350
+ $phpmailer->clearAttachments();
351
+ $phpmailer->clearCustomHeaders();
352
+ $phpmailer->clearReplyTos();
353
+
354
+
355
+ /*
356
+ * If we don't have an email from the input headers, default to wordpress@$sitename
357
+ * Some hosts will block outgoing mail from this address if it doesn't exist,
358
+ * but there's no easy alternative. Defaulting to admin_email might appear to be
359
+ * another option, but some hosts may refuse to relay mail from an unknown domain.
360
+ * See https://core.trac.wordpress.org/ticket/5007.
361
+ */
362
+ $defaultConnection = false;
363
+ if ( ! isset( $from_email ) ) {
364
+ $defaultConnection = fluentMailDefaultConnection();
365
+
366
+ if (!empty($defaultConnection['sender_email'])) {
367
+ $from_email = $defaultConnection['sender_email'];
368
+ } else {
369
+ // Get the site domain and get rid of www.
370
+ $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST );
371
+ if ( 'www.' === substr( $sitename, 0, 4 ) ) {
372
+ $sitename = substr( $sitename, 4 );
373
+ }
374
+ $from_email = 'wordpress@' . $sitename;
375
+ }
376
+ }
377
+
378
+ // Set "From" name and email.
379
+ // If we don't have a name from the input headers.
380
+ if ( ! isset( $from_name ) ) {
381
+ if($defaultConnection && !empty($defaultConnection['sender_name'])) {
382
+ $from_name = $defaultConnection['sender_name'];
383
+ } else {
384
+ $provider = fluentMailGetProvider($from_email);
385
+ if ($provider && !empty($provider->getSetting('sender_name'))) {
386
+ $from_name = $provider->getSetting('sender_name');
387
+ } else {
388
+ $from_name = 'WordPress';
389
+ }
390
+ }
391
+ }
392
+
393
+ /**
394
+ * Filters the email address to send from.
395
+ *
396
+ * @since 2.2.0
397
+ *
398
+ * @param string $from_email Email address to send from.
399
+ */
400
+ $from_email = apply_filters('wp_mail_from', $from_email);
401
+
402
+ /**
403
+ * Filters the name to associate with the "from" email address.
404
+ *
405
+ * @since 2.3.0
406
+ *
407
+ * @param string $from_name Name associated with the "from" email address.
408
+ */
409
+ $from_name = apply_filters('wp_mail_from_name', $from_name);
410
+
411
+ try {
412
+ $phpmailer->setFrom( $from_email, $from_name, false );
413
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
414
+ $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
415
+ $mail_error_data['phpmailer_exception_code'] = $e->getCode();
416
+
417
+ /** This filter is documented in wp-includes/pluggable.php */
418
+ do_action(
419
+ 'wp_mail_failed',
420
+ new WP_Error(
421
+ 'wp_mail_failed',
422
+ $e->getMessage(),
423
+ $mail_error_data
424
+ )
425
+ );
426
+
427
+ return false;
428
+ }
429
+
430
+ // Set mail's subject and body.
431
+ $phpmailer->Subject = $subject;
432
+ $phpmailer->Body = $message;
433
+
434
+ // Set destination addresses, using appropriate methods for handling addresses.
435
+ $address_headers = compact( 'to', 'cc', 'bcc', 'reply_to' );
436
+
437
+ foreach ( $address_headers as $address_header => $addresses ) {
438
+ if ( empty( $addresses ) ) {
439
+ continue;
440
+ }
441
+
442
+ foreach ( (array) $addresses as $address ) {
443
+ try {
444
+ // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>".
445
+ $recipient_name = '';
446
+
447
+ if ( preg_match( '/(.*)<(.+)>/', $address, $matches ) ) {
448
+ if ( count( $matches ) == 3 ) {
449
+ $recipient_name = $matches[1];
450
+ $address = $matches[2];
451
+ }
452
+ }
453
+
454
+ switch ( $address_header ) {
455
+ case 'to':
456
+ $phpmailer->addAddress( $address, $recipient_name );
457
+ break;
458
+ case 'cc':
459
+ $phpmailer->addCc( $address, $recipient_name );
460
+ break;
461
+ case 'bcc':
462
+ $phpmailer->addBcc( $address, $recipient_name );
463
+ break;
464
+ case 'reply_to':
465
+ $phpmailer->addReplyTo( $address, $recipient_name );
466
+ break;
467
+ }
468
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
469
+ continue;
470
+ }
471
+ }
472
+ }
473
+
474
+ // Set to use PHP's mail().
475
+ $phpmailer->isMail();
476
+
477
+ // Set Content-Type and charset.
478
+
479
+ // If we don't have a content-type from the input headers.
480
+ if ( ! isset( $content_type ) ) {
481
+ $content_type = 'text/plain';
482
+ }
483
+
484
+ /**
485
+ * Filters the wp_mail() content type.
486
+ *
487
+ * @since 2.3.0
488
+ *
489
+ * @param string $content_type Default wp_mail() content type.
490
+ */
491
+ $content_type = apply_filters( 'wp_mail_content_type', $content_type );
492
+
493
+ $phpmailer->ContentType = $content_type;
494
+
495
+ // Set whether it's plaintext, depending on $content_type.
496
+ if ( 'text/html' === $content_type ) {
497
+ $phpmailer->isHTML( true );
498
+ }
499
+
500
+ // If we don't have a charset from the input headers.
501
+ if ( ! isset( $charset ) ) {
502
+ $charset = get_bloginfo( 'charset' );
503
+ }
504
+
505
+ /**
506
+ * Filters the default wp_mail() charset.
507
+ *
508
+ * @since 2.3.0
509
+ *
510
+ * @param string $charset Default email charset.
511
+ */
512
+ $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset );
513
+
514
+ // Set custom headers.
515
+ if ( ! empty( $headers ) ) {
516
+ foreach ( (array) $headers as $name => $content ) {
517
+ // Only add custom headers not added automatically by PHPMailer.
518
+ if ( ! in_array( $name, array( 'MIME-Version', 'X-Mailer' ), true ) ) {
519
+ try {
520
+ $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
521
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
522
+ continue;
523
+ }
524
+ }
525
+ }
526
+
527
+ if ( false !== stripos( $content_type, 'multipart' ) && ! empty( $boundary ) ) {
528
+ $phpmailer->addCustomHeader( sprintf( 'Content-Type: %s; boundary="%s"', $content_type, $boundary ) );
529
+ }
530
+ }
531
+
532
+ if ( ! empty( $attachments ) ) {
533
+ foreach ( $attachments as $attachment ) {
534
+ try {
535
+ $phpmailer->addAttachment( $attachment );
536
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
537
+ continue;
538
+ }
539
+ }
540
+ }
541
+
542
+ /**
543
+ * Fires after PHPMailer is initialized.
544
+ *
545
+ * @since 2.2.0
546
+ *
547
+ * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference).
548
+ */
549
+ do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
550
+
551
+
552
+ // Send!
553
+ try {
554
+ // Trap the fluentSMTPMail mailer here
555
+ $phpmailer = new FluentMail\App\Services\Mailer\FluentPHPMailer($phpmailer);
556
+ return $phpmailer->send();
557
+
558
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
559
+
560
+ $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
561
+ $mail_error_data['phpmailer_exception_code'] = $e->getCode();
562
+
563
+ /**
564
+ * Fires after a PHPMailer\PHPMailer\Exception is caught.
565
+ *
566
+ * @since 4.4.0
567
+ *
568
+ * @param WP_Error $error A WP_Error object with the PHPMailer\PHPMailer\Exception message, and an array
569
+ * containing the mail recipient, subject, message, headers, and attachments.
570
+ */
571
+ do_action(
572
+ 'wp_mail_failed',
573
+ new WP_Error(
574
+ 'wp_mail_failed',
575
+ $e->getMessage(),
576
+ $mail_error_data
577
+ )
578
+ );
579
+
580
+ return false;
581
+ }
582
+ }
583
+ }
app/Functions/pluggable.php DELETED
@@ -1,474 +0,0 @@
1
- <?php
2
-
3
- if (! function_exists( 'wp_mail' ) ) :
4
- /**
5
- * Sends an email, similar to PHP's mail function.
6
- *
7
- * A true return value does not automatically mean that the user received the
8
- * email successfully. It just only means that the method used was able to
9
- * process the request without any errors.
10
- *
11
- * The default content type is `text/plain` which does not allow using HTML.
12
- * However, you can set the content type of the email by using the
13
- * {@see 'wp_mail_content_type'} filter.
14
- *
15
- * The default charset is based on the charset used on the blog. The charset can
16
- * be set using the {@see 'wp_mail_charset'} filter.
17
- *
18
- * @since 1.2.1
19
- *
20
- * @global PHPMailer\PHPMailer\PHPMailer $phpmailer
21
- *
22
- * @param string|array $to Array or comma-separated list of email addresses to send message.
23
- * @param string $subject Email subject
24
- * @param string $message Message contents
25
- * @param string|array $headers Optional. Additional headers.
26
- * @param string|array $attachments Optional. Files to attach.
27
- * @return bool Whether the email contents were sent successfully.
28
- */
29
- function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
30
- // Compact the input, apply the filters, and extract them back out.
31
-
32
- /**
33
- * Filters the wp_mail() arguments.
34
- *
35
- * @since 2.2.0
36
- *
37
- * @param array $args A compacted array of wp_mail() arguments, including the "to" email,
38
- * subject, message, headers, and attachments values.
39
- */
40
- $atts = apply_filters(
41
- 'wp_mail', compact('to', 'subject', 'message', 'headers', 'attachments')
42
- );
43
-
44
- /**
45
- * Filters whether to preempt sending an email.
46
- *
47
- * Returning a non-null value will short-circuit {@see wp_mail()}, returning
48
- * that value instead. A boolean return value should be used to indicate whether
49
- * the email was successfully sent.
50
- *
51
- * @since 5.7.0
52
- *
53
- * @param null|bool $return Short-circuit return value.
54
- * @param array $atts {
55
- * Array of the `wp_mail()` arguments.
56
- *
57
- * @type string|string[] $to Array or comma-separated list of email addresses to send message.
58
- * @type string $subject Email subject.
59
- * @type string $message Message contents.
60
- * @type string|string[] $headers Additional headers.
61
- * @type string|string[] $attachments Paths to files to attach.
62
- * }
63
- */
64
- $pre_wp_mail = apply_filters( 'pre_wp_mail', null, $atts );
65
-
66
- if ( null !== $pre_wp_mail ) {
67
- return $pre_wp_mail;
68
- }
69
-
70
-
71
- if ( isset( $atts['to'] ) ) {
72
- $to = $atts['to'];
73
- }
74
-
75
- if ( ! is_array( $to ) ) {
76
- $to = explode( ',', $to );
77
- }
78
-
79
- if ( isset( $atts['subject'] ) ) {
80
- $subject = $atts['subject'];
81
- }
82
-
83
- if ( isset( $atts['message'] ) ) {
84
- $message = $atts['message'];
85
- }
86
-
87
- if ( isset( $atts['headers'] ) ) {
88
- $headers = $atts['headers'];
89
- }
90
-
91
- if ( isset( $atts['attachments'] ) ) {
92
- $attachments = $atts['attachments'];
93
- }
94
-
95
- if ( ! is_array( $attachments ) ) {
96
- $attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) );
97
- }
98
-
99
- global $phpmailer;
100
-
101
- // (Re)create it, if it's gone missing.
102
- if ( ! ( $phpmailer instanceof PHPMailer\PHPMailer\PHPMailer ) ) {
103
- require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
104
- require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
105
- require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
106
- $phpmailer = new PHPMailer\PHPMailer\PHPMailer( true );
107
-
108
- $phpmailer::$validator = static function ( $email ) {
109
- return (bool) is_email( $email );
110
- };
111
- }
112
-
113
- if (($class = get_class($phpmailer)) != 'PHPMailer\PHPMailer\PHPMailer') {
114
- do_action(
115
- 'wp_mail_failed',
116
- new WP_Error(
117
- 400,
118
- "Oops! PHPMailer is modified by $class."
119
- )
120
- );
121
- }
122
-
123
- // Headers.
124
- $cc = array();
125
- $bcc = array();
126
- $reply_to = array();
127
-
128
- if ( empty( $headers ) ) {
129
- $headers = array();
130
- } else {
131
- if ( ! is_array( $headers ) ) {
132
- // Explode the headers out, so this function can take
133
- // both string headers and an array of headers.
134
- $tempheaders = explode( "\n", str_replace( "\r\n", "\n", $headers ) );
135
- } else {
136
- $tempheaders = $headers;
137
- }
138
- $headers = array();
139
-
140
- // If it's actually got contents.
141
- if ( ! empty( $tempheaders ) ) {
142
- // Iterate through the raw headers.
143
- foreach ( (array) $tempheaders as $header ) {
144
- if ( strpos( $header, ':' ) === false ) {
145
- if ( false !== stripos( $header, 'boundary=' ) ) {
146
- $parts = preg_split( '/boundary=/i', trim( $header ) );
147
- $boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) );
148
- }
149
- continue;
150
- }
151
- // Explode them out.
152
- list( $name, $content ) = explode( ':', trim( $header ), 2 );
153
-
154
- // Cleanup crew.
155
- $name = trim( $name );
156
- $content = trim( $content );
157
-
158
- switch ( strtolower( $name ) ) {
159
- // Mainly for legacy -- process a "From:" header if it's there.
160
- case 'from':
161
- $bracket_pos = strpos( $content, '<' );
162
- if ( false !== $bracket_pos ) {
163
- // Text before the bracketed email is the "From" name.
164
- if ( $bracket_pos > 0 ) {
165
- $from_name = substr( $content, 0, $bracket_pos - 1 );
166
- $from_name = str_replace( '"', '', $from_name );
167
- $from_name = trim( $from_name );
168
- }
169
-
170
- $from_email = substr( $content, $bracket_pos + 1 );
171
- $from_email = str_replace( '>', '', $from_email );
172
- $from_email = trim( $from_email );
173
-
174
- // Avoid setting an empty $from_email.
175
- } elseif ( '' !== trim( $content ) ) {
176
- $from_email = trim( $content );
177
- }
178
- break;
179
- case 'content-type':
180
- if ( strpos( $content, ';' ) !== false ) {
181
- list( $type, $charset_content ) = explode( ';', $content );
182
- $content_type = trim( $type );
183
- if ( false !== stripos( $charset_content, 'charset=' ) ) {
184
- $charset = trim( str_replace( array( 'charset=', '"' ), '', $charset_content ) );
185
- } elseif ( false !== stripos( $charset_content, 'boundary=' ) ) {
186
- $boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset_content ) );
187
- $charset = '';
188
- }
189
-
190
- // Avoid setting an empty $content_type.
191
- } elseif ( '' !== trim( $content ) ) {
192
- $content_type = trim( $content );
193
- }
194
- break;
195
- case 'cc':
196
- $cc = array_merge( (array) $cc, explode( ',', $content ) );
197
- break;
198
- case 'bcc':
199
- $bcc = array_merge( (array) $bcc, explode( ',', $content ) );
200
- break;
201
- case 'reply-to':
202
- $reply_to = array_merge( (array) $reply_to, explode( ',', $content ) );
203
- break;
204
- default:
205
- // Add it to our grand headers array.
206
- $headers[ trim( $name ) ] = trim( $content );
207
- break;
208
- }
209
- }
210
- }
211
- }
212
-
213
- // Empty out the values that may be set.
214
- $phpmailer->clearAllRecipients();
215
- $phpmailer->clearAttachments();
216
- $phpmailer->clearCustomHeaders();
217
- $phpmailer->clearReplyTos();
218
-
219
-
220
- /*
221
- * If we don't have an email from the input headers, default to wordpress@$sitename
222
- * Some hosts will block outgoing mail from this address if it doesn't exist,
223
- * but there's no easy alternative. Defaulting to admin_email might appear to be
224
- * another option, but some hosts may refuse to relay mail from an unknown domain.
225
- * See https://core.trac.wordpress.org/ticket/5007.
226
- */
227
- $defaultConnection = false;
228
- if ( ! isset( $from_email ) ) {
229
- $defaultConnection = fluentMailDefaultConnection();
230
-
231
- if (!empty($defaultConnection['sender_email'])) {
232
- $from_email = $defaultConnection['sender_email'];
233
- } else {
234
- // Get the site domain and get rid of www.
235
- $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST );
236
- if ( 'www.' === substr( $sitename, 0, 4 ) ) {
237
- $sitename = substr( $sitename, 4 );
238
- }
239
- $from_email = 'wordpress@' . $sitename;
240
- }
241
- }
242
-
243
- // Set "From" name and email.
244
- // If we don't have a name from the input headers.
245
- if ( ! isset( $from_name ) ) {
246
- if($defaultConnection && !empty($defaultConnection['sender_name'])) {
247
- $from_name = $defaultConnection['sender_name'];
248
- } else {
249
- $provider = fluentMailGetProvider($from_email);
250
- if ($provider && !empty($provider->getSetting('sender_name'))) {
251
- $from_name = $provider->getSetting('sender_name');
252
- } else {
253
- $from_name = 'WordPress';
254
- }
255
- }
256
- }
257
-
258
- /**
259
- * Filters the email address to send from.
260
- *
261
- * @since 2.2.0
262
- *
263
- * @param string $from_email Email address to send from.
264
- */
265
- $from_email = apply_filters('wp_mail_from', $from_email);
266
-
267
- /**
268
- * Filters the name to associate with the "from" email address.
269
- *
270
- * @since 2.3.0
271
- *
272
- * @param string $from_name Name associated with the "from" email address.
273
- */
274
- $from_name = apply_filters('wp_mail_from_name', $from_name);
275
-
276
- try {
277
- $phpmailer->setFrom( $from_email, $from_name, false );
278
- } catch ( PHPMailer\PHPMailer\Exception $e ) {
279
- $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
280
- $mail_error_data['phpmailer_exception_code'] = $e->getCode();
281
-
282
- /** This filter is documented in wp-includes/pluggable.php */
283
- do_action(
284
- 'wp_mail_failed',
285
- new WP_Error(
286
- 'wp_mail_failed',
287
- $e->getMessage(),
288
- $mail_error_data
289
- )
290
- );
291
-
292
- return false;
293
- }
294
-
295
- // Set mail's subject and body.
296
- $phpmailer->Subject = $subject;
297
- $phpmailer->Body = $message;
298
-
299
- // Set destination addresses, using appropriate methods for handling addresses.
300
- $address_headers = compact( 'to', 'cc', 'bcc', 'reply_to' );
301
-
302
- foreach ( $address_headers as $address_header => $addresses ) {
303
- if ( empty( $addresses ) ) {
304
- continue;
305
- }
306
-
307
- foreach ( (array) $addresses as $address ) {
308
- try {
309
- // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>".
310
- $recipient_name = '';
311
-
312
- if ( preg_match( '/(.*)<(.+)>/', $address, $matches ) ) {
313
- if ( count( $matches ) == 3 ) {
314
- $recipient_name = $matches[1];
315
- $address = $matches[2];
316
- }
317
- }
318
-
319
- switch ( $address_header ) {
320
- case 'to':
321
- $phpmailer->addAddress( $address, $recipient_name );
322
- break;
323
- case 'cc':
324
- $phpmailer->addCc( $address, $recipient_name );
325
- break;
326
- case 'bcc':
327
- $phpmailer->addBcc( $address, $recipient_name );
328
- break;
329
- case 'reply_to':
330
- $phpmailer->addReplyTo( $address, $recipient_name );
331
- break;
332
- }
333
- } catch ( PHPMailer\PHPMailer\Exception $e ) {
334
- continue;
335
- }
336
- }
337
- }
338
-
339
- // Set to use PHP's mail().
340
- $phpmailer->isMail();
341
-
342
- // Set Content-Type and charset.
343
-
344
- // If we don't have a content-type from the input headers.
345
- if ( ! isset( $content_type ) ) {
346
- $content_type = 'text/plain';
347
- }
348
-
349
- /**
350
- * Filters the wp_mail() content type.
351
- *
352
- * @since 2.3.0
353
- *
354
- * @param string $content_type Default wp_mail() content type.
355
- */
356
- $content_type = apply_filters( 'wp_mail_content_type', $content_type );
357
-
358
- $phpmailer->ContentType = $content_type;
359
-
360
- // Set whether it's plaintext, depending on $content_type.
361
- if ( 'text/html' === $content_type ) {
362
- $phpmailer->isHTML( true );
363
- }
364
-
365
- // If we don't have a charset from the input headers.
366
- if ( ! isset( $charset ) ) {
367
- $charset = get_bloginfo( 'charset' );
368
- }
369
-
370
- /**
371
- * Filters the default wp_mail() charset.
372
- *
373
- * @since 2.3.0
374
- *
375
- * @param string $charset Default email charset.
376
- */
377
- $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset );
378
-
379
- // Set custom headers.
380
- if ( ! empty( $headers ) ) {
381
- foreach ( (array) $headers as $name => $content ) {
382
- // Only add custom headers not added automatically by PHPMailer.
383
- if ( ! in_array( $name, array( 'MIME-Version', 'X-Mailer' ), true ) ) {
384
- try {
385
- $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
386
- } catch ( PHPMailer\PHPMailer\Exception $e ) {
387
- continue;
388
- }
389
- }
390
- }
391
-
392
- if ( false !== stripos( $content_type, 'multipart' ) && ! empty( $boundary ) ) {
393
- $phpmailer->addCustomHeader( sprintf( 'Content-Type: %s; boundary="%s"', $content_type, $boundary ) );
394
- }
395
- }
396
-
397
- if ( ! empty( $attachments ) ) {
398
- foreach ( $attachments as $attachment ) {
399
- try {
400
- $phpmailer->addAttachment( $attachment );
401
- } catch ( PHPMailer\PHPMailer\Exception $e ) {
402
- continue;
403
- }
404
- }
405
- }
406
-
407
- /**
408
- * Fires after PHPMailer is initialized.
409
- *
410
- * @since 2.2.0
411
- *
412
- * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference).
413
- */
414
- do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
415
-
416
-
417
- // Send!
418
- try {
419
- // Trap the fluentSMTPMail mailer here
420
- $phpmailer = new FluentMail\App\Services\Mailer\FluentPHPMailer($phpmailer);
421
- return $phpmailer->send();
422
-
423
- } catch ( PHPMailer\PHPMailer\Exception $e ) {
424
-
425
- $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
426
- $mail_error_data['phpmailer_exception_code'] = $e->getCode();
427
-
428
- /**
429
- * Fires after a PHPMailer\PHPMailer\Exception is caught.
430
- *
431
- * @since 4.4.0
432
- *
433
- * @param WP_Error $error A WP_Error object with the PHPMailer\PHPMailer\Exception message, and an array
434
- * containing the mail recipient, subject, message, headers, and attachments.
435
- */
436
- do_action(
437
- 'wp_mail_failed',
438
- new WP_Error(
439
- 'wp_mail_failed',
440
- $e->getMessage(),
441
- $mail_error_data
442
- )
443
- );
444
-
445
- return false;
446
- }
447
- }
448
- else:
449
- if (! (defined( 'DOING_AJAX' ) && DOING_AJAX) ):
450
- add_action('admin_notices', function() {
451
- if(!current_user_can('manage_options')) {
452
- return;
453
- }
454
- $details = new ReflectionFunction('wp_mail');
455
- $hints = $details->getFileName() . ':' . $details->getStartLine();
456
- ?>
457
- <div class="notice notice-warning is-dismissible">
458
- <p>
459
- <?php
460
- echo sprintf(
461
- __('The <strong>FluentSMTP</strong> plugin depends on
462
- <a target="_blank" href="%1s">wp_mail</a> pluggable function and
463
- plugin is not able to extend it. Please check if another plugin is using this and disable it for <strong>FluentSMTP</strong> to work!',
464
- 'fluent-smtp'), 'https://developer.wordpress.org/reference/functions/wp_mail/'
465
- );
466
- ?>
467
- </p>
468
- <p style="color: red;"><?php _e('Possible Conflict: ', 'fluent-smtp'); ?><?php echo $hints;?></p>
469
- </div>
470
- <?php
471
- });
472
- endif;
473
- endif;
474
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/Models/Logger.php CHANGED
@@ -392,10 +392,8 @@ class Logger extends Model
392
  {
393
  try {
394
 
395
- $date = date('Y-m-d', current_time('timestamp') - $days * DAY_IN_SECONDS);
396
-
397
- $query = "DELETE FROM {$this->table} WHERE `created_at` < $date";
398
-
399
  return $this->db->query($query);
400
 
401
  } catch (Exception $e) {
392
  {
393
  try {
394
 
395
+ $date = date('Y-m-d H:i:s', current_time('timestamp') - $days * DAY_IN_SECONDS);
396
+ $query = $this->db->prepare("DELETE FROM %s WHERE `created_at` < %s", $this->table, $date);
 
 
397
  return $this->db->query($query);
398
 
399
  } catch (Exception $e) {
app/Services/Mailer/Providers/ElasticMail/Handler.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FluentMail\App\Services\Mailer\Providers\ElasticMail;
4
+
5
+ use FluentMail\Includes\Support\Arr;
6
+ use FluentMail\App\Services\Mailer\BaseHandler;
7
+
8
+ class Handler extends BaseHandler
9
+ {
10
+ use ValidatorTrait;
11
+
12
+ protected $emailSentCode = 200;
13
+
14
+ protected $url = 'https://api.postmarkapp.com/email';
15
+
16
+ public function send()
17
+ {
18
+ if ($this->preSend() && $this->phpMailer->preSend()) {
19
+ return $this->postSend();
20
+ }
21
+
22
+ return $this->handleResponse(new \WP_Error(423, 'Something went wrong!', []));
23
+ }
24
+
25
+ public function postSend()
26
+ {
27
+ $body = [
28
+ 'From' => $this->getParam('from'),
29
+ 'To' => $this->getTo(),
30
+ 'Subject' => $this->getSubject(),
31
+ 'MessageStream' => $this->getSetting('message_stream', 'outbound')
32
+ ];
33
+
34
+ if ($replyTo = $this->getReplyTo()) {
35
+ $body['ReplyTo'] = $replyTo;
36
+ }
37
+
38
+ if ($bcc = $this->getBlindCarbonCopy()) {
39
+ $body['Bcc'] = $bcc;
40
+ }
41
+
42
+ if ($cc = $this->getCarbonCopy()) {
43
+ $body['Cc'] = $cc;
44
+ }
45
+
46
+ if ($this->getHeader('content-type') == 'text/html') {
47
+ $body['HtmlBody'] = $this->getParam('message');
48
+
49
+ if ($this->getSetting('track_opens') == 'yes') {
50
+ $body['TrackOpens'] = true;
51
+ }
52
+
53
+ if ($this->getSetting('track_links') == 'yes') {
54
+ $body['TrackLinks'] = 'HtmlOnly';
55
+ }
56
+
57
+ } else {
58
+ $body['TextBody'] = $this->getParam('message');
59
+ }
60
+
61
+ if (!empty($this->getParam('attachments'))) {
62
+ $body['Attachments'] = $this->getAttachments();
63
+ }
64
+
65
+ // Handle apostrophes in email address From names by escaping them for the Postmark API.
66
+ $from_regex = "/(\"From\": \"[a-zA-Z\\d]+)*[\\\\]{2,}'/";
67
+
68
+ $args = array(
69
+ 'headers' => $this->getRequestHeaders(),
70
+ 'body' => preg_replace($from_regex, "'", wp_json_encode($body), 1),
71
+ );
72
+
73
+ $response = wp_remote_post($this->url, $args);
74
+
75
+ if (is_wp_error($response)) {
76
+ $returnResponse = new \WP_Error($response->get_error_code(), $response->get_error_message(), $response->get_error_messages());
77
+ } else {
78
+ $responseBody = wp_remote_retrieve_body($response);
79
+ $responseCode = wp_remote_retrieve_response_code($response);
80
+
81
+ $isOKCode = $responseCode == $this->emailSentCode;
82
+
83
+ $responseBody = \json_decode($responseBody, true);
84
+
85
+ if ($isOKCode) {
86
+ $returnResponse = [
87
+ 'id' => Arr::get($responseBody, 'MessageID'),
88
+ 'message' => Arr::get($responseBody, 'Message')
89
+ ];
90
+ } else {
91
+ $returnResponse = new \WP_Error($responseCode, Arr::get($responseBody, 'Message', 'Unknown Error'), $responseBody);
92
+ }
93
+ }
94
+
95
+ $this->response = $returnResponse;
96
+
97
+ return $this->handleResponse($this->response);
98
+ }
99
+
100
+ public function setSettings($settings)
101
+ {
102
+ if ($settings['key_store'] == 'wp_config') {
103
+ $settings['api_key'] = defined('FLUENTMAIL_ELASTICMAIL_API_KEY') ? FLUENTMAIL_ELASTICMAIL_API_KEY : '';
104
+ }
105
+
106
+ $this->settings = $settings;
107
+ return $this;
108
+ }
109
+
110
+ protected function getReplyTo()
111
+ {
112
+ if ($replyTo = $this->getParam('headers.reply-to')) {
113
+ $replyTo = reset($replyTo);
114
+ return $replyTo['email'];
115
+ }
116
+ }
117
+
118
+ protected function getTo()
119
+ {
120
+ return $this->getRecipients($this->getParam('to'));
121
+ }
122
+
123
+ protected function getCarbonCopy()
124
+ {
125
+ return $this->getRecipients($this->getParam('headers.cc'));
126
+ }
127
+
128
+ protected function getBlindCarbonCopy()
129
+ {
130
+ return $this->getRecipients($this->getParam('headers.bcc'));
131
+ }
132
+
133
+ protected function getRecipients($recipients)
134
+ {
135
+ $array = array_map(function ($recipient) {
136
+ return isset($recipient['name'])
137
+ ? $recipient['name'] . ' <' . $recipient['email'] . '>'
138
+ : $recipient['email'];
139
+ }, $recipients);
140
+
141
+ return implode(', ', $array);
142
+ }
143
+
144
+ protected function getAttachments()
145
+ {
146
+ $data = [];
147
+
148
+ foreach ($this->getParam('attachments') as $attachment) {
149
+ $file = false;
150
+
151
+ try {
152
+ if (is_file($attachment[0]) && is_readable($attachment[0])) {
153
+ $fileName = basename($attachment[0]);
154
+ $file = file_get_contents($attachment[0]);
155
+ }
156
+ } catch (\Exception $e) {
157
+ $file = false;
158
+ }
159
+
160
+ if ($file === false) {
161
+ continue;
162
+ }
163
+
164
+ $data[] = [
165
+ 'Name' => $fileName,
166
+ 'Content' => base64_encode($file),
167
+ 'ContentType' => $this->determineMimeContentRype($attachment[0])
168
+ ];
169
+ }
170
+
171
+ return $data;
172
+ }
173
+
174
+ protected function getRequestHeaders()
175
+ {
176
+ return [
177
+ 'Accept' => 'application/json',
178
+ 'Content-Type' => 'application/json',
179
+ 'X-Postmark-Server-Token' => $this->getSetting('api_key'),
180
+ ];
181
+ }
182
+
183
+ protected function determineMimeContentRype($filename)
184
+ {
185
+ if (function_exists('mime_content_type')) {
186
+ return mime_content_type($filename);
187
+ } elseif (function_exists('finfo_open')) {
188
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
189
+ $mime_type = finfo_file($finfo, $filename);
190
+ finfo_close($finfo);
191
+ return $mime_type;
192
+ } else {
193
+ return 'application/octet-stream';
194
+ }
195
+ }
196
+ }
app/Services/Mailer/Providers/ElasticMail/ValidatorTrait.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FluentMail\App\Services\Mailer\Providers\ElasticMail;
4
+
5
+ use FluentMail\Includes\Support\Arr;
6
+ use FluentMail\App\Services\Mailer\ValidatorTrait as BaseValidatorTrait;
7
+
8
+ trait ValidatorTrait
9
+ {
10
+ use BaseValidatorTrait;
11
+
12
+ public function validateProviderInformation($connection)
13
+ {
14
+ $errors = [];
15
+
16
+ $keyStoreType = $connection['key_store'];
17
+
18
+ if($keyStoreType == 'db') {
19
+ if (! Arr::get($connection, 'api_key')) {
20
+ $errors['api_key']['required'] = __('Api key is required.', 'fluent-smtp');
21
+ }
22
+ } else if($keyStoreType == 'wp_config') {
23
+ if(!defined('FLUENTMAIL_ELASTICMAIL_API_KEY') || !FLUENTMAIL_ELASTICMAIL_API_KEY) {
24
+ $errors['api_key']['required'] = __('Please define FLUENTMAIL_ELASTICMAIL_API_KEY in wp-config.php file.', 'fluent-smtp');
25
+ }
26
+ }
27
+
28
+ if ($errors) {
29
+ $this->throwValidationException($errors);
30
+ }
31
+ }
32
+ }
app/Services/Mailer/Providers/Gmail/Handler.php CHANGED
@@ -57,7 +57,6 @@ class Handler extends BaseHandler
57
  $googleClient = $this->getApiClient($data);
58
  $googleService = new \Google_Service_Gmail($googleClient);
59
 
60
-
61
  $result = array();
62
  try {
63
  $googleClient->setDefer(true);
57
  $googleClient = $this->getApiClient($data);
58
  $googleService = new \Google_Service_Gmail($googleClient);
59
 
 
60
  $result = array();
61
  try {
62
  $googleClient->setDefer(true);
app/Services/Mailer/Providers/PepiPost/Handler.php CHANGED
@@ -189,9 +189,7 @@ class Handler extends BaseHandler
189
 
190
  protected function getCustomEmailHeaders()
191
  {
192
- return [
193
- 'X-Mailer' => 'FluentMail - PepiPost'
194
- ];
195
  }
196
 
197
  protected function getRequestHeaders()
189
 
190
  protected function getCustomEmailHeaders()
191
  {
192
+ return [];
 
 
193
  }
194
 
195
  protected function getRequestHeaders()
app/Services/Mailer/Providers/SendGrid/Handler.php CHANGED
@@ -32,8 +32,7 @@ class Handler extends BaseHandler
32
  'from' => $this->getFrom(),
33
  'personalizations' => $this->getRecipients(),
34
  'subject' => $this->getSubject(),
35
- 'content' => $this->getBody(),
36
- 'headers' => $this->getCustomEmailHeaders()
37
  ];
38
 
39
  if ($replyTo = $this->getReplyTo()) {
@@ -95,7 +94,6 @@ class Handler extends BaseHandler
95
  if ($replyTo = $this->getParam('headers.reply-to')) {
96
  return reset($replyTo);
97
  }
98
-
99
  }
100
 
101
  protected function getRecipients()
@@ -183,9 +181,7 @@ class Handler extends BaseHandler
183
 
184
  protected function getCustomEmailHeaders()
185
  {
186
- return [
187
- 'X-Mailer' => 'FluentMail - SendGrid'
188
- ];
189
  }
190
 
191
  protected function getRequestHeaders()
32
  'from' => $this->getFrom(),
33
  'personalizations' => $this->getRecipients(),
34
  'subject' => $this->getSubject(),
35
+ 'content' => $this->getBody()
 
36
  ];
37
 
38
  if ($replyTo = $this->getReplyTo()) {
94
  if ($replyTo = $this->getParam('headers.reply-to')) {
95
  return reset($replyTo);
96
  }
 
97
  }
98
 
99
  protected function getRecipients()
181
 
182
  protected function getCustomEmailHeaders()
183
  {
184
+ return [];
 
 
185
  }
186
 
187
  protected function getRequestHeaders()
app/Services/Mailer/Providers/SendInBlue/Handler.php CHANGED
@@ -39,10 +39,16 @@ class Handler extends BaseHandler
39
  $body = [
40
  'sender' => $this->getFrom(),
41
  'subject' => $this->getSubject(),
42
- 'htmlContent' => $this->getBody(),
43
- 'headers' => $this->getCustomEmailHeaders()
44
  ];
45
 
 
 
 
 
 
 
 
46
  if ($replyTo = $this->getReplyTo()) {
47
  $body['replyTo'] = $replyTo;
48
  }
@@ -177,15 +183,12 @@ class Handler extends BaseHandler
177
 
178
  protected function getCustomEmailHeaders()
179
  {
180
- return [
181
- 'X-Mailer' => 'FluentMail - SendInBlue'
182
- ];
183
  }
184
 
185
  protected function getRequestHeaders()
186
  {
187
  return [
188
- 'X-Mailer' => 'FluentMail-SendInBlue',
189
  'Api-Key' => $this->getSetting('api_key'),
190
  'Content-Type' => 'application/json',
191
  'Accept' => 'application/json'
39
  $body = [
40
  'sender' => $this->getFrom(),
41
  'subject' => $this->getSubject(),
42
+ 'htmlContent' => $this->getBody()
 
43
  ];
44
 
45
+ $contentType = $this->getParam('headers.content-type');
46
+
47
+ if($contentType == 'text/plain') {
48
+ $body['textContent'] = $this->getBody();
49
+ unset($body['htmlContent']);
50
+ }
51
+
52
  if ($replyTo = $this->getReplyTo()) {
53
  $body['replyTo'] = $replyTo;
54
  }
183
 
184
  protected function getCustomEmailHeaders()
185
  {
186
+ return [];
 
 
187
  }
188
 
189
  protected function getRequestHeaders()
190
  {
191
  return [
 
192
  'Api-Key' => $this->getSetting('api_key'),
193
  'Content-Type' => 'application/json',
194
  'Accept' => 'application/json'
app/Services/Mailer/Providers/config.php CHANGED
@@ -4,7 +4,7 @@ return [
4
  'connections' => [],
5
  'mappings' => [],
6
  'providers' => [
7
- 'smtp' => [
8
  'key' => 'smtp',
9
  'title' => __('SMTP', 'fluent-smtp'),
10
  'image' => fluentMailAssetUrl('images/smtp.svg'),
@@ -28,7 +28,7 @@ return [
28
  ],
29
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-fluent-smtp-with-any-host-or-mailer/">Read the documentation</a> for how to configure any SMTP with FluentSMTP.'
30
  ],
31
- 'ses' => [
32
  'key' => 'ses',
33
  'title' => __('Amazon SES', 'fluent-smtp'),
34
  'image' => fluentMailAssetUrl('images/amazon.png'),
@@ -69,7 +69,7 @@ return [
69
  ],
70
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-amazon-ses-in-fluent-smtp/">Read the documentation</a> for how to configure Amazon SES with FluentSMTP.'
71
  ],
72
- 'mailgun' => [
73
  'key' => 'mailgun',
74
  'title' => __('Mailgun', 'fluent-smtp'),
75
  'image' => fluentMailAssetUrl('images/mailgun.svg'),
@@ -86,7 +86,7 @@ return [
86
  ],
87
  'note' => '<a href="https://fluentsmtp.com/docs/configure-mailgun-in-fluent-smtp-to-send-emails/">Read the documentation</a> for how to configure Mailgun with FluentSMTP.'
88
  ],
89
- 'sendgrid' => [
90
  'key' => 'sendgrid',
91
  'title' => __('SendGrid', 'fluent-smtp'),
92
  'image' => fluentMailAssetUrl('images/sendgrid.svg'),
@@ -100,7 +100,7 @@ return [
100
  ],
101
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-the-sendgrid-driver-in-fluent-smtp/">Read the documentation</a> for how to configure sendgrid with FluentSMTP.'
102
  ],
103
- 'sendinblue' => [
104
  'key' => 'sendinblue',
105
  'title' => __('Sendinblue', 'fluent-smtp'),
106
  'image' => fluentMailAssetUrl('images/sendinblue.svg'),
@@ -114,7 +114,7 @@ return [
114
  ],
115
  'note' => '<a href="https://fluentsmtp.com/docs/setting-up-sendinblue-mailer-in-fluent-smtp/">Read the documentation</a> for how to configure Sendinblue with FluentSMTP.'
116
  ],
117
- 'sparkpost' => [
118
  'key' => 'sparkpost',
119
  'title' => __('SparkPost', 'fluent-smtp'),
120
  'image' => fluentMailAssetUrl('images/sparkpost.png'),
@@ -128,7 +128,7 @@ return [
128
  ],
129
  'note' => '<a href="https://fluentsmtp.com/docs/configure-sparkpost-in-fluent-smtp-to-send-emails/">Read the documentation</a> for how to configure SparkPost with FluentSMTP.'
130
  ],
131
- 'pepipost' => [
132
  'key' => 'pepipost',
133
  'title' => __('Pepipost', 'fluent-smtp'),
134
  'image' => fluentMailAssetUrl('images/pepipost-logo.png'),
@@ -142,7 +142,7 @@ return [
142
  ],
143
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-the-pepipost-mailer-in-fluent-smtp/">Read the documentation</a> for how to configure Pepipost with FluentSMTP.'
144
  ],
145
- 'postmark' => [
146
  'key' => 'postmark',
147
  'title' => __('Postmark', 'fluent-smtp'),
148
  'image' => fluentMailAssetUrl('images/postmark.svg'),
@@ -159,7 +159,22 @@ return [
159
  ],
160
  'note' => '<a href="https://fluentsmtp.com/docs/configure-postmark-in-fluent-smtp-to-send-emails/">Read the documentation</a> for how to configure Postmark with FluentSMTP.'
161
  ],
162
- 'gmail' => [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  'key' => 'gmail',
164
  'title' => __('Gmail/Google Workspace', 'fluent-smtp'),
165
  'image' => fluentMailAssetUrl('images/gmail-logo.png'),
@@ -178,7 +193,7 @@ return [
178
  ],
179
  'note' => __('Gmail/Google Workspace is not recommended for sending mass marketing emails.', 'fluent-smtp')
180
  ],
181
- 'outlook' => [
182
  'key' => 'outlook',
183
  'title' => __('Outlook/Office365', 'fluent-smtp'),
184
  'image' => fluentMailAssetUrl('images/microsoft.svg'),
@@ -197,7 +212,7 @@ return [
197
  ],
198
  'note' => __('Outlook/Office365 is not recommended for sending mass marketing emails.', 'fluent-smtp')
199
  ],
200
- 'default' => [
201
  'key' => 'default',
202
  'title' => __('PHP Mail', 'fluent-smtp'),
203
  'image' => fluentMailAssetUrl('images/default.svg'),
4
  'connections' => [],
5
  'mappings' => [],
6
  'providers' => [
7
+ 'smtp' => [
8
  'key' => 'smtp',
9
  'title' => __('SMTP', 'fluent-smtp'),
10
  'image' => fluentMailAssetUrl('images/smtp.svg'),
28
  ],
29
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-fluent-smtp-with-any-host-or-mailer/">Read the documentation</a> for how to configure any SMTP with FluentSMTP.'
30
  ],
31
+ 'ses' => [
32
  'key' => 'ses',
33
  'title' => __('Amazon SES', 'fluent-smtp'),
34
  'image' => fluentMailAssetUrl('images/amazon.png'),
69
  ],
70
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-amazon-ses-in-fluent-smtp/">Read the documentation</a> for how to configure Amazon SES with FluentSMTP.'
71
  ],
72
+ 'mailgun' => [
73
  'key' => 'mailgun',
74
  'title' => __('Mailgun', 'fluent-smtp'),
75
  'image' => fluentMailAssetUrl('images/mailgun.svg'),
86
  ],
87
  'note' => '<a href="https://fluentsmtp.com/docs/configure-mailgun-in-fluent-smtp-to-send-emails/">Read the documentation</a> for how to configure Mailgun with FluentSMTP.'
88
  ],
89
+ 'sendgrid' => [
90
  'key' => 'sendgrid',
91
  'title' => __('SendGrid', 'fluent-smtp'),
92
  'image' => fluentMailAssetUrl('images/sendgrid.svg'),
100
  ],
101
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-the-sendgrid-driver-in-fluent-smtp/">Read the documentation</a> for how to configure sendgrid with FluentSMTP.'
102
  ],
103
+ 'sendinblue' => [
104
  'key' => 'sendinblue',
105
  'title' => __('Sendinblue', 'fluent-smtp'),
106
  'image' => fluentMailAssetUrl('images/sendinblue.svg'),
114
  ],
115
  'note' => '<a href="https://fluentsmtp.com/docs/setting-up-sendinblue-mailer-in-fluent-smtp/">Read the documentation</a> for how to configure Sendinblue with FluentSMTP.'
116
  ],
117
+ 'sparkpost' => [
118
  'key' => 'sparkpost',
119
  'title' => __('SparkPost', 'fluent-smtp'),
120
  'image' => fluentMailAssetUrl('images/sparkpost.png'),
128
  ],
129
  'note' => '<a href="https://fluentsmtp.com/docs/configure-sparkpost-in-fluent-smtp-to-send-emails/">Read the documentation</a> for how to configure SparkPost with FluentSMTP.'
130
  ],
131
+ 'pepipost' => [
132
  'key' => 'pepipost',
133
  'title' => __('Pepipost', 'fluent-smtp'),
134
  'image' => fluentMailAssetUrl('images/pepipost-logo.png'),
142
  ],
143
  'note' => '<a href="https://fluentsmtp.com/docs/set-up-the-pepipost-mailer-in-fluent-smtp/">Read the documentation</a> for how to configure Pepipost with FluentSMTP.'
144
  ],
145
+ 'postmark' => [
146
  'key' => 'postmark',
147
  'title' => __('Postmark', 'fluent-smtp'),
148
  'image' => fluentMailAssetUrl('images/postmark.svg'),
159
  ],
160
  'note' => '<a href="https://fluentsmtp.com/docs/configure-postmark-in-fluent-smtp-to-send-emails/">Read the documentation</a> for how to configure Postmark with FluentSMTP.'
161
  ],
162
+ // 'elasticmail' => [
163
+ // 'key' => 'elasticmail',
164
+ // 'title' => __('Elastic Mail', 'fluent-smtp'),
165
+ // 'image' => fluentMailAssetUrl('images/elastic_mail.svg'),
166
+ // 'provider' => 'ElasticMail',
167
+ // 'options' => [
168
+ // 'sender_name' => '',
169
+ // 'sender_email' => '',
170
+ // 'force_from_name' => 'no',
171
+ // 'api_key' => '',
172
+ // 'mail_type' => 'transactional',
173
+ // 'key_store' => 'db'
174
+ // ],
175
+ // 'note' => '<a href="https://fluentsmtp.com/docs/set-up-the-elastic-mail-driver-in-fluent-smtp/">Read the documentation</a> for how to configure sendgrid with FluentSMTP.'
176
+ // ],
177
+ 'gmail' => [
178
  'key' => 'gmail',
179
  'title' => __('Gmail/Google Workspace', 'fluent-smtp'),
180
  'image' => fluentMailAssetUrl('images/gmail-logo.png'),
193
  ],
194
  'note' => __('Gmail/Google Workspace is not recommended for sending mass marketing emails.', 'fluent-smtp')
195
  ],
196
+ 'outlook' => [
197
  'key' => 'outlook',
198
  'title' => __('Outlook/Office365', 'fluent-smtp'),
199
  'image' => fluentMailAssetUrl('images/microsoft.svg'),
212
  ],
213
  'note' => __('Outlook/Office365 is not recommended for sending mass marketing emails.', 'fluent-smtp')
214
  ],
215
+ 'default' => [
216
  'key' => 'default',
217
  'title' => __('PHP Mail', 'fluent-smtp'),
218
  'image' => fluentMailAssetUrl('images/default.svg'),
assets/admin/js/fluent-mail-admin-app.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t={7757:(t,e,n)=>{t.exports=n(5666)},8552:(t,e,n)=>{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),o=n(401),s=n(7667),i=n(1327),a=n(1866);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=i,l.prototype.set=a,t.exports=l},8407:(t,e,n)=>{var r=n(7040),o=n(4125),s=n(2117),i=n(7529),a=n(4705);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=i,l.prototype.set=a,t.exports=l},7071:(t,e,n)=>{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),o=n(1285),s=n(6e3),i=n(9916),a=n(5265);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=i,l.prototype.set=a,t.exports=l},3818:(t,e,n)=>{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),o=n(619),s=n(2385);function i(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}i.prototype.add=i.prototype.push=o,i.prototype.has=s,t.exports=i},6384:(t,e,n)=>{var r=n(8407),o=n(7465),s=n(3779),i=n(7599),a=n(4758),l=n(4309);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=s,c.prototype.get=i,c.prototype.has=a,c.prototype.set=l,t.exports=c},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},7412:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,s=[];++n<r;){var i=t[n];e(i,n,t)&&(s[o++]=i)}return s}},4636:(t,e,n)=>{var r=n(2545),o=n(5694),s=n(1469),i=n(4144),a=n(5776),l=n(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=s(t),u=!n&&o(t),p=!n&&!u&&i(t),f=!n&&!u&&!p&&l(t),_=n||u||p||f,d=_?r(t.length,String):[],v=d.length;for(var m in t)!e&&!c.call(t,m)||_&&("length"==m||p&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,v))||d.push(m);return d}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},4311:(t,e,n)=>{var r=n(9877);t.exports=function(t){var e=t.length;return e?t[r(0,e-1)]:void 0}},2908:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9881:(t,e,n)=>{var r=n(7816),o=n(9291)(r);t.exports=o},760:(t,e,n)=>{var r=n(9881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},7816:(t,e,n)=>{var r=n(8483),o=n(3674);t.exports=function(t,e){return t&&r(t,e,o)}},7786:(t,e,n)=>{var r=n(1811),o=n(327);t.exports=function(t,e){for(var n=0,s=(e=r(e,t)).length;null!=t&&n<s;)t=t[o(e[n++])];return n&&n==s?t:void 0}},8866:(t,e,n)=>{var r=n(2488),o=n(1469);t.exports=function(t,e,n){var s=e(t);return o(t)?s:r(s,n(t))}},4239:(t,e,n)=>{var r=n(2705),o=n(9607),s=n(2333),i=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":i&&i in Object(t)?o(t):s(t)}},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},9454:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),o=n(7005);t.exports=function t(e,n,s,i,a){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,s,i,t,a))}},2492:(t,e,n)=>{var r=n(6384),o=n(7114),s=n(8351),i=n(6096),a=n(4160),l=n(1469),c=n(4144),u=n(6719),p="[object Arguments]",f="[object Array]",_="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,m,h){var g=l(t),y=l(e),b=g?f:a(t),w=y?f:a(e),k=(b=b==p?_:b)==_,x=(w=w==p?_:w)==_,S=b==w;if(S&&c(t)){if(!c(e))return!1;g=!0,k=!1}if(S&&!k)return h||(h=new r),g||u(t)?o(t,e,n,v,m,h):s(t,e,b,n,v,m,h);if(!(1&n)){var $=k&&d.call(t,"__wrapped__"),C=x&&d.call(e,"__wrapped__");if($||C){var P=$?t.value():t,E=C?e.value():e;return h||(h=new r),m(P,E,n,v,h)}}return!!S&&(h||(h=new r),i(t,e,n,v,m,h))}},2958:(t,e,n)=>{var r=n(6384),o=n(939);t.exports=function(t,e,n,s){var i=n.length,a=i,l=!s;if(null==t)return!a;for(t=Object(t);i--;){var c=n[i];if(l&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],p=t[u],f=c[1];if(l&&c[2]){if(void 0===p&&!(u in t))return!1}else{var _=new r;if(s)var d=s(p,f,u,t,e,_);if(!(void 0===d?o(f,p,3,s,_):d))return!1}}return!0}},8458:(t,e,n)=>{var r=n(3560),o=n(5346),s=n(3218),i=n(346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,f=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(r(t)?f:a).test(i(t))}},8749:(t,e,n)=>{var r=n(4239),o=n(1780),s=n(7005),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(t){return s(t)&&o(t.length)&&!!i[r(t)]}},7206:(t,e,n)=>{var r=n(1573),o=n(6432),s=n(6557),i=n(1469),a=n(9601);t.exports=function(t){return"function"==typeof t?t:null==t?s:"object"==typeof t?i(t)?o(t[0],t[1]):r(t):a(t)}},280:(t,e,n)=>{var r=n(5726),o=n(6916),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}},1573:(t,e,n)=>{var r=n(2958),o=n(1499),s=n(2634);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?s(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},6432:(t,e,n)=>{var r=n(939),o=n(7361),s=n(9095),i=n(5403),a=n(9162),l=n(2634),c=n(327);t.exports=function(t,e){return i(t)&&a(e)?l(c(t),e):function(n){var i=o(n,t);return void 0===i&&i===e?s(n,t):r(e,i,3)}}},371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},9152:(t,e,n)=>{var r=n(7786);t.exports=function(t){return function(e){return r(e,t)}}},9877:t=>{var e=Math.floor,n=Math.random;t.exports=function(t,r){return t+e(n()*(r-t+1))}},4992:(t,e,n)=>{var r=n(4311),o=n(2628);t.exports=function(t){return r(o(t))}},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},531:(t,e,n)=>{var r=n(2705),o=n(9932),s=n(1469),i=n(3448),a=r?r.prototype:void 0,l=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(s(e))return o(e,t)+"";if(i(e))return l?l.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},7518:t=>{t.exports=function(t){return function(e){return t(e)}}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4290:(t,e,n)=>{var r=n(6557);t.exports=function(t){return"function"==typeof t?t:r}},1811:(t,e,n)=>{var r=n(1469),o=n(5403),s=n(5514),i=n(9833);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:s(i(t))}},4429:(t,e,n)=>{var r=n(5639)["__core-js_shared__"];t.exports=r},9291:(t,e,n)=>{var r=n(8612);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var s=n.length,i=e?s:-1,a=Object(n);(e?i--:++i<s)&&!1!==o(a[i],i,a););return n}}},5063:t=>{t.exports=function(t){return function(e,n,r){for(var o=-1,s=Object(e),i=r(e),a=i.length;a--;){var l=i[t?a:++o];if(!1===n(s[l],l,s))break}return e}}},7114:(t,e,n)=>{var r=n(8668),o=n(2908),s=n(4757);t.exports=function(t,e,n,i,a,l){var c=1&n,u=t.length,p=e.length;if(u!=p&&!(c&&p>u))return!1;var f=l.get(t),_=l.get(e);if(f&&_)return f==e&&_==t;var d=-1,v=!0,m=2&n?new r:void 0;for(l.set(t,e),l.set(e,t);++d<u;){var h=t[d],g=e[d];if(i)var y=c?i(g,h,d,e,t,l):i(h,g,d,t,e,l);if(void 0!==y){if(y)continue;v=!1;break}if(m){if(!o(e,(function(t,e){if(!s(m,e)&&(h===t||a(h,t,n,i,l)))return m.push(e)}))){v=!1;break}}else if(h!==g&&!a(h,g,n,i,l)){v=!1;break}}return l.delete(t),l.delete(e),v}},8351:(t,e,n)=>{var r=n(2705),o=n(1149),s=n(7813),i=n(7114),a=n(8776),l=n(1814),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,p,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!p(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var _=a;case"[object Set]":var d=1&r;if(_||(_=l),t.size!=e.size&&!d)return!1;var v=f.get(t);if(v)return v==e;r|=2,f.set(t,e);var m=i(_(t),_(e),r,c,p,f);return f.delete(t),m;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,s,i,a){var l=1&n,c=r(t),u=c.length;if(u!=r(e).length&&!l)return!1;for(var p=u;p--;){var f=c[p];if(!(l?f in e:o.call(e,f)))return!1}var _=a.get(t),d=a.get(e);if(_&&d)return _==e&&d==t;var v=!0;a.set(t,e),a.set(e,t);for(var m=l;++p<u;){var h=t[f=c[p]],g=e[f];if(s)var y=l?s(g,h,f,e,t,a):s(h,g,f,t,e,a);if(!(void 0===y?h===g||i(h,g,n,s,a):y)){v=!1;break}m||(m="constructor"==f)}if(v&&!m){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(v=!1)}return a.delete(t),a.delete(e),v}},1957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),o=n(9551),s=n(3674);t.exports=function(t){return r(t,s,o)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},1499:(t,e,n)=>{var r=n(9162),o=n(3674);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,r(i)]}return e}},852:(t,e,n)=>{var r=n(8458),o=n(7801);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},9607:(t,e,n)=>{var r=n(2705),o=Object.prototype,s=o.hasOwnProperty,i=o.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=i.call(t);return r&&(e?t[a]=n:delete t[a]),o}},9551:(t,e,n)=>{var r=n(4963),o=n(479),s=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(t){return null==t?[]:(t=Object(t),r(i(t),(function(e){return s.call(t,e)})))}:o;t.exports=a},4160:(t,e,n)=>{var r=n(8552),o=n(7071),s=n(3818),i=n(8525),a=n(577),l=n(4239),c=n(346),u="[object Map]",p="[object Promise]",f="[object Set]",_="[object WeakMap]",d="[object DataView]",v=c(r),m=c(o),h=c(s),g=c(i),y=c(a),b=l;(r&&b(new r(new ArrayBuffer(1)))!=d||o&&b(new o)!=u||s&&b(s.resolve())!=p||i&&b(new i)!=f||a&&b(new a)!=_)&&(b=function(t){var e=l(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return d;case m:return u;case h:return p;case g:return f;case y:return _}return e}),t.exports=b},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},222:(t,e,n)=>{var r=n(1811),o=n(5694),s=n(1469),i=n(5776),a=n(1780),l=n(327);t.exports=function(t,e,n){for(var c=-1,u=(e=r(e,t)).length,p=!1;++c<u;){var f=l(e[c]);if(!(p=null!=t&&n(t,f)))break;t=t[f]}return p||++c!=u?p:!!(u=null==t?0:t.length)&&a(u)&&i(f,u)&&(s(t)||o(t))}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},5403:(t,e,n)=>{var r=n(1469),o=n(3448),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(i.test(t)||!s.test(t)||null!=e&&t in Object(e))}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,o=n(4429),s=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!s&&s in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9162:(t,e,n)=>{var r=n(3218);t.exports=function(t){return t==t&&!r(t)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7529:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),o=n(8407),s=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||o),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},2634:t=>{t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},4523:(t,e,n)=>{var r=n(8306);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,i=s&&s.exports===o&&r.process,a=function(){try{var t=s&&s.require&&s.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=a},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5639:(t,e,n)=>{var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,s=r||o||Function("return this")();t.exports=s},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),o=n(7071),s=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(i)}return n.set(t,e),this.size=n.size,this}},5514:(t,e,n)=>{var r=n(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,i=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(s,"$1"):n||t)})),e}));t.exports=i},327:(t,e,n)=>{var r=n(3448);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},6073:(t,e,n)=>{t.exports=n(4486)},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3105:(t,e,n)=>{var r=n(4963),o=n(760),s=n(7206),i=n(1469);t.exports=function(t,e){return(i(t)?r:o)(t,s(e,3))}},4486:(t,e,n)=>{var r=n(7412),o=n(9881),s=n(4290),i=n(1469);t.exports=function(t,e){return(i(t)?r:o)(t,s(e))}},7361:(t,e,n)=>{var r=n(7786);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},9095:(t,e,n)=>{var r=n(13),o=n(222);t.exports=function(t,e){return null!=t&&o(t,e,r)}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),o=n(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(t){return o(t)&&i.call(t,"callee")&&!a.call(t,"callee")};t.exports=l},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),o=n(1780);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),o=n(5062),s=e&&!e.nodeType&&e,i=s&&t&&!t.nodeType&&t,a=i&&i.exports===s?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;t.exports=l},1609:(t,e,n)=>{var r=n(280),o=n(4160),s=n(5694),i=n(1469),a=n(8612),l=n(4144),c=n(5726),u=n(6719),p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(a(t)&&(i(t)||"string"==typeof t||"function"==typeof t.splice||l(t)||u(t)||s(t)))return!t.length;var e=o(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},3560:(t,e,n)=>{var r=n(4239),o=n(3218);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3448:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),o=n(7518),s=n(1167),i=s&&s.isTypedArray,a=i?o(i):r;t.exports=a},3674:(t,e,n)=>{var r=n(4636),o=n(280),s=n(8612);t.exports=function(t){return s(t)?r(t):o(t)}},8306:(t,e,n)=>{var r=n(3369);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var i=t.apply(this,r);return n.cache=s.set(o,i)||s,i};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},9601:(t,e,n)=>{var r=n(371),o=n(9152),s=n(5403),i=n(327);t.exports=function(t){return s(t)?r(i(t)):o(t)}},5534:(t,e,n)=>{var r=n(4311),o=n(4992),s=n(1469);t.exports=function(t){return(s(t)?r:o)(t)}},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}},2628:(t,e,n)=>{var r=n(7415),o=n(3674);t.exports=function(t){return null==t?[]:r(t,o(t))}},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),i=new E(r||[]);return s._invoke=function(t,e,n){var r=p;return function(o,s){if(r===_)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw s;return O()}for(n.method=o,n.arg=s;;){var i=n.delegate;if(i){var a=$(i,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=_;var l=u(t,e,n);if("normal"===l.type){if(r=n.done?d:f,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=d,n.method="throw",n.arg=l.arg)}}}(t,n,i),s}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var p="suspendedStart",f="suspendedYield",_="executing",d="completed",v={};function m(){}function h(){}function g(){}var y={};l(y,s,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(A([])));w&&w!==n&&r.call(w,s)&&(y=w);var k=g.prototype=m.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(o,s,i,a){var l=u(t[o],t,s);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==typeof p&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,a)}),(function(t){n("throw",t,i,a)})):e.resolve(p).then((function(t){c.value=t,i(c)}),(function(t){return n("throw",t,i,a)}))}a(l.arg)}var o;this._invoke=function(t,r){function s(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(s,s):s()}}function $(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,$(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var s=o.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function A(t){if(t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:e,done:!0}}return h.prototype=g,l(k,"constructor",g),l(g,"constructor",h),h.displayName=l(g,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,a,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},x(S.prototype),l(S.prototype,i,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,s){void 0===s&&(s=Promise);var i=new S(c(e,n,r,o),s);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(k),l(k,a,"Generator"),l(k,s,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=A,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var i=s?s.completion:{};return i.type=t,i.arg=e,s?(this.method="next",this.next=s.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},8161:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"FluentMailApplication",data:function(){return{logo:"",items:[],active:null}},watch:{$route:function(t,e){this.$route.name&&this.setActive()}},methods:{defaultRoutes:function(){return[{route:"connections",title:this.$t("Settings")},{route:"test",title:"Email Test"},{route:"logs",title:"Email Logs"},{route:"support",title:"Support"},{route:"docs",title:"Docs"}]},setMenus:function(){this.items=this.applyFilters("fluentmail_top_menus",this.defaultRoutes()),this.setActive()},setActive:function(){this.active=this.$route.meta.parent||this.$route.name}},computed:{brandLogo:function(){var t=this.appVars.brand_logo;return'<img style="width:140px;" src="'.concat(t,'" />')}},created:function(){jQuery(".update-nag,.notice, #wpbody-content > .updated, #wpbody-content > .error").remove(),this.logo="<div class='logo'>".concat(this.brandLogo,"</div>"),this.setMenus()}};const o=(0,n(1900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fluent-mail-app"},[n("div",{staticClass:"fluent-mail-main-menu-items"},[n("el-menu",{staticClass:"fluent-mail-navigation",attrs:{router:!0,mode:"horizontal","default-active":t.active}},[n("el-menu-item",{attrs:{index:"dashboard",route:{name:"dashboard"}},domProps:{innerHTML:t._s(t.logo)}}),t._v(" "),t._l(t.items,(function(e){return n("el-menu-item",{key:e.route,attrs:{index:e.route,route:{name:e.route}},domProps:{innerHTML:t._s(e.title)}})}))],2)],1),t._v(" "),n("div",{staticClass:"fluent-mail-body"},[n("router-view",{key:t.$route.fullPath})],1)])}),[],!1,null,null,null).exports},1900:(t,e,n)=>{"use strict";function r(t,e,n,r,o,s,i,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),i?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:c}}n.d(e,{Z:()=>r})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var s=e[r]={id:r,loaded:!1,exports:{}};return t[r](s,s.exports,n),s.loaded=!0,s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t=n(1609),e=n.n(t);const r={name:"InputPassword",props:["value","id","placeholder","disabled"],data:function(){return{type:"password",styleObject:{"text-decoration":"line-through"},src:window.FluentMail.appVars.image_url+"/eye-cross.png"}},methods:{toggle:function(){this.type="text"===this.type?"password":"text",this.styleObject["text-decoration"]="text"===this.type?"none":"line-through"}}};var o=n(1900);const s=(0,o.Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-input",{attrs:{id:t.id,type:t.type,value:t.value,"place-holder":t.placeholder,disabled:t.disabled},on:{input:function(e){return t.$emit("input",e)}}})],1)}),[],!1,null,null,null).exports;const i={name:"Error",props:["error"]};const a=(0,o.Z)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.error?n("span",{staticClass:"el-form-item__error"},[t._v("\n "+t._s(t.error)+"\n")]):t._e()}),[],!1,null,null,null).exports,l={name:"MailGun",props:["connection","errors"],components:{InputPassword:s,Error:a},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="",this.connection.domain_name="")}},data:function(){return{}}};const c=(0,o.Z)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Mailgun API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"key"}},[t._v("\n Private API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n Follow this link to get an API Key from Mailgun:\n "),n("a",{attrs:{target:"_blank",href:"https://app.mailgun.com/app/account/security/api_keys"}},[t._v("Get a Private API Key.")])])],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{for:"domain"}},[n("label",{attrs:{for:"domain"}},[t._v("\n Domain Name\n ")]),t._v(" "),n("el-input",{attrs:{id:"domain"},model:{value:t.connection.domain_name,callback:function(e){t.$set(t.connection,"domain_name",e)},expression:"connection.domain_name"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("domain_name")}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n Follow this link to get a Domain Name from Mailgun:\n "),n("a",{attrs:{target:"_blank",href:"https://app.mailgun.com/app/domains"}},[t._v("\n Get a Domain Name.\n ")])])],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_MAILGUN_API_KEY', '********************' );\ndefine( 'FLUENTMAIL_MAILGUN_DOMAIN', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("domain_name")}})],1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",{staticStyle:{"vertical-align":"baseline"},attrs:{for:"region"}},[t._v("\n Select Region    \n ")]),t._v(" "),n("el-radio",{attrs:{label:"us"},model:{value:t.connection.region,callback:function(e){t.$set(t.connection,"region",e)},expression:"connection.region"}},[t._v("US")]),t._v(" "),n("el-radio",{attrs:{label:"eu"},model:{value:t.connection.region,callback:function(e){t.$set(t.connection,"region",e)},expression:"connection.region"}},[t._v("EU")]),t._v(" "),n("el-alert",{attrs:{closable:!1}},[n("span",[t._v("\n Define which endpoint you want to use for sending messages.\n ")]),t._v(" "),n("span",[t._v("\n If you are operating under EU laws, you may be required to use EU region.\n "),n("a",{attrs:{target:"_blank",href:"https://www.mailgun.com/regions"}},[t._v("More information")]),t._v("\n on Mailgun.com.\n ")])])],1)],1)}),[],!1,null,null,null).exports;const u={name:"PepiPost",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const p=(0,o.Z)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Pepipost API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"pepipost-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"pepipost-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_PEPIPOST_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key from Pepipost (Click Show button on Settings Page):\n "),n("a",{attrs:{target:"_blank",href:"https://app.pepipost.com/app/settings/integration"}},[t._v("Get API Key.")])])}],!1,null,null,null).exports;const f={name:"SendGrid",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const _=(0,o.Z)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("SendGrid API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"sendgrid-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"sendgrid-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SENDGRID_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key from SendGrid:\n "),n("a",{attrs:{target:"_blank",href:"https://app.sendgrid.com/settings/api_keys"}},[t._v("Create API Key.")]),t._v("\n To send emails you will need only a Mail Send access level for this API key.\n ")])}],!1,null,null,null).exports;const d={name:"SendInBlue",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const v=(0,o.Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Sendinblue API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"sendinblue-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"sendinblue-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SENDINBLUE_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key:\n "),n("a",{attrs:{target:"_blank",href:"https://account.sendinblue.com/advanced/api"}},[t._v("Get v3 API Key.")])])}],!1,null,null,null).exports;const m={name:"AmazonSes",props:["connection","provider","errors"],components:{InputPassword:s,Error:a},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.access_key="",this.connection.secret_key="")}},data:function(){return{}}};const h=(0,o.Z)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store Access Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Access Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{for:"access_key"}},[n("label",{attrs:{for:"access_key"}},[t._v("\n Access Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"access_key"},model:{value:t.connection.access_key,callback:function(e){t.$set(t.connection,"access_key",e)},expression:"connection.access_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("access_key")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"ses-key"}},[t._v("\n Secret Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"ses-key"},model:{value:t.connection.secret_key,callback:function(e){t.$set(t.connection,"secret_key",e)},expression:"connection.secret_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("secret_key")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_AWS_ACCESS_KEY_ID', '********************' );\ndefine( 'FLUENTMAIL_AWS_SECRET_ACCESS_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("access_key")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("secret_key")}})],1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",{attrs:{for:"ses-region"}},[t._v("\n Region "),n("span",{staticClass:"small-help-text"},[t._v("(Default: US East (N. Virginia)/us-east-1)")])]),t._v(" "),n("el-select",{attrs:{id:"ses-region",placeholder:"Select Region"},model:{value:t.connection.region,callback:function(e){t.$set(t.connection,"region",e)},expression:"connection.region"}},t._l(t.provider.regions,(function(t,e){return n("el-option",{key:e,attrs:{label:t,value:e}})})),1),t._v(" "),n("span",{staticClass:"el-form-item__error",staticStyle:{"margin-top":"10px"}},[t._v(t._s(t.errors.errors.api_error))])],1)],1)}),[],!1,null,null,null).exports;const g={name:"SparkPost",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const y=(0,o.Z)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("SparkPost API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"sparkpost-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"sparkpost-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SPARKPOST_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key:\n "),n("a",{attrs:{target:"_blank",href:"https://app.sparkpost.com/account/api-keys"}},[t._v("Get API Key.")])])}],!1,null,null,null).exports;const b={name:"Smtp",props:["connection","errors"],components:{InputPassword:s,Error:a},data:function(){return{app_ready:!1}},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.password="",this.connection.username="")}},computed:{isDisabledUsername:function(){return"no"===this.connection.auth},isDisabledPassword:function(){return"no"===this.connection.auth}},mounted:function(){this.connection.key_store||this.$set(this.connection,"key_store","db")}};const w=(0,o.Z)(b,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"host"}},[t._v("\n SMTP Host\n ")]),t._v(" "),n("el-input",{attrs:{id:"host"},model:{value:t.connection.host,callback:function(e){t.$set(t.connection,"host",e)},expression:"connection.host"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("host")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"port"}},[t._v("\n SMTP Port\n ")]),t._v(" "),n("el-input",{attrs:{id:"port"},model:{value:t.connection.port,callback:function(e){t.$set(t.connection,"port",e)},expression:"connection.port"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("port")}})],1)],1)],1),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{staticStyle:{margin:"20px 0"}},[n("label",[t._v("\n Encryption\n ")]),t._v(" "),n("div",{staticClass:"small-help-text",staticStyle:{display:"inline-block"}},[t._v("\n (Select "),n("strong",[t._v("ssl")]),t._v(" on port "),n("strong",[t._v("465")]),t._v(",\n or "),n("strong",[t._v("tls")]),t._v(" on port "),n("strong",[t._v("25")]),t._v(" or "),n("strong",[t._v("587")]),t._v(")\n ")]),t._v(" "),n("div",{staticStyle:{display:"inline-block","margin-left":"20px"}},[n("el-radio",{attrs:{label:"none"},model:{value:t.connection.encryption,callback:function(e){t.$set(t.connection,"encryption",e)},expression:"connection.encryption"}},[t._v("None")]),t._v(" "),n("el-radio",{attrs:{label:"ssl"},model:{value:t.connection.encryption,callback:function(e){t.$set(t.connection,"encryption",e)},expression:"connection.encryption"}},[t._v("SSL")]),t._v(" "),n("el-radio",{attrs:{label:"tls"},model:{value:t.connection.encryption,callback:function(e){t.$set(t.connection,"encryption",e)},expression:"connection.encryption"}},[t._v("TLS")])],1)])],1)],1),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("el-form-item",[n("label",{attrs:{for:"auth"}},[t._v("\n Use Auto TLS\n ")]),t._v(" "),n("el-switch",{attrs:{"active-value":"yes","inactive-value":"no"},model:{value:t.connection.auto_tls,callback:function(e){t.$set(t.connection,"auto_tls",e)},expression:"connection.auto_tls"}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n (By default, the TLS encryption would be used if the server supports it. On some srvers, it could be a problem and may need to be disabled.)\n ")])],1)],1)],1),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("el-form-item",[n("label",{attrs:{for:"auth"}},[t._v("\n Authentication\n ")]),t._v(" "),n("el-switch",{attrs:{"active-value":"yes","inactive-value":"no"},model:{value:t.connection.auth,callback:function(e){t.$set(t.connection,"auth",e)},expression:"connection.auth"}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n (If you need to provide your SMTP server's credentials (username and password) enable the authentication, in most cases this is required.)\n ")])],1)],1)],1),t._v(" "),"yes"==t.connection.auth?[n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{value:"db",label:"db"}},[t._v("Store Access Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{value:"wp_config",label:"wp_config"}},[t._v("Access Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{class:{disabled:"no"===t.connection.auth},attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"username"}},[t._v("\n SMTP Username\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"username",disabled:t.isDisabledUsername},model:{value:t.connection.username,callback:function(e){t.$set(t.connection,"username",e)},expression:"connection.username"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("username")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"smtp-password"}},[t._v("\n SMTP Password\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"smtp-password",disabled:t.isDisabledPassword},model:{value:t.connection.password,callback:function(e){t.$set(t.connection,"password",e)},expression:"connection.password"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("password")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SMTP_USERNAME', '********************' );\ndefine( 'FLUENTMAIL_SMTP_PASSWORD', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("username")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("password")}})],1)],1):t._e()]:t._e()],2)}),[],!1,null,null,null).exports;const k={name:"Gamil",props:["connection","errors"],components:{InputPassword:s,Error:a},data:function(){return{app_ready:!1,gettingRedirect:!1,redirectUrl:""}},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.client_id="",this.connection.client_secret="")}},methods:{redirectToGoogle:function(){var t=this;this.gettingRedirect=!0,this.$post("settings/gmail_auth_url",{connection:this.connection}).then((function(e){t.redirectUrl=e.data.auth_url,window.open(e.data.auth_url,"_blank")})).catch((function(e){t.errors.record(e.responseJSON.data)})).always((function(){t.gettingRedirect=!1}))}},mounted:function(){this.connection.key_store||this.$set(this.connection,"key_store","db")}};const x=(0,o.Z)(k,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",[t._v("Gmail/Google Workspace API Settings")]),t._v(" "),t._m(0),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{value:"db",label:"db"}},[t._v("Store Application Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{value:"wp_config",label:"wp_config"}},[t._v("Application Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_id"}},[t._v("\n Application Client ID\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_id"},model:{value:t.connection.client_id,callback:function(e){t.$set(t.connection,"client_id",e)},expression:"connection.client_id"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_secret"}},[t._v("\n Application Client Secret\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_secret"},model:{value:t.connection.client_secret,callback:function(e){t.$set(t.connection,"client_secret",e)},expression:"connection.client_secret"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_GMAIL_CLIENT_ID', '********************' );\ndefine( 'FLUENTMAIL_GMAIL_CLIENT_SECRET', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1):t._e(),t._v(" "),t.connection.access_token?n("div",{staticStyle:{"text-align":"center"}},[n("h3",[t._v("Your Gmail/Google Workspace Authentication has been enabled. No further action is needed. If you want to re-authenticate, "),n("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.connection.access_token=""}}},[t._v("click here")])])]):n("div",[n("div",{staticStyle:{"text-align":"center"}},[t._m(1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.gettingRedirect,expression:"gettingRedirect"}],attrs:{type:"danger"},on:{click:function(e){return t.redirectToGoogle()}}},[t._v("Authenticate with Google & Get Access Token")])],1),t._v(" "),t.redirectUrl?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"application_token"}},[t._v("\n Access Token\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"application_token"},model:{value:t.connection.auth_token,callback:function(e){t.$set(t.connection,"auth_token",e)},expression:"connection.auth_token"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("auth_token")}}),t._v(" "),n("p",[t._v("Please send test email to confirm if the connection is working or not.")])],1)],1)],1):t._e()],1)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[t._v("Please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://fluentsmtp.com/docs/connect-gmail-or-google-workspace-emails-with-fluentsmtp/"}},[t._v("check the documentation first")]),t._v(" or "),n("b",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://www.youtube.com/watch?v=_d78bscNaX8"}},[t._v("Watch the video tutorial")])]),t._v(" to create API keys at Google")])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h3",[t._v("Please authenticate with Google to get "),n("b",[t._v("Access Token")])])}],!1,null,null,null).exports;const S={name:"OutLook",props:["connection","provider","errors"],components:{InputPassword:s,Error:a},data:function(){return{app_ready:!1,gettingRedirect:!1,redirectUrl:""}},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.client_id="",this.connection.client_secret="")}},methods:{redirectToMS:function(){var t=this;this.gettingRedirect=!0,this.$post("settings/outlook_auth_url",{connection:this.connection}).then((function(e){t.redirectUrl=e.data.auth_url,window.open(e.data.auth_url,"_blank")})).catch((function(e){t.errors.record(e.responseJSON.data)})).always((function(){t.gettingRedirect=!1}))}},mounted:function(){this.connection.key_store||this.$set(this.connection,"key_store","db")}};const $=(0,o.Z)(S,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",[t._v("Outlook/Office365 API Settings")]),t._v(" "),t._m(0),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{value:"db",label:"db"}},[t._v("Store Application Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{value:"wp_config",label:"wp_config"}},[t._v("Application Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_id"}},[t._v("\n Application Client ID\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_id"},model:{value:t.connection.client_id,callback:function(e){t.$set(t.connection,"client_id",e)},expression:"connection.client_id"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_secret"}},[t._v("\n Application Client Secret\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_secret"},model:{value:t.connection.client_secret,callback:function(e){t.$set(t.connection,"client_secret",e)},expression:"connection.client_secret"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_OUTLOOK_CLIENT_ID', '********************' );\ndefine( 'FLUENTMAIL_OUTLOOK_CLIENT_SECRET', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",[t._v("App Callback URL (Use this URL to your APP)")]),t._v(" "),n("el-input",{attrs:{readonly:!0},model:{value:t.provider.callback_url,callback:function(e){t.$set(t.provider,"callback_url",e)},expression:"provider.callback_url"}})],1),t._v(" "),t.connection.access_token?n("div",{staticStyle:{"text-align":"center"}},[n("h3",[t._v("Your Outlook/Office365 Authentication has been enabled. No further action is needed. If you want to re-authenticate, "),n("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.connection.access_token=""}}},[t._v("click here")])])]):n("div",[n("div",{staticStyle:{"text-align":"center"}},[t._m(1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.gettingRedirect,expression:"gettingRedirect"}],attrs:{type:"danger"},on:{click:function(e){return t.redirectToMS()}}},[t._v("Authenticate with Office365 & Get Access Token")])],1),t._v(" "),t.redirectUrl?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"application_token"}},[t._v("\n Access Token\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"application_token"},model:{value:t.connection.auth_token,callback:function(e){t.$set(t.connection,"auth_token",e)},expression:"connection.auth_token"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("auth_token")}}),t._v(" "),n("p",[t._v("Please send test email to confirm if the connection is working or not.")])],1)],1)],1):t._e()],1)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[t._v("Please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://fluentsmtp.com/docs/setup-outlook-with-fluentsmtp/"}},[t._v("check the documentation first to create API keys at Microsoft")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h3",[t._v("Please authenticate with Office365 to get "),n("b",[t._v("Access Token")])])}],!1,null,null,null).exports;const C={name:"PostMark",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const P=(0,o.Z)(C,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Postmark API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"postmark-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"postmark-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_POSTMARK_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0),t._v(" "),n("el-row",{staticClass:"fsmtp_compact",attrs:{gutter:30}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"Track Opens"}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.track_opens,callback:function(e){t.$set(t.connection,"track_opens",e)},expression:"connection.track_opens"}},[t._v("\n Enable email opens tracking on postmark (For HTML Emails only).\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n If you enable this then open tracking header will be added to the email for postmark.\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1),t._v(" "),n("el-form-item",{attrs:{label:"Message Stream"}},[n("el-input",{attrs:{type:"text",size:"small"},model:{value:t.connection.message_stream,callback:function(e){t.$set(t.connection,"message_stream",e)},expression:"connection.message_stream"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"Track Links"}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.track_links,callback:function(e){t.$set(t.connection,"track_links",e)},expression:"connection.track_links"}},[t._v("\n Enable link tracking on postmark (For HTML Emails only).\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n If you enable this then link tracking header will be added to the email for postmark.\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1)],1)],1)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key from Postmark (Your API key is in the API Tokens tab of your):\n "),n("a",{attrs:{target:"_blank",href:"https://account.postmarkapp.com/servers"}},[t._v("Postmark Server.")])])}],!1,null,null,null).exports;function E(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const A=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errors={}}var e,n,r;return e=t,(n=[{key:"get",value:function(t){if(this.errors[t])return Object.values(this.errors[t])[0]}},{key:"has",value:function(t){return!!this.errors[t]}},{key:"record",value:function(t){this.errors=t}},{key:"clear",value:function(){this.errors={}}}])&&E(e.prototype,n),r&&E(e,r),t}(),O={name:"ConnectionWizard",props:["connection","is_new","providers","connection_key"],components:{ses:h,mailgun:c,pepipost:p,sendgrid:_,sendinblue:v,sparkpost:y,smtp:w,gmail:x,outlook:$,postmark:P,Error:a},data:function(){return{saving:!1,errors:new A,api_error:"",has_error:!1}},watch:{"connection.provider":function(t){if(!t)return!1;var e=JSON.parse(JSON.stringify(this.providers[t].options));e.provider=t,this.connection=e}},methods:{saveConnectionSettings:function(){var t=this;this.saving=!0,this.api_error="",this.has_error=!1,this.$post("settings",{connection:this.connection,connection_key:this.connection_key}).then((function(e){t.$notify.success(e.data.message),t.$set(t.settings,"connections",e.data.connections),t.$set(t.settings,"mappings",e.data.mappings),t.$set(t.settings,"misc",e.data.misc),t.$router.push({name:"connections"})})).fail((function(e){t.errors.record(e.responseJSON.data),t.api_error=e.responseJSON.data.api_error,t.has_error=!0})).always((function(){t.saving=!1}))}}};const j=(0,o.Z)(O,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fss_connection_wizard"},[n("el-form",{attrs:{data:t.connection,"label-position":"top"}},[n("el-form-item",{attrs:{label:"Connection Provider"}},[n("el-radio-group",{staticClass:"fss_connections",model:{value:t.connection.provider,callback:function(e){t.$set(t.connection,"provider",e)},expression:"connection.provider"}},t._l(t.providers,(function(t,e){return n("el-radio-button",{key:e,class:"con_"+e,attrs:{label:e}},[n("img",{staticStyle:{"max-width":"80px",height:"32px"},attrs:{title:t.title,src:t.image}})])})),1)],1),t._v(" "),t.connection.provider?[n("div",{staticClass:"fss_config_section"},[n("h3",{staticClass:"fs_config_title"},[t._v(t._s(t.$t("Sender Settings")))]),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:t.$t("From Email")}},[n("error",{attrs:{error:t.errors.get("sender_email")}}),t._v(" "),n("el-input",{attrs:{type:"email",placeholder:t.$t("From Email")},model:{value:t.connection.sender_email,callback:function(e){t.$set(t.connection,"sender_email",e)},expression:"connection.sender_email"}})],1),t._v(" "),null!=t.connection.force_from_email?n("div",[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.force_from_email,callback:function(e){t.$set(t.connection,"force_from_email",e)},expression:"connection.force_from_email"}},[t._v("\n "+t._s(t.$t("Force From Email (Recommended Settings: Enable)"))+"\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n "+t._s(t.$t("from_email_tooltip"))+"\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1):t._e(),t._v(" "),null!=t.connection.return_path?n("div",[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.return_path,callback:function(e){t.$set(t.connection,"return_path",e)},expression:"connection.return_path"}},[t._v("\n "+t._s(t.$t("Set the return-path to match the From Email"))+"\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n Return Path indicates where non-delivery receipts - or bounce messages -"),n("br"),t._v("\n are to be sent. If unchecked, bounce messages may be lost. With this enabled,"),n("br"),t._v('\n you’ll be emailed using "From Email" if any messages bounce as a result of issues with the recipient’s email.\n ')]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1):t._e()],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:t.$t("From Name")}},[n("el-input",{attrs:{type:"text",placeholder:t.$t("From Name")},model:{value:t.connection.sender_name,callback:function(e){t.$set(t.connection,"sender_name",e)},expression:"connection.sender_name"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("sender_name")}})],1),t._v(" "),n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.force_from_name,callback:function(e){t.$set(t.connection,"force_from_name",e)},expression:"connection.force_from_name"}},[t._v("\n "+t._s(t.$t("Force Sender Name"))+"\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n "+t._s(t.$t("force_sender_tooltip"))+"\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1)],1)],1),t._v(" "),"default"!=t.connection.provider?n("div",{staticClass:"fss_config_section"},[n(t.connection.provider,{tag:"component",attrs:{errors:t.errors,connection:t.connection,provider:t.providers[t.connection.provider]}})],1):t._e(),t._v(" "),t.providers[t.connection.provider].note?n("p",{staticStyle:{padding:"20px 0px"},domProps:{innerHTML:t._s(t.providers[t.connection.provider].note)}}):t._e(),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],attrs:{type:"success"},on:{click:function(e){return t.saveConnectionSettings()}}},[t._v(t._s(t.$t("Save Connection Settings")))])]:n("div",[n("h3",{staticStyle:{"text-align":"center"}},[t._v(t._s(t.$t("save_connection_error_1")))])]),t._v(" "),t.saving?n("p",[t._v(t._s(t.$t("Validating Data.Please wait")))]):t._e(),t._v(" "),t.has_error?n("el-alert",{staticStyle:{"margin-top":"20px"},attrs:{type:"error"}},[t._v(t._s(t.$t("save_connection_error_2")))]):t._e()],2)],1)}),[],!1,null,null,null).exports;const T={extends:window.VueChartJs.Bar,mixins:[window.VueChartJs.mixins.reactiveProp],props:["stats","maxCumulativeValue"],data:function(){return{options:{responsive:!0,maintainAspectRatio:!1,scales:{yAxes:[{id:"byDate",type:"linear",position:"left",gridLines:{drawOnChartArea:!1},ticks:{beginAtZero:!0,userCallback:function(t,e,n){if(Math.floor(t)===t)return t}}},{id:"byCumulative",type:"linear",position:"right",gridLines:{drawOnChartArea:!0},ticks:{beginAtZero:!0,userCallback:function(t,e,n){if(Math.floor(t)===t)return t}}}],xAxes:[{gridLines:{drawOnChartArea:!1},ticks:{beginAtZero:!0,autoSkip:!0,maxTicksLimit:10}}]},drawBorder:!1,layout:{padding:{left:0,right:0,top:0,bottom:20}}}}},methods:{},mounted:function(){this.renderChart(this.chartData,this.options)}};var L=n(6073),I=n.n(L);const F={name:"email-sendings",props:["date_range"],components:{GrowthChart:T},data:function(){return{fetching:!1,stats:{},chartData:{},maxCumulativeValue:0}},computed:{},methods:{fetchReport:function(){var t=this;this.fetching=!0,this.$get("sending_stats",{date_range:this.date_range}).then((function(e){t.stats=e.stats,t.setupChartItems()})).fail((function(t){console.log(t)})).always((function(){t.fetching=!1}))},setupChartItems:function(){var t=[],e={label:this.$t("By Date"),yAxisID:"byDate",backgroundColor:"rgba(81, 52, 178, 0.5)",borderColor:"#b175eb",data:[],fill:!1,gridLines:{display:!1}},n={label:"Cumulative",backgroundColor:"rgba(55, 162, 235, 0.1)",borderColor:"#37a2eb",data:[],yAxisID:"byCumulative",type:"line"},r=0;I()(this.stats,(function(o,s){e.data.push(o),t.push(s),r+=parseInt(o),n.data.push(r)})),this.maxCumulativeValue=r+10,this.chartData={labels:t,datasets:[e,n]}}},mounted:function(){this.fetchReport()}};const M=(0,o.Z)(F,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.fetching,expression:"fetching"}],staticClass:"fss_body fss_chart_box"},[n("growth-chart",{attrs:{maxCumulativeValue:t.maxCumulativeValue,"chart-data":t.chartData}})],1)}),[],!1,null,null,null).exports;const N={name:"SubscriberForm",data:function(){return{formData:{email:window.FluentMailAdmin.user_email,display_name:window.FluentMailAdmin.user_display_name},share_details:"no",saving:!1,subscribed:!1}},methods:{subscribeToEmail:function(){var t=this;if(!this.formData.email)return this.$notify.error("Please Provide an email"),!1;this.saving=!0,this.$post("settings/subscribe",{email:this.formData.email,display_name:this.formData.display_name,share_essentials:this.share_details}).then((function(e){t.subscribed=!0,setTimeout((function(){t.appVars.require_optin="no"}),15e3),t.$notify.success(e.data.message)})).catch((function(e){t.$notify.error(e.responseJSON.data.message)})).always((function(){t.saving=!1}))}}};const D=(0,o.Z)(N,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fst_subscribe_form"},[t.subscribed?n("div",{staticStyle:{"text-align":"center"}},[n("p",[t._v("Awesome! Please check your email inbox and confirm your subscription.")])]):[n("p",{staticStyle:{"margin-top":"0"}},[t._v("\n Subscribe with your email to know about this plugin updates, releases and useful tips.\n ")]),t._v(" "),n("div",{staticClass:"fsmtp_subscribe"},[n("el-form",{attrs:{"label-position":"right","label-width":"100px"}},[n("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"Your Name"}},[n("el-input",{attrs:{size:"small",placeholder:"Your Name"},model:{value:t.formData.display_name,callback:function(e){t.$set(t.formData,"display_name",e)},expression:"formData.display_name"}})],1),t._v(" "),n("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"Your Email"}},[n("el-input",{attrs:{size:"small",placeholder:"Your Email Address"},model:{value:t.formData.email,callback:function(e){t.$set(t.formData,"email",e)},expression:"formData.email"}})],1)],1),t._v(" "),n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.share_details,callback:function(e){t.share_details=e},expression:"share_details"}},[t._v("\n (Optional) Share Non-Sensitive Data. It will help us to improve the integrations\n "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"Access Data: Active SMTP Connection Provider, installed plugin names, php & mysql version",placement:"top-end"}},[n("i",{staticClass:"el-icon el-icon-info"})])],1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],staticStyle:{"margin-top":"10px"},attrs:{disabled:t.saving,type:"success",size:"small"},on:{click:function(e){return t.subscribeToEmail()}}},[t._v("\n Subscribe To Updates\n ")])],1)]],2)}),[],!1,null,null,null).exports;const V={name:"SubscribeDismiss",methods:{dismiss:function(){var t=this;this.$post("settings/subscribe-dismiss").then((function(e){t.appVars.require_optin="no"})).catch((function(e){t.$notify.error(e.responseJSON.data.message)}))}}};const B={name:"Dashboard",components:{ConnectionWizard:j,EmailsChart:M,EmailSubscriber:D,SubscribeDismiss:(0,o.Z)(V,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",{staticClass:"el-icon el-icon-close",on:{click:function(e){return t.dismiss()}}})}),[],!1,null,null,null).exports},data:function(){return{stats:{},new_connection:{},settings_stat:{},date_range:"",showing_chart:!0,pickerOptions:{disabledDate:function(t){return t>new Date},shortcuts:[{text:this.$t("Last week"),onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-6048e5),t.$emit("pick",[n,e])}},{text:this.$t("Last month"),onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-2592e6),t.$emit("pick",[n,e])}},{text:this.$t("Last 3 months"),onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-7776e6),t.$emit("pick",[n,e])}}]},loading:!0,skip_recommended:!1}},computed:{is_new:function(){return e()(this.settings.connections)},recommended:function(){return!!this.is_new&&this.appVars.recommended}},methods:{fetch:function(){var t=this;this.loading=!0,this.$get("/").then((function(e){t.stats=e.stats,t.settings_stat=e.settings_stat})).fail((function(t){console.log(t)})).always((function(){t.loading=!1}))},filterReport:function(){var t=this;this.showing_chart=!1,this.$nextTick((function(){t.showing_chart=!0}))},setRecommendation:function(){this.new_connection=JSON.parse(JSON.stringify(this.recommended.settings)),this.skip_recommended=!0}},created:function(){this.fetch()}};const z=(0,o.Z)(B,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dashboard"},[t.is_new?n("div",{staticClass:"content"},[n("div",{staticClass:"fss_connection_intro"},[n("div",{staticClass:"fss_intro"},[n("h1",[t._v(t._s(t.$t("wizard_title")))]),t._v(" "),n("p",[t._v(t._s(t.$t("wizard_sub")))])]),t._v(" "),t.recommended&&!t.skip_recommended?n("div",{staticClass:"fsmtp_recommened"},[n("h2",[t._v(t._s(t.recommended.title))]),t._v(" "),n("p",[t._v(t._s(t.recommended.subtitle))]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.setRecommendation()}}},[t._v(t._s(t.recommended.button_text))]),t._v(" "),n("el-button",{attrs:{type:"info"},on:{click:function(e){t.skip_recommended=!0}}},[t._v("Skip")])],1):[n("h2",[t._v(t._s(t.$t("wizard_instruction")))]),t._v(" "),n("connection-wizard",{attrs:{connection:t.new_connection,is_new:!0,connection_key:!1,providers:t.settings.providers}})]],2)]):n("div",[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{sm:24,md:16}},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.$t("Sending Stats"))+"\n "),n("span",{staticClass:"fss_to_right"},[n("el-date-picker",{attrs:{size:"small",type:"daterange","picker-options":t.pickerOptions,"range-separator":"To","start-placeholder":"Start date","end-placeholder":"End date","value-format":"yyyy-MM-dd"},model:{value:t.date_range,callback:function(e){t.date_range=e},expression:"date_range"}}),t._v(" "),n("el-button",{attrs:{size:"small",type:"primary",plain:""},on:{click:t.filterReport}},[t._v("Apply")])],1)]),t._v(" "),n("div",{staticClass:"content"},[t.showing_chart?n("emails-chart",{attrs:{date_range:t.date_range}}):t._e()],1)]),t._v(" "),n("el-col",{attrs:{sm:24,md:8}},[n("div",{staticClass:"fsm_card"},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.$t("Quick Overview"))+"\n ")]),t._v(" "),t.loading?n("el-skeleton",{staticClass:"content",attrs:{rows:8}}):n("div",{staticClass:"content"},[n("ul",{staticClass:"fss_dash_lists"},["yes"==t.settings_stat.log_enabled?n("li",[t._v("\n "+t._s(t.$t("Total Email Sent (Logged):"))+" "),n("span",[t._v(t._s(t.stats.sent))])]):t._e(),t._v(" "),t.stats.failed>0?n("li",{staticStyle:{color:"red"}},[n("router-link",{staticStyle:{color:"red"},attrs:{to:{name:"logs",query:{filterBy:"status",filterValue:"failed"}}}},[t._v("\n "+t._s(t.$t("Email Failed:"))+" "),n("span",[t._v(t._s(t.stats.failed))])])],1):t._e(),t._v(" "),n("li",[t._v("\n "+t._s(t.$t("Active Connections:"))+" "),n("span",[t._v(t._s(t.settings_stat.connection_counts))])]),t._v(" "),n("li",[t._v("\n "+t._s(t.$t("Active Senders:"))+" "),n("span",[t._v(t._s(t.settings_stat.active_senders))])]),t._v(" "),n("li",[t._v("\n "+t._s(t.$t("Save Email Logs:"))+"\n "),n("span",{staticStyle:{"text-transform":"capitalize"}},[t._v("\n "+t._s(t.settings_stat.log_enabled)+"\n ")])]),t._v(" "),"yes"==t.settings_stat.log_enabled?n("li",[t._v("\n "+t._s(t.$t("Delete Logs:"))+"\n "),n("span",[t._v("After "+t._s(t.settings_stat.auto_delete_days)+" "+t._s(t.$t("Days")))])]):t._e()])])],1),t._v(" "),"yes"==t.appVars.require_optin&&t.stats.sent>9?n("div",{staticClass:"fsm_card",staticStyle:{"margin-top":"20px"}},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.$t("Subscribe To Updates"))+"\n "),n("span",{staticClass:"header_action_right"},[n("subscribe-dismiss")],1)]),t._v(" "),n("div",{staticClass:"content"},[n("email-subscriber")],1)]):t._e()])],1)],1)])}),[],!1,null,null,null).exports;var R=n(7757),q=n.n(R);const K={name:"Confirm",props:{placement:{default:"top-end"},message:{default:"Are you sure to delete this?"}},data:function(){return{visible:!1}},methods:{hide:function(){this.visible=!1},confirm:function(){this.hide(),this.$emit("yes")},cancel:function(){this.hide(),this.$emit("no")}}};const U=(0,o.Z)(K,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-popover",{attrs:{width:"170",placement:t.placement},on:{hide:t.cancel},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[n("p",{domProps:{innerHTML:t._s(t.message)}}),t._v(" "),n("div",{staticClass:"action-buttons"},[n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){return t.cancel()}}},[t._v("\n "+t._s(t.$t("cancel"))+"\n ")]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.confirm()}}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1),t._v(" "),n("template",{slot:"reference"},[t._t("reference",(function(){return[n("i",{staticClass:"el-icon-delete"})]}))],2)],2)}),[],!1,null,null,null).exports;const G={name:"FluentMailGeneralSettings",data:function(){return{saving:!1,logging_days:{7:"After 7 Days",14:"After 14 Days",30:"After 30 Days",60:"After 60 Days",90:"After 90 Days",180:"After 6 Months",365:"After 1 Year",730:"After 2 Years"}}},computed:{connectionsCount:function(){return Object.keys(this.settings.connections).length}},methods:{saveMiscSettings:function(){var t=this;this.saving=!0,this.$post("misc-settings",{settings:this.settings.misc}).then((function(e){t.$notify.success(e.data.message)})).fail((function(t){console.log(t)})).always((function(){t.saving=!1}))}}};const W=(0,o.Z)(G,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fss_general_settings"},[n("el-form",{staticClass:"fss_compact_form",attrs:{data:t.settings.misc,"label-position":"top"}},[n("el-form-item",{attrs:{label:"Log Emails"}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.settings.misc.log_emails,callback:function(e){t.$set(t.settings.misc,"log_emails",e)},expression:"settings.misc.log_emails"}},[t._v(t._s(t.$t("Log All Emails for Reporting")))])],1),t._v(" "),"yes"==t.settings.misc.log_emails&&t.appVars.has_fluentcrm?n("el-form-item",{attrs:{label:t.$t("FluentCRM Email Logging")}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.settings.misc.disable_fluentcrm_logs,callback:function(e){t.$set(t.settings.misc,"disable_fluentcrm_logs",e)},expression:"settings.misc.disable_fluentcrm_logs"}},[t._v(t._s(t.$t("Disable Logging for FluentCRM Emails")))])],1):t._e(),t._v(" "),"yes"==t.settings.misc.log_emails?n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$t("Delete Logs"))+"\n "),n("el-popover",{attrs:{width:"400",trigger:"hover"}},[n("p",[t._v(t._s(t.$t("delete_logs_info")))]),t._v(" "),n("i",{staticClass:"el-icon el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),t._v(" "),n("el-select",{model:{value:t.settings.misc.log_saved_interval_days,callback:function(e){t.$set(t.settings.misc,"log_saved_interval_days",e)},expression:"settings.misc.log_saved_interval_days"}},t._l(t.logging_days,(function(t,e){return n("el-option",{key:e,attrs:{value:e,label:t}})})),1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$t("Default Connection"))+"\n "),n("el-popover",{attrs:{width:"400",trigger:"hover"}},[n("p",[t._v(t._s(t.$t("default_connection_popover")))]),t._v(" "),n("i",{staticClass:"el-icon el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),t._v(" "),n("el-select",{model:{value:t.settings.misc.default_connection,callback:function(e){t.$set(t.settings.misc,"default_connection",e)},expression:"settings.misc.default_connection"}},t._l(t.settings.connections,(function(e,r){return n("el-option",{key:r,attrs:{value:r,disabled:t.settings.misc.fallback_connection==r,label:e.title+" - "+e.provider_settings.sender_email}})})),1)],1),t._v(" "),n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n Fallback Connection\n "),n("el-popover",{attrs:{width:"400",trigger:"hover"}},[n("p",[t._v(t._s(t.$t("fallback_connection_popover")))]),t._v(" "),n("i",{staticClass:"el-icon el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),t._v(" "),t.connectionsCount>1?n("el-select",{attrs:{clearable:""},model:{value:t.settings.misc.fallback_connection,callback:function(e){t.$set(t.settings.misc,"fallback_connection",e)},expression:"settings.misc.fallback_connection"}},t._l(t.settings.connections,(function(e,r){return n("el-option",{key:r,attrs:{disabled:t.settings.misc.default_connection==r,value:r,label:e.title+" - "+e.provider_settings.sender_email}})})),1):n("p",{staticStyle:{color:"#6d6b6b",margin:"0"}},[t._v(t._s(t.$t("Please add another connection to use fallback feature")))])],1),t._v(" "),n("el-form-item",{attrs:{label:t.$t("Email Simulation")}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.settings.misc.simulate_emails,callback:function(e){t.$set(t.settings.misc,"simulate_emails",e)},expression:"settings.misc.simulate_emails"}},[t._v(t._s(t.$t("Email_Simulation_Label")))]),t._v(" "),"yes"==t.settings.misc.simulate_emails?n("p",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("Email_Simulation_Yes")))]):t._e()],1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],attrs:{type:"success"},on:{click:function(e){return t.saveMiscSettings()}}},[t._v(t._s(t.$t("Save Settings")))])],1)],1)}),[],!1,null,null,null).exports;const Z={name:"NotificationSettings",data:function(){return{notification_settings:{},loading:!0,saving:!1,sending_days:{Mon:"Monday",Tue:"Tuesday",Wed:"Wednesday",Thu:"Thursday",Fri:"Friday",Sat:"Saturday",Sun:"Sunday"}}},methods:{getSettings:function(){var t=this;this.loading=!0,this.$get("settings/notification-settings").then((function(e){t.notification_settings=e.data.settings})).catch((function(t){console.log(t)})).always((function(){t.loading=!1}))},saveSettings:function(){var t=this;this.saving=!0,this.$post("settings/notification-settings",{settings:this.notification_settings}).then((function(e){t.$notify.success(e.data.message)})).catch((function(t){console.log(t)})).always((function(){t.saving=!1}))}},mounted:function(){this.getSettings()}};const H=(0,o.Z)(Z,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"fss_general_settings"},[n("el-form",{staticClass:"fss_compact_form",attrs:{data:t.notification_settings,"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$t("Enable Email Summary Notification")}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.notification_settings.enabled,callback:function(e){t.$set(t.notification_settings,"enabled",e)},expression:"notification_settings.enabled"}},[t._v(t._s(t.$t("Enable Email Summary")))])],1),t._v(" "),"yes"==t.notification_settings.enabled?[n("el-form-item",{attrs:{label:t.$t("Notification Email Addresses")}},[n("el-input",{attrs:{size:"small",placeholder:t.$t("Email Address")},model:{value:t.notification_settings.notify_email,callback:function(e){t.$set(t.notification_settings,"notify_email",e)},expression:"notification_settings.notify_email"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$t("Notification Days")}},[n("el-checkbox-group",{model:{value:t.notification_settings.notify_days,callback:function(e){t.$set(t.notification_settings,"notify_days",e)},expression:"notification_settings.notify_days"}},t._l(t.sending_days,(function(t,e){return n("el-checkbox",{key:t,attrs:{value:t,label:e}})})),1)],1)]:t._e(),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],attrs:{type:"success"},on:{click:function(e){return t.saveSettings()}}},[t._v(t._s(t.$t("Save Settings")))])],2)],1)}),[],!1,null,null,null).exports;function Y(t,e,n,r,o,s,i){try{var a=t[s](i),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,o)}const J={name:"connection_details",props:["connection_id"],data:function(){return{loading:!1,connection_content:""}},methods:{fetchDetails:function(){var t,e=this;return(t=q().mark((function t(){var n;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$get("settings/connection_info",{connection_id:e.connection_id});case 3:n=t.sent,e.connection_content=n.data.info,e.loading=!1;case 6:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var s=t.apply(e,n);function i(t){Y(s,r,o,i,a,"next",t)}function a(t){Y(s,r,o,i,a,"throw",t)}i(void 0)}))})()}},created:function(){this.fetchDetails()}};function Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function X(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tt(t,e,n,r,o,s,i){try{var a=t[s](i),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,o)}function et(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var s=t.apply(e,n);function i(t){tt(s,r,o,i,a,"next",t)}function a(t){tt(s,r,o,i,a,"throw",t)}i(void 0)}))}}const nt={name:"Connections",components:{Confirm:U,GeneralSettings:W,ConnectionDetails:(0,o.Z)(J,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"fss_connection_details",staticStyle:{"min-height":"200px"},attrs:{"element-loading-text":"Loading Details..."}},[n("div",{domProps:{innerHTML:t._s(t.connection_content)}})])}),[],!1,null,null,null).exports,NotificationSettings:H},data:function(){return{showing_connection:"",active_settings:"general"}},methods:{fetch:function(){var t=this;return et(q().mark((function n(){var r;return q().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.$get("settings");case 2:r=n.sent,t.settings.mappings=r.data.settings.mappings,t.settings.connections=r.data.settings.connections,e()(t.settings.connections)&&t.$router.push({name:"dashboard",query:{is_redirect:"yes"}});case 6:case"end":return n.stop()}}),n)})))()},addConnection:function(){this.$router.push({name:"connection"})},editConnection:function(t){this.$router.push({name:"connection",query:{connection_key:t.unique_key}})},deleteConnection:function(t){var e=this;return et(q().mark((function n(){var r;return q().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.$post("settings/delete",{key:t.unique_key});case 2:r=n.sent,e.settings.connections=r.data.connections,e.settings.misc.default_connection=r.data.misc.default_connection,e.$notify.success({title:"Great!",message:"Connection deleted Successfully.",offset:19});case 6:case"end":return n.stop()}}),n)})))()},showConnection:function(t){var e=this;this.showing_connection="",this.$nextTick((function(){e.showing_connection=t.unique_key}))}},computed:{connections:function(){var t=[];return jQuery.each(this.settings.connections,(function(e,n){t.push(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){X(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({unique_key:e,title:n.title},n.provider_settings))})),t}},created:function(){this.fetch()}};const rt=(0,o.Z)(nt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"connections"},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("div",{staticClass:"fss_content_box"},[n("div",{staticClass:"header"},[n("span",{staticStyle:{float:"left"}},[t._v("\n "+t._s(t.$t("Active Email Connections"))+"\n ")]),t._v(" "),n("span",{staticStyle:{float:"right",color:"#46A0FC",cursor:"pointer"},on:{click:t.addConnection}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "+t._s(t.$t("Add Another Connection"))+"\n ")])]),t._v(" "),n("div",{staticClass:"content"},[n("el-table",{attrs:{stripe:"",border:"",data:t.connections}},[n("el-table-column",{attrs:{label:t.$t("Provider")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.settings.providers[e.row.provider].title)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"sender_email",label:t.$t("From Email")}}),t._v(" "),n("el-table-column",{attrs:{width:"120",label:t.$t("Actions"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-edit"},on:{click:function(n){return t.editConnection(e.row)}}}),t._v(" "),n("el-button",{attrs:{type:"info",size:"mini",icon:"el-icon-view"},on:{click:function(n){return t.showConnection(e.row)}}}),t._v(" "),n("confirm",{on:{yes:function(n){return t.deleteConnection(e.row)}}},[n("el-button",{attrs:{slot:"reference",size:"mini",type:"danger",icon:"el-icon-delete"},slot:"reference"})],1)]}}])})],1),t._v(" "),t.connections.length>1?n("el-alert",{staticStyle:{"margin-top":"20px"},attrs:{closable:!1,type:"info"}},[t._v("\n "+t._s(t.$t("routing_info"))+"\n ")]):t._e()],1)]),t._v(" "),t.showing_connection?n("div",{staticClass:"fss_content_box"},[n("div",{staticClass:"header"},[n("span",{staticStyle:{float:"left"}},[t._v("\n "+t._s(t.$t("Connection Details"))+"\n ")]),t._v(" "),n("span",{staticStyle:{float:"right",color:"#46A0FC",cursor:"pointer"},on:{click:function(e){t.showing_connection=""}}},[t._v("\n "+t._s(t.$t("Close"))+"\n ")])]),t._v(" "),n("div",{staticClass:"content"},[n("connection-details",{attrs:{connection_id:t.showing_connection}})],1)]):t._e()]),t._v(" "),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"fss_content_box fss_box_action",class:{fss_box_active:"general"==t.active_settings},staticStyle:{"margin-bottom":"0px"}},[n("div",{staticClass:"header",on:{click:function(e){t.active_settings="general"}}},[t._v("\n "+t._s(t.$t("General Settings"))+"\n ")]),t._v(" "),"general"==t.active_settings?n("div",{staticClass:"content"},[n("general-settings")],1):t._e()]),t._v(" "),n("div",{staticClass:"fss_content_box fss_box_action",class:{fss_box_active:"notification"==t.active_settings}},[n("div",{staticClass:"header",on:{click:function(e){t.active_settings="notification"}}},[t._v("\n "+t._s(t.$t("Notification Settings"))+"\n ")]),t._v(" "),"notification"==t.active_settings?n("div",{staticClass:"content"},[n("notification-settings")],1):t._e()])])],1)],1)}),[],!1,null,null,null).exports;const ot={name:"Connection",components:{ConnectionWizard:j},data:function(){return{active:1,title:"Add Connection",provider:{},provider_key:""}},methods:{},created:function(){var t=this.$route.query.connection_key;t&&"0"!==t&&(this.title=this.$t("Edit Connection"),this.provider=this.settings.connections[t].provider_settings,this.provider_key=t)}};const st=(0,o.Z)(ot,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"connection"},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),n("div",{staticClass:"content"},[n("div",{staticClass:"fss_connection_intro"},[n("connection-wizard",{attrs:{connection:t.provider,connection_key:t.provider_key,providers:t.settings.providers}})],1)])])}),[],!1,null,null,null).exports;const it={name:"Pagination",props:{pagination:{required:!0,type:Object}},computed:{page_sizes:function(){return[10,20,50,80,100,120,150]}},methods:{changePage:function(t){this.pagination.current_page=t,this.$emit("fetch")},changeSize:function(t){this.pagination.per_page=t,this.$emit("fetch")}}};const at=(0,o.Z)(it,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("el-pagination",{staticClass:"fluentcrm-pagination",attrs:{background:!1,layout:"total, sizes, prev, pager, next","hide-on-single-page":!1,"current-page":t.pagination.current_page,"page-sizes":t.page_sizes,"page-size":t.pagination.per_page,total:t.pagination.total},on:{"current-change":t.changePage,"size-change":t.changeSize,"update:currentPage":function(e){return t.$set(t.pagination,"current_page",e)},"update:current-page":function(e){return t.$set(t.pagination,"current_page",e)}}})}),[],!1,null,null,null).exports;const lt={name:"LogFilter",data:function(){return{filterBy:"",filterValue:""}},methods:{applyFilter:function(){this.filterValue&&this.$emit("on-filter",this.filterBy,this.filterValue)},clearFilterValue:function(){this.filterValue=""}},watch:{filterBy:function(t,e){t!==e&&t&&e&&(this.filterValue="")},filterValue:function(t,e){t?this.$emit("on-filter-change",this.filterBy,this.filterValue):(this.$emit("reset-page"),this.$emit("on-filter",this.filterBy,this.filterValue)),t!==e&&this.$emit("reset-page")}},mounted:function(){var t=this.$route.query.filterBy,e=this.$route.query.filterValue;t&&(this.filterBy=t,this.filterValue=e,this.applyFilter())}};const ct=(0,o.Z)(lt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{float:"left","margin-left":"10px"}},[n("el-row",{staticStyle:{"margin-right":"-20px"},attrs:{gutter:10}},[n("el-col",{attrs:{span:10}},[n("el-select",{attrs:{clearable:"",size:"small",placeholder:t.$t("Filter By")},on:{clear:t.clearFilterValue},model:{value:t.filterBy,callback:function(e){t.filterBy=e},expression:"filterBy"}},[n("el-option",{attrs:{label:t.$t("Status"),value:"status"}}),t._v(" "),n("el-option",{attrs:{label:t.$t("Date"),value:"date"}}),t._v(" "),n("el-option",{attrs:{label:t.$t("Date Range"),value:"daterange"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:10}},[t.filterBy&&"status"!==t.filterBy?t._e():n("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",size:"small",disabled:!t.filterBy,placeholder:t.$t("Select")},model:{value:t.filterValue,callback:function(e){t.filterValue=e},expression:"filterValue"}},[n("el-option",{attrs:{label:t.$t("Successful"),value:"sent"}}),t._v(" "),n("el-option",{attrs:{label:t.$t("Failed"),value:"failed"}})],1),t._v(" "),n("el-date-picker",{directives:[{name:"show",rawName:"v-show",value:t.filterBy&&"date"===t.filterBy,expression:"filterBy && filterBy==='date'"}],staticStyle:{width:"100%"},attrs:{format:"dd-MM-yyyy","value-format":"yyyy-MM-dd",size:"small",type:"date",placeholder:t.$t("Select date")},model:{value:t.filterValue,callback:function(e){t.filterValue=e},expression:"filterValue"}}),t._v(" "),n("el-date-picker",{directives:[{name:"show",rawName:"v-show",value:t.filterBy&&"daterange"===t.filterBy,expression:"filterBy && filterBy==='daterange'"}],staticStyle:{width:"100%"},attrs:{format:"dd-MM-yyyy","value-format":"yyyy-MM-dd",size:"small",type:"daterange",placeholder:t.$t("Select date and time"),"range-separator":"To","start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date")},model:{value:t.filterValue,callback:function(e){t.filterValue=e},expression:"filterValue"}})],1),t._v(" "),n("el-col",{attrs:{span:4}},[n("el-button",{attrs:{plain:"",size:"small",type:"primary",disabled:!t.filterValue},on:{click:t.applyFilter}},[t._v(t._s(t.$t("Filter")))])],1)],1)],1)}),[],!1,null,null,null).exports;const ut={name:"EmailbodyContainer",props:["content"],data:function(){return{}},methods:{setBody:function(t){var e=this;this.$nextTick((function(){var n=e.$refs.ifr;(n.contentDocument||n.contentWindow.document).body.innerHTML=t}))},onMouseOver:function(){this.$refs.fullscreen.classList.add("show")},onMouseOut:function(){this.$refs.fullscreen.classList.remove("show")},fullScreen:function(){var t=document,e=this.$refs.ifr;(t.fullscreenEnabled||t.webkitFullscreenEnabled||t.mozFullScreenEnabled||t.msFullscreenEnabled)&&(e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen())}},watch:{content:{immediate:!0,handler:"setBody"}}};function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const _t={name:"LogViewer",props:["logViewerProps"],components:{EmailbodyContainer:(0,o.Z)(ut,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{on:{mouseover:t.onMouseOver,mouseleave:t.onMouseOut}},[n("span",{ref:"fullscreen",staticClass:"full-screen-text",on:{click:t.fullScreen}},[t._v("\n "+t._s(t.$t("Enter Full Screen"))+"\n ")]),t._v(" "),n("iframe",{ref:"ifr",staticStyle:{width:"100%",height:"400px"},attrs:{frameborder:"0",allowFullScreen:"",mozallowfullscreen:"",webkitallowfullscreen:""}})])}),[],!1,null,null,null).exports},data:function(){return{activeName:"email_body",loading:!1,next:!1,prev:!1,retrying:!1}},methods:{navigate:function(t){var e=this,n={dir:t,id:this.log.id,query:this.logViewerProps.query,filter_by:this.logViewerProps.filterBy,filter_by_value:this.logViewerProps.filterByValue};this.loading=!0,this.$get("logs/show",n).then((function(n){if(!t)return e.next=n.data.next.length,void(e.prev=n.data.prev.length);e.logViewerProps.log=n.data.log,e.next=n.data.next,e.prev=n.data.prev})).fail((function(t){console.log(t)})).always((function(){e.loading=!1}))},getAttachments:function(t){if(!t)return[];if(!t.attachments)return[];if(!Array.isArray(t.attachments))return[t.attachments];var e=[];return t.attachments.forEach((function(t,n){e[n]=t})),e},closed:function(){this.next=!0,this.prev=!0,this.activeName="email_body"},getAttachmentName:function(t){if(t&&t[0])return(t=t[0].replace(/\\/g,"/")).split("/").pop()},handleRetry:function(t,e){var n=this;this.retrying=!0,this.$post("logs/retry",{id:t.id,type:e}).then((function(t){n.logViewerProps.retries=t.data.email.retries,n.logViewerProps.log.status=t.data.email.status,n.logViewerProps.log.updated_at=t.data.email.updated_at,n.logViewerProps.log.resent_count=t.data.email.resent_count})).fail((function(t){n.$notify.error({offset:19,title:"Oops!!",message:t.responseJSON.data.message})})).always((function(){n.retrying=!1}))}},computed:{log:{get:function(){var t;return this.logViewerProps.log&&((t=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){ft(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.logViewerProps.log)).headers||(t.headers={}),t.response||(t.response={}),t.extra||(t.extra={})),t},set:function(t){this.logViewerProps.log=t}}}};const dt={name:"BulkAction",props:["selected","haslogs"],data:function(){return{action:"",resending:!1}},computed:{is_failed_selected:function(){return!!this.selected.length}},methods:{applyBulkAction:function(){this.$emit("on-bulk-action",{action:this.action}),this.action=""}},watch:{selected:function(t){"deleteselected"===this.action&&(this.action=t.length?this.action:"")}}};const vt={name:"EmailLog",components:{Confirm:U,Pagination:at,LogFilter:ct,LogViewer:(0,o.Z)(_t,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"log-viewer"},[t.log?n("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.retrying,expression:"retrying"}],attrs:{title:"Email Log",visible:t.logViewerProps.dialogVisible},on:{closed:t.closed,"update:visible":function(e){return t.$set(t.logViewerProps,"dialogVisible",e)}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[n("ul",{staticClass:"fss_log_items"},[n("li",[n("div",{staticClass:"item_header"},[t._v("Status:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{class:{success:"sent"==t.log.status,resent:"resent"==t.log.status,fail:"failed"==t.log.status}},[n("span",{staticStyle:{"text-transform":"capitalize","margin-right":"10px"}},[t._v(t._s(t.log.status))]),t._v(" "),"failed"==t.log.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh",plain:!0},on:{click:function(e){return t.handleRetry(t.log,"retry")}}},[t._v(t._s(t.$t("Retry")))]):t._e(),t._v(" "),"sent"==t.log.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh-right"},on:{click:function(e){return t.handleRetry(t.log,"resend")}}},[t._v("\n "+t._s(t.$t("Resend"))+"\n ")]):t._e()],1)])]),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v(t._s(t.$t("Date-Time"))+":")]),t._v(" "),n("div",{staticClass:"item_content"},[t._v(t._s(t.log.created_at))])]),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v("From:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.from)}})])]),t._v(" "),t.log.headers&&t.log.headers["Reply-To"]?n("li",[n("div",{staticClass:"item_header"},[t._v("Reply To:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.headers["Reply-To"])}})])]):t._e(),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v("To:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.to)}})])]),t._v(" "),t.log.headers?[t.log.headers.Cc?n("li",[n("div",{staticClass:"item_header"},[t._v("CC:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.headers.Cc)}})])]):t._e(),t._v(" "),t.log.headers.Bcc?n("li",[n("div",{staticClass:"item_header"},[t._v("BCC:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.headers.Bcc)}})])]):t._e()]:t._e(),t._v(" "),t.log.resent_count>0?n("li",[n("div",{staticClass:"item_header"},[t._v(t._s(t.$t("Resent Count"))+":")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.resent_count)}})])]):t._e(),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v(t._s(t.$t("Subject"))+":")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.subject)}})])]),t._v(" "),t.log.extra&&t.log.extra.provider&&t.settings.providers[t.log.extra.provider]?n("li",[n("div",{staticClass:"item_header"},[t._v("Mailer:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",[t._v(t._s(t.settings.providers[t.log.extra.provider].title))])])]):t._e()],2),t._v(" "),n("el-collapse",{staticStyle:{"margin-top":"10px"},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-collapse-item",{attrs:{name:"email_body"}},[n("template",{slot:"title"},[n("strong",{staticStyle:{color:"#606266"}},[t._v(t._s(t.$t("Email Body")))])]),t._v(" "),n("hr",{staticClass:"log-border"}),t._v(" "),n("EmailbodyContainer",{attrs:{content:t.log.body}})],2),t._v(" "),n("el-collapse-item",{attrs:{name:"attachments"}},[n("template",{slot:"title"},[n("strong",{staticStyle:{color:"#606266"}},[t._v("\n "+t._s(t.$t("Attachments"))+" ("+t._s(t.getAttachments(t.log).length)+")\n ")])]),t._v(" "),n("hr",{staticClass:"log-border"}),t._v(" "),t._l(t.getAttachments(t.log),(function(e,r){return n("div",{key:r,staticStyle:{margin:"5px 0 10px 0"}},[t._v("\n ("+t._s(r+1)+") "+t._s(t.getAttachmentName(e))+"\n ")])}))],2),t._v(" "),n("el-collapse-item",{attrs:{name:"tech_info"}},[n("template",{slot:"title"},[n("strong",{staticStyle:{color:"#606266"}},[t._v("Technical Information")])]),t._v(" "),n("div",[n("hr"),n("strong",[t._v("Response\n ")]),n("hr"),t._v(" "),n("el-row",[n("el-col",[n("pre",[t._v(t._s(t.log.response))])])],1),t._v(" "),n("hr"),t._v(" "),n("strong",[t._v("Headers")]),n("hr"),t._v(" "),n("el-row",[n("el-col",[n("pre",{domProps:{innerHTML:t._s(Object.assign({},t.log.headers,t.log.extra.custom_headers))}})])],1)],1)],2)],1),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("el-button",{staticClass:"prev nav",attrs:{size:"small",disabled:!t.prev},on:{click:function(e){return t.navigate("prev")}}},[n("i",{staticClass:"el-icon-arrow-left"}),t._v(" "+t._s(t.$t("Prev"))+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-button",{staticClass:"next nav",attrs:{size:"small",disabled:!t.next},on:{click:function(e){return t.navigate("next")}}},[t._v("\n "+t._s(t.$t("Next"))+" "),n("i",{staticClass:"el-icon-arrow-right"})])],1)],1)],1)]):t._e()],1)}),[],!1,null,null,null).exports,LogBulkAction:(0,o.Z)(dt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{float:"left","margin-left":"10px"}},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("el-select",{attrs:{clearable:"",size:"small",tplaceholder:t.$t("Bulk Action"),disabled:!t.haslogs},model:{value:t.action,callback:function(e){t.action=e},expression:"action"}},[n("el-option",{attrs:{value:"deleteall",label:t.$t("Delete All")}}),t._v(" "),t.selected.length?n("el-option",{attrs:{value:"deleteselected",label:"Delete Selected"}}):t._e(),t._v(" "),t.is_failed_selected?n("el-option",{attrs:{value:"resend_selected",label:t.$t("Resend Selected Emails")}}):t._e()],1)],1),t._v(" "),n("el-col",{attrs:{span:2}},[n("el-button",{attrs:{plain:"",size:"small",type:"primary",disabled:!t.action},on:{click:t.applyBulkAction}},[t._v(t._s(t.$t("Apply")))])],1)],1)],1)}),[],!1,null,null,null).exports},data:function(){return{log:null,logs:[],saving:!1,loading:!1,deleting:!1,query:"",filterBy:"",filterByValue:"",logViewerProps:{log:null,dialogVisible:!1},pagination:{total:0,per_page:10,current_page:1},selectedLogs:[],form:null,logAlertInfo:null}},methods:{tableRowClassName:function(t){return"row_type_"+t.row.status},pageChanged:function(){this.$router.push({name:"logs",query:{search:this.query,filterBy:this.filterBy,filterValue:this.filterByValue,page:this.pagination.current_page,per_page:this.pagination.per_page}}).catch((function(t){"NavigationDuplicated"!==t.name&&console.log(t.message)}))},fetch:function(){var t=this;this.loading=!0;var e={per_page:this.pagination.per_page,page:this.pagination.current_page,filter_by_value:this.filterByValue,filter_by:this.filterBy,query:this.query};this.$get("logs",e).then((function(e){t.logs=t.formatLogs(e.data),t.pagination.total=e.total;var n=Number(t.$route.query.page);t.pagination.current_page=n||t.pagination.current_page})).fail((function(t){console.log(t)})).always((function(){t.loading=!1}))},formatLogs:function(t){var e=this;return jQuery.each(t,(function(n,r){t[n]=e.formatLog(r)})),t},formatLog:function(t){var e=this;t.to=this.formatAddresses(t.to),t.headers?(t.headers.cc=this.formatAddresses(t.headers.cc),t.headers.bcc=this.formatAddresses(t.headers.bcc),t.headers["reply-to"]=this.formatAddresses(t.headers["reply-to"])):t.headers={};var n={};return t.headers&&jQuery.each(t.headers,(function(t,r){t&&(t=t.split("-").map((function(t){return e.ucFirst(t)})).join("-"),n[t]=r)})),t.headers=n,t},formatAddresses:function(t){var e=this;if(!t)return"";var n=[];return jQuery.each(t,(function(t,r){r.name?n[t]=e.escapeHtml("".concat(r.name," <").concat(r.email,">")):n[t]=e.escapeHtml(r.email)})),n.join(", ")},onFilter:function(t,e){this.filterBy=t,this.filterByValue=e,this.pageChanged()},onFilterChange:function(t,e){this.filterBy=t,this.filterByValue=e},onSearch:function(t){this.query=t,this.pagination.current_page=1,this.pageChanged(),this.fetch()},onSearchChange:function(t){this.query=t,this.fetch()},handleBulkAction:function(t){var e=t.action;return"deleteall"===e?this.handleDelete("all"):"deleteselected"===e?this.handleDelete(this.selectedLogs):"resend_selected"===e?this.handleResendBulk(this.selectedLogs):void 0},handleRetry:function(t,e){var n=this;this.loading=!0,this.$post("logs/retry",{id:t.id,type:e}).then((function(e){if(!e.data.email)return n.$notify.error({offset:19,title:"Oops!!",message:e.data.message}),!1;t.status=e.data.email.status,t.retries=e.data.email.retries,t.resent_count=e.data.email.resent_count,t.updated_at=e.data.email.updated_at,n.$notify.success({offset:19,title:"Great!",message:e.data.message})})).fail((function(t){n.$notify.error({offset:19,title:"Oops!!",message:t.responseJSON.data.message})})).always((function(){n.loading=!1}))},handleView:function(t){var e=this;this.logViewerProps.log=t,this.logViewerProps.dialogVisible=!0,this.$nextTick((function(){e.logViewerProps.query=e.query,e.logViewerProps.filterBy=e.filterBy,e.logViewerProps.filterByValue=e.filterByValue;var t=e.$children.find((function(t){return"LogViewer"===t.$options._componentTag}));t&&t.navigate()}))},handleDelete:function(t){var e=this;this.deleting=!0,this.$post("logs/delete",{id:t}).then((function(t){e.fetch(),e.$notify.success({offset:19,title:"Great!",message:t.data.message})})).fail((function(t){console.log(t)})).always((function(){e.deleting=!1}))},handleSelectionChange:function(t){this.selectedLogs=t.map((function(t){return Number(t.id)}))},saveMisc:function(){var t=this;this.loading=!0,this.$post("misc-settings",{settings:this.form}).then((function(e){t.$notify.success(e.data.message)})).catch((function(t){console.log(t)})).always((function(){t.loading=!1}))},dontShowStatusInfo:function(t){"icons"===t?this.logAlertInfo.show_status_info=!1:this.logAlertInfo.show_status_warning=!1,window.localStorage.setItem("log-settings",JSON.stringify(this.logAlertInfo))},turnOnEmailLogging:function(){this.form.log_emails="yes",this.saveMisc()},handleResendBulk:function(t){var e=this;if(t.length>20)return this.$notify.error({offset:19,title:"Oops!!",message:"Sorry, You can not resend more than 20 emails at once"}),!1;this.loading=!0,this.$post("logs/retry-bulk",{log_ids:t}).then((function(t){e.$notify.success({offset:19,title:"Result",message:t.data.message}),e.selectedLogs=[],e.fetch()})).fail((function(t){e.$notify.error({offset:19,title:"Oops!!",message:t.responseJSON.data.message})})).always((function(){e.loading=!1}))}},watch:{$route:{immediate:!0,handler:function(t,e){var n=this.pagination.current_page,r=this.pagination.per_page;this.query=t.query.search||this.query,this.filterBy=t.query.filterBy||this.filterBy,this.filterBy=t.query.filterBy||this.filterBy,this.filterByValue=t.query.filterValue||this.filterByValue,this.pagination.current_page=Number(t.query.page)||n,this.pagination.per_page=Number(t.query.per_page)||r,this.fetch()}}},computed:{isLogsOn:function(){return"yes"===this.form.log_emails},emailLogs:function(){var t=this;return this.logs.map((function(e){return e.created_at=t.$dateFormat(e.created_at,"DD-MM-YYYY h:mm:ss A"),e}))},logStatusInfo:function(){return this.logAlertInfo.show_status_info},logStatusWarning:function(){return this.logAlertInfo.show_status_warning}},created:function(){var t=this.$route.query.page;t&&(this.pagination.current_page=Number(t)),this.form=this.appVars.settings.misc,this.logAlertInfo=window.localStorage.getItem("log-settings"),this.logAlertInfo||window.localStorage.setItem("log-settings",JSON.stringify({show_status_info:!0,show_status_warning:!0})),this.logAlertInfo=JSON.parse(window.localStorage.getItem("log-settings"))}};const mt=(0,o.Z)(vt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"logs"},[n("div",[n("div",{staticClass:"header"},[n("div",{staticStyle:{float:"left","margin-top":"6px"}},[t._v(t._s(t.$t("Email Logs")))]),t._v(" "),n("LogFilter",{on:{"on-filter":t.onFilter,"on-filter-change":t.onFilterChange,"reset-page":function(e){t.pagination.current_page=1}}}),t._v(" "),n("LogBulkAction",{attrs:{selected:t.selectedLogs,haslogs:t.logs.length,filterBy:t.filterBy,filterByValue:t.filterByValue},on:{"on-bulk-action":t.handleBulkAction}}),t._v(" "),n("div",{staticStyle:{float:"right"}},[n("el-input",{attrs:{clearable:"",size:"small",placeholder:t.$t("Type & press enter...")},on:{clear:function(e){t.query=""}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.fetch.apply(null,arguments)}},model:{value:t.query,callback:function(e){t.query=e},expression:"query"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.fetch},slot:"append"})],1)],1)],1),t._v(" "),t.loading?n("el-skeleton",{staticClass:"content",attrs:{rows:15}}):n("div",{staticClass:"content"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{stripe:"",data:t.emailLogs,"row-class-name":t.tableRowClassName},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("Subject")},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[t._v(t._s(e.row.subject))])]}}],null,!1,3588226669)}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("To")},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",{domProps:{innerHTML:t._s(e.row.to)}})]}}],null,!1,521936248)}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("Status"),width:"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.status)+"\n ")]}}],null,!1,1326110409)}),t._v(" "),n("el-table-column",{attrs:{prop:"created_at",label:t.$t("Date-Time"),width:"200px"}}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("Actions"),width:"190px",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return["failed"==e.row.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh",plain:!0},on:{click:function(n){return t.handleRetry(e.row,"retry")}}},[t._v(t._s(t.$t("Retry")))]):t._e(),t._v(" "),"sent"==e.row.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh-right"},on:{click:function(n){return t.handleRetry(e.row,"resend")}}},[t._v("\n "+t._s(t.$t("Resend"))+"\n "),e.row.resent_count>0?n("span",[t._v("("+t._s(e.row.resent_count)+")")]):t._e()]):t._e(),t._v(" "),n("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-view"},on:{click:function(n){return t.handleView(e.row)}}}),t._v(" "),n("confirm",{on:{yes:function(n){return t.handleDelete(e.row.id)}}},[n("el-button",{attrs:{slot:"reference",size:"mini",type:"danger",icon:"el-icon-delete"},slot:"reference"})],1)]}}],null,!1,1438621537)})],1),t._v(" "),n("div",{staticStyle:{"margin-top":"20px","text-align":"right"}},[n("pagination",{attrs:{pagination:t.pagination},on:{fetch:t.pageChanged}})],1)],1),t._v(" "),n("LogViewer",{attrs:{logViewerProps:t.logViewerProps}})],1),t._v(" "),t.isLogsOn?t._e():n("div",[n("div",{staticClass:"content"},[n("el-alert",{attrs:{closable:!1,"show-icon":"",center:""}},[t._v("\n Email Logging is currently turned off. Only Failed and resent emails will be shown here\n "),n("el-button",{attrs:{type:"text"},on:{click:t.turnOnEmailLogging}},[t._v(t._s(t.$t("Turn On")))]),t._v(".\n ")],1)],1)])])}),[],!1,null,null,null).exports;function ht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function gt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const yt={name:"EmailTest",components:{EmailSubscriber:D},data:function(){return{loading:!1,debug_info:"",form:{from:"",email:"",isHtml:!0},email_success:!1}},methods:{sendEmail:function(){var t=this;this.loading=!0,this.debug_info="",this.$post("settings/test",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(n),!0).forEach((function(e){gt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.form)).then((function(e){t.$notify.success({title:"Great!",offset:19,message:e.data.message}),t.email_success=!0})).fail((function(e){if(504===Number(e.status))return t.$notify.error({title:"Oops!",offset:19,message:"504 Gateway Time-out."});var n=e.responseJSON;if(n.data.email_error)return t.$notify.error({title:"Oops!",offset:19,message:n.data.email_error});t.debug_info=n.data})).always((function(){t.loading=!1}))}},computed:{active:function(){return"yes"!==this.settings.misc.is_inactive},inactiveMessage:function(){return"Plugin is not configured properly."},maybeEnabled:function(){return!e()(this.settings.connections)},sender_emails:function(){return this.settings.mappings}},created:function(){this.form.email=this.settings.user_email}};const bt=(0,o.Z)(yt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"header"},[t._v("\n Send Test Email\n ")]),t._v(" "),n("div",{staticClass:"content"},[t.email_success?n("div",{staticClass:"success_wrapper"},[t._m(0),t._v(" "),n("h3",[t._v("Test Email Has been successfully sent")]),t._v(" "),n("hr"),t._v(" "),"yes"==t.appVars.require_optin?n("div",{staticStyle:{"margin-top":"10px"}},[n("email-subscriber")],1):n("el-button",{directives:[{name:"else",rawName:"v-else"}],on:{click:function(e){t.email_success=!1}}},[t._v("Run Another Test Email")])],1):n("div",{staticClass:"test_form"},[n("el-form",{ref:"form",attrs:{model:t.form,"label-position":"left","label-width":"120px"}},[n("el-form-item",{attrs:{for:"email",label:"From"}},[n("el-select",{attrs:{placeholder:"Select Email or Type","allow-create":!0,filterable:!0},model:{value:t.form.from,callback:function(e){t.$set(t.form,"from",e)},expression:"form.from"}},t._l(t.sender_emails,(function(t,e){return n("el-option",{key:e,attrs:{label:e,value:e}})})),1),t._v(" "),n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Enter the sender email address (optional).\n ")])],1),t._v(" "),n("el-form-item",{attrs:{for:"from",label:"Send To"}},[n("el-input",{attrs:{id:"from"},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}}),t._v(" "),n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Enter email address where test email will be sent (By default, logged in user email will be used if email address is not provide).\n ")])],1),t._v(" "),n("el-form-item",{attrs:{for:"isHtml",label:"HTML"}},[n("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#dcdfe6","active-text":"On","inactive-text":"Off"},model:{value:t.form.isHtml,callback:function(e){t.$set(t.form,"isHtml",e)},expression:"form.isHtml"}}),t._v(" "),n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Send this email in HTML or in plain text format.\n ")])],1),t._v(" "),n("el-form-item",{attrs:{align:"left"}},[n("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-s-promotion",loading:t.loading,disabled:!t.maybeEnabled},on:{click:t.sendEmail}},[t._v("Send Test Email")]),t._v(" "),t.maybeEnabled?t._e():n("el-alert",{staticStyle:{display:"inline","margin-left":"20px"},attrs:{closable:!1,type:"warning"}},[t._v(t._s(t.inactiveMessage))])],1)],1),t._v(" "),t.debug_info?n("el-alert",{attrs:{type:"error",title:t.debug_info.message,"show-icon":""}}):t._e()],1)])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",[e("i",{staticClass:"el-icon el-icon-success"})])}],!1,null,null,null).exports;var wt=n(5534),kt=n.n(wt);const xt={name:"FluentMailSupport",data:function(){return{plugins:{fluentform:{slug:"fluentform",title:"Fluent Forms",subtitle:"Fastest Contact Form Builder Plugin for WordPress",description:'<p><a href="https://wordpress.org/plugins/fluentform" target="_blank" rel="nofollow">Fluent Forms</a> is the ultimate user-friendly, fast, customizable drag-and-drop WordPress Contact Form Plugin that offers you all the premium features, plus many more completely unique additional features.</p>',btn_text:"Install Fluent Forms (Free)",btn_class:"",plugin_url:"https://wordpress.org/plugins/fluentform"},fluent_crm:{slug:"fluent-crm",title:"FluentCRM",subtitle:"Email Marketing Automation and CRM Plugin for WordPress",description:'<p><a href="https://wordpress.org/plugins/fluent-crm/" target="_blank" rel="nofollow">FluentCRM</a> is the best and complete feature-rich Email Marketing & CRM solution. It is also the simplest and fastest CRM and Marketing Plugin on WordPress. Manage your customer relationships, build your email lists, send email campaigns, build funnels, and make more profit and increase your conversion rates. (Yes, It’s Free!)</p>',btn_text:"Install FluentCRM (Free)",btn_class:"fss_fluentcrm_btn",plugin_url:"https://wordpress.org/plugins/fluent-crm/"},ninja_tables:{slug:"ninja-tables",title:"Ninja Tables",subtitle:"Best WP DataTables Plugin for WordPress",description:'<p>Looking for a WordPress table plugin for your website? Then you’re in the right place.</p><p>Meet <a href="https://wordpress.org/plugins/ninja-tables/" target="_blank" rel="nofollow">Ninja Tables</a>, the best WP table plugin that comes with all the solutions to the problems you face while creating tables on your posts/pages.</p>',btn_text:"Install Ninja Tables (Free)",btn_class:"fss_ninjatables_btn",plugin_url:"https://wordpress.org/plugins/ninja-tables/"}},installing:!1,installed_info:!1,installed_message:""}},computed:{plugin:function(){if(this.appVars.disable_recommendation)return!1;var t=[];return this.appVars.has_fluentform||t.push(this.plugins.fluentform),this.appVars.has_ninja_tables||t.push(this.plugins.ninja_tables),this.appVars.has_fluentcrm||t.push(this.plugins.fluent_crm),!!t.length&&kt()(t)}},methods:{installPlugin:function(t){var e=this;this.installing=!0,this.$post("install_plugin",{plugin_slug:t}).then((function(t){e.installed_info=t.info,e.installed_message=t.message})).fail((function(t){e.$notify.error(t.responseJSON.data.message),alert(t.responseJSON.data.message)})).always((function(){e.installing=!1}))}}};const St=(0,o.Z)(xt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fss_support"},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{md:8,sm:24}},[n("div",{staticClass:"fss_about"},[n("div",{staticClass:"header"},[t._v("About")]),t._v(" "),n("div",{staticClass:"content"},[n("p",[n("a",{attrs:{href:t.appVars.plugin_url,target:"_blank",rel:"noopener"}},[t._v("FluentSMTP")]),t._v(" is a free and opensource WordPress Plugin. Our mission is to provide the ultimate\n email delivery solution with your favorite Email sending service. FluentSMTP is built for performance and speed.\n ")]),t._v(" "),n("p",[t._v("\n FluentSMTP is free and will be always free. This is our pledge to WordPress community from WPManageNinja LLC.\n ")]),t._v(" "),n("div",[n("p",[t._v("FluentSMTP is built using the following opensorce libraries and softwares")]),t._v(" "),n("ul",{staticStyle:{"list-style":"disc","margin-left":"30px"}},[n("li",[t._v("VueJS")]),t._v(" "),n("li",[t._v("ChartJS")]),t._v(" "),n("li",[t._v("Lodash")]),t._v(" "),n("li",[t._v("WordPress API")])]),t._v(" "),n("p",[t._v("\n If you find an issue or have a suggestion please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://github.com/WPManageNinja/fluent-smtp/issues"}},[t._v("open an issue on GitHub")]),t._v(".\n "),n("br"),t._v("If you are a developer and would like to contribute to the project, Please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://github.com/WPManageNinja/fluent-smtp/"}},[t._v("contribute on GitHub")]),t._v(".\n ")]),t._v(" "),n("p",[t._v("Please "),n("a",{attrs:{target:"_blank",rel:"noopener",href:"http://fluentsmtp.com/docs"}},[t._v("read the documentation here")])])])])])]),t._v(" "),t.plugin||t.installed_info?n("el-col",{attrs:{md:8,sm:24}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.installing,expression:"installing"}],staticClass:"fss_about",attrs:{"element-loading-text":"Installing... Please wait"}},[n("div",{staticClass:"header"},[t._v("Recommended Plugin")]),t._v(" "),n("div",{staticClass:"content"},[t.installed_info?n("div",{staticClass:"install_success"},[n("h3",[t._v(t._s(t.installed_message))]),t._v(" "),n("a",{staticClass:"el-button el-button--success installed_dashboard_url",attrs:{href:t.installed_info.admin_url}},[t._v(t._s(t.installed_info.title))])]):n("div",{staticClass:"fss_plugin_block"},[n("div",{staticClass:"fss_plugin_title"},[n("h3",[t._v(t._s(t.plugin.title))]),t._v(" "),n("p",[t._v(t._s(t.plugin.subtitle))])]),t._v(" "),n("div",{staticClass:"fss_plugin_body"},[n("div",{domProps:{innerHTML:t._s(t.plugin.description)}}),t._v(" "),n("div",{staticClass:"fss_install_btn"},[t.appVars.disable_installation?n("a",{staticClass:"el-button el-button--success fss_ninjatables_btn",attrs:{href:t.plugin.plugin_url,target:"_blank",rel:"noopener"}},[n("span",[t._v("View "+t._s(t.plugin.title))])]):n("el-button",{class:t.plugin.btn_class,attrs:{type:"success"},on:{click:function(e){return t.installPlugin(t.plugin.slug)}}},[t._v(t._s(t.plugin.btn_text))])],1)])])])])]):t._e(),t._v(" "),n("el-col",{attrs:{md:8,sm:24}},[n("div",{staticClass:"fss_about"},[n("div",{staticClass:"header"},[t._v("Community")]),t._v(" "),n("div",{staticClass:"content"},[n("p",[t._v("FluentSMTP is powered by community. We listen to our community users and build products that add values to businesses and save time.")]),t._v(" "),n("p",[t._v("Join our communities and participate in great conversations.")]),t._v(" "),n("ul",{staticStyle:{"list-style":"disc","margin-left":"30px"}},[n("li",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://www.facebook.com/groups/fluentforms"}},[t._v("Join FluentForms Facebook Community")])]),t._v(" "),n("li",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://www.facebook.com/groups/fluentcrm"}},[t._v("Join FluentCRM Facebook Community")])]),t._v(" "),n("li",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://wordpress.org/support/plugin/fluent-smtp/reviews/?filter=5"}},[t._v("Write a review (really appreciate 😊)")])]),t._v(" "),n("li",[n("a",{attrs:{target:"_blank",rel:"noopener",href:"http://fluentsmtp.com/docs"}},[t._v("Read the documentation")])])])])])])],1)],1)}),[],!1,null,null,null).exports;var $t=n(3105),Ct=n.n($t);const Pt={name:"Documentations",data:function(){return{search:"",fetching:!1,docs:[],utl_param:"?utm_source=wp&utm_medium=doc&utm_campaign=doc"}},computed:{doc_cats:function(){if(!this.docs.length)return[];var t={item_4:{label:"Getting Started",docs:[]},item_5:{label:"Connect With Your Email Providers",docs:[]},item_6:{label:"Functionalities",docs:[]}};return I()(this.docs,(function(e){var n="item_"+e.category.value;t[n]||(t[n]={label:e.category.label,cat_id:e.category.value,docs:[]}),t[n].docs.push(e)})),Object.values(t)},search_items:function(){var t=this;return this.search&&this.docs.length?Ct()(this.docs,(function(e){return e.title.includes(t.search)||e.content.includes(t.search)})):[]}},methods:{openSearch:function(){},fetchDocs:function(){var t=this;this.fetching=!0,this.$get("docs").then((function(e){t.docs=e.docs})).catch((function(t){console.log(t)})).always((function(){t.fetching=!1}))},$t:function(t){return t}},mounted:function(){this.fetchDocs()}};const Et=[{name:"dashboard",path:"/",meta:{},component:z},{name:"connections",path:"/connections",meta:{},component:rt},{name:"connection",path:"/connection",meta:{},component:st},{name:"test",path:"/test",meta:{},component:bt},{name:"support",path:"/support",meta:{},component:St},{name:"logs",path:"/logs",meta:{},component:mt},{name:"docs",path:"/documentation",meta:{},component:(0,o.Z)(Pt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fc_docs"},[n("div",{staticClass:"fc_doc_header text-align-center",staticStyle:{"max-width":"800px",margin:"50px auto",padding:"0px 20px","text-align":"center"}},[n("h1",[t._v("How can we help you?")]),t._v(" "),t._m(0),t._v(" "),n("el-input",{directives:[{name:"loading",rawName:"v-loading",value:t.fetching,expression:"fetching"}],attrs:{clearable:"",disabled:t.fetching,size:"large",placeholder:t.$t("Search Type and Enter...")},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},slot:"append"})],1),t._v(" "),t.search?n("div",{staticClass:"search_result"},[n("div",{staticClass:"fc_doc_items"},[n("div",{staticClass:"fc_doc_header"},[n("h3",[t._v(t._s(t.$t("Search Results for"))+": "+t._s(t.search))])]),t._v(" "),n("div",{staticClass:"fc_doc_lists"},[t.search_items.length?n("ul",t._l(t.search_items,(function(e){return n("li",{key:e.id},[n("a",{attrs:{target:"_blank",href:e.link+t.utl_param},domProps:{innerHTML:t._s(e.title)}})])})),0):n("p",[t._v("Sorry! No docs found")])])])]):t._e()],1),t._v(" "),t.fetching?n("el-skeleton",{staticClass:"doc_body content",attrs:{rows:8}}):n("div",{staticClass:"doc_body"},t._l(t.doc_cats,(function(e,r){return n("div",{key:r,staticClass:"doc_each_items"},[n("div",{staticClass:"fc_doc_items"},[n("div",{staticClass:"fc_doc_header"},[n("h3",[t._v(t._s(e.label))])]),t._v(" "),n("div",{staticClass:"fc_doc_lists"},[n("ul",t._l(e.docs,(function(e){return n("li",{key:e.id},[n("a",{attrs:{target:"_blank",href:e.link+t.utl_param},domProps:{innerHTML:t._s(e.title)}})])})),0)])])])})),0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[t._v("Please view the "),n("a",{attrs:{href:"https://fluentsmtp.com/docs"}},[t._v("documentation")]),t._v(" first. If you still can't find the\n answer "),n("a",{attrs:{href:"https://wpmanageninja.com/support-tickets/"}},[t._v("open a support ticket")]),t._v(" and we will be\n happy to answer your questions and assist you with any problems.")])}],!1,null,null,null).exports}];var At=new window.FluentMail.Router({routes:window.FluentMail.applyFilters("fluent_mail_global_routes",Et)});window.FluentMail.Vue.prototype.$rest=window.FluentMail.$rest,window.FluentMail.Vue.prototype.$get=window.FluentMail.$get,window.FluentMail.Vue.prototype.$post=window.FluentMail.$post,window.FluentMail.Vue.prototype.$bus=new window.FluentMail.Vue,new window.FluentMail.Vue({el:"#fluent_mail_app",render:function(t){return t(n(8161).Z)},router:At})})()})();
1
+ (()=>{var t={7757:(t,e,n)=>{t.exports=n(5666)},8552:(t,e,n)=>{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),o=n(401),s=n(7667),i=n(1327),a=n(1866);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=i,l.prototype.set=a,t.exports=l},8407:(t,e,n)=>{var r=n(7040),o=n(4125),s=n(2117),i=n(7529),a=n(4705);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=i,l.prototype.set=a,t.exports=l},7071:(t,e,n)=>{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),o=n(1285),s=n(6e3),i=n(9916),a=n(5265);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=i,l.prototype.set=a,t.exports=l},3818:(t,e,n)=>{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),o=n(619),s=n(2385);function i(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}i.prototype.add=i.prototype.push=o,i.prototype.has=s,t.exports=i},6384:(t,e,n)=>{var r=n(8407),o=n(7465),s=n(3779),i=n(7599),a=n(4758),l=n(4309);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=s,c.prototype.get=i,c.prototype.has=a,c.prototype.set=l,t.exports=c},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},7412:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,s=[];++n<r;){var i=t[n];e(i,n,t)&&(s[o++]=i)}return s}},4636:(t,e,n)=>{var r=n(2545),o=n(5694),s=n(1469),i=n(4144),a=n(5776),l=n(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=s(t),u=!n&&o(t),p=!n&&!u&&i(t),_=!n&&!u&&!p&&l(t),f=n||u||p||_,d=f?r(t.length,String):[],v=d.length;for(var m in t)!e&&!c.call(t,m)||f&&("length"==m||p&&("offset"==m||"parent"==m)||_&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,v))||d.push(m);return d}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},4311:(t,e,n)=>{var r=n(9877);t.exports=function(t){var e=t.length;return e?t[r(0,e-1)]:void 0}},2908:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9881:(t,e,n)=>{var r=n(7816),o=n(9291)(r);t.exports=o},760:(t,e,n)=>{var r=n(9881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},7816:(t,e,n)=>{var r=n(8483),o=n(3674);t.exports=function(t,e){return t&&r(t,e,o)}},7786:(t,e,n)=>{var r=n(1811),o=n(327);t.exports=function(t,e){for(var n=0,s=(e=r(e,t)).length;null!=t&&n<s;)t=t[o(e[n++])];return n&&n==s?t:void 0}},8866:(t,e,n)=>{var r=n(2488),o=n(1469);t.exports=function(t,e,n){var s=e(t);return o(t)?s:r(s,n(t))}},4239:(t,e,n)=>{var r=n(2705),o=n(9607),s=n(2333),i=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":i&&i in Object(t)?o(t):s(t)}},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},9454:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),o=n(7005);t.exports=function t(e,n,s,i,a){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,s,i,t,a))}},2492:(t,e,n)=>{var r=n(6384),o=n(7114),s=n(8351),i=n(6096),a=n(4160),l=n(1469),c=n(4144),u=n(6719),p="[object Arguments]",_="[object Array]",f="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,m,h){var g=l(t),y=l(e),b=g?_:a(t),w=y?_:a(e),k=(b=b==p?f:b)==f,x=(w=w==p?f:w)==f,S=b==w;if(S&&c(t)){if(!c(e))return!1;g=!0,k=!1}if(S&&!k)return h||(h=new r),g||u(t)?o(t,e,n,v,m,h):s(t,e,b,n,v,m,h);if(!(1&n)){var $=k&&d.call(t,"__wrapped__"),C=x&&d.call(e,"__wrapped__");if($||C){var P=$?t.value():t,E=C?e.value():e;return h||(h=new r),m(P,E,n,v,h)}}return!!S&&(h||(h=new r),i(t,e,n,v,m,h))}},2958:(t,e,n)=>{var r=n(6384),o=n(939);t.exports=function(t,e,n,s){var i=n.length,a=i,l=!s;if(null==t)return!a;for(t=Object(t);i--;){var c=n[i];if(l&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],p=t[u],_=c[1];if(l&&c[2]){if(void 0===p&&!(u in t))return!1}else{var f=new r;if(s)var d=s(p,_,u,t,e,f);if(!(void 0===d?o(_,p,3,s,f):d))return!1}}return!0}},8458:(t,e,n)=>{var r=n(3560),o=n(5346),s=n(3218),i=n(346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,_=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(r(t)?_:a).test(i(t))}},8749:(t,e,n)=>{var r=n(4239),o=n(1780),s=n(7005),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(t){return s(t)&&o(t.length)&&!!i[r(t)]}},7206:(t,e,n)=>{var r=n(1573),o=n(6432),s=n(6557),i=n(1469),a=n(9601);t.exports=function(t){return"function"==typeof t?t:null==t?s:"object"==typeof t?i(t)?o(t[0],t[1]):r(t):a(t)}},280:(t,e,n)=>{var r=n(5726),o=n(6916),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}},1573:(t,e,n)=>{var r=n(2958),o=n(1499),s=n(2634);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?s(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},6432:(t,e,n)=>{var r=n(939),o=n(7361),s=n(9095),i=n(5403),a=n(9162),l=n(2634),c=n(327);t.exports=function(t,e){return i(t)&&a(e)?l(c(t),e):function(n){var i=o(n,t);return void 0===i&&i===e?s(n,t):r(e,i,3)}}},371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},9152:(t,e,n)=>{var r=n(7786);t.exports=function(t){return function(e){return r(e,t)}}},9877:t=>{var e=Math.floor,n=Math.random;t.exports=function(t,r){return t+e(n()*(r-t+1))}},4992:(t,e,n)=>{var r=n(4311),o=n(2628);t.exports=function(t){return r(o(t))}},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},531:(t,e,n)=>{var r=n(2705),o=n(9932),s=n(1469),i=n(3448),a=r?r.prototype:void 0,l=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(s(e))return o(e,t)+"";if(i(e))return l?l.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},7518:t=>{t.exports=function(t){return function(e){return t(e)}}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4290:(t,e,n)=>{var r=n(6557);t.exports=function(t){return"function"==typeof t?t:r}},1811:(t,e,n)=>{var r=n(1469),o=n(5403),s=n(5514),i=n(9833);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:s(i(t))}},4429:(t,e,n)=>{var r=n(5639)["__core-js_shared__"];t.exports=r},9291:(t,e,n)=>{var r=n(8612);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var s=n.length,i=e?s:-1,a=Object(n);(e?i--:++i<s)&&!1!==o(a[i],i,a););return n}}},5063:t=>{t.exports=function(t){return function(e,n,r){for(var o=-1,s=Object(e),i=r(e),a=i.length;a--;){var l=i[t?a:++o];if(!1===n(s[l],l,s))break}return e}}},7114:(t,e,n)=>{var r=n(8668),o=n(2908),s=n(4757);t.exports=function(t,e,n,i,a,l){var c=1&n,u=t.length,p=e.length;if(u!=p&&!(c&&p>u))return!1;var _=l.get(t),f=l.get(e);if(_&&f)return _==e&&f==t;var d=-1,v=!0,m=2&n?new r:void 0;for(l.set(t,e),l.set(e,t);++d<u;){var h=t[d],g=e[d];if(i)var y=c?i(g,h,d,e,t,l):i(h,g,d,t,e,l);if(void 0!==y){if(y)continue;v=!1;break}if(m){if(!o(e,(function(t,e){if(!s(m,e)&&(h===t||a(h,t,n,i,l)))return m.push(e)}))){v=!1;break}}else if(h!==g&&!a(h,g,n,i,l)){v=!1;break}}return l.delete(t),l.delete(e),v}},8351:(t,e,n)=>{var r=n(2705),o=n(1149),s=n(7813),i=n(7114),a=n(8776),l=n(1814),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,p,_){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!p(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var f=a;case"[object Set]":var d=1&r;if(f||(f=l),t.size!=e.size&&!d)return!1;var v=_.get(t);if(v)return v==e;r|=2,_.set(t,e);var m=i(f(t),f(e),r,c,p,_);return _.delete(t),m;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,s,i,a){var l=1&n,c=r(t),u=c.length;if(u!=r(e).length&&!l)return!1;for(var p=u;p--;){var _=c[p];if(!(l?_ in e:o.call(e,_)))return!1}var f=a.get(t),d=a.get(e);if(f&&d)return f==e&&d==t;var v=!0;a.set(t,e),a.set(e,t);for(var m=l;++p<u;){var h=t[_=c[p]],g=e[_];if(s)var y=l?s(g,h,_,e,t,a):s(h,g,_,t,e,a);if(!(void 0===y?h===g||i(h,g,n,s,a):y)){v=!1;break}m||(m="constructor"==_)}if(v&&!m){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(v=!1)}return a.delete(t),a.delete(e),v}},1957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),o=n(9551),s=n(3674);t.exports=function(t){return r(t,s,o)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},1499:(t,e,n)=>{var r=n(9162),o=n(3674);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,r(i)]}return e}},852:(t,e,n)=>{var r=n(8458),o=n(7801);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},9607:(t,e,n)=>{var r=n(2705),o=Object.prototype,s=o.hasOwnProperty,i=o.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=i.call(t);return r&&(e?t[a]=n:delete t[a]),o}},9551:(t,e,n)=>{var r=n(4963),o=n(479),s=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(t){return null==t?[]:(t=Object(t),r(i(t),(function(e){return s.call(t,e)})))}:o;t.exports=a},4160:(t,e,n)=>{var r=n(8552),o=n(7071),s=n(3818),i=n(8525),a=n(577),l=n(4239),c=n(346),u="[object Map]",p="[object Promise]",_="[object Set]",f="[object WeakMap]",d="[object DataView]",v=c(r),m=c(o),h=c(s),g=c(i),y=c(a),b=l;(r&&b(new r(new ArrayBuffer(1)))!=d||o&&b(new o)!=u||s&&b(s.resolve())!=p||i&&b(new i)!=_||a&&b(new a)!=f)&&(b=function(t){var e=l(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return d;case m:return u;case h:return p;case g:return _;case y:return f}return e}),t.exports=b},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},222:(t,e,n)=>{var r=n(1811),o=n(5694),s=n(1469),i=n(5776),a=n(1780),l=n(327);t.exports=function(t,e,n){for(var c=-1,u=(e=r(e,t)).length,p=!1;++c<u;){var _=l(e[c]);if(!(p=null!=t&&n(t,_)))break;t=t[_]}return p||++c!=u?p:!!(u=null==t?0:t.length)&&a(u)&&i(_,u)&&(s(t)||o(t))}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},5403:(t,e,n)=>{var r=n(1469),o=n(3448),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(i.test(t)||!s.test(t)||null!=e&&t in Object(e))}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,o=n(4429),s=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!s&&s in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9162:(t,e,n)=>{var r=n(3218);t.exports=function(t){return t==t&&!r(t)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7529:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),o=n(8407),s=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||o),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},2634:t=>{t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},4523:(t,e,n)=>{var r=n(8306);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,i=s&&s.exports===o&&r.process,a=function(){try{var t=s&&s.require&&s.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=a},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5639:(t,e,n)=>{var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,s=r||o||Function("return this")();t.exports=s},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),o=n(7071),s=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(i)}return n.set(t,e),this.size=n.size,this}},5514:(t,e,n)=>{var r=n(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,i=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(s,"$1"):n||t)})),e}));t.exports=i},327:(t,e,n)=>{var r=n(3448);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},6073:(t,e,n)=>{t.exports=n(4486)},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3105:(t,e,n)=>{var r=n(4963),o=n(760),s=n(7206),i=n(1469);t.exports=function(t,e){return(i(t)?r:o)(t,s(e,3))}},4486:(t,e,n)=>{var r=n(7412),o=n(9881),s=n(4290),i=n(1469);t.exports=function(t,e){return(i(t)?r:o)(t,s(e))}},7361:(t,e,n)=>{var r=n(7786);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},9095:(t,e,n)=>{var r=n(13),o=n(222);t.exports=function(t,e){return null!=t&&o(t,e,r)}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),o=n(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(t){return o(t)&&i.call(t,"callee")&&!a.call(t,"callee")};t.exports=l},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),o=n(1780);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),o=n(5062),s=e&&!e.nodeType&&e,i=s&&t&&!t.nodeType&&t,a=i&&i.exports===s?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;t.exports=l},1609:(t,e,n)=>{var r=n(280),o=n(4160),s=n(5694),i=n(1469),a=n(8612),l=n(4144),c=n(5726),u=n(6719),p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(a(t)&&(i(t)||"string"==typeof t||"function"==typeof t.splice||l(t)||u(t)||s(t)))return!t.length;var e=o(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},3560:(t,e,n)=>{var r=n(4239),o=n(3218);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3448:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),o=n(7518),s=n(1167),i=s&&s.isTypedArray,a=i?o(i):r;t.exports=a},3674:(t,e,n)=>{var r=n(4636),o=n(280),s=n(8612);t.exports=function(t){return s(t)?r(t):o(t)}},8306:(t,e,n)=>{var r=n(3369);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var i=t.apply(this,r);return n.cache=s.set(o,i)||s,i};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},9601:(t,e,n)=>{var r=n(371),o=n(9152),s=n(5403),i=n(327);t.exports=function(t){return s(t)?r(i(t)):o(t)}},5534:(t,e,n)=>{var r=n(4311),o=n(4992),s=n(1469);t.exports=function(t){return(s(t)?r:o)(t)}},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}},2628:(t,e,n)=>{var r=n(7415),o=n(3674);t.exports=function(t){return null==t?[]:r(t,o(t))}},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),i=new E(r||[]);return s._invoke=function(t,e,n){var r=p;return function(o,s){if(r===f)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw s;return O()}for(n.method=o,n.arg=s;;){var i=n.delegate;if(i){var a=$(i,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=u(t,e,n);if("normal"===l.type){if(r=n.done?d:_,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=d,n.method="throw",n.arg=l.arg)}}}(t,n,i),s}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var p="suspendedStart",_="suspendedYield",f="executing",d="completed",v={};function m(){}function h(){}function g(){}var y={};l(y,s,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(A([])));w&&w!==n&&r.call(w,s)&&(y=w);var k=g.prototype=m.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(o,s,i,a){var l=u(t[o],t,s);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==typeof p&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,i,a)}),(function(t){n("throw",t,i,a)})):e.resolve(p).then((function(t){c.value=t,i(c)}),(function(t){return n("throw",t,i,a)}))}a(l.arg)}var o;this._invoke=function(t,r){function s(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(s,s):s()}}function $(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,$(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var s=o.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function A(t){if(t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:e,done:!0}}return h.prototype=g,l(k,"constructor",g),l(g,"constructor",h),h.displayName=l(g,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,a,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},x(S.prototype),l(S.prototype,i,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,s){void 0===s&&(s=Promise);var i=new S(c(e,n,r,o),s);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(k),l(k,a,"Generator"),l(k,s,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=A,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var i=s?s.completion:{};return i.type=t,i.arg=e,s?(this.method="next",this.next=s.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},8161:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"FluentMailApplication",data:function(){return{logo:"",items:[],active:null}},watch:{$route:function(t,e){this.$route.name&&this.setActive()}},methods:{defaultRoutes:function(){return[{route:"connections",title:this.$t("Settings")},{route:"test",title:"Email Test"},{route:"logs",title:"Email Logs"},{route:"support",title:"Support"},{route:"docs",title:"Docs"}]},setMenus:function(){this.items=this.applyFilters("fluentmail_top_menus",this.defaultRoutes()),this.setActive()},setActive:function(){this.active=this.$route.meta.parent||this.$route.name}},computed:{brandLogo:function(){var t=this.appVars.brand_logo;return'<img style="width:140px;" src="'.concat(t,'" />')}},created:function(){jQuery(".update-nag,.notice, #wpbody-content > .updated, #wpbody-content > .error").remove(),this.logo="<div class='logo'>".concat(this.brandLogo,"</div>"),this.setMenus()}};const o=(0,n(1900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fluent-mail-app"},[n("div",{staticClass:"fluent-mail-main-menu-items"},[n("el-menu",{staticClass:"fluent-mail-navigation",attrs:{router:!0,mode:"horizontal","default-active":t.active}},[n("el-menu-item",{attrs:{index:"dashboard",route:{name:"dashboard"}},domProps:{innerHTML:t._s(t.logo)}}),t._v(" "),t._l(t.items,(function(e){return n("el-menu-item",{key:e.route,attrs:{index:e.route,route:{name:e.route}},domProps:{innerHTML:t._s(e.title)}})}))],2)],1),t._v(" "),n("div",{staticClass:"fluent-mail-body"},[n("router-view",{key:t.$route.fullPath})],1)])}),[],!1,null,null,null).exports},1900:(t,e,n)=>{"use strict";function r(t,e,n,r,o,s,i,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),i?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:c}}n.d(e,{Z:()=>r})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var s=e[r]={id:r,loaded:!1,exports:{}};return t[r](s,s.exports,n),s.loaded=!0,s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t=n(1609),e=n.n(t);const r={name:"InputPassword",props:["value","id","placeholder","disabled"],data:function(){return{type:"password",styleObject:{"text-decoration":"line-through"},src:window.FluentMail.appVars.image_url+"/eye-cross.png"}},methods:{toggle:function(){this.type="text"===this.type?"password":"text",this.styleObject["text-decoration"]="text"===this.type?"none":"line-through"}}};var o=n(1900);const s=(0,o.Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-input",{attrs:{id:t.id,type:t.type,value:t.value,"place-holder":t.placeholder,disabled:t.disabled},on:{input:function(e){return t.$emit("input",e)}}})],1)}),[],!1,null,null,null).exports;const i={name:"Error",props:["error"]};const a=(0,o.Z)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.error?n("span",{staticClass:"el-form-item__error"},[t._v("\n "+t._s(t.error)+"\n")]):t._e()}),[],!1,null,null,null).exports,l={name:"MailGun",props:["connection","errors"],components:{InputPassword:s,Error:a},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="",this.connection.domain_name="")}},data:function(){return{}}};const c=(0,o.Z)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Mailgun API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"key"}},[t._v("\n Private API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n Follow this link to get an API Key from Mailgun:\n "),n("a",{attrs:{target:"_blank",href:"https://app.mailgun.com/app/account/security/api_keys"}},[t._v("Get a Private API Key.")])])],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{for:"domain"}},[n("label",{attrs:{for:"domain"}},[t._v("\n Domain Name\n ")]),t._v(" "),n("el-input",{attrs:{id:"domain"},model:{value:t.connection.domain_name,callback:function(e){t.$set(t.connection,"domain_name",e)},expression:"connection.domain_name"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("domain_name")}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n Follow this link to get a Domain Name from Mailgun:\n "),n("a",{attrs:{target:"_blank",href:"https://app.mailgun.com/app/domains"}},[t._v("\n Get a Domain Name.\n ")])])],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_MAILGUN_API_KEY', '********************' );\ndefine( 'FLUENTMAIL_MAILGUN_DOMAIN', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("domain_name")}})],1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",{staticStyle:{"vertical-align":"baseline"},attrs:{for:"region"}},[t._v("\n Select Region    \n ")]),t._v(" "),n("el-radio",{attrs:{label:"us"},model:{value:t.connection.region,callback:function(e){t.$set(t.connection,"region",e)},expression:"connection.region"}},[t._v("US")]),t._v(" "),n("el-radio",{attrs:{label:"eu"},model:{value:t.connection.region,callback:function(e){t.$set(t.connection,"region",e)},expression:"connection.region"}},[t._v("EU")]),t._v(" "),n("el-alert",{attrs:{closable:!1}},[n("span",[t._v("\n Define which endpoint you want to use for sending messages.\n ")]),t._v(" "),n("span",[t._v("\n If you are operating under EU laws, you may be required to use EU region.\n "),n("a",{attrs:{target:"_blank",href:"https://www.mailgun.com/regions"}},[t._v("More information")]),t._v("\n on Mailgun.com.\n ")])])],1)],1)}),[],!1,null,null,null).exports;const u={name:"PepiPost",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const p=(0,o.Z)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Pepipost API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"pepipost-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"pepipost-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_PEPIPOST_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key from Pepipost (Click Show button on Settings Page):\n "),n("a",{attrs:{target:"_blank",href:"https://app.pepipost.com/app/settings/integration"}},[t._v("Get API Key.")])])}],!1,null,null,null).exports;const _={name:"SendGrid",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const f=(0,o.Z)(_,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("SendGrid API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"sendgrid-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"sendgrid-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SENDGRID_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key from SendGrid:\n "),n("a",{attrs:{target:"_blank",href:"https://app.sendgrid.com/settings/api_keys"}},[t._v("Create API Key.")]),t._v("\n To send emails you will need only a Mail Send access level for this API key.\n ")])}],!1,null,null,null).exports;const d={name:"SendInBlue",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const v=(0,o.Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Sendinblue API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"sendinblue-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"sendinblue-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SENDINBLUE_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key:\n "),n("a",{attrs:{target:"_blank",href:"https://account.sendinblue.com/advanced/api"}},[t._v("Get v3 API Key.")])])}],!1,null,null,null).exports;const m={name:"AmazonSes",props:["connection","provider","errors"],components:{InputPassword:s,Error:a},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.access_key="",this.connection.secret_key="")}},data:function(){return{}}};const h=(0,o.Z)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store Access Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Access Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{for:"access_key"}},[n("label",{attrs:{for:"access_key"}},[t._v("\n Access Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"access_key"},model:{value:t.connection.access_key,callback:function(e){t.$set(t.connection,"access_key",e)},expression:"connection.access_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("access_key")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"ses-key"}},[t._v("\n Secret Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"ses-key"},model:{value:t.connection.secret_key,callback:function(e){t.$set(t.connection,"secret_key",e)},expression:"connection.secret_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("secret_key")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_AWS_ACCESS_KEY_ID', '********************' );\ndefine( 'FLUENTMAIL_AWS_SECRET_ACCESS_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("access_key")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("secret_key")}})],1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",{attrs:{for:"ses-region"}},[t._v("\n Region "),n("span",{staticClass:"small-help-text"},[t._v("(Default: US East (N. Virginia)/us-east-1)")])]),t._v(" "),n("el-select",{attrs:{id:"ses-region",placeholder:"Select Region"},model:{value:t.connection.region,callback:function(e){t.$set(t.connection,"region",e)},expression:"connection.region"}},t._l(t.provider.regions,(function(t,e){return n("el-option",{key:e,attrs:{label:t,value:e}})})),1),t._v(" "),n("span",{staticClass:"el-form-item__error",staticStyle:{"margin-top":"10px"}},[t._v(t._s(t.errors.errors.api_error))])],1)],1)}),[],!1,null,null,null).exports;const g={name:"SparkPost",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const y=(0,o.Z)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("SparkPost API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"sparkpost-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"sparkpost-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SPARKPOST_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key:\n "),n("a",{attrs:{target:"_blank",href:"https://app.sparkpost.com/account/api-keys"}},[t._v("Get API Key.")])])}],!1,null,null,null).exports;const b={name:"Smtp",props:["connection","errors"],components:{InputPassword:s,Error:a},data:function(){return{app_ready:!1}},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.password="",this.connection.username="")}},computed:{isDisabledUsername:function(){return"no"===this.connection.auth},isDisabledPassword:function(){return"no"===this.connection.auth}},mounted:function(){this.connection.key_store||this.$set(this.connection,"key_store","db")}};const w=(0,o.Z)(b,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"host"}},[t._v("\n SMTP Host\n ")]),t._v(" "),n("el-input",{attrs:{id:"host"},model:{value:t.connection.host,callback:function(e){t.$set(t.connection,"host",e)},expression:"connection.host"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("host")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"port"}},[t._v("\n SMTP Port\n ")]),t._v(" "),n("el-input",{attrs:{id:"port"},model:{value:t.connection.port,callback:function(e){t.$set(t.connection,"port",e)},expression:"connection.port"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("port")}})],1)],1)],1),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{staticStyle:{margin:"20px 0"}},[n("label",[t._v("\n Encryption\n ")]),t._v(" "),n("div",{staticClass:"small-help-text",staticStyle:{display:"inline-block"}},[t._v("\n (Select "),n("strong",[t._v("ssl")]),t._v(" on port "),n("strong",[t._v("465")]),t._v(",\n or "),n("strong",[t._v("tls")]),t._v(" on port "),n("strong",[t._v("25")]),t._v(" or "),n("strong",[t._v("587")]),t._v(")\n ")]),t._v(" "),n("div",{staticStyle:{display:"inline-block","margin-left":"20px"}},[n("el-radio",{attrs:{label:"none"},model:{value:t.connection.encryption,callback:function(e){t.$set(t.connection,"encryption",e)},expression:"connection.encryption"}},[t._v("None")]),t._v(" "),n("el-radio",{attrs:{label:"ssl"},model:{value:t.connection.encryption,callback:function(e){t.$set(t.connection,"encryption",e)},expression:"connection.encryption"}},[t._v("SSL")]),t._v(" "),n("el-radio",{attrs:{label:"tls"},model:{value:t.connection.encryption,callback:function(e){t.$set(t.connection,"encryption",e)},expression:"connection.encryption"}},[t._v("TLS")])],1)])],1)],1),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("el-form-item",[n("label",{attrs:{for:"auth"}},[t._v("\n Use Auto TLS\n ")]),t._v(" "),n("el-switch",{attrs:{"active-value":"yes","inactive-value":"no"},model:{value:t.connection.auto_tls,callback:function(e){t.$set(t.connection,"auto_tls",e)},expression:"connection.auto_tls"}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n (By default, the TLS encryption would be used if the server supports it. On some srvers, it could be a problem and may need to be disabled.)\n ")])],1)],1)],1),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("el-form-item",[n("label",{attrs:{for:"auth"}},[t._v("\n Authentication\n ")]),t._v(" "),n("el-switch",{attrs:{"active-value":"yes","inactive-value":"no"},model:{value:t.connection.auth,callback:function(e){t.$set(t.connection,"auth",e)},expression:"connection.auth"}}),t._v(" "),n("span",{staticClass:"small-help-text"},[t._v("\n (If you need to provide your SMTP server's credentials (username and password) enable the authentication, in most cases this is required.)\n ")])],1)],1)],1),t._v(" "),"yes"==t.connection.auth?[n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{value:"db",label:"db"}},[t._v("Store Access Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{value:"wp_config",label:"wp_config"}},[t._v("Access Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{class:{disabled:"no"===t.connection.auth},attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"username"}},[t._v("\n SMTP Username\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"username",disabled:t.isDisabledUsername},model:{value:t.connection.username,callback:function(e){t.$set(t.connection,"username",e)},expression:"connection.username"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("username")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"smtp-password"}},[t._v("\n SMTP Password\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"smtp-password",disabled:t.isDisabledPassword},model:{value:t.connection.password,callback:function(e){t.$set(t.connection,"password",e)},expression:"connection.password"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("password")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_SMTP_USERNAME', '********************' );\ndefine( 'FLUENTMAIL_SMTP_PASSWORD', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("username")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("password")}})],1)],1):t._e()]:t._e()],2)}),[],!1,null,null,null).exports;const k={name:"Gamil",props:["connection","errors"],components:{InputPassword:s,Error:a},data:function(){return{app_ready:!1,gettingRedirect:!1,redirectUrl:""}},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.client_id="",this.connection.client_secret="")}},methods:{redirectToGoogle:function(){var t=this;this.gettingRedirect=!0,this.$post("settings/gmail_auth_url",{connection:this.connection}).then((function(e){t.redirectUrl=e.data.auth_url,window.open(e.data.auth_url,"_blank")})).catch((function(e){t.errors.record(e.responseJSON.data)})).always((function(){t.gettingRedirect=!1}))}},mounted:function(){this.connection.key_store||this.$set(this.connection,"key_store","db")}};const x=(0,o.Z)(k,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",[t._v("Gmail/Google Workspace API Settings")]),t._v(" "),t._m(0),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{value:"db",label:"db"}},[t._v("Store Application Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{value:"wp_config",label:"wp_config"}},[t._v("Application Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_id"}},[t._v("\n Application Client ID\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_id"},model:{value:t.connection.client_id,callback:function(e){t.$set(t.connection,"client_id",e)},expression:"connection.client_id"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_secret"}},[t._v("\n Application Client Secret\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_secret"},model:{value:t.connection.client_secret,callback:function(e){t.$set(t.connection,"client_secret",e)},expression:"connection.client_secret"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_GMAIL_CLIENT_ID', '********************' );\ndefine( 'FLUENTMAIL_GMAIL_CLIENT_SECRET', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1):t._e(),t._v(" "),t.connection.access_token?n("div",{staticStyle:{"text-align":"center"}},[n("h3",[t._v("Your Gmail/Google Workspace Authentication has been enabled. No further action is needed. If you want to re-authenticate, "),n("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.connection.access_token=""}}},[t._v("click here")])])]):n("div",[n("div",{staticStyle:{"text-align":"center"}},[t._m(1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.gettingRedirect,expression:"gettingRedirect"}],attrs:{type:"danger"},on:{click:function(e){return t.redirectToGoogle()}}},[t._v("Authenticate with Google & Get Access Token")])],1),t._v(" "),t.redirectUrl?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"application_token"}},[t._v("\n Access Token\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"application_token"},model:{value:t.connection.auth_token,callback:function(e){t.$set(t.connection,"auth_token",e)},expression:"connection.auth_token"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("auth_token")}}),t._v(" "),n("p",[t._v("Please send test email to confirm if the connection is working or not.")])],1)],1)],1):t._e()],1)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[t._v("Please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://fluentsmtp.com/docs/connect-gmail-or-google-workspace-emails-with-fluentsmtp/"}},[t._v("check the documentation first")]),t._v(" or "),n("b",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://www.youtube.com/watch?v=_d78bscNaX8"}},[t._v("Watch the video tutorial")])]),t._v(" to create API keys at Google")])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h3",[t._v("Please authenticate with Google to get "),n("b",[t._v("Access Token")])])}],!1,null,null,null).exports;const S={name:"OutLook",props:["connection","provider","errors"],components:{InputPassword:s,Error:a},data:function(){return{app_ready:!1,gettingRedirect:!1,redirectUrl:""}},watch:{"connection.key_store":function(t){"wp_config"===t&&(this.connection.client_id="",this.connection.client_secret="")}},methods:{redirectToMS:function(){var t=this;this.gettingRedirect=!0,this.$post("settings/outlook_auth_url",{connection:this.connection}).then((function(e){t.redirectUrl=e.data.auth_url,window.open(e.data.auth_url,"_blank")})).catch((function(e){t.errors.record(e.responseJSON.data)})).always((function(){t.gettingRedirect=!1}))}},mounted:function(){this.connection.key_store||this.$set(this.connection,"key_store","db")}};const $=(0,o.Z)(S,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",[t._v("Outlook/Office365 API Settings")]),t._v(" "),t._m(0),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{value:"db",label:"db"}},[t._v("Store Application Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{value:"wp_config",label:"wp_config"}},[t._v("Application Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_id"}},[t._v("\n Application Client ID\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_id"},model:{value:t.connection.client_id,callback:function(e){t.$set(t.connection,"client_id",e)},expression:"connection.client_id"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"client_secret"}},[t._v("\n Application Client Secret\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"client_secret"},model:{value:t.connection.client_secret,callback:function(e){t.$set(t.connection,"client_secret",e)},expression:"connection.client_secret"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1)],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_OUTLOOK_CLIENT_ID', '********************' );\ndefine( 'FLUENTMAIL_OUTLOOK_CLIENT_SECRET', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("client_id")}}),t._v(" "),n("error",{attrs:{error:t.errors.get("client_secret")}})],1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",[t._v("App Callback URL (Use this URL to your APP)")]),t._v(" "),n("el-input",{attrs:{readonly:!0},model:{value:t.provider.callback_url,callback:function(e){t.$set(t.provider,"callback_url",e)},expression:"provider.callback_url"}})],1),t._v(" "),t.connection.access_token?n("div",{staticStyle:{"text-align":"center"}},[n("h3",[t._v("Your Outlook/Office365 Authentication has been enabled. No further action is needed. If you want to re-authenticate, "),n("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.connection.access_token=""}}},[t._v("click here")])])]):n("div",[n("div",{staticStyle:{"text-align":"center"}},[t._m(1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.gettingRedirect,expression:"gettingRedirect"}],attrs:{type:"danger"},on:{click:function(e){return t.redirectToMS()}}},[t._v("Authenticate with Office365 & Get Access Token")])],1),t._v(" "),t.redirectUrl?n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",[n("label",{attrs:{for:"application_token"}},[t._v("\n Access Token\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"application_token"},model:{value:t.connection.auth_token,callback:function(e){t.$set(t.connection,"auth_token",e)},expression:"connection.auth_token"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("auth_token")}}),t._v(" "),n("p",[t._v("Please send test email to confirm if the connection is working or not.")])],1)],1)],1):t._e()],1)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[t._v("Please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://fluentsmtp.com/docs/setup-outlook-with-fluentsmtp/"}},[t._v("check the documentation first to create API keys at Microsoft")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h3",[t._v("Please authenticate with Office365 to get "),n("b",[t._v("Access Token")])])}],!1,null,null,null).exports;const C={name:"PostMark",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const P=(0,o.Z)(C,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("Postmark API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"postmark-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"postmark-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_POSTMARK_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0),t._v(" "),n("el-row",{staticClass:"fsmtp_compact",attrs:{gutter:30}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"Track Opens"}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.track_opens,callback:function(e){t.$set(t.connection,"track_opens",e)},expression:"connection.track_opens"}},[t._v("\n Enable email opens tracking on postmark (For HTML Emails only).\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n If you enable this then open tracking header will be added to the email for postmark.\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1),t._v(" "),n("el-form-item",{attrs:{label:"Message Stream"}},[n("el-input",{attrs:{type:"text",size:"small"},model:{value:t.connection.message_stream,callback:function(e){t.$set(t.connection,"message_stream",e)},expression:"connection.message_stream"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"Track Links"}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.track_links,callback:function(e){t.$set(t.connection,"track_links",e)},expression:"connection.track_links"}},[t._v("\n Enable link tracking on postmark (For HTML Emails only).\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n If you enable this then link tracking header will be added to the email for postmark.\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1)],1)],1)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key from Postmark (Your API key is in the API Tokens tab of your):\n "),n("a",{attrs:{target:"_blank",href:"https://account.postmarkapp.com/servers"}},[t._v("Postmark Server.")])])}],!1,null,null,null).exports;const E={name:"PostMark",props:["connection","errors"],components:{InputPassword:s,Error:a},"connection.key_store":function(t){"wp_config"===t&&(this.connection.api_key="")},data:function(){return{}}};const A=(0,o.Z)(E,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",{staticClass:"fs_config_title"},[t._v("ElasticMail API Settings")]),t._v(" "),n("el-radio-group",{attrs:{size:"mini"},model:{value:t.connection.key_store,callback:function(e){t.$set(t.connection,"key_store",e)},expression:"connection.key_store"}},[n("el-radio-button",{attrs:{label:"db"}},[t._v("Store API Keys in DB")]),t._v(" "),n("el-radio-button",{attrs:{label:"wp_config"}},[t._v("Store API Keys in Config File")])],1),t._v(" "),"db"==t.connection.key_store?n("el-form-item",[n("label",{attrs:{for:"elasticmail-key"}},[t._v("\n API Key\n ")]),t._v(" "),n("InputPassword",{attrs:{id:"elasticmail-key"},model:{value:t.connection.api_key,callback:function(e){t.$set(t.connection,"api_key",e)},expression:"connection.api_key"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1):"wp_config"==t.connection.key_store?n("div",{staticClass:"fss_condesnippet_wrapper"},[n("el-form-item",[n("label",[t._v("Simply copy the following snippet and replace the stars with the corresponding credential. Then simply paste to wp-config.php file of your WordPress installation")]),t._v(" "),n("div",{staticClass:"code_snippet"},[n("textarea",{staticStyle:{width:"100%"},attrs:{readonly:""}},[t._v("define( 'FLUENTMAIL_ELASTICMAIL_API_KEY', '********************' );")])]),t._v(" "),n("error",{attrs:{error:t.errors.get("api_key")}})],1)],1):t._e(),t._v(" "),t._m(0),t._v(" "),n("el-row",{staticClass:"fsmtp_compact",attrs:{gutter:30}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"Email Type"}},[n("el-radio-group",{model:{value:t.connection.mail_type,callback:function(e){t.$set(t.connection,"mail_type",e)},expression:"connection.mail_type"}},[n("el-radio",{attrs:{label:"transactional"}},[t._v("Transactional")]),t._v(" "),n("el-radio",{attrs:{label:"marketing"}},[t._v("Marketing")])],1)],1)],1)],1)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Follow this link to get an API Key from ElasticMail:\n "),n("a",{attrs:{target:"_blank",href:"https://elasticemail.com/account#/settings/new/manage-api"}},[t._v("Get API Key.")])])}],!1,null,null,null).exports;function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const j=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errors={}}var e,n,r;return e=t,(n=[{key:"get",value:function(t){if(this.errors[t])return Object.values(this.errors[t])[0]}},{key:"has",value:function(t){return!!this.errors[t]}},{key:"record",value:function(t){this.errors=t}},{key:"clear",value:function(){this.errors={}}}])&&O(e.prototype,n),r&&O(e,r),t}(),I={name:"ConnectionWizard",props:["connection","is_new","providers","connection_key"],components:{ses:h,mailgun:c,pepipost:p,sendgrid:f,sendinblue:v,sparkpost:y,smtp:w,gmail:x,outlook:$,postmark:P,elasticmail:A,Error:a},data:function(){return{saving:!1,errors:new j,api_error:"",has_error:!1}},watch:{"connection.provider":function(t){if(!t)return!1;var e=JSON.parse(JSON.stringify(this.providers[t].options));e.provider=t,this.connection=e}},methods:{saveConnectionSettings:function(){var t=this;this.saving=!0,this.api_error="",this.has_error=!1,this.$post("settings",{connection:this.connection,connection_key:this.connection_key}).then((function(e){t.$notify.success(e.data.message),t.$set(t.settings,"connections",e.data.connections),t.$set(t.settings,"mappings",e.data.mappings),t.$set(t.settings,"misc",e.data.misc),t.$router.push({name:"connections"})})).fail((function(e){t.errors.record(e.responseJSON.data),t.api_error=e.responseJSON.data.api_error,t.has_error=!0})).always((function(){t.saving=!1}))}}};const T=(0,o.Z)(I,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fss_connection_wizard"},[n("el-form",{attrs:{data:t.connection,"label-position":"top"}},[n("el-form-item",{attrs:{label:"Connection Provider"}},[n("el-radio-group",{staticClass:"fss_connections",model:{value:t.connection.provider,callback:function(e){t.$set(t.connection,"provider",e)},expression:"connection.provider"}},t._l(t.providers,(function(t,e){return n("el-radio-button",{key:e,class:"con_"+e,attrs:{label:e}},[n("img",{staticStyle:{"max-width":"80px",height:"32px"},attrs:{title:t.title,src:t.image}})])})),1)],1),t._v(" "),t.connection.provider?[n("div",{staticClass:"fss_config_section"},[n("h3",{staticClass:"fs_config_title"},[t._v(t._s(t.$t("Sender Settings")))]),t._v(" "),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:t.$t("From Email")}},[n("error",{attrs:{error:t.errors.get("sender_email")}}),t._v(" "),n("el-input",{attrs:{type:"email",placeholder:t.$t("From Email")},model:{value:t.connection.sender_email,callback:function(e){t.$set(t.connection,"sender_email",e)},expression:"connection.sender_email"}})],1),t._v(" "),null!=t.connection.force_from_email?n("div",[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.force_from_email,callback:function(e){t.$set(t.connection,"force_from_email",e)},expression:"connection.force_from_email"}},[t._v("\n "+t._s(t.$t("Force From Email (Recommended Settings: Enable)"))+"\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n "+t._s(t.$t("from_email_tooltip"))+"\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1):t._e(),t._v(" "),null!=t.connection.return_path?n("div",[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.return_path,callback:function(e){t.$set(t.connection,"return_path",e)},expression:"connection.return_path"}},[t._v("\n "+t._s(t.$t("Set the return-path to match the From Email"))+"\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n Return Path indicates where non-delivery receipts - or bounce messages -"),n("br"),t._v("\n are to be sent. If unchecked, bounce messages may be lost. With this enabled,"),n("br"),t._v('\n you’ll be emailed using "From Email" if any messages bounce as a result of issues with the recipient’s email.\n ')]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1):t._e()],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:t.$t("From Name")}},[n("el-input",{attrs:{type:"text",placeholder:t.$t("From Name")},model:{value:t.connection.sender_name,callback:function(e){t.$set(t.connection,"sender_name",e)},expression:"connection.sender_name"}}),t._v(" "),n("error",{attrs:{error:t.errors.get("sender_name")}})],1),t._v(" "),n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.connection.force_from_name,callback:function(e){t.$set(t.connection,"force_from_name",e)},expression:"connection.force_from_name"}},[t._v("\n "+t._s(t.$t("Force Sender Name"))+"\n "),n("el-tooltip",{attrs:{effect:"dark",placement:"top-start"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n "+t._s(t.$t("force_sender_tooltip"))+"\n ")]),t._v(" "),n("i",{staticClass:"el-icon-info"})])],1)],1)],1)],1),t._v(" "),"default"!=t.connection.provider?n("div",{staticClass:"fss_config_section"},[n(t.connection.provider,{tag:"component",attrs:{errors:t.errors,connection:t.connection,provider:t.providers[t.connection.provider]}})],1):t._e(),t._v(" "),t.providers[t.connection.provider].note?n("p",{staticStyle:{padding:"20px 0px"},domProps:{innerHTML:t._s(t.providers[t.connection.provider].note)}}):t._e(),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],attrs:{type:"success"},on:{click:function(e){return t.saveConnectionSettings()}}},[t._v(t._s(t.$t("Save Connection Settings")))])]:n("div",[n("h3",{staticStyle:{"text-align":"center"}},[t._v(t._s(t.$t("save_connection_error_1")))])]),t._v(" "),t.saving?n("p",[t._v(t._s(t.$t("Validating Data.Please wait")))]):t._e(),t._v(" "),t.has_error?n("el-alert",{staticStyle:{"margin-top":"20px"},attrs:{type:"error"}},[t._v(t._s(t.$t("save_connection_error_2")))]):t._e()],2)],1)}),[],!1,null,null,null).exports;const L={extends:window.VueChartJs.Bar,mixins:[window.VueChartJs.mixins.reactiveProp],props:["stats","maxCumulativeValue"],data:function(){return{options:{responsive:!0,maintainAspectRatio:!1,scales:{yAxes:[{id:"byDate",type:"linear",position:"left",gridLines:{drawOnChartArea:!1},ticks:{beginAtZero:!0,userCallback:function(t,e,n){if(Math.floor(t)===t)return t}}},{id:"byCumulative",type:"linear",position:"right",gridLines:{drawOnChartArea:!0},ticks:{beginAtZero:!0,userCallback:function(t,e,n){if(Math.floor(t)===t)return t}}}],xAxes:[{gridLines:{drawOnChartArea:!1},ticks:{beginAtZero:!0,autoSkip:!0,maxTicksLimit:10}}]},drawBorder:!1,layout:{padding:{left:0,right:0,top:0,bottom:20}}}}},methods:{},mounted:function(){this.renderChart(this.chartData,this.options)}};var F=n(6073),M=n.n(F);const N={name:"email-sendings",props:["date_range"],components:{GrowthChart:L},data:function(){return{fetching:!1,stats:{},chartData:{},maxCumulativeValue:0}},computed:{},methods:{fetchReport:function(){var t=this;this.fetching=!0,this.$get("sending_stats",{date_range:this.date_range}).then((function(e){t.stats=e.stats,t.setupChartItems()})).fail((function(t){console.log(t)})).always((function(){t.fetching=!1}))},setupChartItems:function(){var t=[],e={label:this.$t("By Date"),yAxisID:"byDate",backgroundColor:"rgba(81, 52, 178, 0.5)",borderColor:"#b175eb",data:[],fill:!1,gridLines:{display:!1}},n={label:"Cumulative",backgroundColor:"rgba(55, 162, 235, 0.1)",borderColor:"#37a2eb",data:[],yAxisID:"byCumulative",type:"line"},r=0;M()(this.stats,(function(o,s){e.data.push(o),t.push(s),r+=parseInt(o),n.data.push(r)})),this.maxCumulativeValue=r+10,this.chartData={labels:t,datasets:[e,n]}}},mounted:function(){this.fetchReport()}};const D=(0,o.Z)(N,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.fetching,expression:"fetching"}],staticClass:"fss_body fss_chart_box"},[n("growth-chart",{attrs:{maxCumulativeValue:t.maxCumulativeValue,"chart-data":t.chartData}})],1)}),[],!1,null,null,null).exports;const V={name:"SubscriberForm",data:function(){return{formData:{email:window.FluentMailAdmin.user_email,display_name:window.FluentMailAdmin.user_display_name},share_details:"no",saving:!1,subscribed:!1}},methods:{subscribeToEmail:function(){var t=this;if(!this.formData.email)return this.$notify.error("Please Provide an email"),!1;this.saving=!0,this.$post("settings/subscribe",{email:this.formData.email,display_name:this.formData.display_name,share_essentials:this.share_details}).then((function(e){t.subscribed=!0,setTimeout((function(){t.appVars.require_optin="no"}),15e3),t.$notify.success(e.data.message)})).catch((function(e){t.$notify.error(e.responseJSON.data.message)})).always((function(){t.saving=!1}))}}};const B=(0,o.Z)(V,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fst_subscribe_form"},[t.subscribed?n("div",{staticStyle:{"text-align":"center"}},[n("p",[t._v("Awesome! Please check your email inbox and confirm your subscription.")])]):[n("p",{staticStyle:{"margin-top":"0"}},[t._v("\n Subscribe with your email to know about this plugin updates, releases and useful tips.\n ")]),t._v(" "),n("div",{staticClass:"fsmtp_subscribe"},[n("el-form",{attrs:{"label-position":"right","label-width":"100px"}},[n("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"Your Name"}},[n("el-input",{attrs:{size:"small",placeholder:"Your Name"},model:{value:t.formData.display_name,callback:function(e){t.$set(t.formData,"display_name",e)},expression:"formData.display_name"}})],1),t._v(" "),n("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:"Your Email"}},[n("el-input",{attrs:{size:"small",placeholder:"Your Email Address"},model:{value:t.formData.email,callback:function(e){t.$set(t.formData,"email",e)},expression:"formData.email"}})],1)],1),t._v(" "),n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.share_details,callback:function(e){t.share_details=e},expression:"share_details"}},[t._v("\n (Optional) Share Non-Sensitive Data. It will help us to improve the integrations\n "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"Access Data: Active SMTP Connection Provider, installed plugin names, php & mysql version",placement:"top-end"}},[n("i",{staticClass:"el-icon el-icon-info"})])],1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],staticStyle:{"margin-top":"10px"},attrs:{disabled:t.saving,type:"success",size:"small"},on:{click:function(e){return t.subscribeToEmail()}}},[t._v("\n Subscribe To Updates\n ")])],1)]],2)}),[],!1,null,null,null).exports;const z={name:"SubscribeDismiss",methods:{dismiss:function(){var t=this;this.$post("settings/subscribe-dismiss").then((function(e){t.appVars.require_optin="no"})).catch((function(e){t.$notify.error(e.responseJSON.data.message)}))}}};const R={name:"Dashboard",components:{ConnectionWizard:T,EmailsChart:D,EmailSubscriber:B,SubscribeDismiss:(0,o.Z)(z,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",{staticClass:"el-icon el-icon-close",on:{click:function(e){return t.dismiss()}}})}),[],!1,null,null,null).exports},data:function(){return{stats:{},new_connection:{},settings_stat:{},date_range:"",showing_chart:!0,pickerOptions:{disabledDate:function(t){return t>new Date},shortcuts:[{text:this.$t("Last week"),onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-6048e5),t.$emit("pick",[n,e])}},{text:this.$t("Last month"),onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-2592e6),t.$emit("pick",[n,e])}},{text:this.$t("Last 3 months"),onClick:function(t){var e=new Date,n=new Date;n.setTime(n.getTime()-7776e6),t.$emit("pick",[n,e])}}]},loading:!0,skip_recommended:!1}},computed:{is_new:function(){return e()(this.settings.connections)},recommended:function(){return!!this.is_new&&this.appVars.recommended}},methods:{fetch:function(){var t=this;this.loading=!0,this.$get("/").then((function(e){t.stats=e.stats,t.settings_stat=e.settings_stat})).fail((function(t){console.log(t)})).always((function(){t.loading=!1}))},filterReport:function(){var t=this;this.showing_chart=!1,this.$nextTick((function(){t.showing_chart=!0}))},setRecommendation:function(){this.new_connection=JSON.parse(JSON.stringify(this.recommended.settings)),this.skip_recommended=!0}},created:function(){this.fetch()}};const K=(0,o.Z)(R,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dashboard"},[t.is_new?n("div",{staticClass:"content"},[n("div",{staticClass:"fss_connection_intro"},[n("div",{staticClass:"fss_intro"},[n("h1",[t._v(t._s(t.$t("wizard_title")))]),t._v(" "),n("p",[t._v(t._s(t.$t("wizard_sub")))])]),t._v(" "),t.recommended&&!t.skip_recommended?n("div",{staticClass:"fsmtp_recommened"},[n("h2",[t._v(t._s(t.recommended.title))]),t._v(" "),n("p",[t._v(t._s(t.recommended.subtitle))]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.setRecommendation()}}},[t._v(t._s(t.recommended.button_text))]),t._v(" "),n("el-button",{attrs:{type:"info"},on:{click:function(e){t.skip_recommended=!0}}},[t._v("Skip")])],1):[n("h2",[t._v(t._s(t.$t("wizard_instruction")))]),t._v(" "),n("connection-wizard",{attrs:{connection:t.new_connection,is_new:!0,connection_key:!1,providers:t.settings.providers}})]],2)]):n("div",[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{sm:24,md:16}},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.$t("Sending Stats"))+"\n "),n("span",{staticClass:"fss_to_right"},[n("el-date-picker",{attrs:{size:"small",type:"daterange","picker-options":t.pickerOptions,"range-separator":"To","start-placeholder":"Start date","end-placeholder":"End date","value-format":"yyyy-MM-dd"},model:{value:t.date_range,callback:function(e){t.date_range=e},expression:"date_range"}}),t._v(" "),n("el-button",{attrs:{size:"small",type:"primary",plain:""},on:{click:t.filterReport}},[t._v("Apply")])],1)]),t._v(" "),n("div",{staticClass:"content"},[t.showing_chart?n("emails-chart",{attrs:{date_range:t.date_range}}):t._e()],1)]),t._v(" "),n("el-col",{attrs:{sm:24,md:8}},[n("div",{staticClass:"fsm_card"},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.$t("Quick Overview"))+"\n ")]),t._v(" "),t.loading?n("el-skeleton",{staticClass:"content",attrs:{rows:8}}):n("div",{staticClass:"content"},[n("ul",{staticClass:"fss_dash_lists"},["yes"==t.settings_stat.log_enabled?n("li",[t._v("\n "+t._s(t.$t("Total Email Sent (Logged):"))+" "),n("span",[t._v(t._s(t.stats.sent))])]):t._e(),t._v(" "),t.stats.failed>0?n("li",{staticStyle:{color:"red"}},[n("router-link",{staticStyle:{color:"red"},attrs:{to:{name:"logs",query:{filterBy:"status",filterValue:"failed"}}}},[t._v("\n "+t._s(t.$t("Email Failed:"))+" "),n("span",[t._v(t._s(t.stats.failed))])])],1):t._e(),t._v(" "),n("li",[t._v("\n "+t._s(t.$t("Active Connections:"))+" "),n("span",[t._v(t._s(t.settings_stat.connection_counts))])]),t._v(" "),n("li",[t._v("\n "+t._s(t.$t("Active Senders:"))+" "),n("span",[t._v(t._s(t.settings_stat.active_senders))])]),t._v(" "),n("li",[t._v("\n "+t._s(t.$t("Save Email Logs:"))+"\n "),n("span",{staticStyle:{"text-transform":"capitalize"}},[t._v("\n "+t._s(t.settings_stat.log_enabled)+"\n ")])]),t._v(" "),"yes"==t.settings_stat.log_enabled?n("li",[t._v("\n "+t._s(t.$t("Delete Logs:"))+"\n "),n("span",[t._v("After "+t._s(t.settings_stat.auto_delete_days)+" "+t._s(t.$t("Days")))])]):t._e()])])],1),t._v(" "),"yes"==t.appVars.require_optin&&t.stats.sent>9?n("div",{staticClass:"fsm_card",staticStyle:{"margin-top":"20px"}},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.$t("Subscribe To Updates"))+"\n "),n("span",{staticClass:"header_action_right"},[n("subscribe-dismiss")],1)]),t._v(" "),n("div",{staticClass:"content"},[n("email-subscriber")],1)]):t._e()])],1)],1)])}),[],!1,null,null,null).exports;var q=n(7757),U=n.n(q);const G={name:"Confirm",props:{placement:{default:"top-end"},message:{default:"Are you sure to delete this?"}},data:function(){return{visible:!1}},methods:{hide:function(){this.visible=!1},confirm:function(){this.hide(),this.$emit("yes")},cancel:function(){this.hide(),this.$emit("no")}}};const W=(0,o.Z)(G,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-popover",{attrs:{width:"170",placement:t.placement},on:{hide:t.cancel},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[n("p",{domProps:{innerHTML:t._s(t.message)}}),t._v(" "),n("div",{staticClass:"action-buttons"},[n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){return t.cancel()}}},[t._v("\n "+t._s(t.$t("cancel"))+"\n ")]),t._v(" "),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.confirm()}}},[t._v("\n "+t._s(t.$t("confirm"))+"\n ")])],1),t._v(" "),n("template",{slot:"reference"},[t._t("reference",(function(){return[n("i",{staticClass:"el-icon-delete"})]}))],2)],2)}),[],!1,null,null,null).exports;const Z={name:"FluentMailGeneralSettings",data:function(){return{saving:!1,logging_days:{7:"After 7 Days",14:"After 14 Days",30:"After 30 Days",60:"After 60 Days",90:"After 90 Days",180:"After 6 Months",365:"After 1 Year",730:"After 2 Years"}}},computed:{connectionsCount:function(){return Object.keys(this.settings.connections).length}},methods:{saveMiscSettings:function(){var t=this;this.saving=!0,this.$post("misc-settings",{settings:this.settings.misc}).then((function(e){t.$notify.success(e.data.message)})).fail((function(t){console.log(t)})).always((function(){t.saving=!1}))}}};const H=(0,o.Z)(Z,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fss_general_settings"},[n("el-form",{staticClass:"fss_compact_form",attrs:{data:t.settings.misc,"label-position":"top"}},[n("el-form-item",{attrs:{label:"Log Emails"}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.settings.misc.log_emails,callback:function(e){t.$set(t.settings.misc,"log_emails",e)},expression:"settings.misc.log_emails"}},[t._v(t._s(t.$t("Log All Emails for Reporting")))])],1),t._v(" "),"yes"==t.settings.misc.log_emails&&t.appVars.has_fluentcrm?n("el-form-item",{attrs:{label:t.$t("FluentCRM Email Logging")}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.settings.misc.disable_fluentcrm_logs,callback:function(e){t.$set(t.settings.misc,"disable_fluentcrm_logs",e)},expression:"settings.misc.disable_fluentcrm_logs"}},[t._v(t._s(t.$t("Disable Logging for FluentCRM Emails")))])],1):t._e(),t._v(" "),"yes"==t.settings.misc.log_emails?n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$t("Delete Logs"))+"\n "),n("el-popover",{attrs:{width:"400",trigger:"hover"}},[n("p",[t._v(t._s(t.$t("delete_logs_info")))]),t._v(" "),n("i",{staticClass:"el-icon el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),t._v(" "),n("el-select",{model:{value:t.settings.misc.log_saved_interval_days,callback:function(e){t.$set(t.settings.misc,"log_saved_interval_days",e)},expression:"settings.misc.log_saved_interval_days"}},t._l(t.logging_days,(function(t,e){return n("el-option",{key:e,attrs:{value:e,label:t}})})),1)],1):t._e(),t._v(" "),n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$t("Default Connection"))+"\n "),n("el-popover",{attrs:{width:"400",trigger:"hover"}},[n("p",[t._v(t._s(t.$t("default_connection_popover")))]),t._v(" "),n("i",{staticClass:"el-icon el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),t._v(" "),n("el-select",{model:{value:t.settings.misc.default_connection,callback:function(e){t.$set(t.settings.misc,"default_connection",e)},expression:"settings.misc.default_connection"}},t._l(t.settings.connections,(function(e,r){return n("el-option",{key:r,attrs:{value:r,disabled:t.settings.misc.fallback_connection==r,label:e.title+" - "+e.provider_settings.sender_email}})})),1)],1),t._v(" "),n("el-form-item",[n("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n Fallback Connection\n "),n("el-popover",{attrs:{width:"400",trigger:"hover"}},[n("p",[t._v(t._s(t.$t("fallback_connection_popover")))]),t._v(" "),n("i",{staticClass:"el-icon el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),t._v(" "),t.connectionsCount>1?n("el-select",{attrs:{clearable:""},model:{value:t.settings.misc.fallback_connection,callback:function(e){t.$set(t.settings.misc,"fallback_connection",e)},expression:"settings.misc.fallback_connection"}},t._l(t.settings.connections,(function(e,r){return n("el-option",{key:r,attrs:{disabled:t.settings.misc.default_connection==r,value:r,label:e.title+" - "+e.provider_settings.sender_email}})})),1):n("p",{staticStyle:{color:"#6d6b6b",margin:"0"}},[t._v(t._s(t.$t("Please add another connection to use fallback feature")))])],1),t._v(" "),n("el-form-item",{attrs:{label:t.$t("Email Simulation")}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.settings.misc.simulate_emails,callback:function(e){t.$set(t.settings.misc,"simulate_emails",e)},expression:"settings.misc.simulate_emails"}},[t._v(t._s(t.$t("Email_Simulation_Label")))]),t._v(" "),"yes"==t.settings.misc.simulate_emails?n("p",{staticStyle:{color:"red"}},[t._v(t._s(t.$t("Email_Simulation_Yes")))]):t._e()],1),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],attrs:{type:"success"},on:{click:function(e){return t.saveMiscSettings()}}},[t._v(t._s(t.$t("Save Settings")))])],1)],1)}),[],!1,null,null,null).exports;const Y={name:"NotificationSettings",data:function(){return{notification_settings:{},loading:!0,saving:!1,sending_days:{Mon:"Monday",Tue:"Tuesday",Wed:"Wednesday",Thu:"Thursday",Fri:"Friday",Sat:"Saturday",Sun:"Sunday"}}},methods:{getSettings:function(){var t=this;this.loading=!0,this.$get("settings/notification-settings").then((function(e){t.notification_settings=e.data.settings})).catch((function(t){console.log(t)})).always((function(){t.loading=!1}))},saveSettings:function(){var t=this;this.saving=!0,this.$post("settings/notification-settings",{settings:this.notification_settings}).then((function(e){t.$notify.success(e.data.message)})).catch((function(t){console.log(t)})).always((function(){t.saving=!1}))}},mounted:function(){this.getSettings()}};const J=(0,o.Z)(Y,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"fss_general_settings"},[n("el-form",{staticClass:"fss_compact_form",attrs:{data:t.notification_settings,"label-position":"top"}},[n("el-form-item",{attrs:{label:t.$t("Enable Email Summary Notification")}},[n("el-checkbox",{attrs:{"true-label":"yes","false-label":"no"},model:{value:t.notification_settings.enabled,callback:function(e){t.$set(t.notification_settings,"enabled",e)},expression:"notification_settings.enabled"}},[t._v(t._s(t.$t("Enable Email Summary")))])],1),t._v(" "),"yes"==t.notification_settings.enabled?[n("el-form-item",{attrs:{label:t.$t("Notification Email Addresses")}},[n("el-input",{attrs:{size:"small",placeholder:t.$t("Email Address")},model:{value:t.notification_settings.notify_email,callback:function(e){t.$set(t.notification_settings,"notify_email",e)},expression:"notification_settings.notify_email"}})],1),t._v(" "),n("el-form-item",{attrs:{label:t.$t("Notification Days")}},[n("el-checkbox-group",{model:{value:t.notification_settings.notify_days,callback:function(e){t.$set(t.notification_settings,"notify_days",e)},expression:"notification_settings.notify_days"}},t._l(t.sending_days,(function(t,e){return n("el-checkbox",{key:t,attrs:{value:t,label:e}})})),1)],1)]:t._e(),t._v(" "),n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.saving,expression:"saving"}],attrs:{type:"success"},on:{click:function(e){return t.saveSettings()}}},[t._v(t._s(t.$t("Save Settings")))])],2)],1)}),[],!1,null,null,null).exports;function Q(t,e,n,r,o,s,i){try{var a=t[s](i),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,o)}const X={name:"connection_details",props:["connection_id"],data:function(){return{loading:!1,connection_content:""}},methods:{fetchDetails:function(){var t,e=this;return(t=U().mark((function t(){var n;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$get("settings/connection_info",{connection_id:e.connection_id});case 3:n=t.sent,e.connection_content=n.data.info,e.loading=!1;case 6:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var s=t.apply(e,n);function i(t){Q(s,r,o,i,a,"next",t)}function a(t){Q(s,r,o,i,a,"throw",t)}i(void 0)}))})()}},created:function(){this.fetchDetails()}};function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(t,e,n,r,o,s,i){try{var a=t[s](i),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,o)}function rt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var s=t.apply(e,n);function i(t){nt(s,r,o,i,a,"next",t)}function a(t){nt(s,r,o,i,a,"throw",t)}i(void 0)}))}}const ot={name:"Connections",components:{Confirm:W,GeneralSettings:H,ConnectionDetails:(0,o.Z)(X,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"fss_connection_details",staticStyle:{"min-height":"200px"},attrs:{"element-loading-text":"Loading Details..."}},[n("div",{domProps:{innerHTML:t._s(t.connection_content)}})])}),[],!1,null,null,null).exports,NotificationSettings:J},data:function(){return{showing_connection:"",active_settings:"general"}},methods:{fetch:function(){var t=this;return rt(U().mark((function n(){var r;return U().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.$get("settings");case 2:r=n.sent,t.settings.mappings=r.data.settings.mappings,t.settings.connections=r.data.settings.connections,e()(t.settings.connections)&&t.$router.push({name:"dashboard",query:{is_redirect:"yes"}});case 6:case"end":return n.stop()}}),n)})))()},addConnection:function(){this.$router.push({name:"connection"})},editConnection:function(t){this.$router.push({name:"connection",query:{connection_key:t.unique_key}})},deleteConnection:function(t){var e=this;return rt(U().mark((function n(){var r;return U().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.$post("settings/delete",{key:t.unique_key});case 2:r=n.sent,e.settings.connections=r.data.connections,e.settings.misc.default_connection=r.data.misc.default_connection,e.$notify.success({title:"Great!",message:"Connection deleted Successfully.",offset:19});case 6:case"end":return n.stop()}}),n)})))()},showConnection:function(t){var e=this;this.showing_connection="",this.$nextTick((function(){e.showing_connection=t.unique_key}))}},computed:{connections:function(){var t=[];return jQuery.each(this.settings.connections,(function(e,n){t.push(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tt(Object(n),!0).forEach((function(e){et(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({unique_key:e,title:n.title},n.provider_settings))})),t}},created:function(){this.fetch()}};const st=(0,o.Z)(ot,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"connections"},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("div",{staticClass:"fss_content_box"},[n("div",{staticClass:"header"},[n("span",{staticStyle:{float:"left"}},[t._v("\n "+t._s(t.$t("Active Email Connections"))+"\n ")]),t._v(" "),n("span",{staticStyle:{float:"right",color:"#46A0FC",cursor:"pointer"},on:{click:t.addConnection}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "+t._s(t.$t("Add Another Connection"))+"\n ")])]),t._v(" "),n("div",{staticClass:"content"},[n("el-table",{attrs:{stripe:"",border:"",data:t.connections}},[n("el-table-column",{attrs:{label:t.$t("Provider")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.settings.providers[e.row.provider].title)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"sender_email",label:t.$t("From Email")}}),t._v(" "),n("el-table-column",{attrs:{width:"120",label:t.$t("Actions"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-edit"},on:{click:function(n){return t.editConnection(e.row)}}}),t._v(" "),n("el-button",{attrs:{type:"info",size:"mini",icon:"el-icon-view"},on:{click:function(n){return t.showConnection(e.row)}}}),t._v(" "),n("confirm",{on:{yes:function(n){return t.deleteConnection(e.row)}}},[n("el-button",{attrs:{slot:"reference",size:"mini",type:"danger",icon:"el-icon-delete"},slot:"reference"})],1)]}}])})],1),t._v(" "),t.connections.length>1?n("el-alert",{staticStyle:{"margin-top":"20px"},attrs:{closable:!1,type:"info"}},[t._v("\n "+t._s(t.$t("routing_info"))+"\n ")]):t._e()],1)]),t._v(" "),t.showing_connection?n("div",{staticClass:"fss_content_box"},[n("div",{staticClass:"header"},[n("span",{staticStyle:{float:"left"}},[t._v("\n "+t._s(t.$t("Connection Details"))+"\n ")]),t._v(" "),n("span",{staticStyle:{float:"right",color:"#46A0FC",cursor:"pointer"},on:{click:function(e){t.showing_connection=""}}},[t._v("\n "+t._s(t.$t("Close"))+"\n ")])]),t._v(" "),n("div",{staticClass:"content"},[n("connection-details",{attrs:{connection_id:t.showing_connection}})],1)]):t._e()]),t._v(" "),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"fss_content_box fss_box_action",class:{fss_box_active:"general"==t.active_settings},staticStyle:{"margin-bottom":"0px"}},[n("div",{staticClass:"header",on:{click:function(e){t.active_settings="general"}}},[t._v("\n "+t._s(t.$t("General Settings"))+"\n ")]),t._v(" "),"general"==t.active_settings?n("div",{staticClass:"content"},[n("general-settings")],1):t._e()]),t._v(" "),n("div",{staticClass:"fss_content_box fss_box_action",class:{fss_box_active:"notification"==t.active_settings}},[n("div",{staticClass:"header",on:{click:function(e){t.active_settings="notification"}}},[t._v("\n "+t._s(t.$t("Notification Settings"))+"\n ")]),t._v(" "),"notification"==t.active_settings?n("div",{staticClass:"content"},[n("notification-settings")],1):t._e()])])],1)],1)}),[],!1,null,null,null).exports;const it={name:"Connection",components:{ConnectionWizard:T},data:function(){return{active:1,title:"Add Connection",provider:{},provider_key:""}},methods:{},created:function(){var t=this.$route.query.connection_key;t&&"0"!==t&&(this.title=this.$t("Edit Connection"),this.provider=this.settings.connections[t].provider_settings,this.provider_key=t)}};const at=(0,o.Z)(it,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"connection"},[n("div",{staticClass:"header"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),n("div",{staticClass:"content"},[n("div",{staticClass:"fss_connection_intro"},[n("connection-wizard",{attrs:{connection:t.provider,connection_key:t.provider_key,providers:t.settings.providers}})],1)])])}),[],!1,null,null,null).exports;const lt={name:"Pagination",props:{pagination:{required:!0,type:Object}},computed:{page_sizes:function(){return[10,20,50,80,100,120,150]}},methods:{changePage:function(t){this.pagination.current_page=t,this.$emit("fetch")},changeSize:function(t){this.pagination.per_page=t,this.$emit("fetch")}}};const ct=(0,o.Z)(lt,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("el-pagination",{staticClass:"fluentcrm-pagination",attrs:{background:!1,layout:"total, sizes, prev, pager, next","hide-on-single-page":!1,"current-page":t.pagination.current_page,"page-sizes":t.page_sizes,"page-size":t.pagination.per_page,total:t.pagination.total},on:{"current-change":t.changePage,"size-change":t.changeSize,"update:currentPage":function(e){return t.$set(t.pagination,"current_page",e)},"update:current-page":function(e){return t.$set(t.pagination,"current_page",e)}}})}),[],!1,null,null,null).exports;const ut={name:"LogFilter",data:function(){return{filterBy:"",filterValue:""}},methods:{applyFilter:function(){this.filterValue&&this.$emit("on-filter",this.filterBy,this.filterValue)},clearFilterValue:function(){this.filterValue=""}},watch:{filterBy:function(t,e){t!==e&&t&&e&&(this.filterValue="")},filterValue:function(t,e){t?this.$emit("on-filter-change",this.filterBy,this.filterValue):(this.$emit("reset-page"),this.$emit("on-filter",this.filterBy,this.filterValue)),t!==e&&this.$emit("reset-page")}},mounted:function(){var t=this.$route.query.filterBy,e=this.$route.query.filterValue;t&&(this.filterBy=t,this.filterValue=e,this.applyFilter())}};const pt=(0,o.Z)(ut,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{float:"left","margin-left":"10px"}},[n("el-row",{staticStyle:{"margin-right":"-20px"},attrs:{gutter:10}},[n("el-col",{attrs:{span:10}},[n("el-select",{attrs:{clearable:"",size:"small",placeholder:t.$t("Filter By")},on:{clear:t.clearFilterValue},model:{value:t.filterBy,callback:function(e){t.filterBy=e},expression:"filterBy"}},[n("el-option",{attrs:{label:t.$t("Status"),value:"status"}}),t._v(" "),n("el-option",{attrs:{label:t.$t("Date"),value:"date"}}),t._v(" "),n("el-option",{attrs:{label:t.$t("Date Range"),value:"daterange"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:10}},[t.filterBy&&"status"!==t.filterBy?t._e():n("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",size:"small",disabled:!t.filterBy,placeholder:t.$t("Select")},model:{value:t.filterValue,callback:function(e){t.filterValue=e},expression:"filterValue"}},[n("el-option",{attrs:{label:t.$t("Successful"),value:"sent"}}),t._v(" "),n("el-option",{attrs:{label:t.$t("Failed"),value:"failed"}})],1),t._v(" "),n("el-date-picker",{directives:[{name:"show",rawName:"v-show",value:t.filterBy&&"date"===t.filterBy,expression:"filterBy && filterBy==='date'"}],staticStyle:{width:"100%"},attrs:{format:"dd-MM-yyyy","value-format":"yyyy-MM-dd",size:"small",type:"date",placeholder:t.$t("Select date")},model:{value:t.filterValue,callback:function(e){t.filterValue=e},expression:"filterValue"}}),t._v(" "),n("el-date-picker",{directives:[{name:"show",rawName:"v-show",value:t.filterBy&&"daterange"===t.filterBy,expression:"filterBy && filterBy==='daterange'"}],staticStyle:{width:"100%"},attrs:{format:"dd-MM-yyyy","value-format":"yyyy-MM-dd",size:"small",type:"daterange",placeholder:t.$t("Select date and time"),"range-separator":"To","start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date")},model:{value:t.filterValue,callback:function(e){t.filterValue=e},expression:"filterValue"}})],1),t._v(" "),n("el-col",{attrs:{span:4}},[n("el-button",{attrs:{plain:"",size:"small",type:"primary",disabled:!t.filterValue},on:{click:t.applyFilter}},[t._v(t._s(t.$t("Filter")))])],1)],1)],1)}),[],!1,null,null,null).exports;const _t={name:"EmailbodyContainer",props:["content"],data:function(){return{}},methods:{setBody:function(t){var e=this;this.$nextTick((function(){var n=e.$refs.ifr;(n.contentDocument||n.contentWindow.document).body.innerHTML=t}))},onMouseOver:function(){this.$refs.fullscreen.classList.add("show")},onMouseOut:function(){this.$refs.fullscreen.classList.remove("show")},fullScreen:function(){var t=document,e=this.$refs.ifr;(t.fullscreenEnabled||t.webkitFullscreenEnabled||t.mozFullScreenEnabled||t.msFullscreenEnabled)&&(e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen())}},watch:{content:{immediate:!0,handler:"setBody"}}};function ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const vt={name:"LogViewer",props:["logViewerProps"],components:{EmailbodyContainer:(0,o.Z)(_t,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{on:{mouseover:t.onMouseOver,mouseleave:t.onMouseOut}},[n("span",{ref:"fullscreen",staticClass:"full-screen-text",on:{click:t.fullScreen}},[t._v("\n "+t._s(t.$t("Enter Full Screen"))+"\n ")]),t._v(" "),n("iframe",{ref:"ifr",staticStyle:{width:"100%",height:"400px"},attrs:{frameborder:"0",allowFullScreen:"",mozallowfullscreen:"",webkitallowfullscreen:""}})])}),[],!1,null,null,null).exports},data:function(){return{activeName:"email_body",loading:!1,next:!1,prev:!1,retrying:!1}},methods:{navigate:function(t){var e=this,n={dir:t,id:this.log.id,query:this.logViewerProps.query,filter_by:this.logViewerProps.filterBy,filter_by_value:this.logViewerProps.filterByValue};this.loading=!0,this.$get("logs/show",n).then((function(n){if(!t)return e.next=n.data.next.length,void(e.prev=n.data.prev.length);e.logViewerProps.log=n.data.log,e.next=n.data.next,e.prev=n.data.prev})).fail((function(t){console.log(t)})).always((function(){e.loading=!1}))},getAttachments:function(t){if(!t)return[];if(!t.attachments)return[];if(!Array.isArray(t.attachments))return[t.attachments];var e=[];return t.attachments.forEach((function(t,n){e[n]=t})),e},closed:function(){this.next=!0,this.prev=!0,this.activeName="email_body"},getAttachmentName:function(t){if(t&&t[0])return(t=t[0].replace(/\\/g,"/")).split("/").pop()},handleRetry:function(t,e){var n=this;this.retrying=!0,this.$post("logs/retry",{id:t.id,type:e}).then((function(t){n.logViewerProps.retries=t.data.email.retries,n.logViewerProps.log.status=t.data.email.status,n.logViewerProps.log.updated_at=t.data.email.updated_at,n.logViewerProps.log.resent_count=t.data.email.resent_count})).fail((function(t){n.$notify.error({offset:19,title:"Oops!!",message:t.responseJSON.data.message})})).always((function(){n.retrying=!1}))}},computed:{log:{get:function(){var t;return this.logViewerProps.log&&((t=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(n),!0).forEach((function(e){dt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.logViewerProps.log)).headers||(t.headers={}),t.response||(t.response={}),t.extra||(t.extra={})),t},set:function(t){this.logViewerProps.log=t}}}};const mt={name:"BulkAction",props:["selected","haslogs"],data:function(){return{action:"",resending:!1}},computed:{is_failed_selected:function(){return!!this.selected.length}},methods:{applyBulkAction:function(){this.$emit("on-bulk-action",{action:this.action}),this.action=""}},watch:{selected:function(t){"deleteselected"===this.action&&(this.action=t.length?this.action:"")}}};const ht={name:"EmailLog",components:{Confirm:W,Pagination:ct,LogFilter:pt,LogViewer:(0,o.Z)(vt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"log-viewer"},[t.log?n("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.retrying,expression:"retrying"}],attrs:{title:"Email Log",visible:t.logViewerProps.dialogVisible},on:{closed:t.closed,"update:visible":function(e){return t.$set(t.logViewerProps,"dialogVisible",e)}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[n("ul",{staticClass:"fss_log_items"},[n("li",[n("div",{staticClass:"item_header"},[t._v("Status:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{class:{success:"sent"==t.log.status,resent:"resent"==t.log.status,fail:"failed"==t.log.status}},[n("span",{staticStyle:{"text-transform":"capitalize","margin-right":"10px"}},[t._v(t._s(t.log.status))]),t._v(" "),"failed"==t.log.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh",plain:!0},on:{click:function(e){return t.handleRetry(t.log,"retry")}}},[t._v(t._s(t.$t("Retry")))]):t._e(),t._v(" "),"sent"==t.log.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh-right"},on:{click:function(e){return t.handleRetry(t.log,"resend")}}},[t._v("\n "+t._s(t.$t("Resend"))+"\n ")]):t._e()],1)])]),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v(t._s(t.$t("Date-Time"))+":")]),t._v(" "),n("div",{staticClass:"item_content"},[t._v(t._s(t.log.created_at))])]),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v("From:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.from)}})])]),t._v(" "),t.log.headers&&t.log.headers["Reply-To"]?n("li",[n("div",{staticClass:"item_header"},[t._v("Reply To:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.headers["Reply-To"])}})])]):t._e(),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v("To:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.to)}})])]),t._v(" "),t.log.headers?[t.log.headers.Cc?n("li",[n("div",{staticClass:"item_header"},[t._v("CC:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.headers.Cc)}})])]):t._e(),t._v(" "),t.log.headers.Bcc?n("li",[n("div",{staticClass:"item_header"},[t._v("BCC:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.headers.Bcc)}})])]):t._e()]:t._e(),t._v(" "),t.log.resent_count>0?n("li",[n("div",{staticClass:"item_header"},[t._v(t._s(t.$t("Resent Count"))+":")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.resent_count)}})])]):t._e(),t._v(" "),n("li",[n("div",{staticClass:"item_header"},[t._v(t._s(t.$t("Subject"))+":")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",{domProps:{innerHTML:t._s(t.log.subject)}})])]),t._v(" "),t.log.extra&&t.log.extra.provider&&t.settings.providers[t.log.extra.provider]?n("li",[n("div",{staticClass:"item_header"},[t._v("Mailer:")]),t._v(" "),n("div",{staticClass:"item_content"},[n("span",[t._v(t._s(t.settings.providers[t.log.extra.provider].title))])])]):t._e()],2),t._v(" "),n("el-collapse",{staticStyle:{"margin-top":"10px"},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-collapse-item",{attrs:{name:"email_body"}},[n("template",{slot:"title"},[n("strong",{staticStyle:{color:"#606266"}},[t._v(t._s(t.$t("Email Body")))])]),t._v(" "),n("hr",{staticClass:"log-border"}),t._v(" "),n("EmailbodyContainer",{attrs:{content:t.log.body}})],2),t._v(" "),n("el-collapse-item",{attrs:{name:"attachments"}},[n("template",{slot:"title"},[n("strong",{staticStyle:{color:"#606266"}},[t._v("\n "+t._s(t.$t("Attachments"))+" ("+t._s(t.getAttachments(t.log).length)+")\n ")])]),t._v(" "),n("hr",{staticClass:"log-border"}),t._v(" "),t._l(t.getAttachments(t.log),(function(e,r){return n("div",{key:r,staticStyle:{margin:"5px 0 10px 0"}},[t._v("\n ("+t._s(r+1)+") "+t._s(t.getAttachmentName(e))+"\n ")])}))],2),t._v(" "),n("el-collapse-item",{attrs:{name:"tech_info"}},[n("template",{slot:"title"},[n("strong",{staticStyle:{color:"#606266"}},[t._v("Technical Information")])]),t._v(" "),n("div",[n("hr"),n("strong",[t._v("Response\n ")]),n("hr"),t._v(" "),n("el-row",[n("el-col",[n("pre",[t._v(t._s(t.log.response))])])],1),t._v(" "),n("hr"),t._v(" "),n("strong",[t._v("Headers")]),n("hr"),t._v(" "),n("el-row",[n("el-col",[n("pre",{domProps:{innerHTML:t._s(Object.assign({},t.log.headers,t.log.extra.custom_headers))}})])],1)],1)],2)],1),t._v(" "),n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("el-button",{staticClass:"prev nav",attrs:{size:"small",disabled:!t.prev},on:{click:function(e){return t.navigate("prev")}}},[n("i",{staticClass:"el-icon-arrow-left"}),t._v(" "+t._s(t.$t("Prev"))+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-button",{staticClass:"next nav",attrs:{size:"small",disabled:!t.next},on:{click:function(e){return t.navigate("next")}}},[t._v("\n "+t._s(t.$t("Next"))+" "),n("i",{staticClass:"el-icon-arrow-right"})])],1)],1)],1)]):t._e()],1)}),[],!1,null,null,null).exports,LogBulkAction:(0,o.Z)(mt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{float:"left","margin-left":"10px"}},[n("el-row",{attrs:{gutter:10}},[n("el-col",{attrs:{span:12}},[n("el-select",{attrs:{clearable:"",size:"small",tplaceholder:t.$t("Bulk Action"),disabled:!t.haslogs},model:{value:t.action,callback:function(e){t.action=e},expression:"action"}},[n("el-option",{attrs:{value:"deleteall",label:t.$t("Delete All")}}),t._v(" "),t.selected.length?n("el-option",{attrs:{value:"deleteselected",label:"Delete Selected"}}):t._e(),t._v(" "),t.is_failed_selected?n("el-option",{attrs:{value:"resend_selected",label:t.$t("Resend Selected Emails")}}):t._e()],1)],1),t._v(" "),n("el-col",{attrs:{span:2}},[n("el-button",{attrs:{plain:"",size:"small",type:"primary",disabled:!t.action},on:{click:t.applyBulkAction}},[t._v(t._s(t.$t("Apply")))])],1)],1)],1)}),[],!1,null,null,null).exports},data:function(){return{log:null,logs:[],saving:!1,loading:!1,deleting:!1,query:"",filterBy:"",filterByValue:"",logViewerProps:{log:null,dialogVisible:!1},pagination:{total:0,per_page:10,current_page:1},selectedLogs:[],form:null,logAlertInfo:null}},methods:{tableRowClassName:function(t){return"row_type_"+t.row.status},pageChanged:function(){this.$router.push({name:"logs",query:{search:this.query,filterBy:this.filterBy,filterValue:this.filterByValue,page:this.pagination.current_page,per_page:this.pagination.per_page}}).catch((function(t){"NavigationDuplicated"!==t.name&&console.log(t.message)}))},fetch:function(){var t=this;this.loading=!0;var e={per_page:this.pagination.per_page,page:this.pagination.current_page,filter_by_value:this.filterByValue,filter_by:this.filterBy,query:this.query};this.$get("logs",e).then((function(e){t.logs=t.formatLogs(e.data),t.pagination.total=e.total;var n=Number(t.$route.query.page);t.pagination.current_page=n||t.pagination.current_page})).fail((function(t){console.log(t)})).always((function(){t.loading=!1}))},formatLogs:function(t){var e=this;return jQuery.each(t,(function(n,r){t[n]=e.formatLog(r)})),t},formatLog:function(t){var e=this;t.to=this.formatAddresses(t.to),t.headers?(t.headers.cc=this.formatAddresses(t.headers.cc),t.headers.bcc=this.formatAddresses(t.headers.bcc),t.headers["reply-to"]=this.formatAddresses(t.headers["reply-to"])):t.headers={};var n={};return t.headers&&jQuery.each(t.headers,(function(t,r){t&&(t=t.split("-").map((function(t){return e.ucFirst(t)})).join("-"),n[t]=r)})),t.headers=n,t},formatAddresses:function(t){var e=this;if(!t)return"";var n=[];return jQuery.each(t,(function(t,r){r.name?n[t]=e.escapeHtml("".concat(r.name," <").concat(r.email,">")):n[t]=e.escapeHtml(r.email)})),n.join(", ")},onFilter:function(t,e){this.filterBy=t,this.filterByValue=e,this.pageChanged()},onFilterChange:function(t,e){this.filterBy=t,this.filterByValue=e},onSearch:function(t){this.query=t,this.pagination.current_page=1,this.pageChanged(),this.fetch()},onSearchChange:function(t){this.query=t,this.fetch()},handleBulkAction:function(t){var e=t.action;return"deleteall"===e?this.handleDelete("all"):"deleteselected"===e?this.handleDelete(this.selectedLogs):"resend_selected"===e?this.handleResendBulk(this.selectedLogs):void 0},handleRetry:function(t,e){var n=this;this.loading=!0,this.$post("logs/retry",{id:t.id,type:e}).then((function(e){if(!e.data.email)return n.$notify.error({offset:19,title:"Oops!!",message:e.data.message}),!1;t.status=e.data.email.status,t.retries=e.data.email.retries,t.resent_count=e.data.email.resent_count,t.updated_at=e.data.email.updated_at,n.$notify.success({offset:19,title:"Great!",message:e.data.message})})).fail((function(t){n.$notify.error({offset:19,title:"Oops!!",message:t.responseJSON.data.message})})).always((function(){n.loading=!1}))},handleView:function(t){var e=this;this.logViewerProps.log=t,this.logViewerProps.dialogVisible=!0,this.$nextTick((function(){e.logViewerProps.query=e.query,e.logViewerProps.filterBy=e.filterBy,e.logViewerProps.filterByValue=e.filterByValue;var t=e.$children.find((function(t){return"LogViewer"===t.$options._componentTag}));t&&t.navigate()}))},handleDelete:function(t){var e=this;this.deleting=!0,this.$post("logs/delete",{id:t}).then((function(t){e.fetch(),e.$notify.success({offset:19,title:"Great!",message:t.data.message})})).fail((function(t){console.log(t)})).always((function(){e.deleting=!1}))},handleSelectionChange:function(t){this.selectedLogs=t.map((function(t){return Number(t.id)}))},saveMisc:function(){var t=this;this.loading=!0,this.$post("misc-settings",{settings:this.form}).then((function(e){t.$notify.success(e.data.message)})).catch((function(t){console.log(t)})).always((function(){t.loading=!1}))},dontShowStatusInfo:function(t){"icons"===t?this.logAlertInfo.show_status_info=!1:this.logAlertInfo.show_status_warning=!1,window.localStorage.setItem("log-settings",JSON.stringify(this.logAlertInfo))},turnOnEmailLogging:function(){this.form.log_emails="yes",this.saveMisc()},handleResendBulk:function(t){var e=this;if(t.length>20)return this.$notify.error({offset:19,title:"Oops!!",message:"Sorry, You can not resend more than 20 emails at once"}),!1;this.loading=!0,this.$post("logs/retry-bulk",{log_ids:t}).then((function(t){e.$notify.success({offset:19,title:"Result",message:t.data.message}),e.selectedLogs=[],e.fetch()})).fail((function(t){e.$notify.error({offset:19,title:"Oops!!",message:t.responseJSON.data.message})})).always((function(){e.loading=!1}))}},watch:{$route:{immediate:!0,handler:function(t,e){var n=this.pagination.current_page,r=this.pagination.per_page;this.query=t.query.search||this.query,this.filterBy=t.query.filterBy||this.filterBy,this.filterBy=t.query.filterBy||this.filterBy,this.filterByValue=t.query.filterValue||this.filterByValue,this.pagination.current_page=Number(t.query.page)||n,this.pagination.per_page=Number(t.query.per_page)||r,this.fetch()}}},computed:{isLogsOn:function(){return"yes"===this.form.log_emails},emailLogs:function(){var t=this;return this.logs.map((function(e){return e.created_at=t.$dateFormat(e.created_at,"DD-MM-YYYY h:mm:ss A"),e}))},logStatusInfo:function(){return this.logAlertInfo.show_status_info},logStatusWarning:function(){return this.logAlertInfo.show_status_warning}},created:function(){var t=this.$route.query.page;t&&(this.pagination.current_page=Number(t)),this.form=this.appVars.settings.misc,this.logAlertInfo=window.localStorage.getItem("log-settings"),this.logAlertInfo||window.localStorage.setItem("log-settings",JSON.stringify({show_status_info:!0,show_status_warning:!0})),this.logAlertInfo=JSON.parse(window.localStorage.getItem("log-settings"))}};const gt=(0,o.Z)(ht,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"logs"},[n("div",[n("div",{staticClass:"header"},[n("div",{staticStyle:{float:"left","margin-top":"6px"}},[t._v(t._s(t.$t("Email Logs")))]),t._v(" "),n("LogFilter",{on:{"on-filter":t.onFilter,"on-filter-change":t.onFilterChange,"reset-page":function(e){t.pagination.current_page=1}}}),t._v(" "),n("LogBulkAction",{attrs:{selected:t.selectedLogs,haslogs:t.logs.length,filterBy:t.filterBy,filterByValue:t.filterByValue},on:{"on-bulk-action":t.handleBulkAction}}),t._v(" "),n("div",{staticStyle:{float:"right"}},[n("el-input",{attrs:{clearable:"",size:"small",placeholder:t.$t("Type & press enter...")},on:{clear:function(e){t.query=""}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.fetch.apply(null,arguments)}},model:{value:t.query,callback:function(e){t.query=e},expression:"query"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.fetch},slot:"append"})],1)],1)],1),t._v(" "),t.loading?n("el-skeleton",{staticClass:"content",attrs:{rows:15}}):n("div",{staticClass:"content"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{stripe:"",data:t.emailLogs,"row-class-name":t.tableRowClassName},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("Subject")},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[t._v(t._s(e.row.subject))])]}}],null,!1,3588226669)}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("To")},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",{domProps:{innerHTML:t._s(e.row.to)}})]}}],null,!1,521936248)}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("Status"),width:"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.status)+"\n ")]}}],null,!1,1326110409)}),t._v(" "),n("el-table-column",{attrs:{prop:"created_at",label:t.$t("Date-Time"),width:"200px"}}),t._v(" "),n("el-table-column",{attrs:{label:t.$t("Actions"),width:"190px",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return["failed"==e.row.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh",plain:!0},on:{click:function(n){return t.handleRetry(e.row,"retry")}}},[t._v(t._s(t.$t("Retry")))]):t._e(),t._v(" "),"sent"==e.row.status?n("el-button",{attrs:{size:"mini",type:"success",icon:"el-icon-refresh-right"},on:{click:function(n){return t.handleRetry(e.row,"resend")}}},[t._v("\n "+t._s(t.$t("Resend"))+"\n "),e.row.resent_count>0?n("span",[t._v("("+t._s(e.row.resent_count)+")")]):t._e()]):t._e(),t._v(" "),n("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-view"},on:{click:function(n){return t.handleView(e.row)}}}),t._v(" "),n("confirm",{on:{yes:function(n){return t.handleDelete(e.row.id)}}},[n("el-button",{attrs:{slot:"reference",size:"mini",type:"danger",icon:"el-icon-delete"},slot:"reference"})],1)]}}],null,!1,1438621537)})],1),t._v(" "),n("div",{staticStyle:{"margin-top":"20px","text-align":"right"}},[n("pagination",{attrs:{pagination:t.pagination},on:{fetch:t.pageChanged}})],1)],1),t._v(" "),n("LogViewer",{attrs:{logViewerProps:t.logViewerProps}})],1),t._v(" "),t.isLogsOn?t._e():n("div",[n("div",{staticClass:"content"},[n("el-alert",{attrs:{closable:!1,"show-icon":"",center:""}},[t._v("\n Email Logging is currently turned off. Only Failed and resent emails will be shown here\n "),n("el-button",{attrs:{type:"text"},on:{click:t.turnOnEmailLogging}},[t._v(t._s(t.$t("Turn On")))]),t._v(".\n ")],1)],1)])])}),[],!1,null,null,null).exports;function yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const wt={name:"EmailTest",components:{EmailSubscriber:B},data:function(){return{loading:!1,debug_info:"",form:{from:"",email:"",isHtml:!0},email_success:!1}},methods:{sendEmail:function(){var t=this;this.loading=!0,this.debug_info="",this.$post("settings/test",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(n),!0).forEach((function(e){bt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.form)).then((function(e){t.$notify.success({title:"Great!",offset:19,message:e.data.message}),t.email_success=!0})).fail((function(e){if(504===Number(e.status))return t.$notify.error({title:"Oops!",offset:19,message:"504 Gateway Time-out."});var n=e.responseJSON;if(n.data.email_error)return t.$notify.error({title:"Oops!",offset:19,message:n.data.email_error});t.debug_info=n.data})).always((function(){t.loading=!1}))}},computed:{active:function(){return"yes"!==this.settings.misc.is_inactive},inactiveMessage:function(){return"Plugin is not configured properly."},maybeEnabled:function(){return!e()(this.settings.connections)},sender_emails:function(){return this.settings.mappings}},created:function(){this.form.email=this.settings.user_email}};const kt=(0,o.Z)(wt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"header"},[t._v("\n Send Test Email\n ")]),t._v(" "),n("div",{staticClass:"content"},[t.email_success?n("div",{staticClass:"success_wrapper"},[t._m(0),t._v(" "),n("h3",[t._v("Test Email Has been successfully sent")]),t._v(" "),n("hr"),t._v(" "),"yes"==t.appVars.require_optin?n("div",{staticStyle:{"margin-top":"10px"}},[n("email-subscriber")],1):n("el-button",{directives:[{name:"else",rawName:"v-else"}],on:{click:function(e){t.email_success=!1}}},[t._v("Run Another Test Email")])],1):n("div",{staticClass:"test_form"},[n("el-form",{ref:"form",attrs:{model:t.form,"label-position":"left","label-width":"120px"}},[n("el-form-item",{attrs:{for:"email",label:"From"}},[n("el-select",{attrs:{placeholder:"Select Email or Type","allow-create":!0,filterable:!0},model:{value:t.form.from,callback:function(e){t.$set(t.form,"from",e)},expression:"form.from"}},t._l(t.sender_emails,(function(t,e){return n("el-option",{key:e,attrs:{label:e,value:e}})})),1),t._v(" "),n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Enter the sender email address (optional).\n ")])],1),t._v(" "),n("el-form-item",{attrs:{for:"from",label:"Send To"}},[n("el-input",{attrs:{id:"from"},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}}),t._v(" "),n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Enter email address where test email will be sent (By default, logged in user email will be used if email address is not provide).\n ")])],1),t._v(" "),n("el-form-item",{attrs:{for:"isHtml",label:"HTML"}},[n("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#dcdfe6","active-text":"On","inactive-text":"Off"},model:{value:t.form.isHtml,callback:function(e){t.$set(t.form,"isHtml",e)},expression:"form.isHtml"}}),t._v(" "),n("span",{staticClass:"small-help-text",staticStyle:{display:"block","margin-top":"-10px"}},[t._v("\n Send this email in HTML or in plain text format.\n ")])],1),t._v(" "),n("el-form-item",{attrs:{align:"left"}},[n("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-s-promotion",loading:t.loading,disabled:!t.maybeEnabled},on:{click:t.sendEmail}},[t._v("Send Test Email")]),t._v(" "),t.maybeEnabled?t._e():n("el-alert",{staticStyle:{display:"inline","margin-left":"20px"},attrs:{closable:!1,type:"warning"}},[t._v(t._s(t.inactiveMessage))])],1)],1),t._v(" "),t.debug_info?n("el-alert",{attrs:{type:"error",title:t.debug_info.message,"show-icon":""}}):t._e()],1)])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",[e("i",{staticClass:"el-icon el-icon-success"})])}],!1,null,null,null).exports;var xt=n(5534),St=n.n(xt);const $t={name:"FluentMailSupport",data:function(){return{plugins:{fluentform:{slug:"fluentform",title:"Fluent Forms",subtitle:"Fastest Contact Form Builder Plugin for WordPress",description:'<p><a href="https://wordpress.org/plugins/fluentform" target="_blank" rel="nofollow">Fluent Forms</a> is the ultimate user-friendly, fast, customizable drag-and-drop WordPress Contact Form Plugin that offers you all the premium features, plus many more completely unique additional features.</p>',btn_text:"Install Fluent Forms (Free)",btn_class:"",plugin_url:"https://wordpress.org/plugins/fluentform"},fluent_crm:{slug:"fluent-crm",title:"FluentCRM",subtitle:"Email Marketing Automation and CRM Plugin for WordPress",description:'<p><a href="https://wordpress.org/plugins/fluent-crm/" target="_blank" rel="nofollow">FluentCRM</a> is the best and complete feature-rich Email Marketing & CRM solution. It is also the simplest and fastest CRM and Marketing Plugin on WordPress. Manage your customer relationships, build your email lists, send email campaigns, build funnels, and make more profit and increase your conversion rates. (Yes, It’s Free!)</p>',btn_text:"Install FluentCRM (Free)",btn_class:"fss_fluentcrm_btn",plugin_url:"https://wordpress.org/plugins/fluent-crm/"},ninja_tables:{slug:"ninja-tables",title:"Ninja Tables",subtitle:"Best WP DataTables Plugin for WordPress",description:'<p>Looking for a WordPress table plugin for your website? Then you’re in the right place.</p><p>Meet <a href="https://wordpress.org/plugins/ninja-tables/" target="_blank" rel="nofollow">Ninja Tables</a>, the best WP table plugin that comes with all the solutions to the problems you face while creating tables on your posts/pages.</p>',btn_text:"Install Ninja Tables (Free)",btn_class:"fss_ninjatables_btn",plugin_url:"https://wordpress.org/plugins/ninja-tables/"}},installing:!1,installed_info:!1,installed_message:""}},computed:{plugin:function(){if(this.appVars.disable_recommendation)return!1;var t=[];return this.appVars.has_fluentform||t.push(this.plugins.fluentform),this.appVars.has_ninja_tables||t.push(this.plugins.ninja_tables),this.appVars.has_fluentcrm||t.push(this.plugins.fluent_crm),!!t.length&&St()(t)}},methods:{installPlugin:function(t){var e=this;this.installing=!0,this.$post("install_plugin",{plugin_slug:t}).then((function(t){e.installed_info=t.info,e.installed_message=t.message})).fail((function(t){e.$notify.error(t.responseJSON.data.message),alert(t.responseJSON.data.message)})).always((function(){e.installing=!1}))}}};const Ct=(0,o.Z)($t,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fss_support"},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{md:8,sm:24}},[n("div",{staticClass:"fss_about"},[n("div",{staticClass:"header"},[t._v("About")]),t._v(" "),n("div",{staticClass:"content"},[n("p",[n("a",{attrs:{href:t.appVars.plugin_url,target:"_blank",rel:"noopener"}},[t._v("FluentSMTP")]),t._v(" is a free and opensource WordPress Plugin. Our mission is to provide the ultimate\n email delivery solution with your favorite Email sending service. FluentSMTP is built for performance and speed.\n ")]),t._v(" "),n("p",[t._v("\n FluentSMTP is free and will be always free. This is our pledge to WordPress community from WPManageNinja LLC.\n ")]),t._v(" "),n("div",[n("p",[t._v("FluentSMTP is built using the following opensorce libraries and softwares")]),t._v(" "),n("ul",{staticStyle:{"list-style":"disc","margin-left":"30px"}},[n("li",[t._v("VueJS")]),t._v(" "),n("li",[t._v("ChartJS")]),t._v(" "),n("li",[t._v("Lodash")]),t._v(" "),n("li",[t._v("WordPress API")])]),t._v(" "),n("p",[t._v("\n If you find an issue or have a suggestion please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://github.com/WPManageNinja/fluent-smtp/issues"}},[t._v("open an issue on GitHub")]),t._v(".\n "),n("br"),t._v("If you are a developer and would like to contribute to the project, Please "),n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://github.com/WPManageNinja/fluent-smtp/"}},[t._v("contribute on GitHub")]),t._v(".\n ")]),t._v(" "),n("p",[t._v("Please "),n("a",{attrs:{target:"_blank",rel:"noopener",href:"http://fluentsmtp.com/docs"}},[t._v("read the documentation here")])])])])])]),t._v(" "),t.plugin||t.installed_info?n("el-col",{attrs:{md:8,sm:24}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.installing,expression:"installing"}],staticClass:"fss_about",attrs:{"element-loading-text":"Installing... Please wait"}},[n("div",{staticClass:"header"},[t._v("Recommended Plugin")]),t._v(" "),n("div",{staticClass:"content"},[t.installed_info?n("div",{staticClass:"install_success"},[n("h3",[t._v(t._s(t.installed_message))]),t._v(" "),n("a",{staticClass:"el-button el-button--success installed_dashboard_url",attrs:{href:t.installed_info.admin_url}},[t._v(t._s(t.installed_info.title))])]):n("div",{staticClass:"fss_plugin_block"},[n("div",{staticClass:"fss_plugin_title"},[n("h3",[t._v(t._s(t.plugin.title))]),t._v(" "),n("p",[t._v(t._s(t.plugin.subtitle))])]),t._v(" "),n("div",{staticClass:"fss_plugin_body"},[n("div",{domProps:{innerHTML:t._s(t.plugin.description)}}),t._v(" "),n("div",{staticClass:"fss_install_btn"},[t.appVars.disable_installation?n("a",{staticClass:"el-button el-button--success fss_ninjatables_btn",attrs:{href:t.plugin.plugin_url,target:"_blank",rel:"noopener"}},[n("span",[t._v("View "+t._s(t.plugin.title))])]):n("el-button",{class:t.plugin.btn_class,attrs:{type:"success"},on:{click:function(e){return t.installPlugin(t.plugin.slug)}}},[t._v(t._s(t.plugin.btn_text))])],1)])])])])]):t._e(),t._v(" "),n("el-col",{attrs:{md:8,sm:24}},[n("div",{staticClass:"fss_about"},[n("div",{staticClass:"header"},[t._v("Community")]),t._v(" "),n("div",{staticClass:"content"},[n("p",[t._v("FluentSMTP is powered by community. We listen to our community users and build products that add values to businesses and save time.")]),t._v(" "),n("p",[t._v("Join our communities and participate in great conversations.")]),t._v(" "),n("ul",{staticStyle:{"list-style":"disc","margin-left":"30px"}},[n("li",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://www.facebook.com/groups/fluentforms"}},[t._v("Join FluentForms Facebook Community")])]),t._v(" "),n("li",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://www.facebook.com/groups/fluentcrm"}},[t._v("Join FluentCRM Facebook Community")])]),t._v(" "),n("li",[n("a",{attrs:{target:"_blank",rel:"nofollow",href:"https://wordpress.org/support/plugin/fluent-smtp/reviews/?filter=5"}},[t._v("Write a review (really appreciate 😊)")])]),t._v(" "),n("li",[n("a",{attrs:{target:"_blank",rel:"noopener",href:"http://fluentsmtp.com/docs"}},[t._v("Read the documentation")])])])])])])],1)],1)}),[],!1,null,null,null).exports;var Pt=n(3105),Et=n.n(Pt);const At={name:"Documentations",data:function(){return{search:"",fetching:!1,docs:[],utl_param:"?utm_source=wp&utm_medium=doc&utm_campaign=doc"}},computed:{doc_cats:function(){if(!this.docs.length)return[];var t={item_4:{label:"Getting Started",docs:[]},item_5:{label:"Connect With Your Email Providers",docs:[]},item_6:{label:"Functionalities",docs:[]}};return M()(this.docs,(function(e){var n="item_"+e.category.value;t[n]||(t[n]={label:e.category.label,cat_id:e.category.value,docs:[]}),t[n].docs.push(e)})),Object.values(t)},search_items:function(){var t=this;return this.search&&this.docs.length?Et()(this.docs,(function(e){return e.title.includes(t.search)||e.content.includes(t.search)})):[]}},methods:{openSearch:function(){},fetchDocs:function(){var t=this;this.fetching=!0,this.$get("docs").then((function(e){t.docs=e.docs})).catch((function(t){console.log(t)})).always((function(){t.fetching=!1}))},$t:function(t){return t}},mounted:function(){this.fetchDocs()}};const Ot=[{name:"dashboard",path:"/",meta:{},component:K},{name:"connections",path:"/connections",meta:{},component:st},{name:"connection",path:"/connection",meta:{},component:at},{name:"test",path:"/test",meta:{},component:kt},{name:"support",path:"/support",meta:{},component:Ct},{name:"logs",path:"/logs",meta:{},component:gt},{name:"docs",path:"/documentation",meta:{},component:(0,o.Z)(At,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"fc_docs"},[n("div",{staticClass:"fc_doc_header text-align-center",staticStyle:{"max-width":"800px",margin:"50px auto",padding:"0px 20px","text-align":"center"}},[n("h1",[t._v("How can we help you?")]),t._v(" "),t._m(0),t._v(" "),n("el-input",{directives:[{name:"loading",rawName:"v-loading",value:t.fetching,expression:"fetching"}],attrs:{clearable:"",disabled:t.fetching,size:"large",placeholder:t.$t("Search Type and Enter...")},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},slot:"append"})],1),t._v(" "),t.search?n("div",{staticClass:"search_result"},[n("div",{staticClass:"fc_doc_items"},[n("div",{staticClass:"fc_doc_header"},[n("h3",[t._v(t._s(t.$t("Search Results for"))+": "+t._s(t.search))])]),t._v(" "),n("div",{staticClass:"fc_doc_lists"},[t.search_items.length?n("ul",t._l(t.search_items,(function(e){return n("li",{key:e.id},[n("a",{attrs:{target:"_blank",href:e.link+t.utl_param},domProps:{innerHTML:t._s(e.title)}})])})),0):n("p",[t._v("Sorry! No docs found")])])])]):t._e()],1),t._v(" "),t.fetching?n("el-skeleton",{staticClass:"doc_body content",attrs:{rows:8}}):n("div",{staticClass:"doc_body"},t._l(t.doc_cats,(function(e,r){return n("div",{key:r,staticClass:"doc_each_items"},[n("div",{staticClass:"fc_doc_items"},[n("div",{staticClass:"fc_doc_header"},[n("h3",[t._v(t._s(e.label))])]),t._v(" "),n("div",{staticClass:"fc_doc_lists"},[n("ul",t._l(e.docs,(function(e){return n("li",{key:e.id},[n("a",{attrs:{target:"_blank",href:e.link+t.utl_param},domProps:{innerHTML:t._s(e.title)}})])})),0)])])])})),0)],1)}),[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[t._v("Please view the "),n("a",{attrs:{href:"https://fluentsmtp.com/docs"}},[t._v("documentation")]),t._v(" first. If you still can't find the\n answer "),n("a",{attrs:{href:"https://wpmanageninja.com/support-tickets/"}},[t._v("open a support ticket")]),t._v(" and we will be\n happy to answer your questions and assist you with any problems.")])}],!1,null,null,null).exports}];var jt=new window.FluentMail.Router({routes:window.FluentMail.applyFilters("fluent_mail_global_routes",Ot)});window.FluentMail.Vue.prototype.$rest=window.FluentMail.$rest,window.FluentMail.Vue.prototype.$get=window.FluentMail.$get,window.FluentMail.Vue.prototype.$post=window.FluentMail.$post,window.FluentMail.Vue.prototype.$bus=new window.FluentMail.Vue,new window.FluentMail.Vue({el:"#fluent_mail_app",render:function(t){return t(n(8161).Z)},router:jt})})()})();
assets/images/elastic_mail.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="180" height="22.893" viewBox="0 0 180 22.893"><defs><style>.a{fill:#32325c;}</style></defs><g transform="translate(774.141 1092.604)"><path class="a" d="M-427.164-1059.335h-1.871v1.7h1.871a2.956,2.956,0,0,1,2.952,2.953,2.956,2.956,0,0,1-2.952,2.952H-440.6a2.956,2.956,0,0,1-2.952-2.952,2.956,2.956,0,0,1,2.952-2.953h6.591v1.29l3.7-2.138-3.7-2.138v1.285H-440.6a4.659,4.659,0,0,0-4.653,4.654,4.659,4.659,0,0,0,4.653,4.653h13.441a4.659,4.659,0,0,0,4.654-4.653A4.659,4.659,0,0,0-427.164-1059.335Z" transform="translate(-245.42 -23.867)"/><g transform="translate(-774.141 -1092.604)"><path class="a" d="M-771.379-1076.733h8.319v-2.286h-8.319v-6.763h8.8v-2.318h-11.557v21.4h12.034v-2.318h-9.272Z" transform="translate(774.141 1089.243)"/><rect class="a" width="2.794" height="22.543" transform="translate(15.209 0)"/><path class="a" d="M-678.69-1059.417c0-3.08-1.143-6.286-5.843-6.286a9.539,9.539,0,0,0-5.048,1.365l.635,1.842a7.66,7.66,0,0,1,4-1.143c3.144,0,3.493,2.286,3.493,3.556v.318c-5.937-.032-9.24,2-9.24,5.715a4.378,4.378,0,0,0,4.7,4.414,5.725,5.725,0,0,0,4.7-2.286h.1l.222,1.937h2.54a21.641,21.641,0,0,1-.254-3.683Zm-2.7,4.255a2.918,2.918,0,0,1-.159.889,3.823,3.823,0,0,1-3.715,2.572,2.473,2.473,0,0,1-2.635-2.667c0-2.985,3.461-3.524,6.509-3.461Z" transform="translate(711.87 1072.531)"/><path class="a" d="M-625.105-1058.909c-2-.762-2.921-1.334-2.921-2.6,0-1.143.921-2.1,2.572-2.1a5.982,5.982,0,0,1,3.144.889l.7-2.032a7.673,7.673,0,0,0-3.779-.952c-3.3,0-5.3,2.032-5.3,4.508,0,1.842,1.3,3.366,4.064,4.351,2.064.762,2.857,1.492,2.857,2.826,0,1.27-.952,2.286-2.984,2.286a7.321,7.321,0,0,1-3.683-1.111l-.7,2.127a8.76,8.76,0,0,0,4.318,1.048c3.651,0,5.747-1.905,5.747-4.6C-621.073-1056.56-622.438-1057.893-625.105-1058.909Z" transform="translate(667.429 1072.531)"/><path class="a" d="M-580.36-1081.719l-2.731.73v3.683h-2.381v2.127h2.381v8.383c0,1.81.286,3.175,1.079,4a3.873,3.873,0,0,0,3.017,1.175,6.843,6.843,0,0,0,2.476-.381l-.127-2.1a6.213,6.213,0,0,1-1.619.19c-1.556,0-2.1-1.079-2.1-2.984v-8.287h4v-2.127h-4Z" transform="translate(633.352 1084.481)"/><path class="a" d="M-538.058-1088.225a1.7,1.7,0,0,0-1.746,1.746,1.661,1.661,0,0,0,1.683,1.715,1.65,1.65,0,0,0,1.778-1.715A1.658,1.658,0,0,0-538.058-1088.225Z" transform="translate(599.274 1089.336)"/><rect class="a" width="2.794" height="15.368" transform="translate(59.819 7.176)"/><path class="a" d="M-506.623-1051.8c-3.048,0-5.334-2.191-5.334-5.747,0-3.207,1.905-5.811,5.43-5.811a6.481,6.481,0,0,1,3.239.73l.635-2.159a9.338,9.338,0,0,0-3.874-.794c-5.017,0-8.255,3.429-8.255,8.16,0,4.7,3.016,7.843,7.652,7.843a10.292,10.292,0,0,0,4.413-.889l-.476-2.1A7.933,7.933,0,0,1-506.623-1051.8Z" transform="translate(580.602 1072.438)"/></g><g transform="translate(-660.406 -1092.604)"><path class="a" d="M-323.209-1076.733h8.319v-2.286h-8.319v-6.763h8.8v-2.318h-11.558v21.4h12.034v-2.318h-9.271Z" transform="translate(325.971 1089.243)"/><path class="a" d="M-249.525-1065.7a5.244,5.244,0,0,0-3.4,1.079,6.334,6.334,0,0,0-1.715,2h-.063a4.543,4.543,0,0,0-4.35-3.08,5.3,5.3,0,0,0-4.826,2.826h-.1l-.127-2.477h-2.445c.1,1.27.127,2.572.127,4.159v11.208h2.731v-9.271a3.854,3.854,0,0,1,.222-1.365,3.818,3.818,0,0,1,3.461-2.794c2.127,0,3.207,1.778,3.207,4.223v9.208h2.73v-9.493a4.612,4.612,0,0,1,.222-1.4,3.618,3.618,0,0,1,3.3-2.54c2.254,0,3.334,1.778,3.334,4.731v8.7h2.73v-9.049C-244.477-1064.37-247.493-1065.7-249.525-1065.7Z" transform="translate(281.625 1072.531)"/><path class="a" d="M-155.7-1059.417c0-3.08-1.143-6.286-5.842-6.286a9.539,9.539,0,0,0-5.048,1.365l.635,1.842a7.658,7.658,0,0,1,4-1.143c3.144,0,3.493,2.286,3.493,3.556v.318c-5.937-.032-9.24,2-9.24,5.715a4.378,4.378,0,0,0,4.7,4.414,5.725,5.725,0,0,0,4.7-2.286h.1l.222,1.937h2.54a21.625,21.625,0,0,1-.254-3.683Zm-2.7,4.255a2.921,2.921,0,0,1-.159.889,3.824,3.824,0,0,1-3.715,2.572,2.473,2.473,0,0,1-2.635-2.667c0-2.985,3.461-3.524,6.509-3.461Z" transform="translate(207.867 1072.531)"/><path class="a" d="M-103.524-1088.225a1.7,1.7,0,0,0-1.746,1.746,1.662,1.662,0,0,0,1.683,1.715,1.65,1.65,0,0,0,1.778-1.715A1.658,1.658,0,0,0-103.524-1088.225Z" transform="translate(161.279 1089.336)"/><rect class="a" width="2.794" height="15.368" transform="translate(56.358 7.176)"/><rect class="a" width="2.794" height="22.543" transform="translate(63.47 0)"/></g></g></svg>
assets/libs/index.php CHANGED
@@ -1 +1,2 @@
1
- <?php // silence is golden
 
1
+ <?php
2
+ // silence is golden
boot.php CHANGED
@@ -3,7 +3,7 @@
3
  !defined('WPINC') && die;
4
 
5
  define('FLUENTMAIL', 'fluentmail');
6
- define('FLUENTMAIL_PLUGIN_VERSION', '2.0.1');
7
  define('FLUENTMAIL_UPLOAD_DIR', '/fluentmail');
8
  define('FLUENT_MAIL_DB_PREFIX', 'fsmpt_');
9
  define('FLUENTMAIL_PLUGIN_URL', plugin_dir_url(__FILE__));
@@ -25,4 +25,5 @@ spl_autoload_register(function($class) {
25
  );
26
 
27
  require(trailingslashit($path) . trim($file, '/') . '.php');
28
- });
 
3
  !defined('WPINC') && die;
4
 
5
  define('FLUENTMAIL', 'fluentmail');
6
+ define('FLUENTMAIL_PLUGIN_VERSION', '2.0.2');
7
  define('FLUENTMAIL_UPLOAD_DIR', '/fluentmail');
8
  define('FLUENT_MAIL_DB_PREFIX', 'fsmpt_');
9
  define('FLUENTMAIL_PLUGIN_URL', plugin_dir_url(__FILE__));
25
  );
26
 
27
  require(trailingslashit($path) . trim($file, '/') . '.php');
28
+ });
29
+
fluent-smtp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: FluentSMTP
4
  Plugin URI: https://fluentsmtp.com
5
  Description: The Ultimate SMTP Connection Plugin for WordPress.
6
- Version: 2.0.1
7
  Author: FluentSMTP & WPManageNinja Team
8
  Author URI: https://fluentsmtp.com
9
  License: GPL2
@@ -24,12 +24,46 @@ register_deactivation_hook(
24
  __FILE__, array('FluentMail\Includes\Deactivator', 'handle')
25
  );
26
 
27
- call_user_func(function () {
 
28
  $application = new FluentMail\Includes\Core\Application;
29
  add_action('plugins_loaded', function () use ($application) {
30
  do_action('fluentMail_loaded', $application);
31
  });
32
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  /*
35
  * Thanks for checking the source code
3
  Plugin Name: FluentSMTP
4
  Plugin URI: https://fluentsmtp.com
5
  Description: The Ultimate SMTP Connection Plugin for WordPress.
6
+ Version: 2.0.2
7
  Author: FluentSMTP & WPManageNinja Team
8
  Author URI: https://fluentsmtp.com
9
  License: GPL2
24
  __FILE__, array('FluentMail\Includes\Deactivator', 'handle')
25
  );
26
 
27
+ function fluentSmtpInit()
28
+ {
29
  $application = new FluentMail\Includes\Core\Application;
30
  add_action('plugins_loaded', function () use ($application) {
31
  do_action('fluentMail_loaded', $application);
32
  });
33
+ }
34
+
35
+ fluentSmtpInit();
36
+
37
+ if (! function_exists( 'wp_mail' ) ) :
38
+ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
39
+ return fluentMail_wp_mail($to, $subject, $message, $headers, $attachments);
40
+ }
41
+ else:
42
+ if (! (defined( 'DOING_AJAX' ) && DOING_AJAX) ):
43
+ add_action('admin_notices', function() {
44
+ if(!current_user_can('manage_options')) {
45
+ return;
46
+ }
47
+ $details = new ReflectionFunction('wp_mail');
48
+ $hints = $details->getFileName() . ':' . $details->getStartLine();
49
+ ?>
50
+ <div class="notice notice-warning is-dismissible">
51
+ <p>
52
+ <?php
53
+ echo sprintf(
54
+ __('The <strong>FluentSMTP</strong> plugin depends on
55
+ <a target="_blank" href="%1s">wp_mail</a> pluggable function and
56
+ plugin is not able to extend it. Please check if another plugin is using this and disable it for <strong>FluentSMTP</strong> to work!',
57
+ 'fluent-smtp'), 'https://developer.wordpress.org/reference/functions/wp_mail/'
58
+ );
59
+ ?>
60
+ </p>
61
+ <p style="color: red;"><?php _e('Possible Conflict: ', 'fluent-smtp'); ?><?php echo $hints;?></p>
62
+ </div>
63
+ <?php
64
+ });
65
+ endif;
66
+ endif;
67
 
68
  /*
69
  * Thanks for checking the source code
includes/Core/Application.php CHANGED
@@ -93,9 +93,6 @@ final class Application extends Container
93
  */
94
  private function requireCommonFilesForRequest($app)
95
  {
96
- // Require Pluggable Functions
97
- require_once($app['path.app'] . '/Functions/pluggable.php');
98
-
99
  // Require Application Bindings
100
  require_once($app['path.app'] . '/Bindings.php');
101
 
93
  */
94
  private function requireCommonFilesForRequest($app)
95
  {
 
 
 
96
  // Require Application Bindings
97
  require_once($app['path.app'] . '/Bindings.php');
98
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: techjewel, wpmanageninja, heera, adreastrian
3
  Tags: smtp, amazon ses, fluent smtp, wordpress smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, sendinblue, wp smtp
4
  Requires at least: 5.5
5
- Tested up to: 5.8.0
6
- Stable tag: 2.0.1
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -266,6 +266,13 @@ Please <a href="https://wpmanageninja.com/support-tickets/">submit an issue in o
266
 
267
  == Changelog ==
268
 
 
 
 
 
 
 
 
269
  = 2.0.1 (Date: July 28, 2021) =
270
  * Added Postmark API Connection
271
  * Fix Dashboard Stat Number
2
  Contributors: techjewel, wpmanageninja, heera, adreastrian
3
  Tags: smtp, amazon ses, fluent smtp, wordpress smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, sendinblue, wp smtp
4
  Requires at least: 5.5
5
+ Tested up to: 5.8
6
+ Stable tag: 2.0.2
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
266
 
267
  == Changelog ==
268
 
269
+ = 2.0.2 (Date: September 21, 2021) =
270
+ * Fixed Scheduled Database Cleanup
271
+ * Improvement on wp_mail loading and sending emails
272
+ * Pepipost Driver Improvement
273
+ * SendGrid Driver Improvement
274
+ * SendinBlue Drive Improvement
275
+
276
  = 2.0.1 (Date: July 28, 2021) =
277
  * Added Postmark API Connection
278
  * Fix Dashboard Stat Number